dynamic loading chars
diff --git a/build/extension/bodymovin.zxp b/build/extension/bodymovin.zxp
index 9fdd47f..e1f1b52 100644
--- a/build/extension/bodymovin.zxp
+++ b/build/extension/bodymovin.zxp
Binary files differ
diff --git a/build/player/bodymovin.js b/build/player/bodymovin.js
index e07ea99..855bee8 100644
--- a/build/player/bodymovin.js
+++ b/build/player/bodymovin.js
@@ -1,6 +1,5 @@
-(function(window){function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,s,i,a,r){return t.reset().translate(a,r).rotate(e).scale(s,i).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 roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="hidden",styleUnselectableDiv(t)}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=0>i?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,s,i){this.type=t,this.currentLoop=e,this.totalLoops=s,this.direction=0>i?-1:1}function BMSegmentStartEvent(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}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,i=this._cbs[t].length;i>s;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=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,i=0;s>i;i++)this._cbs[t][i](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}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,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.props=r}function iterateDynamicProperties(t){var e,s=this.dynamicProperties;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)}function createElement(t,e,s){if(!e){var i=Object.create(t.prototype,s),a={};return i&&"[object Function]"===a.toString.call(i.init)&&i.init(),i}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,i,a,r){return bm_abs((s-t)*(r-e)-(a-t)*(i-e))<1e-5}function e(t,e,s,i,a){if(a||(a=("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p")),o[a])return o[a];var r,n,h,l,p,m;return o[a]=function(a,o,f,d,c){var u=o/c;a=u;for(var y,v=0;++v<20&&(h=3*t,n=3*(s-t)-h,r=1-h-n,y=a*(h+a*(n+a*r))-u,!(bm_abs(y)<.001));)a-=y/(h+a*(2*n+3*r*a));m=3*e,p=3*(i-e)-m,l=1-m-p;var g=a*(m+a*(p+a*l));return d*g+f},o[a]}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var s=e.segments,i=s.length,a=bm_floor((i-1)*t),r=t*e.addedLength,n=0;if(r==s[a].l)return s[a].p;for(var o=s[a].l>r?-1:1,h=!0;h;)s[a].l<=r&&s[a+1].l>r?(n=(r-s[a].l)/(s[a+1].l-s[a].l),h=!1):a+=o,(0>a||a>=i-1)&&(h=!1);return s[a].p+(s[a+1].p-s[a].p)*n}function r(){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,i,n,o,h){var l=new r;n=0>n?0:n;var p=a(n,h);o=o>1?1:o;var m,f=a(o,h),d=t.length,c=1-p,u=1-f;for(m=0;d>m;m+=1)l.pt1[m]=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)*i[m]+p*p*p*e[m],l.pt3[m]=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)*i[m]+p*p*f*e[m],l.pt4[m]=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)*i[m]+p*f*f*e[m],l.pt2[m]=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)*i[m]+f*f*f*e[m];return l}var o=[],h=(Math,function(){function e(t,e){this.l=t,this.p=e}var s={};return function(i,a,r,n){var o=(i.join("_")+"_"+a.join("_")+"_"+r.join("_")+"_"+n.join("_")).replace(/\./g,"p");if(s[o])return s[o];var h,l,p,m,f,d,c=defaultCurveSegments,u=0,y=[],v=[],g={addedLength:0,segments:[]};for((i[0]!=a[0]||i[1]!=a[1])&&t(i[0],i[1],a[0],a[1],r[0],r[1])&&t(i[0],i[1],a[0],a[1],n[0],n[1])&&(c=2),p=r.length,h=0;c>h;h+=1){for(f=h/(c-1),d=0,l=0;p>l;l+=1)m=bm_pow(1-f,3)*i[l]+3*bm_pow(1-f,2)*f*r[l]+3*(1-f)*bm_pow(f,2)*n[l]+bm_pow(f,3)*a[l],y[l]=m,null!==v[l]&&(d+=bm_pow(y[l]-v[l],2)),v[l]=y[l];d&&(d=bm_sqrt(d),u+=d),g.segments.push(new e(u,f))}return g.addedLength=u,s[o]=g,g}}()),l=function(){var e={};return function(a){var r=a.s,n=a.e,o=a.to,h=a.ti,l=(r.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(a.bezierData=e[l]);var p,m,f,d,c,u,y,v=defaultCurveSegments,g=0,b=null;(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+o[0],r[1]+o[1])&&t(r[0],r[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(v=2);var E=new s(v);for(f=o.length,p=0;v>p;p+=1){for(y=new Array(f),c=p/(v-1),u=0,m=0;f>m;m+=1)d=bm_pow(1-c,3)*r[m]+3*bm_pow(1-c,2)*c*(r[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),g+=u,E.points[p]=new i(u,y),b=y}E.segmentLength=g,a.bezierData=E,e[l]=E}}();return{getEasingCurve:e,getBezierLength:h,getNewSegment:n,buildBezierData:l}}function dataFunctionManager(){function t(a,n,o){var h,l,p,m,f,d,c,u,y=a.length;for(m=0;y>m;m+=1)if(h=a[m],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(a[m-1].td=h.tt),l=[],p=-1,h.hasMask){var v=h.masksProperties;for(d=v.length,f=0;d>f;f+=1)if(v[f].pt.k.i)i(v[f].pt.k);else for(u=v[f].pt.k.length,c=0;u>c;c+=1)v[f].pt.k[c].s&&i(v[f].pt.k[c].s[0]),v[f].pt.k[c].e&&i(v[f].pt.k[c].e[0])}0===h.ty?(h.layers=e(h.refId,n),t(h.layers,n,o)):4===h.ty?s(h.shapes,!1):5==h.ty&&r(h,o)}}function e(t,e){for(var s=0,i=e.length;i>s;){if(e[s].id===t)return JSON.parse(JSON.stringify(e[s].layers));s+=1}}function s(t,e){var a,r,n,o=t.length,h=e?e:!1;for(a=o-1;a>=0;a-=1)if("tm"==t[a].ty&&(h=!0),"sh"==t[a].ty)if(t[a].trimmed=h,t[a].ks.k.i)i(t[a].ks.k);else for(n=t[a].ks.k.length,r=0;n>r;r+=1)t[a].ks.k[r].s&&i(t[a].ks.k[r].s[0]),t[a].ks.k[r].e&&i(t[a].ks.k[r].e[0]);else"gr"==t[a].ty&&s(t[a].it,h)}function i(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 a(e,s){t(e.layers,e.assets,s)}function r(t,e){var s,i,a,r,o,h,l,p,m=[],f=t.t.d,d=0,c=t.t.m.g,u=0,y=0,v=0,g=[],b=0,E=0,P=e.getFontByName(f.f),S=P.fStyle.split(" "),C="normal",k="normal";for(i=S.length,s=0;i>s;s+=1)"italic"===S[s].toLowerCase()?k="italic":"bold"===S[s].toLowerCase()?C="700":"black"===S[s].toLowerCase()?C="900":"medium"===S[s].toLowerCase()?C="500":"regular"===S[s].toLowerCase()||"normal"===S[s].toLowerCase()?C="400":("light"===S[s].toLowerCase()||"thin"===S[s].toLowerCase())&&(C="200");for(f.fWeight=C,f.fStyle=k,i=f.t.length,s=0;i>s;s+=1)if(a=!1," "===f.t.charAt(s)?r=" ":13===f.t.charCodeAt(s)?(g.push(b),E=b>E?b:E,b=0,r="",a=!0,v+=1):r=f.t.charAt(s),e.chars?(l=e.getCharData(f.t.charAt(s),P.fStyle,e.getFontByName(f.f).fFamily),p=a?0:l.w*f.s/100):(n.font=f.s+"px "+e.getFontByName(f.f).fFamily,p=n.measureText(r).width),b+=p,m.push({l:p,an:p,add:u,n:a,anIndexes:[],val:r,line:v}),2==c){if(u+=p,""==r||" "==r||s==i-1){for((""==r||" "==r)&&(u-=p);s>=y;)m[y].an=u,m[y].ind=d,m[y].extra=p,y+=1;d+=1,u=0}}else if(3==c){if(u+=p,""==r||s==i-1){for(""==r&&(u-=p);s>=y;)m[y].an=u,m[y].ind=d,m[y].extra=p,y+=1;u=0,d+=1}}else m[d].ind=d,m[d].extra=0,d+=1;switch(f.l=m,E=b>E?b:E,g.push(b),f.boxWidth=E,f.lineWidths=g,f.j){case 1:t.t.d.justifyOffset=-f.boxWidth;break;case 2:t.t.d.justifyOffset=-f.boxWidth/2;break;default:t.t.d.justifyOffset=0}var w=t.t.a;h=w.length;var x,D,I=[];for(o=0;h>o;o+=1){for(w[o].a.sc&&(f.strokeColorAnim=!0),w[o].a.sw&&(f.strokeWidthAnim=!0),w[o].a.fc&&(f.fillColorAnim=!0),D=0,x=w[o].s.b,s=0;i>s;s+=1)m[s].anIndexes[o]=D,(1==x&&""!=m[s].val||2==x&&""!=m[s].val&&" "!=m[s].val||3==x&&(m[s].n||" "==m[s].val||s==i-1)||4==x&&(m[s].n||s==i-1))&&(1===w[o].s.rn&&I.push(D),D+=1);t.t.a[o].s.totalChars=D;var F,T=-1;if(1===w[o].s.rn)for(s=0;i>s;s+=1)T!=m[s].anIndexes[o]&&(T=m[s].anIndexes[o],F=I.splice(Math.floor(Math.random()*I.length),1)[0]),m[s].anIndexes[o]=F}0!==h||"m"in t.t.p||(t.singleShape=!0),f.yOffset=1.2*f.s}var n=document.createElement("canvas").getContext("2d"),o=(new Matrix,{});return o.completeData=a,o}function ExpressionComp(){}function ShapeInterface(){}function SVGRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},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:new Array(15),savedOp:new Array(15),cArrPos:0,cTr:new Matrix,cO:1};var s,i=15;for(s=0;i>s;s+=1)this.contextData.saved[s]=new Array(6);this.elements=[]}function HybridRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},this.elements=[],this.destroyed=!1}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 i,a,r,n,o,h,l,p=this.element.maskedElement,m=this.globalData.defs,f=this.masksProperties.length,d=this.masksProperties,c=0,u=[],y=randomString(10),v="clipPath",g="clip-path";for(i=0;f>i;i++)if(("a"!==d[i].mode&&"n"!==d[i].mode||d[i].inv)&&(v="mask",g="mask"),"s"!=d[i].mode&&"i"!=d[i].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[i].mode){if(c+=1,a=document.createElementNS(svgNS,"path"),d[i].cl?"s"==d[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"):(a.setAttribute("fill","none"),"s"==d[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"),a.setAttribute("stroke-width","1"),a.setAttribute("stroke-miterlimit","10")),a.setAttribute("clip-rule","nonzero"),0!==d[i].x.k){v="mask",g="mask";var b=PropertyFactory.getProp(this.element,d[i].x,0,null,this.dynamicProperties),E="fi_"+randomString(10);h=document.createElementNS(svgNS,"filter"),h.setAttribute("id",E),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[i].mode?a.setAttribute("stroke","#000000"):a.setAttribute("stroke","#ffffff")}else l=null;if(this.storedData[i]={elem:a,x:b,expan:l,lastPath:"",lastOperator:"",filterId:E,lastRadius:0},"i"==d[i].mode){n=u.length;var P=document.createElementNS(svgNS,"g");for(r=0;n>r;r+=1)P.appendChild(u[r]);var S=document.createElementNS(svgNS,"mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",y+"_"+c),S.appendChild(a),m.appendChild(S),P.setAttribute("mask","url(#"+y+"_"+c+")"),u.length=0,u.push(P)}else u.push(a);d[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",prop:PropertyFactory.getShapeProp(this.element,d[i],3,this.dynamicProperties,null)},this.viewData[i].prop.k||this.drawPath(d[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={prop:PropertyFactory.getShapeProp(this.element,d[i],3,this.dynamicProperties,null)};for(this.maskElement=document.createElementNS(svgNS,v),f=u.length,i=0;f>i;i+=1)this.maskElement.appendChild(u[i]);this.maskElement.setAttribute("id",y),c>0&&p.setAttribute(g,"url(#"+y+")"),m.appendChild(this.maskElement)}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,1/255,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 EffectsManager(t,e,s){this.data=t,this.element=e;var i=t.ef;this.effectElements=[];var a,r,n=i.length;for(a=0;n>a;a++)switch(i[a].ty){case 0:r=new SliderEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 1:r=new AngleEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 2:r=new ColorEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 3:r=new PointEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 4:r=new CheckboxEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r))}}function BaseElement(){}function SVGBaseElement(t,e,s,i,a){this.globalData=s,this.comp=i,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=a?a.layerId:"ly_"+randomString(10),this.placeholder=a,this.init()}function ITextElement(t,e,s,i){}function SVGTextElement(t,e,s,i,a){this.textSpans=[],this.renderType="svg",this.parent.constructor.call(this,t,e,s,i,a)}function ICompElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a),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,i,a){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this.parent.constructor.call(this,t,e,s,i,a)}function IShapeElement(t,e,s,i,a){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.parent.constructor.call(this,t,e,s,i,a)}function ShapeItemElement(t,e,s,i,a,r){this.shape=e,this.parentContainer=s,this.placeholder=i,this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=r,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,a,[]),styleUnselectableDiv(this.shape)}function ISolidElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a)}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),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,s.frameRate,this.dynamicProperties,this.comp))}function CVImageElement(t,e,s){this.animationItem=s.renderer.animationItem,this.assetData=this.animationItem.getAssetData(t.refId),this.path=this.animationItem.getPath(),this.parent.constructor.call(this,t,e,s),this.animationItem.pendingElements+=1}function CVMaskElement(t,e,s){this.data=t,this.element=e,this.globalData=s,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.ctx=this.element.canvasContext,this.viewData=new Array(this.masksProperties.length);var i,a=this.masksProperties.length;for(i=0;a>i;i++)this.viewData[i]=PropertyFactory.getShapeProp(this.element,this.masksProperties[i],3,this.dynamicProperties,null)}function CVShapeElement(t,e,s){this.shapes=[],this.stylesList=[],this.viewData=[],this.shapesData=t.shapes,this.firstFrame=!0,this.parent.constructor.call(this,t,e,s)}function CVShapeItemElement(t,e,s){this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=s,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,e,[])}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.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.parent.constructor.call(this,t,e,s),this.renderedLetters=[]}function HBaseElement(t,e,s,i,a){this.globalData=s,this.comp=i,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=a?a.layerId:"ly_"+randomString(10),this.placeholder=a,this.init()}function HSolidElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a)}function HCompElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a),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,i,a){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.parent.constructor.call(this,t,e,s,i,a)}function HTextElement(t,e,s,i,a){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.parent.constructor.call(this,t,e,s,i,a)}var svgNS="http://www.w3.org/2000/svg",Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=1,this.props[4]=0,this.props[5]=0,this}function e(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,s,-s,e,0,0)}function s(t,e){return this._t(1,e,t,1,0,0)}function i(t,e){return this.shear(Math.tan(t),Math.tan(e))}function a(t,e){var s=Math.cos(e),i=Math.sin(e);return this._t(s,i,-i,s,0,0)._t(1,0,Math.tan(t),1,0,0)._t(s,-i,i,s,0,0)}function r(t,e){return 1==t&&1==e?this:this._t(t,0,0,e,0,0)}function n(t,e,s,i,a,r){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this}function o(t,e){return(0!==t||0!==e)&&(this.props[4]=this.props[0]*t+this.props[2]*e+this.props[4],this.props[5]=this.props[1]*t+this.props[3]*e+this.props[5]),this}function h(t,e,s,i,a,r){if(1===t&&0===e&&0===s&&1===i)return(0!==a||0!==r)&&(this.props[4]=this.props[0]*a+this.props[2]*r+this.props[4],this.props[5]=this.props[1]*a+this.props[3]*r+this.props[5]),this;var n=this.props[0],o=this.props[1],h=this.props[2],l=this.props[3],p=this.props[4],m=this.props[5];return this.props[0]=n*t+h*e,this.props[1]=o*t+l*e,this.props[2]=n*s+h*i,this.props[3]=o*s+l*i,this.props[4]=n*a+h*r+p,this.props[5]=o*a+l*r+m,this}function l(t){t.props[0]=this.props[0],t.props[1]=this.props[1],t.props[2]=this.props[2],t.props[3]=this.props[3],t.props[4]=this.props[4],t.props[5]=this.props[5]}function p(t,e){return{x:t*this.props[0]+e*this.props[2]+this.props[4],y:t*this.props[1]+e*this.props[3]+this.props[5]}}function m(t,e){return t*this.props[0]+e*this.props[2]+this.props[4]}function f(t,e){return t*this.props[1]+e*this.props[3]+this.props[5]}function d(t,e){return[t*this.props[0]+e*this.props[2]+this.props[4],t*this.props[1]+e*this.props[3]+this.props[5]]}function c(t,e){return bm_rnd(t*this.props[0]+e*this.props[2]+this.props[4])+","+bm_rnd(t*this.props[1]+e*this.props[3]+this.props[5])}function u(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5]]}function y(){return this.cssParts[1]=this.props.join(","),this.cssParts.join("")}function v(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.skew=i,this.skewFromAxis=a,this.shear=s,this.scale=r,this.setTransform=n,this.translate=o,this.transform=h,this.applyToPoint=p,this.applyToX=m,this.applyToY=f,this.applyToPointArray=d,this.applyToPointStringified=c,this.toArray=u,this.toCSS=y,this.toString=v,this.clone=l,this._t=this.transform,this.props=[1,0,0,1,0,0],this.cssParts=["matrix(","",")"]}}(),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 i=(new Date).getTime(),a=Math.max(0,16-(i-t)),r=window.setTimeout(function(){e(i+a)},a);return t=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var subframeEnabled=!0,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,defaultCurveSegments=50,degToRads=Math.PI/180;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,i){return 0>t&&(t=0),0>e&&(e=0),0>i&&(i=0),"#"+s[t]+s[e]+s[i]}}(),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]]}}(),bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var s=document.createElement("span");s.style.fontFamily=e;var i=document.createElement("span");i.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(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function e(){var t,s,i,a=this.fonts.length,r=a;for(t=0;a>t;t+=1)this.fonts[t].loaded?r-=1:(s=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,s.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(s=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,s.offsetWidth!==i&&(r-=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!==r&&Date.now()-this.initTime<o?setTimeout(e.bind(this),20):this.loaded=!0}function s(){if(window.Typekit&&window.Typekit.load)try{Typekit.load({async:!1})}catch(t){console.log("errwor",t)}else setTimeout(s,50)}function i(i,a){if(!i)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=i.list);if(i.tk){var r=document.createElement("script");r.setAttribute("src",i.tk),a.appendChild(r),s()}var n,o=i.list,h=o.length;for(n=0;h>n;n+=1){if(o[n].loaded=!1,o[n].monoCase=t(o[n].fFamily,"monospace"),o[n].sansCase=t(o[n].fFamily,"sans-serif"),o[n].fPath&&o[n].fPath){var r=document.createElement("style");r.type="text/css",r.innerHTML="@font-face {font-family: "+o[n].fFamily+"; font-style: normal; src: url('"+o[n].fPath+"');}",a.appendChild(r)}this.fonts.push(o[n])}e.bind(this)()}function a(t){this.chars=t}function r(t,e,s){for(var i=0,a=this.chars.length;a>i;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}}function n(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 o=5e3,h=function(){this.fonts=[],this.chars=null,this.loaded=!1,this.initTime=Date.now()};return h.prototype.addChars=a,h.prototype.addFonts=i,h.prototype.getCharData=r,h.prototype.getFontByName=n,h}(),ExpressionManager=function(){function sum(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("object"==typeof t&&"number"==typeof e)return t[0]=t[0]+e,t;if("number"==typeof t&&"object"==typeof e)return e[0]=t+e[0],e;if("object"==typeof t&&"object"==typeof e){for(var s=0,i=t.length,a=e.length,r=[];i>s||a>s;)r[s]=t[s]&&e[s]?t[s]+e[s]:t[s]||e[s],s+=1;return r}return 0}function sub(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("object"==typeof t&&"number"==typeof e)return t[0]=t[0]-e,t;if("number"==typeof t&&"object"==typeof e)return e[0]=t-e[0],e;if("object"==typeof t&&"object"==typeof e){for(var s=0,i=t.length,a=e.length,r=[];i>s||a>s;)r[s]=t[s]&&e[s]?t[s]-e[s]:t[s]||e[s],s+=1;return r}return 0}function mul(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;var s,i;if("object"==typeof t&&"number"==typeof e){for(i=t.length,s=0;i>s;s+=1)t[s]=t[s]*e;return t}if("number"==typeof t&&"object"==typeof e){for(i=e.length,s=0;i>s;s+=1)e[s]=t*e[s];return e}return 0}function div(t,e){if("number"==typeof t&&"number"==typeof e)return t/e;var s,i;if("object"==typeof t&&"number"==typeof e){for(i=t.length,s=0;i>s;s+=1)t[s]=t[s]/e;return t}if("number"==typeof t&&"object"==typeof e){for(i=e.length,s=0;i>s;s+=1)e[s]=t/e[s];return e}return 0}function clamp(t,e,s){return Math.min(Math.max(t,e),s)}function random(t,e){if(e||(e=0),t>e){var s=e;e=t,t=s}return t+Math.random()*(e-t)}function initiateExpression(elem,data){function effect(t){return elem.effectsManager.getEffect(t)}function nearestKey(t){var e=0,s=data.k.length,i={};for(e=0;s>e;e+=1){if(t===data.k[e].t){i.index=e;break}if(t<data.k[e].t){i.index=e;break}if(t>data.k[e].t&&e===s-1){i.index=s-1;break}}return i}function key(t){t-=1;var e,s={time:data.k[t].t/thisComp.globalData.frameRate};e=t===data.k.length-1?data.k[t-1].e:data.k[t].s;var i,a=e.length;for(i=0;a>i;i+=1)s[i]=e[i];return s}function execute(){"textSelector"===this.type&&(textIndex=this.textIndex,textTotal=this.textTotal),transform||(transform=elem.transform),!content&&elem.content&&(content=elem.content.bind(elem)),this.getPreValue&&this.getPreValue(),value=this.pv,time=this.comp.renderedFrame/this.comp.globalData.frameRate,bindedFn();var t,e;if(this.mult)if("number"==typeof this.v)this.v*=this.mult;else for(e=this.v.length,value===this.v&&(this.v=2===e?[value[0],value[1]]:[value[0],value[1],value[2]]),t=0;e>t;t+=1)this.v[t]*=this.mult;if("number"==typeof this.v)this.lastValue!==this.v&&(this.lastValue=this.v,this.mdf=!0);else for(e=this.v.length,t=0;e>t;t+=1)this.v[t]!==this.lastValue[t]&&(this.lastValue[t]=this.v[t],this.mdf=!0)}var val=data.x,transform,content,effect,thisComp=elem.comp,fnStr="var fn = function(){"+val+";this.v = $bm_rt;}";eval(fnStr);var bindedFn=fn.bind(this),numKeys=data.k?data.k.length:0,time,value,textIndex,textTotal;return execute}var ob={};return ob.initiateExpression=initiateExpression,ob}();!function(){ExpressionComp.prototype.layer=function(t){for(var e=0,s=this.layers.length;s>e;){if(this.layers[e].nm===t)return this.elements[e];e+=1}}}(),ShapeInterface.prototype.fillInterface=function(t){var e={get color(){return t.c.k&&t.c.getValue(),[t.c.pv[0],t.c.pv[1],t.c.pv[2]]},get opacity(){return t.o.k&&t.o.getValue(),t.o.pv}};return e},ShapeInterface.prototype.strokeInterface=function(t,e){var s={get color(){return e.c.k&&e.c.getValue(),[e.c.pv[0],e.c.pv[1],e.c.pv[2]]},get opacity(){return e.o.k&&e.o.getValue(),e.o.pv},get strokeWidth(){return e.w.k&&e.w.getValue(),e.w.pv},dashOb:{},get dash(){var s,i=e.d,a=t.d,r=a.length;for(s=0;r>s;s+=1)i.dataProps[s].p.k&&i.dataProps[s].p.getValue(),this.dashOb[a[s].nm]=i.dataProps[s].p.v;return this.dashOb}};return s},ShapeInterface.prototype.shapeInterface=function(t){var e={get shape(){return t.sh.k&&t.sh.getValue(),t.sh.pv}};return e},ShapeInterface.prototype.ellipseInterface=function(t){var e={get size(){return t.sh.s.k&&t.sh.s.getValue(),[t.sh.s.pv[0],t.sh.s.pv[1]]},get position(){return t.sh.p.k&&t.sh.p.getValue(),[t.sh.p.pv[0],t.sh.p.pv[1]]}};return e},ShapeInterface.prototype.rectangleInterface=function(t){var e="tm"===t.sh.ty?t.sh.prop:t.sh,s={get size(){return e.s.k&&e.s.getValue(),[e.s.pv[0],e.s.pv[1]]},get position(){return e.p.k&&e.p.getValue(),[e.p.pv[0],e.p.pv[1]]},get roundness(){return e.r.k&&e.r.getValue(),e.r.pv}};return s},ShapeInterface.prototype.trimInterface=function(t){var e={get start(){return t.tr.s.k&&t.tr.s.getValue(),t.tr.s.pv},get end(){return t.tr.e.k&&t.tr.e.getValue(),t.tr.e.pv},get offset(){return t.tr.o.k&&t.tr.o.getValue(),t.tr.o.pv}};return e},ShapeInterface.prototype.transformInterface=function(t){var e={get opacity(){return t.transform.mProps.o.k&&t.transform.mProps.o.getValue(),t.transform.mProps.o.pv},get position(){return t.transform.mProps.p.k&&t.transform.mProps.p.getValue(),[t.transform.mProps.p.pv[0],t.transform.mProps.p.pv[1]]},get anchorPoint(){return t.transform.mProps.a.k&&t.transform.mProps.a.getValue(),[t.transform.mProps.a.pv[0],t.transform.mProps.a.pv[1]]},get scale(){return t.transform.mProps.s.k&&t.transform.mProps.s.getValue(),[t.transform.mProps.s.pv[0],t.transform.mProps.s.pv[1]]},get rotation(){return t.transform.mProps.r.k&&t.transform.mProps.r.getValue(),t.transform.mProps.r.pv}};return e},ShapeInterface.prototype.groupInterface=function(t,e,s){var i,a,r=[],n=t.length;for(i=0;n>i;i+=1)"gr"===t[i].ty?(a={},this.groupInterface(t[i].it,e[i].it,a),r.push(a)):"sh"===t[i].ty?(a=this.shapeInterface(e[i]),r.push(a)):"fl"===t[i].ty?(a=this.fillInterface(e[i]),r.push(a)):"st"===t[i].ty?(a=this.strokeInterface(t[i],e[i]),r.push(a)):"el"===t[i].ty?(a=this.ellipseInterface(e[i]),r.push(a)):"rc"===t[i].ty?(a=this.rectangleInterface(e[i]),r.push(a)):"tr"===t[i].ty?s.transform=this.transformInterface(e[i]):"tm"===t[i].ty?(a=this.trimInterface(e[i]),r.push(a)):r.push("");s.content=function(e){var s,i=t.length;for(s=0;i>s;s+=1)if(t[s].nm===e)return r[s]}},ShapeInterface.prototype.buildExpressionInterface=function(){this.groupInterface(this.shapesData,this.viewData,this)};var PropertyFactory=function(){function t(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var t=this.comp.renderedFrame-this.offsetTime;if(t===this.lastFrame||this.lastFrame!==d&&(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,i=0,a=this.keyframes.length-1,r=1,n=!0;n;){if(e=this.keyframes[i],s=this.keyframes[i+1],i==a-1&&t>=s.t-this.offsetTime){e.h&&(e=s);break}if(s.t-this.offsetTime>t)break;a-1>i?i+=r:n=!1}var o,h,l,p,m,f=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?m=e.__fnct:(m=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y,e.n),e.__fnct=m),l=m("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime));var y,v=c.segmentLength*l,g=0;for(r=1,n=!0,p=c.points.length;n;){if(g+=c.points[f].partialLength*r,0===v||0===l||f==c.points.length-1){for(h=c.points[f].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?c.points[f].point[o]*this.mult:c.points[f].point[o],this.pv[o]=c.points[f].point[o],this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}if(v>g&&v<g+c.points[f+1].partialLength){for(y=(v-g)/c.points[f+1].partialLength,h=c.points[f].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?(c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y)*this.mult:c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.pv[o]=c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}p-1>f&&1==r||f>0&&-1==r?f+=r:n=!1}}}else{var b,E,P,S,C,k=!1;for(a=e.s.length,i=0;a>i;i+=1)1!==e.h&&(e.o.x instanceof Array?(k=!0,e.__fnct||(e.__fnct=[]),e.__fnct[i]||(b=e.o.x[i]||e.o.x[0],E=e.o.y[i]||e.o.y[0],P=e.i.x[i]||e.i.x[0],S=e.i.y[i]||e.i.y[0])):(k=!1,e.__fnct||(b=e.o.x,E=e.o.y,P=e.i.x,S=e.i.y)),k?e.__fnct[i]?m=e.__fnct[i]:(m=bez.getEasingCurve(b,E,P,S),e.__fnct[i]=m):e.__fnct?m=e.__fnct:(m=bez.getEasingCurve(b,E,P,S),e.__fnct=m),l=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:m("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))),C=1===e.h?e.s[i]:e.s[i]+(e.e[i]-e.s[i])*l,1===a?(this.v=this.mult?C*this.mult:C,
-this.pv=C,this.lastPValue!=this.pv&&(this.mdf=!0,this.lastPValue=this.pv)):(this.v[i]=this.mult?C*this.mult:C,this.pv[i]=C,this.lastPValue[i]!==this.pv[i]&&(this.mdf=!0,this.lastPValue[i]=this.pv[i]))}}this.lastFrame=t}}function e(){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime;if(this.lastFrame!==d&&(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,i;if(t<this.keyframes[0].t-this.offsetTime)this.mdf=!0,e=this.keyframes[0].s[0],i=!0;else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)this.mdf=!0,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],i=!0;else{this.mdf=!0;for(var a,r,n,o,h,l,p=0,m=this.keyframes.length-1,f=1,c=!0;c&&(a=this.keyframes[p],r=this.keyframes[p+1],!(r.t-this.offsetTime>t&&1==f));)m-1>p&&1==f||p>0&&-1==f?p+=f:c=!1;var u;if(1!==a.h){var y;a.__fnct?y=a.__fnct:(y=bez.getEasingCurve(a.o.x,a.o.y,a.i.x,a.i.y),a.__fnct=y),u=t>=r.t-this.offsetTime?1:t<a.t-this.offsetTime?0:y("",t-(a.t-this.offsetTime),0,1,r.t-this.offsetTime-(a.t-this.offsetTime)),s=a.e[0]}e=a.s[0],i=1===a.h}for(o=this.v.i.length,l=e.i[0].length,n=0;o>n;n+=1)for(h=0;l>h;h+=1)i?(this.v.i[n][h]=e.i[n][h],this.v.o[n][h]=e.o[n][h],this.v.v[n][h]=e.v[n][h],this.pv.i[n][h]=e.i[n][h],this.pv.o[n][h]=e.o[n][h],this.pv.v[n][h]=e.v[n][h]):(this.v.i[n][h]=e.i[n][h]+(s.i[n][h]-e.i[n][h])*u,this.v.o[n][h]=e.o[n][h]+(s.o[n][h]-e.o[n][h])*u,this.v.v[n][h]=e.v[n][h]+(s.v[n][h]-e.v[n][h])*u,this.pv.i[n][h]=e.i[n][h]+(s.i[n][h]-e.i[n][h])*u,this.pv.o[n][h]=e.o[n][h]+(s.o[n][h]-e.o[n][h])*u,this.pv.v[n][h]=e.v[n][h]+(s.v[n][h]-e.v[n][h])*u)}this.lastFrame=t}function s(t,e){this.getExpression=ExpressionManager.initiateExpression,e.x&&(this.k=!0,this.x=!0,this.getValue&&(this.getPreValue=this.getValue),this.getValue=this.getExpression(t,e))}function i(t,e,i){this.mult=i,this.v=i?e.k*i:e.k,this.pv=e.k,this.mdf=!1,this.comp=t.comp,this.k=!1,s.bind(this)(t,e)}function a(t,e,i){this.mult=i,this.mdf=!1,this.comp=t.comp,this.k=!1,s.bind(this)(t,e),this.v=new Array(e.k.length),this.pv=new Array(e.k.length);var a,r=e.k.length;for(a=0;r>a;a+=1)this.v[a]=i?e.k[a]*i:e.k[a],this.pv[a]=e.k[a]}function r(e,i,a){this.keyframes=i.k,this.offsetTime=e.data.st,this.lastValue=-99999,this.lastPValue=-99999,this.frameId=-1,this.k=!0,this.mult=a,this.elem=e,this.comp=e.comp,this.lastFrame=d,this.v=a?i.k[0].s[0]*a:i.k[0].s[0],this.pv=i.k[0].s[0],this.getValue=t,s.bind(this)(e,i)}function n(e,i,a){this.keyframes=i.k,this.offsetTime=e.data.st,this.k=!0,this.mult=a,this.elem=e,this.comp=e.comp,this.getValue=t,this.frameId=-1,this.v=new Array(i.k[0].s.length),this.pv=new Array(i.k[0].s.length),this.lastValue=new Array(i.k[0].s.length),this.lastPValue=new Array(i.k[0].s.length),this.lastFrame=d,s.bind(this)(e,i)}function o(t,e,s,o,h){var l;if(2===s)l=new c(t,e,h);else if(7===s)l=new v(t,e,h);else if(e.k.length)if("number"==typeof e.k[0])l=new a(t,e,o);else switch(s){case 0:l=new r(t,e,o);break;case 1:l=new n(t,e,o)}else l=new i(t,e,o);return(l.k||l.x)&&h.push(l),l}function h(t,e,i){this.comp=t.comp,this.k=!1,this.mdf=!1,this.closed=3===i?e.cl:e.closed,this.numNodes=3===i?e.pt.k.v.length:e.ks.k.v.length,this.v=3===i?e.pt.k:e.ks.k;var a=3===i?e.pt:e.ks;this.pv=this.v,s.bind(this)(t,a)}function l(t,s,i){this.comp=t.comp,this.offsetTime=t.data.st,this.getValue=e,this.keyframes=3===i?s.pt.k:s.ks.k,this.k=!0,this.closed=3===i?s.cl:s.closed;var a,r=this.keyframes[0].s[0].i.length,n=this.keyframes[0].s[0].i[0].length;for(this.numNodes=r,this.v={i:new Array(r),o:new Array(r),v:new Array(r)},this.pv={i:new Array(r),o:new Array(r),v:new Array(r)},a=0;r>a;a+=1)this.v.i[a]=new Array(n),this.v.o[a]=new Array(n),this.v.v[a]=new Array(n),this.pv.i[a]=new Array(n),this.pv.o[a]=new Array(n),this.pv.v[a]=new Array(n);this.lastFrame=d}function p(t,e,s,i,a){var r;if(3===s||4===s){var n=3===s?e.pt.k:e.ks.k;r=n.length?new l(t,e,s):new h(t,e,s)}else 5===s?r=new y(t,e):6===s&&(r=new u(t,e));var o=!1;if(a)for(var p=0,m=a.length;m>p;){if(!a[p].closed){o=!0;break}p+=1}return o&&(r=new g(r,a)),r.k&&i.push(r),r}function m(t,e,s,i){return new b(t,e,s,i)}function f(t,e,s){switch(e.t){case 0:return new P(t,e,s);case 1:return new E(t,e)}}var d=-999999,c=function(){function t(){return this.p.k&&this.getValue(),this.p.pv}function e(){return this.a.k&&this.getValue(),this.a.pv}function s(){return this.r.k&&this.getValue(),this.r.pv}function i(){return this.s.k&&this.getValue(),this.s.pv}function a(){return this.o.k&&this.o.getValue(),this.o.pv}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.data.p.s?this.v.reset().translate(this.px.v,this.py.v).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]):this.v.reset().translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]))}}return function(n,h,l){this.elem=n,this.frameId=-1,this.dynamicProperties=[],this.mdf=!1,this.data=h,this.getValue=r,this.v=new Matrix,this.a=o(n,h.a,1,0,this.dynamicProperties),h.p.s?(this.px=o(n,h.p.x,0,0,this.dynamicProperties),this.py=o(n,h.p.y,0,0,this.dynamicProperties)):this.p=o(n,h.p,1,0,this.dynamicProperties),this.s=o(n,h.s,1,.01,this.dynamicProperties),this.r=o(n,h.r,0,degToRads,this.dynamicProperties),this.o=o(n,h.o,0,.01,l),this.dynamicProperties.length?l.push(this):this.data.p.s?this.v.translate(this.px.v,this.py.v).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]):this.v.translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]),Object.defineProperty(this,"position",{get:t}),Object.defineProperty(this,"anchorPoint",{get:e}),Object.defineProperty(this,"rotation",{get:s}),Object.defineProperty(this,"scale",{get:i}),Object.defineProperty(this,"opacity",{get:a})}}(),u=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-a],this.v.i[0]=[t-i*s,e-a],this.v.o[0]=[t+i*s,e-a],this.v.v[1]=[t+i,e],this.v.i[1]=[t+i,e-a*s],this.v.o[1]=[t+i,e+a*s],this.v.v[2]=[t,e+a],this.v.i[2]=[t+i*s,e+a],this.v.o[2]=[t-i*s,e+a],this.v.v[3]=[t-i,e],this.v.i[3]=[t-i,e+a*s],this.v.o[3]=[t-i,e-a*s]):(this.v.v[0]=[t,e-a],this.v.o[0]=[t-i*s,e-a],this.v.i[0]=[t+i*s,e-a],this.v.v[1]=[t-i,e],this.v.o[1]=[t-i,e+a*s],this.v.i[1]=[t-i,e-a*s],this.v.v[2]=[t,e+a],this.v.o[2]=[t+i*s,e+a],this.v.i[2]=[t-i*s,e+a],this.v.v[3]=[t+i,e],this.v.o[3]=[t+i,e-a*s],this.v.i[3]=[t+i,e+a*s])}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()}}var s=.5519;return function(s,i){this.v={v:new Array(4),i:new Array(4),o:new Array(4),c:!0},this.numNodes=4,this.d=i.d,this.dynamicProperties=[],i.closed=!0,this.closed=!0,this.elem=s,this.comp=s.comp,this.frameId=-1,this.mdf=!1,this.getValue=e,this.convertEllToPath=t,this.p=o(s,i.p,1,0,this.dynamicProperties),this.s=o(s,i.s,1,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertEllToPath()}}(),y=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,i=this.s.v[1]/2,a=bm_min(s,i,this.r.v),r=a*(1-.5519);2===this.d||1===this.d?(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+s,e-i+r],this.v.v[1]=[t+s,e+i-a],this.v.o[1]=[t+s,e+i-r],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+s-a,e+i],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+s-r,e+i],this.v.v[3]=[t-s+a,e+i],this.v.o[3]=[t-s+r,e+i],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-s,e+i-r],this.v.v[5]=[t-s,e-i+a],this.v.o[5]=[t-s,e-i+r],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-s+a,e-i],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-s+r,e-i],this.v.v[7]=[t+s-a,e-i],this.v.o[7]=[t+s-r,e-i],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=[t+s,e-i+r],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+s-a,e-i],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+s-r,e-i],this.v.v[2]=[t-s+a,e-i],this.v.o[2]=[t-s+r,e-i],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-s,e-i+a],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-s,e-i+r],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=[t-s,e+i-r],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-s+a,e+i],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-s+r,e+i],this.v.v[6]=[t+s-a,e+i],this.v.o[6]=[t+s-r,e+i],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+s,e+i-a],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+s,e+i-r])}return function(s,i){this.v={v:new Array(8),i:new Array(8),o:new Array(8),c:!0},this.numNodes=8,this.elem=s,this.comp=s.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.p=o(s,i.p,1,0,this.dynamicProperties),this.s=o(s,i.s,1,0,this.dynamicProperties),this.r=o(s,i.r,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertRectToPath()}}(),v=function(){function t(t){if(this.elem.globalData.frameId!==this.frameId||t){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(),this.dynamicProperties[e].mdf&&(this.mdf=!0);if(this.mdf||t){var i=this.o.v%360/360;if(0===i&&0===this.s.v&&1==this.e.v)return void(this.isTrimming=!1);this.isTrimming=!0,0>i&&(i+=1);var a=this.s.v+i,r=this.e.v+i;if(a>r){var n=a;a=r,r=n}this.sValue=a,this.eValue=r,this.oValue=i}}}return function(e,s){this.elem=e,this.frameId=-1,this.dynamicProperties=[],this.sValue=0,this.eValue=0,this.oValue=0,this.mdf=!1,this.getValue=t,this.k=!1,this.isTrimming=!1,this.comp=e.comp,this.s=o(e,s.s,0,.01,this.dynamicProperties),this.e=o(e,s.e,0,.01,this.dynamicProperties),this.o=o(e,s.o,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.getValue(!0)}}(),g=function(){function t(t,e){this.totalLength=0;var s,i=t.v,a=t.o,r=t.i,n=i.length;for(s=0;n-1>s;s+=1)this.lengths[s]=bez.getBezierLength(i[s],i[s+1],a[s],r[s+1]),this.totalLength+=this.lengths[s].addedLength;e&&(this.lengths[s]=bez.getBezierLength(i[s],i[0],a[s],r[0]),this.totalLength+=this.lengths[s].addedLength)}function e(t,e,s,i,a){this.nextO[this.segmentCount]=e,this.nextI[this.segmentCount+1]=s,this.nextV[this.segmentCount+1]=i,this.pathStarted?this.nextV[this.segmentCount]=t:(this.pathStarted=!0,this.v.s[this.segmentCount]=t),this.segmentCount+=1}function s(t){this.mdf=t?!0:!1,this.prop.k&&this.prop.getValue();var e=0,s=this.trims.length;for(this.pathStarted=!1;s>e;){if(this.trims[e].mdf){this.mdf=!0;break}e+=1}if(this.mdf=this.prop.mdf?!0:this.mdf,this.mdf){this.nextO.length=0,this.nextI.length=0,this.nextV.length=0,this.v.s.length=0;var i=this.prop.closed;this.getSegmentsLength(this.prop.v,i);var a,r,n,o,h,l,p=this.prop.v,m=this.trims.length;for(a=0;m>a;a+=1)if(this.trims[a].isTrimming){if(r=this.trims[a].eValue,n=this.trims[a].sValue,o=this.trims[a].oValue,r===n)return this.v.v=this.nextV,this.v.o=this.nextO,void(this.v.i=this.nextI);1>=r?(this.segments[0].s=this.totalLength*n,this.segments[0].e=this.totalLength*r,this.segments[1].vl=!1):n>=1?(this.segments[0].s=this.totalLength*(n-1),this.segments[0].e=this.totalLength*(r-1),this.segments[1].vl=!1):(this.segments[0].s=this.totalLength*n,this.segments[0].e=this.totalLength,this.segments[1].s=0,this.segments[1].e=this.totalLength*(r-1),this.segments[1].vl=!0),this.v.v=p.v,this.v.o=p.o,this.v.i=p.i,l=this.v.v.length;var f=0,d=0;s=this.segments[1].vl?2:1;var c;for(this.segmentCount=0,e=0;s>e;e+=1){for(f=0,h=1;l>h;h++)if(d=this.lengths[h-1].addedLength,f+d<this.segments[e].s)f+=d;else{if(f>this.segments[e].e)break;this.segments[e].s<=f&&this.segments[e].e>=f+d?this.addSegment(this.v.v[h-1],this.v.o[h-1],this.v.i[h],this.v.v[h],this.lengths[h-1]):(c=bez.getNewSegment(this.v.v[h-1],this.v.v[h],this.v.o[h-1],this.v.i[h],(this.segments[e].s-f)/d,(this.segments[e].e-f)/d,this.lengths[h-1]),this.addSegment(c.pt1,c.pt3,c.pt4,c.pt2)),f+=d}i!==!1?f<=this.segments[e].e&&(d=this.lengths[h-1].addedLength,this.segments[e].s<=f&&this.segments[e].e>=f+d?this.addSegment(this.v.v[h-1],this.v.o[h-1],this.v.i[0],this.v.v[0],this.lengths[h-1]):(c=bez.getNewSegment(this.v.v[h-1],this.v.v[0],this.v.o[h-1],this.v.i[0],(this.segments[e].s-f)/d,(this.segments[e].e-f)/d,this.lengths[h-1]),this.addSegment(c.pt1,c.pt3,c.pt4,c.pt2))):this.pathStarted=!1}i=!1}else this.v.v=p.v,this.v.o=p.o,this.v.i=p.i;this.nextV.length?(this.v.v=this.nextV,this.v.o=this.nextO,this.v.i=this.nextI):this.v.s.length=0,this.v.c=i}}return function(i,a){this.trims=[],this.k=!1,this.mdf=!1,this.ty="tm",this.pathStarted=!1,this.segments=[{s:0,e:0,vl:!0},{s:0,e:0,vl:!1}],this.nextO=[],this.nextV=[],this.nextI=[],this.v={i:null,o:null,v:null,s:[],c:!1};var r,n=a.length;for(r=0;n>r;r+=1)a[r].closed||(this.k=a[r].trimProp.k?!0:this.k,this.trims.push(a[r].trimProp));this.prop=i,n=this.prop.numNodes-1,n+=this.prop.closed?1:0,this.lengths=new Array(n),this.k=i.k?!0:this.k,this.totalLength=0,this.getValue=s,this.addSegment=e,this.getSegmentsLength=t,this.k||(this.prop.getValue(),this.getValue(!0))}}(),b=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,i,a){this.elem=e,this.frameId=-1,this.dataProps=new Array(s.length),this.renderer=i,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(s.length-1),this.dashoffset=0;var r,n,h=s.length;for(r=0;h>r;r+=1)n=o(e,s[r].v,0,0,a),this.k=n.k?!0:this.k,this.dataProps[r]={n:s[r].n,p:n};this.getValue=t,this.k?a.push(this):this.getValue(!0)}}(),E=function(){function t(t,e){return this.textIndex=t+1,this.textTotal=e,this.getValue(),this.v}return function(e,i){this.pv=1,this.comp=e.comp,this.mult=.01,this.type="textSelector",this.textTotal=i.totalChars,s.bind(this)(e,i),this.getMult=t}}(),P=function(){function t(){if(this.dynamicProperties.length){var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue()}var s=this.data.totalChars,i=2===this.data.r?1:100/s,a=this.o.v/i,r=this.s.v/i+a,n=this.e.v/i+a;if(r>n){var o=r;r=n,n=o}this.finalS=r,this.finalE=n}function e(t){var e=bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1),r=0,n=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)r=o===n?t>=o?1:0:s(0,i(.5/(o-n)+(t-n)/(o-n),1)),r=e("",r,0,1,1);else if(3==h)r=o===n?t>=o?0:1:1-s(0,i(.5/(o-n)+(t-n)/(o-n),1)),r=e("",r,0,1,1);else if(4==h)o===n?r=t>=o?0:1:(r=s(0,i(.5/(o-n)+(t-n)/(o-n),1)),.5>r?r*=2:r=1-r);else if(5==h)if(o===n)r=t>=o?0:1;else{var l=o-n;r=-4/(l*l)*t*t+4/l*t}else 6==h?r=o===n?t>=o?0:1:(1+(Math.cos(Math.PI+2*Math.PI*(t-n)/(o-n))+0))/2:t>=a(n)&&(r=0>t-n?1-(n-t):s(0,i(o-t,1)));return r}var s=Math.max,i=Math.min,a=Math.floor;return function(s,i,a){this.mdf=!1,this.k=!1,this.data=i,this.dynamicProperties=[],this.getValue=t,this.getMult=e,this.comp=s.comp,this.finalS=0,this.finalE=0,this.s=o(s,i.s||{k:0},0,0,this.dynamicProperties),this.e="e"in i?o(s,i.e,0,0,this.dynamicProperties):{v:2===i.r?i.totalChars:100},this.o=o(s,i.o||{k:0},0,0,this.dynamicProperties),this.xe=o(s,i.xe||{k:0},0,0,this.dynamicProperties),this.ne=o(s,i.ne||{k:0},0,0,this.dynamicProperties),this.dynamicProperties.length?a.push(this):this.getValue()}}(),S={};return S.getProp=o,S.getShapeProp=p,S.getDashProp=m,S.getTextSelectorProp=f,S}();SVGRenderer.prototype.createItem=function(t,e,s,i){switch(t.ty){case 2:return this.createImage(t,e,s,i);case 0:return this.createComp(t,e,s,i);case 1:return this.createSolid(t,e,s,i);case 4:return this.createShape(t,e,s,i);case 5:return this.createText(t,e,s,i);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},SVGRenderer.prototype.buildItems=function(t,e,s,i,a){var r,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),i||(i=this);var o;for(r=n-1;r>=0;r--)s[r]=this.createItem(t[r],e,i,a),0===t[r].ty&&(o=[],this.buildItems(t[r].layers,s[r].getDomElement(),o,s[r],s[r].placeholder),s[r].setElements(o)),t[r].td&&s[r+1].setMatte(s[r].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)for(r=0;h>r;){if(s[r].data.id==t[i].id){o=s[r],s[r]=this.createItem(t[i],e,this,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,s[r],s[i].placeholder),s[r].setElements(n));break}r+=1}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},SVGRenderer.prototype.createBase=function(t,e,s,i){return new SVGBaseElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,s,i){return new IShapeElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createText=function(t,e,s,i){return new SVGTextElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createImage=function(t,e,s,i){return new IImageElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createComp=function(t,e,s,i){return new ICompElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createSolid=function(t,e,s,i){return new ISolidElement(t,e,this.globalData,s,i)},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","xMidYMid meet"),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"),i=document.createElementNS(svgNS,"rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+randomString(10);s.setAttribute("id",a),s.appendChild(i);var r=document.createElementNS(svgNS,"g");r.setAttribute("clip-path","url(#"+a+")"),this.animationItem.container.appendChild(r),e.appendChild(s),this.animationItem.container=r,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 i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;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=0;s>e;e++)this.elements[e].prepareFrame(t-this.layers[e].st);for(e=0;s>e;e++)this.elements[e].renderFrame()}},extendPrototype(ExpressionComp,SVGRenderer),CanvasRenderer.prototype.createItem=function(t,e){switch(t.ty){case 0:return this.createComp(t,e);case 1:return this.createSolid(t,e);case 2:return this.createImage(t,e);case 4:return this.createShape(t,e);case 5:return this.createText(t,e);case 99:return this.createPlaceHolder(t,e);default:return this.createBase(t,e)}return this.createBase(t,e)},CanvasRenderer.prototype.buildItems=function(t,e,s){e||(e=this.elements),s||(s=this);var i,a=t.length;for(i=0;a>i;i++)if(e[i]=this.createItem(t[i],s),0===t[i].ty){var r=[];this.buildItems(t[i].layers,r,e[i]),e[e.length-1].setElements(r)}},CanvasRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements);var r,n,o=s.length;for(i=0;a>i;i+=1)for(r=0;o>r;){if(s[r].data.id==t[i].id){s[r]=this.createItem(t[i],this),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,n,s[r]),s[r].setElements(n));break}r+=1}},CanvasRenderer.prototype.createBase=function(t,e){return new CVBaseElement(t,e,this.globalData)},CanvasRenderer.prototype.createShape=function(t,e){return new CVShapeElement(t,e,this.globalData)},CanvasRenderer.prototype.createText=function(t,e){return new CVTextElement(t,e,this.globalData)},CanvasRenderer.prototype.createPlaceHolder=function(t){return new PlaceHolderElement(t,null,this.globalData)},CanvasRenderer.prototype.createImage=function(t,e){return new CVImageElement(t,e,this.globalData)},CanvasRenderer.prototype.createComp=function(t,e){return new CVCompElement(t,e,this.globalData)},CanvasRenderer.prototype.createSolid=function(t,e){return new CVSolidElement(t,e,this.globalData)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[2]||1!==t[3]||0!==t[4]||0!==t[5]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[2],t[3],t[4],t[5]);this.contextData.cTr.transform(t[0],t[1],t[2],t[3],t[4],t[5]);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])}},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(6));var s,i=6,a=this.contextData.saved[this.contextData.cArrPos];for(s=0;i>s;s+=1)a[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],i=6,a=this.contextData.cTr.props;for(e=0;i>e;e+=1)a[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),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.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.updateContainerSize(),this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document)},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,i=this.transformCanvas.w/this.transformCanvas.h;i>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,this.transformCanvas.sy,this.transformCanvas.tx,this.transformCanvas.ty],this.globalData.cWidth=t,this.globalData.cHeight=e},CanvasRenderer.prototype.buildStage=function(t,e,s){s||(s=this.elements);var i,a,r=e.length;for(i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemHierarchy(a,s[i],e,a.parent,s,!0),0==a.ty&&this.buildStage(null,a.layers,s[i].getElements())},CanvasRenderer.prototype.buildItemHierarchy=function(t,e,s,i,a,r){var n=0,o=s.length;for(r&&e.resetHierarchy();o>n;)s[n].ind===i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemHierarchy(t,e,s,s[n].parent,a,!1)),n+=1},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers.length;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.clearRect(0,0,this.globalData.cWidth,this.globalData.cHeight)):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()}},extendPrototype(ExpressionComp,CanvasRenderer),HybridRenderer.prototype.createItem=function(t,e,s,i){switch(t.ty){case 2:return this.createImage(t,e,s,i);case 0:return this.createComp(t,e,s,i);case 1:return this.createSolid(t,e,s,i);case 4:return this.createShape(t,e,s,i);case 5:return this.createText(t,e,s,i);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},HybridRenderer.prototype.buildItems=function(t,e,s,i,a){var r,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),i||(i=this);var o;for(r=n-1;r>=0;r--)s[r]=this.createItem(t[r],e,i,a),0===t[r].ty&&(o=[],this.buildItems(t[r].layers,s[r].getDomElement(),o,s[r],s[r].placeholder),s[r].setElements(o)),t[r].td&&s[r+1].setMatte(s[r].layerId)},HybridRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)for(r=0;h>r;){if(s[r].data.id==t[i].id){o=s[r],s[r]=this.createItem(t[i],e,this,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,s[r],s[i].placeholder),s[r].setElements(n));break}r+=1}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},HybridRenderer.prototype.createBase=function(t,e,s,i){return new SVGBaseElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},HybridRenderer.prototype.createShape=function(t,e,s,i){return s.isSvg?new IShapeElement(t,e,this.globalData,s,i):new HShapeElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createText=function(t,e,s,i){return s.isSvg?new SVGTextElement(t,e,this.globalData,s,i):new HTextElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createImage=function(t,e,s,i){return new IImageElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createComp=function(t,e,s,i){return s.isSvg?new ICompElement(t,e,this.globalData,s,i):new HCompElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createSolid=function(t,e,s,i){return s.isSvg?new ISolidElement(t,e,this.globalData,s,i):new HSolidElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.configAnimation=function(t){this.animationItem.container=document.createElement("div"),this.animationItem.container.style.width=t.w+"px",this.animationItem.container.style.height=t.h+"px",this.animationItem.container.style.transform="translate3d(0,0,0)",this.animationItem.container.style.position="absolute",this.animationItem.container.style.clip="rect(0px, "+t.w+"px, "+t.h+"px, 0px)",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,"svg");e.setAttribute("width","1"),e.setAttribute("height","1"),styleDiv(e),
-this.animationItem.container.appendChild(e);var s=document.createElementNS(svgNS,"defs");e.appendChild(s),this.globalData.defs=s,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,document)},HybridRenderer.prototype.buildStage=function(t,e,s){var i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},HybridRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},HybridRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;for(t=0;e>t;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0},HybridRenderer.prototype.updateContainerSize=function(){},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()}},extendPrototype(ExpressionComp,HybridRenderer),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.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)),console.log(2*this.storedData[t].x.v),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 i,a,r="";for(a=e.v.length,i=1;a>i;i+=1)1==i&&(r+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-1][1])+" "+bm_rnd(e.i[i][0])+","+bm_rnd(e.i[i][1])+" "+bm_rnd(e.v[i][0])+","+bm_rnd(e.v[i][1]);t.cl&&(r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-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!==r&&(t.inv?s.elem.setAttribute("d",this.solidPath+r):s.elem.setAttribute("d",r),s.lastPath=r)},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},SliderEffect.prototype.proxyFunction=function(){return this.p.v},AngleEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,ColorEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,PointEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,CheckboxEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,EffectsManager.prototype.getEffect=function(t){for(var e=this.data.ef,s=0,i=e.length;i>s;){if(e[s].nm===t)return this.effectElements[s];s+=1}},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.isVisible=!1);var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t);return this.data.hasMask&&this.maskManager.prepareFrame(t),this.currentFrameNum=t,this.isVisible},BaseElement.prototype.init=function(){this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.dynamicProperties=[],this.currentFrameNum=-99999,this.lastNum=-99999,this.data.ef&&(this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties),this.effect=this.effectsManager.getEffect.bind(this.effectsManager)),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,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,BaseElement.prototype.mask=function(t){return this.maskManager.getMask(t)},createElement(BaseElement,SVGBaseElement),SVGBaseElement.prototype.appendNodeToParent=function(t){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"),i=randomString(10);s.setAttribute("id",i),s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%");var a=document.createElementNS(svgNS,"feComponentTransfer");a.setAttribute("in","SourceGraphic"),s.appendChild(a);var r=document.createElementNS(svgNS,"feFuncA");r.setAttribute("type","table"),r.setAttribute("tableValues","1.0 0.0"),a.appendChild(r),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(#"+i+")"),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||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement.setAttribute("id",this.data.ln)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.data.hasMask&&(this.finalTransform.matMdf&&this.layerElement.setAttribute("transform","matrix("+s.props.join(",")+")"),this.finalTransform.opMdf&&this.layerElement.setAttribute("opacity",this.finalTransform.opacity)),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getDomElement=function(){return this.layerElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")},SVGBaseElement.prototype.hide=function(){},ITextElement.prototype.init=function(){this.parent.init.call(this);var t=this.data;this.renderedLetters=[],this.viewData={m:{a:PropertyFactory.getProp(this,t.t.m.a,1,0,this.dynamicProperties)}};var e=this.data.t;if(e.a.length){this.viewData.a=new Array(e.a.length);var s,i,a,r=e.a.length;for(s=0;r>s;s+=1)a=e.a[s],i={a:{},s:{}},"r"in a.a&&(i.a.r=PropertyFactory.getProp(this,a.a.r,0,degToRads,this.dynamicProperties)),"sk"in a.a&&(i.a.sk=PropertyFactory.getProp(this,a.a.sk,0,degToRads,this.dynamicProperties)),"sa"in a.a&&(i.a.sa=PropertyFactory.getProp(this,a.a.sa,0,degToRads,this.dynamicProperties)),"s"in a.a&&(i.a.s=PropertyFactory.getProp(this,a.a.s,1,.01,this.dynamicProperties)),"a"in a.a&&(i.a.a=PropertyFactory.getProp(this,a.a.a,1,0,this.dynamicProperties)),"o"in a.a&&(i.a.o=PropertyFactory.getProp(this,a.a.o,0,.01,this.dynamicProperties)),"p"in a.a&&(i.a.p=PropertyFactory.getProp(this,a.a.p,1,0,this.dynamicProperties)),"sw"in a.a&&(i.a.sw=PropertyFactory.getProp(this,a.a.sw,0,0,this.dynamicProperties)),"sc"in a.a&&(i.a.sc=PropertyFactory.getProp(this,a.a.sc,1,0,this.dynamicProperties)),"fc"in a.a&&(i.a.fc=PropertyFactory.getProp(this,a.a.fc,1,0,this.dynamicProperties)),"t"in a.a&&(i.a.t=PropertyFactory.getProp(this,a.a.t,0,0,this.dynamicProperties)),i.s=PropertyFactory.getTextSelectorProp(this,a.s,this.dynamicProperties),i.s.t=a.s.t,this.viewData.a[s]=i}else this.viewData.a=[];e.p&&"m"in e.p&&(this.viewData.p={f:PropertyFactory.getProp(this,e.p.f,0,0,this.dynamicProperties),l:PropertyFactory.getProp(this,e.p.l,0,0,this.dynamicProperties),m:this.maskManager.getMaskProperty(e.p.m)})},ITextElement.prototype.getMeasures=function(){var t,e,s,i,a=this.mHelper,r=this.renderType,n=this.data,o=n.t.d,h=o.l;if("m"in n.t.p){var l=this.viewData.p.m;if(!this.viewData.p.n||this.viewData.p.mdf){var p=l.v,m={tLength:0,segments:[]};i=p.v.length-1;var f;for(s=0;i>s;s+=1)f={s:p.v[s],e:p.v[s+1],to:[p.o[s][0]-p.v[s][0],p.o[s][1]-p.v[s][1]],ti:[p.i[s+1][0]-p.v[s+1][0],p.i[s+1][1]-p.v[s+1][1]]},bez.buildBezierData(f),m.tLength+=f.bezierData.segmentLength,m.segments.push(f);s=i,l.closed&&(f={s:p.v[s],e:p.v[0],to:[p.o[s][0]-p.v[s][0],p.o[s][1]-p.v[s][1]],ti:[p.i[0][0]-p.v[0][0],p.i[0][1]-p.v[0][1]]},bez.buildBezierData(f),m.tLength+=f.bezierData.segmentLength,m.segments.push(f)),this.viewData.p.pi=m}var d,c,u,m=this.viewData.p.pi,y=this.viewData.p.f.v,v=0,g=1,b=0,E=!0,P=m.segments;if(0>y&&l.closed)for(m.tLength<Math.abs(y)&&(y=-Math.abs(y)%m.tLength),v=P.length-1,u=P[v].bezierData.points,g=u.length-1;0>y;)y+=u[g].partialLength,g-=1,0>g&&(v-=1,u=P[v].bezierData.points,g=u.length-1);u=P[v].bezierData.points,c=u[g-1],d=u[g];var S,C,k=d.partialLength}i=h.length,t=0,e=0;var w,x,D,I,F,T=1.2*n.t.d.s*.714,M=!0,A=this.viewData,V=new Array(i),L=!1;I=A.a.length;var N,_,B,R,H,j,O,z,G,W,q,X,J,U,Y,K,Q=n._letters,$=-1,Z=y,tt=v,et=g,st=0;for(s=0;i>s;s+=1){switch(a.reset(),o.j){case 1:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line]),0);break;case 2:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line])/2,0)}if(j=1,h[s].n)t=0,e+=o.yOffset,e+=M?1:0,y=Z,M=!1,st=0,"m"in n.t.p&&(v=tt,g=et,u=P[v].bezierData.points,c=u[g-1],d=u[g],k=d.partialLength,b=0),V[s]=this.emptyProp;else{if("m"in n.t.p){$!==h[s].ind&&(h[$]&&(y+=h[$].extra),y+=h[s].an/2,$=h[s].ind),y+=A.m.a.v[0]*h[s].an/200;var it=0;for(D=0;I>D;D+=1)w=A.a[D].a,"p"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),it+=w.p.v[0]*_);for(E=!0;E;)if(b+k>=y+it||!u){if(S=(y+it-b)/d.partialLength,R=c.point[0]+(d.point[0]-c.point[0])*S,H=c.point[1]+(d.point[1]-c.point[1])*S,a.translate(R,H),n.t.p.p){C=(d.point[1]-c.point[1])/(d.point[0]-c.point[0]);var at=180*Math.atan(C)/Math.PI;d.point[0]<c.point[0]&&(at+=180),a.rotate(at*Math.PI/180)}a.translate(0,A.m.a.v[1]*T/100+e),E=!1}else u&&(b+=d.partialLength,g+=1,g>=u.length&&(g=0,v+=1,P[v]?u=P[v].bezierData.points:l.closed?(g=0,v=0,u=P[v].bezierData.points):u=null),u&&(c=d,d=u[g],k=d.partialLength));B=h[s].an/2-h[s].add}else a.translate(t,e),B=h[s].an/2-h[s].add,a.translate(B,0),a.translate(A.m.a.v[0]*h[s].an/200,A.m.a.v[1]*T/100);for(st+=h[s].l/2,D=0;I>D;D+=1)w=A.a[D].a,"t"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"m"in n.t.p?y+=w.t*_:t+=w.t.v*_);for(st+=h[s].l/2,D=0;I>D;D+=1)w=A.a[D].a,"p"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"m"in n.t.p?a.translate(0,w.p.v[1]*_):a.translate(w.p.v[0]*_,w.p.v[1]*_));for(o.strokeWidthAnim&&(z=n.t.d.sw||0),o.strokeColorAnim&&(O=n.t.d.sc?[n.t.d.sc[0],n.t.d.sc[1],n.t.d.sc[2]]:[0,0,0]),o.fillColorAnim&&(G=[n.t.d.fc[0],n.t.d.fc[1],n.t.d.fc[2]]),D=0;I>D;D+=1){if(w=A.a[D].a,x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"r"in w&&a.rotate(w.r.v*_),"sk"in w&&a.skewFromAxis(-(w.sk.v*_),-w.sa.v*_),"o"in w&&(j+=(w.o.v*_-j)*_),o.strokeWidthAnim&&"sw"in w&&(z+=w.sw.v*_),o.strokeColorAnim&&"sc"in w)for(W=0;3>W;W+=1)O[W]=Math.round(O[W]+(w.sc.v[W]-O[W])*_);if(o.fillColorAnim&&"fc"in w)for(W=0;3>W;W+=1)G[W]=Math.round(G[W]+(w.fc.v[W]-G[W])*_)}for(o.strokeWidthAnim&&(q=0>z?0:z),o.strokeColorAnim&&(X="rgb("+O[0]+","+O[1]+","+O[2]+")"),o.fillColorAnim&&(J="rgb("+G[0]+","+G[1]+","+G[2]+")"),D=0;I>D;D+=1)w=A.a[D].a,"s"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),a.scale(1+(w.s.v[0]-1)*_,1+(w.s.v[1]-1)*_));for(D=0;I>D;D+=1)w=A.a[D].a,"a"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),a.translate(-w.a.v[0]*_,-w.a.v[1]*_));"m"in n.t.p?(a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*T/100),y-=A.m.a.v[0]*h[s].an/200,h[s+1]&&$!==h[s+1].ind&&(y+=h[s].an/2,y+=o.tr/1e3*n.t.d.s),a.translate(-B,0)):(a.translate(-B,0),a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*T/100),t+=h[s].l+o.tr/1e3*n.t.d.s),"svg"===r?U=a.toCSS():Y=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]],K=j,Q?(N=Q[s],N.o!==K||N.sw!==q||N.sc!==X||N.fc!==J?(L=!0,F=new LetterProps(K,q,X,J,U,Y)):"svg"===r&&N.m!==U?(L=!0,F=new LetterProps(K,q,X,J,U)):"svg"===r||N.props[1]===a.props[1]&&N.props[2]===a.props[2]&&N.props[3]===a.props[3]&&N.props[4]===a.props[4]&&N.props[5]===a.props[5]?F=N:(L=!0,F=new LetterProps(K,q,X,J,null,[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]]))):(L=!0,F=new LetterProps(K,q,X,J,U,Y)),V[s]=F}}L&&(this.renderedLetters=V)},ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,SVGTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d;this.innerElem=document.createElementNS(svgNS,"g"),t.fc?this.innerElem.setAttribute("fill","rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.innerElem.setAttribute("fill","rgba(0,0,0,0)"),t.sc&&(this.innerElem.setAttribute("stroke","rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")"),this.innerElem.setAttribute("stroke-width",t.sw)),this.innerElem.setAttribute("font-size",t.s);var e=this.globalData.fontManager.getFontByName(t.f);this.innerElem.setAttribute("font-family",e.fFamily);var s,i,a=t.fWeight,r=t.fStyle;this.innerElem.setAttribute("font-style",r),this.innerElem.setAttribute("font-weight",a),this.layerElement.appendChild(this.innerElem);var n=t.l;i=n.length;var o,h,l,p,m,f,d,c=this.mHelper,u="",y=this.data.singleShape;if(this.globalData.fontManager.chars&&y)var v=0,g=0,b=t.lineWidths,E=t.boxWidth,P=!0;for(s=0;i>s;s+=1){if(this.globalData.fontManager.chars?y&&0!==s||(o=document.createElementNS(svgNS,"path")):o=document.createElementNS(svgNS,"text"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var S=this.globalData.fontManager.getCharData(t.t.charAt(s),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),C=S.data;if(c.reset(),y&&n[s].n&&(v=0,g+=t.yOffset,g+=P?1:0,P=!1),C){if(h=C.shapes[0].it,y){switch(t.j){case 1:c.translate(t.justifyOffset+(E-b[n[s].line]),0);break;case 2:c.translate(t.justifyOffset+(E-b[n[s].line])/2,0)}c.translate(v,g)}else u="";for(p=h.length,c.scale(t.s/100,t.s/100),l=0;p>l;l+=1){for(f=h[l].ks.k.i.length,d=h[l].ks.k,m=1;f>m;m+=1)1==m&&(u+=" M"+c.applyToPointStringified(d.v[0][0],d.v[0][1])),u+=" C"+c.applyToPointStringified(d.o[m-1][0],d.o[m-1][1])+" "+c.applyToPointStringified(d.i[m][0],d.i[m][1])+" "+c.applyToPointStringified(d.v[m][0],d.v[m][1]);u+=" C"+c.applyToPointStringified(d.o[m-1][0],d.o[m-1][1])+" "+c.applyToPointStringified(d.i[0][0],d.i[0][1])+" "+c.applyToPointStringified(d.v[0][0],d.v[0][1]),u+="z"}y||o.setAttribute("d",u)}y?v+=n[s].l:this.innerElem.appendChild(o)}else o.textContent=n[s].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(o);this.textSpans.push(o)}y&&(o.setAttribute("d",u),this.innerElem.appendChild(o))},SVGTextElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},SVGTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask||(this.finalTransform.matMdf&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),this.finalTransform.opMdf&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),!this.data.singleShape){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].setAttribute("transform",n.m),this.textSpans[s].setAttribute("opacity",n.o),n.sw&&this.textSpans[s].setAttribute("stroke-width",n.sw),n.sc&&this.textSpans[s].setAttribute("stroke",n.sc),n.fc&&this.textSpans[s].setAttribute("fill",n.fc))}},SVGTextElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null};var PlaceHolderElement=function(t,e,s){if(this.data=t,this.globalData=s,e){this.parentContainer=e;var i=document.createElementNS(svgNS,"g");i.setAttribute("id",this.data.id),e.appendChild(i),this.phElement=i}this.layerId="ly_"+randomString(10)};PlaceHolderElement.prototype.prepareFrame=function(){},PlaceHolderElement.prototype.renderFrame=function(){},PlaceHolderElement.prototype.draw=function(){},createElement(SVGBaseElement,ICompElement),extendPrototype(ExpressionComp,ICompElement),ICompElement.prototype.getComposingElement=function(){return this.layerElement},ICompElement.prototype.hide=function(){if(!this.hidden){var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t].hide();this.hidden=!0}},ICompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},ICompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.data.hasMask?this.elements[e].renderFrame():this.elements[e].renderFrame(this.finalTransform);this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this.parent.destroy.call();var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t].destroy()},createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assetData.p),t.maskedElement=t.innerElem},s=new Image;s.addEventListener("load",e,!1),s.addEventListener("error",e,!1),s.src=this.path+this.assetData.p,this.parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln)},IImageElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},IImageElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||((this.finalTransform.matMdf||this.firstFrame)&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),(this.finalTransform.opMdf||this.firstFrame)&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.ljEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},IShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),styleUnselectableDiv(this.layerElement),this.buildExpressionInterface()},IShapeElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var p;if(e[a].c=PropertyFactory.getProp(this,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this,t[a].o,0,.01,s),"st"==t[a].ty){if(p=document.createElementNS(svgNS,"g"),p.style.strokeLinecap=this.lcEnum[t[a].lc]||"round",p.style.strokeLinejoin=this.ljEnum[t[a].lj]||"round",p.style.fillOpacity=0,1==t[a].lj&&(p.style.strokeMiterlimit=t[a].ml),e[a].c.k||(p.style.stroke="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.strokeOpacity=e[a].o.v),e[a].w=PropertyFactory.getProp(this,t[a].w,0,null,s),e[a].w.k||(p.style.strokeWidth=e[a].w.v),t[a].d){var m=PropertyFactory.getDashProp(this,t[a].d,"svg",s);m.k||(p.style.strokeDasharray=m.dasharray,p.style.strokeDashoffset=m.dashoffset),e[a].d=m}}else p=document.createElementNS(svgNS,"path"),e[a].c.k||(p.style.fill="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.fillOpacity=e[a].o.v);this.layerElement===this.parentContainer?this.appendNodeToParent(p):this.layerElement.appendChild(p),this.stylesList.push({pathElement:p,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),i.length&&(t[a].trimmed=!0),e[a].sh=PropertyFactory.getShapeProp(this,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var y={closed:!1,trimProp:PropertyFactory.getProp(this,t[a],7,null,s)};e[a]={tr:y.trimProp},i.push(y),l.push(y)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},IShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();this.hidden=!1;var s=this.data.hasMask?this.transformHelper:this.finalTransform;this.renderShape(s,null,null,!0)},IShapeElement.prototype.hide=function(){if(!this.hidden){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode));this.hidden=!0}},IShapeElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.shapesData,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},IShapeElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var p=r.s?r.s:[];for(a=1;i>a;a+=1)p[a-1]?(e.st&&(h+=" M"+p[a-1][0]+","+p[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[a-1][0],p[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(p[0]?(e.st&&(h+=" M"+p[0][0]+","+p[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[0][0],p[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},IShapeElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.pathElement.style.fill="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.fillOpacity=e.o.v*s.opacity)},IShapeElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&a.k&&(a.mdf||this.firstFrame)&&(i.pathElement.style.strokeDasharray=a.dasharray,i.pathElement.style.strokeDashoffset=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.pathElement.style.stroke="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.strokeOpacity=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.pathElement.style.strokeWidth=e.w.v)},IShapeElement.prototype.destroy=function(){this.parent.destroy.call(),this.shapeData=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},extendPrototype(ShapeInterface,IShapeElement),ShapeItemElement.prototype.appendNodeToParent=SVGBaseElement.prototype.appendNodeToParent,ShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var p;if(e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty){if(p=document.createElementNS(svgNS,"g"),p.style.strokeLinecap=this.lcEnum[t[a].lc]||"round",p.style.strokeLinejoin=this.ljEnum[t[a].lj]||"round",
-p.style.fillOpacity=0,1==t[a].lj&&(p.style.strokeMiterlimit=t[a].ml),e[a].c.k||(p.style.stroke="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.strokeOpacity=e[a].o.v),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(p.style.strokeWidth=e[a].w.v),t[a].d){var m=PropertyFactory.getDashProp(this.elemData,t[a].d,"svg",s);m.k?e[a].d=m:(p.style.strokeDasharray=m.dasharray,p.style.strokeDashoffset=m.dashoffset)}}else p=document.createElementNS(svgNS,"path"),e[a].c.k||(p.style.fill="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.fillOpacity=e[a].o.v);this.shape===this.parentContainer?this.appendNodeToParent(p):this.shape.appendChild(p),this.stylesList.push({pathElement:p,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var y={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(y),l.push(y)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},ShapeItemElement.prototype.getElement=function(){return this.shape},ShapeItemElement.prototype.hideShape=function(){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode))},ShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},ShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var p=r.s?r.s:[];for(a=1;i>a;a+=1)p[a-1]?(e.st&&(h+=" M"+p[a-1][0]+","+p[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[a-1][0],p[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(p[0]?(e.st&&(h+=" M"+p[0][0]+","+p[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[0][0],p[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},ShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.pathElement.style.fill="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.fillOpacity=e.o.v*s.opacity)},ShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.pathElement.style.strokeDasharray=a.dasharray,i.pathElement.style.strokeDashoffset=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.pathElement.style.stroke="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.strokeOpacity=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.pathElement.style.strokeWidth=e.w.v)},ShapeItemElement.prototype.destroy=function(t,e){this.shape=null,this.data=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement===this.parentContainer?this.appendNodeToParent(t):this.layerElement.appendChild(t),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.innerElem=t},ISolidElement.prototype.hide=IImageElement.prototype.hide,ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy,createElement(BaseElement,CVBaseElement),CVBaseElement.prototype.createElements=function(){},CVBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(!this.isVisible)return this.isVisible;this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]);return this.data.hasMask&&(this.globalData.renderer.save(!0),this.maskManager.renderFrame(s)),this.isVisible},CVBaseElement.prototype.getCurrentAnimData=function(){return this.currentAnimData},CVBaseElement.prototype.addMasks=function(t){this.maskManager=new CVMaskElement(t,this,this.globalData)},CVBaseElement.prototype.destroy=function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager&&this.maskManager.destroy()},CVBaseElement.prototype.mHelper=new Matrix,createElement(CVBaseElement,CVCompElement),CVCompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},CVCompElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e,s=this.layers.length;for(e=s-1;e>=0;e-=1)this.elements[e].renderFrame(this.finalTransform);this.data.hasMask&&this.globalData.renderer.restore(!0),this.firstFrame&&(this.firstFrame=!1)}},CVCompElement.prototype.setElements=function(t){this.elements=t},CVCompElement.prototype.getElements=function(){return this.elements},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.layers=null,this.elements=null,this.parent.destroy.call()},createElement(CVBaseElement,CVImageElement),CVImageElement.prototype.createElements=function(){var t=this,e=function(){t.animationItem.elementLoaded()},s=function(){t.failed=!0,t.animationItem.elementLoaded()};this.img=new Image,this.img.addEventListener("load",e,!1),this.img.addEventListener("error",s,!1),this.img.src=this.path+this.assetData.p,this.parent.createElements.call(this)},CVImageElement.prototype.renderFrame=function(t){if(!this.failed&&this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.drawImage(this.img,0,0),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},CVImageElement.prototype.destroy=function(){this.img=null,this.animationItem=null,this.parent.destroy.call()},CVMaskElement.prototype.getMaskProperty=function(t){return this.viewData[t]},CVMaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)},CVMaskElement.prototype.renderFrame=function(t){var e,s,i,a,r,n=this.ctx,o=this.data.masksProperties.length,h=!1;for(e=0;o>e;e++)if("n"!==this.masksProperties[e].mode){h===!1&&(n.beginPath(),h=!0),this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.globalData.compWidth,0),n.lineTo(this.globalData.compWidth,this.globalData.compHeight),n.lineTo(0,this.globalData.compHeight),n.lineTo(0,0)),r=this.viewData[e].v,s=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.moveTo(s[0],s[1]);var l,p=r.v.length;for(l=1;p>l;l++)s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[l][0],r.i[l][1]),a=t.applyToPointArray(r.v[l][0],r.v[l][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1]);s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[0][0],r.i[0][1]),a=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1])}h&&n.clip()},CVMaskElement.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].pv};e+=1}},CVMaskElement.prototype.destroy=function(){this.ctx=null},createElement(CVBaseElement,CVShapeElement),CVShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},CVShapeElement.prototype.ljEnum={1:"butt",2:"round",3:"butt"},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),this.buildExpressionInterface()},CVShapeElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],p=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var m=PropertyFactory.getDashProp(this,t[a].d,"canvas",s);e[a].d=m,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),i.length&&(t[a].trimmed=!0),e[a].sh=PropertyFactory.getShapeProp(this,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this,t[a],7,null,s)};i.push(u),p.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=p.length,a=0;h>a;a+=1)p[a].closed=!0},CVShapeElement.prototype.renderFrame=function(t){this.parent.renderFrame.call(this,t)!==!1&&(this.renderShape(this.finalTransform,null,null,!0),this.data.hasMask&&this.globalData.renderer.restore(!0))},CVShapeElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.shapesData,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var p,m,f,d,c,u,y,v=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(y=this.stylesList[a].type,"st"!==y||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,m=c.length,"st"===y?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml||0):g.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),"st"!==y&&g.beginPath(),p=0;m>p;p+=1){for("st"===y?(v.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[p].tr),u=c[p].nodes):u=c[p].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===y&&(g.stroke(),v.restore())}"st"!==y&&g.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.viewData.length=0,this.parent.destroy.call()},extendPrototype(ShapeInterface,CVShapeElement),CVShapeItemElement.prototype.dashResetter=[],CVShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],p=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var m=PropertyFactory.getDashProp(this.elemData,t[a].d,"canvas",s);e[a].d=m,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(u),p.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=p.length,a=0;h>a;a+=1)p[a].closed=!0},CVShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var p,m,f,d,c,u,y,v=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(y=this.stylesList[a].type,"st"!==y||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,m=c.length,"st"===y?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml):g.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),g.beginPath(),p=0;m>p;p+=1){for("st"===y?(v.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[p].tr),u=c[p].nodes):u=c[p].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===y&&(g.stroke(),v.restore())}"st"!==y&&g.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeItemElement.prototype.destroy=function(){this.data=null,this.globalData=null,this.canvasContext=null},createElement(CVBaseElement,CVSolidElement),CVSolidElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.fillStyle=this.data.sc,e.fillRect(0,0,this.data.sw,this.data.sh),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(CVBaseElement,CVTextElement),CVTextElement.prototype.init=ITextElement.prototype.init,CVTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,CVTextElement.prototype.getMult=ITextElement.prototype.getMult,CVTextElement.prototype.tHelper=document.createElement("canvas").getContext("2d"),CVTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d,e=!1;t.fc?(e=!0,this.values.fill="rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.values.sWidth=t.sw);var i,a,r=this.globalData.fontManager.getFontByName(t.f),n=this.mHelper;this.stroke=s,this.values.fValue=t.s+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.t.length,this.tHelper.font=this.values.fValue;var o,h,l,p,m,f,d,c,u,y;for(i=0;a>i;i+=1){if(o=this.globalData.fontManager.getCharData(t.t.charAt(i),r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),n.reset(),n.scale(t.s/100,t.s/100),h=o.data)for(m=h.shapes[0].it,d=m.length,u=new Array(d),f=0;d>f;f+=1){for(p=m[f].ks.k.i.length,c=m[f].ks.k,y=[],l=1;p>l;l+=1)1==l&&y.push(n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),y.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[l][0],c.i[l][1]),n.applyToY(c.i[l][0],c.i[l][1]),n.applyToX(c.v[l][0],c.v[l][1]),n.applyToY(c.v[l][0],c.v[l][1]));y.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[0][0],c.i[0][1]),n.applyToY(c.i[0][0],c.i[0][1]),n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),u[f]=y}else u=[];this.textSpans.push({elem:u})}},CVTextElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext,s=this.finalTransform.mat.props;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.font=this.values.fValue,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.getMeasures();var i,a,r,n,o,h,l=this.renderedLetters,p=this.data.t.d.l;a=p.length;var m,f,d,c=null,u=null,y=null;for(i=0;a>i;i+=1)if(!p[i].n){if(m=l[i],this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(m.props),this.globalData.renderer.ctxOpacity(m.o),this.fill){for(m.fc?c!==m.fc&&(c=m.fc,e.fillStyle=m.fc):c!==this.values.fill&&(c=this.values.fill,e.fillStyle=this.values.fill),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(m.sw?y!==m.sw&&(y=m.sw,e.lineWidth=m.sw):y!==this.values.sWidth&&(y=this.values.sWidth,e.lineWidth=this.values.sWidth),m.sc?u!==m.sc&&(u=m.sc,e.strokeStyle=m.sc):u!==this.values.stroke&&(u=this.values.stroke,e.strokeStyle=this.values.stroke),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}this.globalData.renderer.restore()}this.globalData.renderer.restore(this.data.hasMask)}},createElement(BaseElement,HBaseElement),HBaseElement.prototype.appendNodeToParent=function(t){if(this.placeholder){var e=this.placeholder.phElement;e.parentNode.insertBefore(t,e)}else this.parentContainer.appendChild(t)},HBaseElement.prototype.createElements=function(){this.data.hasMask?(this.layerElement=document.createElementNS(svgNS,"svg"),this.appendNodeToParent(this.layerElement),this.maskedElement=this.layerElement):this.layerElement=this.parentContainer,!this.data.ln||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement.setAttribute("id",this.data.ln)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},HBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.layerElement.style.transform="matrix3d("+s.props[0]+","+s.props[1]+",0,0, "+s.props[2]+","+s.props[3]+",0,0, 0,0,1,0, "+s.props[4]+","+s.props[5]+",0,1)",this.layerElement.style.opacity=this.finalTransform.opacity,this.isVisible},HBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},HBaseElement.prototype.getDomElement=function(){return this.layerElement},HBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},HBaseElement.prototype.hide=function(){},createElement(HBaseElement,HSolidElement),HSolidElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),t.appendChild(e),this.layerElement=t,this.parentContainer.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln);var s=document.createElementNS(svgNS,"rect");s.setAttribute("width",this.data.sw),s.setAttribute("height",this.data.sh),s.setAttribute("fill",this.data.sc),e.appendChild(s),this.data.hasMask&&(this.maskedElement=s)},HSolidElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},HSolidElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),void(this.firstFrame&&(this.firstFrame=!1)))},HSolidElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(HBaseElement,HCompElement),extendPrototype(ExpressionComp,HCompElement),HCompElement.prototype.getDomElement=function(){return this.composingElement},HCompElement.prototype.getComposingElement=function(){return this.layerElement;
-
-},HCompElement.prototype.createElements=function(){if(this.layerElement=document.createElement("div"),styleDiv(this.layerElement),this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.layerElement.style.clip="rect(0px, "+this.data.w+"px, "+this.data.h+"px, 0px)",this.layerElement!==this.parentContainer&&(this.placeholder=null),this.data.hasMask){var t=document.createElementNS(svgNS,"svg");t.setAttribute("width",this.data.w),t.setAttribute("height",this.data.h);var e=document.createElementNS(svgNS,"g");t.appendChild(e),this.layerElement.appendChild(t),this.maskedElement=e,this.composingElement=e}else this.composingElement=this.layerElement;this.appendNodeToParent(this.layerElement)},HCompElement.prototype.hide=ICompElement.prototype.hide,HCompElement.prototype.prepareFrame=ICompElement.prototype.prepareFrame,HCompElement.prototype.setElements=ICompElement.prototype.setElements,HCompElement.prototype.getElements=ICompElement.prototype.getElements,HCompElement.prototype.destroy=ICompElement.prototype.destroy,HCompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.elements[e].renderFrame();this.firstFrame&&(this.firstFrame=!1)},createElement(HBaseElement,HShapeElement);var parent=HShapeElement.prototype.parent;extendPrototype(IShapeElement,HShapeElement),HShapeElement.prototype.parent=parent,HShapeElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");if(e.setAttribute("width",this.data.bounds.r-this.data.bounds.l),e.setAttribute("height",this.data.bounds.b-this.data.bounds.t),e.setAttribute("viewBox",this.data.bounds.l+" "+this.data.bounds.t+" "+(this.data.bounds.r-this.data.bounds.l)+" "+(this.data.bounds.b-this.data.bounds.t)),e.style.transform="translate("+this.data.bounds.l+"px,"+this.data.bounds.t+"px)",this.data.hasMask){var s=document.createElementNS(svgNS,"g");t.appendChild(e),e.appendChild(s),this.maskedElement=s,this.layerElement=s}else t.appendChild(e),this.layerElement=e;this.parentContainer.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),this.buildExpressionInterface(),this.layerElement=t},HShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden=!1,void this.renderShape(this.transformHelper,null,null,!0))},createElement(HBaseElement,HTextElement),HTextElement.prototype.init=ITextElement.prototype.init,HTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,HTextElement.prototype.createElements=function(){var t=this.data.t.d,e=document.createElement("div");if(styleDiv(e),this.layerElement=e,this.data.hasMask){var s=document.createElementNS(svgNS,"svg");this.cont=s,this.compW=this.comp.data?this.comp.data.w:this.globalData.compSize.w,this.compH=this.comp.data?this.comp.data.h:this.globalData.compSize.h,s.setAttribute("width",this.compW),s.setAttribute("height",this.compH);var i=document.createElementNS(svgNS,"g");s.appendChild(i),e.appendChild(s),this.maskedElement=i,this.innerElem=i}else this.innerElem=e;this.parentContainer.appendChild(e),this.innerElem.style.fill=t.fc?"rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")":"rgba(0,0,0,0)",t.sc&&(this.innerElem.style.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.innerElem.style.strokeWidth=t.sw+"px"),this.innerElem.style.fontSize=t.s+"px";var a=this.globalData.fontManager.getFontByName(t.f);this.innerElem.style.fontFamily=a.fFamily;var r,n,o=t.fWeight,h=t.fStyle;this.innerElem.style.fontStyle=h,this.innerElem.style.fontWeight=o;var l=t.l;n=l.length;{var p,m,f,d,c,u,y,v,g,b=this.mHelper,E="";this.data.singleShape}for(r=0;n>r;r+=1){if(this.globalData.fontManager.chars?(p=document.createElementNS(svgNS,"path"),this.data.hasMask||(m=document.createElement("div"),f=document.createElementNS(svgNS,"svg"),m.appendChild(f),f.appendChild(p),styleDiv(m))):p=document.createElementNS(svgNS,"text"),p.setAttribute("stroke-linecap","butt"),p.setAttribute("stroke-linejoin","round"),p.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var P=this.globalData.fontManager.getCharData(t.t.charAt(r),a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),S=P.data;if(b.reset(),S){for(d=S.shapes[0].it,E="",u=d.length,b.scale(t.s/100,t.s/100),c=0;u>c;c+=1){for(v=d[c].ks.k.i.length,g=d[c].ks.k,y=1;v>y;y+=1)1==y&&(E+=" M"+b.applyToPointStringified(g.v[0][0],g.v[0][1])),E+=" C"+b.applyToPointStringified(g.o[y-1][0],g.o[y-1][1])+" "+b.applyToPointStringified(g.i[y][0],g.i[y][1])+" "+b.applyToPointStringified(g.v[y][0],g.v[y][1]);E+=" C"+b.applyToPointStringified(g.o[y-1][0],g.o[y-1][1])+" "+b.applyToPointStringified(g.i[0][0],g.i[0][1])+" "+b.applyToPointStringified(g.v[0][0],g.v[0][1]),E+="z"}p.setAttribute("d",E)}if(this.data.hasMask)this.innerElem.appendChild(p);else if(this.innerElem.appendChild(m),S){var C=Math.ceil(S.bounds.r*t.s/100),k=Math.floor(S.bounds.t*t.s/100);f.setAttribute("width",C-S.bounds.l),f.setAttribute("height",S.bounds.b-k),f.setAttribute("viewBox",S.bounds.l+" "+k+" "+(C-S.bounds.l)+" "+(S.bounds.b-k)),f.style.transform="translate("+S.bounds.l+"px,"+k+"px)"}}else p.textContent=l[r].val,p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(p);this.textSpans.push(this.data.hasMask?p:m),this.textPaths.push(p)}},HTextElement.prototype.hide=SVGTextElement.prototype.hide,HTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask&&this.finalTransform.matMdf&&(this.cont.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),this.cont.style.transform="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)"),!this.data.singleShape||this.firstFrame){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].style.transform=n.m,this.textSpans[s].style.opacity=n.o,n.sw&&this.textPaths[s].setAttribute("stroke-width",n.sw),n.sc&&this.textPaths[s].setAttribute("stroke",n.sc),n.fc&&this.textPaths[s].setAttribute("fill",n.fc));if(this.data.hasMask){var o=this.innerElem.getBBox();this.currentBBox.w!==o.width&&(this.currentBBox.w=o.width,this.cont.setAttribute("width",o.width)),this.currentBBox.h!==o.height&&(this.currentBBox.h=o.height,this.cont.setAttribute("height",o.height)),(this.currentBBox.w!==o.width||this.currentBBox.h!==o.height||this.currentBBox.x!==o.x||this.currentBBox.y!==o.y)&&(this.currentBBox.w=o.width,this.currentBBox.h=o.height,this.currentBBox.x=o.x,this.currentBBox.y=o.y,this.cont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.cont.style.transform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}this.firstFrame&&(this.firstFrame=!1)}},HTextElement.prototype.destroy=SVGTextElement.prototype.destroy;var animationManager=function(){function t(t,e){if(!t)return null;for(var s=0;E>s;){if(v[s].elem==t&&null!==v[s].elem)return v[s].animation;s+=1}var i=new AnimationItem;return i.setData(t,e),v.push({elem:t,animation:i}),E+=1,i}function e(t){var e=new AnimationItem;return e.setParams(t),v.push({elem:null,animation:e}),E+=1,e}function s(t,e){var s;for(s=0;E>s;s+=1)v[s].animation.setSpeed(t,e)}function i(t,e){var s;for(s=0;E>s;s+=1)v[s].animation.setDirection(t,e)}function a(t){var e;for(e=0;E>e;e+=1)v[e].animation.play(t)}function r(t,e){b=!1,g=Date.now();var s;for(s=0;E>s;s+=1)v[s].animation.moveFrame(t,e)}function n(t){var e,s=t-g;for(e=0;E>e;e+=1)v[e].animation.renderer.destroyed?(v.splice(e,1),e-=1,E-=1):v[e].animation.advanceTime(s);g=t,requestAnimationFrame(n)}function o(t){g=t,requestAnimationFrame(n)}function h(t){var e;for(e=0;E>e;e+=1)v[e].animation.pause(t)}function l(t,e,s){var i;for(i=0;E>i;i+=1)v[i].animation.goToAndStop(t,e,s)}function p(t){var e;for(e=0;E>e;e+=1)v[e].animation.stop(t)}function m(t){var e;for(e=0;E>e;e+=1)v[e].animation.togglePause(t)}function f(t){var e;for(e=0;E>e;e+=1)v[e].animation.destroy(t)}function d(e,s,i){var a,r=document.getElementsByClassName("bodymovin"),n=r.length;for(a=0;n>a;a+=1)i&&r[a].setAttribute("data-bm-type",i),t(r[a],e);if(s&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),t(h,e)}}function c(){var t;for(t=0;E>t;t+=1)v[t].animation.resize()}function u(){requestAnimationFrame(o)}var y={},v=[],g=0,b=!0,E=0;return setTimeout(u,0),y.registerAnimation=t,y.loadAnimation=e,y.setSpeed=s,y.setDirection=i,y.play=a,y.moveFrame=r,y.pause=h,y.stop=p,y.togglePause=m,y.searchAnimations=d,y.resize=c,y.start=u,y.goToAndStop=l,y.destroy=f,y}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.repeat="indefinite",this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.isScrolling=!1,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.renderedFrameCount=0,this.scaleMode="fit",this.math=Math,this.removed=!1,this.timeCompleted=0,this.segmentPos=0,this.segments=[]};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var s=t.animType?t.animType:t.renderer?t.renderer:"canvas";switch(s){case"canvas":this.renderer=new CanvasRenderer(this,t.renderer);break;case"svg":this.renderer=new SVGRenderer(this,t.renderer);break;case"hybrid":case"html":this.renderer=new HybridRenderer(this,t.renderer)}if(this.animType=s,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},AnimationItem.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||(s.loop="false"===a?!1:"true"===a?!0:parseInt(a)),s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var r=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===r&&(s.prerender=!1),this.setParams(s)},AnimationItem.prototype.includeLayers=function(t){var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;n>s;s+=1)for(e=0;a>e;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}if(t.assets)for(a=t.assets.length,e=0;a>e;e+=1)this.animationData.assets.push(t.assets[e]);dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),this.renderer.buildStage(this.container,this.layers),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.animationData._id=this.animationID,this.animationData._animType=this.animType,this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.loadSegments(),dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():this.checkLoaded()},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(this.renderer.buildItems(this.animationData.layers),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(this.renderer.buildStage(this.container,this.layers),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=subframeEnabled?this.currentRawFrame:this.math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1)},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0)},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?(this.isPaused=!1,this.play()):(this.isPaused=!0,this.pause()))},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.isPaused=!0)},AnimationItem.prototype.advanceTime=function(t){this.isPaused!==!0&&this.isScrolling!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier)},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.trigger("segmentStart")},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;i>s;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&(this.adjustSegment(this.segments.shift()),this.setCurrentRawFrameValue(0)),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||this.renderer.destroy()},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t;var e=!1;if(this.currentRawFrame>=this.totalFrames){if(this.segments.length&&(e=!0),this.loop===!1)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");if(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete")}else if(this.currentRawFrame<0)return this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1?(this.currentRawFrame=0,this.gotoFrame(),this.pause(),void this.trigger("complete")):(this.trigger("loopComplete"),this.currentRawFrame=this.totalFrames+this.currentRawFrame,void this.gotoFrame());if(e){var s=this.currentRawFrame%this.totalFrames;this.adjustSegment(this.segments.shift()),this.currentRawFrame=s}else this.currentRawFrame=this.currentRawFrame%this.totalFrames;this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;s>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames))},AnimationItem.prototype.addEventListener=_addEventListener,AnimationItem.prototype.removeEventListener=_removeEventListener,AnimationItem.prototype.triggerEvent=_triggerEvent,function(t){function e(t){animationManager.play(t)}function s(t){animationManager.pause(t)}function i(t){animationManager.togglePause(t)}function a(t,e){animationManager.setSpeed(t,e)}function r(t,e){animationManager.setDirection(t,e)}function n(t){animationManager.stop(t)}function o(t){animationManager.moveFrame(t)}function h(){E===!0?animationManager.searchAnimations(P,E,S):animationManager.searchAnimations()}function l(t){return animationManager.registerAnimation(t)}function p(){animationManager.resize()}function m(){animationManager.start()}function f(t,e,s){animationManager.goToAndStop(t,e,s)}function d(t){subframeEnabled=t}function c(t){return E===!0&&(t.animationData=JSON.parse(P)),animationManager.loadAnimation(t)}function u(t){return animationManager.destroy(t)}function y(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(defaultCurveSegments>=50?!1:!0)}function v(){"complete"===document.readyState&&(clearInterval(D),h())}function g(t){for(var e=x.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var b={};b.play=e,b.pause=s,b.togglePause=i,b.setSpeed=a,b.setDirection=r,b.stop=n,b.moveFrame=o,b.searchAnimations=h,b.registerAnimation=l,b.loadAnimation=c,b.setSubframeRendering=d,b.resize=p,b.start=m,b.goToAndStop=f,b.destroy=u,b.setQuality=y,b.version="3.1.6",b.checkReady=v,t.bodymovin=b;var E="__[STANDALONE]__",P="__[ANIMATIONDATA]__",S="";if(E){var C=document.getElementsByTagName("script"),k=C.length-1,w=C[k],x=w.src.replace(/^[^\?]+\??/,"");S=g("renderer")}var D=setInterval(v,100)}(window);}(window));
\ No newline at end of file
+(function(window){function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,s,i,a,r){return t.reset().translate(a,r).rotate(e).scale(s,i).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 roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="hidden",styleUnselectableDiv(t)}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=0>i?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,s,i){this.type=t,this.currentLoop=e,this.totalLoops=s,this.direction=0>i?-1:1}function BMSegmentStartEvent(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}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,i=this._cbs[t].length;i>s;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=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,i=0;s>i;i++)this._cbs[t][i](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}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,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.props=r}function iterateDynamicProperties(t){var e,s=this.dynamicProperties;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)}function createElement(t,e,s){if(!e){var i=Object.create(t.prototype,s),a={};return i&&"[object Function]"===a.toString.call(i.init)&&i.init(),i}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,i,a,r){return bm_abs((s-t)*(r-e)-(a-t)*(i-e))<1e-5}function e(t,e,s,i,a){if(a||(a=("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p")),o[a])return o[a];var r,n,h,l,p,m;return o[a]=function(a,o,f,d,c){var u=o/c;a=u;for(var y,v=0;++v<20&&(h=3*t,n=3*(s-t)-h,r=1-h-n,y=a*(h+a*(n+a*r))-u,!(bm_abs(y)<.001));)a-=y/(h+a*(2*n+3*r*a));m=3*e,p=3*(i-e)-m,l=1-m-p;var g=a*(m+a*(p+a*l));return g},o[a]}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var s=e.segments,i=s.length,a=bm_floor((i-1)*t),r=t*e.addedLength,n=0;if(r==s[a].l)return s[a].p;for(var o=s[a].l>r?-1:1,h=!0;h;)s[a].l<=r&&s[a+1].l>r?(n=(r-s[a].l)/(s[a+1].l-s[a].l),h=!1):a+=o,(0>a||a>=i-1)&&(h=!1);return s[a].p+(s[a+1].p-s[a].p)*n}function r(){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,i,n,o,h){var l=new r;n=0>n?0:n;var p=a(n,h);o=o>1?1:o;var m,f=a(o,h),d=t.length,c=1-p,u=1-f;for(m=0;d>m;m+=1)l.pt1[m]=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)*i[m]+p*p*p*e[m],l.pt3[m]=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)*i[m]+p*p*f*e[m],l.pt4[m]=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)*i[m]+p*f*f*e[m],l.pt2[m]=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)*i[m]+f*f*f*e[m];return l}var o=[],h=(Math,function(){function e(t,e){this.l=t,this.p=e}var s={};return function(i,a,r,n){var o=(i.join("_")+"_"+a.join("_")+"_"+r.join("_")+"_"+n.join("_")).replace(/\./g,"p");if(s[o])return s[o];var h,l,p,m,f,d,c=defaultCurveSegments,u=0,y=[],v=[],g={addedLength:0,segments:[]};for((i[0]!=a[0]||i[1]!=a[1])&&t(i[0],i[1],a[0],a[1],r[0],r[1])&&t(i[0],i[1],a[0],a[1],n[0],n[1])&&(c=2),p=r.length,h=0;c>h;h+=1){for(f=h/(c-1),d=0,l=0;p>l;l+=1)m=bm_pow(1-f,3)*i[l]+3*bm_pow(1-f,2)*f*r[l]+3*(1-f)*bm_pow(f,2)*n[l]+bm_pow(f,3)*a[l],y[l]=m,null!==v[l]&&(d+=bm_pow(y[l]-v[l],2)),v[l]=y[l];d&&(d=bm_sqrt(d),u+=d),g.segments.push(new e(u,f))}return g.addedLength=u,s[o]=g,g}}()),l=function(){var e={};return function(a){var r=a.s,n=a.e,o=a.to,h=a.ti,l=(r.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(a.bezierData=e[l]);var p,m,f,d,c,u,y,v=defaultCurveSegments,g=0,b=null;(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+o[0],r[1]+o[1])&&t(r[0],r[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(v=2);var E=new s(v);for(f=o.length,p=0;v>p;p+=1){for(y=new Array(f),c=p/(v-1),u=0,m=0;f>m;m+=1)d=bm_pow(1-c,3)*r[m]+3*bm_pow(1-c,2)*c*(r[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),g+=u,E.points[p]=new i(u,y),b=y}E.segmentLength=g,a.bezierData=E,e[l]=E}}();return{getEasingCurve:e,getBezierLength:h,getNewSegment:n,buildBezierData:l}}function dataFunctionManager(){function t(a,n,o){var h,l,p,m,f,d,c,u,y=a.length;for(m=0;y>m;m+=1)if(h=a[m],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(a[m-1].td=h.tt),l=[],p=-1,h.hasMask){var v=h.masksProperties;for(d=v.length,f=0;d>f;f+=1)if(v[f].pt.k.i)i(v[f].pt.k);else for(u=v[f].pt.k.length,c=0;u>c;c+=1)v[f].pt.k[c].s&&i(v[f].pt.k[c].s[0]),v[f].pt.k[c].e&&i(v[f].pt.k[c].e[0])}0===h.ty?(h.layers=e(h.refId,n),t(h.layers,n,o)):4===h.ty?s(h.shapes,!1):5==h.ty&&r(h,o)}}function e(t,e){for(var s=0,i=e.length;i>s;){if(e[s].id===t)return JSON.parse(JSON.stringify(e[s].layers));s+=1}}function s(t,e){var a,r,n,o=t.length,h=e?e:!1;for(a=o-1;a>=0;a-=1)if("tm"==t[a].ty&&(h=!0),"sh"==t[a].ty)if(t[a].trimmed=h,t[a].ks.k.i)i(t[a].ks.k);else for(n=t[a].ks.k.length,r=0;n>r;r+=1)t[a].ks.k[r].s&&i(t[a].ks.k[r].s[0]),t[a].ks.k[r].e&&i(t[a].ks.k[r].e[0]);else"gr"==t[a].ty&&s(t[a].it,h)}function i(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 a(e,s){t(e.layers,e.assets,s)}function r(t,e){var s,i,a,r,o,h,l,p,m=[],f=t.t.d,d=0,c=t.t.m.g,u=0,y=0,v=0,g=[],b=0,E=0,P=e.getFontByName(f.f),S=P.fStyle.split(" "),C="normal",k="normal";for(i=S.length,s=0;i>s;s+=1)"italic"===S[s].toLowerCase()?k="italic":"bold"===S[s].toLowerCase()?C="700":"black"===S[s].toLowerCase()?C="900":"medium"===S[s].toLowerCase()?C="500":"regular"===S[s].toLowerCase()||"normal"===S[s].toLowerCase()?C="400":("light"===S[s].toLowerCase()||"thin"===S[s].toLowerCase())&&(C="200");for(f.fWeight=C,f.fStyle=k,i=f.t.length,s=0;i>s;s+=1)if(a=!1," "===f.t.charAt(s)?r=" ":13===f.t.charCodeAt(s)?(g.push(b),E=b>E?b:E,b=0,r="",a=!0,v+=1):r=f.t.charAt(s),e.chars?(l=e.getCharData(f.t.charAt(s),P.fStyle,e.getFontByName(f.f).fFamily),p=a?0:l.w*f.s/100):(n.font=f.s+"px "+e.getFontByName(f.f).fFamily,p=n.measureText(r).width),b+=p,m.push({l:p,an:p,add:u,n:a,anIndexes:[],val:r,line:v}),2==c){if(u+=p,""==r||" "==r||s==i-1){for((""==r||" "==r)&&(u-=p);s>=y;)m[y].an=u,m[y].ind=d,m[y].extra=p,y+=1;d+=1,u=0}}else if(3==c){if(u+=p,""==r||s==i-1){for(""==r&&(u-=p);s>=y;)m[y].an=u,m[y].ind=d,m[y].extra=p,y+=1;u=0,d+=1}}else m[d].ind=d,m[d].extra=0,d+=1;switch(f.l=m,E=b>E?b:E,g.push(b),f.boxWidth=E,f.lineWidths=g,f.j){case 1:t.t.d.justifyOffset=-f.boxWidth;break;case 2:t.t.d.justifyOffset=-f.boxWidth/2;break;default:t.t.d.justifyOffset=0}var w=t.t.a;h=w.length;var x,D,I=[];for(o=0;h>o;o+=1){for(w[o].a.sc&&(f.strokeColorAnim=!0),w[o].a.sw&&(f.strokeWidthAnim=!0),w[o].a.fc&&(f.fillColorAnim=!0),D=0,x=w[o].s.b,s=0;i>s;s+=1)m[s].anIndexes[o]=D,(1==x&&""!=m[s].val||2==x&&""!=m[s].val&&" "!=m[s].val||3==x&&(m[s].n||" "==m[s].val||s==i-1)||4==x&&(m[s].n||s==i-1))&&(1===w[o].s.rn&&I.push(D),D+=1);t.t.a[o].s.totalChars=D;var F,T=-1;if(1===w[o].s.rn)for(s=0;i>s;s+=1)T!=m[s].anIndexes[o]&&(T=m[s].anIndexes[o],F=I.splice(Math.floor(Math.random()*I.length),1)[0]),m[s].anIndexes[o]=F}0!==h||"m"in t.t.p||(t.singleShape=!0),f.yOffset=1.2*f.s}var n=document.createElement("canvas").getContext("2d"),o=(new Matrix,{});return o.completeData=a,o}function ExpressionComp(){}function ShapeInterface(){}function SVGRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},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:new Array(15),savedOp:new Array(15),cArrPos:0,cTr:new Matrix,cO:1};var s,i=15;for(s=0;i>s;s+=1)this.contextData.saved[s]=new Array(6);this.elements=[]}function HybridRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},this.elements=[],this.destroyed=!1}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 i,a,r,n,o,h,l,p=this.element.maskedElement,m=this.globalData.defs,f=this.masksProperties.length,d=this.masksProperties,c=0,u=[],y=randomString(10),v="clipPath",g="clip-path";for(i=0;f>i;i++)if(("a"!==d[i].mode&&"n"!==d[i].mode||d[i].inv)&&(v="mask",g="mask"),"s"!=d[i].mode&&"i"!=d[i].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[i].mode){if(c+=1,a=document.createElementNS(svgNS,"path"),d[i].cl?"s"==d[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"):(a.setAttribute("fill","none"),"s"==d[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"),a.setAttribute("stroke-width","1"),a.setAttribute("stroke-miterlimit","10")),a.setAttribute("clip-rule","nonzero"),0!==d[i].x.k){v="mask",g="mask";var b=PropertyFactory.getProp(this.element,d[i].x,0,null,this.dynamicProperties),E="fi_"+randomString(10);h=document.createElementNS(svgNS,"filter"),h.setAttribute("id",E),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[i].mode?a.setAttribute("stroke","#000000"):a.setAttribute("stroke","#ffffff")}else l=null;if(this.storedData[i]={elem:a,x:b,expan:l,lastPath:"",lastOperator:"",filterId:E,lastRadius:0},"i"==d[i].mode){n=u.length;var P=document.createElementNS(svgNS,"g");for(r=0;n>r;r+=1)P.appendChild(u[r]);var S=document.createElementNS(svgNS,"mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",y+"_"+c),S.appendChild(a),m.appendChild(S),P.setAttribute("mask","url(#"+y+"_"+c+")"),u.length=0,u.push(P)}else u.push(a);d[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",prop:PropertyFactory.getShapeProp(this.element,d[i],3,this.dynamicProperties,null)},this.viewData[i].prop.k||this.drawPath(d[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={prop:PropertyFactory.getShapeProp(this.element,d[i],3,this.dynamicProperties,null)};for(this.maskElement=document.createElementNS(svgNS,v),f=u.length,i=0;f>i;i+=1)this.maskElement.appendChild(u[i]);this.maskElement.setAttribute("id",y),c>0&&p.setAttribute(g,"url(#"+y+")"),m.appendChild(this.maskElement)}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,1/255,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 EffectsManager(t,e,s){this.data=t,this.element=e;var i=t.ef;this.effectElements=[];var a,r,n=i.length;for(a=0;n>a;a++)switch(i[a].ty){case 0:r=new SliderEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 1:r=new AngleEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 2:r=new ColorEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 3:r=new PointEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 4:r=new CheckboxEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r))}}function BaseElement(){}function SVGBaseElement(t,e,s,i,a){this.globalData=s,this.comp=i,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=a?a.layerId:"ly_"+randomString(10),this.placeholder=a,this.init()}function ITextElement(t,e,s,i){}function SVGTextElement(t,e,s,i,a){this.textSpans=[],this.renderType="svg",this.parent.constructor.call(this,t,e,s,i,a)}function ICompElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a),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,i,a){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this.parent.constructor.call(this,t,e,s,i,a)}function IShapeElement(t,e,s,i,a){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.parent.constructor.call(this,t,e,s,i,a)}function ShapeItemElement(t,e,s,i,a,r){this.shape=e,this.parentContainer=s,this.placeholder=i,this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=r,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,a,[]),styleUnselectableDiv(this.shape)}function ISolidElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a)}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),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,s.frameRate,this.dynamicProperties,this.comp))}function CVImageElement(t,e,s){this.animationItem=s.renderer.animationItem,this.assetData=this.animationItem.getAssetData(t.refId),this.path=this.animationItem.getPath(),this.parent.constructor.call(this,t,e,s),this.animationItem.pendingElements+=1}function CVMaskElement(t,e,s){this.data=t,this.element=e,this.globalData=s,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.ctx=this.element.canvasContext,this.viewData=new Array(this.masksProperties.length);var i,a=this.masksProperties.length;for(i=0;a>i;i++)this.viewData[i]=PropertyFactory.getShapeProp(this.element,this.masksProperties[i],3,this.dynamicProperties,null)}function CVShapeElement(t,e,s){this.shapes=[],this.stylesList=[],this.viewData=[],this.shapesData=t.shapes,this.firstFrame=!0,this.parent.constructor.call(this,t,e,s)}function CVShapeItemElement(t,e,s){this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=s,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,e,[])}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.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.parent.constructor.call(this,t,e,s),this.renderedLetters=[]}function HBaseElement(t,e,s,i,a){this.globalData=s,this.comp=i,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=a?a.layerId:"ly_"+randomString(10),this.placeholder=a,this.init()}function HSolidElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a)}function HCompElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a),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,i,a){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.parent.constructor.call(this,t,e,s,i,a)}function HTextElement(t,e,s,i,a){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.parent.constructor.call(this,t,e,s,i,a)}var svgNS="http://www.w3.org/2000/svg",Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=1,this.props[4]=0,this.props[5]=0,this}function e(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,s,-s,e,0,0)}function s(t,e){return this._t(1,e,t,1,0,0)}function i(t,e){return this.shear(Math.tan(t),Math.tan(e))}function a(t,e){var s=Math.cos(e),i=Math.sin(e);return this._t(s,i,-i,s,0,0)._t(1,0,Math.tan(t),1,0,0)._t(s,-i,i,s,0,0)}function r(t,e){return 1==t&&1==e?this:this._t(t,0,0,e,0,0)}function n(t,e,s,i,a,r){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this}function o(t,e){return(0!==t||0!==e)&&(this.props[4]=this.props[0]*t+this.props[2]*e+this.props[4],this.props[5]=this.props[1]*t+this.props[3]*e+this.props[5]),this}function h(t,e,s,i,a,r){if(1===t&&0===e&&0===s&&1===i)return(0!==a||0!==r)&&(this.props[4]=this.props[0]*a+this.props[2]*r+this.props[4],this.props[5]=this.props[1]*a+this.props[3]*r+this.props[5]),this;var n=this.props[0],o=this.props[1],h=this.props[2],l=this.props[3],p=this.props[4],m=this.props[5];return this.props[0]=n*t+h*e,this.props[1]=o*t+l*e,this.props[2]=n*s+h*i,this.props[3]=o*s+l*i,this.props[4]=n*a+h*r+p,this.props[5]=o*a+l*r+m,this}function l(t){t.props[0]=this.props[0],t.props[1]=this.props[1],t.props[2]=this.props[2],t.props[3]=this.props[3],t.props[4]=this.props[4],t.props[5]=this.props[5]}function p(t,e){return{x:t*this.props[0]+e*this.props[2]+this.props[4],y:t*this.props[1]+e*this.props[3]+this.props[5]}}function m(t,e){return t*this.props[0]+e*this.props[2]+this.props[4]}function f(t,e){return t*this.props[1]+e*this.props[3]+this.props[5]}function d(t,e){return[t*this.props[0]+e*this.props[2]+this.props[4],t*this.props[1]+e*this.props[3]+this.props[5]]}function c(t,e){return bm_rnd(t*this.props[0]+e*this.props[2]+this.props[4])+","+bm_rnd(t*this.props[1]+e*this.props[3]+this.props[5])}function u(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5]]}function y(){return this.cssParts[1]=this.props.join(","),this.cssParts.join("")}function v(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.skew=i,this.skewFromAxis=a,this.shear=s,this.scale=r,this.setTransform=n,this.translate=o,this.transform=h,this.applyToPoint=p,this.applyToX=m,this.applyToY=f,this.applyToPointArray=d,this.applyToPointStringified=c,this.toArray=u,this.toCSS=y,this.toString=v,this.clone=l,this._t=this.transform,this.props=[1,0,0,1,0,0],this.cssParts=["matrix(","",")"]}}(),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 i=(new Date).getTime(),a=Math.max(0,16-(i-t)),r=window.setTimeout(function(){e(i+a)},a);return t=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var subframeEnabled=!0,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,defaultCurveSegments=50,degToRads=Math.PI/180;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,i){return 0>t&&(t=0),0>e&&(e=0),0>i&&(i=0),"#"+s[t]+s[e]+s[i]}}(),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]]}}(),bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var s=document.createElement("span");s.style.fontFamily=e;var i=document.createElement("span");i.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(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function e(){var t,s,i,a=this.fonts.length,r=a;for(t=0;a>t;t+=1)this.fonts[t].loaded?r-=1:(s=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,s.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(s=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,s.offsetWidth!==i&&(r-=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!==r&&Date.now()-this.initTime<o?setTimeout(e.bind(this),20):this.loaded=!0}function s(){if(window.Typekit&&window.Typekit.load)try{Typekit.load({async:!1})}catch(t){console.log("errwor",t)}else setTimeout(s,50)}function i(i,a){if(!i)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=i.list);if(i.tk){var r=document.createElement("script");r.setAttribute("src",i.tk),a.appendChild(r),s()}var n,o=i.list,h=o.length;for(n=0;h>n;n+=1){if(o[n].loaded=!1,o[n].monoCase=t(o[n].fFamily,"monospace"),o[n].sansCase=t(o[n].fFamily,"sans-serif"),o[n].fPath&&o[n].fPath){var r=document.createElement("style");r.type="text/css",r.innerHTML="@font-face {font-family: "+o[n].fFamily+"; font-style: normal; src: url('"+o[n].fPath+"');}",a.appendChild(r)}this.fonts.push(o[n])}e.bind(this)()}function a(t){this.chars=t}function r(t,e,s){for(var i=0,a=this.chars.length;a>i;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}}function n(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 o=5e3,h=function(){this.fonts=[],this.chars=null,this.loaded=!1,this.initTime=Date.now()};return h.prototype.addChars=a,h.prototype.addFonts=i,h.prototype.getCharData=r,h.prototype.getFontByName=n,h}(),ExpressionManager=function(){function sum(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("object"==typeof t&&"number"==typeof e)return t[0]=t[0]+e,t;if("number"==typeof t&&"object"==typeof e)return e[0]=t+e[0],e;if("object"==typeof t&&"object"==typeof e){for(var s=0,i=t.length,a=e.length,r=[];i>s||a>s;)r[s]=t[s]&&e[s]?t[s]+e[s]:t[s]||e[s],s+=1;return r}return 0}function sub(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("object"==typeof t&&"number"==typeof e)return t[0]=t[0]-e,t;if("number"==typeof t&&"object"==typeof e)return e[0]=t-e[0],e;if("object"==typeof t&&"object"==typeof e){for(var s=0,i=t.length,a=e.length,r=[];i>s||a>s;)r[s]=t[s]&&e[s]?t[s]-e[s]:t[s]||e[s],s+=1;return r}return 0}function mul(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;var s,i;if("object"==typeof t&&"number"==typeof e){for(i=t.length,s=0;i>s;s+=1)t[s]=t[s]*e;return t}if("number"==typeof t&&"object"==typeof e){for(i=e.length,s=0;i>s;s+=1)e[s]=t*e[s];return e}return 0}function div(t,e){if("number"==typeof t&&"number"==typeof e)return t/e;var s,i;if("object"==typeof t&&"number"==typeof e){for(i=t.length,s=0;i>s;s+=1)t[s]=t[s]/e;return t}if("number"==typeof t&&"object"==typeof e){for(i=e.length,s=0;i>s;s+=1)e[s]=t/e[s];return e}return 0}function clamp(t,e,s){return Math.min(Math.max(t,e),s)}function random(t,e){if(e||(e=0),t>e){var s=e;e=t,t=s}return t+Math.random()*(e-t)}function initiateExpression(elem,data){function effect(t){return elem.effectsManager.getEffect(t)}function nearestKey(t){var e=0,s=data.k.length,i={};for(e=0;s>e;e+=1){if(t===data.k[e].t){i.index=e;break}if(t<data.k[e].t){i.index=e;break}if(t>data.k[e].t&&e===s-1){i.index=s-1;break}}return i}function key(t){t-=1;var e,s={time:data.k[t].t/thisComp.globalData.frameRate};e=t===data.k.length-1?data.k[t-1].e:data.k[t].s;var i,a=e.length;for(i=0;a>i;i+=1)s[i]=e[i];return s}function execute(){"textSelector"===this.type&&(textIndex=this.textIndex,textTotal=this.textTotal),transform||(transform=elem.transform),!content&&elem.content&&(content=elem.content.bind(elem)),this.getPreValue&&this.getPreValue(),value=this.pv,time=this.comp.renderedFrame/this.comp.globalData.frameRate,bindedFn();var t,e;if(this.mult)if("number"==typeof this.v)this.v*=this.mult;else for(e=this.v.length,value===this.v&&(this.v=2===e?[value[0],value[1]]:[value[0],value[1],value[2]]),t=0;e>t;t+=1)this.v[t]*=this.mult;if("number"==typeof this.v)this.lastValue!==this.v&&(this.lastValue=this.v,this.mdf=!0);else for(e=this.v.length,t=0;e>t;t+=1)this.v[t]!==this.lastValue[t]&&(this.lastValue[t]=this.v[t],this.mdf=!0)}var val=data.x,transform,content,effect,thisComp=elem.comp,fnStr="var fn = function(){"+val+";this.v = $bm_rt;}";eval(fnStr);var bindedFn=fn.bind(this),numKeys=data.k?data.k.length:0,time,value,textIndex,textTotal;return execute}var ob={};return ob.initiateExpression=initiateExpression,ob}();!function(){ExpressionComp.prototype.layer=function(t){for(var e=0,s=this.layers.length;s>e;){if(this.layers[e].nm===t)return this.elements[e];e+=1}}}(),ShapeInterface.prototype.fillInterface=function(t){var e={get color(){return t.c.k&&t.c.getValue(),[t.c.pv[0],t.c.pv[1],t.c.pv[2]]},get opacity(){return t.o.k&&t.o.getValue(),t.o.pv}};return e},ShapeInterface.prototype.strokeInterface=function(t,e){var s={get color(){return e.c.k&&e.c.getValue(),[e.c.pv[0],e.c.pv[1],e.c.pv[2]]},get opacity(){return e.o.k&&e.o.getValue(),e.o.pv},get strokeWidth(){return e.w.k&&e.w.getValue(),e.w.pv},dashOb:{},get dash(){var s,i=e.d,a=t.d,r=a.length;for(s=0;r>s;s+=1)i.dataProps[s].p.k&&i.dataProps[s].p.getValue(),this.dashOb[a[s].nm]=i.dataProps[s].p.v;return this.dashOb}};return s},ShapeInterface.prototype.shapeInterface=function(t){var e={get shape(){return t.sh.k&&t.sh.getValue(),t.sh.pv}};return e},ShapeInterface.prototype.ellipseInterface=function(t){var e={get size(){return t.sh.s.k&&t.sh.s.getValue(),[t.sh.s.pv[0],t.sh.s.pv[1]]},get position(){return t.sh.p.k&&t.sh.p.getValue(),[t.sh.p.pv[0],t.sh.p.pv[1]]}};return e},ShapeInterface.prototype.rectangleInterface=function(t){var e="tm"===t.sh.ty?t.sh.prop:t.sh,s={get size(){return e.s.k&&e.s.getValue(),[e.s.pv[0],e.s.pv[1]]},get position(){return e.p.k&&e.p.getValue(),[e.p.pv[0],e.p.pv[1]]},get roundness(){return e.r.k&&e.r.getValue(),e.r.pv}};return s},ShapeInterface.prototype.trimInterface=function(t){var e={get start(){return t.tr.s.k&&t.tr.s.getValue(),t.tr.s.pv},get end(){return t.tr.e.k&&t.tr.e.getValue(),t.tr.e.pv},get offset(){return t.tr.o.k&&t.tr.o.getValue(),t.tr.o.pv}};return e},ShapeInterface.prototype.transformInterface=function(t){var e={get opacity(){return t.transform.mProps.o.k&&t.transform.mProps.o.getValue(),t.transform.mProps.o.pv},get position(){return t.transform.mProps.p.k&&t.transform.mProps.p.getValue(),[t.transform.mProps.p.pv[0],t.transform.mProps.p.pv[1]]},get anchorPoint(){return t.transform.mProps.a.k&&t.transform.mProps.a.getValue(),[t.transform.mProps.a.pv[0],t.transform.mProps.a.pv[1]]},get scale(){return t.transform.mProps.s.k&&t.transform.mProps.s.getValue(),[t.transform.mProps.s.pv[0],t.transform.mProps.s.pv[1]]},get rotation(){return t.transform.mProps.r.k&&t.transform.mProps.r.getValue(),t.transform.mProps.r.pv}};return e},ShapeInterface.prototype.groupInterface=function(t,e,s){var i,a,r=[],n=t.length;for(i=0;n>i;i+=1)"gr"===t[i].ty?(a={},this.groupInterface(t[i].it,e[i].it,a),r.push(a)):"sh"===t[i].ty?(a=this.shapeInterface(e[i]),r.push(a)):"fl"===t[i].ty?(a=this.fillInterface(e[i]),r.push(a)):"st"===t[i].ty?(a=this.strokeInterface(t[i],e[i]),r.push(a)):"el"===t[i].ty?(a=this.ellipseInterface(e[i]),r.push(a)):"rc"===t[i].ty?(a=this.rectangleInterface(e[i]),r.push(a)):"tr"===t[i].ty?s.transform=this.transformInterface(e[i]):"tm"===t[i].ty?(a=this.trimInterface(e[i]),r.push(a)):r.push("");s.content=function(e){var s,i=t.length;for(s=0;i>s;s+=1)if(t[s].nm===e)return r[s]}},ShapeInterface.prototype.buildExpressionInterface=function(){this.groupInterface(this.shapesData,this.viewData,this)};var PropertyFactory=function(){function t(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var t=this.comp.renderedFrame-this.offsetTime;if(t===this.lastFrame||this.lastFrame!==d&&(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,i=0,a=this.keyframes.length-1,r=1,n=!0;n;){if(e=this.keyframes[i],s=this.keyframes[i+1],i==a-1&&t>=s.t-this.offsetTime){e.h&&(e=s);break}if(s.t-this.offsetTime>t)break;a-1>i?i+=r:n=!1}var o,h,l,p,m,f=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?m=e.__fnct:(m=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y,e.n),e.__fnct=m),l=m("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime));var y,v=c.segmentLength*l,g=0;for(r=1,n=!0,p=c.points.length;n;){if(g+=c.points[f].partialLength*r,0===v||0===l||f==c.points.length-1){for(h=c.points[f].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?c.points[f].point[o]*this.mult:c.points[f].point[o],this.pv[o]=c.points[f].point[o],this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}if(v>g&&v<g+c.points[f+1].partialLength){for(y=(v-g)/c.points[f+1].partialLength,h=c.points[f].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?(c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y)*this.mult:c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.pv[o]=c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}p-1>f&&1==r||f>0&&-1==r?f+=r:n=!1}}}else{var b,E,P,S,C,k=!1;for(a=e.s.length,i=0;a>i;i+=1)1!==e.h&&(e.o.x instanceof Array?(k=!0,e.__fnct||(e.__fnct=[]),e.__fnct[i]||(b=e.o.x[i]||e.o.x[0],E=e.o.y[i]||e.o.y[0],P=e.i.x[i]||e.i.x[0],S=e.i.y[i]||e.i.y[0])):(k=!1,e.__fnct||(b=e.o.x,E=e.o.y,P=e.i.x,S=e.i.y)),k?e.__fnct[i]?m=e.__fnct[i]:(m=bez.getEasingCurve(b,E,P,S),e.__fnct[i]=m):e.__fnct?m=e.__fnct:(m=bez.getEasingCurve(b,E,P,S),e.__fnct=m),l=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:m("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))),C=1===e.h?e.s[i]:e.s[i]+(e.e[i]-e.s[i])*l,1===a?(this.v=this.mult?C*this.mult:C,
+this.pv=C,this.lastPValue!=this.pv&&(this.mdf=!0,this.lastPValue=this.pv)):(this.v[i]=this.mult?C*this.mult:C,this.pv[i]=C,this.lastPValue[i]!==this.pv[i]&&(this.mdf=!0,this.lastPValue[i]=this.pv[i]))}}this.lastFrame=t}}function e(){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime;if(this.lastFrame!==d&&(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,i;if(t<this.keyframes[0].t-this.offsetTime)this.mdf=!0,e=this.keyframes[0].s[0],i=!0;else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)this.mdf=!0,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],i=!0;else{this.mdf=!0;for(var a,r,n,o,h,l,p=0,m=this.keyframes.length-1,f=1,c=!0;c&&(a=this.keyframes[p],r=this.keyframes[p+1],!(r.t-this.offsetTime>t&&1==f));)m-1>p&&1==f||p>0&&-1==f?p+=f:c=!1;var u;if(1!==a.h){var y;a.__fnct?y=a.__fnct:(y=bez.getEasingCurve(a.o.x,a.o.y,a.i.x,a.i.y),a.__fnct=y),u=t>=r.t-this.offsetTime?1:t<a.t-this.offsetTime?0:y("",t-(a.t-this.offsetTime),0,1,r.t-this.offsetTime-(a.t-this.offsetTime)),s=a.e[0]}e=a.s[0],i=1===a.h}for(o=this.v.i.length,l=e.i[0].length,n=0;o>n;n+=1)for(h=0;l>h;h+=1)i?(this.v.i[n][h]=e.i[n][h],this.v.o[n][h]=e.o[n][h],this.v.v[n][h]=e.v[n][h],this.pv.i[n][h]=e.i[n][h],this.pv.o[n][h]=e.o[n][h],this.pv.v[n][h]=e.v[n][h]):(this.v.i[n][h]=e.i[n][h]+(s.i[n][h]-e.i[n][h])*u,this.v.o[n][h]=e.o[n][h]+(s.o[n][h]-e.o[n][h])*u,this.v.v[n][h]=e.v[n][h]+(s.v[n][h]-e.v[n][h])*u,this.pv.i[n][h]=e.i[n][h]+(s.i[n][h]-e.i[n][h])*u,this.pv.o[n][h]=e.o[n][h]+(s.o[n][h]-e.o[n][h])*u,this.pv.v[n][h]=e.v[n][h]+(s.v[n][h]-e.v[n][h])*u)}this.lastFrame=t}function s(t,e){this.getExpression=ExpressionManager.initiateExpression,e.x&&(this.k=!0,this.x=!0,this.getValue&&(this.getPreValue=this.getValue),this.getValue=this.getExpression(t,e))}function i(t,e,i){this.mult=i,this.v=i?e.k*i:e.k,this.pv=e.k,this.mdf=!1,this.comp=t.comp,this.k=!1,s.bind(this)(t,e)}function a(t,e,i){this.mult=i,this.mdf=!1,this.comp=t.comp,this.k=!1,s.bind(this)(t,e),this.v=new Array(e.k.length),this.pv=new Array(e.k.length);var a,r=e.k.length;for(a=0;r>a;a+=1)this.v[a]=i?e.k[a]*i:e.k[a],this.pv[a]=e.k[a]}function r(e,i,a){this.keyframes=i.k,this.offsetTime=e.data.st,this.lastValue=-99999,this.lastPValue=-99999,this.frameId=-1,this.k=!0,this.mult=a,this.elem=e,this.comp=e.comp,this.lastFrame=d,this.v=a?i.k[0].s[0]*a:i.k[0].s[0],this.pv=i.k[0].s[0],this.getValue=t,s.bind(this)(e,i)}function n(e,i,a){this.keyframes=i.k,this.offsetTime=e.data.st,this.k=!0,this.mult=a,this.elem=e,this.comp=e.comp,this.getValue=t,this.frameId=-1,this.v=new Array(i.k[0].s.length),this.pv=new Array(i.k[0].s.length),this.lastValue=new Array(i.k[0].s.length),this.lastPValue=new Array(i.k[0].s.length),this.lastFrame=d,s.bind(this)(e,i)}function o(t,e,s,o,h){var l;if(2===s)l=new c(t,e,h);else if(7===s)l=new v(t,e,h);else if(e.k.length)if("number"==typeof e.k[0])l=new a(t,e,o);else switch(s){case 0:l=new r(t,e,o);break;case 1:l=new n(t,e,o)}else l=new i(t,e,o);return(l.k||l.x)&&h.push(l),l}function h(t,e,i){this.comp=t.comp,this.k=!1,this.mdf=!1,this.closed=3===i?e.cl:e.closed,this.numNodes=3===i?e.pt.k.v.length:e.ks.k.v.length,this.v=3===i?e.pt.k:e.ks.k;var a=3===i?e.pt:e.ks;this.pv=this.v,s.bind(this)(t,a)}function l(t,s,i){this.comp=t.comp,this.offsetTime=t.data.st,this.getValue=e,this.keyframes=3===i?s.pt.k:s.ks.k,this.k=!0,this.closed=3===i?s.cl:s.closed;var a,r=this.keyframes[0].s[0].i.length,n=this.keyframes[0].s[0].i[0].length;for(this.numNodes=r,this.v={i:new Array(r),o:new Array(r),v:new Array(r)},this.pv={i:new Array(r),o:new Array(r),v:new Array(r)},a=0;r>a;a+=1)this.v.i[a]=new Array(n),this.v.o[a]=new Array(n),this.v.v[a]=new Array(n),this.pv.i[a]=new Array(n),this.pv.o[a]=new Array(n),this.pv.v[a]=new Array(n);this.lastFrame=d}function p(t,e,s,i,a){var r;if(3===s||4===s){var n=3===s?e.pt.k:e.ks.k;r=n.length?new l(t,e,s):new h(t,e,s)}else 5===s?r=new y(t,e):6===s&&(r=new u(t,e));var o=!1;if(a)for(var p=0,m=a.length;m>p;){if(!a[p].closed){o=!0;break}p+=1}return o&&(r=new g(r,a)),r.k&&i.push(r),r}function m(t,e,s,i){return new b(t,e,s,i)}function f(t,e,s){switch(e.t){case 0:return new P(t,e,s);case 1:return new E(t,e)}}var d=-999999,c=function(){function t(){return this.p.k&&this.getValue(),this.p.pv}function e(){return this.a.k&&this.getValue(),this.a.pv}function s(){return this.r.k&&this.getValue(),this.r.pv}function i(){return this.s.k&&this.getValue(),this.s.pv}function a(){return this.o.k&&this.o.getValue(),this.o.pv}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.data.p.s?this.v.reset().translate(this.px.v,this.py.v).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]):this.v.reset().translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]))}}return function(n,h,l){this.elem=n,this.frameId=-1,this.dynamicProperties=[],this.mdf=!1,this.data=h,this.getValue=r,this.v=new Matrix,this.a=o(n,h.a,1,0,this.dynamicProperties),h.p.s?(this.px=o(n,h.p.x,0,0,this.dynamicProperties),this.py=o(n,h.p.y,0,0,this.dynamicProperties)):this.p=o(n,h.p,1,0,this.dynamicProperties),this.s=o(n,h.s,1,.01,this.dynamicProperties),this.r=o(n,h.r,0,degToRads,this.dynamicProperties),this.o=o(n,h.o,0,.01,l),this.dynamicProperties.length?l.push(this):this.data.p.s?this.v.translate(this.px.v,this.py.v).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]):this.v.translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]),Object.defineProperty(this,"position",{get:t}),Object.defineProperty(this,"anchorPoint",{get:e}),Object.defineProperty(this,"rotation",{get:s}),Object.defineProperty(this,"scale",{get:i}),Object.defineProperty(this,"opacity",{get:a})}}(),u=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-a],this.v.i[0]=[t-i*s,e-a],this.v.o[0]=[t+i*s,e-a],this.v.v[1]=[t+i,e],this.v.i[1]=[t+i,e-a*s],this.v.o[1]=[t+i,e+a*s],this.v.v[2]=[t,e+a],this.v.i[2]=[t+i*s,e+a],this.v.o[2]=[t-i*s,e+a],this.v.v[3]=[t-i,e],this.v.i[3]=[t-i,e+a*s],this.v.o[3]=[t-i,e-a*s]):(this.v.v[0]=[t,e-a],this.v.o[0]=[t-i*s,e-a],this.v.i[0]=[t+i*s,e-a],this.v.v[1]=[t-i,e],this.v.o[1]=[t-i,e+a*s],this.v.i[1]=[t-i,e-a*s],this.v.v[2]=[t,e+a],this.v.o[2]=[t+i*s,e+a],this.v.i[2]=[t-i*s,e+a],this.v.v[3]=[t+i,e],this.v.o[3]=[t+i,e-a*s],this.v.i[3]=[t+i,e+a*s])}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()}}var s=.5519;return function(s,i){this.v={v:new Array(4),i:new Array(4),o:new Array(4),c:!0},this.numNodes=4,this.d=i.d,this.dynamicProperties=[],i.closed=!0,this.closed=!0,this.elem=s,this.comp=s.comp,this.frameId=-1,this.mdf=!1,this.getValue=e,this.convertEllToPath=t,this.p=o(s,i.p,1,0,this.dynamicProperties),this.s=o(s,i.s,1,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertEllToPath()}}(),y=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,i=this.s.v[1]/2,a=bm_min(s,i,this.r.v),r=a*(1-.5519);2===this.d||1===this.d?(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+s,e-i+r],this.v.v[1]=[t+s,e+i-a],this.v.o[1]=[t+s,e+i-r],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+s-a,e+i],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+s-r,e+i],this.v.v[3]=[t-s+a,e+i],this.v.o[3]=[t-s+r,e+i],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-s,e+i-r],this.v.v[5]=[t-s,e-i+a],this.v.o[5]=[t-s,e-i+r],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-s+a,e-i],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-s+r,e-i],this.v.v[7]=[t+s-a,e-i],this.v.o[7]=[t+s-r,e-i],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=[t+s,e-i+r],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+s-a,e-i],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+s-r,e-i],this.v.v[2]=[t-s+a,e-i],this.v.o[2]=[t-s+r,e-i],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-s,e-i+a],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-s,e-i+r],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=[t-s,e+i-r],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-s+a,e+i],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-s+r,e+i],this.v.v[6]=[t+s-a,e+i],this.v.o[6]=[t+s-r,e+i],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+s,e+i-a],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+s,e+i-r])}return function(s,i){this.v={v:new Array(8),i:new Array(8),o:new Array(8),c:!0},this.numNodes=8,this.elem=s,this.comp=s.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.p=o(s,i.p,1,0,this.dynamicProperties),this.s=o(s,i.s,1,0,this.dynamicProperties),this.r=o(s,i.r,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertRectToPath()}}(),v=function(){function t(t){if(this.elem.globalData.frameId!==this.frameId||t){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(),this.dynamicProperties[e].mdf&&(this.mdf=!0);if(this.mdf||t){var i=this.o.v%360/360;if(0===i&&0===this.s.v&&1==this.e.v)return void(this.isTrimming=!1);this.isTrimming=!0,0>i&&(i+=1);var a=this.s.v+i,r=this.e.v+i;if(a>r){var n=a;a=r,r=n}this.sValue=a,this.eValue=r,this.oValue=i}}}return function(e,s){this.elem=e,this.frameId=-1,this.dynamicProperties=[],this.sValue=0,this.eValue=0,this.oValue=0,this.mdf=!1,this.getValue=t,this.k=!1,this.isTrimming=!1,this.comp=e.comp,this.s=o(e,s.s,0,.01,this.dynamicProperties),this.e=o(e,s.e,0,.01,this.dynamicProperties),this.o=o(e,s.o,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.getValue(!0)}}(),g=function(){function t(t,e){this.totalLength=0;var s,i=t.v,a=t.o,r=t.i,n=i.length;for(s=0;n-1>s;s+=1)this.lengths[s]=bez.getBezierLength(i[s],i[s+1],a[s],r[s+1]),this.totalLength+=this.lengths[s].addedLength;e&&(this.lengths[s]=bez.getBezierLength(i[s],i[0],a[s],r[0]),this.totalLength+=this.lengths[s].addedLength)}function e(t,e,s,i,a){this.nextO[this.segmentCount]=e,this.nextI[this.segmentCount+1]=s,this.nextV[this.segmentCount+1]=i,this.pathStarted?this.nextV[this.segmentCount]=t:(this.pathStarted=!0,this.v.s[this.segmentCount]=t),this.segmentCount+=1}function s(t){this.mdf=t?!0:!1,this.prop.k&&this.prop.getValue();var e=0,s=this.trims.length;for(this.pathStarted=!1;s>e;){if(this.trims[e].mdf){this.mdf=!0;break}e+=1}if(this.mdf=this.prop.mdf?!0:this.mdf,this.mdf){this.nextO.length=0,this.nextI.length=0,this.nextV.length=0,this.v.s.length=0;var i=this.prop.closed;this.getSegmentsLength(this.prop.v,i);var a,r,n,o,h,l,p=this.prop.v,m=this.trims.length;for(a=0;m>a;a+=1)if(this.trims[a].isTrimming){if(r=this.trims[a].eValue,n=this.trims[a].sValue,o=this.trims[a].oValue,r===n)return this.v.v=this.nextV,this.v.o=this.nextO,void(this.v.i=this.nextI);1>=r?(this.segments[0].s=this.totalLength*n,this.segments[0].e=this.totalLength*r,this.segments[1].vl=!1):n>=1?(this.segments[0].s=this.totalLength*(n-1),this.segments[0].e=this.totalLength*(r-1),this.segments[1].vl=!1):(this.segments[0].s=this.totalLength*n,this.segments[0].e=this.totalLength,this.segments[1].s=0,this.segments[1].e=this.totalLength*(r-1),this.segments[1].vl=!0),this.v.v=p.v,this.v.o=p.o,this.v.i=p.i,l=this.v.v.length;var f=0,d=0;s=this.segments[1].vl?2:1;var c;for(this.segmentCount=0,e=0;s>e;e+=1){for(f=0,h=1;l>h;h++)if(d=this.lengths[h-1].addedLength,f+d<this.segments[e].s)f+=d;else{if(f>this.segments[e].e)break;this.segments[e].s<=f&&this.segments[e].e>=f+d?this.addSegment(this.v.v[h-1],this.v.o[h-1],this.v.i[h],this.v.v[h],this.lengths[h-1]):(c=bez.getNewSegment(this.v.v[h-1],this.v.v[h],this.v.o[h-1],this.v.i[h],(this.segments[e].s-f)/d,(this.segments[e].e-f)/d,this.lengths[h-1]),this.addSegment(c.pt1,c.pt3,c.pt4,c.pt2)),f+=d}i!==!1?f<=this.segments[e].e&&(d=this.lengths[h-1].addedLength,this.segments[e].s<=f&&this.segments[e].e>=f+d?this.addSegment(this.v.v[h-1],this.v.o[h-1],this.v.i[0],this.v.v[0],this.lengths[h-1]):(c=bez.getNewSegment(this.v.v[h-1],this.v.v[0],this.v.o[h-1],this.v.i[0],(this.segments[e].s-f)/d,(this.segments[e].e-f)/d,this.lengths[h-1]),this.addSegment(c.pt1,c.pt3,c.pt4,c.pt2))):this.pathStarted=!1}i=!1}else this.v.v=p.v,this.v.o=p.o,this.v.i=p.i;this.nextV.length?(this.v.v=this.nextV,this.v.o=this.nextO,this.v.i=this.nextI):this.v.s.length=0,this.v.c=i}}return function(i,a){this.trims=[],this.k=!1,this.mdf=!1,this.ty="tm",this.pathStarted=!1,this.segments=[{s:0,e:0,vl:!0},{s:0,e:0,vl:!1}],this.nextO=[],this.nextV=[],this.nextI=[],this.v={i:null,o:null,v:null,s:[],c:!1};var r,n=a.length;for(r=0;n>r;r+=1)a[r].closed||(this.k=a[r].trimProp.k?!0:this.k,this.trims.push(a[r].trimProp));this.prop=i,n=this.prop.numNodes-1,n+=this.prop.closed?1:0,this.lengths=new Array(n),this.k=i.k?!0:this.k,this.totalLength=0,this.getValue=s,this.addSegment=e,this.getSegmentsLength=t,this.k||(this.prop.getValue(),this.getValue(!0))}}(),b=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,i,a){this.elem=e,this.frameId=-1,this.dataProps=new Array(s.length),this.renderer=i,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(s.length-1),this.dashoffset=0;var r,n,h=s.length;for(r=0;h>r;r+=1)n=o(e,s[r].v,0,0,a),this.k=n.k?!0:this.k,this.dataProps[r]={n:s[r].n,p:n};this.getValue=t,this.k?a.push(this):this.getValue(!0)}}(),E=function(){function t(t,e){return this.textIndex=t+1,this.textTotal=e,this.getValue(),this.v}return function(e,i){this.pv=1,this.comp=e.comp,this.mult=.01,this.type="textSelector",this.textTotal=i.totalChars,s.bind(this)(e,i),this.getMult=t}}(),P=function(){function t(){if(this.dynamicProperties.length){var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue()}var s=this.data.totalChars,i=2===this.data.r?1:100/s,a=this.o.v/i,r=this.s.v/i+a,n=this.e.v/i+a;if(r>n){var o=r;r=n,n=o}this.finalS=r,this.finalE=n}function e(t){var e=bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1),r=0,n=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)r=o===n?t>=o?1:0:s(0,i(.5/(o-n)+(t-n)/(o-n),1)),r=e("",r,0,1,1);else if(3==h)r=o===n?t>=o?0:1:1-s(0,i(.5/(o-n)+(t-n)/(o-n),1)),r=e("",r,0,1,1);else if(4==h)o===n?r=t>=o?0:1:(r=s(0,i(.5/(o-n)+(t-n)/(o-n),1)),.5>r?r*=2:r=1-r);else if(5==h)if(o===n)r=t>=o?0:1;else{var l=o-n;r=-4/(l*l)*t*t+4/l*t}else 6==h?r=o===n?t>=o?0:1:(1+(Math.cos(Math.PI+2*Math.PI*(t-n)/(o-n))+0))/2:t>=a(n)&&(r=0>t-n?1-(n-t):s(0,i(o-t,1)));return r}var s=Math.max,i=Math.min,a=Math.floor;return function(s,i,a){this.mdf=!1,this.k=!1,this.data=i,this.dynamicProperties=[],this.getValue=t,this.getMult=e,this.comp=s.comp,this.finalS=0,this.finalE=0,this.s=o(s,i.s||{k:0},0,0,this.dynamicProperties),this.e="e"in i?o(s,i.e,0,0,this.dynamicProperties):{v:2===i.r?i.totalChars:100},this.o=o(s,i.o||{k:0},0,0,this.dynamicProperties),this.xe=o(s,i.xe||{k:0},0,0,this.dynamicProperties),this.ne=o(s,i.ne||{k:0},0,0,this.dynamicProperties),this.dynamicProperties.length?a.push(this):this.getValue()}}(),S={};return S.getProp=o,S.getShapeProp=p,S.getDashProp=m,S.getTextSelectorProp=f,S}();SVGRenderer.prototype.createItem=function(t,e,s,i){switch(t.ty){case 2:return this.createImage(t,e,s,i);case 0:return this.createComp(t,e,s,i);case 1:return this.createSolid(t,e,s,i);case 4:return this.createShape(t,e,s,i);case 5:return this.createText(t,e,s,i);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},SVGRenderer.prototype.buildItems=function(t,e,s,i,a){var r,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),i||(i=this);var o;for(r=n-1;r>=0;r--)s[r]=this.createItem(t[r],e,i,a),0===t[r].ty&&(o=[],this.buildItems(t[r].layers,s[r].getDomElement(),o,s[r],s[r].placeholder),s[r].setElements(o)),t[r].td&&s[r+1].setMatte(s[r].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)if(t[i].id)for(r=0;h>r;)s[r].data.id==t[i].id&&(o=s[r],s[r]=this.createItem(t[i],e,this,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,s[r],s[i].placeholder),s[r].setElements(n))),r+=1;else{var l=this.createItem(t[i],e,this);s.push(l),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,l.getDomElement(),n,l),l.setElements(n))}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},SVGRenderer.prototype.createBase=function(t,e,s,i){return new SVGBaseElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,s,i){return new IShapeElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createText=function(t,e,s,i){return new SVGTextElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createImage=function(t,e,s,i){return new IImageElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createComp=function(t,e,s,i){return new ICompElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createSolid=function(t,e,s,i){return new ISolidElement(t,e,this.globalData,s,i)},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","xMidYMid meet"),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"),i=document.createElementNS(svgNS,"rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+randomString(10);s.setAttribute("id",a),s.appendChild(i);var r=document.createElementNS(svgNS,"g");r.setAttribute("clip-path","url(#"+a+")"),this.animationItem.container.appendChild(r),e.appendChild(s),this.animationItem.container=r,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 i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;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=0;s>e;e++)this.elements[e].prepareFrame(t-this.layers[e].st);for(e=0;s>e;e++)this.elements[e].renderFrame()}},extendPrototype(ExpressionComp,SVGRenderer),CanvasRenderer.prototype.createItem=function(t,e){switch(t.ty){case 0:return this.createComp(t,e);case 1:return this.createSolid(t,e);case 2:return this.createImage(t,e);case 4:return this.createShape(t,e);case 5:return this.createText(t,e);case 99:return this.createPlaceHolder(t,e);default:return this.createBase(t,e)}return this.createBase(t,e)},CanvasRenderer.prototype.buildItems=function(t,e,s){e||(e=this.elements),s||(s=this);var i,a=t.length;for(i=0;a>i;i++)if(e[i]=this.createItem(t[i],s),0===t[i].ty){var r=[];this.buildItems(t[i].layers,r,e[i]),e[e.length-1].setElements(r)}},CanvasRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements);var r,n,o=s.length;for(i=0;a>i;i+=1)if(t[i].id)for(r=0;o>r;)s[r].data.id==t[i].id&&(s[r]=this.createItem(t[i],this),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,n,s[r]),s[r].setElements(n))),r+=1;else{var h=this.createItem(t[i],this);s.unshift(h),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,h),h.setElements(n))}},CanvasRenderer.prototype.createBase=function(t,e){return new CVBaseElement(t,e,this.globalData)},CanvasRenderer.prototype.createShape=function(t,e){return new CVShapeElement(t,e,this.globalData)},CanvasRenderer.prototype.createText=function(t,e){return new CVTextElement(t,e,this.globalData)},CanvasRenderer.prototype.createPlaceHolder=function(t){return new PlaceHolderElement(t,null,this.globalData)},CanvasRenderer.prototype.createImage=function(t,e){return new CVImageElement(t,e,this.globalData)},CanvasRenderer.prototype.createComp=function(t,e){return new CVCompElement(t,e,this.globalData)},CanvasRenderer.prototype.createSolid=function(t,e){return new CVSolidElement(t,e,this.globalData)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[2]||1!==t[3]||0!==t[4]||0!==t[5]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[2],t[3],t[4],t[5]);this.contextData.cTr.transform(t[0],t[1],t[2],t[3],t[4],t[5]);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])}},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(6));var s,i=6,a=this.contextData.saved[this.contextData.cArrPos];for(s=0;i>s;s+=1)a[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],i=6,a=this.contextData.cTr.props;for(e=0;i>e;e+=1)a[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),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.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.updateContainerSize(),this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document)},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,i=this.transformCanvas.w/this.transformCanvas.h;i>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,this.transformCanvas.sy,this.transformCanvas.tx,this.transformCanvas.ty],this.globalData.cWidth=t,this.globalData.cHeight=e},CanvasRenderer.prototype.buildStage=function(t,e,s){s||(s=this.elements);var i,a,r=e.length;for(i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemHierarchy(a,s[i],e,a.parent,s,!0),0==a.ty&&this.buildStage(null,a.layers,s[i].getElements())},CanvasRenderer.prototype.buildItemHierarchy=function(t,e,s,i,a,r){var n=0,o=s.length;for(r&&e.resetHierarchy();o>n;)s[n].ind===i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemHierarchy(t,e,s,s[n].parent,a,!1)),n+=1},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers.length;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.clearRect(0,0,this.globalData.cWidth,this.globalData.cHeight)):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()}},extendPrototype(ExpressionComp,CanvasRenderer),HybridRenderer.prototype.createItem=function(t,e,s,i){switch(t.ty){case 2:return this.createImage(t,e,s,i);case 0:return this.createComp(t,e,s,i);case 1:return this.createSolid(t,e,s,i);case 4:return this.createShape(t,e,s,i);case 5:return this.createText(t,e,s,i);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},HybridRenderer.prototype.buildItems=function(t,e,s,i,a){var r,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),i||(i=this);var o;for(r=n-1;r>=0;r--)s[r]=this.createItem(t[r],e,i,a),0===t[r].ty&&(o=[],this.buildItems(t[r].layers,s[r].getDomElement(),o,s[r],s[r].placeholder),s[r].setElements(o)),t[r].td&&s[r+1].setMatte(s[r].layerId)},HybridRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)for(r=0;h>r;){if(s[r].data.id==t[i].id){o=s[r],s[r]=this.createItem(t[i],e,this,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,s[r],s[i].placeholder),s[r].setElements(n));break}r+=1}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},HybridRenderer.prototype.createBase=function(t,e,s,i){return new SVGBaseElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},HybridRenderer.prototype.createShape=function(t,e,s,i){return s.isSvg?new IShapeElement(t,e,this.globalData,s,i):new HShapeElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createText=function(t,e,s,i){return s.isSvg?new SVGTextElement(t,e,this.globalData,s,i):new HTextElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createImage=function(t,e,s,i){return new IImageElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createComp=function(t,e,s,i){return s.isSvg?new ICompElement(t,e,this.globalData,s,i):new HCompElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createSolid=function(t,e,s,i){return s.isSvg?new ISolidElement(t,e,this.globalData,s,i):new HSolidElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.configAnimation=function(t){this.animationItem.container=document.createElement("div"),this.animationItem.container.style.width=t.w+"px",this.animationItem.container.style.height=t.h+"px",this.animationItem.container.style.transform="translate3d(0,0,0)",this.animationItem.container.style.position="absolute",this.animationItem.container.style.clip="rect(0px, "+t.w+"px, "+t.h+"px, 0px)",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,"svg");e.setAttribute("width","1"),e.setAttribute("height","1"),styleDiv(e),this.animationItem.container.appendChild(e);var s=document.createElementNS(svgNS,"defs");e.appendChild(s),this.globalData.defs=s,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,document)},HybridRenderer.prototype.buildStage=function(t,e,s){var i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},HybridRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},HybridRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;for(t=0;e>t;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0},HybridRenderer.prototype.updateContainerSize=function(){},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()}},extendPrototype(ExpressionComp,HybridRenderer),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.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)),console.log(2*this.storedData[t].x.v),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 i,a,r="";for(a=e.v.length,i=1;a>i;i+=1)1==i&&(r+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-1][1])+" "+bm_rnd(e.i[i][0])+","+bm_rnd(e.i[i][1])+" "+bm_rnd(e.v[i][0])+","+bm_rnd(e.v[i][1]);t.cl&&(r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-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!==r&&(t.inv?s.elem.setAttribute("d",this.solidPath+r):s.elem.setAttribute("d",r),s.lastPath=r)},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},SliderEffect.prototype.proxyFunction=function(){return this.p.v},AngleEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,ColorEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,PointEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,CheckboxEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,EffectsManager.prototype.getEffect=function(t){for(var e=this.data.ef,s=0,i=e.length;i>s;){if(e[s].nm===t)return this.effectElements[s];s+=1}},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.isVisible=!1);var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t);return this.data.hasMask&&this.maskManager.prepareFrame(t),this.currentFrameNum=t,this.isVisible},BaseElement.prototype.init=function(){this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.dynamicProperties=[],this.currentFrameNum=-99999,this.lastNum=-99999,this.data.ef&&(this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties),this.effect=this.effectsManager.getEffect.bind(this.effectsManager)),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,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,BaseElement.prototype.mask=function(t){return this.maskManager.getMask(t)},createElement(BaseElement,SVGBaseElement),SVGBaseElement.prototype.appendNodeToParent=function(t){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"),i=randomString(10);s.setAttribute("id",i),s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%");var a=document.createElementNS(svgNS,"feComponentTransfer");a.setAttribute("in","SourceGraphic"),s.appendChild(a);var r=document.createElementNS(svgNS,"feFuncA");r.setAttribute("type","table"),r.setAttribute("tableValues","1.0 0.0"),a.appendChild(r),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(#"+i+")"),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||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement.setAttribute("id",this.data.ln)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.data.hasMask&&(this.finalTransform.matMdf&&this.layerElement.setAttribute("transform","matrix("+s.props.join(",")+")"),this.finalTransform.opMdf&&this.layerElement.setAttribute("opacity",this.finalTransform.opacity)),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getDomElement=function(){return this.layerElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")},SVGBaseElement.prototype.hide=function(){},ITextElement.prototype.init=function(){this.parent.init.call(this);var t=this.data;this.renderedLetters=[],this.viewData={m:{a:PropertyFactory.getProp(this,t.t.m.a,1,0,this.dynamicProperties)}};var e=this.data.t;if(e.a.length){this.viewData.a=new Array(e.a.length);var s,i,a,r=e.a.length;for(s=0;r>s;s+=1)a=e.a[s],i={a:{},s:{}},"r"in a.a&&(i.a.r=PropertyFactory.getProp(this,a.a.r,0,degToRads,this.dynamicProperties)),"sk"in a.a&&(i.a.sk=PropertyFactory.getProp(this,a.a.sk,0,degToRads,this.dynamicProperties)),"sa"in a.a&&(i.a.sa=PropertyFactory.getProp(this,a.a.sa,0,degToRads,this.dynamicProperties)),"s"in a.a&&(i.a.s=PropertyFactory.getProp(this,a.a.s,1,.01,this.dynamicProperties)),"a"in a.a&&(i.a.a=PropertyFactory.getProp(this,a.a.a,1,0,this.dynamicProperties)),"o"in a.a&&(i.a.o=PropertyFactory.getProp(this,a.a.o,0,.01,this.dynamicProperties)),"p"in a.a&&(i.a.p=PropertyFactory.getProp(this,a.a.p,1,0,this.dynamicProperties)),"sw"in a.a&&(i.a.sw=PropertyFactory.getProp(this,a.a.sw,0,0,this.dynamicProperties)),"sc"in a.a&&(i.a.sc=PropertyFactory.getProp(this,a.a.sc,1,0,this.dynamicProperties)),"fc"in a.a&&(i.a.fc=PropertyFactory.getProp(this,a.a.fc,1,0,this.dynamicProperties)),"t"in a.a&&(i.a.t=PropertyFactory.getProp(this,a.a.t,0,0,this.dynamicProperties)),i.s=PropertyFactory.getTextSelectorProp(this,a.s,this.dynamicProperties),i.s.t=a.s.t,this.viewData.a[s]=i}else this.viewData.a=[];e.p&&"m"in e.p&&(this.viewData.p={f:PropertyFactory.getProp(this,e.p.f,0,0,this.dynamicProperties),l:PropertyFactory.getProp(this,e.p.l,0,0,this.dynamicProperties),m:this.maskManager.getMaskProperty(e.p.m)})},ITextElement.prototype.getMeasures=function(){var t,e,s,i,a=this.mHelper,r=this.renderType,n=this.data,o=n.t.d,h=o.l;if("m"in n.t.p){var l=this.viewData.p.m;if(!this.viewData.p.n||this.viewData.p.mdf){var p=l.v,m={tLength:0,segments:[]};i=p.v.length-1;var f;for(s=0;i>s;s+=1)f={s:p.v[s],e:p.v[s+1],to:[p.o[s][0]-p.v[s][0],p.o[s][1]-p.v[s][1]],ti:[p.i[s+1][0]-p.v[s+1][0],p.i[s+1][1]-p.v[s+1][1]]},bez.buildBezierData(f),m.tLength+=f.bezierData.segmentLength,m.segments.push(f);s=i,l.closed&&(f={s:p.v[s],e:p.v[0],to:[p.o[s][0]-p.v[s][0],p.o[s][1]-p.v[s][1]],ti:[p.i[0][0]-p.v[0][0],p.i[0][1]-p.v[0][1]]},bez.buildBezierData(f),m.tLength+=f.bezierData.segmentLength,m.segments.push(f)),this.viewData.p.pi=m}var d,c,u,m=this.viewData.p.pi,y=this.viewData.p.f.v,v=0,g=1,b=0,E=!0,P=m.segments;if(0>y&&l.closed)for(m.tLength<Math.abs(y)&&(y=-Math.abs(y)%m.tLength),v=P.length-1,u=P[v].bezierData.points,g=u.length-1;0>y;)y+=u[g].partialLength,g-=1,0>g&&(v-=1,u=P[v].bezierData.points,g=u.length-1);u=P[v].bezierData.points,c=u[g-1],d=u[g];var S,C,k=d.partialLength}i=h.length,t=0,e=0;var w,x,D,I,F,T=1.2*n.t.d.s*.714,M=!0,A=this.viewData,V=new Array(i),L=!1;I=A.a.length;var N,_,B,R,H,j,O,z,G,W,q,X,J,U,Y,K,Q=n._letters,$=-1,Z=y,tt=v,et=g,st=0;for(s=0;i>s;s+=1){switch(a.reset(),o.j){case 1:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line]),0);break;case 2:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line])/2,0)}if(j=1,h[s].n)t=0,e+=o.yOffset,e+=M?1:0,y=Z,M=!1,st=0,"m"in n.t.p&&(v=tt,g=et,u=P[v].bezierData.points,c=u[g-1],d=u[g],k=d.partialLength,b=0),V[s]=this.emptyProp;else{if("m"in n.t.p){$!==h[s].ind&&(h[$]&&(y+=h[$].extra),y+=h[s].an/2,$=h[s].ind),y+=A.m.a.v[0]*h[s].an/200;var it=0;for(D=0;I>D;D+=1)w=A.a[D].a,"p"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),it+=w.p.v[0]*_);for(E=!0;E;)if(b+k>=y+it||!u){if(S=(y+it-b)/d.partialLength,R=c.point[0]+(d.point[0]-c.point[0])*S,H=c.point[1]+(d.point[1]-c.point[1])*S,a.translate(R,H),n.t.p.p){C=(d.point[1]-c.point[1])/(d.point[0]-c.point[0]);var at=180*Math.atan(C)/Math.PI;d.point[0]<c.point[0]&&(at+=180),a.rotate(at*Math.PI/180)}a.translate(0,A.m.a.v[1]*T/100+e),E=!1}else u&&(b+=d.partialLength,g+=1,g>=u.length&&(g=0,v+=1,P[v]?u=P[v].bezierData.points:l.closed?(g=0,v=0,u=P[v].bezierData.points):u=null),u&&(c=d,d=u[g],k=d.partialLength));B=h[s].an/2-h[s].add}else a.translate(t,e),B=h[s].an/2-h[s].add,a.translate(B,0),a.translate(A.m.a.v[0]*h[s].an/200,A.m.a.v[1]*T/100);for(st+=h[s].l/2,D=0;I>D;D+=1)w=A.a[D].a,"t"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"m"in n.t.p?y+=w.t*_:t+=w.t.v*_);for(st+=h[s].l/2,D=0;I>D;D+=1)w=A.a[D].a,"p"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"m"in n.t.p?a.translate(0,w.p.v[1]*_):a.translate(w.p.v[0]*_,w.p.v[1]*_));for(o.strokeWidthAnim&&(z=n.t.d.sw||0),o.strokeColorAnim&&(O=n.t.d.sc?[n.t.d.sc[0],n.t.d.sc[1],n.t.d.sc[2]]:[0,0,0]),o.fillColorAnim&&(G=[n.t.d.fc[0],n.t.d.fc[1],n.t.d.fc[2]]),D=0;I>D;D+=1){if(w=A.a[D].a,x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"r"in w&&a.rotate(w.r.v*_),"sk"in w&&a.skewFromAxis(-(w.sk.v*_),-w.sa.v*_),"o"in w&&(j+=(w.o.v*_-j)*_),o.strokeWidthAnim&&"sw"in w&&(z+=w.sw.v*_),o.strokeColorAnim&&"sc"in w)for(W=0;3>W;W+=1)O[W]=Math.round(O[W]+(w.sc.v[W]-O[W])*_);if(o.fillColorAnim&&"fc"in w)for(W=0;3>W;W+=1)G[W]=Math.round(G[W]+(w.fc.v[W]-G[W])*_)}for(o.strokeWidthAnim&&(q=0>z?0:z),o.strokeColorAnim&&(X="rgb("+O[0]+","+O[1]+","+O[2]+")"),o.fillColorAnim&&(J="rgb("+G[0]+","+G[1]+","+G[2]+")"),D=0;I>D;D+=1)w=A.a[D].a,"s"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),a.scale(1+(w.s.v[0]-1)*_,1+(w.s.v[1]-1)*_));for(D=0;I>D;D+=1)w=A.a[D].a,"a"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),a.translate(-w.a.v[0]*_,-w.a.v[1]*_));"m"in n.t.p?(a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*T/100),y-=A.m.a.v[0]*h[s].an/200,h[s+1]&&$!==h[s+1].ind&&(y+=h[s].an/2,y+=o.tr/1e3*n.t.d.s),a.translate(-B,0)):(a.translate(-B,0),a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*T/100),t+=h[s].l+o.tr/1e3*n.t.d.s),"svg"===r?U=a.toCSS():Y=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]],K=j,Q?(N=Q[s],N.o!==K||N.sw!==q||N.sc!==X||N.fc!==J?(L=!0,F=new LetterProps(K,q,X,J,U,Y)):"svg"===r&&N.m!==U?(L=!0,F=new LetterProps(K,q,X,J,U)):"svg"===r||N.props[1]===a.props[1]&&N.props[2]===a.props[2]&&N.props[3]===a.props[3]&&N.props[4]===a.props[4]&&N.props[5]===a.props[5]?F=N:(L=!0,F=new LetterProps(K,q,X,J,null,[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]]))):(L=!0,F=new LetterProps(K,q,X,J,U,Y)),V[s]=F}}L&&(this.renderedLetters=V)},ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,SVGTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d;this.innerElem=document.createElementNS(svgNS,"g"),t.fc?this.innerElem.setAttribute("fill","rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.innerElem.setAttribute("fill","rgba(0,0,0,0)"),t.sc&&(this.innerElem.setAttribute("stroke","rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")"),this.innerElem.setAttribute("stroke-width",t.sw)),this.innerElem.setAttribute("font-size",t.s);var e=this.globalData.fontManager.getFontByName(t.f);this.innerElem.setAttribute("font-family",e.fFamily);var s,i,a=t.fWeight,r=t.fStyle;this.innerElem.setAttribute("font-style",r),this.innerElem.setAttribute("font-weight",a),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem);var n=t.l;i=n.length;var o,h,l,p,m,f,d,c=this.mHelper,u="",y=this.data.singleShape;if(this.globalData.fontManager.chars&&y)var v=0,g=0,b=t.lineWidths,E=t.boxWidth,P=!0;for(s=0;i>s;s+=1){if(this.globalData.fontManager.chars?y&&0!==s||(o=document.createElementNS(svgNS,"path")):o=document.createElementNS(svgNS,"text"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var S=this.globalData.fontManager.getCharData(t.t.charAt(s),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),C=S.data;if(c.reset(),y&&n[s].n&&(v=0,g+=t.yOffset,g+=P?1:0,P=!1),C){if(h=C.shapes[0].it,y){switch(t.j){case 1:c.translate(t.justifyOffset+(E-b[n[s].line]),0);break;case 2:c.translate(t.justifyOffset+(E-b[n[s].line])/2,0)}c.translate(v,g)}else u="";for(p=h.length,c.scale(t.s/100,t.s/100),l=0;p>l;l+=1){for(f=h[l].ks.k.i.length,d=h[l].ks.k,m=1;f>m;m+=1)1==m&&(u+=" M"+c.applyToPointStringified(d.v[0][0],d.v[0][1])),u+=" C"+c.applyToPointStringified(d.o[m-1][0],d.o[m-1][1])+" "+c.applyToPointStringified(d.i[m][0],d.i[m][1])+" "+c.applyToPointStringified(d.v[m][0],d.v[m][1]);u+=" C"+c.applyToPointStringified(d.o[m-1][0],d.o[m-1][1])+" "+c.applyToPointStringified(d.i[0][0],d.i[0][1])+" "+c.applyToPointStringified(d.v[0][0],d.v[0][1]),u+="z"}y||o.setAttribute("d",u)}y?v+=n[s].l:this.innerElem.appendChild(o)}else o.textContent=n[s].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(o);this.textSpans.push(o)}y&&(o.setAttribute("d",u),this.innerElem.appendChild(o))},SVGTextElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},SVGTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask||(this.finalTransform.matMdf&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),this.finalTransform.opMdf&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),!this.data.singleShape){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].setAttribute("transform",n.m),this.textSpans[s].setAttribute("opacity",n.o),n.sw&&this.textSpans[s].setAttribute("stroke-width",n.sw),n.sc&&this.textSpans[s].setAttribute("stroke",n.sc),n.fc&&this.textSpans[s].setAttribute("fill",n.fc))}},SVGTextElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null};var PlaceHolderElement=function(t,e,s){if(this.data=t,this.globalData=s,e){this.parentContainer=e;var i=document.createElementNS(svgNS,"g");i.setAttribute("id",this.data.id),e.appendChild(i),this.phElement=i}this.layerId="ly_"+randomString(10)};PlaceHolderElement.prototype.prepareFrame=function(){},PlaceHolderElement.prototype.renderFrame=function(){},PlaceHolderElement.prototype.draw=function(){},createElement(SVGBaseElement,ICompElement),extendPrototype(ExpressionComp,ICompElement),ICompElement.prototype.getComposingElement=function(){return this.layerElement},ICompElement.prototype.hide=function(){if(!this.hidden){var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t].hide();this.hidden=!0}},ICompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},ICompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.data.hasMask?this.elements[e].renderFrame():this.elements[e].renderFrame(this.finalTransform);this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this.parent.destroy.call();var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t].destroy()},createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assetData.p),t.maskedElement=t.innerElem},s=new Image;s.addEventListener("load",e,!1),s.addEventListener("error",e,!1),s.src=this.path+this.assetData.p,this.parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln)},IImageElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},IImageElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||((this.finalTransform.matMdf||this.firstFrame)&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),(this.finalTransform.opMdf||this.firstFrame)&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.ljEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},IShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),styleUnselectableDiv(this.layerElement),this.buildExpressionInterface()},IShapeElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var p;if(e[a].c=PropertyFactory.getProp(this,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this,t[a].o,0,.01,s),"st"==t[a].ty){if(p=document.createElementNS(svgNS,"g"),p.style.strokeLinecap=this.lcEnum[t[a].lc]||"round",p.style.strokeLinejoin=this.ljEnum[t[a].lj]||"round",p.style.fillOpacity=0,1==t[a].lj&&(p.style.strokeMiterlimit=t[a].ml),e[a].c.k||(p.style.stroke="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.strokeOpacity=e[a].o.v),e[a].w=PropertyFactory.getProp(this,t[a].w,0,null,s),e[a].w.k||(p.style.strokeWidth=e[a].w.v),t[a].d){var m=PropertyFactory.getDashProp(this,t[a].d,"svg",s);m.k||(p.style.strokeDasharray=m.dasharray,p.style.strokeDashoffset=m.dashoffset),e[a].d=m}}else p=document.createElementNS(svgNS,"path"),e[a].c.k||(p.style.fill="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.fillOpacity=e[a].o.v);this.layerElement===this.parentContainer?this.appendNodeToParent(p):this.layerElement.appendChild(p),this.stylesList.push({pathElement:p,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),i.length&&(t[a].trimmed=!0),e[a].sh=PropertyFactory.getShapeProp(this,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var y={closed:!1,trimProp:PropertyFactory.getProp(this,t[a],7,null,s)};e[a]={tr:y.trimProp},i.push(y),l.push(y)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},IShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();this.hidden=!1;var s=this.data.hasMask?this.transformHelper:this.finalTransform;this.renderShape(s,null,null,!0)},IShapeElement.prototype.hide=function(){if(!this.hidden){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode));this.hidden=!0}},IShapeElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.shapesData,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},IShapeElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var p=r.s?r.s:[];for(a=1;i>a;a+=1)p[a-1]?(e.st&&(h+=" M"+p[a-1][0]+","+p[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[a-1][0],p[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(p[0]?(e.st&&(h+=" M"+p[0][0]+","+p[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[0][0],p[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},IShapeElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.pathElement.style.fill="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.fillOpacity=e.o.v*s.opacity)},IShapeElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&a.k&&(a.mdf||this.firstFrame)&&(i.pathElement.style.strokeDasharray=a.dasharray,i.pathElement.style.strokeDashoffset=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.pathElement.style.stroke="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.strokeOpacity=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.pathElement.style.strokeWidth=e.w.v)},IShapeElement.prototype.destroy=function(){this.parent.destroy.call(),this.shapeData=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},extendPrototype(ShapeInterface,IShapeElement),ShapeItemElement.prototype.appendNodeToParent=SVGBaseElement.prototype.appendNodeToParent,ShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var p;if(e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),
+e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty){if(p=document.createElementNS(svgNS,"g"),p.style.strokeLinecap=this.lcEnum[t[a].lc]||"round",p.style.strokeLinejoin=this.ljEnum[t[a].lj]||"round",p.style.fillOpacity=0,1==t[a].lj&&(p.style.strokeMiterlimit=t[a].ml),e[a].c.k||(p.style.stroke="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.strokeOpacity=e[a].o.v),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(p.style.strokeWidth=e[a].w.v),t[a].d){var m=PropertyFactory.getDashProp(this.elemData,t[a].d,"svg",s);m.k?e[a].d=m:(p.style.strokeDasharray=m.dasharray,p.style.strokeDashoffset=m.dashoffset)}}else p=document.createElementNS(svgNS,"path"),e[a].c.k||(p.style.fill="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.fillOpacity=e[a].o.v);this.shape===this.parentContainer?this.appendNodeToParent(p):this.shape.appendChild(p),this.stylesList.push({pathElement:p,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var y={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(y),l.push(y)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},ShapeItemElement.prototype.getElement=function(){return this.shape},ShapeItemElement.prototype.hideShape=function(){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode))},ShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},ShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var p=r.s?r.s:[];for(a=1;i>a;a+=1)p[a-1]?(e.st&&(h+=" M"+p[a-1][0]+","+p[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[a-1][0],p[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(p[0]?(e.st&&(h+=" M"+p[0][0]+","+p[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[0][0],p[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},ShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.pathElement.style.fill="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.fillOpacity=e.o.v*s.opacity)},ShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.pathElement.style.strokeDasharray=a.dasharray,i.pathElement.style.strokeDashoffset=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.pathElement.style.stroke="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.strokeOpacity=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.pathElement.style.strokeWidth=e.w.v)},ShapeItemElement.prototype.destroy=function(t,e){this.shape=null,this.data=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement===this.parentContainer?this.appendNodeToParent(t):this.layerElement.appendChild(t),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.innerElem=t},ISolidElement.prototype.hide=IImageElement.prototype.hide,ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy,createElement(BaseElement,CVBaseElement),CVBaseElement.prototype.createElements=function(){},CVBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(!this.isVisible)return this.isVisible;this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]);return this.data.hasMask&&(this.globalData.renderer.save(!0),this.maskManager.renderFrame(s)),this.isVisible},CVBaseElement.prototype.getCurrentAnimData=function(){return this.currentAnimData},CVBaseElement.prototype.addMasks=function(t){this.maskManager=new CVMaskElement(t,this,this.globalData)},CVBaseElement.prototype.destroy=function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager&&this.maskManager.destroy()},CVBaseElement.prototype.mHelper=new Matrix,createElement(CVBaseElement,CVCompElement),CVCompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},CVCompElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e,s=this.layers.length;for(e=s-1;e>=0;e-=1)this.elements[e].renderFrame(this.finalTransform);this.data.hasMask&&this.globalData.renderer.restore(!0),this.firstFrame&&(this.firstFrame=!1)}},CVCompElement.prototype.setElements=function(t){this.elements=t},CVCompElement.prototype.getElements=function(){return this.elements},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.layers=null,this.elements=null,this.parent.destroy.call()},createElement(CVBaseElement,CVImageElement),CVImageElement.prototype.createElements=function(){var t=this,e=function(){t.animationItem.elementLoaded()},s=function(){t.failed=!0,t.animationItem.elementLoaded()};this.img=new Image,this.img.addEventListener("load",e,!1),this.img.addEventListener("error",s,!1),this.img.src=this.path+this.assetData.p,this.parent.createElements.call(this)},CVImageElement.prototype.renderFrame=function(t){if(!this.failed&&this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.drawImage(this.img,0,0),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},CVImageElement.prototype.destroy=function(){this.img=null,this.animationItem=null,this.parent.destroy.call()},CVMaskElement.prototype.getMaskProperty=function(t){return this.viewData[t]},CVMaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)},CVMaskElement.prototype.renderFrame=function(t){var e,s,i,a,r,n=this.ctx,o=this.data.masksProperties.length,h=!1;for(e=0;o>e;e++)if("n"!==this.masksProperties[e].mode){h===!1&&(n.beginPath(),h=!0),this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.globalData.compWidth,0),n.lineTo(this.globalData.compWidth,this.globalData.compHeight),n.lineTo(0,this.globalData.compHeight),n.lineTo(0,0)),r=this.viewData[e].v,s=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.moveTo(s[0],s[1]);var l,p=r.v.length;for(l=1;p>l;l++)s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[l][0],r.i[l][1]),a=t.applyToPointArray(r.v[l][0],r.v[l][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1]);s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[0][0],r.i[0][1]),a=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1])}h&&n.clip()},CVMaskElement.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].pv};e+=1}},CVMaskElement.prototype.destroy=function(){this.ctx=null},createElement(CVBaseElement,CVShapeElement),CVShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},CVShapeElement.prototype.ljEnum={1:"butt",2:"round",3:"butt"},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),this.buildExpressionInterface()},CVShapeElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],p=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var m=PropertyFactory.getDashProp(this,t[a].d,"canvas",s);e[a].d=m,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),i.length&&(t[a].trimmed=!0),e[a].sh=PropertyFactory.getShapeProp(this,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this,t[a],7,null,s)};i.push(u),p.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=p.length,a=0;h>a;a+=1)p[a].closed=!0},CVShapeElement.prototype.renderFrame=function(t){this.parent.renderFrame.call(this,t)!==!1&&(this.renderShape(this.finalTransform,null,null,!0),this.data.hasMask&&this.globalData.renderer.restore(!0))},CVShapeElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.shapesData,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var p,m,f,d,c,u,y,v=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(y=this.stylesList[a].type,"st"!==y||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,m=c.length,"st"===y?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml||0):g.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),"st"!==y&&g.beginPath(),p=0;m>p;p+=1){for("st"===y?(v.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[p].tr),u=c[p].nodes):u=c[p].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===y&&(g.stroke(),v.restore())}"st"!==y&&g.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.viewData.length=0,this.parent.destroy.call()},extendPrototype(ShapeInterface,CVShapeElement),CVShapeItemElement.prototype.dashResetter=[],CVShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],p=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var m=PropertyFactory.getDashProp(this.elemData,t[a].d,"canvas",s);e[a].d=m,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(u),p.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=p.length,a=0;h>a;a+=1)p[a].closed=!0},CVShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var p,m,f,d,c,u,y,v=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(y=this.stylesList[a].type,"st"!==y||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,m=c.length,"st"===y?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml):g.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),g.beginPath(),p=0;m>p;p+=1){for("st"===y?(v.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[p].tr),u=c[p].nodes):u=c[p].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===y&&(g.stroke(),v.restore())}"st"!==y&&g.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeItemElement.prototype.destroy=function(){this.data=null,this.globalData=null,this.canvasContext=null},createElement(CVBaseElement,CVSolidElement),CVSolidElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.fillStyle=this.data.sc,e.fillRect(0,0,this.data.sw,this.data.sh),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(CVBaseElement,CVTextElement),CVTextElement.prototype.init=ITextElement.prototype.init,CVTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,CVTextElement.prototype.getMult=ITextElement.prototype.getMult,CVTextElement.prototype.tHelper=document.createElement("canvas").getContext("2d"),CVTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d,e=!1;t.fc?(e=!0,this.values.fill="rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.values.sWidth=t.sw);var i,a,r=this.globalData.fontManager.getFontByName(t.f),n=this.mHelper;this.stroke=s,this.values.fValue=t.s+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.t.length,this.tHelper.font=this.values.fValue;var o,h,l,p,m,f,d,c,u,y;for(i=0;a>i;i+=1){if(o=this.globalData.fontManager.getCharData(t.t.charAt(i),r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),n.reset(),n.scale(t.s/100,t.s/100),h=o.data)for(m=h.shapes[0].it,d=m.length,u=new Array(d),f=0;d>f;f+=1){for(p=m[f].ks.k.i.length,c=m[f].ks.k,y=[],l=1;p>l;l+=1)1==l&&y.push(n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),y.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[l][0],c.i[l][1]),n.applyToY(c.i[l][0],c.i[l][1]),n.applyToX(c.v[l][0],c.v[l][1]),n.applyToY(c.v[l][0],c.v[l][1]));y.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[0][0],c.i[0][1]),n.applyToY(c.i[0][0],c.i[0][1]),n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),u[f]=y}else u=[];this.textSpans.push({elem:u})}},CVTextElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext,s=this.finalTransform.mat.props;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.font=this.values.fValue,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.getMeasures();var i,a,r,n,o,h,l=this.renderedLetters,p=this.data.t.d.l;a=p.length;var m,f,d,c=null,u=null,y=null;for(i=0;a>i;i+=1)if(!p[i].n){if(m=l[i],this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(m.props),this.globalData.renderer.ctxOpacity(m.o),this.fill){for(m.fc?c!==m.fc&&(c=m.fc,e.fillStyle=m.fc):c!==this.values.fill&&(c=this.values.fill,e.fillStyle=this.values.fill),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(m.sw?y!==m.sw&&(y=m.sw,e.lineWidth=m.sw):y!==this.values.sWidth&&(y=this.values.sWidth,e.lineWidth=this.values.sWidth),m.sc?u!==m.sc&&(u=m.sc,e.strokeStyle=m.sc):u!==this.values.stroke&&(u=this.values.stroke,e.strokeStyle=this.values.stroke),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}this.globalData.renderer.restore()}this.globalData.renderer.restore(this.data.hasMask)}},createElement(BaseElement,HBaseElement),HBaseElement.prototype.appendNodeToParent=function(t){if(this.placeholder){var e=this.placeholder.phElement;e.parentNode.insertBefore(t,e)}else this.parentContainer.appendChild(t)},HBaseElement.prototype.createElements=function(){this.data.hasMask?(this.layerElement=document.createElementNS(svgNS,"svg"),this.appendNodeToParent(this.layerElement),this.maskedElement=this.layerElement):this.layerElement=this.parentContainer,!this.data.ln||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement.setAttribute("id",this.data.ln)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},HBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.layerElement.style.transform="matrix3d("+s.props[0]+","+s.props[1]+",0,0, "+s.props[2]+","+s.props[3]+",0,0, 0,0,1,0, "+s.props[4]+","+s.props[5]+",0,1)",this.layerElement.style.opacity=this.finalTransform.opacity,this.isVisible},HBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},HBaseElement.prototype.getDomElement=function(){return this.layerElement},HBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},HBaseElement.prototype.hide=function(){},createElement(HBaseElement,HSolidElement),HSolidElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),t.appendChild(e),this.layerElement=t,this.parentContainer.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln);var s=document.createElementNS(svgNS,"rect");s.setAttribute("width",this.data.sw),s.setAttribute("height",this.data.sh),s.setAttribute("fill",this.data.sc),e.appendChild(s),this.data.hasMask&&(this.maskedElement=s)},HSolidElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},HSolidElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),void(this.firstFrame&&(this.firstFrame=!1)))},HSolidElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},
+createElement(HBaseElement,HCompElement),extendPrototype(ExpressionComp,HCompElement),HCompElement.prototype.getDomElement=function(){return this.composingElement},HCompElement.prototype.getComposingElement=function(){return this.layerElement},HCompElement.prototype.createElements=function(){if(this.layerElement=document.createElement("div"),styleDiv(this.layerElement),this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.layerElement.style.clip="rect(0px, "+this.data.w+"px, "+this.data.h+"px, 0px)",this.layerElement!==this.parentContainer&&(this.placeholder=null),this.data.hasMask){var t=document.createElementNS(svgNS,"svg");t.setAttribute("width",this.data.w),t.setAttribute("height",this.data.h);var e=document.createElementNS(svgNS,"g");t.appendChild(e),this.layerElement.appendChild(t),this.maskedElement=e,this.composingElement=e}else this.composingElement=this.layerElement;this.appendNodeToParent(this.layerElement)},HCompElement.prototype.hide=ICompElement.prototype.hide,HCompElement.prototype.prepareFrame=ICompElement.prototype.prepareFrame,HCompElement.prototype.setElements=ICompElement.prototype.setElements,HCompElement.prototype.getElements=ICompElement.prototype.getElements,HCompElement.prototype.destroy=ICompElement.prototype.destroy,HCompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.elements[e].renderFrame();this.firstFrame&&(this.firstFrame=!1)},createElement(HBaseElement,HShapeElement);var parent=HShapeElement.prototype.parent;extendPrototype(IShapeElement,HShapeElement),HShapeElement.prototype.parent=parent,HShapeElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");if(e.setAttribute("width",this.data.bounds.r-this.data.bounds.l),e.setAttribute("height",this.data.bounds.b-this.data.bounds.t),e.setAttribute("viewBox",this.data.bounds.l+" "+this.data.bounds.t+" "+(this.data.bounds.r-this.data.bounds.l)+" "+(this.data.bounds.b-this.data.bounds.t)),e.style.transform="translate("+this.data.bounds.l+"px,"+this.data.bounds.t+"px)",this.data.hasMask){var s=document.createElementNS(svgNS,"g");t.appendChild(e),e.appendChild(s),this.maskedElement=s,this.layerElement=s}else t.appendChild(e),this.layerElement=e;this.parentContainer.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),this.buildExpressionInterface(),this.layerElement=t},HShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden=!1,void this.renderShape(this.transformHelper,null,null,!0))},createElement(HBaseElement,HTextElement),HTextElement.prototype.init=ITextElement.prototype.init,HTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,HTextElement.prototype.createElements=function(){var t=this.data.t.d,e=document.createElement("div");if(styleDiv(e),this.layerElement=e,this.data.hasMask){var s=document.createElementNS(svgNS,"svg");this.cont=s,this.compW=this.comp.data?this.comp.data.w:this.globalData.compSize.w,this.compH=this.comp.data?this.comp.data.h:this.globalData.compSize.h,s.setAttribute("width",this.compW),s.setAttribute("height",this.compH);var i=document.createElementNS(svgNS,"g");s.appendChild(i),e.appendChild(s),this.maskedElement=i,this.innerElem=i}else this.innerElem=e;this.parentContainer.appendChild(e),this.innerElem.style.fill=t.fc?"rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")":"rgba(0,0,0,0)",t.sc&&(this.innerElem.style.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.innerElem.style.strokeWidth=t.sw+"px"),this.innerElem.style.fontSize=t.s+"px";var a=this.globalData.fontManager.getFontByName(t.f);this.innerElem.style.fontFamily=a.fFamily;var r,n,o=t.fWeight,h=t.fStyle;this.innerElem.style.fontStyle=h,this.innerElem.style.fontWeight=o;var l=t.l;n=l.length;{var p,m,f,d,c,u,y,v,g,b=this.mHelper,E="";this.data.singleShape}for(r=0;n>r;r+=1){if(this.globalData.fontManager.chars?(p=document.createElementNS(svgNS,"path"),this.data.hasMask||(m=document.createElement("div"),f=document.createElementNS(svgNS,"svg"),m.appendChild(f),f.appendChild(p),styleDiv(m))):p=document.createElementNS(svgNS,"text"),p.setAttribute("stroke-linecap","butt"),p.setAttribute("stroke-linejoin","round"),p.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var P=this.globalData.fontManager.getCharData(t.t.charAt(r),a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),S=P.data;if(b.reset(),S){for(d=S.shapes[0].it,E="",u=d.length,b.scale(t.s/100,t.s/100),c=0;u>c;c+=1){for(v=d[c].ks.k.i.length,g=d[c].ks.k,y=1;v>y;y+=1)1==y&&(E+=" M"+b.applyToPointStringified(g.v[0][0],g.v[0][1])),E+=" C"+b.applyToPointStringified(g.o[y-1][0],g.o[y-1][1])+" "+b.applyToPointStringified(g.i[y][0],g.i[y][1])+" "+b.applyToPointStringified(g.v[y][0],g.v[y][1]);E+=" C"+b.applyToPointStringified(g.o[y-1][0],g.o[y-1][1])+" "+b.applyToPointStringified(g.i[0][0],g.i[0][1])+" "+b.applyToPointStringified(g.v[0][0],g.v[0][1]),E+="z"}p.setAttribute("d",E)}if(this.data.hasMask)this.innerElem.appendChild(p);else{this.innerElem.appendChild(m);var C=t.s/100;if(S){var k=Math.ceil(S.bounds.r*C),w=Math.floor(S.bounds.t*C),x=Math.floor(S.bounds.l*C),D=Math.ceil(S.bounds.b*C);f.setAttribute("width",k-x),f.setAttribute("height",D-w),f.setAttribute("viewBox",x+" "+w+" "+(k-x)+" "+(D-w)),f.style.transform="translate("+x+"px,"+w+"px)"}}}else p.textContent=l[r].val,p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(p);this.textSpans.push(this.data.hasMask?p:m),this.textPaths.push(p)}},HTextElement.prototype.hide=SVGTextElement.prototype.hide,HTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask&&this.finalTransform.matMdf&&(this.cont.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),this.cont.style.transform="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)"),!this.data.singleShape||this.firstFrame){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].style.transform=n.m,this.textSpans[s].style.opacity=n.o,n.sw&&this.textPaths[s].setAttribute("stroke-width",n.sw),n.sc&&this.textPaths[s].setAttribute("stroke",n.sc),n.fc&&this.textPaths[s].setAttribute("fill",n.fc));if(this.data.hasMask){var o=this.innerElem.getBBox();this.currentBBox.w!==o.width&&(this.currentBBox.w=o.width,this.cont.setAttribute("width",o.width)),this.currentBBox.h!==o.height&&(this.currentBBox.h=o.height,this.cont.setAttribute("height",o.height)),(this.currentBBox.w!==o.width||this.currentBBox.h!==o.height||this.currentBBox.x!==o.x||this.currentBBox.y!==o.y)&&(this.currentBBox.w=o.width,this.currentBBox.h=o.height,this.currentBBox.x=o.x,this.currentBBox.y=o.y,this.cont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.cont.style.transform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}this.firstFrame&&(this.firstFrame=!1)}},HTextElement.prototype.destroy=SVGTextElement.prototype.destroy;var animationManager=function(){function t(t,e){if(!t)return null;for(var s=0;E>s;){if(v[s].elem==t&&null!==v[s].elem)return v[s].animation;s+=1}var i=new AnimationItem;return i.setData(t,e),v.push({elem:t,animation:i}),E+=1,i}function e(t){var e=new AnimationItem;return e.setParams(t),v.push({elem:null,animation:e}),E+=1,e}function s(t,e){var s;for(s=0;E>s;s+=1)v[s].animation.setSpeed(t,e)}function i(t,e){var s;for(s=0;E>s;s+=1)v[s].animation.setDirection(t,e)}function a(t){var e;for(e=0;E>e;e+=1)v[e].animation.play(t)}function r(t,e){b=!1,g=Date.now();var s;for(s=0;E>s;s+=1)v[s].animation.moveFrame(t,e)}function n(t){var e,s=t-g;for(e=0;E>e;e+=1)v[e].animation.renderer.destroyed?(v.splice(e,1),e-=1,E-=1):v[e].animation.advanceTime(s);g=t,requestAnimationFrame(n)}function o(t){g=t,requestAnimationFrame(n)}function h(t){var e;for(e=0;E>e;e+=1)v[e].animation.pause(t)}function l(t,e,s){var i;for(i=0;E>i;i+=1)v[i].animation.goToAndStop(t,e,s)}function p(t){var e;for(e=0;E>e;e+=1)v[e].animation.stop(t)}function m(t){var e;for(e=0;E>e;e+=1)v[e].animation.togglePause(t)}function f(t){var e;for(e=0;E>e;e+=1)v[e].animation.destroy(t)}function d(e,s,i){var a,r=document.getElementsByClassName("bodymovin"),n=r.length;for(a=0;n>a;a+=1)i&&r[a].setAttribute("data-bm-type",i),t(r[a],e);if(s&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),t(h,e)}}function c(){var t;for(t=0;E>t;t+=1)v[t].animation.resize()}function u(){requestAnimationFrame(o)}var y={},v=[],g=0,b=!0,E=0;return setTimeout(u,0),y.registerAnimation=t,y.loadAnimation=e,y.setSpeed=s,y.setDirection=i,y.play=a,y.moveFrame=r,y.pause=h,y.stop=p,y.togglePause=m,y.searchAnimations=d,y.resize=c,y.start=u,y.goToAndStop=l,y.destroy=f,y}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.repeat="indefinite",this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.isScrolling=!1,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.renderedFrameCount=0,this.scaleMode="fit",this.math=Math,this.removed=!1,this.timeCompleted=0,this.segmentPos=0,this.segments=[]};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var s=t.animType?t.animType:t.renderer?t.renderer:"canvas";switch(s){case"canvas":this.renderer=new CanvasRenderer(this,t.renderer);break;case"svg":this.renderer=new SVGRenderer(this,t.renderer);break;case"hybrid":case"html":this.renderer=new HybridRenderer(this,t.renderer)}if(this.animType=s,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},AnimationItem.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||(s.loop="false"===a?!1:"true"===a?!0:parseInt(a)),s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var r=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===r&&(s.prerender=!1),this.setParams(s)},AnimationItem.prototype.includeLayers=function(t){var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;n>s;s+=1)if(r[s].id)for(e=0;a>e;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}else"svg"==this.animType?i.push(r[s]):i.unshift(r[s]);if(t.assets)for(a=t.assets.length,e=0;a>e;e+=1)this.animationData.assets.push(t.assets[e]);dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),this.renderer.buildStage(this.container,this.layers),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.animationData._id=this.animationID,this.animationData._animType=this.animType,this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.loadSegments(),dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():this.checkLoaded()},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(this.renderer.buildItems(this.animationData.layers),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(this.renderer.buildStage(this.container,this.layers),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=subframeEnabled?this.currentRawFrame:this.math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1)},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0)},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?(this.isPaused=!1,this.play()):(this.isPaused=!0,this.pause()))},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.isPaused=!0)},AnimationItem.prototype.advanceTime=function(t){this.isPaused!==!0&&this.isScrolling!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier)},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.trigger("segmentStart")},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;i>s;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&(this.adjustSegment(this.segments.shift()),this.setCurrentRawFrameValue(0)),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||this.renderer.destroy()},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t;var e=!1;if(this.currentRawFrame>=this.totalFrames){if(this.segments.length&&(e=!0),this.loop===!1)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");if(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete")}else if(this.currentRawFrame<0)return this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1?(this.currentRawFrame=0,this.gotoFrame(),this.pause(),void this.trigger("complete")):(this.trigger("loopComplete"),this.currentRawFrame=this.totalFrames+this.currentRawFrame,void this.gotoFrame());if(e){var s=this.currentRawFrame%this.totalFrames;this.adjustSegment(this.segments.shift()),this.currentRawFrame=s}else this.currentRawFrame=this.currentRawFrame%this.totalFrames;this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;s>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames))},AnimationItem.prototype.addEventListener=_addEventListener,AnimationItem.prototype.removeEventListener=_removeEventListener,AnimationItem.prototype.triggerEvent=_triggerEvent,function(t){function e(t){animationManager.play(t)}function s(t){animationManager.pause(t)}function i(t){animationManager.togglePause(t)}function a(t,e){animationManager.setSpeed(t,e)}function r(t,e){animationManager.setDirection(t,e)}function n(t){animationManager.stop(t)}function o(t){animationManager.moveFrame(t)}function h(){E===!0?animationManager.searchAnimations(P,E,S):animationManager.searchAnimations()}function l(t){return animationManager.registerAnimation(t)}function p(){animationManager.resize()}function m(){animationManager.start()}function f(t,e,s){animationManager.goToAndStop(t,e,s)}function d(t){subframeEnabled=t}function c(t){return E===!0&&(t.animationData=JSON.parse(P)),animationManager.loadAnimation(t)}function u(t){return animationManager.destroy(t)}function y(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(defaultCurveSegments>=50?!1:!0)}function v(){"complete"===document.readyState&&(clearInterval(D),h())}function g(t){for(var e=x.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var b={};b.play=e,b.pause=s,b.togglePause=i,b.setSpeed=a,b.setDirection=r,b.stop=n,b.moveFrame=o,b.searchAnimations=h,b.registerAnimation=l,b.loadAnimation=c,b.setSubframeRendering=d,b.resize=p,b.start=m,b.goToAndStop=f,b.destroy=u,b.setQuality=y,b.version="3.1.7",b.checkReady=v,t.bodymovin=b;var E="__[STANDALONE]__",P="__[ANIMATIONDATA]__",S="";if(E){var C=document.getElementsByTagName("script"),k=C.length-1,w=C[k],x=w.src.replace(/^[^\?]+\??/,"");S=g("renderer")}var D=setInterval(v,100)}(window);}(window));
\ No newline at end of file
diff --git a/extension/assets/player/bm.js b/extension/assets/player/bm.js
index 06ad61d..855bee8 100644
--- a/extension/assets/player/bm.js
+++ b/extension/assets/player/bm.js
@@ -1,4 +1,5 @@
-(function(window){function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,s,i,a,r){return t.reset().translate(a,r).rotate(e).scale(s,i).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 roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.verticalAlign="top",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="hidden",styleUnselectableDiv(t)}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=0>i?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,s,i){this.type=t,this.currentLoop=e,this.totalLoops=s,this.direction=0>i?-1:1}function BMSegmentStartEvent(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}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,i=this._cbs[t].length;i>s;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=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,i=0;s>i;i++)this._cbs[t][i](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}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,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.props=r}function iterateDynamicProperties(t){var e,s=this.dynamicProperties;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)}function createElement(t,e,s){if(!e){var i=Object.create(t.prototype,s),a={};return i&&"[object Function]"===a.toString.call(i.init)&&i.init(),i}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.parent=t.prototype}function bezFunction(){function t(t,e,s,i,a,r){return bm_abs((s-t)*(r-e)-(a-t)*(i-e))<1e-5}function e(t,e,s,i,a){if(a||(a=("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p")),o[a])return o[a];var r,n,h,l,m,p;return o[a]=function(a,o,f,d,c){var u=o/c;a=u;for(var v,y=0;++y<20&&(h=3*t,n=3*(s-t)-h,r=1-h-n,v=a*(h+a*(n+a*r))-u,!(bm_abs(v)<.001));)a-=v/(h+a*(2*n+3*r*a));p=3*e,m=3*(i-e)-p,l=1-p-m;var g=a*(p+a*(m+a*l));return d*g+f},o[a]}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var s=e.segments,i=s.length,a=bm_floor((i-1)*t),r=t*e.addedLength,n=0;if(r==s[a].l)return s[a].p;for(var o=s[a].l>r?-1:1,h=!0;h;)s[a].l<=r&&s[a+1].l>r?(n=(r-s[a].l)/(s[a+1].l-s[a].l),h=!1):a+=o,(0>a||a>=i-1)&&(h=!1);return s[a].p+(s[a+1].p-s[a].p)*n}function r(){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,i,n,o,h){var l=new r;n=0>n?0:n;var m=a(n,h);o=o>1?1:o;var p,f=a(o,h),d=t.length,c=1-m,u=1-f;for(p=0;d>p;p+=1)l.pt1[p]=c*c*c*t[p]+(m*c*c+c*m*c+c*c*m)*s[p]+(m*m*c+c*m*m+m*c*m)*i[p]+m*m*m*e[p],l.pt3[p]=c*c*u*t[p]+(m*c*u+c*m*u+c*c*f)*s[p]+(m*m*u+c*m*f+m*c*f)*i[p]+m*m*f*e[p],l.pt4[p]=c*u*u*t[p]+(m*u*u+c*f*u+c*u*f)*s[p]+(m*f*u+c*f*f+m*u*f)*i[p]+m*f*f*e[p],l.pt2[p]=u*u*u*t[p]+(f*u*u+u*f*u+u*u*f)*s[p]+(f*f*u+u*f*f+f*u*f)*i[p]+f*f*f*e[p];return l}var o=[],h=(Math,function(){function e(t,e){this.l=t,this.p=e}var s={};return function(i,a,r,n){var o=(i.join("_")+"_"+a.join("_")+"_"+r.join("_")+"_"+n.join("_")).replace(/\./g,"p");if(s[o])return s[o];var h,l,m,p,f,d,c=defaultCurveSegments,u=0,v=[],y=[],g={addedLength:0,segments:[]};for((i[0]!=a[0]||i[1]!=a[1])&&t(i[0],i[1],a[0],a[1],r[0],r[1])&&t(i[0],i[1],a[0],a[1],n[0],n[1])&&(c=2),m=r.length,h=0;c>h;h+=1){for(f=h/(c-1),d=0,l=0;m>l;l+=1)p=bm_pow(1-f,3)*i[l]+3*bm_pow(1-f,2)*f*r[l]+3*(1-f)*bm_pow(f,2)*n[l]+bm_pow(f,3)*a[l],v[l]=p,null!==y[l]&&(d+=bm_pow(v[l]-y[l],2)),y[l]=v[l];d&&(d=bm_sqrt(d),u+=d),g.segments.push(new e(u,f))}return g.addedLength=u,s[o]=g,g}}()),l=function(){var e={};return function(a){var r=a.s,n=a.e,o=a.to,h=a.ti,l=(r.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(a.bezierData=e[l]);var m,p,f,d,c,u,v,y=defaultCurveSegments,g=0,b=null;(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+o[0],r[1]+o[1])&&t(r[0],r[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(y=2);var E=new s(y);for(f=o.length,m=0;y>m;m+=1){for(v=new Array(f),c=m/(y-1),u=0,p=0;f>p;p+=1)d=bm_pow(1-c,3)*r[p]+3*bm_pow(1-c,2)*c*(r[p]+o[p])+3*(1-c)*bm_pow(c,2)*(n[p]+h[p])+bm_pow(c,3)*n[p],v[p]=d,null!==b&&(u+=bm_pow(v[p]-b[p],2));u=bm_sqrt(u),g+=u,E.points[m]=new i(u,v),b=v}E.segmentLength=g,a.bezierData=E,e[l]=E}}();return{getEasingCurve:e,getBezierLength:h,getNewSegment:n,buildBezierData:l}}function dataFunctionManager(){function t(a,n,o){var h,l,m,p,f,d,c,u,v=a.length;for(p=0;v>p;p+=1)if(h=a[p],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(a[p-1].td=h.tt),l=[],m=-1,h.hasMask){var y=h.masksProperties;for(d=y.length,f=0;d>f;f+=1)if(y[f].pt.i)i(y[f].pt);else for(u=y[f].pt.length,c=0;u>c;c+=1)y[f].pt[c].s&&i(y[f].pt[c].s[0]),y[f].pt[c].e&&i(y[f].pt[c].e[0])}0===h.ty?(h.layers=e(h.refId,n),t(h.layers,n,o)):4===h.ty?s(h.shapes):5==h.ty&&r(h,o)}}function e(t,e){for(var s=0,i=e.length;i>s;){if(e[s].id===t)return JSON.parse(JSON.stringify(e[s].layers));s+=1}}function s(t,e){var a,r,n,o=t.length,h=e?e:!1;for(a=o-1;a>=0;a-=1)if("tm"==t[a].ty&&(h=!0),"sh"==t[a].ty)if(t[a].trimmed=h,t[a].ks.i)i(t[a].ks);else for(n=t[a].ks.length,r=0;n>r;r+=1)t[a].ks[r].s&&i(t[a].ks[r].s[0]),t[a].ks[r].e&&i(t[a].ks[r].e[0]);else"gr"==t[a].ty&&s(t[a].it,h)}function i(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 a(e,s){t(e.layers,e.assets,s)}function r(t,e){var s,i,a,r,o,h,l,m,p=[],f=t.t.d,d=0,c=t.t.m.g,u=0,v=0,y=0,g=[],b=0,E=0,C=e.getFontByName(f.f),w=C.fStyle.split(" "),S="normal",P="normal";for(i=w.length,s=0;i>s;s+=1)"italic"===w[s].toLowerCase()?P="italic":"bold"===w[s].toLowerCase()?S="700":"black"===w[s].toLowerCase()?S="900":"medium"===w[s].toLowerCase()?S="500":"regular"===w[s].toLowerCase()||"normal"===w[s].toLowerCase()?S="400":("light"===w[s].toLowerCase()||"thin"===w[s].toLowerCase())&&(S="200");for(f.fWeight=S,f.fStyle=P,i=f.t.length,s=0;i>s;s+=1)if(a=!1," "===f.t.charAt(s)?r=" ":13===f.t.charCodeAt(s)?(g.push(b),E=b>E?b:E,b=0,r="",a=!0,y+=1):r=f.t.charAt(s),e.chars?(l=e.getCharData(f.t.charAt(s),C.fStyle,e.getFontByName(f.f).fFamily),m=a?0:l.w*f.s/100):(n.font=f.s+"px "+e.getFontByName(f.f).fFamily,m=n.measureText(r).width),b+=m,p.push({l:m,an:m,add:u,n:a,anIndexes:[],val:r,line:y}),2==c){if(u+=m,""==r||" "==r||s==i-1){for((""==r||" "==r)&&(u-=m);s>=v;)p[v].an=u,p[v].ind=d,p[v].extra=m,v+=1;d+=1,u=0}}else if(3==c){if(u+=m,""==r||s==i-1){for(""==r&&(u-=m);s>=v;)p[v].an=u,p[v].ind=d,p[v].extra=m,v+=1;u=0,d+=1}}else p[d].ind=d,p[d].extra=0,d+=1;switch(f.l=p,E=b>E?b:E,g.push(b),f.boxWidth=E,f.lineWidths=g,f.j){case 1:t.t.d.justifyOffset=-f.boxWidth;break;case 2:t.t.d.justifyOffset=-f.boxWidth/2;break;default:t.t.d.justifyOffset=0}var D=t.t.a;h=D.length;var I,F,T=[];for(o=0;h>o;o+=1){for(D[o].a.sc&&(f.strokeColorAnim=!0),D[o].a.sw&&(f.strokeWidthAnim=!0),D[o].a.fc&&(f.fillColorAnim=!0),F=0,I=D[o].s.b,s=0;i>s;s+=1)p[s].anIndexes[o]=F,(1==I&&""!=p[s].val||2==I&&""!=p[s].val&&" "!=p[s].val||3==I&&(p[s].n||" "==p[s].val||s==i-1)||4==I&&(p[s].n||s==i-1))&&(1===D[o].s.rn&&T.push(F),F+=1);t.t.a[o].totalChars=F;var A,M=-1;if(1===D[o].s.rn)for(s=0;i>s;s+=1)M!=p[s].anIndexes[o]&&(M=p[s].anIndexes[o],A=T.splice(Math.floor(Math.random()*T.length),1)[0]),p[s].anIndexes[o]=A}0!==h||"m"in t.t.p||(t.singleShape=!0),f.yOffset=1.2*f.s}var n=document.createElement("canvas").getContext("2d"),o={};return o.completeData=a,o}function SVGRenderer(t){this.animationItem=t,this.layers=null,this.lastFrame=-1,this.globalData={frameNum:-1},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.lastFrame=-1,this.globalData={frameNum:-1},this.contextData={saved:new Array(15),savedOp:new Array(15),cArrPos:0,cTr:new Matrix,cO:1};var s,i=15;for(s=0;i>s;s+=1)this.contextData.saved[s]=new Array(6);this.elements=[]}function MaskElement(t,e,s){this.dynamicProperties=[],this.data=t,this.element=e,this.globalData=s,this.paths=[],this.masksProperties=this.data.masksProperties,this.viewData=new Array(this.masksProperties.length),this.maskElement=null,this.firstFrame=!0;var i,a,r,n,o,h=this.element.maskedElement,l=this.globalData.defs,m=this.masksProperties.length,p=this.data.masksProperties,f=0,d=[],c=randomString(10),u="clipPath",v="clip-path";for(i=0;m>i;i++)if(("a"!==p[i].mode&&"n"!==p[i].mode||p[i].inv)&&(u="mask",v="mask"),"s"!=p[i].mode&&"i"!=p[i].mode||0!=f||(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%"),d.push(o)),"n"!=p[i].mode){if(f+=1,a=document.createElementNS(svgNS,"path"),p[i].cl?"s"==p[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"):(a.setAttribute("fill","none"),"s"==p[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"),a.setAttribute("stroke-width","1"),a.setAttribute("stroke-miterlimit","10")),a.setAttribute("clip-rule","nonzero"),"i"==p[i].mode){n=d.length;var y=document.createElementNS(svgNS,"g");for(r=0;n>r;r+=1)y.appendChild(d[r]);var g=document.createElementNS(svgNS,"mask");g.setAttribute("mask-type","alpha"),g.setAttribute("id",c+"_"+f),g.appendChild(a),l.appendChild(g),y.setAttribute("mask","url(#"+c+"_"+f+")"),d.length=0,d.push(y)}else d.push(a);p[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",prop:PropertyFactory.getShapeProp(this.data,p[i],3,this.dynamicProperties)},this.viewData[i].prop.k||this.drawPath(p[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={prop:PropertyFactory.getShapeProp(this.data,p[i],3,this.dynamicProperties)};for(this.maskElement=document.createElementNS(svgNS,u),m=d.length,i=0;m>i;i+=1)this.maskElement.appendChild(d[i]);this.maskElement.setAttribute("id",c),f>0&&h.setAttribute(v,"url(#"+c+")"),l.appendChild(this.maskElement)}function BaseElement(){}function SVGBaseElement(t,e,s,i){this.globalData=s,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,i){}function SVGTextElement(t,e,s,i){this.textSpans=[],this.renderType="svg",this.parent.constructor.call(this,t,e,s,i)}function ICompElement(t,e,s,i){this.parent.constructor.call(this,t,e,s,i),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,s.frameRate,this.dynamicProperties))}function IImageElement(t,e,s,i){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this.parent.constructor.call(this,t,e,s,i)}function IShapeElement(t,e,s,i){this.shapes=[],this.parent.constructor.call(this,t,e,s,i)}function ShapeItemElement(t,e,s,i,a,r){this.shape=e,this.parentContainer=s,this.placeholder=i,this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=r,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,a,[]),styleUnselectableDiv(this.shape)}function ISolidElement(t,e,s,i){this.parent.constructor.call(this,t,e,s,i)}function CVBaseElement(t,e){this.globalData=e,this.data=t,this.canvasContext=e.canvasContext,this.init()}function CVCompElement(t,e){this.parent.constructor.call(this,t,e),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,e.frameRate,this.dynamicProperties))}function CVImageElement(t,e){this.animationItem=e.renderer.animationItem,this.assetData=this.animationItem.getAssetData(t.refId),this.path=this.animationItem.getPath(),this.parent.constructor.call(this,t,e),this.animationItem.pendingElements+=1}function CVMaskElement(t,e,s){this.data=t,this.element=e,this.globalData=s,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.ctx=this.element.canvasContext,this.viewData=new Array(this.masksProperties.length);var i,a=this.masksProperties.length;for(i=0;a>i;i++)this.viewData[i]=PropertyFactory.getShapeProp(this.data,this.masksProperties[i],3,this.dynamicProperties)}function CVShapeElement(t,e){this.shapes=[],this.parent.constructor.call(this,t,e)}function CVShapeItemElement(t,e,s){this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=s,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,e,[])}function CVSolidElement(t,e){this.parent.constructor.call(this,t,e)}function CVTextElement(t,e){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.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.parent.constructor.call(this,t,e),this.renderedLetters=[]}var svgNS="http://www.w3.org/2000/svg",Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=1,this.props[4]=0,this.props[5]=0,this}function e(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,s,-s,e,0,0)}function s(t,e){return 1==t&&1==e?this:this._t(t,0,0,e,0,0)}function i(t,e,s,i,a,r){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this}function a(t,e){return(0!==t||0!==e)&&(this.props[4]=this.props[0]*t+this.props[2]*e+this.props[4],this.props[5]=this.props[1]*t+this.props[3]*e+this.props[5]),this}function r(t,e,s,i,a,r){var n=this.props[0],o=this.props[1],h=this.props[2],l=this.props[3],m=this.props[4],p=this.props[5];return 1===t&&0===e&&0===s&&1===i?((0!==a||0!==r)&&(this.props[4]=this.props[0]*a+this.props[2]*r+this.props[4],this.props[5]=this.props[1]*a+this.props[3]*r+this.props[5]),this):(this.props[0]=n*t+h*e,this.props[1]=o*t+l*e,this.props[2]=n*s+h*i,this.props[3]=o*s+l*i,this.props[4]=n*a+h*r+m,this.props[5]=o*a+l*r+p,this)}function n(t,e){return{x:t*this.props[0]+e*this.props[2]+this.props[4],y:t*this.props[1]+e*this.props[3]+this.props[5]}}function o(t,e){return t*this.props[0]+e*this.props[2]+this.props[4]}function h(t,e){return t*this.props[1]+e*this.props[3]+this.props[5]}function l(t,e){return[t*this.props[0]+e*this.props[2]+this.props[4],t*this.props[1]+e*this.props[3]+this.props[5]]}function m(t,e){return bm_rnd(t*this.props[0]+e*this.props[2]+this.props[4])+","+bm_rnd(t*this.props[1]+e*this.props[3]+this.props[5])}function p(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5]]}function f(){return this.cssParts[1]=this.props.join(","),this.cssParts.join("")}function d(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.scale=s,this.setTransform=i,this.translate=a,this.transform=r,this.applyToPoint=n,this.applyToX=o,this.applyToY=h,this.applyToPointArray=l,this.applyToPointStringified=m,this.toArray=p,this.toCSS=f,this.toString=d,this._t=this.transform,this.props=[1,0,0,1,0,0],this.cssParts=["matrix(","",")"]}}(),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 i=(new Date).getTime(),a=Math.max(0,16-(i-t)),r=window.setTimeout(function(){e(i+a)},a);return t=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var subframeEnabled=!0,cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_min=Math.min,defaultCurveSegments=50,degToRads=Math.PI/180;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,i){return 0>t&&(t=0),0>e&&(e=0),0>i&&(i=0),"#"+s[t]+s[e]+s[i]}}(),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]]}}(),bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var s=document.createElement("span");s.style.fontFamily=e;var i=document.createElement("span");i.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(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function e(){var t,s,i,a=this.fonts.length,r=a;for(t=0;a>t;t+=1)this.fonts[t].loaded?r-=1:(s=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,s.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(s=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,s.offsetWidth!==i&&(r-=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!==r&&Date.now()-this.initTime<o?setTimeout(e.bind(this),20):this.loaded=!0}function s(){if(window.Typekit&&window.Typekit.load)try{Typekit.load({async:!1})}catch(t){console.log("errwor",t)}else setTimeout(s,50)}function i(i,a){if(!i)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=i.list);if(i.tk){var r=document.createElement("script");r.setAttribute("src",i.tk),a.appendChild(r),s()}var n,o=i.list,h=o.length;for(n=0;h>n;n+=1){if(o[n].loaded=!1,o[n].monoCase=t(o[n].fFamily,"monospace"),o[n].sansCase=t(o[n].fFamily,"sans-serif"),o[n].fPath&&o[n].fPath){var r=document.createElement("style");r.type="text/css",r.innerHTML="@font-face {font-family: "+o[n].fFamily+"; font-style: normal; src: url('"+o[n].fPath+"');}",a.appendChild(r)}this.fonts.push(o[n])}e.bind(this)()}function a(t){this.chars=t}function r(t,e,s){for(var i=0,a=this.chars.length;a>i;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}}function n(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 o=5e3,h=function(){this.fonts=[],this.chars=null,this.loaded=!1,this.initTime=Date.now()};return h.prototype.addChars=a,h.prototype.addFonts=i,h.prototype.getCharData=r,h.prototype.getFontByName=n,h}(),PropertyFactory=function(){function t(t){if(this.mdf=!1,this.lastFrame!==p&&(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,i=0,a=this.keyframes.length-1,r=1,n=!0;!(!n||(e=this.keyframes[i],s=this.keyframes[i+1],i==a-1&&t>=s.t-this.offsetTime)||s.t-this.offsetTime>t);)a-1>i?i+=r:n=!1;var o,h,l,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.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o])}else{e.__fnct?f=e.__fnct:(f=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y,e.n),e.__fnct=f),l=f("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime));var v,y=c.segmentLength*l,g=0;for(r=1,n=!0,m=c.points.length;n;){if(g+=c.points[d].partialLength*r,0===y||0===l||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.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o]);break}if(y>g&&y<g+c.points[d+1].partialLength){for(v=(y-g)/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])*v)*this.mult:c.points[d].point[o]+(c.points[d+1].point[o]-c.points[d].point[o])*v,this.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o]);break}m-1>d&&1==r||d>0&&-1==r?d+=r:n=!1}}}else{var b,E,C,w,S,P=!1;for(a=e.s.length,i=0;a>i;i+=1)1!==e.h&&(e.o.x instanceof Array?(P=!0,e.__fnct||(e.__fnct=[]),e.__fnct[i]||(b=e.o.x[i]?e.o.x[i]:e.o.x[0],E=e.o.y[i]?e.o.y[i]:e.o.y[0],C=e.i.x[i]?e.i.x[i]:e.i.x[0],w=e.i.y[i]?e.i.y[i]:e.i.y[0])):(P=!1,e.__fnct||(b=e.o.x,E=e.o.y,C=e.i.x,w=e.i.y)),P?e.__fnct[i]?f=e.__fnct[i]:(f=bez.getEasingCurve(b,E,C,w),e.__fnct[i]=f):e.__fnct?f=e.__fnct:(f=bez.getEasingCurve(b,E,C,w),e.__fnct=f),l=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:f("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))),S=1===e.h?e.s[i]:e.s[i]+(e.e[i]-e.s[i])*l,1===a?(this.v=this.mult?S*this.mult:S,this.lastValue!=this.v&&(this.mdf=!0,this.lastValue=this.v)):(this.v[i]=this.mult?S*this.mult:S,this.lastValue[i]!==this.v[i]&&(this.mdf=!0,this.lastValue[i]=this.v[i]))}}this.lastFrame=t}function e(t){if(this.mdf=!1,this.lastFrame!==p&&(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 if(t<this.keyframes[0].t-this.offsetTime)this.mdf=!0,this.v=this.keyframes[0].s[0];else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)this.mdf=!0,this.v=1===this.keyframes[this.keyframes.length-2].h?this.keyframes[this.keyframes.length-2].s[0]:this.keyframes[this.keyframes.length-2].e[0];else{this.mdf=!0;for(var e,s,i,a,r,n,o=0,h=this.keyframes.length-1,l=1,m=!0;m&&(e=this.keyframes[o],s=this.keyframes[o+1],!(s.t-this.offsetTime>t&&1==l));)h-1>o&&1==l||o>0&&-1==l?o+=l:m=!1;var f;if(1!==e.h){var d;e.__fnct?d=e.__fnct:(d=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y),e.__fnct=d),f=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:d("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))}for(a=this.shapeData.i.length,n=e.s[0].i[0].length,i=0;a>i;i+=1)for(r=0;n>r;r+=1)1===e.h?(this.shapeData.i[i][r]=e.s[0].i[i][r],this.shapeData.o[i][r]=e.s[0].o[i][r],this.shapeData.v[i][r]=e.s[0].v[i][r]):(this.shapeData.i[i][r]=e.s[0].i[i][r]+(e.e[0].i[i][r]-e.s[0].i[i][r])*f,this.shapeData.o[i][r]=e.s[0].o[i][r]+(e.e[0].o[i][r]-e.s[0].o[i][r])*f,this.shapeData.v[i][r]=e.s[0].v[i][r]+(e.e[0].v[i][r]-e.s[0].v[i][r])*f);this.v=this.shapeData}this.lastFrame=t}function s(t,e){e=e?e:1,this.v=t*e,this.mdf=!1,this.k=!1}function i(t,e){if(e){var s,i=t.length;for(s=0;i>s;s+=1)t[s]*=e}this.v=t,this.mdf=!1,this.k=!1}function a(e,s,i){this.keyframes=s,this.offsetTime=e.st,this.lastValue=-99999,this.k=!0,this.mult=i,this.lastFrame=p,this.getInterpolatedValue=t}function r(e,s,i){this.keyframes=s,this.offsetTime=e.st,this.k=!0,this.mult=i,this.getInterpolatedValue=t,this.v=new Array(s[0].s.length),this.lastValue=new Array(s[0].s.length),this.lastFrame=p}function n(t,e,n,o,h){if(2===n)return new f(t,e,h);if(7===n)return new u(t,e,h);if(e.length){if("number"==typeof e[0])return new i(e,o);switch(n){case 0:h.push(new a(t,e,o));break;case 1:h.push(new r(t,e,o))}return h[h.length-1]}return new s(e,o)}function o(t,e){this.k=!1,this.mdf=!1,this.closed=3===e?t.cl:t.closed,this.shapeData=t.ks,this.v=3===e?t.pt:t.ks}function h(t,s,i,a){this.offsetTime=t.st,this.getInterpolatedValue=e,this.keyframes=3===a?s.pt:s.ks,this.k=!0,this.closed=3===a?s.cl:s.closed;var r,n=this.keyframes[0].s[0].i.length,o=this.keyframes[0].s[0].i[0].length;for(this.shapeData={i:new Array(n),o:new Array(n),v:new Array(n)},r=0;n>r;r+=1)this.shapeData.i[r]=new Array(o),this.shapeData.o[r]=new Array(o),this.shapeData.v[r]=new Array(o);this.lastFrame=p,i.push(this)}function l(t,e,s,i,a){var r;if(3===s||4===s){var n=3===s?e.pt:e.ks;r=n.length?new h(t,e,i,s):new o(e,s,i)}else 5===s?r=new c(t,e,i):6===s&&(r=new d(t,e,i));var l=!1;if(a)for(var m=0,p=a.length;p>m;){if(!a[m].closed){l=!0;break}m+=1}return l?new v(r,a,i):r}function m(t,e,s){return new y(t,e,s)}var p=-999999,f=function(){function t(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.v.reset().translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1])}return function(e,n,o){this.dynamicProperties=[],this.mdf=!1,this.getInterpolatedValue=t,"number"==typeof n.a[0]?this.a=new i(n.a):(this.a=new r(e,n.a,0),this.dynamicProperties.push(this.a)),"number"==typeof n.p[0]?this.p=new i(n.p):(this.p=new r(e,n.p,0),this.dynamicProperties.push(this.p)),"number"==typeof n.s[0]?this.s=new i(n.s,.01):(this.s=new r(e,n.s,.01),this.dynamicProperties.push(this.s)),n.r.length?(this.r=new a(e,n.r,degToRads),this.dynamicProperties.push(this.r)):this.r=new s(n.r,degToRads),this.dynamicProperties.length?(o.push(this),this.v=new Matrix):this.v=(new Matrix).translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1])}}(),d=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-a],this.v.i[0]=[t-i*s,e-a],this.v.o[0]=[t+i*s,e-a],this.v.v[1]=[t+i,e],this.v.i[1]=[t+i,e-a*s],this.v.o[1]=[t+i,e+a*s],this.v.v[2]=[t,e+a],this.v.i[2]=[t+i*s,e+a],this.v.o[2]=[t-i*s,e+a],this.v.v[3]=[t-i,e],this.v.i[3]=[t-i,e+a*s],this.v.o[3]=[t-i,e-a*s]):(this.v.v[0]=[t,e-a],this.v.o[0]=[t-i*s,e-a],this.v.i[0]=[t+i*s,e-a],this.v.v[1]=[t-i,e],this.v.o[1]=[t-i,e+a*s],this.v.i[1]=[t-i,e-a*s],this.v.v[2]=[t,e+a],this.v.o[2]=[t+i*s,e+a],this.v.i[2]=[t-i*s,e+a],this.v.v[3]=[t+i,e],this.v.o[3]=[t+i,e-a*s],this.v.i[3]=[t+i,e+a*s])}function e(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.convertEllToPath()}var s=.5519;return function(s,a,n){this.v={v:new Array(4),i:new Array(4),o:new Array(4),c:!0},this.d=a.d,this.dynamicProperties=[],a.closed=!0,this.closed=!0,this.mdf=!1,this.getInterpolatedValue=e,this.convertEllToPath=t,"number"==typeof a.p[0]?this.p=new i(a.p):(this.p=new r(s,a.p,0),this.dynamicProperties.push(this.p)),"number"==typeof a.s[0]?this.s=new i(a.s):(this.s=new r(s,a.s,0),this.dynamicProperties.push(this.s)),this.dynamicProperties.length?n.push(this):this.convertEllToPath()}}(),c=function(){function t(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(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,i=this.s.v[1]/2,a=bm_min(s,i,this.r.v),r=a*(1-.5519);2===this.d||1===this.d?(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+s,e-i+r],this.v.v[1]=[t+s,e+i-a],this.v.o[1]=[t+s,e+i-r],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+s-a,e+i],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+s-r,e+i],this.v.v[3]=[t-s+a,e+i],this.v.o[3]=[t-s+r,e+i],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-s,e+i-r],this.v.v[5]=[t-s,e-i+a],this.v.o[5]=[t-s,e-i+r],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-s+a,e-i],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-s+r,e-i],this.v.v[7]=[t+s-a,e-i],this.v.o[7]=[t+s-r,e-i],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=[t+s,e-i+r],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+s-a,e-i],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+s-r,e-i],this.v.v[2]=[t-s+a,e-i],this.v.o[2]=[t-s+r,e-i],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-s,e-i+a],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-s,e-i+r],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=[t-s,e+i-r],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-s+a,e+i],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-s+r,e+i],this.v.v[6]=[t+s-a,e+i],this.v.o[6]=[t+s-r,e+i],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+s,e+i-a],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+s,e+i-r])}return function(n,o,h){this.v={v:new Array(8),i:new Array(8),o:new Array(8),c:!0},this.d=o.d,this.dynamicProperties=[],this.mdf=!1,o.closed=!0,this.closed=!0,this.getInterpolatedValue=t,this.convertRectToPath=e,"number"==typeof o.p[0]?this.p=new i(o.p):(this.p=new r(n,o.p,0),this.dynamicProperties.push(this.p)),"number"==typeof o.s[0]?this.s=new i(o.s):(this.s=new r(n,o.s,0),this.dynamicProperties.push(this.s)),o.r.length?(this.r=new a(n,o.r,0),this.dynamicProperties.push(this.r)):this.r=new s(o.r,degToRads),this.dynamicProperties.length?h.push(this):this.convertRectToPath()}}(),u=function(){function t(t,e){var s,i=this.dynamicProperties.length;for(this.mdf=!1,s=0;i>s;s+=1)this.dynamicProperties[s].getInterpolatedValue(t),this.dynamicProperties[s].mdf&&(this.mdf=!0);if(this.mdf||e){var a=this.o.v%360/360;if(0===a&&0===this.s.v&&1==this.e.v)return void(this.isTrimming=!1);this.isTrimming=!0,0>a&&(a+=1);var r=this.s.v+a,n=this.e.v+a;if(r>n){var o=r;r=n,n=o}this.sValue=r,this.eValue=n,this.oValue=a}}return function(e,i,r){this.dynamicProperties=[],this.sValue=0,this.eValue=0,this.oValue=0,this.mdf=!1,this.getInterpolatedValue=t,this.k=!1,this.isTrimming=!1,i.s.length?(this.s=new a(e,i.s,.01),this.dynamicProperties.push(this.s)):this.s=new s(i.s,.01),i.e.length?(this.e=new a(e,i.e,.01),this.dynamicProperties.push(this.e)):this.e=new s(i.e,.01),i.o.length?(this.o=new a(e,i.o,0),this.dynamicProperties.push(this.o)):this.o=new s(i.o,0),this.dynamicProperties.length?(r.push(this),this.k=!0):this.getInterpolatedValue(0,!0)}}(),v=function(){function t(t,e){this.totalLength=0;var s,i=t.v,a=t.o,r=t.i,n=i.length;for(s=0;n-1>s;s+=1)this.lengths[s]=bez.getBezierLength(i[s],i[s+1],a[s],r[s+1]),this.totalLength+=this.lengths[s].addedLength;e&&(this.lengths[s]=bez.getBezierLength(i[s],i[0],a[s],r[0]),this.totalLength+=this.lengths[s].addedLength)}function e(t,e,s,i,a){this.nextO[this.segmentCount]=e,this.nextI[this.segmentCount+1]=s,this.nextV[this.segmentCount+1]=i,this.pathStarted?this.nextV[this.segmentCount]=t:(this.pathStarted=!0,this.v.s[this.segmentCount]=t),this.segmentCount+=1}function s(t,e){this.mdf=e?!0:!1;var s=0,i=this.trims.length;for(this.pathStarted=!1;i>s;){if(this.trims[s].mdf){this.mdf=!0;break}s+=1}if(this.mdf=this.prop.mdf?!0:this.mdf,this.mdf){this.nextO.length=0,this.nextI.length=0,this.nextV.length=0,this.v.s.length=0;var a=this.prop.closed;this.getSegmentsLength(this.prop.v,a);var r,n,o,h,l,m,p=this.prop.v,f=this.trims.length;for(r=0;f>r;r+=1)if(this.trims[r].isTrimming){if(n=this.trims[r].eValue,o=this.trims[r].sValue,h=this.trims[r].oValue,n===o)return this.v.v=this.nextV,this.v.o=this.nextO,
-void(this.v.i=this.nextI);1>=n?(this.segments[0].s=this.totalLength*o,this.segments[0].e=this.totalLength*n,this.segments[1].vl=!1):o>=1?(this.segments[0].s=this.totalLength*(o-1),this.segments[0].e=this.totalLength*(n-1),this.segments[1].vl=!1):(this.segments[0].s=this.totalLength*o,this.segments[0].e=this.totalLength,this.segments[1].s=0,this.segments[1].e=this.totalLength*(n-1),this.segments[1].vl=!0),this.v.v=p.v,this.v.o=p.o,this.v.i=p.i,m=this.v.v.length;var d=0,c=0;i=this.segments[1].vl?2:1;var u;for(this.segmentCount=0,s=0;i>s;s+=1){for(d=0,l=1;m>l;l++)if(c=this.lengths[l-1].addedLength,d+c<this.segments[s].s)d+=c;else{if(d>this.segments[s].e)break;this.segments[s].s<=d&&this.segments[s].e>=d+c?this.addSegment(this.v.v[l-1],this.v.o[l-1],this.v.i[l],this.v.v[l],this.lengths[l-1]):(u=bez.getNewSegment(this.v.v[l-1],this.v.v[l],this.v.o[l-1],this.v.i[l],(this.segments[s].s-d)/c,(this.segments[s].e-d)/c,this.lengths[l-1]),this.addSegment(u.pt1,u.pt3,u.pt4,u.pt2)),d+=c}a!==!1?d<=this.segments[s].e&&(c=this.lengths[l-1].addedLength,this.segments[s].s<=d&&this.segments[s].e>=d+c?this.addSegment(this.v.v[l-1],this.v.o[l-1],this.v.i[0],this.v.v[0],this.lengths[l-1]):(u=bez.getNewSegment(this.v.v[l-1],this.v.v[0],this.v.o[l-1],this.v.i[0],(this.segments[s].s-d)/c,(this.segments[s].e-d)/c,this.lengths[l-1]),this.addSegment(u.pt1,u.pt3,u.pt4,u.pt2))):this.pathStarted=!1}a=!1}else this.v.v=p.v,this.v.o=p.o,this.v.i=p.i;this.nextV.length?(this.v.v=this.nextV,this.v.o=this.nextO,this.v.i=this.nextI):this.v.s.length=0,this.v.c=a}}return function(i,a,r){this.trims=[],this.k=!1,this.mdf=!1,this.pathStarted=!1,this.segments=[{s:0,e:0,vl:!0},{s:0,e:0,vl:!1}],this.nextO=[],this.nextV=[],this.nextI=[],this.v={i:null,o:null,v:null,s:[],c:!1};var n,o=a.length;for(n=0;o>n;n+=1)a[n].closed||(this.k=a[n].trimProp.k?!0:this.k,this.trims.push(a[n].trimProp));this.prop=i,o=this.prop.shapeData.v.length-1,o+=this.prop.closed?1:0,this.lengths=new Array(o),this.k=i.k?!0:this.k,this.totalLength=0,this.getInterpolatedValue=s,this.addSegment=e,this.getSegmentsLength=t,this.k?r.push(this):this.getInterpolatedValue(0,!0)}}(),y=function(){function t(t,e){var s=0,i=this.dataProps.length;for(this.mdf=e?!0:!1;i>s;){if(this.dataProps[s].p.mdf){this.mdf=!0;break}s+=1}if(this.mdf)for("svg"===this.renderer&&(this.dasharray=""),s=0;i>s;s+=1)"o"!=this.dataProps[s].n?"svg"===this.renderer?this.dasharray+=" "+this.dataProps[s].p.v:this.dasharray[s]=this.dataProps[s].p.v:this.dashoffset=this.dataProps[s].p.v}return function(e,s,i,a){this.dataProps=new Array(s.length),this.renderer=i,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(s.length-1),this.dashoffset=0;var r,o,h=s.length;for(r=0;h>r;r+=1)o=n(e,s[r].v,0,0,a),this.k=o.k?!0:this.k,this.dataProps[r]={n:s[r].n,p:o};this.getInterpolatedValue=t,this.k?a.push(this):this.getInterpolatedValue(0,!0)}}(),g={};return g.getProp=n,g.getShapeProp=l,g.getDashProp=m,g}();SVGRenderer.prototype.createItem=function(t,e,s){switch(t.ty){case 2:return this.createImage(t,e,s);case 0:return this.createComp(t,e,s);case 1:return this.createSolid(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)}return this.createBase(t,e)},SVGRenderer.prototype.buildItems=function(t,e,s,i){var a,r=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var n;for(a=r-1;a>=0;a--)s[a]=this.createItem(t[a],e,i),0===t[a].ty&&(n=[],this.buildItems(t[a].layers,s[a].getDomElement(),n,i),s[a].setElements(n)),t[a].td&&s[a+1].setMatte(s[a].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)for(r=0;h>r;){if(s[r].data.id==t[i].id){o=s[r],s[r]=this.createItem(t[i],e,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,o),s[r].setElements(n));break}r+=1}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},SVGRenderer.prototype.createBase=function(t,e,s){return new SVGBaseElement(t,e,this.globalData,s)},SVGRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,s){return new IShapeElement(t,e,this.globalData,s)},SVGRenderer.prototype.createText=function(t,e,s){return new SVGTextElement(t,e,this.globalData,s)},SVGRenderer.prototype.createImage=function(t,e,s){return new IImageElement(t,e,this.globalData,s)},SVGRenderer.prototype.createComp=function(t,e,s){return new ICompElement(t,e,this.globalData,s)},SVGRenderer.prototype.createSolid=function(t,e,s){return new ISolidElement(t,e,this.globalData,s)},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","xMidYMid meet"),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.compSize={w:t.w,h:t.h},this.globalData.frameRate=t.fr;var s=document.createElementNS(svgNS,"clipPath"),i=document.createElementNS(svgNS,"rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+randomString(10);s.setAttribute("id",a),s.appendChild(i);var r=document.createElementNS(svgNS,"g");r.setAttribute("clip-path","url(#"+a+")"),this.animationItem.container.appendChild(r),e.appendChild(s),this.animationItem.container=r,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 i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;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.lastFrame!=t&&!this.destroyed){null===t?t=this.lastFrame:this.lastFrame=t,this.globalData.frameNum=t;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()}},CanvasRenderer.prototype.createItem=function(t){switch(t.ty){case 0:return this.createComp(t);case 1:return this.createSolid(t);case 2:return this.createImage(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 99:return this.createPlaceHolder(t);default:return this.createBase(t)}return this.createBase(t,parentContainer)},CanvasRenderer.prototype.buildItems=function(t,e){e||(e=this.elements);var s,i=t.length;for(s=0;i>s;s++)if(e[s]=this.createItem(t[s]),0===t[s].ty){var a=[];this.buildItems(t[s].layers,a),e[e.length-1].setElements(a)}},CanvasRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements);var r,n,o=s.length;for(i=0;a>i;i+=1)for(r=0;o>r;){if(s[r].data.id==t[i].id){s[r]=this.createItem(t[i],e),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,n),s[r].setElements(n));break}r+=1}},CanvasRenderer.prototype.createBase=function(t){return new CVBaseElement(t,this.globalData)},CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData)},CanvasRenderer.prototype.createPlaceHolder=function(t){return new PlaceHolderElement(t,null,this.globalData)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[2]||1!==t[3]||0!==t[4]||0!==t[5]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[2],t[3],t[4],t[5]);this.contextData.cTr.transform(t[0],t[1],t[2],t[3],t[4],t[5]);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])}},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(6));var s,i=6,a=this.contextData.saved[this.contextData.cArrPos];for(s=0;i>s;s+=1)a[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],i=6,a=this.contextData.cTr.props;for(e=0;i>e;e+=1)a[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),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.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.updateContainerSize(),this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document)},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,i=this.transformCanvas.w/this.transformCanvas.h;i>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,this.transformCanvas.sy,this.transformCanvas.tx,this.transformCanvas.ty],this.globalData.cWidth=t,this.globalData.cHeight=e},CanvasRenderer.prototype.buildStage=function(t,e,s){s||(s=this.elements);var i,a,r=e.length;for(i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemHierarchy(a,s[i],e,a.parent,s,!0),0==a.ty&&this.buildStage(null,a.layers,s[i].getElements())},CanvasRenderer.prototype.buildItemHierarchy=function(t,e,s,i,a,r){var n=0,o=s.length;for(r&&e.resetHierarchy();o>n;)s[n].ind===i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemHierarchy(t,e,s,s[n].parent,a,!1)),n+=1},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers.length;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.lastFrame==t&&this.renderConfig.clearCanvas===!0||this.destroyed)){this.lastFrame=t,this.globalData.frameNum=t-this.animationItem.firstFrame,this.renderConfig.clearCanvas===!0?(this.reset(),this.canvasContext.canvas.width=this.canvasContext.canvas.width):this.save(),this.ctxTransform(this.transformCanvas.props),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),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()}},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)},MaskElement.prototype.renderFrame=function(){var t,e=this.data.masksProperties.length;for(t=0;e>t;t++)"n"!==this.data.masksProperties[t].mode&&(this.viewData[t].prop.mdf||this.firstFrame)&&this.drawPath(this.data.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]);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 i,a,r="";for(a=e.v.length,i=1;a>i;i+=1)1==i&&(r+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-1][1])+" "+bm_rnd(e.i[i][0])+","+bm_rnd(e.i[i][1])+" "+bm_rnd(e.v[i][0])+","+bm_rnd(e.v[i][1]);t.cl&&(r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-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!==r&&(t.inv?s.elem.setAttribute("d",this.solidPath+r):s.elem.setAttribute("d",r),s.lastPath=r)},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.paths=null,this.masksProperties=null},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.isVisible=!1);var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t);this.data.hasMask&&this.maskManager.prepareFrame(t),this.currentFrameNum=t},BaseElement.prototype.init=function(){this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.dynamicProperties=[],this.currentFrameNum=-99999,this.lastNum=-99999,this.finalTransform={op:PropertyFactory.getProp(this.data,this.data.ks.o,0,.01,this.dynamicProperties),mProp:PropertyFactory.getProp(this.data,this.data.ks,2,null,this.dynamicProperties),matMdf:!1,opMdf:!1,mat:new Matrix,opacity:1},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.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"),i=randomString(10);s.setAttribute("id",i),s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%");var a=document.createElementNS(svgNS,"feComponentTransfer");a.setAttribute("in","SourceGraphic"),s.appendChild(a);var r=document.createElementNS(svgNS,"feFuncA");r.setAttribute("type","table"),r.setAttribute("tableValues","1.0 0.0"),a.appendChild(r),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(#"+i+")"),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},SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.data.hasMask&&(this.finalTransform.matMdf&&this.layerElement.setAttribute("transform","matrix("+s.props.join(",")+")"),this.finalTransform.opMdf&&this.layerElement.setAttribute("opacity",this.finalTransform.opacity)),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getDomElement=function(){return this.layerElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")},SVGBaseElement.prototype.hide=function(){},ITextElement.prototype.init=function(){this.parent.init.call(this);var t=this.data;this.renderedLetters=[],this.viewData={m:{a:PropertyFactory.getProp(t,t.t.m.a,1,0,this.dynamicProperties)}};var e=this.data.t;if(e.a.length){this.viewData.a=new Array(e.a.length);var s,i,a,r=e.a.length;for(s=0;r>s;s+=1)a=e.a[s],i={a:{},s:{}},"r"in a.a&&(i.a.r=PropertyFactory.getProp(t,a.a.r,0,degToRads,this.dynamicProperties)),"s"in a.a&&(i.a.s=PropertyFactory.getProp(t,a.a.s,1,.01,this.dynamicProperties)),"a"in a.a&&(i.a.a=PropertyFactory.getProp(t,a.a.a,1,0,this.dynamicProperties)),"o"in a.a&&(i.a.o=PropertyFactory.getProp(t,a.a.o,0,.01,this.dynamicProperties)),"p"in a.a&&(i.a.p=PropertyFactory.getProp(t,a.a.p,1,0,this.dynamicProperties)),"sw"in a.a&&(i.a.sw=PropertyFactory.getProp(t,a.a.sw,0,0,this.dynamicProperties)),"sc"in a.a&&(i.a.sc=PropertyFactory.getProp(t,a.a.sc,1,0,this.dynamicProperties)),"fc"in a.a&&(i.a.fc=PropertyFactory.getProp(t,a.a.fc,1,0,this.dynamicProperties)),"t"in a.a&&(i.a.t=PropertyFactory.getProp(t,a.a.t,0,0,this.dynamicProperties)),i.s.s="s"in a.s?PropertyFactory.getProp(t,a.s.s,0,0,this.dynamicProperties):{v:0},"e"in a.s&&(i.s.e=PropertyFactory.getProp(t,a.s.e,0,0,this.dynamicProperties)),i.s.o="o"in a.s?PropertyFactory.getProp(t,a.s.o,0,0,this.dynamicProperties):{v:0},i.s.xe="xe"in a.s?PropertyFactory.getProp(t,a.s.xe,0,0,this.dynamicProperties):{v:0},i.s.ne="ne"in a.s?PropertyFactory.getProp(t,a.s.ne,0,0,this.dynamicProperties):{v:0},this.viewData.a[s]=i}else this.viewData.a=[];e.p&&"m"in e.p&&(this.viewData.p={f:PropertyFactory.getProp(t,e.p.f,0,0,this.dynamicProperties),l:PropertyFactory.getProp(t,e.p.l,0,0,this.dynamicProperties),m:this.maskManager.getMaskProperty(e.p.m)})},ITextElement.prototype.getMeasures=function(){var t,e,s,i,a=this.mHelper,r=this.renderType,n=this.data,o=n.t.d,h=o.l;if("m"in n.t.p){var l=this.viewData.p.m;if(!this.viewData.p.n||this.viewData.p.mdf){var m=l.v,p={tLength:0,segments:[]};i=m.v.length-1;var f;for(s=0;i>s;s+=1)f={s:m.v[s],e:m.v[s+1],to:[m.o[s][0]-m.v[s][0],m.o[s][1]-m.v[s][1]],ti:[m.i[s+1][0]-m.v[s+1][0],m.i[s+1][1]-m.v[s+1][1]]},bez.buildBezierData(f),p.tLength+=f.bezierData.segmentLength,p.segments.push(f);s=i,l.closed&&(f={s:m.v[s],e:m.v[0],to:[m.o[s][0]-m.v[s][0],m.o[s][1]-m.v[s][1]],ti:[m.i[0][0]-m.v[0][0],m.i[0][1]-m.v[0][1]]},bez.buildBezierData(f),p.tLength+=f.bezierData.segmentLength,p.segments.push(f)),this.viewData.p.pi=p}var d,c,u,p=this.viewData.p.pi,v=this.viewData.p.f.v,y=0,g=1,b=0,E=!0,C=p.segments;if(0>v&&l.closed)for(p.tLength<Math.abs(v)&&(v=-Math.abs(v)%p.tLength),y=C.length-1,u=C[y].bezierData.points,g=u.length-1;0>v;)v+=u[g].partialLength,g-=1,0>g&&(y-=1,u=C[y].bezierData.points,g=u.length-1);u=C[y].bezierData.points,c=u[g-1],d=u[g];var w,S,P=d.partialLength}i=h.length,t=0,e=0;var D,I,F,T,A=1.2*n.t.d.s*.714,M=!0,x=this.viewData,k=new Array(i),V=!1;F=x.a.length;var L,N,_,R=[],B=n._letters;for(I=0;F>I;I+=1){L=n.t.a[I].totalChars,N=2===n.t.a[I].s.r?1:100/L,"e"in x.a[I].s||(x.a[I].s.e={v:2===n.t.a[I].s.r?L:100});var z=x.a[I].s.o.v/N;0===z&&0===x.a[I].s.s.v&&x.a[I].s.e.v===N;var O=x.a[I].s.s.v/N+z,j=x.a[I].s.e.v/N+z;if(O>j){var G=O;O=j,j=G}R.push({s:O,e:j,ne:x.a[I].s.ne.v,xe:x.a[I].s.xe.v})}var H,W,q,X,J,U,Y,Q,K,Z,$,tt,et,st,it,at=-1,rt=v,nt=y,ot=g,ht=0;for(s=0;i>s;s+=1){switch(a.reset(),o.j){case 1:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line]),0);break;case 2:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line])/2,0)}if(J=1,h[s].n)t=0,e+=o.yOffset,e+=M?1:0,v=rt,M=!1,ht=0,"m"in n.t.p&&(y=nt,g=ot,u=C[y].bezierData.points,c=u[g-1],d=u[g],P=d.partialLength,b=0),k[s]=this.emptyProp;else{if("m"in n.t.p){at!==h[s].ind&&(h[at]&&(v+=h[at].extra),v+=h[s].an/2,at=h[s].ind),v+=x.m.a.v[0]*h[s].an/200;var lt=0;for(I=0;F>I;I+=1)D=x.a[I].a,"p"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),lt+=D.p.v[0]*H);for(E=!0;E;)if(b+P>=v+lt||!u){if(w=(v+lt-b)/d.partialLength,q=c.point[0]+(d.point[0]-c.point[0])*w,X=c.point[1]+(d.point[1]-c.point[1])*w,a.translate(q,X),n.t.p.p){S=(d.point[1]-c.point[1])/(d.point[0]-c.point[0]);var mt=180*Math.atan(S)/Math.PI;d.point[0]<c.point[0]&&(mt+=180),a.rotate(mt*Math.PI/180)}a.translate(0,x.m.a.v[1]*A/100+e),E=!1}else u&&(b+=d.partialLength,g+=1,g>=u.length&&(g=0,y+=1,C[y]?u=C[y].bezierData.points:l.closed?(g=0,y=0,u=C[y].bezierData.points):u=null),u&&(c=d,d=u[g],P=d.partialLength));W=h[s].an/2-h[s].add}else a.translate(t,e),W=h[s].an/2-h[s].add,a.translate(W,0),a.translate(x.m.a.v[0]*h[s].an/200,x.m.a.v[1]*A/100);for(ht+=h[s].l/2,I=0;F>I;I+=1)D=x.a[I].a,"t"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),"m"in n.t.p?v+=D.t*H:t+=D.t.v*H);for(ht+=h[s].l/2,I=0;F>I;I+=1)D=x.a[I].a,"p"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),"m"in n.t.p?a.translate(0,D.p.v[1]*H):a.translate(D.p.v[0]*H,D.p.v[1]*H));for(o.strokeWidthAnim&&(Y=n.t.d.sw||0),o.strokeColorAnim&&(U=n.t.d.sc?[n.t.d.sc[0],n.t.d.sc[1],n.t.d.sc[2]]:[0,0,0]),o.fillColorAnim&&(Q=[n.t.d.fc[0],n.t.d.fc[1],n.t.d.fc[2]]),I=0;F>I;I+=1){if(D=x.a[I].a,H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),"r"in D&&"s"in R[I]&&a.rotate(D.r.v*H),"o"in D&&"s"in R[I]&&(J+=(D.o.v*H-J)*H),o.strokeWidthAnim&&"sw"in D&&"s"in R[I]&&(Y+=D.sw.v*H),o.strokeColorAnim&&"sc"in D&&"s"in R[I])for(K=0;3>K;K+=1)U[K]=Math.round(U[K]+(D.sc.v[K]-U[K])*H);if(o.fillColorAnim&&"fc"in D&&"s"in R[I])for(K=0;3>K;K+=1)Q[K]=Math.round(Q[K]+(D.fc.v[K]-Q[K])*H)}for(o.strokeWidthAnim&&(Z=0>Y?0:Y),o.strokeColorAnim&&($="rgb("+U[0]+","+U[1]+","+U[2]+")"),o.fillColorAnim&&(tt="rgb("+Q[0]+","+Q[1]+","+Q[2]+")"),I=0;F>I;I+=1)D=x.a[I].a,"s"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),a.scale(1+(D.s.v[0]-1)*H,1+(D.s.v[1]-1)*H));for(I=0;F>I;I+=1)D=x.a[I].a,"a"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),a.translate(-D.a.v[0]*H,-D.a.v[1]*H));"m"in n.t.p?(a.translate(-x.m.a.v[0]*h[s].an/200,-x.m.a.v[1]*A/100),v-=x.m.a.v[0]*h[s].an/200,h[s+1]&&at!==h[s+1].ind&&(v+=h[s].an/2,v+=o.tr/1e3*n.t.d.s),a.translate(-W,0)):(a.translate(-W,0),a.translate(-x.m.a.v[0]*h[s].an/200,-x.m.a.v[1]*A/100),t+=h[s].l+o.tr/1e3*n.t.d.s),"svg"===r?et=a.toCSS():st=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]],it=J,B?(_=B[s],_.o!==it||_.sw!==Z||_.sc!==$||_.fc!==tt?(V=!0,T=new LetterProps(it,Z,$,tt,et,st)):"svg"===r&&_.m!==et?(V=!0,T=new LetterProps(it,Z,$,tt,et)):"svg"===r||_.props[1]===a.props[1]&&_.props[2]===a.props[2]&&_.props[3]===a.props[3]&&_.props[4]===a.props[4]&&_.props[5]===a.props[5]?T=_:(V=!0,T=new LetterProps(it,Z,$,tt,null,[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]]))):(V=!0,T=new LetterProps(it,Z,$,tt,et,st)),k[s]=T}}V&&(this.renderedLetters=k)},ITextElement.prototype.getMult=function(t,e,s,i,a,r){var n=bez.getEasingCurve(i/100,0,1-a/100,1),o=0;return 2==r?(o=s===e?t>=s?1:0:Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),o=n("",o,0,1,1)):3==r?(o=s===e?t>=s?0:1:1-Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),o=n("",o,0,1,1)):4==r?s===e?o=t>=s?0:1:(o=Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),.5>o?o*=2:o=1-o):t>=Math.floor(e)&&(o=0>t-e?1-(e-t):Math.max(0,Math.min(s-t,1))),o},ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,SVGTextElement.prototype.getMult=ITextElement.prototype.getMult,SVGTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d;this.innerElem=document.createElementNS(svgNS,"g"),t.fc?this.innerElem.setAttribute("fill","rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.innerElem.setAttribute("fill","rgba(0,0,0,0)"),t.sc&&(this.innerElem.setAttribute("stroke","rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")"),this.innerElem.setAttribute("stroke-width",t.sw)),this.innerElem.setAttribute("font-size",t.s);var e=this.globalData.fontManager.getFontByName(t.f);this.innerElem.setAttribute("font-family",e.fFamily);var s,i,a=t.fWeight,r=t.fStyle;this.innerElem.setAttribute("font-style",r),this.innerElem.setAttribute("font-weight",a),this.layerElement.appendChild(this.innerElem);var n=t.l;i=n.length;var o,h,l,m,p,f,d,c=this.mHelper,u="",v=this.data.singleShape;if(this.globalData.fontManager.chars&&v)var y=0,g=0,b=t.lineWidths,E=t.boxWidth,C=!0;for(s=0;i>s;s+=1){if(this.globalData.fontManager.chars?v&&0!==s||(o=document.createElementNS(svgNS,"path")):o=document.createElementNS(svgNS,"text"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var w=this.globalData.fontManager.getCharData(t.t.charAt(s),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),S=w.data;if(c.reset(),v&&n[s].n&&(y=0,g+=t.yOffset,g+=C?1:0,C=!1),S){if(h=S.shapes[0].it,v){switch(t.j){case 1:
-c.translate(t.justifyOffset+(E-b[n[s].line]),0);break;case 2:c.translate(t.justifyOffset+(E-b[n[s].line])/2,0)}c.translate(y,g)}else u="";for(m=h.length,c.scale(t.s/100,t.s/100),l=0;m>l;l+=1){for(f=h[l].ks.i.length,d=h[l].ks,p=1;f>p;p+=1)1==p&&(u+=" M"+c.applyToPointStringified(d.v[0][0],d.v[0][1])),u+=" C"+c.applyToPointStringified(d.o[p-1][0],d.o[p-1][1])+" "+c.applyToPointStringified(d.i[p][0],d.i[p][1])+" "+c.applyToPointStringified(d.v[p][0],d.v[p][1]);u+=" C"+c.applyToPointStringified(d.o[p-1][0],d.o[p-1][1])+" "+c.applyToPointStringified(d.i[0][0],d.i[0][1])+" "+c.applyToPointStringified(d.v[0][0],d.v[0][1]),u+="z"}v||o.setAttribute("d",u)}v?y+=n[s].l:this.innerElem.appendChild(o)}else o.textContent=n[s].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(o);this.textSpans.push(o)}v&&(o.setAttribute("d",u),this.innerElem.appendChild(o))},SVGTextElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},SVGTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||(this.finalTransform.matMdf&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),this.finalTransform.opMdf&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),!this.data.singleShape){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].setAttribute("transform",n.m),this.textSpans[s].setAttribute("opacity",n.o),n.sw&&this.textSpans[s].setAttribute("stroke-width",n.sw),n.sc&&this.textSpans[s].setAttribute("stroke",n.sc),n.fc&&this.textSpans[s].setAttribute("fill",n.fc))}},SVGTextElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null};var PlaceHolderElement=function(t,e,s){if(this.data=t,this.globalData=s,e){this.parentContainer=e;var i=document.createElementNS(svgNS,"g");i.setAttribute("id",this.data.id),e.appendChild(i),this.phElement=i}this.layerId="ly_"+randomString(10)};PlaceHolderElement.prototype.prepareFrame=function(){},PlaceHolderElement.prototype.renderFrame=function(){},PlaceHolderElement.prototype.draw=function(){},createElement(SVGBaseElement,ICompElement),ICompElement.prototype.getComposingElement=function(){return this.layerElement},ICompElement.prototype.hide=function(){if(!this.hidden){var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t].hide();this.hidden=!0}},ICompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1));var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},ICompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.data.hasMask?this.elements[e].renderFrame():this.elements[e].renderFrame(this.finalTransform);this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this.parent.destroy.call();var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t].destroy()},createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assetData.p),t.maskedElement=t.innerElem},s=new Image;s.addEventListener("load",e,!1),s.addEventListener("error",e,!1),s.src=this.path+this.assetData.p,this.parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},IImageElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||((this.finalTransform.matMdf||this.firstFrame)&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),(this.finalTransform.opMdf||this.firstFrame)&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},IShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.mainShape=new ShapeItemElement(this.data,this.layerElement,this.parentContainer,this.placeholder,this.dynamicProperties,this.globalData)},IShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden=!1,this.firstFrame&&(this.mainShape.firstFrame=!0,this.firstFrame=!1),void(this.data.hasMask?this.mainShape.renderShape(this.transformHelper,null,null,!0):this.mainShape.renderShape(this.finalTransform,null,null,!0)))},IShapeElement.prototype.hide=function(){this.hidden||(this.mainShape.hideShape(),this.hidden=!0)},IShapeElement.prototype.destroy=function(){this.parent.destroy.call(),this.mainShape.destroy()},ShapeItemElement.prototype.appendNodeToParent=SVGBaseElement.prototype.appendNodeToParent,ShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var m;if(e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty){if(m=document.createElementNS(svgNS,"g"),m.setAttribute("stroke-linecap",this.lcEnum[t[a].lc]||"round"),m.setAttribute("stroke-linejoin",this.ljEnum[t[a].lj]||"round"),m.setAttribute("fill-opacity","0"),1==t[a].lj&&m.setAttribute("stroke-miterlimit",t[a].ml),e[a].c.k||m.setAttribute("stroke","rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||m.setAttribute("stroke-opacity",e[a].o.v),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||m.setAttribute("stroke-width",e[a].w.v),t[a].d){var p=PropertyFactory.getDashProp(this.elemData,t[a].d,"svg",s);p.k?e[a].d=p:(m.setAttribute("stroke-dasharray",p.dasharray),m.setAttribute("stroke-dashoffset",p.dashoffset))}}else m=document.createElementNS(svgNS,"path"),e[a].c.k||m.setAttribute("fill","rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||m.setAttribute("fill-opacity",e[a].o.v);this.shape===this.parentContainer?this.appendNodeToParent(m):this.shape.appendChild(m),this.stylesList.push({pathElement:m,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var v={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(v),l.push(v)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},ShapeItemElement.prototype.getElement=function(){return this.shape},ShapeItemElement.prototype.hideShape=function(){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode))},ShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},ShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var m=r.s?r.s:[];for(a=1;i>a;a+=1)m[a-1]?(e.st&&(h+=" M"+m[a-1][0]+","+m[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(m[a-1][0],m[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(m[0]?(e.st&&(h+=" M"+m[0][0]+","+m[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(m[0][0],m[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},ShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&i.pathElement.setAttribute("fill","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&i.pathElement.setAttribute("fill-opacity",e.o.v*s.opacity)},ShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.pathElement.setAttribute("stroke-dasharray",a.dasharray),i.pathElement.setAttribute("stroke-dashoffset",a.dashoffset)),(e.c.mdf||this.firstFrame)&&i.pathElement.setAttribute("stroke","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&i.pathElement.setAttribute("stroke-opacity",e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&i.pathElement.setAttribute("stroke-width",e.w.v)},ShapeItemElement.prototype.destroy=function(t,e){this.shape=null,this.data=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement===this.parentContainer?this.appendNodeToParent(t):this.layerElement.appendChild(t),this.innerElem=t},ISolidElement.prototype.hide=IImageElement.prototype.hide,ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy,createElement(BaseElement,CVBaseElement),CVBaseElement.prototype.createElements=function(){},CVBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(!this.isVisible)return this.isVisible;this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]);return this.data.hasMask&&(this.globalData.renderer.save(!0),this.maskManager.renderFrame(s)),this.isVisible},CVBaseElement.prototype.getCurrentAnimData=function(){return this.currentAnimData},CVBaseElement.prototype.addMasks=function(t){this.maskManager=new CVMaskElement(t,this,this.globalData)},CVBaseElement.prototype.destroy=function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager&&this.maskManager.destroy()},CVBaseElement.prototype.mHelper=new Matrix,createElement(CVBaseElement,CVCompElement),CVCompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1));var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},CVCompElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e,s=this.layers.length;for(e=s-1;e>=0;e-=1)this.elements[e].renderFrame(this.finalTransform);this.data.hasMask&&this.globalData.renderer.restore(!0),this.firstFrame&&(this.firstFrame=!1)}},CVCompElement.prototype.setElements=function(t){this.elements=t},CVCompElement.prototype.getElements=function(){return this.elements},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.layers=null,this.elements=null,this.parent.destroy.call()},createElement(CVBaseElement,CVImageElement),CVImageElement.prototype.createElements=function(){var t=this,e=function(){t.animationItem.elementLoaded()},s=function(){t.failed=!0,t.animationItem.elementLoaded()};this.img=new Image,this.img.addEventListener("load",e,!1),this.img.addEventListener("error",s,!1),this.img.src=this.path+this.assetData.p,this.parent.createElements.call(this)},CVImageElement.prototype.renderFrame=function(t){if(!this.failed&&this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.drawImage(this.img,0,0),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},CVImageElement.prototype.destroy=function(){this.img=null,this.animationItem=null,this.parent.destroy.call()},CVMaskElement.prototype.getMaskProperty=function(t){return this.viewData[t]},CVMaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)},CVMaskElement.prototype.renderFrame=function(t){var e,s,i,a,r,n=this.ctx,o=this.data.masksProperties.length,h=!1;for(e=0;o>e;e++)if("n"!==this.masksProperties[e].mode){h===!1&&(n.beginPath(),h=!0),this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.globalData.compWidth,0),n.lineTo(this.globalData.compWidth,this.globalData.compHeight),n.lineTo(0,this.globalData.compHeight),n.lineTo(0,0)),r=this.viewData[e].v,s=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.moveTo(s[0],s[1]);var l,m=r.v.length;for(l=1;m>l;l++)s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[l][0],r.i[l][1]),a=t.applyToPointArray(r.v[l][0],r.v[l][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1]);s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[0][0],r.i[0][1]),a=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1])}h&&n.clip()},CVMaskElement.prototype.destroy=function(){this.ctx=null},createElement(CVBaseElement,CVShapeElement),CVShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.mainShape=new CVShapeItemElement(this.data,this.dynamicProperties,this.globalData)},CVShapeElement.prototype.renderFrame=function(t){this.parent.renderFrame.call(this,t)!==!1&&(this.firstFrame&&(this.mainShape.firstFrame=!0,this.firstFrame=!1),this.mainShape.renderShape(this.finalTransform,null,null,!0),this.data.hasMask&&this.globalData.renderer.restore(!0))},CVShapeElement.prototype.destroy=function(){this.mainShape.destroy(),this.parent.destroy.call()},CVShapeItemElement.prototype.dashResetter=[],CVShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],m=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var p=PropertyFactory.getDashProp(this.elemData,t[a].d,"canvas",s);e[a].d=p,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(u),m.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=m.length,a=0;h>a;a+=1)m[a].closed=!0},CVShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var m,p,f,d,c,u,v,y=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(v=this.stylesList[a].type,"st"!==v||0!==this.stylesList[a].wi){for(y.save(),c=this.stylesList[a].elements,p=c.length,"st"===v?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml):g.fillStyle=this.stylesList[a].co,y.ctxOpacity(this.stylesList[a].coOp),g.beginPath(),m=0;p>m;m+=1){for("st"===v?(y.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),y.ctxTransform(c[m].tr),u=c[m].nodes):u=c[m].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===v&&(g.stroke(),y.restore())}"st"!==v&&g.fill(),y.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeItemElement.prototype.destroy=function(){this.data=null,this.globalData=null,this.canvasContext=null},createElement(CVBaseElement,CVSolidElement),CVSolidElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.fillStyle=this.data.sc,e.fillRect(0,0,this.data.sw,this.data.sh),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(CVBaseElement,CVTextElement),CVTextElement.prototype.init=ITextElement.prototype.init,CVTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,CVTextElement.prototype.getMult=ITextElement.prototype.getMult,CVTextElement.prototype.tHelper=document.createElement("canvas").getContext("2d"),CVTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d,e=!1;t.fc?(e=!0,this.values.fill="rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.values.sWidth=t.sw);var i,a,r=this.globalData.fontManager.getFontByName(t.f),n=this.mHelper;this.stroke=s,this.values.fValue=t.s+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.t.length,this.tHelper.font=this.values.fValue;var o,h,l,m,p,f,d,c,u,v;for(i=0;a>i;i+=1){if(o=this.globalData.fontManager.getCharData(t.t.charAt(i),r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),n.reset(),n.scale(t.s/100,t.s/100),h=o.data)for(p=h.shapes[0].it,d=p.length,u=new Array(d),f=0;d>f;f+=1){for(m=p[f].ks.i.length,c=p[f].ks,v=[],l=1;m>l;l+=1)1==l&&v.push(n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),v.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[l][0],c.i[l][1]),n.applyToY(c.i[l][0],c.i[l][1]),n.applyToX(c.v[l][0],c.v[l][1]),n.applyToY(c.v[l][0],c.v[l][1]));v.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[0][0],c.i[0][1]),n.applyToY(c.i[0][0],c.i[0][1]),n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),u[f]=v}else u=[];this.textSpans.push({elem:u})}},CVTextElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext,s=this.finalTransform.mat.props;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.font=this.values.fValue,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.getMeasures();var i,a,r,n,o,h,l=this.renderedLetters,m=this.data.t.d.l;a=m.length;var p,f,d,c=null,u=null,v=null;for(i=0;a>i;i+=1)if(!m[i].n){if(p=l[i],this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(p.props),this.globalData.renderer.ctxOpacity(p.o),this.fill){for(p.fc?c!==p.fc&&(c=p.fc,e.fillStyle=p.fc):c!==this.values.fill&&(c=this.values.fill,e.fillStyle=this.values.fill),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(p.sw?v!==p.sw&&(v=p.sw,e.lineWidth=p.sw):v!==this.values.sWidth&&(v=this.values.sWidth,e.lineWidth=this.values.sWidth),p.sc?u!==p.sc&&(u=p.sc,e.strokeStyle=p.sc):u!==this.values.stroke&&(u=this.values.stroke,e.strokeStyle=this.values.stroke),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}this.globalData.renderer.restore()}this.globalData.renderer.restore(this.data.hasMask)}};var animationManager=function(){function t(t,e){if(!t)return null;for(var s=0;b>s;){if(v[s].elem==t&&null!==v[s].elem)return v[s].animation;s+=1}var i=new AnimationItem;return i.setData(t,e),v.push({elem:t,animation:i}),b+=1,i}function e(t){var e=new AnimationItem;return e.setParams(t),v.push({elem:null,animation:e}),b+=1,e}function s(t,e){var s;for(s=0;b>s;s+=1)v[s].animation.setSpeed(t,e)}function i(t,e){var s;for(s=0;b>s;s+=1)v[s].animation.setDirection(t,e)}function a(t){var e;for(e=0;b>e;e+=1)v[e].animation.play(t)}function r(t,e){g=!1,y=Date.now();var s;for(s=0;b>s;s+=1)v[s].animation.moveFrame(t,e)}function n(){var t,e=Date.now(),s=e-y;for(t=0;b>t;t+=1)v[t].animation.renderer.destroyed?(v.splice(t,1),t-=1,b-=1):v[t].animation.advanceTime(s);y=e,requestAnimationFrame(n)}function o(t){var e;for(e=0;b>e;e+=1)v[e].animation.pause(t)}function h(t,e,s){var i;for(i=0;b>i;i+=1)v[i].animation.goToAndStop(t,e,s)}function l(t){var e;for(e=0;b>e;e+=1)v[e].animation.stop(t)}function m(t){var e;for(e=0;b>e;e+=1)v[e].animation.togglePause(t)}function p(t){var e;for(e=0;b>e;e+=1)v[e].animation.destroy(t)}function f(e,s,i){var a,r=document.getElementsByClassName("bodymovin"),n=r.length;for(a=0;n>a;a+=1)i&&r[a].setAttribute("data-bm-type",i),t(r[a],e);if(s&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),t(h,e)}}function d(){var t;for(t=0;b>t;t+=1)v[t].animation.resize()}function c(){y=Date.now(),requestAnimationFrame(n)}var u={},v=[],y=0,g=!0,b=0;return setTimeout(c,0),u.registerAnimation=t,u.loadAnimation=e,u.setSpeed=s,u.setDirection=i,u.play=a,u.moveFrame=r,u.pause=o,u.stop=l,u.togglePause=m,u.searchAnimations=f,u.resize=d,u.start=c,u.goToAndStop=h,u.destroy=p,u}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.repeat="indefinite",this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.isScrolling=!1,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.renderedFrameCount=0,this.scaleMode="fit",this.math=Math,this.removed=!1,this.timeCompleted=0,this.segmentPos=0,this.segments=[]};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var s=t.animType?t.animType:t.renderer?t.renderer:"canvas";switch(s){case"canvas":this.renderer=new CanvasRenderer(this,t.renderer);break;case"svg":this.renderer=new SVGRenderer(this,t.renderer)}if(this.animType=s,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));
-else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},AnimationItem.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||(s.loop="false"===a?!1:"true"===a?!0:parseInt(a)),s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var r=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===r&&(s.prerender=!1),this.setParams(s)},AnimationItem.prototype.includeLayers=function(t){var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;n>s;s+=1)for(e=0;a>e;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}if(t.assets)for(a=t.assets.length,e=0;a>e;e+=1)this.animationData.assets.push(t.assets[e]);dataManager.completeData(this.animationData),this.renderer.includeLayers(t.layers),this.renderer.buildStage(this.container,this.layers),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.animationData._id=this.animationID,this.animationData._animType=this.animType,this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.loadSegments(),dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():this.checkLoaded()},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(this.renderer.buildItems(this.animationData.layers),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(this.renderer.buildStage(this.container,this.layers),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=subframeEnabled?this.currentRawFrame:this.math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1)},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0)},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?(this.isPaused=!1,this.play()):(this.isPaused=!0,this.pause()))},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.isPaused=!0)},AnimationItem.prototype.advanceTime=function(t){this.isPaused!==!0&&this.isScrolling!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier)},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.trigger("segmentStart")},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;i>s;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&(this.adjustSegment(this.segments.shift()),this.setCurrentRawFrameValue(0)),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||this.renderer.destroy()},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t;var e=!1;if(this.currentRawFrame>=this.totalFrames){if(this.segments.length&&(e=!0),this.loop===!1)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");if(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete")}else if(this.currentRawFrame<0)return this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1?(this.currentRawFrame=0,this.gotoFrame(),this.pause(),void this.trigger("complete")):(this.trigger("loopComplete"),this.currentRawFrame=this.totalFrames+this.currentRawFrame,void this.gotoFrame());if(e){var s=this.currentRawFrame%this.totalFrames;this.adjustSegment(this.segments.shift()),this.currentRawFrame=s}else this.currentRawFrame=this.currentRawFrame%this.totalFrames;this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;s>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames))},AnimationItem.prototype.addEventListener=addEventListener,AnimationItem.prototype.removeEventListener=removeEventListener,AnimationItem.prototype.triggerEvent=triggerEvent,function(t){function e(t){animationManager.play(t)}function s(t){animationManager.pause(t)}function i(t){animationManager.togglePause(t)}function a(t,e){animationManager.setSpeed(t,e)}function r(t,e){animationManager.setDirection(t,e)}function n(t){animationManager.stop(t)}function o(t){animationManager.moveFrame(t)}function h(){E===!0?animationManager.searchAnimations(C,E,w):animationManager.searchAnimations()}function l(t){return animationManager.registerAnimation(t)}function m(){animationManager.resize()}function p(){animationManager.start()}function f(t,e,s){animationManager.goToAndStop(t,e,s)}function d(t){subframeEnabled=t}function c(t){return E===!0&&(t.animationData=JSON.parse(C)),animationManager.loadAnimation(t)}function u(t){return animationManager.destroy(t)}function v(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(defaultCurveSegments>=50?!1:!0)}function y(){"complete"===document.readyState&&(clearInterval(F),h())}function g(t){for(var e=I.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var b={};b.play=e,b.pause=s,b.togglePause=i,b.setSpeed=a,b.setDirection=r,b.stop=n,b.moveFrame=o,b.searchAnimations=h,b.registerAnimation=l,b.loadAnimation=c,b.setSubframeRendering=d,b.resize=m,b.start=p,b.goToAndStop=f,b.destroy=u,b.setQuality=v,b.version="3.1.1",b.checkReady=y,t.bodymovin=b;var E="__[STANDALONE]__",C="__[ANIMATIONDATA]__",w="";if(E){var S=document.getElementsByTagName("script"),P=S.length-1,D=S[P],I=D.src.replace(/^[^\?]+\??/,"");w=g("renderer")}var F=setInterval(y,100)}(window);}(window));
\ No newline at end of file
+(function(window){function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,s,i,a,r){return t.reset().translate(a,r).rotate(e).scale(s,i).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 roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="hidden",styleUnselectableDiv(t)}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=0>i?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,s,i){this.type=t,this.currentLoop=e,this.totalLoops=s,this.direction=0>i?-1:1}function BMSegmentStartEvent(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}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,i=this._cbs[t].length;i>s;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=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,i=0;s>i;i++)this._cbs[t][i](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}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,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.props=r}function iterateDynamicProperties(t){var e,s=this.dynamicProperties;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)}function createElement(t,e,s){if(!e){var i=Object.create(t.prototype,s),a={};return i&&"[object Function]"===a.toString.call(i.init)&&i.init(),i}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,i,a,r){return bm_abs((s-t)*(r-e)-(a-t)*(i-e))<1e-5}function e(t,e,s,i,a){if(a||(a=("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p")),o[a])return o[a];var r,n,h,l,p,m;return o[a]=function(a,o,f,d,c){var u=o/c;a=u;for(var y,v=0;++v<20&&(h=3*t,n=3*(s-t)-h,r=1-h-n,y=a*(h+a*(n+a*r))-u,!(bm_abs(y)<.001));)a-=y/(h+a*(2*n+3*r*a));m=3*e,p=3*(i-e)-m,l=1-m-p;var g=a*(m+a*(p+a*l));return g},o[a]}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var s=e.segments,i=s.length,a=bm_floor((i-1)*t),r=t*e.addedLength,n=0;if(r==s[a].l)return s[a].p;for(var o=s[a].l>r?-1:1,h=!0;h;)s[a].l<=r&&s[a+1].l>r?(n=(r-s[a].l)/(s[a+1].l-s[a].l),h=!1):a+=o,(0>a||a>=i-1)&&(h=!1);return s[a].p+(s[a+1].p-s[a].p)*n}function r(){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,i,n,o,h){var l=new r;n=0>n?0:n;var p=a(n,h);o=o>1?1:o;var m,f=a(o,h),d=t.length,c=1-p,u=1-f;for(m=0;d>m;m+=1)l.pt1[m]=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)*i[m]+p*p*p*e[m],l.pt3[m]=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)*i[m]+p*p*f*e[m],l.pt4[m]=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)*i[m]+p*f*f*e[m],l.pt2[m]=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)*i[m]+f*f*f*e[m];return l}var o=[],h=(Math,function(){function e(t,e){this.l=t,this.p=e}var s={};return function(i,a,r,n){var o=(i.join("_")+"_"+a.join("_")+"_"+r.join("_")+"_"+n.join("_")).replace(/\./g,"p");if(s[o])return s[o];var h,l,p,m,f,d,c=defaultCurveSegments,u=0,y=[],v=[],g={addedLength:0,segments:[]};for((i[0]!=a[0]||i[1]!=a[1])&&t(i[0],i[1],a[0],a[1],r[0],r[1])&&t(i[0],i[1],a[0],a[1],n[0],n[1])&&(c=2),p=r.length,h=0;c>h;h+=1){for(f=h/(c-1),d=0,l=0;p>l;l+=1)m=bm_pow(1-f,3)*i[l]+3*bm_pow(1-f,2)*f*r[l]+3*(1-f)*bm_pow(f,2)*n[l]+bm_pow(f,3)*a[l],y[l]=m,null!==v[l]&&(d+=bm_pow(y[l]-v[l],2)),v[l]=y[l];d&&(d=bm_sqrt(d),u+=d),g.segments.push(new e(u,f))}return g.addedLength=u,s[o]=g,g}}()),l=function(){var e={};return function(a){var r=a.s,n=a.e,o=a.to,h=a.ti,l=(r.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(a.bezierData=e[l]);var p,m,f,d,c,u,y,v=defaultCurveSegments,g=0,b=null;(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+o[0],r[1]+o[1])&&t(r[0],r[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(v=2);var E=new s(v);for(f=o.length,p=0;v>p;p+=1){for(y=new Array(f),c=p/(v-1),u=0,m=0;f>m;m+=1)d=bm_pow(1-c,3)*r[m]+3*bm_pow(1-c,2)*c*(r[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),g+=u,E.points[p]=new i(u,y),b=y}E.segmentLength=g,a.bezierData=E,e[l]=E}}();return{getEasingCurve:e,getBezierLength:h,getNewSegment:n,buildBezierData:l}}function dataFunctionManager(){function t(a,n,o){var h,l,p,m,f,d,c,u,y=a.length;for(m=0;y>m;m+=1)if(h=a[m],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(a[m-1].td=h.tt),l=[],p=-1,h.hasMask){var v=h.masksProperties;for(d=v.length,f=0;d>f;f+=1)if(v[f].pt.k.i)i(v[f].pt.k);else for(u=v[f].pt.k.length,c=0;u>c;c+=1)v[f].pt.k[c].s&&i(v[f].pt.k[c].s[0]),v[f].pt.k[c].e&&i(v[f].pt.k[c].e[0])}0===h.ty?(h.layers=e(h.refId,n),t(h.layers,n,o)):4===h.ty?s(h.shapes,!1):5==h.ty&&r(h,o)}}function e(t,e){for(var s=0,i=e.length;i>s;){if(e[s].id===t)return JSON.parse(JSON.stringify(e[s].layers));s+=1}}function s(t,e){var a,r,n,o=t.length,h=e?e:!1;for(a=o-1;a>=0;a-=1)if("tm"==t[a].ty&&(h=!0),"sh"==t[a].ty)if(t[a].trimmed=h,t[a].ks.k.i)i(t[a].ks.k);else for(n=t[a].ks.k.length,r=0;n>r;r+=1)t[a].ks.k[r].s&&i(t[a].ks.k[r].s[0]),t[a].ks.k[r].e&&i(t[a].ks.k[r].e[0]);else"gr"==t[a].ty&&s(t[a].it,h)}function i(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 a(e,s){t(e.layers,e.assets,s)}function r(t,e){var s,i,a,r,o,h,l,p,m=[],f=t.t.d,d=0,c=t.t.m.g,u=0,y=0,v=0,g=[],b=0,E=0,P=e.getFontByName(f.f),S=P.fStyle.split(" "),C="normal",k="normal";for(i=S.length,s=0;i>s;s+=1)"italic"===S[s].toLowerCase()?k="italic":"bold"===S[s].toLowerCase()?C="700":"black"===S[s].toLowerCase()?C="900":"medium"===S[s].toLowerCase()?C="500":"regular"===S[s].toLowerCase()||"normal"===S[s].toLowerCase()?C="400":("light"===S[s].toLowerCase()||"thin"===S[s].toLowerCase())&&(C="200");for(f.fWeight=C,f.fStyle=k,i=f.t.length,s=0;i>s;s+=1)if(a=!1," "===f.t.charAt(s)?r=" ":13===f.t.charCodeAt(s)?(g.push(b),E=b>E?b:E,b=0,r="",a=!0,v+=1):r=f.t.charAt(s),e.chars?(l=e.getCharData(f.t.charAt(s),P.fStyle,e.getFontByName(f.f).fFamily),p=a?0:l.w*f.s/100):(n.font=f.s+"px "+e.getFontByName(f.f).fFamily,p=n.measureText(r).width),b+=p,m.push({l:p,an:p,add:u,n:a,anIndexes:[],val:r,line:v}),2==c){if(u+=p,""==r||" "==r||s==i-1){for((""==r||" "==r)&&(u-=p);s>=y;)m[y].an=u,m[y].ind=d,m[y].extra=p,y+=1;d+=1,u=0}}else if(3==c){if(u+=p,""==r||s==i-1){for(""==r&&(u-=p);s>=y;)m[y].an=u,m[y].ind=d,m[y].extra=p,y+=1;u=0,d+=1}}else m[d].ind=d,m[d].extra=0,d+=1;switch(f.l=m,E=b>E?b:E,g.push(b),f.boxWidth=E,f.lineWidths=g,f.j){case 1:t.t.d.justifyOffset=-f.boxWidth;break;case 2:t.t.d.justifyOffset=-f.boxWidth/2;break;default:t.t.d.justifyOffset=0}var w=t.t.a;h=w.length;var x,D,I=[];for(o=0;h>o;o+=1){for(w[o].a.sc&&(f.strokeColorAnim=!0),w[o].a.sw&&(f.strokeWidthAnim=!0),w[o].a.fc&&(f.fillColorAnim=!0),D=0,x=w[o].s.b,s=0;i>s;s+=1)m[s].anIndexes[o]=D,(1==x&&""!=m[s].val||2==x&&""!=m[s].val&&" "!=m[s].val||3==x&&(m[s].n||" "==m[s].val||s==i-1)||4==x&&(m[s].n||s==i-1))&&(1===w[o].s.rn&&I.push(D),D+=1);t.t.a[o].s.totalChars=D;var F,T=-1;if(1===w[o].s.rn)for(s=0;i>s;s+=1)T!=m[s].anIndexes[o]&&(T=m[s].anIndexes[o],F=I.splice(Math.floor(Math.random()*I.length),1)[0]),m[s].anIndexes[o]=F}0!==h||"m"in t.t.p||(t.singleShape=!0),f.yOffset=1.2*f.s}var n=document.createElement("canvas").getContext("2d"),o=(new Matrix,{});return o.completeData=a,o}function ExpressionComp(){}function ShapeInterface(){}function SVGRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},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:new Array(15),savedOp:new Array(15),cArrPos:0,cTr:new Matrix,cO:1};var s,i=15;for(s=0;i>s;s+=1)this.contextData.saved[s]=new Array(6);this.elements=[]}function HybridRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},this.elements=[],this.destroyed=!1}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 i,a,r,n,o,h,l,p=this.element.maskedElement,m=this.globalData.defs,f=this.masksProperties.length,d=this.masksProperties,c=0,u=[],y=randomString(10),v="clipPath",g="clip-path";for(i=0;f>i;i++)if(("a"!==d[i].mode&&"n"!==d[i].mode||d[i].inv)&&(v="mask",g="mask"),"s"!=d[i].mode&&"i"!=d[i].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[i].mode){if(c+=1,a=document.createElementNS(svgNS,"path"),d[i].cl?"s"==d[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"):(a.setAttribute("fill","none"),"s"==d[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"),a.setAttribute("stroke-width","1"),a.setAttribute("stroke-miterlimit","10")),a.setAttribute("clip-rule","nonzero"),0!==d[i].x.k){v="mask",g="mask";var b=PropertyFactory.getProp(this.element,d[i].x,0,null,this.dynamicProperties),E="fi_"+randomString(10);h=document.createElementNS(svgNS,"filter"),h.setAttribute("id",E),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[i].mode?a.setAttribute("stroke","#000000"):a.setAttribute("stroke","#ffffff")}else l=null;if(this.storedData[i]={elem:a,x:b,expan:l,lastPath:"",lastOperator:"",filterId:E,lastRadius:0},"i"==d[i].mode){n=u.length;var P=document.createElementNS(svgNS,"g");for(r=0;n>r;r+=1)P.appendChild(u[r]);var S=document.createElementNS(svgNS,"mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",y+"_"+c),S.appendChild(a),m.appendChild(S),P.setAttribute("mask","url(#"+y+"_"+c+")"),u.length=0,u.push(P)}else u.push(a);d[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",prop:PropertyFactory.getShapeProp(this.element,d[i],3,this.dynamicProperties,null)},this.viewData[i].prop.k||this.drawPath(d[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={prop:PropertyFactory.getShapeProp(this.element,d[i],3,this.dynamicProperties,null)};for(this.maskElement=document.createElementNS(svgNS,v),f=u.length,i=0;f>i;i+=1)this.maskElement.appendChild(u[i]);this.maskElement.setAttribute("id",y),c>0&&p.setAttribute(g,"url(#"+y+")"),m.appendChild(this.maskElement)}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,1/255,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 EffectsManager(t,e,s){this.data=t,this.element=e;var i=t.ef;this.effectElements=[];var a,r,n=i.length;for(a=0;n>a;a++)switch(i[a].ty){case 0:r=new SliderEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 1:r=new AngleEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 2:r=new ColorEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 3:r=new PointEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 4:r=new CheckboxEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r))}}function BaseElement(){}function SVGBaseElement(t,e,s,i,a){this.globalData=s,this.comp=i,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=a?a.layerId:"ly_"+randomString(10),this.placeholder=a,this.init()}function ITextElement(t,e,s,i){}function SVGTextElement(t,e,s,i,a){this.textSpans=[],this.renderType="svg",this.parent.constructor.call(this,t,e,s,i,a)}function ICompElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a),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,i,a){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this.parent.constructor.call(this,t,e,s,i,a)}function IShapeElement(t,e,s,i,a){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.parent.constructor.call(this,t,e,s,i,a)}function ShapeItemElement(t,e,s,i,a,r){this.shape=e,this.parentContainer=s,this.placeholder=i,this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=r,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,a,[]),styleUnselectableDiv(this.shape)}function ISolidElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a)}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),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,s.frameRate,this.dynamicProperties,this.comp))}function CVImageElement(t,e,s){this.animationItem=s.renderer.animationItem,this.assetData=this.animationItem.getAssetData(t.refId),this.path=this.animationItem.getPath(),this.parent.constructor.call(this,t,e,s),this.animationItem.pendingElements+=1}function CVMaskElement(t,e,s){this.data=t,this.element=e,this.globalData=s,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.ctx=this.element.canvasContext,this.viewData=new Array(this.masksProperties.length);var i,a=this.masksProperties.length;for(i=0;a>i;i++)this.viewData[i]=PropertyFactory.getShapeProp(this.element,this.masksProperties[i],3,this.dynamicProperties,null)}function CVShapeElement(t,e,s){this.shapes=[],this.stylesList=[],this.viewData=[],this.shapesData=t.shapes,this.firstFrame=!0,this.parent.constructor.call(this,t,e,s)}function CVShapeItemElement(t,e,s){this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=s,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,e,[])}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.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.parent.constructor.call(this,t,e,s),this.renderedLetters=[]}function HBaseElement(t,e,s,i,a){this.globalData=s,this.comp=i,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=a?a.layerId:"ly_"+randomString(10),this.placeholder=a,this.init()}function HSolidElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a)}function HCompElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a),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,i,a){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.parent.constructor.call(this,t,e,s,i,a)}function HTextElement(t,e,s,i,a){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.parent.constructor.call(this,t,e,s,i,a)}var svgNS="http://www.w3.org/2000/svg",Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=1,this.props[4]=0,this.props[5]=0,this}function e(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,s,-s,e,0,0)}function s(t,e){return this._t(1,e,t,1,0,0)}function i(t,e){return this.shear(Math.tan(t),Math.tan(e))}function a(t,e){var s=Math.cos(e),i=Math.sin(e);return this._t(s,i,-i,s,0,0)._t(1,0,Math.tan(t),1,0,0)._t(s,-i,i,s,0,0)}function r(t,e){return 1==t&&1==e?this:this._t(t,0,0,e,0,0)}function n(t,e,s,i,a,r){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this}function o(t,e){return(0!==t||0!==e)&&(this.props[4]=this.props[0]*t+this.props[2]*e+this.props[4],this.props[5]=this.props[1]*t+this.props[3]*e+this.props[5]),this}function h(t,e,s,i,a,r){if(1===t&&0===e&&0===s&&1===i)return(0!==a||0!==r)&&(this.props[4]=this.props[0]*a+this.props[2]*r+this.props[4],this.props[5]=this.props[1]*a+this.props[3]*r+this.props[5]),this;var n=this.props[0],o=this.props[1],h=this.props[2],l=this.props[3],p=this.props[4],m=this.props[5];return this.props[0]=n*t+h*e,this.props[1]=o*t+l*e,this.props[2]=n*s+h*i,this.props[3]=o*s+l*i,this.props[4]=n*a+h*r+p,this.props[5]=o*a+l*r+m,this}function l(t){t.props[0]=this.props[0],t.props[1]=this.props[1],t.props[2]=this.props[2],t.props[3]=this.props[3],t.props[4]=this.props[4],t.props[5]=this.props[5]}function p(t,e){return{x:t*this.props[0]+e*this.props[2]+this.props[4],y:t*this.props[1]+e*this.props[3]+this.props[5]}}function m(t,e){return t*this.props[0]+e*this.props[2]+this.props[4]}function f(t,e){return t*this.props[1]+e*this.props[3]+this.props[5]}function d(t,e){return[t*this.props[0]+e*this.props[2]+this.props[4],t*this.props[1]+e*this.props[3]+this.props[5]]}function c(t,e){return bm_rnd(t*this.props[0]+e*this.props[2]+this.props[4])+","+bm_rnd(t*this.props[1]+e*this.props[3]+this.props[5])}function u(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5]]}function y(){return this.cssParts[1]=this.props.join(","),this.cssParts.join("")}function v(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.skew=i,this.skewFromAxis=a,this.shear=s,this.scale=r,this.setTransform=n,this.translate=o,this.transform=h,this.applyToPoint=p,this.applyToX=m,this.applyToY=f,this.applyToPointArray=d,this.applyToPointStringified=c,this.toArray=u,this.toCSS=y,this.toString=v,this.clone=l,this._t=this.transform,this.props=[1,0,0,1,0,0],this.cssParts=["matrix(","",")"]}}(),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 i=(new Date).getTime(),a=Math.max(0,16-(i-t)),r=window.setTimeout(function(){e(i+a)},a);return t=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var subframeEnabled=!0,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,defaultCurveSegments=50,degToRads=Math.PI/180;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,i){return 0>t&&(t=0),0>e&&(e=0),0>i&&(i=0),"#"+s[t]+s[e]+s[i]}}(),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]]}}(),bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var s=document.createElement("span");s.style.fontFamily=e;var i=document.createElement("span");i.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(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function e(){var t,s,i,a=this.fonts.length,r=a;for(t=0;a>t;t+=1)this.fonts[t].loaded?r-=1:(s=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,s.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(s=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,s.offsetWidth!==i&&(r-=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!==r&&Date.now()-this.initTime<o?setTimeout(e.bind(this),20):this.loaded=!0}function s(){if(window.Typekit&&window.Typekit.load)try{Typekit.load({async:!1})}catch(t){console.log("errwor",t)}else setTimeout(s,50)}function i(i,a){if(!i)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=i.list);if(i.tk){var r=document.createElement("script");r.setAttribute("src",i.tk),a.appendChild(r),s()}var n,o=i.list,h=o.length;for(n=0;h>n;n+=1){if(o[n].loaded=!1,o[n].monoCase=t(o[n].fFamily,"monospace"),o[n].sansCase=t(o[n].fFamily,"sans-serif"),o[n].fPath&&o[n].fPath){var r=document.createElement("style");r.type="text/css",r.innerHTML="@font-face {font-family: "+o[n].fFamily+"; font-style: normal; src: url('"+o[n].fPath+"');}",a.appendChild(r)}this.fonts.push(o[n])}e.bind(this)()}function a(t){this.chars=t}function r(t,e,s){for(var i=0,a=this.chars.length;a>i;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}}function n(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 o=5e3,h=function(){this.fonts=[],this.chars=null,this.loaded=!1,this.initTime=Date.now()};return h.prototype.addChars=a,h.prototype.addFonts=i,h.prototype.getCharData=r,h.prototype.getFontByName=n,h}(),ExpressionManager=function(){function sum(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("object"==typeof t&&"number"==typeof e)return t[0]=t[0]+e,t;if("number"==typeof t&&"object"==typeof e)return e[0]=t+e[0],e;if("object"==typeof t&&"object"==typeof e){for(var s=0,i=t.length,a=e.length,r=[];i>s||a>s;)r[s]=t[s]&&e[s]?t[s]+e[s]:t[s]||e[s],s+=1;return r}return 0}function sub(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("object"==typeof t&&"number"==typeof e)return t[0]=t[0]-e,t;if("number"==typeof t&&"object"==typeof e)return e[0]=t-e[0],e;if("object"==typeof t&&"object"==typeof e){for(var s=0,i=t.length,a=e.length,r=[];i>s||a>s;)r[s]=t[s]&&e[s]?t[s]-e[s]:t[s]||e[s],s+=1;return r}return 0}function mul(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;var s,i;if("object"==typeof t&&"number"==typeof e){for(i=t.length,s=0;i>s;s+=1)t[s]=t[s]*e;return t}if("number"==typeof t&&"object"==typeof e){for(i=e.length,s=0;i>s;s+=1)e[s]=t*e[s];return e}return 0}function div(t,e){if("number"==typeof t&&"number"==typeof e)return t/e;var s,i;if("object"==typeof t&&"number"==typeof e){for(i=t.length,s=0;i>s;s+=1)t[s]=t[s]/e;return t}if("number"==typeof t&&"object"==typeof e){for(i=e.length,s=0;i>s;s+=1)e[s]=t/e[s];return e}return 0}function clamp(t,e,s){return Math.min(Math.max(t,e),s)}function random(t,e){if(e||(e=0),t>e){var s=e;e=t,t=s}return t+Math.random()*(e-t)}function initiateExpression(elem,data){function effect(t){return elem.effectsManager.getEffect(t)}function nearestKey(t){var e=0,s=data.k.length,i={};for(e=0;s>e;e+=1){if(t===data.k[e].t){i.index=e;break}if(t<data.k[e].t){i.index=e;break}if(t>data.k[e].t&&e===s-1){i.index=s-1;break}}return i}function key(t){t-=1;var e,s={time:data.k[t].t/thisComp.globalData.frameRate};e=t===data.k.length-1?data.k[t-1].e:data.k[t].s;var i,a=e.length;for(i=0;a>i;i+=1)s[i]=e[i];return s}function execute(){"textSelector"===this.type&&(textIndex=this.textIndex,textTotal=this.textTotal),transform||(transform=elem.transform),!content&&elem.content&&(content=elem.content.bind(elem)),this.getPreValue&&this.getPreValue(),value=this.pv,time=this.comp.renderedFrame/this.comp.globalData.frameRate,bindedFn();var t,e;if(this.mult)if("number"==typeof this.v)this.v*=this.mult;else for(e=this.v.length,value===this.v&&(this.v=2===e?[value[0],value[1]]:[value[0],value[1],value[2]]),t=0;e>t;t+=1)this.v[t]*=this.mult;if("number"==typeof this.v)this.lastValue!==this.v&&(this.lastValue=this.v,this.mdf=!0);else for(e=this.v.length,t=0;e>t;t+=1)this.v[t]!==this.lastValue[t]&&(this.lastValue[t]=this.v[t],this.mdf=!0)}var val=data.x,transform,content,effect,thisComp=elem.comp,fnStr="var fn = function(){"+val+";this.v = $bm_rt;}";eval(fnStr);var bindedFn=fn.bind(this),numKeys=data.k?data.k.length:0,time,value,textIndex,textTotal;return execute}var ob={};return ob.initiateExpression=initiateExpression,ob}();!function(){ExpressionComp.prototype.layer=function(t){for(var e=0,s=this.layers.length;s>e;){if(this.layers[e].nm===t)return this.elements[e];e+=1}}}(),ShapeInterface.prototype.fillInterface=function(t){var e={get color(){return t.c.k&&t.c.getValue(),[t.c.pv[0],t.c.pv[1],t.c.pv[2]]},get opacity(){return t.o.k&&t.o.getValue(),t.o.pv}};return e},ShapeInterface.prototype.strokeInterface=function(t,e){var s={get color(){return e.c.k&&e.c.getValue(),[e.c.pv[0],e.c.pv[1],e.c.pv[2]]},get opacity(){return e.o.k&&e.o.getValue(),e.o.pv},get strokeWidth(){return e.w.k&&e.w.getValue(),e.w.pv},dashOb:{},get dash(){var s,i=e.d,a=t.d,r=a.length;for(s=0;r>s;s+=1)i.dataProps[s].p.k&&i.dataProps[s].p.getValue(),this.dashOb[a[s].nm]=i.dataProps[s].p.v;return this.dashOb}};return s},ShapeInterface.prototype.shapeInterface=function(t){var e={get shape(){return t.sh.k&&t.sh.getValue(),t.sh.pv}};return e},ShapeInterface.prototype.ellipseInterface=function(t){var e={get size(){return t.sh.s.k&&t.sh.s.getValue(),[t.sh.s.pv[0],t.sh.s.pv[1]]},get position(){return t.sh.p.k&&t.sh.p.getValue(),[t.sh.p.pv[0],t.sh.p.pv[1]]}};return e},ShapeInterface.prototype.rectangleInterface=function(t){var e="tm"===t.sh.ty?t.sh.prop:t.sh,s={get size(){return e.s.k&&e.s.getValue(),[e.s.pv[0],e.s.pv[1]]},get position(){return e.p.k&&e.p.getValue(),[e.p.pv[0],e.p.pv[1]]},get roundness(){return e.r.k&&e.r.getValue(),e.r.pv}};return s},ShapeInterface.prototype.trimInterface=function(t){var e={get start(){return t.tr.s.k&&t.tr.s.getValue(),t.tr.s.pv},get end(){return t.tr.e.k&&t.tr.e.getValue(),t.tr.e.pv},get offset(){return t.tr.o.k&&t.tr.o.getValue(),t.tr.o.pv}};return e},ShapeInterface.prototype.transformInterface=function(t){var e={get opacity(){return t.transform.mProps.o.k&&t.transform.mProps.o.getValue(),t.transform.mProps.o.pv},get position(){return t.transform.mProps.p.k&&t.transform.mProps.p.getValue(),[t.transform.mProps.p.pv[0],t.transform.mProps.p.pv[1]]},get anchorPoint(){return t.transform.mProps.a.k&&t.transform.mProps.a.getValue(),[t.transform.mProps.a.pv[0],t.transform.mProps.a.pv[1]]},get scale(){return t.transform.mProps.s.k&&t.transform.mProps.s.getValue(),[t.transform.mProps.s.pv[0],t.transform.mProps.s.pv[1]]},get rotation(){return t.transform.mProps.r.k&&t.transform.mProps.r.getValue(),t.transform.mProps.r.pv}};return e},ShapeInterface.prototype.groupInterface=function(t,e,s){var i,a,r=[],n=t.length;for(i=0;n>i;i+=1)"gr"===t[i].ty?(a={},this.groupInterface(t[i].it,e[i].it,a),r.push(a)):"sh"===t[i].ty?(a=this.shapeInterface(e[i]),r.push(a)):"fl"===t[i].ty?(a=this.fillInterface(e[i]),r.push(a)):"st"===t[i].ty?(a=this.strokeInterface(t[i],e[i]),r.push(a)):"el"===t[i].ty?(a=this.ellipseInterface(e[i]),r.push(a)):"rc"===t[i].ty?(a=this.rectangleInterface(e[i]),r.push(a)):"tr"===t[i].ty?s.transform=this.transformInterface(e[i]):"tm"===t[i].ty?(a=this.trimInterface(e[i]),r.push(a)):r.push("");s.content=function(e){var s,i=t.length;for(s=0;i>s;s+=1)if(t[s].nm===e)return r[s]}},ShapeInterface.prototype.buildExpressionInterface=function(){this.groupInterface(this.shapesData,this.viewData,this)};var PropertyFactory=function(){function t(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var t=this.comp.renderedFrame-this.offsetTime;if(t===this.lastFrame||this.lastFrame!==d&&(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,i=0,a=this.keyframes.length-1,r=1,n=!0;n;){if(e=this.keyframes[i],s=this.keyframes[i+1],i==a-1&&t>=s.t-this.offsetTime){e.h&&(e=s);break}if(s.t-this.offsetTime>t)break;a-1>i?i+=r:n=!1}var o,h,l,p,m,f=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?m=e.__fnct:(m=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y,e.n),e.__fnct=m),l=m("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime));var y,v=c.segmentLength*l,g=0;for(r=1,n=!0,p=c.points.length;n;){if(g+=c.points[f].partialLength*r,0===v||0===l||f==c.points.length-1){for(h=c.points[f].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?c.points[f].point[o]*this.mult:c.points[f].point[o],this.pv[o]=c.points[f].point[o],this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}if(v>g&&v<g+c.points[f+1].partialLength){for(y=(v-g)/c.points[f+1].partialLength,h=c.points[f].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?(c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y)*this.mult:c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.pv[o]=c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}p-1>f&&1==r||f>0&&-1==r?f+=r:n=!1}}}else{var b,E,P,S,C,k=!1;for(a=e.s.length,i=0;a>i;i+=1)1!==e.h&&(e.o.x instanceof Array?(k=!0,e.__fnct||(e.__fnct=[]),e.__fnct[i]||(b=e.o.x[i]||e.o.x[0],E=e.o.y[i]||e.o.y[0],P=e.i.x[i]||e.i.x[0],S=e.i.y[i]||e.i.y[0])):(k=!1,e.__fnct||(b=e.o.x,E=e.o.y,P=e.i.x,S=e.i.y)),k?e.__fnct[i]?m=e.__fnct[i]:(m=bez.getEasingCurve(b,E,P,S),e.__fnct[i]=m):e.__fnct?m=e.__fnct:(m=bez.getEasingCurve(b,E,P,S),e.__fnct=m),l=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:m("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))),C=1===e.h?e.s[i]:e.s[i]+(e.e[i]-e.s[i])*l,1===a?(this.v=this.mult?C*this.mult:C,
+this.pv=C,this.lastPValue!=this.pv&&(this.mdf=!0,this.lastPValue=this.pv)):(this.v[i]=this.mult?C*this.mult:C,this.pv[i]=C,this.lastPValue[i]!==this.pv[i]&&(this.mdf=!0,this.lastPValue[i]=this.pv[i]))}}this.lastFrame=t}}function e(){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime;if(this.lastFrame!==d&&(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,i;if(t<this.keyframes[0].t-this.offsetTime)this.mdf=!0,e=this.keyframes[0].s[0],i=!0;else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)this.mdf=!0,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],i=!0;else{this.mdf=!0;for(var a,r,n,o,h,l,p=0,m=this.keyframes.length-1,f=1,c=!0;c&&(a=this.keyframes[p],r=this.keyframes[p+1],!(r.t-this.offsetTime>t&&1==f));)m-1>p&&1==f||p>0&&-1==f?p+=f:c=!1;var u;if(1!==a.h){var y;a.__fnct?y=a.__fnct:(y=bez.getEasingCurve(a.o.x,a.o.y,a.i.x,a.i.y),a.__fnct=y),u=t>=r.t-this.offsetTime?1:t<a.t-this.offsetTime?0:y("",t-(a.t-this.offsetTime),0,1,r.t-this.offsetTime-(a.t-this.offsetTime)),s=a.e[0]}e=a.s[0],i=1===a.h}for(o=this.v.i.length,l=e.i[0].length,n=0;o>n;n+=1)for(h=0;l>h;h+=1)i?(this.v.i[n][h]=e.i[n][h],this.v.o[n][h]=e.o[n][h],this.v.v[n][h]=e.v[n][h],this.pv.i[n][h]=e.i[n][h],this.pv.o[n][h]=e.o[n][h],this.pv.v[n][h]=e.v[n][h]):(this.v.i[n][h]=e.i[n][h]+(s.i[n][h]-e.i[n][h])*u,this.v.o[n][h]=e.o[n][h]+(s.o[n][h]-e.o[n][h])*u,this.v.v[n][h]=e.v[n][h]+(s.v[n][h]-e.v[n][h])*u,this.pv.i[n][h]=e.i[n][h]+(s.i[n][h]-e.i[n][h])*u,this.pv.o[n][h]=e.o[n][h]+(s.o[n][h]-e.o[n][h])*u,this.pv.v[n][h]=e.v[n][h]+(s.v[n][h]-e.v[n][h])*u)}this.lastFrame=t}function s(t,e){this.getExpression=ExpressionManager.initiateExpression,e.x&&(this.k=!0,this.x=!0,this.getValue&&(this.getPreValue=this.getValue),this.getValue=this.getExpression(t,e))}function i(t,e,i){this.mult=i,this.v=i?e.k*i:e.k,this.pv=e.k,this.mdf=!1,this.comp=t.comp,this.k=!1,s.bind(this)(t,e)}function a(t,e,i){this.mult=i,this.mdf=!1,this.comp=t.comp,this.k=!1,s.bind(this)(t,e),this.v=new Array(e.k.length),this.pv=new Array(e.k.length);var a,r=e.k.length;for(a=0;r>a;a+=1)this.v[a]=i?e.k[a]*i:e.k[a],this.pv[a]=e.k[a]}function r(e,i,a){this.keyframes=i.k,this.offsetTime=e.data.st,this.lastValue=-99999,this.lastPValue=-99999,this.frameId=-1,this.k=!0,this.mult=a,this.elem=e,this.comp=e.comp,this.lastFrame=d,this.v=a?i.k[0].s[0]*a:i.k[0].s[0],this.pv=i.k[0].s[0],this.getValue=t,s.bind(this)(e,i)}function n(e,i,a){this.keyframes=i.k,this.offsetTime=e.data.st,this.k=!0,this.mult=a,this.elem=e,this.comp=e.comp,this.getValue=t,this.frameId=-1,this.v=new Array(i.k[0].s.length),this.pv=new Array(i.k[0].s.length),this.lastValue=new Array(i.k[0].s.length),this.lastPValue=new Array(i.k[0].s.length),this.lastFrame=d,s.bind(this)(e,i)}function o(t,e,s,o,h){var l;if(2===s)l=new c(t,e,h);else if(7===s)l=new v(t,e,h);else if(e.k.length)if("number"==typeof e.k[0])l=new a(t,e,o);else switch(s){case 0:l=new r(t,e,o);break;case 1:l=new n(t,e,o)}else l=new i(t,e,o);return(l.k||l.x)&&h.push(l),l}function h(t,e,i){this.comp=t.comp,this.k=!1,this.mdf=!1,this.closed=3===i?e.cl:e.closed,this.numNodes=3===i?e.pt.k.v.length:e.ks.k.v.length,this.v=3===i?e.pt.k:e.ks.k;var a=3===i?e.pt:e.ks;this.pv=this.v,s.bind(this)(t,a)}function l(t,s,i){this.comp=t.comp,this.offsetTime=t.data.st,this.getValue=e,this.keyframes=3===i?s.pt.k:s.ks.k,this.k=!0,this.closed=3===i?s.cl:s.closed;var a,r=this.keyframes[0].s[0].i.length,n=this.keyframes[0].s[0].i[0].length;for(this.numNodes=r,this.v={i:new Array(r),o:new Array(r),v:new Array(r)},this.pv={i:new Array(r),o:new Array(r),v:new Array(r)},a=0;r>a;a+=1)this.v.i[a]=new Array(n),this.v.o[a]=new Array(n),this.v.v[a]=new Array(n),this.pv.i[a]=new Array(n),this.pv.o[a]=new Array(n),this.pv.v[a]=new Array(n);this.lastFrame=d}function p(t,e,s,i,a){var r;if(3===s||4===s){var n=3===s?e.pt.k:e.ks.k;r=n.length?new l(t,e,s):new h(t,e,s)}else 5===s?r=new y(t,e):6===s&&(r=new u(t,e));var o=!1;if(a)for(var p=0,m=a.length;m>p;){if(!a[p].closed){o=!0;break}p+=1}return o&&(r=new g(r,a)),r.k&&i.push(r),r}function m(t,e,s,i){return new b(t,e,s,i)}function f(t,e,s){switch(e.t){case 0:return new P(t,e,s);case 1:return new E(t,e)}}var d=-999999,c=function(){function t(){return this.p.k&&this.getValue(),this.p.pv}function e(){return this.a.k&&this.getValue(),this.a.pv}function s(){return this.r.k&&this.getValue(),this.r.pv}function i(){return this.s.k&&this.getValue(),this.s.pv}function a(){return this.o.k&&this.o.getValue(),this.o.pv}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.data.p.s?this.v.reset().translate(this.px.v,this.py.v).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]):this.v.reset().translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]))}}return function(n,h,l){this.elem=n,this.frameId=-1,this.dynamicProperties=[],this.mdf=!1,this.data=h,this.getValue=r,this.v=new Matrix,this.a=o(n,h.a,1,0,this.dynamicProperties),h.p.s?(this.px=o(n,h.p.x,0,0,this.dynamicProperties),this.py=o(n,h.p.y,0,0,this.dynamicProperties)):this.p=o(n,h.p,1,0,this.dynamicProperties),this.s=o(n,h.s,1,.01,this.dynamicProperties),this.r=o(n,h.r,0,degToRads,this.dynamicProperties),this.o=o(n,h.o,0,.01,l),this.dynamicProperties.length?l.push(this):this.data.p.s?this.v.translate(this.px.v,this.py.v).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]):this.v.translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]),Object.defineProperty(this,"position",{get:t}),Object.defineProperty(this,"anchorPoint",{get:e}),Object.defineProperty(this,"rotation",{get:s}),Object.defineProperty(this,"scale",{get:i}),Object.defineProperty(this,"opacity",{get:a})}}(),u=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-a],this.v.i[0]=[t-i*s,e-a],this.v.o[0]=[t+i*s,e-a],this.v.v[1]=[t+i,e],this.v.i[1]=[t+i,e-a*s],this.v.o[1]=[t+i,e+a*s],this.v.v[2]=[t,e+a],this.v.i[2]=[t+i*s,e+a],this.v.o[2]=[t-i*s,e+a],this.v.v[3]=[t-i,e],this.v.i[3]=[t-i,e+a*s],this.v.o[3]=[t-i,e-a*s]):(this.v.v[0]=[t,e-a],this.v.o[0]=[t-i*s,e-a],this.v.i[0]=[t+i*s,e-a],this.v.v[1]=[t-i,e],this.v.o[1]=[t-i,e+a*s],this.v.i[1]=[t-i,e-a*s],this.v.v[2]=[t,e+a],this.v.o[2]=[t+i*s,e+a],this.v.i[2]=[t-i*s,e+a],this.v.v[3]=[t+i,e],this.v.o[3]=[t+i,e-a*s],this.v.i[3]=[t+i,e+a*s])}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()}}var s=.5519;return function(s,i){this.v={v:new Array(4),i:new Array(4),o:new Array(4),c:!0},this.numNodes=4,this.d=i.d,this.dynamicProperties=[],i.closed=!0,this.closed=!0,this.elem=s,this.comp=s.comp,this.frameId=-1,this.mdf=!1,this.getValue=e,this.convertEllToPath=t,this.p=o(s,i.p,1,0,this.dynamicProperties),this.s=o(s,i.s,1,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertEllToPath()}}(),y=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,i=this.s.v[1]/2,a=bm_min(s,i,this.r.v),r=a*(1-.5519);2===this.d||1===this.d?(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+s,e-i+r],this.v.v[1]=[t+s,e+i-a],this.v.o[1]=[t+s,e+i-r],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+s-a,e+i],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+s-r,e+i],this.v.v[3]=[t-s+a,e+i],this.v.o[3]=[t-s+r,e+i],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-s,e+i-r],this.v.v[5]=[t-s,e-i+a],this.v.o[5]=[t-s,e-i+r],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-s+a,e-i],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-s+r,e-i],this.v.v[7]=[t+s-a,e-i],this.v.o[7]=[t+s-r,e-i],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=[t+s,e-i+r],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+s-a,e-i],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+s-r,e-i],this.v.v[2]=[t-s+a,e-i],this.v.o[2]=[t-s+r,e-i],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-s,e-i+a],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-s,e-i+r],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=[t-s,e+i-r],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-s+a,e+i],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-s+r,e+i],this.v.v[6]=[t+s-a,e+i],this.v.o[6]=[t+s-r,e+i],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+s,e+i-a],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+s,e+i-r])}return function(s,i){this.v={v:new Array(8),i:new Array(8),o:new Array(8),c:!0},this.numNodes=8,this.elem=s,this.comp=s.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.p=o(s,i.p,1,0,this.dynamicProperties),this.s=o(s,i.s,1,0,this.dynamicProperties),this.r=o(s,i.r,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertRectToPath()}}(),v=function(){function t(t){if(this.elem.globalData.frameId!==this.frameId||t){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(),this.dynamicProperties[e].mdf&&(this.mdf=!0);if(this.mdf||t){var i=this.o.v%360/360;if(0===i&&0===this.s.v&&1==this.e.v)return void(this.isTrimming=!1);this.isTrimming=!0,0>i&&(i+=1);var a=this.s.v+i,r=this.e.v+i;if(a>r){var n=a;a=r,r=n}this.sValue=a,this.eValue=r,this.oValue=i}}}return function(e,s){this.elem=e,this.frameId=-1,this.dynamicProperties=[],this.sValue=0,this.eValue=0,this.oValue=0,this.mdf=!1,this.getValue=t,this.k=!1,this.isTrimming=!1,this.comp=e.comp,this.s=o(e,s.s,0,.01,this.dynamicProperties),this.e=o(e,s.e,0,.01,this.dynamicProperties),this.o=o(e,s.o,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.getValue(!0)}}(),g=function(){function t(t,e){this.totalLength=0;var s,i=t.v,a=t.o,r=t.i,n=i.length;for(s=0;n-1>s;s+=1)this.lengths[s]=bez.getBezierLength(i[s],i[s+1],a[s],r[s+1]),this.totalLength+=this.lengths[s].addedLength;e&&(this.lengths[s]=bez.getBezierLength(i[s],i[0],a[s],r[0]),this.totalLength+=this.lengths[s].addedLength)}function e(t,e,s,i,a){this.nextO[this.segmentCount]=e,this.nextI[this.segmentCount+1]=s,this.nextV[this.segmentCount+1]=i,this.pathStarted?this.nextV[this.segmentCount]=t:(this.pathStarted=!0,this.v.s[this.segmentCount]=t),this.segmentCount+=1}function s(t){this.mdf=t?!0:!1,this.prop.k&&this.prop.getValue();var e=0,s=this.trims.length;for(this.pathStarted=!1;s>e;){if(this.trims[e].mdf){this.mdf=!0;break}e+=1}if(this.mdf=this.prop.mdf?!0:this.mdf,this.mdf){this.nextO.length=0,this.nextI.length=0,this.nextV.length=0,this.v.s.length=0;var i=this.prop.closed;this.getSegmentsLength(this.prop.v,i);var a,r,n,o,h,l,p=this.prop.v,m=this.trims.length;for(a=0;m>a;a+=1)if(this.trims[a].isTrimming){if(r=this.trims[a].eValue,n=this.trims[a].sValue,o=this.trims[a].oValue,r===n)return this.v.v=this.nextV,this.v.o=this.nextO,void(this.v.i=this.nextI);1>=r?(this.segments[0].s=this.totalLength*n,this.segments[0].e=this.totalLength*r,this.segments[1].vl=!1):n>=1?(this.segments[0].s=this.totalLength*(n-1),this.segments[0].e=this.totalLength*(r-1),this.segments[1].vl=!1):(this.segments[0].s=this.totalLength*n,this.segments[0].e=this.totalLength,this.segments[1].s=0,this.segments[1].e=this.totalLength*(r-1),this.segments[1].vl=!0),this.v.v=p.v,this.v.o=p.o,this.v.i=p.i,l=this.v.v.length;var f=0,d=0;s=this.segments[1].vl?2:1;var c;for(this.segmentCount=0,e=0;s>e;e+=1){for(f=0,h=1;l>h;h++)if(d=this.lengths[h-1].addedLength,f+d<this.segments[e].s)f+=d;else{if(f>this.segments[e].e)break;this.segments[e].s<=f&&this.segments[e].e>=f+d?this.addSegment(this.v.v[h-1],this.v.o[h-1],this.v.i[h],this.v.v[h],this.lengths[h-1]):(c=bez.getNewSegment(this.v.v[h-1],this.v.v[h],this.v.o[h-1],this.v.i[h],(this.segments[e].s-f)/d,(this.segments[e].e-f)/d,this.lengths[h-1]),this.addSegment(c.pt1,c.pt3,c.pt4,c.pt2)),f+=d}i!==!1?f<=this.segments[e].e&&(d=this.lengths[h-1].addedLength,this.segments[e].s<=f&&this.segments[e].e>=f+d?this.addSegment(this.v.v[h-1],this.v.o[h-1],this.v.i[0],this.v.v[0],this.lengths[h-1]):(c=bez.getNewSegment(this.v.v[h-1],this.v.v[0],this.v.o[h-1],this.v.i[0],(this.segments[e].s-f)/d,(this.segments[e].e-f)/d,this.lengths[h-1]),this.addSegment(c.pt1,c.pt3,c.pt4,c.pt2))):this.pathStarted=!1}i=!1}else this.v.v=p.v,this.v.o=p.o,this.v.i=p.i;this.nextV.length?(this.v.v=this.nextV,this.v.o=this.nextO,this.v.i=this.nextI):this.v.s.length=0,this.v.c=i}}return function(i,a){this.trims=[],this.k=!1,this.mdf=!1,this.ty="tm",this.pathStarted=!1,this.segments=[{s:0,e:0,vl:!0},{s:0,e:0,vl:!1}],this.nextO=[],this.nextV=[],this.nextI=[],this.v={i:null,o:null,v:null,s:[],c:!1};var r,n=a.length;for(r=0;n>r;r+=1)a[r].closed||(this.k=a[r].trimProp.k?!0:this.k,this.trims.push(a[r].trimProp));this.prop=i,n=this.prop.numNodes-1,n+=this.prop.closed?1:0,this.lengths=new Array(n),this.k=i.k?!0:this.k,this.totalLength=0,this.getValue=s,this.addSegment=e,this.getSegmentsLength=t,this.k||(this.prop.getValue(),this.getValue(!0))}}(),b=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,i,a){this.elem=e,this.frameId=-1,this.dataProps=new Array(s.length),this.renderer=i,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(s.length-1),this.dashoffset=0;var r,n,h=s.length;for(r=0;h>r;r+=1)n=o(e,s[r].v,0,0,a),this.k=n.k?!0:this.k,this.dataProps[r]={n:s[r].n,p:n};this.getValue=t,this.k?a.push(this):this.getValue(!0)}}(),E=function(){function t(t,e){return this.textIndex=t+1,this.textTotal=e,this.getValue(),this.v}return function(e,i){this.pv=1,this.comp=e.comp,this.mult=.01,this.type="textSelector",this.textTotal=i.totalChars,s.bind(this)(e,i),this.getMult=t}}(),P=function(){function t(){if(this.dynamicProperties.length){var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue()}var s=this.data.totalChars,i=2===this.data.r?1:100/s,a=this.o.v/i,r=this.s.v/i+a,n=this.e.v/i+a;if(r>n){var o=r;r=n,n=o}this.finalS=r,this.finalE=n}function e(t){var e=bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1),r=0,n=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)r=o===n?t>=o?1:0:s(0,i(.5/(o-n)+(t-n)/(o-n),1)),r=e("",r,0,1,1);else if(3==h)r=o===n?t>=o?0:1:1-s(0,i(.5/(o-n)+(t-n)/(o-n),1)),r=e("",r,0,1,1);else if(4==h)o===n?r=t>=o?0:1:(r=s(0,i(.5/(o-n)+(t-n)/(o-n),1)),.5>r?r*=2:r=1-r);else if(5==h)if(o===n)r=t>=o?0:1;else{var l=o-n;r=-4/(l*l)*t*t+4/l*t}else 6==h?r=o===n?t>=o?0:1:(1+(Math.cos(Math.PI+2*Math.PI*(t-n)/(o-n))+0))/2:t>=a(n)&&(r=0>t-n?1-(n-t):s(0,i(o-t,1)));return r}var s=Math.max,i=Math.min,a=Math.floor;return function(s,i,a){this.mdf=!1,this.k=!1,this.data=i,this.dynamicProperties=[],this.getValue=t,this.getMult=e,this.comp=s.comp,this.finalS=0,this.finalE=0,this.s=o(s,i.s||{k:0},0,0,this.dynamicProperties),this.e="e"in i?o(s,i.e,0,0,this.dynamicProperties):{v:2===i.r?i.totalChars:100},this.o=o(s,i.o||{k:0},0,0,this.dynamicProperties),this.xe=o(s,i.xe||{k:0},0,0,this.dynamicProperties),this.ne=o(s,i.ne||{k:0},0,0,this.dynamicProperties),this.dynamicProperties.length?a.push(this):this.getValue()}}(),S={};return S.getProp=o,S.getShapeProp=p,S.getDashProp=m,S.getTextSelectorProp=f,S}();SVGRenderer.prototype.createItem=function(t,e,s,i){switch(t.ty){case 2:return this.createImage(t,e,s,i);case 0:return this.createComp(t,e,s,i);case 1:return this.createSolid(t,e,s,i);case 4:return this.createShape(t,e,s,i);case 5:return this.createText(t,e,s,i);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},SVGRenderer.prototype.buildItems=function(t,e,s,i,a){var r,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),i||(i=this);var o;for(r=n-1;r>=0;r--)s[r]=this.createItem(t[r],e,i,a),0===t[r].ty&&(o=[],this.buildItems(t[r].layers,s[r].getDomElement(),o,s[r],s[r].placeholder),s[r].setElements(o)),t[r].td&&s[r+1].setMatte(s[r].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)if(t[i].id)for(r=0;h>r;)s[r].data.id==t[i].id&&(o=s[r],s[r]=this.createItem(t[i],e,this,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,s[r],s[i].placeholder),s[r].setElements(n))),r+=1;else{var l=this.createItem(t[i],e,this);s.push(l),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,l.getDomElement(),n,l),l.setElements(n))}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},SVGRenderer.prototype.createBase=function(t,e,s,i){return new SVGBaseElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,s,i){return new IShapeElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createText=function(t,e,s,i){return new SVGTextElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createImage=function(t,e,s,i){return new IImageElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createComp=function(t,e,s,i){return new ICompElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createSolid=function(t,e,s,i){return new ISolidElement(t,e,this.globalData,s,i)},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","xMidYMid meet"),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"),i=document.createElementNS(svgNS,"rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+randomString(10);s.setAttribute("id",a),s.appendChild(i);var r=document.createElementNS(svgNS,"g");r.setAttribute("clip-path","url(#"+a+")"),this.animationItem.container.appendChild(r),e.appendChild(s),this.animationItem.container=r,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 i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;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=0;s>e;e++)this.elements[e].prepareFrame(t-this.layers[e].st);for(e=0;s>e;e++)this.elements[e].renderFrame()}},extendPrototype(ExpressionComp,SVGRenderer),CanvasRenderer.prototype.createItem=function(t,e){switch(t.ty){case 0:return this.createComp(t,e);case 1:return this.createSolid(t,e);case 2:return this.createImage(t,e);case 4:return this.createShape(t,e);case 5:return this.createText(t,e);case 99:return this.createPlaceHolder(t,e);default:return this.createBase(t,e)}return this.createBase(t,e)},CanvasRenderer.prototype.buildItems=function(t,e,s){e||(e=this.elements),s||(s=this);var i,a=t.length;for(i=0;a>i;i++)if(e[i]=this.createItem(t[i],s),0===t[i].ty){var r=[];this.buildItems(t[i].layers,r,e[i]),e[e.length-1].setElements(r)}},CanvasRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements);var r,n,o=s.length;for(i=0;a>i;i+=1)if(t[i].id)for(r=0;o>r;)s[r].data.id==t[i].id&&(s[r]=this.createItem(t[i],this),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,n,s[r]),s[r].setElements(n))),r+=1;else{var h=this.createItem(t[i],this);s.unshift(h),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,h),h.setElements(n))}},CanvasRenderer.prototype.createBase=function(t,e){return new CVBaseElement(t,e,this.globalData)},CanvasRenderer.prototype.createShape=function(t,e){return new CVShapeElement(t,e,this.globalData)},CanvasRenderer.prototype.createText=function(t,e){return new CVTextElement(t,e,this.globalData)},CanvasRenderer.prototype.createPlaceHolder=function(t){return new PlaceHolderElement(t,null,this.globalData)},CanvasRenderer.prototype.createImage=function(t,e){return new CVImageElement(t,e,this.globalData)},CanvasRenderer.prototype.createComp=function(t,e){return new CVCompElement(t,e,this.globalData)},CanvasRenderer.prototype.createSolid=function(t,e){return new CVSolidElement(t,e,this.globalData)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[2]||1!==t[3]||0!==t[4]||0!==t[5]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[2],t[3],t[4],t[5]);this.contextData.cTr.transform(t[0],t[1],t[2],t[3],t[4],t[5]);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])}},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(6));var s,i=6,a=this.contextData.saved[this.contextData.cArrPos];for(s=0;i>s;s+=1)a[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],i=6,a=this.contextData.cTr.props;for(e=0;i>e;e+=1)a[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),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.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.updateContainerSize(),this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document)},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,i=this.transformCanvas.w/this.transformCanvas.h;i>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,this.transformCanvas.sy,this.transformCanvas.tx,this.transformCanvas.ty],this.globalData.cWidth=t,this.globalData.cHeight=e},CanvasRenderer.prototype.buildStage=function(t,e,s){s||(s=this.elements);var i,a,r=e.length;for(i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemHierarchy(a,s[i],e,a.parent,s,!0),0==a.ty&&this.buildStage(null,a.layers,s[i].getElements())},CanvasRenderer.prototype.buildItemHierarchy=function(t,e,s,i,a,r){var n=0,o=s.length;for(r&&e.resetHierarchy();o>n;)s[n].ind===i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemHierarchy(t,e,s,s[n].parent,a,!1)),n+=1},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers.length;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.clearRect(0,0,this.globalData.cWidth,this.globalData.cHeight)):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()}},extendPrototype(ExpressionComp,CanvasRenderer),HybridRenderer.prototype.createItem=function(t,e,s,i){switch(t.ty){case 2:return this.createImage(t,e,s,i);case 0:return this.createComp(t,e,s,i);case 1:return this.createSolid(t,e,s,i);case 4:return this.createShape(t,e,s,i);case 5:return this.createText(t,e,s,i);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},HybridRenderer.prototype.buildItems=function(t,e,s,i,a){var r,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),i||(i=this);var o;for(r=n-1;r>=0;r--)s[r]=this.createItem(t[r],e,i,a),0===t[r].ty&&(o=[],this.buildItems(t[r].layers,s[r].getDomElement(),o,s[r],s[r].placeholder),s[r].setElements(o)),t[r].td&&s[r+1].setMatte(s[r].layerId)},HybridRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)for(r=0;h>r;){if(s[r].data.id==t[i].id){o=s[r],s[r]=this.createItem(t[i],e,this,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,s[r],s[i].placeholder),s[r].setElements(n));break}r+=1}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},HybridRenderer.prototype.createBase=function(t,e,s,i){return new SVGBaseElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},HybridRenderer.prototype.createShape=function(t,e,s,i){return s.isSvg?new IShapeElement(t,e,this.globalData,s,i):new HShapeElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createText=function(t,e,s,i){return s.isSvg?new SVGTextElement(t,e,this.globalData,s,i):new HTextElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createImage=function(t,e,s,i){return new IImageElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createComp=function(t,e,s,i){return s.isSvg?new ICompElement(t,e,this.globalData,s,i):new HCompElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createSolid=function(t,e,s,i){return s.isSvg?new ISolidElement(t,e,this.globalData,s,i):new HSolidElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.configAnimation=function(t){this.animationItem.container=document.createElement("div"),this.animationItem.container.style.width=t.w+"px",this.animationItem.container.style.height=t.h+"px",this.animationItem.container.style.transform="translate3d(0,0,0)",this.animationItem.container.style.position="absolute",this.animationItem.container.style.clip="rect(0px, "+t.w+"px, "+t.h+"px, 0px)",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,"svg");e.setAttribute("width","1"),e.setAttribute("height","1"),styleDiv(e),this.animationItem.container.appendChild(e);var s=document.createElementNS(svgNS,"defs");e.appendChild(s),this.globalData.defs=s,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,document)},HybridRenderer.prototype.buildStage=function(t,e,s){var i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},HybridRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},HybridRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;for(t=0;e>t;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0},HybridRenderer.prototype.updateContainerSize=function(){},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()}},extendPrototype(ExpressionComp,HybridRenderer),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.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)),console.log(2*this.storedData[t].x.v),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 i,a,r="";for(a=e.v.length,i=1;a>i;i+=1)1==i&&(r+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-1][1])+" "+bm_rnd(e.i[i][0])+","+bm_rnd(e.i[i][1])+" "+bm_rnd(e.v[i][0])+","+bm_rnd(e.v[i][1]);t.cl&&(r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-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!==r&&(t.inv?s.elem.setAttribute("d",this.solidPath+r):s.elem.setAttribute("d",r),s.lastPath=r)},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},SliderEffect.prototype.proxyFunction=function(){return this.p.v},AngleEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,ColorEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,PointEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,CheckboxEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,EffectsManager.prototype.getEffect=function(t){for(var e=this.data.ef,s=0,i=e.length;i>s;){if(e[s].nm===t)return this.effectElements[s];s+=1}},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.isVisible=!1);var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t);return this.data.hasMask&&this.maskManager.prepareFrame(t),this.currentFrameNum=t,this.isVisible},BaseElement.prototype.init=function(){this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.dynamicProperties=[],this.currentFrameNum=-99999,this.lastNum=-99999,this.data.ef&&(this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties),this.effect=this.effectsManager.getEffect.bind(this.effectsManager)),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,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,BaseElement.prototype.mask=function(t){return this.maskManager.getMask(t)},createElement(BaseElement,SVGBaseElement),SVGBaseElement.prototype.appendNodeToParent=function(t){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"),i=randomString(10);s.setAttribute("id",i),s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%");var a=document.createElementNS(svgNS,"feComponentTransfer");a.setAttribute("in","SourceGraphic"),s.appendChild(a);var r=document.createElementNS(svgNS,"feFuncA");r.setAttribute("type","table"),r.setAttribute("tableValues","1.0 0.0"),a.appendChild(r),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(#"+i+")"),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||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement.setAttribute("id",this.data.ln)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.data.hasMask&&(this.finalTransform.matMdf&&this.layerElement.setAttribute("transform","matrix("+s.props.join(",")+")"),this.finalTransform.opMdf&&this.layerElement.setAttribute("opacity",this.finalTransform.opacity)),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getDomElement=function(){return this.layerElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")},SVGBaseElement.prototype.hide=function(){},ITextElement.prototype.init=function(){this.parent.init.call(this);var t=this.data;this.renderedLetters=[],this.viewData={m:{a:PropertyFactory.getProp(this,t.t.m.a,1,0,this.dynamicProperties)}};var e=this.data.t;if(e.a.length){this.viewData.a=new Array(e.a.length);var s,i,a,r=e.a.length;for(s=0;r>s;s+=1)a=e.a[s],i={a:{},s:{}},"r"in a.a&&(i.a.r=PropertyFactory.getProp(this,a.a.r,0,degToRads,this.dynamicProperties)),"sk"in a.a&&(i.a.sk=PropertyFactory.getProp(this,a.a.sk,0,degToRads,this.dynamicProperties)),"sa"in a.a&&(i.a.sa=PropertyFactory.getProp(this,a.a.sa,0,degToRads,this.dynamicProperties)),"s"in a.a&&(i.a.s=PropertyFactory.getProp(this,a.a.s,1,.01,this.dynamicProperties)),"a"in a.a&&(i.a.a=PropertyFactory.getProp(this,a.a.a,1,0,this.dynamicProperties)),"o"in a.a&&(i.a.o=PropertyFactory.getProp(this,a.a.o,0,.01,this.dynamicProperties)),"p"in a.a&&(i.a.p=PropertyFactory.getProp(this,a.a.p,1,0,this.dynamicProperties)),"sw"in a.a&&(i.a.sw=PropertyFactory.getProp(this,a.a.sw,0,0,this.dynamicProperties)),"sc"in a.a&&(i.a.sc=PropertyFactory.getProp(this,a.a.sc,1,0,this.dynamicProperties)),"fc"in a.a&&(i.a.fc=PropertyFactory.getProp(this,a.a.fc,1,0,this.dynamicProperties)),"t"in a.a&&(i.a.t=PropertyFactory.getProp(this,a.a.t,0,0,this.dynamicProperties)),i.s=PropertyFactory.getTextSelectorProp(this,a.s,this.dynamicProperties),i.s.t=a.s.t,this.viewData.a[s]=i}else this.viewData.a=[];e.p&&"m"in e.p&&(this.viewData.p={f:PropertyFactory.getProp(this,e.p.f,0,0,this.dynamicProperties),l:PropertyFactory.getProp(this,e.p.l,0,0,this.dynamicProperties),m:this.maskManager.getMaskProperty(e.p.m)})},ITextElement.prototype.getMeasures=function(){var t,e,s,i,a=this.mHelper,r=this.renderType,n=this.data,o=n.t.d,h=o.l;if("m"in n.t.p){var l=this.viewData.p.m;if(!this.viewData.p.n||this.viewData.p.mdf){var p=l.v,m={tLength:0,segments:[]};i=p.v.length-1;var f;for(s=0;i>s;s+=1)f={s:p.v[s],e:p.v[s+1],to:[p.o[s][0]-p.v[s][0],p.o[s][1]-p.v[s][1]],ti:[p.i[s+1][0]-p.v[s+1][0],p.i[s+1][1]-p.v[s+1][1]]},bez.buildBezierData(f),m.tLength+=f.bezierData.segmentLength,m.segments.push(f);s=i,l.closed&&(f={s:p.v[s],e:p.v[0],to:[p.o[s][0]-p.v[s][0],p.o[s][1]-p.v[s][1]],ti:[p.i[0][0]-p.v[0][0],p.i[0][1]-p.v[0][1]]},bez.buildBezierData(f),m.tLength+=f.bezierData.segmentLength,m.segments.push(f)),this.viewData.p.pi=m}var d,c,u,m=this.viewData.p.pi,y=this.viewData.p.f.v,v=0,g=1,b=0,E=!0,P=m.segments;if(0>y&&l.closed)for(m.tLength<Math.abs(y)&&(y=-Math.abs(y)%m.tLength),v=P.length-1,u=P[v].bezierData.points,g=u.length-1;0>y;)y+=u[g].partialLength,g-=1,0>g&&(v-=1,u=P[v].bezierData.points,g=u.length-1);u=P[v].bezierData.points,c=u[g-1],d=u[g];var S,C,k=d.partialLength}i=h.length,t=0,e=0;var w,x,D,I,F,T=1.2*n.t.d.s*.714,M=!0,A=this.viewData,V=new Array(i),L=!1;I=A.a.length;var N,_,B,R,H,j,O,z,G,W,q,X,J,U,Y,K,Q=n._letters,$=-1,Z=y,tt=v,et=g,st=0;for(s=0;i>s;s+=1){switch(a.reset(),o.j){case 1:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line]),0);break;case 2:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line])/2,0)}if(j=1,h[s].n)t=0,e+=o.yOffset,e+=M?1:0,y=Z,M=!1,st=0,"m"in n.t.p&&(v=tt,g=et,u=P[v].bezierData.points,c=u[g-1],d=u[g],k=d.partialLength,b=0),V[s]=this.emptyProp;else{if("m"in n.t.p){$!==h[s].ind&&(h[$]&&(y+=h[$].extra),y+=h[s].an/2,$=h[s].ind),y+=A.m.a.v[0]*h[s].an/200;var it=0;for(D=0;I>D;D+=1)w=A.a[D].a,"p"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),it+=w.p.v[0]*_);for(E=!0;E;)if(b+k>=y+it||!u){if(S=(y+it-b)/d.partialLength,R=c.point[0]+(d.point[0]-c.point[0])*S,H=c.point[1]+(d.point[1]-c.point[1])*S,a.translate(R,H),n.t.p.p){C=(d.point[1]-c.point[1])/(d.point[0]-c.point[0]);var at=180*Math.atan(C)/Math.PI;d.point[0]<c.point[0]&&(at+=180),a.rotate(at*Math.PI/180)}a.translate(0,A.m.a.v[1]*T/100+e),E=!1}else u&&(b+=d.partialLength,g+=1,g>=u.length&&(g=0,v+=1,P[v]?u=P[v].bezierData.points:l.closed?(g=0,v=0,u=P[v].bezierData.points):u=null),u&&(c=d,d=u[g],k=d.partialLength));B=h[s].an/2-h[s].add}else a.translate(t,e),B=h[s].an/2-h[s].add,a.translate(B,0),a.translate(A.m.a.v[0]*h[s].an/200,A.m.a.v[1]*T/100);for(st+=h[s].l/2,D=0;I>D;D+=1)w=A.a[D].a,"t"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"m"in n.t.p?y+=w.t*_:t+=w.t.v*_);for(st+=h[s].l/2,D=0;I>D;D+=1)w=A.a[D].a,"p"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"m"in n.t.p?a.translate(0,w.p.v[1]*_):a.translate(w.p.v[0]*_,w.p.v[1]*_));for(o.strokeWidthAnim&&(z=n.t.d.sw||0),o.strokeColorAnim&&(O=n.t.d.sc?[n.t.d.sc[0],n.t.d.sc[1],n.t.d.sc[2]]:[0,0,0]),o.fillColorAnim&&(G=[n.t.d.fc[0],n.t.d.fc[1],n.t.d.fc[2]]),D=0;I>D;D+=1){if(w=A.a[D].a,x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"r"in w&&a.rotate(w.r.v*_),"sk"in w&&a.skewFromAxis(-(w.sk.v*_),-w.sa.v*_),"o"in w&&(j+=(w.o.v*_-j)*_),o.strokeWidthAnim&&"sw"in w&&(z+=w.sw.v*_),o.strokeColorAnim&&"sc"in w)for(W=0;3>W;W+=1)O[W]=Math.round(O[W]+(w.sc.v[W]-O[W])*_);if(o.fillColorAnim&&"fc"in w)for(W=0;3>W;W+=1)G[W]=Math.round(G[W]+(w.fc.v[W]-G[W])*_)}for(o.strokeWidthAnim&&(q=0>z?0:z),o.strokeColorAnim&&(X="rgb("+O[0]+","+O[1]+","+O[2]+")"),o.fillColorAnim&&(J="rgb("+G[0]+","+G[1]+","+G[2]+")"),D=0;I>D;D+=1)w=A.a[D].a,"s"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),a.scale(1+(w.s.v[0]-1)*_,1+(w.s.v[1]-1)*_));for(D=0;I>D;D+=1)w=A.a[D].a,"a"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),a.translate(-w.a.v[0]*_,-w.a.v[1]*_));"m"in n.t.p?(a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*T/100),y-=A.m.a.v[0]*h[s].an/200,h[s+1]&&$!==h[s+1].ind&&(y+=h[s].an/2,y+=o.tr/1e3*n.t.d.s),a.translate(-B,0)):(a.translate(-B,0),a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*T/100),t+=h[s].l+o.tr/1e3*n.t.d.s),"svg"===r?U=a.toCSS():Y=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]],K=j,Q?(N=Q[s],N.o!==K||N.sw!==q||N.sc!==X||N.fc!==J?(L=!0,F=new LetterProps(K,q,X,J,U,Y)):"svg"===r&&N.m!==U?(L=!0,F=new LetterProps(K,q,X,J,U)):"svg"===r||N.props[1]===a.props[1]&&N.props[2]===a.props[2]&&N.props[3]===a.props[3]&&N.props[4]===a.props[4]&&N.props[5]===a.props[5]?F=N:(L=!0,F=new LetterProps(K,q,X,J,null,[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]]))):(L=!0,F=new LetterProps(K,q,X,J,U,Y)),V[s]=F}}L&&(this.renderedLetters=V)},ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,SVGTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d;this.innerElem=document.createElementNS(svgNS,"g"),t.fc?this.innerElem.setAttribute("fill","rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.innerElem.setAttribute("fill","rgba(0,0,0,0)"),t.sc&&(this.innerElem.setAttribute("stroke","rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")"),this.innerElem.setAttribute("stroke-width",t.sw)),this.innerElem.setAttribute("font-size",t.s);var e=this.globalData.fontManager.getFontByName(t.f);this.innerElem.setAttribute("font-family",e.fFamily);var s,i,a=t.fWeight,r=t.fStyle;this.innerElem.setAttribute("font-style",r),this.innerElem.setAttribute("font-weight",a),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem);var n=t.l;i=n.length;var o,h,l,p,m,f,d,c=this.mHelper,u="",y=this.data.singleShape;if(this.globalData.fontManager.chars&&y)var v=0,g=0,b=t.lineWidths,E=t.boxWidth,P=!0;for(s=0;i>s;s+=1){if(this.globalData.fontManager.chars?y&&0!==s||(o=document.createElementNS(svgNS,"path")):o=document.createElementNS(svgNS,"text"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var S=this.globalData.fontManager.getCharData(t.t.charAt(s),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),C=S.data;if(c.reset(),y&&n[s].n&&(v=0,g+=t.yOffset,g+=P?1:0,P=!1),C){if(h=C.shapes[0].it,y){switch(t.j){case 1:c.translate(t.justifyOffset+(E-b[n[s].line]),0);break;case 2:c.translate(t.justifyOffset+(E-b[n[s].line])/2,0)}c.translate(v,g)}else u="";for(p=h.length,c.scale(t.s/100,t.s/100),l=0;p>l;l+=1){for(f=h[l].ks.k.i.length,d=h[l].ks.k,m=1;f>m;m+=1)1==m&&(u+=" M"+c.applyToPointStringified(d.v[0][0],d.v[0][1])),u+=" C"+c.applyToPointStringified(d.o[m-1][0],d.o[m-1][1])+" "+c.applyToPointStringified(d.i[m][0],d.i[m][1])+" "+c.applyToPointStringified(d.v[m][0],d.v[m][1]);u+=" C"+c.applyToPointStringified(d.o[m-1][0],d.o[m-1][1])+" "+c.applyToPointStringified(d.i[0][0],d.i[0][1])+" "+c.applyToPointStringified(d.v[0][0],d.v[0][1]),u+="z"}y||o.setAttribute("d",u)}y?v+=n[s].l:this.innerElem.appendChild(o)}else o.textContent=n[s].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(o);this.textSpans.push(o)}y&&(o.setAttribute("d",u),this.innerElem.appendChild(o))},SVGTextElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},SVGTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask||(this.finalTransform.matMdf&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),this.finalTransform.opMdf&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),!this.data.singleShape){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].setAttribute("transform",n.m),this.textSpans[s].setAttribute("opacity",n.o),n.sw&&this.textSpans[s].setAttribute("stroke-width",n.sw),n.sc&&this.textSpans[s].setAttribute("stroke",n.sc),n.fc&&this.textSpans[s].setAttribute("fill",n.fc))}},SVGTextElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null};var PlaceHolderElement=function(t,e,s){if(this.data=t,this.globalData=s,e){this.parentContainer=e;var i=document.createElementNS(svgNS,"g");i.setAttribute("id",this.data.id),e.appendChild(i),this.phElement=i}this.layerId="ly_"+randomString(10)};PlaceHolderElement.prototype.prepareFrame=function(){},PlaceHolderElement.prototype.renderFrame=function(){},PlaceHolderElement.prototype.draw=function(){},createElement(SVGBaseElement,ICompElement),extendPrototype(ExpressionComp,ICompElement),ICompElement.prototype.getComposingElement=function(){return this.layerElement},ICompElement.prototype.hide=function(){if(!this.hidden){var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t].hide();this.hidden=!0}},ICompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},ICompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.data.hasMask?this.elements[e].renderFrame():this.elements[e].renderFrame(this.finalTransform);this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this.parent.destroy.call();var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t].destroy()},createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assetData.p),t.maskedElement=t.innerElem},s=new Image;s.addEventListener("load",e,!1),s.addEventListener("error",e,!1),s.src=this.path+this.assetData.p,this.parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln)},IImageElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},IImageElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||((this.finalTransform.matMdf||this.firstFrame)&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),(this.finalTransform.opMdf||this.firstFrame)&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.ljEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},IShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),styleUnselectableDiv(this.layerElement),this.buildExpressionInterface()},IShapeElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var p;if(e[a].c=PropertyFactory.getProp(this,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this,t[a].o,0,.01,s),"st"==t[a].ty){if(p=document.createElementNS(svgNS,"g"),p.style.strokeLinecap=this.lcEnum[t[a].lc]||"round",p.style.strokeLinejoin=this.ljEnum[t[a].lj]||"round",p.style.fillOpacity=0,1==t[a].lj&&(p.style.strokeMiterlimit=t[a].ml),e[a].c.k||(p.style.stroke="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.strokeOpacity=e[a].o.v),e[a].w=PropertyFactory.getProp(this,t[a].w,0,null,s),e[a].w.k||(p.style.strokeWidth=e[a].w.v),t[a].d){var m=PropertyFactory.getDashProp(this,t[a].d,"svg",s);m.k||(p.style.strokeDasharray=m.dasharray,p.style.strokeDashoffset=m.dashoffset),e[a].d=m}}else p=document.createElementNS(svgNS,"path"),e[a].c.k||(p.style.fill="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.fillOpacity=e[a].o.v);this.layerElement===this.parentContainer?this.appendNodeToParent(p):this.layerElement.appendChild(p),this.stylesList.push({pathElement:p,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),i.length&&(t[a].trimmed=!0),e[a].sh=PropertyFactory.getShapeProp(this,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var y={closed:!1,trimProp:PropertyFactory.getProp(this,t[a],7,null,s)};e[a]={tr:y.trimProp},i.push(y),l.push(y)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},IShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();this.hidden=!1;var s=this.data.hasMask?this.transformHelper:this.finalTransform;this.renderShape(s,null,null,!0)},IShapeElement.prototype.hide=function(){if(!this.hidden){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode));this.hidden=!0}},IShapeElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.shapesData,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},IShapeElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var p=r.s?r.s:[];for(a=1;i>a;a+=1)p[a-1]?(e.st&&(h+=" M"+p[a-1][0]+","+p[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[a-1][0],p[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(p[0]?(e.st&&(h+=" M"+p[0][0]+","+p[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[0][0],p[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},IShapeElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.pathElement.style.fill="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.fillOpacity=e.o.v*s.opacity)},IShapeElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&a.k&&(a.mdf||this.firstFrame)&&(i.pathElement.style.strokeDasharray=a.dasharray,i.pathElement.style.strokeDashoffset=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.pathElement.style.stroke="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.strokeOpacity=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.pathElement.style.strokeWidth=e.w.v)},IShapeElement.prototype.destroy=function(){this.parent.destroy.call(),this.shapeData=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},extendPrototype(ShapeInterface,IShapeElement),ShapeItemElement.prototype.appendNodeToParent=SVGBaseElement.prototype.appendNodeToParent,ShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var p;if(e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),
+e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty){if(p=document.createElementNS(svgNS,"g"),p.style.strokeLinecap=this.lcEnum[t[a].lc]||"round",p.style.strokeLinejoin=this.ljEnum[t[a].lj]||"round",p.style.fillOpacity=0,1==t[a].lj&&(p.style.strokeMiterlimit=t[a].ml),e[a].c.k||(p.style.stroke="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.strokeOpacity=e[a].o.v),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(p.style.strokeWidth=e[a].w.v),t[a].d){var m=PropertyFactory.getDashProp(this.elemData,t[a].d,"svg",s);m.k?e[a].d=m:(p.style.strokeDasharray=m.dasharray,p.style.strokeDashoffset=m.dashoffset)}}else p=document.createElementNS(svgNS,"path"),e[a].c.k||(p.style.fill="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.fillOpacity=e[a].o.v);this.shape===this.parentContainer?this.appendNodeToParent(p):this.shape.appendChild(p),this.stylesList.push({pathElement:p,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var y={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(y),l.push(y)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},ShapeItemElement.prototype.getElement=function(){return this.shape},ShapeItemElement.prototype.hideShape=function(){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode))},ShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},ShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var p=r.s?r.s:[];for(a=1;i>a;a+=1)p[a-1]?(e.st&&(h+=" M"+p[a-1][0]+","+p[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[a-1][0],p[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(p[0]?(e.st&&(h+=" M"+p[0][0]+","+p[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[0][0],p[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},ShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.pathElement.style.fill="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.fillOpacity=e.o.v*s.opacity)},ShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.pathElement.style.strokeDasharray=a.dasharray,i.pathElement.style.strokeDashoffset=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.pathElement.style.stroke="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.strokeOpacity=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.pathElement.style.strokeWidth=e.w.v)},ShapeItemElement.prototype.destroy=function(t,e){this.shape=null,this.data=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement===this.parentContainer?this.appendNodeToParent(t):this.layerElement.appendChild(t),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.innerElem=t},ISolidElement.prototype.hide=IImageElement.prototype.hide,ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy,createElement(BaseElement,CVBaseElement),CVBaseElement.prototype.createElements=function(){},CVBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(!this.isVisible)return this.isVisible;this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]);return this.data.hasMask&&(this.globalData.renderer.save(!0),this.maskManager.renderFrame(s)),this.isVisible},CVBaseElement.prototype.getCurrentAnimData=function(){return this.currentAnimData},CVBaseElement.prototype.addMasks=function(t){this.maskManager=new CVMaskElement(t,this,this.globalData)},CVBaseElement.prototype.destroy=function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager&&this.maskManager.destroy()},CVBaseElement.prototype.mHelper=new Matrix,createElement(CVBaseElement,CVCompElement),CVCompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},CVCompElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e,s=this.layers.length;for(e=s-1;e>=0;e-=1)this.elements[e].renderFrame(this.finalTransform);this.data.hasMask&&this.globalData.renderer.restore(!0),this.firstFrame&&(this.firstFrame=!1)}},CVCompElement.prototype.setElements=function(t){this.elements=t},CVCompElement.prototype.getElements=function(){return this.elements},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.layers=null,this.elements=null,this.parent.destroy.call()},createElement(CVBaseElement,CVImageElement),CVImageElement.prototype.createElements=function(){var t=this,e=function(){t.animationItem.elementLoaded()},s=function(){t.failed=!0,t.animationItem.elementLoaded()};this.img=new Image,this.img.addEventListener("load",e,!1),this.img.addEventListener("error",s,!1),this.img.src=this.path+this.assetData.p,this.parent.createElements.call(this)},CVImageElement.prototype.renderFrame=function(t){if(!this.failed&&this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.drawImage(this.img,0,0),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},CVImageElement.prototype.destroy=function(){this.img=null,this.animationItem=null,this.parent.destroy.call()},CVMaskElement.prototype.getMaskProperty=function(t){return this.viewData[t]},CVMaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)},CVMaskElement.prototype.renderFrame=function(t){var e,s,i,a,r,n=this.ctx,o=this.data.masksProperties.length,h=!1;for(e=0;o>e;e++)if("n"!==this.masksProperties[e].mode){h===!1&&(n.beginPath(),h=!0),this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.globalData.compWidth,0),n.lineTo(this.globalData.compWidth,this.globalData.compHeight),n.lineTo(0,this.globalData.compHeight),n.lineTo(0,0)),r=this.viewData[e].v,s=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.moveTo(s[0],s[1]);var l,p=r.v.length;for(l=1;p>l;l++)s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[l][0],r.i[l][1]),a=t.applyToPointArray(r.v[l][0],r.v[l][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1]);s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[0][0],r.i[0][1]),a=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1])}h&&n.clip()},CVMaskElement.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].pv};e+=1}},CVMaskElement.prototype.destroy=function(){this.ctx=null},createElement(CVBaseElement,CVShapeElement),CVShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},CVShapeElement.prototype.ljEnum={1:"butt",2:"round",3:"butt"},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),this.buildExpressionInterface()},CVShapeElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],p=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var m=PropertyFactory.getDashProp(this,t[a].d,"canvas",s);e[a].d=m,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),i.length&&(t[a].trimmed=!0),e[a].sh=PropertyFactory.getShapeProp(this,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this,t[a],7,null,s)};i.push(u),p.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=p.length,a=0;h>a;a+=1)p[a].closed=!0},CVShapeElement.prototype.renderFrame=function(t){this.parent.renderFrame.call(this,t)!==!1&&(this.renderShape(this.finalTransform,null,null,!0),this.data.hasMask&&this.globalData.renderer.restore(!0))},CVShapeElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.shapesData,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var p,m,f,d,c,u,y,v=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(y=this.stylesList[a].type,"st"!==y||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,m=c.length,"st"===y?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml||0):g.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),"st"!==y&&g.beginPath(),p=0;m>p;p+=1){for("st"===y?(v.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[p].tr),u=c[p].nodes):u=c[p].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===y&&(g.stroke(),v.restore())}"st"!==y&&g.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.viewData.length=0,this.parent.destroy.call()},extendPrototype(ShapeInterface,CVShapeElement),CVShapeItemElement.prototype.dashResetter=[],CVShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],p=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var m=PropertyFactory.getDashProp(this.elemData,t[a].d,"canvas",s);e[a].d=m,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(u),p.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=p.length,a=0;h>a;a+=1)p[a].closed=!0},CVShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var p,m,f,d,c,u,y,v=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(y=this.stylesList[a].type,"st"!==y||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,m=c.length,"st"===y?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml):g.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),g.beginPath(),p=0;m>p;p+=1){for("st"===y?(v.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[p].tr),u=c[p].nodes):u=c[p].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===y&&(g.stroke(),v.restore())}"st"!==y&&g.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeItemElement.prototype.destroy=function(){this.data=null,this.globalData=null,this.canvasContext=null},createElement(CVBaseElement,CVSolidElement),CVSolidElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.fillStyle=this.data.sc,e.fillRect(0,0,this.data.sw,this.data.sh),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(CVBaseElement,CVTextElement),CVTextElement.prototype.init=ITextElement.prototype.init,CVTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,CVTextElement.prototype.getMult=ITextElement.prototype.getMult,CVTextElement.prototype.tHelper=document.createElement("canvas").getContext("2d"),CVTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d,e=!1;t.fc?(e=!0,this.values.fill="rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.values.sWidth=t.sw);var i,a,r=this.globalData.fontManager.getFontByName(t.f),n=this.mHelper;this.stroke=s,this.values.fValue=t.s+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.t.length,this.tHelper.font=this.values.fValue;var o,h,l,p,m,f,d,c,u,y;for(i=0;a>i;i+=1){if(o=this.globalData.fontManager.getCharData(t.t.charAt(i),r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),n.reset(),n.scale(t.s/100,t.s/100),h=o.data)for(m=h.shapes[0].it,d=m.length,u=new Array(d),f=0;d>f;f+=1){for(p=m[f].ks.k.i.length,c=m[f].ks.k,y=[],l=1;p>l;l+=1)1==l&&y.push(n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),y.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[l][0],c.i[l][1]),n.applyToY(c.i[l][0],c.i[l][1]),n.applyToX(c.v[l][0],c.v[l][1]),n.applyToY(c.v[l][0],c.v[l][1]));y.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[0][0],c.i[0][1]),n.applyToY(c.i[0][0],c.i[0][1]),n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),u[f]=y}else u=[];this.textSpans.push({elem:u})}},CVTextElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext,s=this.finalTransform.mat.props;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.font=this.values.fValue,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.getMeasures();var i,a,r,n,o,h,l=this.renderedLetters,p=this.data.t.d.l;a=p.length;var m,f,d,c=null,u=null,y=null;for(i=0;a>i;i+=1)if(!p[i].n){if(m=l[i],this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(m.props),this.globalData.renderer.ctxOpacity(m.o),this.fill){for(m.fc?c!==m.fc&&(c=m.fc,e.fillStyle=m.fc):c!==this.values.fill&&(c=this.values.fill,e.fillStyle=this.values.fill),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(m.sw?y!==m.sw&&(y=m.sw,e.lineWidth=m.sw):y!==this.values.sWidth&&(y=this.values.sWidth,e.lineWidth=this.values.sWidth),m.sc?u!==m.sc&&(u=m.sc,e.strokeStyle=m.sc):u!==this.values.stroke&&(u=this.values.stroke,e.strokeStyle=this.values.stroke),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}this.globalData.renderer.restore()}this.globalData.renderer.restore(this.data.hasMask)}},createElement(BaseElement,HBaseElement),HBaseElement.prototype.appendNodeToParent=function(t){if(this.placeholder){var e=this.placeholder.phElement;e.parentNode.insertBefore(t,e)}else this.parentContainer.appendChild(t)},HBaseElement.prototype.createElements=function(){this.data.hasMask?(this.layerElement=document.createElementNS(svgNS,"svg"),this.appendNodeToParent(this.layerElement),this.maskedElement=this.layerElement):this.layerElement=this.parentContainer,!this.data.ln||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement.setAttribute("id",this.data.ln)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},HBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.layerElement.style.transform="matrix3d("+s.props[0]+","+s.props[1]+",0,0, "+s.props[2]+","+s.props[3]+",0,0, 0,0,1,0, "+s.props[4]+","+s.props[5]+",0,1)",this.layerElement.style.opacity=this.finalTransform.opacity,this.isVisible},HBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},HBaseElement.prototype.getDomElement=function(){return this.layerElement},HBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},HBaseElement.prototype.hide=function(){},createElement(HBaseElement,HSolidElement),HSolidElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),t.appendChild(e),this.layerElement=t,this.parentContainer.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln);var s=document.createElementNS(svgNS,"rect");s.setAttribute("width",this.data.sw),s.setAttribute("height",this.data.sh),s.setAttribute("fill",this.data.sc),e.appendChild(s),this.data.hasMask&&(this.maskedElement=s)},HSolidElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},HSolidElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),void(this.firstFrame&&(this.firstFrame=!1)))},HSolidElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},
+createElement(HBaseElement,HCompElement),extendPrototype(ExpressionComp,HCompElement),HCompElement.prototype.getDomElement=function(){return this.composingElement},HCompElement.prototype.getComposingElement=function(){return this.layerElement},HCompElement.prototype.createElements=function(){if(this.layerElement=document.createElement("div"),styleDiv(this.layerElement),this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.layerElement.style.clip="rect(0px, "+this.data.w+"px, "+this.data.h+"px, 0px)",this.layerElement!==this.parentContainer&&(this.placeholder=null),this.data.hasMask){var t=document.createElementNS(svgNS,"svg");t.setAttribute("width",this.data.w),t.setAttribute("height",this.data.h);var e=document.createElementNS(svgNS,"g");t.appendChild(e),this.layerElement.appendChild(t),this.maskedElement=e,this.composingElement=e}else this.composingElement=this.layerElement;this.appendNodeToParent(this.layerElement)},HCompElement.prototype.hide=ICompElement.prototype.hide,HCompElement.prototype.prepareFrame=ICompElement.prototype.prepareFrame,HCompElement.prototype.setElements=ICompElement.prototype.setElements,HCompElement.prototype.getElements=ICompElement.prototype.getElements,HCompElement.prototype.destroy=ICompElement.prototype.destroy,HCompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.elements[e].renderFrame();this.firstFrame&&(this.firstFrame=!1)},createElement(HBaseElement,HShapeElement);var parent=HShapeElement.prototype.parent;extendPrototype(IShapeElement,HShapeElement),HShapeElement.prototype.parent=parent,HShapeElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");if(e.setAttribute("width",this.data.bounds.r-this.data.bounds.l),e.setAttribute("height",this.data.bounds.b-this.data.bounds.t),e.setAttribute("viewBox",this.data.bounds.l+" "+this.data.bounds.t+" "+(this.data.bounds.r-this.data.bounds.l)+" "+(this.data.bounds.b-this.data.bounds.t)),e.style.transform="translate("+this.data.bounds.l+"px,"+this.data.bounds.t+"px)",this.data.hasMask){var s=document.createElementNS(svgNS,"g");t.appendChild(e),e.appendChild(s),this.maskedElement=s,this.layerElement=s}else t.appendChild(e),this.layerElement=e;this.parentContainer.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),this.buildExpressionInterface(),this.layerElement=t},HShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden=!1,void this.renderShape(this.transformHelper,null,null,!0))},createElement(HBaseElement,HTextElement),HTextElement.prototype.init=ITextElement.prototype.init,HTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,HTextElement.prototype.createElements=function(){var t=this.data.t.d,e=document.createElement("div");if(styleDiv(e),this.layerElement=e,this.data.hasMask){var s=document.createElementNS(svgNS,"svg");this.cont=s,this.compW=this.comp.data?this.comp.data.w:this.globalData.compSize.w,this.compH=this.comp.data?this.comp.data.h:this.globalData.compSize.h,s.setAttribute("width",this.compW),s.setAttribute("height",this.compH);var i=document.createElementNS(svgNS,"g");s.appendChild(i),e.appendChild(s),this.maskedElement=i,this.innerElem=i}else this.innerElem=e;this.parentContainer.appendChild(e),this.innerElem.style.fill=t.fc?"rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")":"rgba(0,0,0,0)",t.sc&&(this.innerElem.style.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.innerElem.style.strokeWidth=t.sw+"px"),this.innerElem.style.fontSize=t.s+"px";var a=this.globalData.fontManager.getFontByName(t.f);this.innerElem.style.fontFamily=a.fFamily;var r,n,o=t.fWeight,h=t.fStyle;this.innerElem.style.fontStyle=h,this.innerElem.style.fontWeight=o;var l=t.l;n=l.length;{var p,m,f,d,c,u,y,v,g,b=this.mHelper,E="";this.data.singleShape}for(r=0;n>r;r+=1){if(this.globalData.fontManager.chars?(p=document.createElementNS(svgNS,"path"),this.data.hasMask||(m=document.createElement("div"),f=document.createElementNS(svgNS,"svg"),m.appendChild(f),f.appendChild(p),styleDiv(m))):p=document.createElementNS(svgNS,"text"),p.setAttribute("stroke-linecap","butt"),p.setAttribute("stroke-linejoin","round"),p.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var P=this.globalData.fontManager.getCharData(t.t.charAt(r),a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),S=P.data;if(b.reset(),S){for(d=S.shapes[0].it,E="",u=d.length,b.scale(t.s/100,t.s/100),c=0;u>c;c+=1){for(v=d[c].ks.k.i.length,g=d[c].ks.k,y=1;v>y;y+=1)1==y&&(E+=" M"+b.applyToPointStringified(g.v[0][0],g.v[0][1])),E+=" C"+b.applyToPointStringified(g.o[y-1][0],g.o[y-1][1])+" "+b.applyToPointStringified(g.i[y][0],g.i[y][1])+" "+b.applyToPointStringified(g.v[y][0],g.v[y][1]);E+=" C"+b.applyToPointStringified(g.o[y-1][0],g.o[y-1][1])+" "+b.applyToPointStringified(g.i[0][0],g.i[0][1])+" "+b.applyToPointStringified(g.v[0][0],g.v[0][1]),E+="z"}p.setAttribute("d",E)}if(this.data.hasMask)this.innerElem.appendChild(p);else{this.innerElem.appendChild(m);var C=t.s/100;if(S){var k=Math.ceil(S.bounds.r*C),w=Math.floor(S.bounds.t*C),x=Math.floor(S.bounds.l*C),D=Math.ceil(S.bounds.b*C);f.setAttribute("width",k-x),f.setAttribute("height",D-w),f.setAttribute("viewBox",x+" "+w+" "+(k-x)+" "+(D-w)),f.style.transform="translate("+x+"px,"+w+"px)"}}}else p.textContent=l[r].val,p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(p);this.textSpans.push(this.data.hasMask?p:m),this.textPaths.push(p)}},HTextElement.prototype.hide=SVGTextElement.prototype.hide,HTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask&&this.finalTransform.matMdf&&(this.cont.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),this.cont.style.transform="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)"),!this.data.singleShape||this.firstFrame){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].style.transform=n.m,this.textSpans[s].style.opacity=n.o,n.sw&&this.textPaths[s].setAttribute("stroke-width",n.sw),n.sc&&this.textPaths[s].setAttribute("stroke",n.sc),n.fc&&this.textPaths[s].setAttribute("fill",n.fc));if(this.data.hasMask){var o=this.innerElem.getBBox();this.currentBBox.w!==o.width&&(this.currentBBox.w=o.width,this.cont.setAttribute("width",o.width)),this.currentBBox.h!==o.height&&(this.currentBBox.h=o.height,this.cont.setAttribute("height",o.height)),(this.currentBBox.w!==o.width||this.currentBBox.h!==o.height||this.currentBBox.x!==o.x||this.currentBBox.y!==o.y)&&(this.currentBBox.w=o.width,this.currentBBox.h=o.height,this.currentBBox.x=o.x,this.currentBBox.y=o.y,this.cont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.cont.style.transform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}this.firstFrame&&(this.firstFrame=!1)}},HTextElement.prototype.destroy=SVGTextElement.prototype.destroy;var animationManager=function(){function t(t,e){if(!t)return null;for(var s=0;E>s;){if(v[s].elem==t&&null!==v[s].elem)return v[s].animation;s+=1}var i=new AnimationItem;return i.setData(t,e),v.push({elem:t,animation:i}),E+=1,i}function e(t){var e=new AnimationItem;return e.setParams(t),v.push({elem:null,animation:e}),E+=1,e}function s(t,e){var s;for(s=0;E>s;s+=1)v[s].animation.setSpeed(t,e)}function i(t,e){var s;for(s=0;E>s;s+=1)v[s].animation.setDirection(t,e)}function a(t){var e;for(e=0;E>e;e+=1)v[e].animation.play(t)}function r(t,e){b=!1,g=Date.now();var s;for(s=0;E>s;s+=1)v[s].animation.moveFrame(t,e)}function n(t){var e,s=t-g;for(e=0;E>e;e+=1)v[e].animation.renderer.destroyed?(v.splice(e,1),e-=1,E-=1):v[e].animation.advanceTime(s);g=t,requestAnimationFrame(n)}function o(t){g=t,requestAnimationFrame(n)}function h(t){var e;for(e=0;E>e;e+=1)v[e].animation.pause(t)}function l(t,e,s){var i;for(i=0;E>i;i+=1)v[i].animation.goToAndStop(t,e,s)}function p(t){var e;for(e=0;E>e;e+=1)v[e].animation.stop(t)}function m(t){var e;for(e=0;E>e;e+=1)v[e].animation.togglePause(t)}function f(t){var e;for(e=0;E>e;e+=1)v[e].animation.destroy(t)}function d(e,s,i){var a,r=document.getElementsByClassName("bodymovin"),n=r.length;for(a=0;n>a;a+=1)i&&r[a].setAttribute("data-bm-type",i),t(r[a],e);if(s&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),t(h,e)}}function c(){var t;for(t=0;E>t;t+=1)v[t].animation.resize()}function u(){requestAnimationFrame(o)}var y={},v=[],g=0,b=!0,E=0;return setTimeout(u,0),y.registerAnimation=t,y.loadAnimation=e,y.setSpeed=s,y.setDirection=i,y.play=a,y.moveFrame=r,y.pause=h,y.stop=p,y.togglePause=m,y.searchAnimations=d,y.resize=c,y.start=u,y.goToAndStop=l,y.destroy=f,y}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.repeat="indefinite",this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.isScrolling=!1,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.renderedFrameCount=0,this.scaleMode="fit",this.math=Math,this.removed=!1,this.timeCompleted=0,this.segmentPos=0,this.segments=[]};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var s=t.animType?t.animType:t.renderer?t.renderer:"canvas";switch(s){case"canvas":this.renderer=new CanvasRenderer(this,t.renderer);break;case"svg":this.renderer=new SVGRenderer(this,t.renderer);break;case"hybrid":case"html":this.renderer=new HybridRenderer(this,t.renderer)}if(this.animType=s,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},AnimationItem.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||(s.loop="false"===a?!1:"true"===a?!0:parseInt(a)),s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var r=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===r&&(s.prerender=!1),this.setParams(s)},AnimationItem.prototype.includeLayers=function(t){var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;n>s;s+=1)if(r[s].id)for(e=0;a>e;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}else"svg"==this.animType?i.push(r[s]):i.unshift(r[s]);if(t.assets)for(a=t.assets.length,e=0;a>e;e+=1)this.animationData.assets.push(t.assets[e]);dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),this.renderer.buildStage(this.container,this.layers),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.animationData._id=this.animationID,this.animationData._animType=this.animType,this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.loadSegments(),dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():this.checkLoaded()},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(this.renderer.buildItems(this.animationData.layers),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(this.renderer.buildStage(this.container,this.layers),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=subframeEnabled?this.currentRawFrame:this.math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1)},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0)},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?(this.isPaused=!1,this.play()):(this.isPaused=!0,this.pause()))},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.isPaused=!0)},AnimationItem.prototype.advanceTime=function(t){this.isPaused!==!0&&this.isScrolling!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier)},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.trigger("segmentStart")},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;i>s;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&(this.adjustSegment(this.segments.shift()),this.setCurrentRawFrameValue(0)),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||this.renderer.destroy()},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t;var e=!1;if(this.currentRawFrame>=this.totalFrames){if(this.segments.length&&(e=!0),this.loop===!1)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");if(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete")}else if(this.currentRawFrame<0)return this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1?(this.currentRawFrame=0,this.gotoFrame(),this.pause(),void this.trigger("complete")):(this.trigger("loopComplete"),this.currentRawFrame=this.totalFrames+this.currentRawFrame,void this.gotoFrame());if(e){var s=this.currentRawFrame%this.totalFrames;this.adjustSegment(this.segments.shift()),this.currentRawFrame=s}else this.currentRawFrame=this.currentRawFrame%this.totalFrames;this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;s>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames))},AnimationItem.prototype.addEventListener=_addEventListener,AnimationItem.prototype.removeEventListener=_removeEventListener,AnimationItem.prototype.triggerEvent=_triggerEvent,function(t){function e(t){animationManager.play(t)}function s(t){animationManager.pause(t)}function i(t){animationManager.togglePause(t)}function a(t,e){animationManager.setSpeed(t,e)}function r(t,e){animationManager.setDirection(t,e)}function n(t){animationManager.stop(t)}function o(t){animationManager.moveFrame(t)}function h(){E===!0?animationManager.searchAnimations(P,E,S):animationManager.searchAnimations()}function l(t){return animationManager.registerAnimation(t)}function p(){animationManager.resize()}function m(){animationManager.start()}function f(t,e,s){animationManager.goToAndStop(t,e,s)}function d(t){subframeEnabled=t}function c(t){return E===!0&&(t.animationData=JSON.parse(P)),animationManager.loadAnimation(t)}function u(t){return animationManager.destroy(t)}function y(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(defaultCurveSegments>=50?!1:!0)}function v(){"complete"===document.readyState&&(clearInterval(D),h())}function g(t){for(var e=x.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var b={};b.play=e,b.pause=s,b.togglePause=i,b.setSpeed=a,b.setDirection=r,b.stop=n,b.moveFrame=o,b.searchAnimations=h,b.registerAnimation=l,b.loadAnimation=c,b.setSubframeRendering=d,b.resize=p,b.start=m,b.goToAndStop=f,b.destroy=u,b.setQuality=y,b.version="3.1.7",b.checkReady=v,t.bodymovin=b;var E="__[STANDALONE]__",P="__[ANIMATIONDATA]__",S="";if(E){var C=document.getElementsByTagName("script"),k=C.length-1,w=C[k],x=w.src.replace(/^[^\?]+\??/,"");S=g("renderer")}var D=setInterval(v,100)}(window);}(window));
\ No newline at end of file
diff --git a/extension/assets/player/bm.js.gz b/extension/assets/player/bm.js.gz
index 5702517..039650f 100644
--- a/extension/assets/player/bm.js.gz
+++ b/extension/assets/player/bm.js.gz
Binary files differ
diff --git a/extension/assets/player/standalone.js b/extension/assets/player/standalone.js
index 06ad61d..855bee8 100644
--- a/extension/assets/player/standalone.js
+++ b/extension/assets/player/standalone.js
@@ -1,4 +1,5 @@
-(function(window){function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,s,i,a,r){return t.reset().translate(a,r).rotate(e).scale(s,i).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 roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.verticalAlign="top",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="hidden",styleUnselectableDiv(t)}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=0>i?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,s,i){this.type=t,this.currentLoop=e,this.totalLoops=s,this.direction=0>i?-1:1}function BMSegmentStartEvent(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}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,i=this._cbs[t].length;i>s;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=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,i=0;s>i;i++)this._cbs[t][i](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}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,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.props=r}function iterateDynamicProperties(t){var e,s=this.dynamicProperties;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)}function createElement(t,e,s){if(!e){var i=Object.create(t.prototype,s),a={};return i&&"[object Function]"===a.toString.call(i.init)&&i.init(),i}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.parent=t.prototype}function bezFunction(){function t(t,e,s,i,a,r){return bm_abs((s-t)*(r-e)-(a-t)*(i-e))<1e-5}function e(t,e,s,i,a){if(a||(a=("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p")),o[a])return o[a];var r,n,h,l,m,p;return o[a]=function(a,o,f,d,c){var u=o/c;a=u;for(var v,y=0;++y<20&&(h=3*t,n=3*(s-t)-h,r=1-h-n,v=a*(h+a*(n+a*r))-u,!(bm_abs(v)<.001));)a-=v/(h+a*(2*n+3*r*a));p=3*e,m=3*(i-e)-p,l=1-p-m;var g=a*(p+a*(m+a*l));return d*g+f},o[a]}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var s=e.segments,i=s.length,a=bm_floor((i-1)*t),r=t*e.addedLength,n=0;if(r==s[a].l)return s[a].p;for(var o=s[a].l>r?-1:1,h=!0;h;)s[a].l<=r&&s[a+1].l>r?(n=(r-s[a].l)/(s[a+1].l-s[a].l),h=!1):a+=o,(0>a||a>=i-1)&&(h=!1);return s[a].p+(s[a+1].p-s[a].p)*n}function r(){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,i,n,o,h){var l=new r;n=0>n?0:n;var m=a(n,h);o=o>1?1:o;var p,f=a(o,h),d=t.length,c=1-m,u=1-f;for(p=0;d>p;p+=1)l.pt1[p]=c*c*c*t[p]+(m*c*c+c*m*c+c*c*m)*s[p]+(m*m*c+c*m*m+m*c*m)*i[p]+m*m*m*e[p],l.pt3[p]=c*c*u*t[p]+(m*c*u+c*m*u+c*c*f)*s[p]+(m*m*u+c*m*f+m*c*f)*i[p]+m*m*f*e[p],l.pt4[p]=c*u*u*t[p]+(m*u*u+c*f*u+c*u*f)*s[p]+(m*f*u+c*f*f+m*u*f)*i[p]+m*f*f*e[p],l.pt2[p]=u*u*u*t[p]+(f*u*u+u*f*u+u*u*f)*s[p]+(f*f*u+u*f*f+f*u*f)*i[p]+f*f*f*e[p];return l}var o=[],h=(Math,function(){function e(t,e){this.l=t,this.p=e}var s={};return function(i,a,r,n){var o=(i.join("_")+"_"+a.join("_")+"_"+r.join("_")+"_"+n.join("_")).replace(/\./g,"p");if(s[o])return s[o];var h,l,m,p,f,d,c=defaultCurveSegments,u=0,v=[],y=[],g={addedLength:0,segments:[]};for((i[0]!=a[0]||i[1]!=a[1])&&t(i[0],i[1],a[0],a[1],r[0],r[1])&&t(i[0],i[1],a[0],a[1],n[0],n[1])&&(c=2),m=r.length,h=0;c>h;h+=1){for(f=h/(c-1),d=0,l=0;m>l;l+=1)p=bm_pow(1-f,3)*i[l]+3*bm_pow(1-f,2)*f*r[l]+3*(1-f)*bm_pow(f,2)*n[l]+bm_pow(f,3)*a[l],v[l]=p,null!==y[l]&&(d+=bm_pow(v[l]-y[l],2)),y[l]=v[l];d&&(d=bm_sqrt(d),u+=d),g.segments.push(new e(u,f))}return g.addedLength=u,s[o]=g,g}}()),l=function(){var e={};return function(a){var r=a.s,n=a.e,o=a.to,h=a.ti,l=(r.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(a.bezierData=e[l]);var m,p,f,d,c,u,v,y=defaultCurveSegments,g=0,b=null;(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+o[0],r[1]+o[1])&&t(r[0],r[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(y=2);var E=new s(y);for(f=o.length,m=0;y>m;m+=1){for(v=new Array(f),c=m/(y-1),u=0,p=0;f>p;p+=1)d=bm_pow(1-c,3)*r[p]+3*bm_pow(1-c,2)*c*(r[p]+o[p])+3*(1-c)*bm_pow(c,2)*(n[p]+h[p])+bm_pow(c,3)*n[p],v[p]=d,null!==b&&(u+=bm_pow(v[p]-b[p],2));u=bm_sqrt(u),g+=u,E.points[m]=new i(u,v),b=v}E.segmentLength=g,a.bezierData=E,e[l]=E}}();return{getEasingCurve:e,getBezierLength:h,getNewSegment:n,buildBezierData:l}}function dataFunctionManager(){function t(a,n,o){var h,l,m,p,f,d,c,u,v=a.length;for(p=0;v>p;p+=1)if(h=a[p],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(a[p-1].td=h.tt),l=[],m=-1,h.hasMask){var y=h.masksProperties;for(d=y.length,f=0;d>f;f+=1)if(y[f].pt.i)i(y[f].pt);else for(u=y[f].pt.length,c=0;u>c;c+=1)y[f].pt[c].s&&i(y[f].pt[c].s[0]),y[f].pt[c].e&&i(y[f].pt[c].e[0])}0===h.ty?(h.layers=e(h.refId,n),t(h.layers,n,o)):4===h.ty?s(h.shapes):5==h.ty&&r(h,o)}}function e(t,e){for(var s=0,i=e.length;i>s;){if(e[s].id===t)return JSON.parse(JSON.stringify(e[s].layers));s+=1}}function s(t,e){var a,r,n,o=t.length,h=e?e:!1;for(a=o-1;a>=0;a-=1)if("tm"==t[a].ty&&(h=!0),"sh"==t[a].ty)if(t[a].trimmed=h,t[a].ks.i)i(t[a].ks);else for(n=t[a].ks.length,r=0;n>r;r+=1)t[a].ks[r].s&&i(t[a].ks[r].s[0]),t[a].ks[r].e&&i(t[a].ks[r].e[0]);else"gr"==t[a].ty&&s(t[a].it,h)}function i(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 a(e,s){t(e.layers,e.assets,s)}function r(t,e){var s,i,a,r,o,h,l,m,p=[],f=t.t.d,d=0,c=t.t.m.g,u=0,v=0,y=0,g=[],b=0,E=0,C=e.getFontByName(f.f),w=C.fStyle.split(" "),S="normal",P="normal";for(i=w.length,s=0;i>s;s+=1)"italic"===w[s].toLowerCase()?P="italic":"bold"===w[s].toLowerCase()?S="700":"black"===w[s].toLowerCase()?S="900":"medium"===w[s].toLowerCase()?S="500":"regular"===w[s].toLowerCase()||"normal"===w[s].toLowerCase()?S="400":("light"===w[s].toLowerCase()||"thin"===w[s].toLowerCase())&&(S="200");for(f.fWeight=S,f.fStyle=P,i=f.t.length,s=0;i>s;s+=1)if(a=!1," "===f.t.charAt(s)?r=" ":13===f.t.charCodeAt(s)?(g.push(b),E=b>E?b:E,b=0,r="",a=!0,y+=1):r=f.t.charAt(s),e.chars?(l=e.getCharData(f.t.charAt(s),C.fStyle,e.getFontByName(f.f).fFamily),m=a?0:l.w*f.s/100):(n.font=f.s+"px "+e.getFontByName(f.f).fFamily,m=n.measureText(r).width),b+=m,p.push({l:m,an:m,add:u,n:a,anIndexes:[],val:r,line:y}),2==c){if(u+=m,""==r||" "==r||s==i-1){for((""==r||" "==r)&&(u-=m);s>=v;)p[v].an=u,p[v].ind=d,p[v].extra=m,v+=1;d+=1,u=0}}else if(3==c){if(u+=m,""==r||s==i-1){for(""==r&&(u-=m);s>=v;)p[v].an=u,p[v].ind=d,p[v].extra=m,v+=1;u=0,d+=1}}else p[d].ind=d,p[d].extra=0,d+=1;switch(f.l=p,E=b>E?b:E,g.push(b),f.boxWidth=E,f.lineWidths=g,f.j){case 1:t.t.d.justifyOffset=-f.boxWidth;break;case 2:t.t.d.justifyOffset=-f.boxWidth/2;break;default:t.t.d.justifyOffset=0}var D=t.t.a;h=D.length;var I,F,T=[];for(o=0;h>o;o+=1){for(D[o].a.sc&&(f.strokeColorAnim=!0),D[o].a.sw&&(f.strokeWidthAnim=!0),D[o].a.fc&&(f.fillColorAnim=!0),F=0,I=D[o].s.b,s=0;i>s;s+=1)p[s].anIndexes[o]=F,(1==I&&""!=p[s].val||2==I&&""!=p[s].val&&" "!=p[s].val||3==I&&(p[s].n||" "==p[s].val||s==i-1)||4==I&&(p[s].n||s==i-1))&&(1===D[o].s.rn&&T.push(F),F+=1);t.t.a[o].totalChars=F;var A,M=-1;if(1===D[o].s.rn)for(s=0;i>s;s+=1)M!=p[s].anIndexes[o]&&(M=p[s].anIndexes[o],A=T.splice(Math.floor(Math.random()*T.length),1)[0]),p[s].anIndexes[o]=A}0!==h||"m"in t.t.p||(t.singleShape=!0),f.yOffset=1.2*f.s}var n=document.createElement("canvas").getContext("2d"),o={};return o.completeData=a,o}function SVGRenderer(t){this.animationItem=t,this.layers=null,this.lastFrame=-1,this.globalData={frameNum:-1},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.lastFrame=-1,this.globalData={frameNum:-1},this.contextData={saved:new Array(15),savedOp:new Array(15),cArrPos:0,cTr:new Matrix,cO:1};var s,i=15;for(s=0;i>s;s+=1)this.contextData.saved[s]=new Array(6);this.elements=[]}function MaskElement(t,e,s){this.dynamicProperties=[],this.data=t,this.element=e,this.globalData=s,this.paths=[],this.masksProperties=this.data.masksProperties,this.viewData=new Array(this.masksProperties.length),this.maskElement=null,this.firstFrame=!0;var i,a,r,n,o,h=this.element.maskedElement,l=this.globalData.defs,m=this.masksProperties.length,p=this.data.masksProperties,f=0,d=[],c=randomString(10),u="clipPath",v="clip-path";for(i=0;m>i;i++)if(("a"!==p[i].mode&&"n"!==p[i].mode||p[i].inv)&&(u="mask",v="mask"),"s"!=p[i].mode&&"i"!=p[i].mode||0!=f||(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%"),d.push(o)),"n"!=p[i].mode){if(f+=1,a=document.createElementNS(svgNS,"path"),p[i].cl?"s"==p[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"):(a.setAttribute("fill","none"),"s"==p[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"),a.setAttribute("stroke-width","1"),a.setAttribute("stroke-miterlimit","10")),a.setAttribute("clip-rule","nonzero"),"i"==p[i].mode){n=d.length;var y=document.createElementNS(svgNS,"g");for(r=0;n>r;r+=1)y.appendChild(d[r]);var g=document.createElementNS(svgNS,"mask");g.setAttribute("mask-type","alpha"),g.setAttribute("id",c+"_"+f),g.appendChild(a),l.appendChild(g),y.setAttribute("mask","url(#"+c+"_"+f+")"),d.length=0,d.push(y)}else d.push(a);p[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",prop:PropertyFactory.getShapeProp(this.data,p[i],3,this.dynamicProperties)},this.viewData[i].prop.k||this.drawPath(p[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={prop:PropertyFactory.getShapeProp(this.data,p[i],3,this.dynamicProperties)};for(this.maskElement=document.createElementNS(svgNS,u),m=d.length,i=0;m>i;i+=1)this.maskElement.appendChild(d[i]);this.maskElement.setAttribute("id",c),f>0&&h.setAttribute(v,"url(#"+c+")"),l.appendChild(this.maskElement)}function BaseElement(){}function SVGBaseElement(t,e,s,i){this.globalData=s,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,i){}function SVGTextElement(t,e,s,i){this.textSpans=[],this.renderType="svg",this.parent.constructor.call(this,t,e,s,i)}function ICompElement(t,e,s,i){this.parent.constructor.call(this,t,e,s,i),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,s.frameRate,this.dynamicProperties))}function IImageElement(t,e,s,i){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this.parent.constructor.call(this,t,e,s,i)}function IShapeElement(t,e,s,i){this.shapes=[],this.parent.constructor.call(this,t,e,s,i)}function ShapeItemElement(t,e,s,i,a,r){this.shape=e,this.parentContainer=s,this.placeholder=i,this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=r,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,a,[]),styleUnselectableDiv(this.shape)}function ISolidElement(t,e,s,i){this.parent.constructor.call(this,t,e,s,i)}function CVBaseElement(t,e){this.globalData=e,this.data=t,this.canvasContext=e.canvasContext,this.init()}function CVCompElement(t,e){this.parent.constructor.call(this,t,e),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,e.frameRate,this.dynamicProperties))}function CVImageElement(t,e){this.animationItem=e.renderer.animationItem,this.assetData=this.animationItem.getAssetData(t.refId),this.path=this.animationItem.getPath(),this.parent.constructor.call(this,t,e),this.animationItem.pendingElements+=1}function CVMaskElement(t,e,s){this.data=t,this.element=e,this.globalData=s,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.ctx=this.element.canvasContext,this.viewData=new Array(this.masksProperties.length);var i,a=this.masksProperties.length;for(i=0;a>i;i++)this.viewData[i]=PropertyFactory.getShapeProp(this.data,this.masksProperties[i],3,this.dynamicProperties)}function CVShapeElement(t,e){this.shapes=[],this.parent.constructor.call(this,t,e)}function CVShapeItemElement(t,e,s){this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=s,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,e,[])}function CVSolidElement(t,e){this.parent.constructor.call(this,t,e)}function CVTextElement(t,e){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.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.parent.constructor.call(this,t,e),this.renderedLetters=[]}var svgNS="http://www.w3.org/2000/svg",Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=1,this.props[4]=0,this.props[5]=0,this}function e(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,s,-s,e,0,0)}function s(t,e){return 1==t&&1==e?this:this._t(t,0,0,e,0,0)}function i(t,e,s,i,a,r){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this}function a(t,e){return(0!==t||0!==e)&&(this.props[4]=this.props[0]*t+this.props[2]*e+this.props[4],this.props[5]=this.props[1]*t+this.props[3]*e+this.props[5]),this}function r(t,e,s,i,a,r){var n=this.props[0],o=this.props[1],h=this.props[2],l=this.props[3],m=this.props[4],p=this.props[5];return 1===t&&0===e&&0===s&&1===i?((0!==a||0!==r)&&(this.props[4]=this.props[0]*a+this.props[2]*r+this.props[4],this.props[5]=this.props[1]*a+this.props[3]*r+this.props[5]),this):(this.props[0]=n*t+h*e,this.props[1]=o*t+l*e,this.props[2]=n*s+h*i,this.props[3]=o*s+l*i,this.props[4]=n*a+h*r+m,this.props[5]=o*a+l*r+p,this)}function n(t,e){return{x:t*this.props[0]+e*this.props[2]+this.props[4],y:t*this.props[1]+e*this.props[3]+this.props[5]}}function o(t,e){return t*this.props[0]+e*this.props[2]+this.props[4]}function h(t,e){return t*this.props[1]+e*this.props[3]+this.props[5]}function l(t,e){return[t*this.props[0]+e*this.props[2]+this.props[4],t*this.props[1]+e*this.props[3]+this.props[5]]}function m(t,e){return bm_rnd(t*this.props[0]+e*this.props[2]+this.props[4])+","+bm_rnd(t*this.props[1]+e*this.props[3]+this.props[5])}function p(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5]]}function f(){return this.cssParts[1]=this.props.join(","),this.cssParts.join("")}function d(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.scale=s,this.setTransform=i,this.translate=a,this.transform=r,this.applyToPoint=n,this.applyToX=o,this.applyToY=h,this.applyToPointArray=l,this.applyToPointStringified=m,this.toArray=p,this.toCSS=f,this.toString=d,this._t=this.transform,this.props=[1,0,0,1,0,0],this.cssParts=["matrix(","",")"]}}(),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 i=(new Date).getTime(),a=Math.max(0,16-(i-t)),r=window.setTimeout(function(){e(i+a)},a);return t=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var subframeEnabled=!0,cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_min=Math.min,defaultCurveSegments=50,degToRads=Math.PI/180;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,i){return 0>t&&(t=0),0>e&&(e=0),0>i&&(i=0),"#"+s[t]+s[e]+s[i]}}(),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]]}}(),bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var s=document.createElement("span");s.style.fontFamily=e;var i=document.createElement("span");i.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(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function e(){var t,s,i,a=this.fonts.length,r=a;for(t=0;a>t;t+=1)this.fonts[t].loaded?r-=1:(s=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,s.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(s=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,s.offsetWidth!==i&&(r-=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!==r&&Date.now()-this.initTime<o?setTimeout(e.bind(this),20):this.loaded=!0}function s(){if(window.Typekit&&window.Typekit.load)try{Typekit.load({async:!1})}catch(t){console.log("errwor",t)}else setTimeout(s,50)}function i(i,a){if(!i)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=i.list);if(i.tk){var r=document.createElement("script");r.setAttribute("src",i.tk),a.appendChild(r),s()}var n,o=i.list,h=o.length;for(n=0;h>n;n+=1){if(o[n].loaded=!1,o[n].monoCase=t(o[n].fFamily,"monospace"),o[n].sansCase=t(o[n].fFamily,"sans-serif"),o[n].fPath&&o[n].fPath){var r=document.createElement("style");r.type="text/css",r.innerHTML="@font-face {font-family: "+o[n].fFamily+"; font-style: normal; src: url('"+o[n].fPath+"');}",a.appendChild(r)}this.fonts.push(o[n])}e.bind(this)()}function a(t){this.chars=t}function r(t,e,s){for(var i=0,a=this.chars.length;a>i;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}}function n(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 o=5e3,h=function(){this.fonts=[],this.chars=null,this.loaded=!1,this.initTime=Date.now()};return h.prototype.addChars=a,h.prototype.addFonts=i,h.prototype.getCharData=r,h.prototype.getFontByName=n,h}(),PropertyFactory=function(){function t(t){if(this.mdf=!1,this.lastFrame!==p&&(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,i=0,a=this.keyframes.length-1,r=1,n=!0;!(!n||(e=this.keyframes[i],s=this.keyframes[i+1],i==a-1&&t>=s.t-this.offsetTime)||s.t-this.offsetTime>t);)a-1>i?i+=r:n=!1;var o,h,l,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.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o])}else{e.__fnct?f=e.__fnct:(f=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y,e.n),e.__fnct=f),l=f("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime));var v,y=c.segmentLength*l,g=0;for(r=1,n=!0,m=c.points.length;n;){if(g+=c.points[d].partialLength*r,0===y||0===l||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.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o]);break}if(y>g&&y<g+c.points[d+1].partialLength){for(v=(y-g)/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])*v)*this.mult:c.points[d].point[o]+(c.points[d+1].point[o]-c.points[d].point[o])*v,this.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o]);break}m-1>d&&1==r||d>0&&-1==r?d+=r:n=!1}}}else{var b,E,C,w,S,P=!1;for(a=e.s.length,i=0;a>i;i+=1)1!==e.h&&(e.o.x instanceof Array?(P=!0,e.__fnct||(e.__fnct=[]),e.__fnct[i]||(b=e.o.x[i]?e.o.x[i]:e.o.x[0],E=e.o.y[i]?e.o.y[i]:e.o.y[0],C=e.i.x[i]?e.i.x[i]:e.i.x[0],w=e.i.y[i]?e.i.y[i]:e.i.y[0])):(P=!1,e.__fnct||(b=e.o.x,E=e.o.y,C=e.i.x,w=e.i.y)),P?e.__fnct[i]?f=e.__fnct[i]:(f=bez.getEasingCurve(b,E,C,w),e.__fnct[i]=f):e.__fnct?f=e.__fnct:(f=bez.getEasingCurve(b,E,C,w),e.__fnct=f),l=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:f("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))),S=1===e.h?e.s[i]:e.s[i]+(e.e[i]-e.s[i])*l,1===a?(this.v=this.mult?S*this.mult:S,this.lastValue!=this.v&&(this.mdf=!0,this.lastValue=this.v)):(this.v[i]=this.mult?S*this.mult:S,this.lastValue[i]!==this.v[i]&&(this.mdf=!0,this.lastValue[i]=this.v[i]))}}this.lastFrame=t}function e(t){if(this.mdf=!1,this.lastFrame!==p&&(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 if(t<this.keyframes[0].t-this.offsetTime)this.mdf=!0,this.v=this.keyframes[0].s[0];else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)this.mdf=!0,this.v=1===this.keyframes[this.keyframes.length-2].h?this.keyframes[this.keyframes.length-2].s[0]:this.keyframes[this.keyframes.length-2].e[0];else{this.mdf=!0;for(var e,s,i,a,r,n,o=0,h=this.keyframes.length-1,l=1,m=!0;m&&(e=this.keyframes[o],s=this.keyframes[o+1],!(s.t-this.offsetTime>t&&1==l));)h-1>o&&1==l||o>0&&-1==l?o+=l:m=!1;var f;if(1!==e.h){var d;e.__fnct?d=e.__fnct:(d=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y),e.__fnct=d),f=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:d("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))}for(a=this.shapeData.i.length,n=e.s[0].i[0].length,i=0;a>i;i+=1)for(r=0;n>r;r+=1)1===e.h?(this.shapeData.i[i][r]=e.s[0].i[i][r],this.shapeData.o[i][r]=e.s[0].o[i][r],this.shapeData.v[i][r]=e.s[0].v[i][r]):(this.shapeData.i[i][r]=e.s[0].i[i][r]+(e.e[0].i[i][r]-e.s[0].i[i][r])*f,this.shapeData.o[i][r]=e.s[0].o[i][r]+(e.e[0].o[i][r]-e.s[0].o[i][r])*f,this.shapeData.v[i][r]=e.s[0].v[i][r]+(e.e[0].v[i][r]-e.s[0].v[i][r])*f);this.v=this.shapeData}this.lastFrame=t}function s(t,e){e=e?e:1,this.v=t*e,this.mdf=!1,this.k=!1}function i(t,e){if(e){var s,i=t.length;for(s=0;i>s;s+=1)t[s]*=e}this.v=t,this.mdf=!1,this.k=!1}function a(e,s,i){this.keyframes=s,this.offsetTime=e.st,this.lastValue=-99999,this.k=!0,this.mult=i,this.lastFrame=p,this.getInterpolatedValue=t}function r(e,s,i){this.keyframes=s,this.offsetTime=e.st,this.k=!0,this.mult=i,this.getInterpolatedValue=t,this.v=new Array(s[0].s.length),this.lastValue=new Array(s[0].s.length),this.lastFrame=p}function n(t,e,n,o,h){if(2===n)return new f(t,e,h);if(7===n)return new u(t,e,h);if(e.length){if("number"==typeof e[0])return new i(e,o);switch(n){case 0:h.push(new a(t,e,o));break;case 1:h.push(new r(t,e,o))}return h[h.length-1]}return new s(e,o)}function o(t,e){this.k=!1,this.mdf=!1,this.closed=3===e?t.cl:t.closed,this.shapeData=t.ks,this.v=3===e?t.pt:t.ks}function h(t,s,i,a){this.offsetTime=t.st,this.getInterpolatedValue=e,this.keyframes=3===a?s.pt:s.ks,this.k=!0,this.closed=3===a?s.cl:s.closed;var r,n=this.keyframes[0].s[0].i.length,o=this.keyframes[0].s[0].i[0].length;for(this.shapeData={i:new Array(n),o:new Array(n),v:new Array(n)},r=0;n>r;r+=1)this.shapeData.i[r]=new Array(o),this.shapeData.o[r]=new Array(o),this.shapeData.v[r]=new Array(o);this.lastFrame=p,i.push(this)}function l(t,e,s,i,a){var r;if(3===s||4===s){var n=3===s?e.pt:e.ks;r=n.length?new h(t,e,i,s):new o(e,s,i)}else 5===s?r=new c(t,e,i):6===s&&(r=new d(t,e,i));var l=!1;if(a)for(var m=0,p=a.length;p>m;){if(!a[m].closed){l=!0;break}m+=1}return l?new v(r,a,i):r}function m(t,e,s){return new y(t,e,s)}var p=-999999,f=function(){function t(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.v.reset().translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1])}return function(e,n,o){this.dynamicProperties=[],this.mdf=!1,this.getInterpolatedValue=t,"number"==typeof n.a[0]?this.a=new i(n.a):(this.a=new r(e,n.a,0),this.dynamicProperties.push(this.a)),"number"==typeof n.p[0]?this.p=new i(n.p):(this.p=new r(e,n.p,0),this.dynamicProperties.push(this.p)),"number"==typeof n.s[0]?this.s=new i(n.s,.01):(this.s=new r(e,n.s,.01),this.dynamicProperties.push(this.s)),n.r.length?(this.r=new a(e,n.r,degToRads),this.dynamicProperties.push(this.r)):this.r=new s(n.r,degToRads),this.dynamicProperties.length?(o.push(this),this.v=new Matrix):this.v=(new Matrix).translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1])}}(),d=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-a],this.v.i[0]=[t-i*s,e-a],this.v.o[0]=[t+i*s,e-a],this.v.v[1]=[t+i,e],this.v.i[1]=[t+i,e-a*s],this.v.o[1]=[t+i,e+a*s],this.v.v[2]=[t,e+a],this.v.i[2]=[t+i*s,e+a],this.v.o[2]=[t-i*s,e+a],this.v.v[3]=[t-i,e],this.v.i[3]=[t-i,e+a*s],this.v.o[3]=[t-i,e-a*s]):(this.v.v[0]=[t,e-a],this.v.o[0]=[t-i*s,e-a],this.v.i[0]=[t+i*s,e-a],this.v.v[1]=[t-i,e],this.v.o[1]=[t-i,e+a*s],this.v.i[1]=[t-i,e-a*s],this.v.v[2]=[t,e+a],this.v.o[2]=[t+i*s,e+a],this.v.i[2]=[t-i*s,e+a],this.v.v[3]=[t+i,e],this.v.o[3]=[t+i,e-a*s],this.v.i[3]=[t+i,e+a*s])}function e(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.convertEllToPath()}var s=.5519;return function(s,a,n){this.v={v:new Array(4),i:new Array(4),o:new Array(4),c:!0},this.d=a.d,this.dynamicProperties=[],a.closed=!0,this.closed=!0,this.mdf=!1,this.getInterpolatedValue=e,this.convertEllToPath=t,"number"==typeof a.p[0]?this.p=new i(a.p):(this.p=new r(s,a.p,0),this.dynamicProperties.push(this.p)),"number"==typeof a.s[0]?this.s=new i(a.s):(this.s=new r(s,a.s,0),this.dynamicProperties.push(this.s)),this.dynamicProperties.length?n.push(this):this.convertEllToPath()}}(),c=function(){function t(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(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,i=this.s.v[1]/2,a=bm_min(s,i,this.r.v),r=a*(1-.5519);2===this.d||1===this.d?(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+s,e-i+r],this.v.v[1]=[t+s,e+i-a],this.v.o[1]=[t+s,e+i-r],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+s-a,e+i],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+s-r,e+i],this.v.v[3]=[t-s+a,e+i],this.v.o[3]=[t-s+r,e+i],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-s,e+i-r],this.v.v[5]=[t-s,e-i+a],this.v.o[5]=[t-s,e-i+r],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-s+a,e-i],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-s+r,e-i],this.v.v[7]=[t+s-a,e-i],this.v.o[7]=[t+s-r,e-i],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=[t+s,e-i+r],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+s-a,e-i],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+s-r,e-i],this.v.v[2]=[t-s+a,e-i],this.v.o[2]=[t-s+r,e-i],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-s,e-i+a],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-s,e-i+r],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=[t-s,e+i-r],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-s+a,e+i],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-s+r,e+i],this.v.v[6]=[t+s-a,e+i],this.v.o[6]=[t+s-r,e+i],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+s,e+i-a],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+s,e+i-r])}return function(n,o,h){this.v={v:new Array(8),i:new Array(8),o:new Array(8),c:!0},this.d=o.d,this.dynamicProperties=[],this.mdf=!1,o.closed=!0,this.closed=!0,this.getInterpolatedValue=t,this.convertRectToPath=e,"number"==typeof o.p[0]?this.p=new i(o.p):(this.p=new r(n,o.p,0),this.dynamicProperties.push(this.p)),"number"==typeof o.s[0]?this.s=new i(o.s):(this.s=new r(n,o.s,0),this.dynamicProperties.push(this.s)),o.r.length?(this.r=new a(n,o.r,0),this.dynamicProperties.push(this.r)):this.r=new s(o.r,degToRads),this.dynamicProperties.length?h.push(this):this.convertRectToPath()}}(),u=function(){function t(t,e){var s,i=this.dynamicProperties.length;for(this.mdf=!1,s=0;i>s;s+=1)this.dynamicProperties[s].getInterpolatedValue(t),this.dynamicProperties[s].mdf&&(this.mdf=!0);if(this.mdf||e){var a=this.o.v%360/360;if(0===a&&0===this.s.v&&1==this.e.v)return void(this.isTrimming=!1);this.isTrimming=!0,0>a&&(a+=1);var r=this.s.v+a,n=this.e.v+a;if(r>n){var o=r;r=n,n=o}this.sValue=r,this.eValue=n,this.oValue=a}}return function(e,i,r){this.dynamicProperties=[],this.sValue=0,this.eValue=0,this.oValue=0,this.mdf=!1,this.getInterpolatedValue=t,this.k=!1,this.isTrimming=!1,i.s.length?(this.s=new a(e,i.s,.01),this.dynamicProperties.push(this.s)):this.s=new s(i.s,.01),i.e.length?(this.e=new a(e,i.e,.01),this.dynamicProperties.push(this.e)):this.e=new s(i.e,.01),i.o.length?(this.o=new a(e,i.o,0),this.dynamicProperties.push(this.o)):this.o=new s(i.o,0),this.dynamicProperties.length?(r.push(this),this.k=!0):this.getInterpolatedValue(0,!0)}}(),v=function(){function t(t,e){this.totalLength=0;var s,i=t.v,a=t.o,r=t.i,n=i.length;for(s=0;n-1>s;s+=1)this.lengths[s]=bez.getBezierLength(i[s],i[s+1],a[s],r[s+1]),this.totalLength+=this.lengths[s].addedLength;e&&(this.lengths[s]=bez.getBezierLength(i[s],i[0],a[s],r[0]),this.totalLength+=this.lengths[s].addedLength)}function e(t,e,s,i,a){this.nextO[this.segmentCount]=e,this.nextI[this.segmentCount+1]=s,this.nextV[this.segmentCount+1]=i,this.pathStarted?this.nextV[this.segmentCount]=t:(this.pathStarted=!0,this.v.s[this.segmentCount]=t),this.segmentCount+=1}function s(t,e){this.mdf=e?!0:!1;var s=0,i=this.trims.length;for(this.pathStarted=!1;i>s;){if(this.trims[s].mdf){this.mdf=!0;break}s+=1}if(this.mdf=this.prop.mdf?!0:this.mdf,this.mdf){this.nextO.length=0,this.nextI.length=0,this.nextV.length=0,this.v.s.length=0;var a=this.prop.closed;this.getSegmentsLength(this.prop.v,a);var r,n,o,h,l,m,p=this.prop.v,f=this.trims.length;for(r=0;f>r;r+=1)if(this.trims[r].isTrimming){if(n=this.trims[r].eValue,o=this.trims[r].sValue,h=this.trims[r].oValue,n===o)return this.v.v=this.nextV,this.v.o=this.nextO,
-void(this.v.i=this.nextI);1>=n?(this.segments[0].s=this.totalLength*o,this.segments[0].e=this.totalLength*n,this.segments[1].vl=!1):o>=1?(this.segments[0].s=this.totalLength*(o-1),this.segments[0].e=this.totalLength*(n-1),this.segments[1].vl=!1):(this.segments[0].s=this.totalLength*o,this.segments[0].e=this.totalLength,this.segments[1].s=0,this.segments[1].e=this.totalLength*(n-1),this.segments[1].vl=!0),this.v.v=p.v,this.v.o=p.o,this.v.i=p.i,m=this.v.v.length;var d=0,c=0;i=this.segments[1].vl?2:1;var u;for(this.segmentCount=0,s=0;i>s;s+=1){for(d=0,l=1;m>l;l++)if(c=this.lengths[l-1].addedLength,d+c<this.segments[s].s)d+=c;else{if(d>this.segments[s].e)break;this.segments[s].s<=d&&this.segments[s].e>=d+c?this.addSegment(this.v.v[l-1],this.v.o[l-1],this.v.i[l],this.v.v[l],this.lengths[l-1]):(u=bez.getNewSegment(this.v.v[l-1],this.v.v[l],this.v.o[l-1],this.v.i[l],(this.segments[s].s-d)/c,(this.segments[s].e-d)/c,this.lengths[l-1]),this.addSegment(u.pt1,u.pt3,u.pt4,u.pt2)),d+=c}a!==!1?d<=this.segments[s].e&&(c=this.lengths[l-1].addedLength,this.segments[s].s<=d&&this.segments[s].e>=d+c?this.addSegment(this.v.v[l-1],this.v.o[l-1],this.v.i[0],this.v.v[0],this.lengths[l-1]):(u=bez.getNewSegment(this.v.v[l-1],this.v.v[0],this.v.o[l-1],this.v.i[0],(this.segments[s].s-d)/c,(this.segments[s].e-d)/c,this.lengths[l-1]),this.addSegment(u.pt1,u.pt3,u.pt4,u.pt2))):this.pathStarted=!1}a=!1}else this.v.v=p.v,this.v.o=p.o,this.v.i=p.i;this.nextV.length?(this.v.v=this.nextV,this.v.o=this.nextO,this.v.i=this.nextI):this.v.s.length=0,this.v.c=a}}return function(i,a,r){this.trims=[],this.k=!1,this.mdf=!1,this.pathStarted=!1,this.segments=[{s:0,e:0,vl:!0},{s:0,e:0,vl:!1}],this.nextO=[],this.nextV=[],this.nextI=[],this.v={i:null,o:null,v:null,s:[],c:!1};var n,o=a.length;for(n=0;o>n;n+=1)a[n].closed||(this.k=a[n].trimProp.k?!0:this.k,this.trims.push(a[n].trimProp));this.prop=i,o=this.prop.shapeData.v.length-1,o+=this.prop.closed?1:0,this.lengths=new Array(o),this.k=i.k?!0:this.k,this.totalLength=0,this.getInterpolatedValue=s,this.addSegment=e,this.getSegmentsLength=t,this.k?r.push(this):this.getInterpolatedValue(0,!0)}}(),y=function(){function t(t,e){var s=0,i=this.dataProps.length;for(this.mdf=e?!0:!1;i>s;){if(this.dataProps[s].p.mdf){this.mdf=!0;break}s+=1}if(this.mdf)for("svg"===this.renderer&&(this.dasharray=""),s=0;i>s;s+=1)"o"!=this.dataProps[s].n?"svg"===this.renderer?this.dasharray+=" "+this.dataProps[s].p.v:this.dasharray[s]=this.dataProps[s].p.v:this.dashoffset=this.dataProps[s].p.v}return function(e,s,i,a){this.dataProps=new Array(s.length),this.renderer=i,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(s.length-1),this.dashoffset=0;var r,o,h=s.length;for(r=0;h>r;r+=1)o=n(e,s[r].v,0,0,a),this.k=o.k?!0:this.k,this.dataProps[r]={n:s[r].n,p:o};this.getInterpolatedValue=t,this.k?a.push(this):this.getInterpolatedValue(0,!0)}}(),g={};return g.getProp=n,g.getShapeProp=l,g.getDashProp=m,g}();SVGRenderer.prototype.createItem=function(t,e,s){switch(t.ty){case 2:return this.createImage(t,e,s);case 0:return this.createComp(t,e,s);case 1:return this.createSolid(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)}return this.createBase(t,e)},SVGRenderer.prototype.buildItems=function(t,e,s,i){var a,r=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var n;for(a=r-1;a>=0;a--)s[a]=this.createItem(t[a],e,i),0===t[a].ty&&(n=[],this.buildItems(t[a].layers,s[a].getDomElement(),n,i),s[a].setElements(n)),t[a].td&&s[a+1].setMatte(s[a].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)for(r=0;h>r;){if(s[r].data.id==t[i].id){o=s[r],s[r]=this.createItem(t[i],e,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,o),s[r].setElements(n));break}r+=1}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},SVGRenderer.prototype.createBase=function(t,e,s){return new SVGBaseElement(t,e,this.globalData,s)},SVGRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,s){return new IShapeElement(t,e,this.globalData,s)},SVGRenderer.prototype.createText=function(t,e,s){return new SVGTextElement(t,e,this.globalData,s)},SVGRenderer.prototype.createImage=function(t,e,s){return new IImageElement(t,e,this.globalData,s)},SVGRenderer.prototype.createComp=function(t,e,s){return new ICompElement(t,e,this.globalData,s)},SVGRenderer.prototype.createSolid=function(t,e,s){return new ISolidElement(t,e,this.globalData,s)},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","xMidYMid meet"),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.compSize={w:t.w,h:t.h},this.globalData.frameRate=t.fr;var s=document.createElementNS(svgNS,"clipPath"),i=document.createElementNS(svgNS,"rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+randomString(10);s.setAttribute("id",a),s.appendChild(i);var r=document.createElementNS(svgNS,"g");r.setAttribute("clip-path","url(#"+a+")"),this.animationItem.container.appendChild(r),e.appendChild(s),this.animationItem.container=r,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 i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;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.lastFrame!=t&&!this.destroyed){null===t?t=this.lastFrame:this.lastFrame=t,this.globalData.frameNum=t;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()}},CanvasRenderer.prototype.createItem=function(t){switch(t.ty){case 0:return this.createComp(t);case 1:return this.createSolid(t);case 2:return this.createImage(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 99:return this.createPlaceHolder(t);default:return this.createBase(t)}return this.createBase(t,parentContainer)},CanvasRenderer.prototype.buildItems=function(t,e){e||(e=this.elements);var s,i=t.length;for(s=0;i>s;s++)if(e[s]=this.createItem(t[s]),0===t[s].ty){var a=[];this.buildItems(t[s].layers,a),e[e.length-1].setElements(a)}},CanvasRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements);var r,n,o=s.length;for(i=0;a>i;i+=1)for(r=0;o>r;){if(s[r].data.id==t[i].id){s[r]=this.createItem(t[i],e),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,n),s[r].setElements(n));break}r+=1}},CanvasRenderer.prototype.createBase=function(t){return new CVBaseElement(t,this.globalData)},CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData)},CanvasRenderer.prototype.createPlaceHolder=function(t){return new PlaceHolderElement(t,null,this.globalData)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[2]||1!==t[3]||0!==t[4]||0!==t[5]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[2],t[3],t[4],t[5]);this.contextData.cTr.transform(t[0],t[1],t[2],t[3],t[4],t[5]);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])}},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(6));var s,i=6,a=this.contextData.saved[this.contextData.cArrPos];for(s=0;i>s;s+=1)a[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],i=6,a=this.contextData.cTr.props;for(e=0;i>e;e+=1)a[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),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.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.updateContainerSize(),this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document)},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,i=this.transformCanvas.w/this.transformCanvas.h;i>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,this.transformCanvas.sy,this.transformCanvas.tx,this.transformCanvas.ty],this.globalData.cWidth=t,this.globalData.cHeight=e},CanvasRenderer.prototype.buildStage=function(t,e,s){s||(s=this.elements);var i,a,r=e.length;for(i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemHierarchy(a,s[i],e,a.parent,s,!0),0==a.ty&&this.buildStage(null,a.layers,s[i].getElements())},CanvasRenderer.prototype.buildItemHierarchy=function(t,e,s,i,a,r){var n=0,o=s.length;for(r&&e.resetHierarchy();o>n;)s[n].ind===i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemHierarchy(t,e,s,s[n].parent,a,!1)),n+=1},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers.length;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.lastFrame==t&&this.renderConfig.clearCanvas===!0||this.destroyed)){this.lastFrame=t,this.globalData.frameNum=t-this.animationItem.firstFrame,this.renderConfig.clearCanvas===!0?(this.reset(),this.canvasContext.canvas.width=this.canvasContext.canvas.width):this.save(),this.ctxTransform(this.transformCanvas.props),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),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()}},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)},MaskElement.prototype.renderFrame=function(){var t,e=this.data.masksProperties.length;for(t=0;e>t;t++)"n"!==this.data.masksProperties[t].mode&&(this.viewData[t].prop.mdf||this.firstFrame)&&this.drawPath(this.data.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]);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 i,a,r="";for(a=e.v.length,i=1;a>i;i+=1)1==i&&(r+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-1][1])+" "+bm_rnd(e.i[i][0])+","+bm_rnd(e.i[i][1])+" "+bm_rnd(e.v[i][0])+","+bm_rnd(e.v[i][1]);t.cl&&(r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-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!==r&&(t.inv?s.elem.setAttribute("d",this.solidPath+r):s.elem.setAttribute("d",r),s.lastPath=r)},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.paths=null,this.masksProperties=null},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.isVisible=!1);var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t);this.data.hasMask&&this.maskManager.prepareFrame(t),this.currentFrameNum=t},BaseElement.prototype.init=function(){this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.dynamicProperties=[],this.currentFrameNum=-99999,this.lastNum=-99999,this.finalTransform={op:PropertyFactory.getProp(this.data,this.data.ks.o,0,.01,this.dynamicProperties),mProp:PropertyFactory.getProp(this.data,this.data.ks,2,null,this.dynamicProperties),matMdf:!1,opMdf:!1,mat:new Matrix,opacity:1},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.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"),i=randomString(10);s.setAttribute("id",i),s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%");var a=document.createElementNS(svgNS,"feComponentTransfer");a.setAttribute("in","SourceGraphic"),s.appendChild(a);var r=document.createElementNS(svgNS,"feFuncA");r.setAttribute("type","table"),r.setAttribute("tableValues","1.0 0.0"),a.appendChild(r),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(#"+i+")"),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},SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.data.hasMask&&(this.finalTransform.matMdf&&this.layerElement.setAttribute("transform","matrix("+s.props.join(",")+")"),this.finalTransform.opMdf&&this.layerElement.setAttribute("opacity",this.finalTransform.opacity)),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getDomElement=function(){return this.layerElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")},SVGBaseElement.prototype.hide=function(){},ITextElement.prototype.init=function(){this.parent.init.call(this);var t=this.data;this.renderedLetters=[],this.viewData={m:{a:PropertyFactory.getProp(t,t.t.m.a,1,0,this.dynamicProperties)}};var e=this.data.t;if(e.a.length){this.viewData.a=new Array(e.a.length);var s,i,a,r=e.a.length;for(s=0;r>s;s+=1)a=e.a[s],i={a:{},s:{}},"r"in a.a&&(i.a.r=PropertyFactory.getProp(t,a.a.r,0,degToRads,this.dynamicProperties)),"s"in a.a&&(i.a.s=PropertyFactory.getProp(t,a.a.s,1,.01,this.dynamicProperties)),"a"in a.a&&(i.a.a=PropertyFactory.getProp(t,a.a.a,1,0,this.dynamicProperties)),"o"in a.a&&(i.a.o=PropertyFactory.getProp(t,a.a.o,0,.01,this.dynamicProperties)),"p"in a.a&&(i.a.p=PropertyFactory.getProp(t,a.a.p,1,0,this.dynamicProperties)),"sw"in a.a&&(i.a.sw=PropertyFactory.getProp(t,a.a.sw,0,0,this.dynamicProperties)),"sc"in a.a&&(i.a.sc=PropertyFactory.getProp(t,a.a.sc,1,0,this.dynamicProperties)),"fc"in a.a&&(i.a.fc=PropertyFactory.getProp(t,a.a.fc,1,0,this.dynamicProperties)),"t"in a.a&&(i.a.t=PropertyFactory.getProp(t,a.a.t,0,0,this.dynamicProperties)),i.s.s="s"in a.s?PropertyFactory.getProp(t,a.s.s,0,0,this.dynamicProperties):{v:0},"e"in a.s&&(i.s.e=PropertyFactory.getProp(t,a.s.e,0,0,this.dynamicProperties)),i.s.o="o"in a.s?PropertyFactory.getProp(t,a.s.o,0,0,this.dynamicProperties):{v:0},i.s.xe="xe"in a.s?PropertyFactory.getProp(t,a.s.xe,0,0,this.dynamicProperties):{v:0},i.s.ne="ne"in a.s?PropertyFactory.getProp(t,a.s.ne,0,0,this.dynamicProperties):{v:0},this.viewData.a[s]=i}else this.viewData.a=[];e.p&&"m"in e.p&&(this.viewData.p={f:PropertyFactory.getProp(t,e.p.f,0,0,this.dynamicProperties),l:PropertyFactory.getProp(t,e.p.l,0,0,this.dynamicProperties),m:this.maskManager.getMaskProperty(e.p.m)})},ITextElement.prototype.getMeasures=function(){var t,e,s,i,a=this.mHelper,r=this.renderType,n=this.data,o=n.t.d,h=o.l;if("m"in n.t.p){var l=this.viewData.p.m;if(!this.viewData.p.n||this.viewData.p.mdf){var m=l.v,p={tLength:0,segments:[]};i=m.v.length-1;var f;for(s=0;i>s;s+=1)f={s:m.v[s],e:m.v[s+1],to:[m.o[s][0]-m.v[s][0],m.o[s][1]-m.v[s][1]],ti:[m.i[s+1][0]-m.v[s+1][0],m.i[s+1][1]-m.v[s+1][1]]},bez.buildBezierData(f),p.tLength+=f.bezierData.segmentLength,p.segments.push(f);s=i,l.closed&&(f={s:m.v[s],e:m.v[0],to:[m.o[s][0]-m.v[s][0],m.o[s][1]-m.v[s][1]],ti:[m.i[0][0]-m.v[0][0],m.i[0][1]-m.v[0][1]]},bez.buildBezierData(f),p.tLength+=f.bezierData.segmentLength,p.segments.push(f)),this.viewData.p.pi=p}var d,c,u,p=this.viewData.p.pi,v=this.viewData.p.f.v,y=0,g=1,b=0,E=!0,C=p.segments;if(0>v&&l.closed)for(p.tLength<Math.abs(v)&&(v=-Math.abs(v)%p.tLength),y=C.length-1,u=C[y].bezierData.points,g=u.length-1;0>v;)v+=u[g].partialLength,g-=1,0>g&&(y-=1,u=C[y].bezierData.points,g=u.length-1);u=C[y].bezierData.points,c=u[g-1],d=u[g];var w,S,P=d.partialLength}i=h.length,t=0,e=0;var D,I,F,T,A=1.2*n.t.d.s*.714,M=!0,x=this.viewData,k=new Array(i),V=!1;F=x.a.length;var L,N,_,R=[],B=n._letters;for(I=0;F>I;I+=1){L=n.t.a[I].totalChars,N=2===n.t.a[I].s.r?1:100/L,"e"in x.a[I].s||(x.a[I].s.e={v:2===n.t.a[I].s.r?L:100});var z=x.a[I].s.o.v/N;0===z&&0===x.a[I].s.s.v&&x.a[I].s.e.v===N;var O=x.a[I].s.s.v/N+z,j=x.a[I].s.e.v/N+z;if(O>j){var G=O;O=j,j=G}R.push({s:O,e:j,ne:x.a[I].s.ne.v,xe:x.a[I].s.xe.v})}var H,W,q,X,J,U,Y,Q,K,Z,$,tt,et,st,it,at=-1,rt=v,nt=y,ot=g,ht=0;for(s=0;i>s;s+=1){switch(a.reset(),o.j){case 1:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line]),0);break;case 2:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line])/2,0)}if(J=1,h[s].n)t=0,e+=o.yOffset,e+=M?1:0,v=rt,M=!1,ht=0,"m"in n.t.p&&(y=nt,g=ot,u=C[y].bezierData.points,c=u[g-1],d=u[g],P=d.partialLength,b=0),k[s]=this.emptyProp;else{if("m"in n.t.p){at!==h[s].ind&&(h[at]&&(v+=h[at].extra),v+=h[s].an/2,at=h[s].ind),v+=x.m.a.v[0]*h[s].an/200;var lt=0;for(I=0;F>I;I+=1)D=x.a[I].a,"p"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),lt+=D.p.v[0]*H);for(E=!0;E;)if(b+P>=v+lt||!u){if(w=(v+lt-b)/d.partialLength,q=c.point[0]+(d.point[0]-c.point[0])*w,X=c.point[1]+(d.point[1]-c.point[1])*w,a.translate(q,X),n.t.p.p){S=(d.point[1]-c.point[1])/(d.point[0]-c.point[0]);var mt=180*Math.atan(S)/Math.PI;d.point[0]<c.point[0]&&(mt+=180),a.rotate(mt*Math.PI/180)}a.translate(0,x.m.a.v[1]*A/100+e),E=!1}else u&&(b+=d.partialLength,g+=1,g>=u.length&&(g=0,y+=1,C[y]?u=C[y].bezierData.points:l.closed?(g=0,y=0,u=C[y].bezierData.points):u=null),u&&(c=d,d=u[g],P=d.partialLength));W=h[s].an/2-h[s].add}else a.translate(t,e),W=h[s].an/2-h[s].add,a.translate(W,0),a.translate(x.m.a.v[0]*h[s].an/200,x.m.a.v[1]*A/100);for(ht+=h[s].l/2,I=0;F>I;I+=1)D=x.a[I].a,"t"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),"m"in n.t.p?v+=D.t*H:t+=D.t.v*H);for(ht+=h[s].l/2,I=0;F>I;I+=1)D=x.a[I].a,"p"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),"m"in n.t.p?a.translate(0,D.p.v[1]*H):a.translate(D.p.v[0]*H,D.p.v[1]*H));for(o.strokeWidthAnim&&(Y=n.t.d.sw||0),o.strokeColorAnim&&(U=n.t.d.sc?[n.t.d.sc[0],n.t.d.sc[1],n.t.d.sc[2]]:[0,0,0]),o.fillColorAnim&&(Q=[n.t.d.fc[0],n.t.d.fc[1],n.t.d.fc[2]]),I=0;F>I;I+=1){if(D=x.a[I].a,H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),"r"in D&&"s"in R[I]&&a.rotate(D.r.v*H),"o"in D&&"s"in R[I]&&(J+=(D.o.v*H-J)*H),o.strokeWidthAnim&&"sw"in D&&"s"in R[I]&&(Y+=D.sw.v*H),o.strokeColorAnim&&"sc"in D&&"s"in R[I])for(K=0;3>K;K+=1)U[K]=Math.round(U[K]+(D.sc.v[K]-U[K])*H);if(o.fillColorAnim&&"fc"in D&&"s"in R[I])for(K=0;3>K;K+=1)Q[K]=Math.round(Q[K]+(D.fc.v[K]-Q[K])*H)}for(o.strokeWidthAnim&&(Z=0>Y?0:Y),o.strokeColorAnim&&($="rgb("+U[0]+","+U[1]+","+U[2]+")"),o.fillColorAnim&&(tt="rgb("+Q[0]+","+Q[1]+","+Q[2]+")"),I=0;F>I;I+=1)D=x.a[I].a,"s"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),a.scale(1+(D.s.v[0]-1)*H,1+(D.s.v[1]-1)*H));for(I=0;F>I;I+=1)D=x.a[I].a,"a"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),a.translate(-D.a.v[0]*H,-D.a.v[1]*H));"m"in n.t.p?(a.translate(-x.m.a.v[0]*h[s].an/200,-x.m.a.v[1]*A/100),v-=x.m.a.v[0]*h[s].an/200,h[s+1]&&at!==h[s+1].ind&&(v+=h[s].an/2,v+=o.tr/1e3*n.t.d.s),a.translate(-W,0)):(a.translate(-W,0),a.translate(-x.m.a.v[0]*h[s].an/200,-x.m.a.v[1]*A/100),t+=h[s].l+o.tr/1e3*n.t.d.s),"svg"===r?et=a.toCSS():st=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]],it=J,B?(_=B[s],_.o!==it||_.sw!==Z||_.sc!==$||_.fc!==tt?(V=!0,T=new LetterProps(it,Z,$,tt,et,st)):"svg"===r&&_.m!==et?(V=!0,T=new LetterProps(it,Z,$,tt,et)):"svg"===r||_.props[1]===a.props[1]&&_.props[2]===a.props[2]&&_.props[3]===a.props[3]&&_.props[4]===a.props[4]&&_.props[5]===a.props[5]?T=_:(V=!0,T=new LetterProps(it,Z,$,tt,null,[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]]))):(V=!0,T=new LetterProps(it,Z,$,tt,et,st)),k[s]=T}}V&&(this.renderedLetters=k)},ITextElement.prototype.getMult=function(t,e,s,i,a,r){var n=bez.getEasingCurve(i/100,0,1-a/100,1),o=0;return 2==r?(o=s===e?t>=s?1:0:Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),o=n("",o,0,1,1)):3==r?(o=s===e?t>=s?0:1:1-Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),o=n("",o,0,1,1)):4==r?s===e?o=t>=s?0:1:(o=Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),.5>o?o*=2:o=1-o):t>=Math.floor(e)&&(o=0>t-e?1-(e-t):Math.max(0,Math.min(s-t,1))),o},ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,SVGTextElement.prototype.getMult=ITextElement.prototype.getMult,SVGTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d;this.innerElem=document.createElementNS(svgNS,"g"),t.fc?this.innerElem.setAttribute("fill","rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.innerElem.setAttribute("fill","rgba(0,0,0,0)"),t.sc&&(this.innerElem.setAttribute("stroke","rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")"),this.innerElem.setAttribute("stroke-width",t.sw)),this.innerElem.setAttribute("font-size",t.s);var e=this.globalData.fontManager.getFontByName(t.f);this.innerElem.setAttribute("font-family",e.fFamily);var s,i,a=t.fWeight,r=t.fStyle;this.innerElem.setAttribute("font-style",r),this.innerElem.setAttribute("font-weight",a),this.layerElement.appendChild(this.innerElem);var n=t.l;i=n.length;var o,h,l,m,p,f,d,c=this.mHelper,u="",v=this.data.singleShape;if(this.globalData.fontManager.chars&&v)var y=0,g=0,b=t.lineWidths,E=t.boxWidth,C=!0;for(s=0;i>s;s+=1){if(this.globalData.fontManager.chars?v&&0!==s||(o=document.createElementNS(svgNS,"path")):o=document.createElementNS(svgNS,"text"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var w=this.globalData.fontManager.getCharData(t.t.charAt(s),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),S=w.data;if(c.reset(),v&&n[s].n&&(y=0,g+=t.yOffset,g+=C?1:0,C=!1),S){if(h=S.shapes[0].it,v){switch(t.j){case 1:
-c.translate(t.justifyOffset+(E-b[n[s].line]),0);break;case 2:c.translate(t.justifyOffset+(E-b[n[s].line])/2,0)}c.translate(y,g)}else u="";for(m=h.length,c.scale(t.s/100,t.s/100),l=0;m>l;l+=1){for(f=h[l].ks.i.length,d=h[l].ks,p=1;f>p;p+=1)1==p&&(u+=" M"+c.applyToPointStringified(d.v[0][0],d.v[0][1])),u+=" C"+c.applyToPointStringified(d.o[p-1][0],d.o[p-1][1])+" "+c.applyToPointStringified(d.i[p][0],d.i[p][1])+" "+c.applyToPointStringified(d.v[p][0],d.v[p][1]);u+=" C"+c.applyToPointStringified(d.o[p-1][0],d.o[p-1][1])+" "+c.applyToPointStringified(d.i[0][0],d.i[0][1])+" "+c.applyToPointStringified(d.v[0][0],d.v[0][1]),u+="z"}v||o.setAttribute("d",u)}v?y+=n[s].l:this.innerElem.appendChild(o)}else o.textContent=n[s].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(o);this.textSpans.push(o)}v&&(o.setAttribute("d",u),this.innerElem.appendChild(o))},SVGTextElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},SVGTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||(this.finalTransform.matMdf&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),this.finalTransform.opMdf&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),!this.data.singleShape){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].setAttribute("transform",n.m),this.textSpans[s].setAttribute("opacity",n.o),n.sw&&this.textSpans[s].setAttribute("stroke-width",n.sw),n.sc&&this.textSpans[s].setAttribute("stroke",n.sc),n.fc&&this.textSpans[s].setAttribute("fill",n.fc))}},SVGTextElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null};var PlaceHolderElement=function(t,e,s){if(this.data=t,this.globalData=s,e){this.parentContainer=e;var i=document.createElementNS(svgNS,"g");i.setAttribute("id",this.data.id),e.appendChild(i),this.phElement=i}this.layerId="ly_"+randomString(10)};PlaceHolderElement.prototype.prepareFrame=function(){},PlaceHolderElement.prototype.renderFrame=function(){},PlaceHolderElement.prototype.draw=function(){},createElement(SVGBaseElement,ICompElement),ICompElement.prototype.getComposingElement=function(){return this.layerElement},ICompElement.prototype.hide=function(){if(!this.hidden){var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t].hide();this.hidden=!0}},ICompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1));var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},ICompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.data.hasMask?this.elements[e].renderFrame():this.elements[e].renderFrame(this.finalTransform);this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this.parent.destroy.call();var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t].destroy()},createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assetData.p),t.maskedElement=t.innerElem},s=new Image;s.addEventListener("load",e,!1),s.addEventListener("error",e,!1),s.src=this.path+this.assetData.p,this.parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},IImageElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||((this.finalTransform.matMdf||this.firstFrame)&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),(this.finalTransform.opMdf||this.firstFrame)&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},IShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.mainShape=new ShapeItemElement(this.data,this.layerElement,this.parentContainer,this.placeholder,this.dynamicProperties,this.globalData)},IShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden=!1,this.firstFrame&&(this.mainShape.firstFrame=!0,this.firstFrame=!1),void(this.data.hasMask?this.mainShape.renderShape(this.transformHelper,null,null,!0):this.mainShape.renderShape(this.finalTransform,null,null,!0)))},IShapeElement.prototype.hide=function(){this.hidden||(this.mainShape.hideShape(),this.hidden=!0)},IShapeElement.prototype.destroy=function(){this.parent.destroy.call(),this.mainShape.destroy()},ShapeItemElement.prototype.appendNodeToParent=SVGBaseElement.prototype.appendNodeToParent,ShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var m;if(e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty){if(m=document.createElementNS(svgNS,"g"),m.setAttribute("stroke-linecap",this.lcEnum[t[a].lc]||"round"),m.setAttribute("stroke-linejoin",this.ljEnum[t[a].lj]||"round"),m.setAttribute("fill-opacity","0"),1==t[a].lj&&m.setAttribute("stroke-miterlimit",t[a].ml),e[a].c.k||m.setAttribute("stroke","rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||m.setAttribute("stroke-opacity",e[a].o.v),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||m.setAttribute("stroke-width",e[a].w.v),t[a].d){var p=PropertyFactory.getDashProp(this.elemData,t[a].d,"svg",s);p.k?e[a].d=p:(m.setAttribute("stroke-dasharray",p.dasharray),m.setAttribute("stroke-dashoffset",p.dashoffset))}}else m=document.createElementNS(svgNS,"path"),e[a].c.k||m.setAttribute("fill","rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||m.setAttribute("fill-opacity",e[a].o.v);this.shape===this.parentContainer?this.appendNodeToParent(m):this.shape.appendChild(m),this.stylesList.push({pathElement:m,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var v={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(v),l.push(v)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},ShapeItemElement.prototype.getElement=function(){return this.shape},ShapeItemElement.prototype.hideShape=function(){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode))},ShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},ShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var m=r.s?r.s:[];for(a=1;i>a;a+=1)m[a-1]?(e.st&&(h+=" M"+m[a-1][0]+","+m[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(m[a-1][0],m[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(m[0]?(e.st&&(h+=" M"+m[0][0]+","+m[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(m[0][0],m[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},ShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&i.pathElement.setAttribute("fill","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&i.pathElement.setAttribute("fill-opacity",e.o.v*s.opacity)},ShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.pathElement.setAttribute("stroke-dasharray",a.dasharray),i.pathElement.setAttribute("stroke-dashoffset",a.dashoffset)),(e.c.mdf||this.firstFrame)&&i.pathElement.setAttribute("stroke","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&i.pathElement.setAttribute("stroke-opacity",e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&i.pathElement.setAttribute("stroke-width",e.w.v)},ShapeItemElement.prototype.destroy=function(t,e){this.shape=null,this.data=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement===this.parentContainer?this.appendNodeToParent(t):this.layerElement.appendChild(t),this.innerElem=t},ISolidElement.prototype.hide=IImageElement.prototype.hide,ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy,createElement(BaseElement,CVBaseElement),CVBaseElement.prototype.createElements=function(){},CVBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(!this.isVisible)return this.isVisible;this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]);return this.data.hasMask&&(this.globalData.renderer.save(!0),this.maskManager.renderFrame(s)),this.isVisible},CVBaseElement.prototype.getCurrentAnimData=function(){return this.currentAnimData},CVBaseElement.prototype.addMasks=function(t){this.maskManager=new CVMaskElement(t,this,this.globalData)},CVBaseElement.prototype.destroy=function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager&&this.maskManager.destroy()},CVBaseElement.prototype.mHelper=new Matrix,createElement(CVBaseElement,CVCompElement),CVCompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1));var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},CVCompElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e,s=this.layers.length;for(e=s-1;e>=0;e-=1)this.elements[e].renderFrame(this.finalTransform);this.data.hasMask&&this.globalData.renderer.restore(!0),this.firstFrame&&(this.firstFrame=!1)}},CVCompElement.prototype.setElements=function(t){this.elements=t},CVCompElement.prototype.getElements=function(){return this.elements},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.layers=null,this.elements=null,this.parent.destroy.call()},createElement(CVBaseElement,CVImageElement),CVImageElement.prototype.createElements=function(){var t=this,e=function(){t.animationItem.elementLoaded()},s=function(){t.failed=!0,t.animationItem.elementLoaded()};this.img=new Image,this.img.addEventListener("load",e,!1),this.img.addEventListener("error",s,!1),this.img.src=this.path+this.assetData.p,this.parent.createElements.call(this)},CVImageElement.prototype.renderFrame=function(t){if(!this.failed&&this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.drawImage(this.img,0,0),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},CVImageElement.prototype.destroy=function(){this.img=null,this.animationItem=null,this.parent.destroy.call()},CVMaskElement.prototype.getMaskProperty=function(t){return this.viewData[t]},CVMaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)},CVMaskElement.prototype.renderFrame=function(t){var e,s,i,a,r,n=this.ctx,o=this.data.masksProperties.length,h=!1;for(e=0;o>e;e++)if("n"!==this.masksProperties[e].mode){h===!1&&(n.beginPath(),h=!0),this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.globalData.compWidth,0),n.lineTo(this.globalData.compWidth,this.globalData.compHeight),n.lineTo(0,this.globalData.compHeight),n.lineTo(0,0)),r=this.viewData[e].v,s=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.moveTo(s[0],s[1]);var l,m=r.v.length;for(l=1;m>l;l++)s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[l][0],r.i[l][1]),a=t.applyToPointArray(r.v[l][0],r.v[l][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1]);s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[0][0],r.i[0][1]),a=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1])}h&&n.clip()},CVMaskElement.prototype.destroy=function(){this.ctx=null},createElement(CVBaseElement,CVShapeElement),CVShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.mainShape=new CVShapeItemElement(this.data,this.dynamicProperties,this.globalData)},CVShapeElement.prototype.renderFrame=function(t){this.parent.renderFrame.call(this,t)!==!1&&(this.firstFrame&&(this.mainShape.firstFrame=!0,this.firstFrame=!1),this.mainShape.renderShape(this.finalTransform,null,null,!0),this.data.hasMask&&this.globalData.renderer.restore(!0))},CVShapeElement.prototype.destroy=function(){this.mainShape.destroy(),this.parent.destroy.call()},CVShapeItemElement.prototype.dashResetter=[],CVShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],m=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var p=PropertyFactory.getDashProp(this.elemData,t[a].d,"canvas",s);e[a].d=p,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(u),m.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=m.length,a=0;h>a;a+=1)m[a].closed=!0},CVShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var m,p,f,d,c,u,v,y=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(v=this.stylesList[a].type,"st"!==v||0!==this.stylesList[a].wi){for(y.save(),c=this.stylesList[a].elements,p=c.length,"st"===v?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml):g.fillStyle=this.stylesList[a].co,y.ctxOpacity(this.stylesList[a].coOp),g.beginPath(),m=0;p>m;m+=1){for("st"===v?(y.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),y.ctxTransform(c[m].tr),u=c[m].nodes):u=c[m].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===v&&(g.stroke(),y.restore())}"st"!==v&&g.fill(),y.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeItemElement.prototype.destroy=function(){this.data=null,this.globalData=null,this.canvasContext=null},createElement(CVBaseElement,CVSolidElement),CVSolidElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.fillStyle=this.data.sc,e.fillRect(0,0,this.data.sw,this.data.sh),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(CVBaseElement,CVTextElement),CVTextElement.prototype.init=ITextElement.prototype.init,CVTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,CVTextElement.prototype.getMult=ITextElement.prototype.getMult,CVTextElement.prototype.tHelper=document.createElement("canvas").getContext("2d"),CVTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d,e=!1;t.fc?(e=!0,this.values.fill="rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.values.sWidth=t.sw);var i,a,r=this.globalData.fontManager.getFontByName(t.f),n=this.mHelper;this.stroke=s,this.values.fValue=t.s+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.t.length,this.tHelper.font=this.values.fValue;var o,h,l,m,p,f,d,c,u,v;for(i=0;a>i;i+=1){if(o=this.globalData.fontManager.getCharData(t.t.charAt(i),r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),n.reset(),n.scale(t.s/100,t.s/100),h=o.data)for(p=h.shapes[0].it,d=p.length,u=new Array(d),f=0;d>f;f+=1){for(m=p[f].ks.i.length,c=p[f].ks,v=[],l=1;m>l;l+=1)1==l&&v.push(n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),v.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[l][0],c.i[l][1]),n.applyToY(c.i[l][0],c.i[l][1]),n.applyToX(c.v[l][0],c.v[l][1]),n.applyToY(c.v[l][0],c.v[l][1]));v.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[0][0],c.i[0][1]),n.applyToY(c.i[0][0],c.i[0][1]),n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),u[f]=v}else u=[];this.textSpans.push({elem:u})}},CVTextElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext,s=this.finalTransform.mat.props;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.font=this.values.fValue,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.getMeasures();var i,a,r,n,o,h,l=this.renderedLetters,m=this.data.t.d.l;a=m.length;var p,f,d,c=null,u=null,v=null;for(i=0;a>i;i+=1)if(!m[i].n){if(p=l[i],this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(p.props),this.globalData.renderer.ctxOpacity(p.o),this.fill){for(p.fc?c!==p.fc&&(c=p.fc,e.fillStyle=p.fc):c!==this.values.fill&&(c=this.values.fill,e.fillStyle=this.values.fill),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(p.sw?v!==p.sw&&(v=p.sw,e.lineWidth=p.sw):v!==this.values.sWidth&&(v=this.values.sWidth,e.lineWidth=this.values.sWidth),p.sc?u!==p.sc&&(u=p.sc,e.strokeStyle=p.sc):u!==this.values.stroke&&(u=this.values.stroke,e.strokeStyle=this.values.stroke),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}this.globalData.renderer.restore()}this.globalData.renderer.restore(this.data.hasMask)}};var animationManager=function(){function t(t,e){if(!t)return null;for(var s=0;b>s;){if(v[s].elem==t&&null!==v[s].elem)return v[s].animation;s+=1}var i=new AnimationItem;return i.setData(t,e),v.push({elem:t,animation:i}),b+=1,i}function e(t){var e=new AnimationItem;return e.setParams(t),v.push({elem:null,animation:e}),b+=1,e}function s(t,e){var s;for(s=0;b>s;s+=1)v[s].animation.setSpeed(t,e)}function i(t,e){var s;for(s=0;b>s;s+=1)v[s].animation.setDirection(t,e)}function a(t){var e;for(e=0;b>e;e+=1)v[e].animation.play(t)}function r(t,e){g=!1,y=Date.now();var s;for(s=0;b>s;s+=1)v[s].animation.moveFrame(t,e)}function n(){var t,e=Date.now(),s=e-y;for(t=0;b>t;t+=1)v[t].animation.renderer.destroyed?(v.splice(t,1),t-=1,b-=1):v[t].animation.advanceTime(s);y=e,requestAnimationFrame(n)}function o(t){var e;for(e=0;b>e;e+=1)v[e].animation.pause(t)}function h(t,e,s){var i;for(i=0;b>i;i+=1)v[i].animation.goToAndStop(t,e,s)}function l(t){var e;for(e=0;b>e;e+=1)v[e].animation.stop(t)}function m(t){var e;for(e=0;b>e;e+=1)v[e].animation.togglePause(t)}function p(t){var e;for(e=0;b>e;e+=1)v[e].animation.destroy(t)}function f(e,s,i){var a,r=document.getElementsByClassName("bodymovin"),n=r.length;for(a=0;n>a;a+=1)i&&r[a].setAttribute("data-bm-type",i),t(r[a],e);if(s&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),t(h,e)}}function d(){var t;for(t=0;b>t;t+=1)v[t].animation.resize()}function c(){y=Date.now(),requestAnimationFrame(n)}var u={},v=[],y=0,g=!0,b=0;return setTimeout(c,0),u.registerAnimation=t,u.loadAnimation=e,u.setSpeed=s,u.setDirection=i,u.play=a,u.moveFrame=r,u.pause=o,u.stop=l,u.togglePause=m,u.searchAnimations=f,u.resize=d,u.start=c,u.goToAndStop=h,u.destroy=p,u}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.repeat="indefinite",this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.isScrolling=!1,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.renderedFrameCount=0,this.scaleMode="fit",this.math=Math,this.removed=!1,this.timeCompleted=0,this.segmentPos=0,this.segments=[]};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var s=t.animType?t.animType:t.renderer?t.renderer:"canvas";switch(s){case"canvas":this.renderer=new CanvasRenderer(this,t.renderer);break;case"svg":this.renderer=new SVGRenderer(this,t.renderer)}if(this.animType=s,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));
-else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},AnimationItem.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||(s.loop="false"===a?!1:"true"===a?!0:parseInt(a)),s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var r=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===r&&(s.prerender=!1),this.setParams(s)},AnimationItem.prototype.includeLayers=function(t){var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;n>s;s+=1)for(e=0;a>e;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}if(t.assets)for(a=t.assets.length,e=0;a>e;e+=1)this.animationData.assets.push(t.assets[e]);dataManager.completeData(this.animationData),this.renderer.includeLayers(t.layers),this.renderer.buildStage(this.container,this.layers),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.animationData._id=this.animationID,this.animationData._animType=this.animType,this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.loadSegments(),dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():this.checkLoaded()},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(this.renderer.buildItems(this.animationData.layers),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(this.renderer.buildStage(this.container,this.layers),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=subframeEnabled?this.currentRawFrame:this.math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1)},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0)},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?(this.isPaused=!1,this.play()):(this.isPaused=!0,this.pause()))},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.isPaused=!0)},AnimationItem.prototype.advanceTime=function(t){this.isPaused!==!0&&this.isScrolling!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier)},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.trigger("segmentStart")},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;i>s;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&(this.adjustSegment(this.segments.shift()),this.setCurrentRawFrameValue(0)),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||this.renderer.destroy()},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t;var e=!1;if(this.currentRawFrame>=this.totalFrames){if(this.segments.length&&(e=!0),this.loop===!1)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");if(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete")}else if(this.currentRawFrame<0)return this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1?(this.currentRawFrame=0,this.gotoFrame(),this.pause(),void this.trigger("complete")):(this.trigger("loopComplete"),this.currentRawFrame=this.totalFrames+this.currentRawFrame,void this.gotoFrame());if(e){var s=this.currentRawFrame%this.totalFrames;this.adjustSegment(this.segments.shift()),this.currentRawFrame=s}else this.currentRawFrame=this.currentRawFrame%this.totalFrames;this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;s>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames))},AnimationItem.prototype.addEventListener=addEventListener,AnimationItem.prototype.removeEventListener=removeEventListener,AnimationItem.prototype.triggerEvent=triggerEvent,function(t){function e(t){animationManager.play(t)}function s(t){animationManager.pause(t)}function i(t){animationManager.togglePause(t)}function a(t,e){animationManager.setSpeed(t,e)}function r(t,e){animationManager.setDirection(t,e)}function n(t){animationManager.stop(t)}function o(t){animationManager.moveFrame(t)}function h(){E===!0?animationManager.searchAnimations(C,E,w):animationManager.searchAnimations()}function l(t){return animationManager.registerAnimation(t)}function m(){animationManager.resize()}function p(){animationManager.start()}function f(t,e,s){animationManager.goToAndStop(t,e,s)}function d(t){subframeEnabled=t}function c(t){return E===!0&&(t.animationData=JSON.parse(C)),animationManager.loadAnimation(t)}function u(t){return animationManager.destroy(t)}function v(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(defaultCurveSegments>=50?!1:!0)}function y(){"complete"===document.readyState&&(clearInterval(F),h())}function g(t){for(var e=I.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var b={};b.play=e,b.pause=s,b.togglePause=i,b.setSpeed=a,b.setDirection=r,b.stop=n,b.moveFrame=o,b.searchAnimations=h,b.registerAnimation=l,b.loadAnimation=c,b.setSubframeRendering=d,b.resize=m,b.start=p,b.goToAndStop=f,b.destroy=u,b.setQuality=v,b.version="3.1.1",b.checkReady=y,t.bodymovin=b;var E="__[STANDALONE]__",C="__[ANIMATIONDATA]__",w="";if(E){var S=document.getElementsByTagName("script"),P=S.length-1,D=S[P],I=D.src.replace(/^[^\?]+\??/,"");w=g("renderer")}var F=setInterval(y,100)}(window);}(window));
\ No newline at end of file
+(function(window){function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,s,i,a,r){return t.reset().translate(a,r).rotate(e).scale(s,i).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 roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="hidden",styleUnselectableDiv(t)}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=0>i?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,s,i){this.type=t,this.currentLoop=e,this.totalLoops=s,this.direction=0>i?-1:1}function BMSegmentStartEvent(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}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,i=this._cbs[t].length;i>s;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=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,i=0;s>i;i++)this._cbs[t][i](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}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,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.props=r}function iterateDynamicProperties(t){var e,s=this.dynamicProperties;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)}function createElement(t,e,s){if(!e){var i=Object.create(t.prototype,s),a={};return i&&"[object Function]"===a.toString.call(i.init)&&i.init(),i}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,i,a,r){return bm_abs((s-t)*(r-e)-(a-t)*(i-e))<1e-5}function e(t,e,s,i,a){if(a||(a=("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p")),o[a])return o[a];var r,n,h,l,p,m;return o[a]=function(a,o,f,d,c){var u=o/c;a=u;for(var y,v=0;++v<20&&(h=3*t,n=3*(s-t)-h,r=1-h-n,y=a*(h+a*(n+a*r))-u,!(bm_abs(y)<.001));)a-=y/(h+a*(2*n+3*r*a));m=3*e,p=3*(i-e)-m,l=1-m-p;var g=a*(m+a*(p+a*l));return g},o[a]}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var s=e.segments,i=s.length,a=bm_floor((i-1)*t),r=t*e.addedLength,n=0;if(r==s[a].l)return s[a].p;for(var o=s[a].l>r?-1:1,h=!0;h;)s[a].l<=r&&s[a+1].l>r?(n=(r-s[a].l)/(s[a+1].l-s[a].l),h=!1):a+=o,(0>a||a>=i-1)&&(h=!1);return s[a].p+(s[a+1].p-s[a].p)*n}function r(){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,i,n,o,h){var l=new r;n=0>n?0:n;var p=a(n,h);o=o>1?1:o;var m,f=a(o,h),d=t.length,c=1-p,u=1-f;for(m=0;d>m;m+=1)l.pt1[m]=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)*i[m]+p*p*p*e[m],l.pt3[m]=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)*i[m]+p*p*f*e[m],l.pt4[m]=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)*i[m]+p*f*f*e[m],l.pt2[m]=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)*i[m]+f*f*f*e[m];return l}var o=[],h=(Math,function(){function e(t,e){this.l=t,this.p=e}var s={};return function(i,a,r,n){var o=(i.join("_")+"_"+a.join("_")+"_"+r.join("_")+"_"+n.join("_")).replace(/\./g,"p");if(s[o])return s[o];var h,l,p,m,f,d,c=defaultCurveSegments,u=0,y=[],v=[],g={addedLength:0,segments:[]};for((i[0]!=a[0]||i[1]!=a[1])&&t(i[0],i[1],a[0],a[1],r[0],r[1])&&t(i[0],i[1],a[0],a[1],n[0],n[1])&&(c=2),p=r.length,h=0;c>h;h+=1){for(f=h/(c-1),d=0,l=0;p>l;l+=1)m=bm_pow(1-f,3)*i[l]+3*bm_pow(1-f,2)*f*r[l]+3*(1-f)*bm_pow(f,2)*n[l]+bm_pow(f,3)*a[l],y[l]=m,null!==v[l]&&(d+=bm_pow(y[l]-v[l],2)),v[l]=y[l];d&&(d=bm_sqrt(d),u+=d),g.segments.push(new e(u,f))}return g.addedLength=u,s[o]=g,g}}()),l=function(){var e={};return function(a){var r=a.s,n=a.e,o=a.to,h=a.ti,l=(r.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(a.bezierData=e[l]);var p,m,f,d,c,u,y,v=defaultCurveSegments,g=0,b=null;(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+o[0],r[1]+o[1])&&t(r[0],r[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(v=2);var E=new s(v);for(f=o.length,p=0;v>p;p+=1){for(y=new Array(f),c=p/(v-1),u=0,m=0;f>m;m+=1)d=bm_pow(1-c,3)*r[m]+3*bm_pow(1-c,2)*c*(r[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),g+=u,E.points[p]=new i(u,y),b=y}E.segmentLength=g,a.bezierData=E,e[l]=E}}();return{getEasingCurve:e,getBezierLength:h,getNewSegment:n,buildBezierData:l}}function dataFunctionManager(){function t(a,n,o){var h,l,p,m,f,d,c,u,y=a.length;for(m=0;y>m;m+=1)if(h=a[m],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(a[m-1].td=h.tt),l=[],p=-1,h.hasMask){var v=h.masksProperties;for(d=v.length,f=0;d>f;f+=1)if(v[f].pt.k.i)i(v[f].pt.k);else for(u=v[f].pt.k.length,c=0;u>c;c+=1)v[f].pt.k[c].s&&i(v[f].pt.k[c].s[0]),v[f].pt.k[c].e&&i(v[f].pt.k[c].e[0])}0===h.ty?(h.layers=e(h.refId,n),t(h.layers,n,o)):4===h.ty?s(h.shapes,!1):5==h.ty&&r(h,o)}}function e(t,e){for(var s=0,i=e.length;i>s;){if(e[s].id===t)return JSON.parse(JSON.stringify(e[s].layers));s+=1}}function s(t,e){var a,r,n,o=t.length,h=e?e:!1;for(a=o-1;a>=0;a-=1)if("tm"==t[a].ty&&(h=!0),"sh"==t[a].ty)if(t[a].trimmed=h,t[a].ks.k.i)i(t[a].ks.k);else for(n=t[a].ks.k.length,r=0;n>r;r+=1)t[a].ks.k[r].s&&i(t[a].ks.k[r].s[0]),t[a].ks.k[r].e&&i(t[a].ks.k[r].e[0]);else"gr"==t[a].ty&&s(t[a].it,h)}function i(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 a(e,s){t(e.layers,e.assets,s)}function r(t,e){var s,i,a,r,o,h,l,p,m=[],f=t.t.d,d=0,c=t.t.m.g,u=0,y=0,v=0,g=[],b=0,E=0,P=e.getFontByName(f.f),S=P.fStyle.split(" "),C="normal",k="normal";for(i=S.length,s=0;i>s;s+=1)"italic"===S[s].toLowerCase()?k="italic":"bold"===S[s].toLowerCase()?C="700":"black"===S[s].toLowerCase()?C="900":"medium"===S[s].toLowerCase()?C="500":"regular"===S[s].toLowerCase()||"normal"===S[s].toLowerCase()?C="400":("light"===S[s].toLowerCase()||"thin"===S[s].toLowerCase())&&(C="200");for(f.fWeight=C,f.fStyle=k,i=f.t.length,s=0;i>s;s+=1)if(a=!1," "===f.t.charAt(s)?r=" ":13===f.t.charCodeAt(s)?(g.push(b),E=b>E?b:E,b=0,r="",a=!0,v+=1):r=f.t.charAt(s),e.chars?(l=e.getCharData(f.t.charAt(s),P.fStyle,e.getFontByName(f.f).fFamily),p=a?0:l.w*f.s/100):(n.font=f.s+"px "+e.getFontByName(f.f).fFamily,p=n.measureText(r).width),b+=p,m.push({l:p,an:p,add:u,n:a,anIndexes:[],val:r,line:v}),2==c){if(u+=p,""==r||" "==r||s==i-1){for((""==r||" "==r)&&(u-=p);s>=y;)m[y].an=u,m[y].ind=d,m[y].extra=p,y+=1;d+=1,u=0}}else if(3==c){if(u+=p,""==r||s==i-1){for(""==r&&(u-=p);s>=y;)m[y].an=u,m[y].ind=d,m[y].extra=p,y+=1;u=0,d+=1}}else m[d].ind=d,m[d].extra=0,d+=1;switch(f.l=m,E=b>E?b:E,g.push(b),f.boxWidth=E,f.lineWidths=g,f.j){case 1:t.t.d.justifyOffset=-f.boxWidth;break;case 2:t.t.d.justifyOffset=-f.boxWidth/2;break;default:t.t.d.justifyOffset=0}var w=t.t.a;h=w.length;var x,D,I=[];for(o=0;h>o;o+=1){for(w[o].a.sc&&(f.strokeColorAnim=!0),w[o].a.sw&&(f.strokeWidthAnim=!0),w[o].a.fc&&(f.fillColorAnim=!0),D=0,x=w[o].s.b,s=0;i>s;s+=1)m[s].anIndexes[o]=D,(1==x&&""!=m[s].val||2==x&&""!=m[s].val&&" "!=m[s].val||3==x&&(m[s].n||" "==m[s].val||s==i-1)||4==x&&(m[s].n||s==i-1))&&(1===w[o].s.rn&&I.push(D),D+=1);t.t.a[o].s.totalChars=D;var F,T=-1;if(1===w[o].s.rn)for(s=0;i>s;s+=1)T!=m[s].anIndexes[o]&&(T=m[s].anIndexes[o],F=I.splice(Math.floor(Math.random()*I.length),1)[0]),m[s].anIndexes[o]=F}0!==h||"m"in t.t.p||(t.singleShape=!0),f.yOffset=1.2*f.s}var n=document.createElement("canvas").getContext("2d"),o=(new Matrix,{});return o.completeData=a,o}function ExpressionComp(){}function ShapeInterface(){}function SVGRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},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:new Array(15),savedOp:new Array(15),cArrPos:0,cTr:new Matrix,cO:1};var s,i=15;for(s=0;i>s;s+=1)this.contextData.saved[s]=new Array(6);this.elements=[]}function HybridRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},this.elements=[],this.destroyed=!1}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 i,a,r,n,o,h,l,p=this.element.maskedElement,m=this.globalData.defs,f=this.masksProperties.length,d=this.masksProperties,c=0,u=[],y=randomString(10),v="clipPath",g="clip-path";for(i=0;f>i;i++)if(("a"!==d[i].mode&&"n"!==d[i].mode||d[i].inv)&&(v="mask",g="mask"),"s"!=d[i].mode&&"i"!=d[i].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[i].mode){if(c+=1,a=document.createElementNS(svgNS,"path"),d[i].cl?"s"==d[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"):(a.setAttribute("fill","none"),"s"==d[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"),a.setAttribute("stroke-width","1"),a.setAttribute("stroke-miterlimit","10")),a.setAttribute("clip-rule","nonzero"),0!==d[i].x.k){v="mask",g="mask";var b=PropertyFactory.getProp(this.element,d[i].x,0,null,this.dynamicProperties),E="fi_"+randomString(10);h=document.createElementNS(svgNS,"filter"),h.setAttribute("id",E),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[i].mode?a.setAttribute("stroke","#000000"):a.setAttribute("stroke","#ffffff")}else l=null;if(this.storedData[i]={elem:a,x:b,expan:l,lastPath:"",lastOperator:"",filterId:E,lastRadius:0},"i"==d[i].mode){n=u.length;var P=document.createElementNS(svgNS,"g");for(r=0;n>r;r+=1)P.appendChild(u[r]);var S=document.createElementNS(svgNS,"mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",y+"_"+c),S.appendChild(a),m.appendChild(S),P.setAttribute("mask","url(#"+y+"_"+c+")"),u.length=0,u.push(P)}else u.push(a);d[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",prop:PropertyFactory.getShapeProp(this.element,d[i],3,this.dynamicProperties,null)},this.viewData[i].prop.k||this.drawPath(d[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={prop:PropertyFactory.getShapeProp(this.element,d[i],3,this.dynamicProperties,null)};for(this.maskElement=document.createElementNS(svgNS,v),f=u.length,i=0;f>i;i+=1)this.maskElement.appendChild(u[i]);this.maskElement.setAttribute("id",y),c>0&&p.setAttribute(g,"url(#"+y+")"),m.appendChild(this.maskElement)}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,1/255,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 EffectsManager(t,e,s){this.data=t,this.element=e;var i=t.ef;this.effectElements=[];var a,r,n=i.length;for(a=0;n>a;a++)switch(i[a].ty){case 0:r=new SliderEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 1:r=new AngleEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 2:r=new ColorEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 3:r=new PointEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 4:r=new CheckboxEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r))}}function BaseElement(){}function SVGBaseElement(t,e,s,i,a){this.globalData=s,this.comp=i,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=a?a.layerId:"ly_"+randomString(10),this.placeholder=a,this.init()}function ITextElement(t,e,s,i){}function SVGTextElement(t,e,s,i,a){this.textSpans=[],this.renderType="svg",this.parent.constructor.call(this,t,e,s,i,a)}function ICompElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a),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,i,a){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this.parent.constructor.call(this,t,e,s,i,a)}function IShapeElement(t,e,s,i,a){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.parent.constructor.call(this,t,e,s,i,a)}function ShapeItemElement(t,e,s,i,a,r){this.shape=e,this.parentContainer=s,this.placeholder=i,this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=r,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,a,[]),styleUnselectableDiv(this.shape)}function ISolidElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a)}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),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,s.frameRate,this.dynamicProperties,this.comp))}function CVImageElement(t,e,s){this.animationItem=s.renderer.animationItem,this.assetData=this.animationItem.getAssetData(t.refId),this.path=this.animationItem.getPath(),this.parent.constructor.call(this,t,e,s),this.animationItem.pendingElements+=1}function CVMaskElement(t,e,s){this.data=t,this.element=e,this.globalData=s,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.ctx=this.element.canvasContext,this.viewData=new Array(this.masksProperties.length);var i,a=this.masksProperties.length;for(i=0;a>i;i++)this.viewData[i]=PropertyFactory.getShapeProp(this.element,this.masksProperties[i],3,this.dynamicProperties,null)}function CVShapeElement(t,e,s){this.shapes=[],this.stylesList=[],this.viewData=[],this.shapesData=t.shapes,this.firstFrame=!0,this.parent.constructor.call(this,t,e,s)}function CVShapeItemElement(t,e,s){this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=s,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,e,[])}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.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.parent.constructor.call(this,t,e,s),this.renderedLetters=[]}function HBaseElement(t,e,s,i,a){this.globalData=s,this.comp=i,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=a?a.layerId:"ly_"+randomString(10),this.placeholder=a,this.init()}function HSolidElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a)}function HCompElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a),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,i,a){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.parent.constructor.call(this,t,e,s,i,a)}function HTextElement(t,e,s,i,a){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.parent.constructor.call(this,t,e,s,i,a)}var svgNS="http://www.w3.org/2000/svg",Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=1,this.props[4]=0,this.props[5]=0,this}function e(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,s,-s,e,0,0)}function s(t,e){return this._t(1,e,t,1,0,0)}function i(t,e){return this.shear(Math.tan(t),Math.tan(e))}function a(t,e){var s=Math.cos(e),i=Math.sin(e);return this._t(s,i,-i,s,0,0)._t(1,0,Math.tan(t),1,0,0)._t(s,-i,i,s,0,0)}function r(t,e){return 1==t&&1==e?this:this._t(t,0,0,e,0,0)}function n(t,e,s,i,a,r){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this}function o(t,e){return(0!==t||0!==e)&&(this.props[4]=this.props[0]*t+this.props[2]*e+this.props[4],this.props[5]=this.props[1]*t+this.props[3]*e+this.props[5]),this}function h(t,e,s,i,a,r){if(1===t&&0===e&&0===s&&1===i)return(0!==a||0!==r)&&(this.props[4]=this.props[0]*a+this.props[2]*r+this.props[4],this.props[5]=this.props[1]*a+this.props[3]*r+this.props[5]),this;var n=this.props[0],o=this.props[1],h=this.props[2],l=this.props[3],p=this.props[4],m=this.props[5];return this.props[0]=n*t+h*e,this.props[1]=o*t+l*e,this.props[2]=n*s+h*i,this.props[3]=o*s+l*i,this.props[4]=n*a+h*r+p,this.props[5]=o*a+l*r+m,this}function l(t){t.props[0]=this.props[0],t.props[1]=this.props[1],t.props[2]=this.props[2],t.props[3]=this.props[3],t.props[4]=this.props[4],t.props[5]=this.props[5]}function p(t,e){return{x:t*this.props[0]+e*this.props[2]+this.props[4],y:t*this.props[1]+e*this.props[3]+this.props[5]}}function m(t,e){return t*this.props[0]+e*this.props[2]+this.props[4]}function f(t,e){return t*this.props[1]+e*this.props[3]+this.props[5]}function d(t,e){return[t*this.props[0]+e*this.props[2]+this.props[4],t*this.props[1]+e*this.props[3]+this.props[5]]}function c(t,e){return bm_rnd(t*this.props[0]+e*this.props[2]+this.props[4])+","+bm_rnd(t*this.props[1]+e*this.props[3]+this.props[5])}function u(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5]]}function y(){return this.cssParts[1]=this.props.join(","),this.cssParts.join("")}function v(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.skew=i,this.skewFromAxis=a,this.shear=s,this.scale=r,this.setTransform=n,this.translate=o,this.transform=h,this.applyToPoint=p,this.applyToX=m,this.applyToY=f,this.applyToPointArray=d,this.applyToPointStringified=c,this.toArray=u,this.toCSS=y,this.toString=v,this.clone=l,this._t=this.transform,this.props=[1,0,0,1,0,0],this.cssParts=["matrix(","",")"]}}(),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 i=(new Date).getTime(),a=Math.max(0,16-(i-t)),r=window.setTimeout(function(){e(i+a)},a);return t=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var subframeEnabled=!0,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,defaultCurveSegments=50,degToRads=Math.PI/180;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,i){return 0>t&&(t=0),0>e&&(e=0),0>i&&(i=0),"#"+s[t]+s[e]+s[i]}}(),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]]}}(),bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var s=document.createElement("span");s.style.fontFamily=e;var i=document.createElement("span");i.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(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function e(){var t,s,i,a=this.fonts.length,r=a;for(t=0;a>t;t+=1)this.fonts[t].loaded?r-=1:(s=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,s.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(s=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,s.offsetWidth!==i&&(r-=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!==r&&Date.now()-this.initTime<o?setTimeout(e.bind(this),20):this.loaded=!0}function s(){if(window.Typekit&&window.Typekit.load)try{Typekit.load({async:!1})}catch(t){console.log("errwor",t)}else setTimeout(s,50)}function i(i,a){if(!i)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=i.list);if(i.tk){var r=document.createElement("script");r.setAttribute("src",i.tk),a.appendChild(r),s()}var n,o=i.list,h=o.length;for(n=0;h>n;n+=1){if(o[n].loaded=!1,o[n].monoCase=t(o[n].fFamily,"monospace"),o[n].sansCase=t(o[n].fFamily,"sans-serif"),o[n].fPath&&o[n].fPath){var r=document.createElement("style");r.type="text/css",r.innerHTML="@font-face {font-family: "+o[n].fFamily+"; font-style: normal; src: url('"+o[n].fPath+"');}",a.appendChild(r)}this.fonts.push(o[n])}e.bind(this)()}function a(t){this.chars=t}function r(t,e,s){for(var i=0,a=this.chars.length;a>i;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}}function n(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 o=5e3,h=function(){this.fonts=[],this.chars=null,this.loaded=!1,this.initTime=Date.now()};return h.prototype.addChars=a,h.prototype.addFonts=i,h.prototype.getCharData=r,h.prototype.getFontByName=n,h}(),ExpressionManager=function(){function sum(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("object"==typeof t&&"number"==typeof e)return t[0]=t[0]+e,t;if("number"==typeof t&&"object"==typeof e)return e[0]=t+e[0],e;if("object"==typeof t&&"object"==typeof e){for(var s=0,i=t.length,a=e.length,r=[];i>s||a>s;)r[s]=t[s]&&e[s]?t[s]+e[s]:t[s]||e[s],s+=1;return r}return 0}function sub(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("object"==typeof t&&"number"==typeof e)return t[0]=t[0]-e,t;if("number"==typeof t&&"object"==typeof e)return e[0]=t-e[0],e;if("object"==typeof t&&"object"==typeof e){for(var s=0,i=t.length,a=e.length,r=[];i>s||a>s;)r[s]=t[s]&&e[s]?t[s]-e[s]:t[s]||e[s],s+=1;return r}return 0}function mul(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;var s,i;if("object"==typeof t&&"number"==typeof e){for(i=t.length,s=0;i>s;s+=1)t[s]=t[s]*e;return t}if("number"==typeof t&&"object"==typeof e){for(i=e.length,s=0;i>s;s+=1)e[s]=t*e[s];return e}return 0}function div(t,e){if("number"==typeof t&&"number"==typeof e)return t/e;var s,i;if("object"==typeof t&&"number"==typeof e){for(i=t.length,s=0;i>s;s+=1)t[s]=t[s]/e;return t}if("number"==typeof t&&"object"==typeof e){for(i=e.length,s=0;i>s;s+=1)e[s]=t/e[s];return e}return 0}function clamp(t,e,s){return Math.min(Math.max(t,e),s)}function random(t,e){if(e||(e=0),t>e){var s=e;e=t,t=s}return t+Math.random()*(e-t)}function initiateExpression(elem,data){function effect(t){return elem.effectsManager.getEffect(t)}function nearestKey(t){var e=0,s=data.k.length,i={};for(e=0;s>e;e+=1){if(t===data.k[e].t){i.index=e;break}if(t<data.k[e].t){i.index=e;break}if(t>data.k[e].t&&e===s-1){i.index=s-1;break}}return i}function key(t){t-=1;var e,s={time:data.k[t].t/thisComp.globalData.frameRate};e=t===data.k.length-1?data.k[t-1].e:data.k[t].s;var i,a=e.length;for(i=0;a>i;i+=1)s[i]=e[i];return s}function execute(){"textSelector"===this.type&&(textIndex=this.textIndex,textTotal=this.textTotal),transform||(transform=elem.transform),!content&&elem.content&&(content=elem.content.bind(elem)),this.getPreValue&&this.getPreValue(),value=this.pv,time=this.comp.renderedFrame/this.comp.globalData.frameRate,bindedFn();var t,e;if(this.mult)if("number"==typeof this.v)this.v*=this.mult;else for(e=this.v.length,value===this.v&&(this.v=2===e?[value[0],value[1]]:[value[0],value[1],value[2]]),t=0;e>t;t+=1)this.v[t]*=this.mult;if("number"==typeof this.v)this.lastValue!==this.v&&(this.lastValue=this.v,this.mdf=!0);else for(e=this.v.length,t=0;e>t;t+=1)this.v[t]!==this.lastValue[t]&&(this.lastValue[t]=this.v[t],this.mdf=!0)}var val=data.x,transform,content,effect,thisComp=elem.comp,fnStr="var fn = function(){"+val+";this.v = $bm_rt;}";eval(fnStr);var bindedFn=fn.bind(this),numKeys=data.k?data.k.length:0,time,value,textIndex,textTotal;return execute}var ob={};return ob.initiateExpression=initiateExpression,ob}();!function(){ExpressionComp.prototype.layer=function(t){for(var e=0,s=this.layers.length;s>e;){if(this.layers[e].nm===t)return this.elements[e];e+=1}}}(),ShapeInterface.prototype.fillInterface=function(t){var e={get color(){return t.c.k&&t.c.getValue(),[t.c.pv[0],t.c.pv[1],t.c.pv[2]]},get opacity(){return t.o.k&&t.o.getValue(),t.o.pv}};return e},ShapeInterface.prototype.strokeInterface=function(t,e){var s={get color(){return e.c.k&&e.c.getValue(),[e.c.pv[0],e.c.pv[1],e.c.pv[2]]},get opacity(){return e.o.k&&e.o.getValue(),e.o.pv},get strokeWidth(){return e.w.k&&e.w.getValue(),e.w.pv},dashOb:{},get dash(){var s,i=e.d,a=t.d,r=a.length;for(s=0;r>s;s+=1)i.dataProps[s].p.k&&i.dataProps[s].p.getValue(),this.dashOb[a[s].nm]=i.dataProps[s].p.v;return this.dashOb}};return s},ShapeInterface.prototype.shapeInterface=function(t){var e={get shape(){return t.sh.k&&t.sh.getValue(),t.sh.pv}};return e},ShapeInterface.prototype.ellipseInterface=function(t){var e={get size(){return t.sh.s.k&&t.sh.s.getValue(),[t.sh.s.pv[0],t.sh.s.pv[1]]},get position(){return t.sh.p.k&&t.sh.p.getValue(),[t.sh.p.pv[0],t.sh.p.pv[1]]}};return e},ShapeInterface.prototype.rectangleInterface=function(t){var e="tm"===t.sh.ty?t.sh.prop:t.sh,s={get size(){return e.s.k&&e.s.getValue(),[e.s.pv[0],e.s.pv[1]]},get position(){return e.p.k&&e.p.getValue(),[e.p.pv[0],e.p.pv[1]]},get roundness(){return e.r.k&&e.r.getValue(),e.r.pv}};return s},ShapeInterface.prototype.trimInterface=function(t){var e={get start(){return t.tr.s.k&&t.tr.s.getValue(),t.tr.s.pv},get end(){return t.tr.e.k&&t.tr.e.getValue(),t.tr.e.pv},get offset(){return t.tr.o.k&&t.tr.o.getValue(),t.tr.o.pv}};return e},ShapeInterface.prototype.transformInterface=function(t){var e={get opacity(){return t.transform.mProps.o.k&&t.transform.mProps.o.getValue(),t.transform.mProps.o.pv},get position(){return t.transform.mProps.p.k&&t.transform.mProps.p.getValue(),[t.transform.mProps.p.pv[0],t.transform.mProps.p.pv[1]]},get anchorPoint(){return t.transform.mProps.a.k&&t.transform.mProps.a.getValue(),[t.transform.mProps.a.pv[0],t.transform.mProps.a.pv[1]]},get scale(){return t.transform.mProps.s.k&&t.transform.mProps.s.getValue(),[t.transform.mProps.s.pv[0],t.transform.mProps.s.pv[1]]},get rotation(){return t.transform.mProps.r.k&&t.transform.mProps.r.getValue(),t.transform.mProps.r.pv}};return e},ShapeInterface.prototype.groupInterface=function(t,e,s){var i,a,r=[],n=t.length;for(i=0;n>i;i+=1)"gr"===t[i].ty?(a={},this.groupInterface(t[i].it,e[i].it,a),r.push(a)):"sh"===t[i].ty?(a=this.shapeInterface(e[i]),r.push(a)):"fl"===t[i].ty?(a=this.fillInterface(e[i]),r.push(a)):"st"===t[i].ty?(a=this.strokeInterface(t[i],e[i]),r.push(a)):"el"===t[i].ty?(a=this.ellipseInterface(e[i]),r.push(a)):"rc"===t[i].ty?(a=this.rectangleInterface(e[i]),r.push(a)):"tr"===t[i].ty?s.transform=this.transformInterface(e[i]):"tm"===t[i].ty?(a=this.trimInterface(e[i]),r.push(a)):r.push("");s.content=function(e){var s,i=t.length;for(s=0;i>s;s+=1)if(t[s].nm===e)return r[s]}},ShapeInterface.prototype.buildExpressionInterface=function(){this.groupInterface(this.shapesData,this.viewData,this)};var PropertyFactory=function(){function t(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var t=this.comp.renderedFrame-this.offsetTime;if(t===this.lastFrame||this.lastFrame!==d&&(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,i=0,a=this.keyframes.length-1,r=1,n=!0;n;){if(e=this.keyframes[i],s=this.keyframes[i+1],i==a-1&&t>=s.t-this.offsetTime){e.h&&(e=s);break}if(s.t-this.offsetTime>t)break;a-1>i?i+=r:n=!1}var o,h,l,p,m,f=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?m=e.__fnct:(m=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y,e.n),e.__fnct=m),l=m("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime));var y,v=c.segmentLength*l,g=0;for(r=1,n=!0,p=c.points.length;n;){if(g+=c.points[f].partialLength*r,0===v||0===l||f==c.points.length-1){for(h=c.points[f].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?c.points[f].point[o]*this.mult:c.points[f].point[o],this.pv[o]=c.points[f].point[o],this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}if(v>g&&v<g+c.points[f+1].partialLength){for(y=(v-g)/c.points[f+1].partialLength,h=c.points[f].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?(c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y)*this.mult:c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.pv[o]=c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}p-1>f&&1==r||f>0&&-1==r?f+=r:n=!1}}}else{var b,E,P,S,C,k=!1;for(a=e.s.length,i=0;a>i;i+=1)1!==e.h&&(e.o.x instanceof Array?(k=!0,e.__fnct||(e.__fnct=[]),e.__fnct[i]||(b=e.o.x[i]||e.o.x[0],E=e.o.y[i]||e.o.y[0],P=e.i.x[i]||e.i.x[0],S=e.i.y[i]||e.i.y[0])):(k=!1,e.__fnct||(b=e.o.x,E=e.o.y,P=e.i.x,S=e.i.y)),k?e.__fnct[i]?m=e.__fnct[i]:(m=bez.getEasingCurve(b,E,P,S),e.__fnct[i]=m):e.__fnct?m=e.__fnct:(m=bez.getEasingCurve(b,E,P,S),e.__fnct=m),l=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:m("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))),C=1===e.h?e.s[i]:e.s[i]+(e.e[i]-e.s[i])*l,1===a?(this.v=this.mult?C*this.mult:C,
+this.pv=C,this.lastPValue!=this.pv&&(this.mdf=!0,this.lastPValue=this.pv)):(this.v[i]=this.mult?C*this.mult:C,this.pv[i]=C,this.lastPValue[i]!==this.pv[i]&&(this.mdf=!0,this.lastPValue[i]=this.pv[i]))}}this.lastFrame=t}}function e(){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime;if(this.lastFrame!==d&&(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,i;if(t<this.keyframes[0].t-this.offsetTime)this.mdf=!0,e=this.keyframes[0].s[0],i=!0;else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)this.mdf=!0,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],i=!0;else{this.mdf=!0;for(var a,r,n,o,h,l,p=0,m=this.keyframes.length-1,f=1,c=!0;c&&(a=this.keyframes[p],r=this.keyframes[p+1],!(r.t-this.offsetTime>t&&1==f));)m-1>p&&1==f||p>0&&-1==f?p+=f:c=!1;var u;if(1!==a.h){var y;a.__fnct?y=a.__fnct:(y=bez.getEasingCurve(a.o.x,a.o.y,a.i.x,a.i.y),a.__fnct=y),u=t>=r.t-this.offsetTime?1:t<a.t-this.offsetTime?0:y("",t-(a.t-this.offsetTime),0,1,r.t-this.offsetTime-(a.t-this.offsetTime)),s=a.e[0]}e=a.s[0],i=1===a.h}for(o=this.v.i.length,l=e.i[0].length,n=0;o>n;n+=1)for(h=0;l>h;h+=1)i?(this.v.i[n][h]=e.i[n][h],this.v.o[n][h]=e.o[n][h],this.v.v[n][h]=e.v[n][h],this.pv.i[n][h]=e.i[n][h],this.pv.o[n][h]=e.o[n][h],this.pv.v[n][h]=e.v[n][h]):(this.v.i[n][h]=e.i[n][h]+(s.i[n][h]-e.i[n][h])*u,this.v.o[n][h]=e.o[n][h]+(s.o[n][h]-e.o[n][h])*u,this.v.v[n][h]=e.v[n][h]+(s.v[n][h]-e.v[n][h])*u,this.pv.i[n][h]=e.i[n][h]+(s.i[n][h]-e.i[n][h])*u,this.pv.o[n][h]=e.o[n][h]+(s.o[n][h]-e.o[n][h])*u,this.pv.v[n][h]=e.v[n][h]+(s.v[n][h]-e.v[n][h])*u)}this.lastFrame=t}function s(t,e){this.getExpression=ExpressionManager.initiateExpression,e.x&&(this.k=!0,this.x=!0,this.getValue&&(this.getPreValue=this.getValue),this.getValue=this.getExpression(t,e))}function i(t,e,i){this.mult=i,this.v=i?e.k*i:e.k,this.pv=e.k,this.mdf=!1,this.comp=t.comp,this.k=!1,s.bind(this)(t,e)}function a(t,e,i){this.mult=i,this.mdf=!1,this.comp=t.comp,this.k=!1,s.bind(this)(t,e),this.v=new Array(e.k.length),this.pv=new Array(e.k.length);var a,r=e.k.length;for(a=0;r>a;a+=1)this.v[a]=i?e.k[a]*i:e.k[a],this.pv[a]=e.k[a]}function r(e,i,a){this.keyframes=i.k,this.offsetTime=e.data.st,this.lastValue=-99999,this.lastPValue=-99999,this.frameId=-1,this.k=!0,this.mult=a,this.elem=e,this.comp=e.comp,this.lastFrame=d,this.v=a?i.k[0].s[0]*a:i.k[0].s[0],this.pv=i.k[0].s[0],this.getValue=t,s.bind(this)(e,i)}function n(e,i,a){this.keyframes=i.k,this.offsetTime=e.data.st,this.k=!0,this.mult=a,this.elem=e,this.comp=e.comp,this.getValue=t,this.frameId=-1,this.v=new Array(i.k[0].s.length),this.pv=new Array(i.k[0].s.length),this.lastValue=new Array(i.k[0].s.length),this.lastPValue=new Array(i.k[0].s.length),this.lastFrame=d,s.bind(this)(e,i)}function o(t,e,s,o,h){var l;if(2===s)l=new c(t,e,h);else if(7===s)l=new v(t,e,h);else if(e.k.length)if("number"==typeof e.k[0])l=new a(t,e,o);else switch(s){case 0:l=new r(t,e,o);break;case 1:l=new n(t,e,o)}else l=new i(t,e,o);return(l.k||l.x)&&h.push(l),l}function h(t,e,i){this.comp=t.comp,this.k=!1,this.mdf=!1,this.closed=3===i?e.cl:e.closed,this.numNodes=3===i?e.pt.k.v.length:e.ks.k.v.length,this.v=3===i?e.pt.k:e.ks.k;var a=3===i?e.pt:e.ks;this.pv=this.v,s.bind(this)(t,a)}function l(t,s,i){this.comp=t.comp,this.offsetTime=t.data.st,this.getValue=e,this.keyframes=3===i?s.pt.k:s.ks.k,this.k=!0,this.closed=3===i?s.cl:s.closed;var a,r=this.keyframes[0].s[0].i.length,n=this.keyframes[0].s[0].i[0].length;for(this.numNodes=r,this.v={i:new Array(r),o:new Array(r),v:new Array(r)},this.pv={i:new Array(r),o:new Array(r),v:new Array(r)},a=0;r>a;a+=1)this.v.i[a]=new Array(n),this.v.o[a]=new Array(n),this.v.v[a]=new Array(n),this.pv.i[a]=new Array(n),this.pv.o[a]=new Array(n),this.pv.v[a]=new Array(n);this.lastFrame=d}function p(t,e,s,i,a){var r;if(3===s||4===s){var n=3===s?e.pt.k:e.ks.k;r=n.length?new l(t,e,s):new h(t,e,s)}else 5===s?r=new y(t,e):6===s&&(r=new u(t,e));var o=!1;if(a)for(var p=0,m=a.length;m>p;){if(!a[p].closed){o=!0;break}p+=1}return o&&(r=new g(r,a)),r.k&&i.push(r),r}function m(t,e,s,i){return new b(t,e,s,i)}function f(t,e,s){switch(e.t){case 0:return new P(t,e,s);case 1:return new E(t,e)}}var d=-999999,c=function(){function t(){return this.p.k&&this.getValue(),this.p.pv}function e(){return this.a.k&&this.getValue(),this.a.pv}function s(){return this.r.k&&this.getValue(),this.r.pv}function i(){return this.s.k&&this.getValue(),this.s.pv}function a(){return this.o.k&&this.o.getValue(),this.o.pv}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.data.p.s?this.v.reset().translate(this.px.v,this.py.v).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]):this.v.reset().translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]))}}return function(n,h,l){this.elem=n,this.frameId=-1,this.dynamicProperties=[],this.mdf=!1,this.data=h,this.getValue=r,this.v=new Matrix,this.a=o(n,h.a,1,0,this.dynamicProperties),h.p.s?(this.px=o(n,h.p.x,0,0,this.dynamicProperties),this.py=o(n,h.p.y,0,0,this.dynamicProperties)):this.p=o(n,h.p,1,0,this.dynamicProperties),this.s=o(n,h.s,1,.01,this.dynamicProperties),this.r=o(n,h.r,0,degToRads,this.dynamicProperties),this.o=o(n,h.o,0,.01,l),this.dynamicProperties.length?l.push(this):this.data.p.s?this.v.translate(this.px.v,this.py.v).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]):this.v.translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]),Object.defineProperty(this,"position",{get:t}),Object.defineProperty(this,"anchorPoint",{get:e}),Object.defineProperty(this,"rotation",{get:s}),Object.defineProperty(this,"scale",{get:i}),Object.defineProperty(this,"opacity",{get:a})}}(),u=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-a],this.v.i[0]=[t-i*s,e-a],this.v.o[0]=[t+i*s,e-a],this.v.v[1]=[t+i,e],this.v.i[1]=[t+i,e-a*s],this.v.o[1]=[t+i,e+a*s],this.v.v[2]=[t,e+a],this.v.i[2]=[t+i*s,e+a],this.v.o[2]=[t-i*s,e+a],this.v.v[3]=[t-i,e],this.v.i[3]=[t-i,e+a*s],this.v.o[3]=[t-i,e-a*s]):(this.v.v[0]=[t,e-a],this.v.o[0]=[t-i*s,e-a],this.v.i[0]=[t+i*s,e-a],this.v.v[1]=[t-i,e],this.v.o[1]=[t-i,e+a*s],this.v.i[1]=[t-i,e-a*s],this.v.v[2]=[t,e+a],this.v.o[2]=[t+i*s,e+a],this.v.i[2]=[t-i*s,e+a],this.v.v[3]=[t+i,e],this.v.o[3]=[t+i,e-a*s],this.v.i[3]=[t+i,e+a*s])}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()}}var s=.5519;return function(s,i){this.v={v:new Array(4),i:new Array(4),o:new Array(4),c:!0},this.numNodes=4,this.d=i.d,this.dynamicProperties=[],i.closed=!0,this.closed=!0,this.elem=s,this.comp=s.comp,this.frameId=-1,this.mdf=!1,this.getValue=e,this.convertEllToPath=t,this.p=o(s,i.p,1,0,this.dynamicProperties),this.s=o(s,i.s,1,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertEllToPath()}}(),y=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,i=this.s.v[1]/2,a=bm_min(s,i,this.r.v),r=a*(1-.5519);2===this.d||1===this.d?(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+s,e-i+r],this.v.v[1]=[t+s,e+i-a],this.v.o[1]=[t+s,e+i-r],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+s-a,e+i],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+s-r,e+i],this.v.v[3]=[t-s+a,e+i],this.v.o[3]=[t-s+r,e+i],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-s,e+i-r],this.v.v[5]=[t-s,e-i+a],this.v.o[5]=[t-s,e-i+r],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-s+a,e-i],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-s+r,e-i],this.v.v[7]=[t+s-a,e-i],this.v.o[7]=[t+s-r,e-i],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=[t+s,e-i+r],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+s-a,e-i],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+s-r,e-i],this.v.v[2]=[t-s+a,e-i],this.v.o[2]=[t-s+r,e-i],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-s,e-i+a],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-s,e-i+r],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=[t-s,e+i-r],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-s+a,e+i],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-s+r,e+i],this.v.v[6]=[t+s-a,e+i],this.v.o[6]=[t+s-r,e+i],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+s,e+i-a],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+s,e+i-r])}return function(s,i){this.v={v:new Array(8),i:new Array(8),o:new Array(8),c:!0},this.numNodes=8,this.elem=s,this.comp=s.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.p=o(s,i.p,1,0,this.dynamicProperties),this.s=o(s,i.s,1,0,this.dynamicProperties),this.r=o(s,i.r,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertRectToPath()}}(),v=function(){function t(t){if(this.elem.globalData.frameId!==this.frameId||t){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(),this.dynamicProperties[e].mdf&&(this.mdf=!0);if(this.mdf||t){var i=this.o.v%360/360;if(0===i&&0===this.s.v&&1==this.e.v)return void(this.isTrimming=!1);this.isTrimming=!0,0>i&&(i+=1);var a=this.s.v+i,r=this.e.v+i;if(a>r){var n=a;a=r,r=n}this.sValue=a,this.eValue=r,this.oValue=i}}}return function(e,s){this.elem=e,this.frameId=-1,this.dynamicProperties=[],this.sValue=0,this.eValue=0,this.oValue=0,this.mdf=!1,this.getValue=t,this.k=!1,this.isTrimming=!1,this.comp=e.comp,this.s=o(e,s.s,0,.01,this.dynamicProperties),this.e=o(e,s.e,0,.01,this.dynamicProperties),this.o=o(e,s.o,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.getValue(!0)}}(),g=function(){function t(t,e){this.totalLength=0;var s,i=t.v,a=t.o,r=t.i,n=i.length;for(s=0;n-1>s;s+=1)this.lengths[s]=bez.getBezierLength(i[s],i[s+1],a[s],r[s+1]),this.totalLength+=this.lengths[s].addedLength;e&&(this.lengths[s]=bez.getBezierLength(i[s],i[0],a[s],r[0]),this.totalLength+=this.lengths[s].addedLength)}function e(t,e,s,i,a){this.nextO[this.segmentCount]=e,this.nextI[this.segmentCount+1]=s,this.nextV[this.segmentCount+1]=i,this.pathStarted?this.nextV[this.segmentCount]=t:(this.pathStarted=!0,this.v.s[this.segmentCount]=t),this.segmentCount+=1}function s(t){this.mdf=t?!0:!1,this.prop.k&&this.prop.getValue();var e=0,s=this.trims.length;for(this.pathStarted=!1;s>e;){if(this.trims[e].mdf){this.mdf=!0;break}e+=1}if(this.mdf=this.prop.mdf?!0:this.mdf,this.mdf){this.nextO.length=0,this.nextI.length=0,this.nextV.length=0,this.v.s.length=0;var i=this.prop.closed;this.getSegmentsLength(this.prop.v,i);var a,r,n,o,h,l,p=this.prop.v,m=this.trims.length;for(a=0;m>a;a+=1)if(this.trims[a].isTrimming){if(r=this.trims[a].eValue,n=this.trims[a].sValue,o=this.trims[a].oValue,r===n)return this.v.v=this.nextV,this.v.o=this.nextO,void(this.v.i=this.nextI);1>=r?(this.segments[0].s=this.totalLength*n,this.segments[0].e=this.totalLength*r,this.segments[1].vl=!1):n>=1?(this.segments[0].s=this.totalLength*(n-1),this.segments[0].e=this.totalLength*(r-1),this.segments[1].vl=!1):(this.segments[0].s=this.totalLength*n,this.segments[0].e=this.totalLength,this.segments[1].s=0,this.segments[1].e=this.totalLength*(r-1),this.segments[1].vl=!0),this.v.v=p.v,this.v.o=p.o,this.v.i=p.i,l=this.v.v.length;var f=0,d=0;s=this.segments[1].vl?2:1;var c;for(this.segmentCount=0,e=0;s>e;e+=1){for(f=0,h=1;l>h;h++)if(d=this.lengths[h-1].addedLength,f+d<this.segments[e].s)f+=d;else{if(f>this.segments[e].e)break;this.segments[e].s<=f&&this.segments[e].e>=f+d?this.addSegment(this.v.v[h-1],this.v.o[h-1],this.v.i[h],this.v.v[h],this.lengths[h-1]):(c=bez.getNewSegment(this.v.v[h-1],this.v.v[h],this.v.o[h-1],this.v.i[h],(this.segments[e].s-f)/d,(this.segments[e].e-f)/d,this.lengths[h-1]),this.addSegment(c.pt1,c.pt3,c.pt4,c.pt2)),f+=d}i!==!1?f<=this.segments[e].e&&(d=this.lengths[h-1].addedLength,this.segments[e].s<=f&&this.segments[e].e>=f+d?this.addSegment(this.v.v[h-1],this.v.o[h-1],this.v.i[0],this.v.v[0],this.lengths[h-1]):(c=bez.getNewSegment(this.v.v[h-1],this.v.v[0],this.v.o[h-1],this.v.i[0],(this.segments[e].s-f)/d,(this.segments[e].e-f)/d,this.lengths[h-1]),this.addSegment(c.pt1,c.pt3,c.pt4,c.pt2))):this.pathStarted=!1}i=!1}else this.v.v=p.v,this.v.o=p.o,this.v.i=p.i;this.nextV.length?(this.v.v=this.nextV,this.v.o=this.nextO,this.v.i=this.nextI):this.v.s.length=0,this.v.c=i}}return function(i,a){this.trims=[],this.k=!1,this.mdf=!1,this.ty="tm",this.pathStarted=!1,this.segments=[{s:0,e:0,vl:!0},{s:0,e:0,vl:!1}],this.nextO=[],this.nextV=[],this.nextI=[],this.v={i:null,o:null,v:null,s:[],c:!1};var r,n=a.length;for(r=0;n>r;r+=1)a[r].closed||(this.k=a[r].trimProp.k?!0:this.k,this.trims.push(a[r].trimProp));this.prop=i,n=this.prop.numNodes-1,n+=this.prop.closed?1:0,this.lengths=new Array(n),this.k=i.k?!0:this.k,this.totalLength=0,this.getValue=s,this.addSegment=e,this.getSegmentsLength=t,this.k||(this.prop.getValue(),this.getValue(!0))}}(),b=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,i,a){this.elem=e,this.frameId=-1,this.dataProps=new Array(s.length),this.renderer=i,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(s.length-1),this.dashoffset=0;var r,n,h=s.length;for(r=0;h>r;r+=1)n=o(e,s[r].v,0,0,a),this.k=n.k?!0:this.k,this.dataProps[r]={n:s[r].n,p:n};this.getValue=t,this.k?a.push(this):this.getValue(!0)}}(),E=function(){function t(t,e){return this.textIndex=t+1,this.textTotal=e,this.getValue(),this.v}return function(e,i){this.pv=1,this.comp=e.comp,this.mult=.01,this.type="textSelector",this.textTotal=i.totalChars,s.bind(this)(e,i),this.getMult=t}}(),P=function(){function t(){if(this.dynamicProperties.length){var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue()}var s=this.data.totalChars,i=2===this.data.r?1:100/s,a=this.o.v/i,r=this.s.v/i+a,n=this.e.v/i+a;if(r>n){var o=r;r=n,n=o}this.finalS=r,this.finalE=n}function e(t){var e=bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1),r=0,n=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)r=o===n?t>=o?1:0:s(0,i(.5/(o-n)+(t-n)/(o-n),1)),r=e("",r,0,1,1);else if(3==h)r=o===n?t>=o?0:1:1-s(0,i(.5/(o-n)+(t-n)/(o-n),1)),r=e("",r,0,1,1);else if(4==h)o===n?r=t>=o?0:1:(r=s(0,i(.5/(o-n)+(t-n)/(o-n),1)),.5>r?r*=2:r=1-r);else if(5==h)if(o===n)r=t>=o?0:1;else{var l=o-n;r=-4/(l*l)*t*t+4/l*t}else 6==h?r=o===n?t>=o?0:1:(1+(Math.cos(Math.PI+2*Math.PI*(t-n)/(o-n))+0))/2:t>=a(n)&&(r=0>t-n?1-(n-t):s(0,i(o-t,1)));return r}var s=Math.max,i=Math.min,a=Math.floor;return function(s,i,a){this.mdf=!1,this.k=!1,this.data=i,this.dynamicProperties=[],this.getValue=t,this.getMult=e,this.comp=s.comp,this.finalS=0,this.finalE=0,this.s=o(s,i.s||{k:0},0,0,this.dynamicProperties),this.e="e"in i?o(s,i.e,0,0,this.dynamicProperties):{v:2===i.r?i.totalChars:100},this.o=o(s,i.o||{k:0},0,0,this.dynamicProperties),this.xe=o(s,i.xe||{k:0},0,0,this.dynamicProperties),this.ne=o(s,i.ne||{k:0},0,0,this.dynamicProperties),this.dynamicProperties.length?a.push(this):this.getValue()}}(),S={};return S.getProp=o,S.getShapeProp=p,S.getDashProp=m,S.getTextSelectorProp=f,S}();SVGRenderer.prototype.createItem=function(t,e,s,i){switch(t.ty){case 2:return this.createImage(t,e,s,i);case 0:return this.createComp(t,e,s,i);case 1:return this.createSolid(t,e,s,i);case 4:return this.createShape(t,e,s,i);case 5:return this.createText(t,e,s,i);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},SVGRenderer.prototype.buildItems=function(t,e,s,i,a){var r,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),i||(i=this);var o;for(r=n-1;r>=0;r--)s[r]=this.createItem(t[r],e,i,a),0===t[r].ty&&(o=[],this.buildItems(t[r].layers,s[r].getDomElement(),o,s[r],s[r].placeholder),s[r].setElements(o)),t[r].td&&s[r+1].setMatte(s[r].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)if(t[i].id)for(r=0;h>r;)s[r].data.id==t[i].id&&(o=s[r],s[r]=this.createItem(t[i],e,this,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,s[r],s[i].placeholder),s[r].setElements(n))),r+=1;else{var l=this.createItem(t[i],e,this);s.push(l),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,l.getDomElement(),n,l),l.setElements(n))}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},SVGRenderer.prototype.createBase=function(t,e,s,i){return new SVGBaseElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,s,i){return new IShapeElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createText=function(t,e,s,i){return new SVGTextElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createImage=function(t,e,s,i){return new IImageElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createComp=function(t,e,s,i){return new ICompElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createSolid=function(t,e,s,i){return new ISolidElement(t,e,this.globalData,s,i)},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","xMidYMid meet"),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"),i=document.createElementNS(svgNS,"rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+randomString(10);s.setAttribute("id",a),s.appendChild(i);var r=document.createElementNS(svgNS,"g");r.setAttribute("clip-path","url(#"+a+")"),this.animationItem.container.appendChild(r),e.appendChild(s),this.animationItem.container=r,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 i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;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=0;s>e;e++)this.elements[e].prepareFrame(t-this.layers[e].st);for(e=0;s>e;e++)this.elements[e].renderFrame()}},extendPrototype(ExpressionComp,SVGRenderer),CanvasRenderer.prototype.createItem=function(t,e){switch(t.ty){case 0:return this.createComp(t,e);case 1:return this.createSolid(t,e);case 2:return this.createImage(t,e);case 4:return this.createShape(t,e);case 5:return this.createText(t,e);case 99:return this.createPlaceHolder(t,e);default:return this.createBase(t,e)}return this.createBase(t,e)},CanvasRenderer.prototype.buildItems=function(t,e,s){e||(e=this.elements),s||(s=this);var i,a=t.length;for(i=0;a>i;i++)if(e[i]=this.createItem(t[i],s),0===t[i].ty){var r=[];this.buildItems(t[i].layers,r,e[i]),e[e.length-1].setElements(r)}},CanvasRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements);var r,n,o=s.length;for(i=0;a>i;i+=1)if(t[i].id)for(r=0;o>r;)s[r].data.id==t[i].id&&(s[r]=this.createItem(t[i],this),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,n,s[r]),s[r].setElements(n))),r+=1;else{var h=this.createItem(t[i],this);s.unshift(h),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,h),h.setElements(n))}},CanvasRenderer.prototype.createBase=function(t,e){return new CVBaseElement(t,e,this.globalData)},CanvasRenderer.prototype.createShape=function(t,e){return new CVShapeElement(t,e,this.globalData)},CanvasRenderer.prototype.createText=function(t,e){return new CVTextElement(t,e,this.globalData)},CanvasRenderer.prototype.createPlaceHolder=function(t){return new PlaceHolderElement(t,null,this.globalData)},CanvasRenderer.prototype.createImage=function(t,e){return new CVImageElement(t,e,this.globalData)},CanvasRenderer.prototype.createComp=function(t,e){return new CVCompElement(t,e,this.globalData)},CanvasRenderer.prototype.createSolid=function(t,e){return new CVSolidElement(t,e,this.globalData)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[2]||1!==t[3]||0!==t[4]||0!==t[5]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[2],t[3],t[4],t[5]);this.contextData.cTr.transform(t[0],t[1],t[2],t[3],t[4],t[5]);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])}},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(6));var s,i=6,a=this.contextData.saved[this.contextData.cArrPos];for(s=0;i>s;s+=1)a[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],i=6,a=this.contextData.cTr.props;for(e=0;i>e;e+=1)a[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),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.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.updateContainerSize(),this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document)},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,i=this.transformCanvas.w/this.transformCanvas.h;i>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,this.transformCanvas.sy,this.transformCanvas.tx,this.transformCanvas.ty],this.globalData.cWidth=t,this.globalData.cHeight=e},CanvasRenderer.prototype.buildStage=function(t,e,s){s||(s=this.elements);var i,a,r=e.length;for(i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemHierarchy(a,s[i],e,a.parent,s,!0),0==a.ty&&this.buildStage(null,a.layers,s[i].getElements())},CanvasRenderer.prototype.buildItemHierarchy=function(t,e,s,i,a,r){var n=0,o=s.length;for(r&&e.resetHierarchy();o>n;)s[n].ind===i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemHierarchy(t,e,s,s[n].parent,a,!1)),n+=1},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers.length;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.clearRect(0,0,this.globalData.cWidth,this.globalData.cHeight)):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()}},extendPrototype(ExpressionComp,CanvasRenderer),HybridRenderer.prototype.createItem=function(t,e,s,i){switch(t.ty){case 2:return this.createImage(t,e,s,i);case 0:return this.createComp(t,e,s,i);case 1:return this.createSolid(t,e,s,i);case 4:return this.createShape(t,e,s,i);case 5:return this.createText(t,e,s,i);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},HybridRenderer.prototype.buildItems=function(t,e,s,i,a){var r,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),i||(i=this);var o;for(r=n-1;r>=0;r--)s[r]=this.createItem(t[r],e,i,a),0===t[r].ty&&(o=[],this.buildItems(t[r].layers,s[r].getDomElement(),o,s[r],s[r].placeholder),s[r].setElements(o)),t[r].td&&s[r+1].setMatte(s[r].layerId)},HybridRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)for(r=0;h>r;){if(s[r].data.id==t[i].id){o=s[r],s[r]=this.createItem(t[i],e,this,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,s[r],s[i].placeholder),s[r].setElements(n));break}r+=1}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},HybridRenderer.prototype.createBase=function(t,e,s,i){return new SVGBaseElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},HybridRenderer.prototype.createShape=function(t,e,s,i){return s.isSvg?new IShapeElement(t,e,this.globalData,s,i):new HShapeElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createText=function(t,e,s,i){return s.isSvg?new SVGTextElement(t,e,this.globalData,s,i):new HTextElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createImage=function(t,e,s,i){return new IImageElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createComp=function(t,e,s,i){return s.isSvg?new ICompElement(t,e,this.globalData,s,i):new HCompElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createSolid=function(t,e,s,i){return s.isSvg?new ISolidElement(t,e,this.globalData,s,i):new HSolidElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.configAnimation=function(t){this.animationItem.container=document.createElement("div"),this.animationItem.container.style.width=t.w+"px",this.animationItem.container.style.height=t.h+"px",this.animationItem.container.style.transform="translate3d(0,0,0)",this.animationItem.container.style.position="absolute",this.animationItem.container.style.clip="rect(0px, "+t.w+"px, "+t.h+"px, 0px)",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,"svg");e.setAttribute("width","1"),e.setAttribute("height","1"),styleDiv(e),this.animationItem.container.appendChild(e);var s=document.createElementNS(svgNS,"defs");e.appendChild(s),this.globalData.defs=s,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,document)},HybridRenderer.prototype.buildStage=function(t,e,s){var i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},HybridRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},HybridRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;for(t=0;e>t;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0},HybridRenderer.prototype.updateContainerSize=function(){},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()}},extendPrototype(ExpressionComp,HybridRenderer),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.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)),console.log(2*this.storedData[t].x.v),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 i,a,r="";for(a=e.v.length,i=1;a>i;i+=1)1==i&&(r+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-1][1])+" "+bm_rnd(e.i[i][0])+","+bm_rnd(e.i[i][1])+" "+bm_rnd(e.v[i][0])+","+bm_rnd(e.v[i][1]);t.cl&&(r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-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!==r&&(t.inv?s.elem.setAttribute("d",this.solidPath+r):s.elem.setAttribute("d",r),s.lastPath=r)},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},SliderEffect.prototype.proxyFunction=function(){return this.p.v},AngleEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,ColorEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,PointEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,CheckboxEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,EffectsManager.prototype.getEffect=function(t){for(var e=this.data.ef,s=0,i=e.length;i>s;){if(e[s].nm===t)return this.effectElements[s];s+=1}},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.isVisible=!1);var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t);return this.data.hasMask&&this.maskManager.prepareFrame(t),this.currentFrameNum=t,this.isVisible},BaseElement.prototype.init=function(){this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.dynamicProperties=[],this.currentFrameNum=-99999,this.lastNum=-99999,this.data.ef&&(this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties),this.effect=this.effectsManager.getEffect.bind(this.effectsManager)),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,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,BaseElement.prototype.mask=function(t){return this.maskManager.getMask(t)},createElement(BaseElement,SVGBaseElement),SVGBaseElement.prototype.appendNodeToParent=function(t){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"),i=randomString(10);s.setAttribute("id",i),s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%");var a=document.createElementNS(svgNS,"feComponentTransfer");a.setAttribute("in","SourceGraphic"),s.appendChild(a);var r=document.createElementNS(svgNS,"feFuncA");r.setAttribute("type","table"),r.setAttribute("tableValues","1.0 0.0"),a.appendChild(r),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(#"+i+")"),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||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement.setAttribute("id",this.data.ln)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.data.hasMask&&(this.finalTransform.matMdf&&this.layerElement.setAttribute("transform","matrix("+s.props.join(",")+")"),this.finalTransform.opMdf&&this.layerElement.setAttribute("opacity",this.finalTransform.opacity)),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getDomElement=function(){return this.layerElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")},SVGBaseElement.prototype.hide=function(){},ITextElement.prototype.init=function(){this.parent.init.call(this);var t=this.data;this.renderedLetters=[],this.viewData={m:{a:PropertyFactory.getProp(this,t.t.m.a,1,0,this.dynamicProperties)}};var e=this.data.t;if(e.a.length){this.viewData.a=new Array(e.a.length);var s,i,a,r=e.a.length;for(s=0;r>s;s+=1)a=e.a[s],i={a:{},s:{}},"r"in a.a&&(i.a.r=PropertyFactory.getProp(this,a.a.r,0,degToRads,this.dynamicProperties)),"sk"in a.a&&(i.a.sk=PropertyFactory.getProp(this,a.a.sk,0,degToRads,this.dynamicProperties)),"sa"in a.a&&(i.a.sa=PropertyFactory.getProp(this,a.a.sa,0,degToRads,this.dynamicProperties)),"s"in a.a&&(i.a.s=PropertyFactory.getProp(this,a.a.s,1,.01,this.dynamicProperties)),"a"in a.a&&(i.a.a=PropertyFactory.getProp(this,a.a.a,1,0,this.dynamicProperties)),"o"in a.a&&(i.a.o=PropertyFactory.getProp(this,a.a.o,0,.01,this.dynamicProperties)),"p"in a.a&&(i.a.p=PropertyFactory.getProp(this,a.a.p,1,0,this.dynamicProperties)),"sw"in a.a&&(i.a.sw=PropertyFactory.getProp(this,a.a.sw,0,0,this.dynamicProperties)),"sc"in a.a&&(i.a.sc=PropertyFactory.getProp(this,a.a.sc,1,0,this.dynamicProperties)),"fc"in a.a&&(i.a.fc=PropertyFactory.getProp(this,a.a.fc,1,0,this.dynamicProperties)),"t"in a.a&&(i.a.t=PropertyFactory.getProp(this,a.a.t,0,0,this.dynamicProperties)),i.s=PropertyFactory.getTextSelectorProp(this,a.s,this.dynamicProperties),i.s.t=a.s.t,this.viewData.a[s]=i}else this.viewData.a=[];e.p&&"m"in e.p&&(this.viewData.p={f:PropertyFactory.getProp(this,e.p.f,0,0,this.dynamicProperties),l:PropertyFactory.getProp(this,e.p.l,0,0,this.dynamicProperties),m:this.maskManager.getMaskProperty(e.p.m)})},ITextElement.prototype.getMeasures=function(){var t,e,s,i,a=this.mHelper,r=this.renderType,n=this.data,o=n.t.d,h=o.l;if("m"in n.t.p){var l=this.viewData.p.m;if(!this.viewData.p.n||this.viewData.p.mdf){var p=l.v,m={tLength:0,segments:[]};i=p.v.length-1;var f;for(s=0;i>s;s+=1)f={s:p.v[s],e:p.v[s+1],to:[p.o[s][0]-p.v[s][0],p.o[s][1]-p.v[s][1]],ti:[p.i[s+1][0]-p.v[s+1][0],p.i[s+1][1]-p.v[s+1][1]]},bez.buildBezierData(f),m.tLength+=f.bezierData.segmentLength,m.segments.push(f);s=i,l.closed&&(f={s:p.v[s],e:p.v[0],to:[p.o[s][0]-p.v[s][0],p.o[s][1]-p.v[s][1]],ti:[p.i[0][0]-p.v[0][0],p.i[0][1]-p.v[0][1]]},bez.buildBezierData(f),m.tLength+=f.bezierData.segmentLength,m.segments.push(f)),this.viewData.p.pi=m}var d,c,u,m=this.viewData.p.pi,y=this.viewData.p.f.v,v=0,g=1,b=0,E=!0,P=m.segments;if(0>y&&l.closed)for(m.tLength<Math.abs(y)&&(y=-Math.abs(y)%m.tLength),v=P.length-1,u=P[v].bezierData.points,g=u.length-1;0>y;)y+=u[g].partialLength,g-=1,0>g&&(v-=1,u=P[v].bezierData.points,g=u.length-1);u=P[v].bezierData.points,c=u[g-1],d=u[g];var S,C,k=d.partialLength}i=h.length,t=0,e=0;var w,x,D,I,F,T=1.2*n.t.d.s*.714,M=!0,A=this.viewData,V=new Array(i),L=!1;I=A.a.length;var N,_,B,R,H,j,O,z,G,W,q,X,J,U,Y,K,Q=n._letters,$=-1,Z=y,tt=v,et=g,st=0;for(s=0;i>s;s+=1){switch(a.reset(),o.j){case 1:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line]),0);break;case 2:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line])/2,0)}if(j=1,h[s].n)t=0,e+=o.yOffset,e+=M?1:0,y=Z,M=!1,st=0,"m"in n.t.p&&(v=tt,g=et,u=P[v].bezierData.points,c=u[g-1],d=u[g],k=d.partialLength,b=0),V[s]=this.emptyProp;else{if("m"in n.t.p){$!==h[s].ind&&(h[$]&&(y+=h[$].extra),y+=h[s].an/2,$=h[s].ind),y+=A.m.a.v[0]*h[s].an/200;var it=0;for(D=0;I>D;D+=1)w=A.a[D].a,"p"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),it+=w.p.v[0]*_);for(E=!0;E;)if(b+k>=y+it||!u){if(S=(y+it-b)/d.partialLength,R=c.point[0]+(d.point[0]-c.point[0])*S,H=c.point[1]+(d.point[1]-c.point[1])*S,a.translate(R,H),n.t.p.p){C=(d.point[1]-c.point[1])/(d.point[0]-c.point[0]);var at=180*Math.atan(C)/Math.PI;d.point[0]<c.point[0]&&(at+=180),a.rotate(at*Math.PI/180)}a.translate(0,A.m.a.v[1]*T/100+e),E=!1}else u&&(b+=d.partialLength,g+=1,g>=u.length&&(g=0,v+=1,P[v]?u=P[v].bezierData.points:l.closed?(g=0,v=0,u=P[v].bezierData.points):u=null),u&&(c=d,d=u[g],k=d.partialLength));B=h[s].an/2-h[s].add}else a.translate(t,e),B=h[s].an/2-h[s].add,a.translate(B,0),a.translate(A.m.a.v[0]*h[s].an/200,A.m.a.v[1]*T/100);for(st+=h[s].l/2,D=0;I>D;D+=1)w=A.a[D].a,"t"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"m"in n.t.p?y+=w.t*_:t+=w.t.v*_);for(st+=h[s].l/2,D=0;I>D;D+=1)w=A.a[D].a,"p"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"m"in n.t.p?a.translate(0,w.p.v[1]*_):a.translate(w.p.v[0]*_,w.p.v[1]*_));for(o.strokeWidthAnim&&(z=n.t.d.sw||0),o.strokeColorAnim&&(O=n.t.d.sc?[n.t.d.sc[0],n.t.d.sc[1],n.t.d.sc[2]]:[0,0,0]),o.fillColorAnim&&(G=[n.t.d.fc[0],n.t.d.fc[1],n.t.d.fc[2]]),D=0;I>D;D+=1){if(w=A.a[D].a,x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"r"in w&&a.rotate(w.r.v*_),"sk"in w&&a.skewFromAxis(-(w.sk.v*_),-w.sa.v*_),"o"in w&&(j+=(w.o.v*_-j)*_),o.strokeWidthAnim&&"sw"in w&&(z+=w.sw.v*_),o.strokeColorAnim&&"sc"in w)for(W=0;3>W;W+=1)O[W]=Math.round(O[W]+(w.sc.v[W]-O[W])*_);if(o.fillColorAnim&&"fc"in w)for(W=0;3>W;W+=1)G[W]=Math.round(G[W]+(w.fc.v[W]-G[W])*_)}for(o.strokeWidthAnim&&(q=0>z?0:z),o.strokeColorAnim&&(X="rgb("+O[0]+","+O[1]+","+O[2]+")"),o.fillColorAnim&&(J="rgb("+G[0]+","+G[1]+","+G[2]+")"),D=0;I>D;D+=1)w=A.a[D].a,"s"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),a.scale(1+(w.s.v[0]-1)*_,1+(w.s.v[1]-1)*_));for(D=0;I>D;D+=1)w=A.a[D].a,"a"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),a.translate(-w.a.v[0]*_,-w.a.v[1]*_));"m"in n.t.p?(a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*T/100),y-=A.m.a.v[0]*h[s].an/200,h[s+1]&&$!==h[s+1].ind&&(y+=h[s].an/2,y+=o.tr/1e3*n.t.d.s),a.translate(-B,0)):(a.translate(-B,0),a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*T/100),t+=h[s].l+o.tr/1e3*n.t.d.s),"svg"===r?U=a.toCSS():Y=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]],K=j,Q?(N=Q[s],N.o!==K||N.sw!==q||N.sc!==X||N.fc!==J?(L=!0,F=new LetterProps(K,q,X,J,U,Y)):"svg"===r&&N.m!==U?(L=!0,F=new LetterProps(K,q,X,J,U)):"svg"===r||N.props[1]===a.props[1]&&N.props[2]===a.props[2]&&N.props[3]===a.props[3]&&N.props[4]===a.props[4]&&N.props[5]===a.props[5]?F=N:(L=!0,F=new LetterProps(K,q,X,J,null,[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]]))):(L=!0,F=new LetterProps(K,q,X,J,U,Y)),V[s]=F}}L&&(this.renderedLetters=V)},ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,SVGTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d;this.innerElem=document.createElementNS(svgNS,"g"),t.fc?this.innerElem.setAttribute("fill","rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.innerElem.setAttribute("fill","rgba(0,0,0,0)"),t.sc&&(this.innerElem.setAttribute("stroke","rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")"),this.innerElem.setAttribute("stroke-width",t.sw)),this.innerElem.setAttribute("font-size",t.s);var e=this.globalData.fontManager.getFontByName(t.f);this.innerElem.setAttribute("font-family",e.fFamily);var s,i,a=t.fWeight,r=t.fStyle;this.innerElem.setAttribute("font-style",r),this.innerElem.setAttribute("font-weight",a),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem);var n=t.l;i=n.length;var o,h,l,p,m,f,d,c=this.mHelper,u="",y=this.data.singleShape;if(this.globalData.fontManager.chars&&y)var v=0,g=0,b=t.lineWidths,E=t.boxWidth,P=!0;for(s=0;i>s;s+=1){if(this.globalData.fontManager.chars?y&&0!==s||(o=document.createElementNS(svgNS,"path")):o=document.createElementNS(svgNS,"text"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var S=this.globalData.fontManager.getCharData(t.t.charAt(s),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),C=S.data;if(c.reset(),y&&n[s].n&&(v=0,g+=t.yOffset,g+=P?1:0,P=!1),C){if(h=C.shapes[0].it,y){switch(t.j){case 1:c.translate(t.justifyOffset+(E-b[n[s].line]),0);break;case 2:c.translate(t.justifyOffset+(E-b[n[s].line])/2,0)}c.translate(v,g)}else u="";for(p=h.length,c.scale(t.s/100,t.s/100),l=0;p>l;l+=1){for(f=h[l].ks.k.i.length,d=h[l].ks.k,m=1;f>m;m+=1)1==m&&(u+=" M"+c.applyToPointStringified(d.v[0][0],d.v[0][1])),u+=" C"+c.applyToPointStringified(d.o[m-1][0],d.o[m-1][1])+" "+c.applyToPointStringified(d.i[m][0],d.i[m][1])+" "+c.applyToPointStringified(d.v[m][0],d.v[m][1]);u+=" C"+c.applyToPointStringified(d.o[m-1][0],d.o[m-1][1])+" "+c.applyToPointStringified(d.i[0][0],d.i[0][1])+" "+c.applyToPointStringified(d.v[0][0],d.v[0][1]),u+="z"}y||o.setAttribute("d",u)}y?v+=n[s].l:this.innerElem.appendChild(o)}else o.textContent=n[s].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(o);this.textSpans.push(o)}y&&(o.setAttribute("d",u),this.innerElem.appendChild(o))},SVGTextElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},SVGTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask||(this.finalTransform.matMdf&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),this.finalTransform.opMdf&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),!this.data.singleShape){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].setAttribute("transform",n.m),this.textSpans[s].setAttribute("opacity",n.o),n.sw&&this.textSpans[s].setAttribute("stroke-width",n.sw),n.sc&&this.textSpans[s].setAttribute("stroke",n.sc),n.fc&&this.textSpans[s].setAttribute("fill",n.fc))}},SVGTextElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null};var PlaceHolderElement=function(t,e,s){if(this.data=t,this.globalData=s,e){this.parentContainer=e;var i=document.createElementNS(svgNS,"g");i.setAttribute("id",this.data.id),e.appendChild(i),this.phElement=i}this.layerId="ly_"+randomString(10)};PlaceHolderElement.prototype.prepareFrame=function(){},PlaceHolderElement.prototype.renderFrame=function(){},PlaceHolderElement.prototype.draw=function(){},createElement(SVGBaseElement,ICompElement),extendPrototype(ExpressionComp,ICompElement),ICompElement.prototype.getComposingElement=function(){return this.layerElement},ICompElement.prototype.hide=function(){if(!this.hidden){var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t].hide();this.hidden=!0}},ICompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},ICompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.data.hasMask?this.elements[e].renderFrame():this.elements[e].renderFrame(this.finalTransform);this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this.parent.destroy.call();var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t].destroy()},createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assetData.p),t.maskedElement=t.innerElem},s=new Image;s.addEventListener("load",e,!1),s.addEventListener("error",e,!1),s.src=this.path+this.assetData.p,this.parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln)},IImageElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},IImageElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||((this.finalTransform.matMdf||this.firstFrame)&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),(this.finalTransform.opMdf||this.firstFrame)&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.ljEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},IShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),styleUnselectableDiv(this.layerElement),this.buildExpressionInterface()},IShapeElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var p;if(e[a].c=PropertyFactory.getProp(this,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this,t[a].o,0,.01,s),"st"==t[a].ty){if(p=document.createElementNS(svgNS,"g"),p.style.strokeLinecap=this.lcEnum[t[a].lc]||"round",p.style.strokeLinejoin=this.ljEnum[t[a].lj]||"round",p.style.fillOpacity=0,1==t[a].lj&&(p.style.strokeMiterlimit=t[a].ml),e[a].c.k||(p.style.stroke="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.strokeOpacity=e[a].o.v),e[a].w=PropertyFactory.getProp(this,t[a].w,0,null,s),e[a].w.k||(p.style.strokeWidth=e[a].w.v),t[a].d){var m=PropertyFactory.getDashProp(this,t[a].d,"svg",s);m.k||(p.style.strokeDasharray=m.dasharray,p.style.strokeDashoffset=m.dashoffset),e[a].d=m}}else p=document.createElementNS(svgNS,"path"),e[a].c.k||(p.style.fill="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.fillOpacity=e[a].o.v);this.layerElement===this.parentContainer?this.appendNodeToParent(p):this.layerElement.appendChild(p),this.stylesList.push({pathElement:p,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),i.length&&(t[a].trimmed=!0),e[a].sh=PropertyFactory.getShapeProp(this,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var y={closed:!1,trimProp:PropertyFactory.getProp(this,t[a],7,null,s)};e[a]={tr:y.trimProp},i.push(y),l.push(y)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},IShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();this.hidden=!1;var s=this.data.hasMask?this.transformHelper:this.finalTransform;this.renderShape(s,null,null,!0)},IShapeElement.prototype.hide=function(){if(!this.hidden){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode));this.hidden=!0}},IShapeElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.shapesData,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},IShapeElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var p=r.s?r.s:[];for(a=1;i>a;a+=1)p[a-1]?(e.st&&(h+=" M"+p[a-1][0]+","+p[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[a-1][0],p[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(p[0]?(e.st&&(h+=" M"+p[0][0]+","+p[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[0][0],p[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},IShapeElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.pathElement.style.fill="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.fillOpacity=e.o.v*s.opacity)},IShapeElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&a.k&&(a.mdf||this.firstFrame)&&(i.pathElement.style.strokeDasharray=a.dasharray,i.pathElement.style.strokeDashoffset=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.pathElement.style.stroke="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.strokeOpacity=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.pathElement.style.strokeWidth=e.w.v)},IShapeElement.prototype.destroy=function(){this.parent.destroy.call(),this.shapeData=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},extendPrototype(ShapeInterface,IShapeElement),ShapeItemElement.prototype.appendNodeToParent=SVGBaseElement.prototype.appendNodeToParent,ShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var p;if(e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),
+e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty){if(p=document.createElementNS(svgNS,"g"),p.style.strokeLinecap=this.lcEnum[t[a].lc]||"round",p.style.strokeLinejoin=this.ljEnum[t[a].lj]||"round",p.style.fillOpacity=0,1==t[a].lj&&(p.style.strokeMiterlimit=t[a].ml),e[a].c.k||(p.style.stroke="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.strokeOpacity=e[a].o.v),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(p.style.strokeWidth=e[a].w.v),t[a].d){var m=PropertyFactory.getDashProp(this.elemData,t[a].d,"svg",s);m.k?e[a].d=m:(p.style.strokeDasharray=m.dasharray,p.style.strokeDashoffset=m.dashoffset)}}else p=document.createElementNS(svgNS,"path"),e[a].c.k||(p.style.fill="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.fillOpacity=e[a].o.v);this.shape===this.parentContainer?this.appendNodeToParent(p):this.shape.appendChild(p),this.stylesList.push({pathElement:p,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var y={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(y),l.push(y)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},ShapeItemElement.prototype.getElement=function(){return this.shape},ShapeItemElement.prototype.hideShape=function(){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode))},ShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},ShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var p=r.s?r.s:[];for(a=1;i>a;a+=1)p[a-1]?(e.st&&(h+=" M"+p[a-1][0]+","+p[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[a-1][0],p[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(p[0]?(e.st&&(h+=" M"+p[0][0]+","+p[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[0][0],p[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},ShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.pathElement.style.fill="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.fillOpacity=e.o.v*s.opacity)},ShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.pathElement.style.strokeDasharray=a.dasharray,i.pathElement.style.strokeDashoffset=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.pathElement.style.stroke="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.strokeOpacity=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.pathElement.style.strokeWidth=e.w.v)},ShapeItemElement.prototype.destroy=function(t,e){this.shape=null,this.data=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement===this.parentContainer?this.appendNodeToParent(t):this.layerElement.appendChild(t),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.innerElem=t},ISolidElement.prototype.hide=IImageElement.prototype.hide,ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy,createElement(BaseElement,CVBaseElement),CVBaseElement.prototype.createElements=function(){},CVBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(!this.isVisible)return this.isVisible;this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]);return this.data.hasMask&&(this.globalData.renderer.save(!0),this.maskManager.renderFrame(s)),this.isVisible},CVBaseElement.prototype.getCurrentAnimData=function(){return this.currentAnimData},CVBaseElement.prototype.addMasks=function(t){this.maskManager=new CVMaskElement(t,this,this.globalData)},CVBaseElement.prototype.destroy=function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager&&this.maskManager.destroy()},CVBaseElement.prototype.mHelper=new Matrix,createElement(CVBaseElement,CVCompElement),CVCompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},CVCompElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e,s=this.layers.length;for(e=s-1;e>=0;e-=1)this.elements[e].renderFrame(this.finalTransform);this.data.hasMask&&this.globalData.renderer.restore(!0),this.firstFrame&&(this.firstFrame=!1)}},CVCompElement.prototype.setElements=function(t){this.elements=t},CVCompElement.prototype.getElements=function(){return this.elements},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.layers=null,this.elements=null,this.parent.destroy.call()},createElement(CVBaseElement,CVImageElement),CVImageElement.prototype.createElements=function(){var t=this,e=function(){t.animationItem.elementLoaded()},s=function(){t.failed=!0,t.animationItem.elementLoaded()};this.img=new Image,this.img.addEventListener("load",e,!1),this.img.addEventListener("error",s,!1),this.img.src=this.path+this.assetData.p,this.parent.createElements.call(this)},CVImageElement.prototype.renderFrame=function(t){if(!this.failed&&this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.drawImage(this.img,0,0),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},CVImageElement.prototype.destroy=function(){this.img=null,this.animationItem=null,this.parent.destroy.call()},CVMaskElement.prototype.getMaskProperty=function(t){return this.viewData[t]},CVMaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)},CVMaskElement.prototype.renderFrame=function(t){var e,s,i,a,r,n=this.ctx,o=this.data.masksProperties.length,h=!1;for(e=0;o>e;e++)if("n"!==this.masksProperties[e].mode){h===!1&&(n.beginPath(),h=!0),this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.globalData.compWidth,0),n.lineTo(this.globalData.compWidth,this.globalData.compHeight),n.lineTo(0,this.globalData.compHeight),n.lineTo(0,0)),r=this.viewData[e].v,s=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.moveTo(s[0],s[1]);var l,p=r.v.length;for(l=1;p>l;l++)s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[l][0],r.i[l][1]),a=t.applyToPointArray(r.v[l][0],r.v[l][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1]);s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[0][0],r.i[0][1]),a=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1])}h&&n.clip()},CVMaskElement.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].pv};e+=1}},CVMaskElement.prototype.destroy=function(){this.ctx=null},createElement(CVBaseElement,CVShapeElement),CVShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},CVShapeElement.prototype.ljEnum={1:"butt",2:"round",3:"butt"},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),this.buildExpressionInterface()},CVShapeElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],p=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var m=PropertyFactory.getDashProp(this,t[a].d,"canvas",s);e[a].d=m,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),i.length&&(t[a].trimmed=!0),e[a].sh=PropertyFactory.getShapeProp(this,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this,t[a],7,null,s)};i.push(u),p.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=p.length,a=0;h>a;a+=1)p[a].closed=!0},CVShapeElement.prototype.renderFrame=function(t){this.parent.renderFrame.call(this,t)!==!1&&(this.renderShape(this.finalTransform,null,null,!0),this.data.hasMask&&this.globalData.renderer.restore(!0))},CVShapeElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.shapesData,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var p,m,f,d,c,u,y,v=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(y=this.stylesList[a].type,"st"!==y||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,m=c.length,"st"===y?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml||0):g.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),"st"!==y&&g.beginPath(),p=0;m>p;p+=1){for("st"===y?(v.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[p].tr),u=c[p].nodes):u=c[p].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===y&&(g.stroke(),v.restore())}"st"!==y&&g.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.viewData.length=0,this.parent.destroy.call()},extendPrototype(ShapeInterface,CVShapeElement),CVShapeItemElement.prototype.dashResetter=[],CVShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],p=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var m=PropertyFactory.getDashProp(this.elemData,t[a].d,"canvas",s);e[a].d=m,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(u),p.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=p.length,a=0;h>a;a+=1)p[a].closed=!0},CVShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var p,m,f,d,c,u,y,v=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(y=this.stylesList[a].type,"st"!==y||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,m=c.length,"st"===y?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml):g.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),g.beginPath(),p=0;m>p;p+=1){for("st"===y?(v.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[p].tr),u=c[p].nodes):u=c[p].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===y&&(g.stroke(),v.restore())}"st"!==y&&g.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeItemElement.prototype.destroy=function(){this.data=null,this.globalData=null,this.canvasContext=null},createElement(CVBaseElement,CVSolidElement),CVSolidElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.fillStyle=this.data.sc,e.fillRect(0,0,this.data.sw,this.data.sh),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(CVBaseElement,CVTextElement),CVTextElement.prototype.init=ITextElement.prototype.init,CVTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,CVTextElement.prototype.getMult=ITextElement.prototype.getMult,CVTextElement.prototype.tHelper=document.createElement("canvas").getContext("2d"),CVTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d,e=!1;t.fc?(e=!0,this.values.fill="rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.values.sWidth=t.sw);var i,a,r=this.globalData.fontManager.getFontByName(t.f),n=this.mHelper;this.stroke=s,this.values.fValue=t.s+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.t.length,this.tHelper.font=this.values.fValue;var o,h,l,p,m,f,d,c,u,y;for(i=0;a>i;i+=1){if(o=this.globalData.fontManager.getCharData(t.t.charAt(i),r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),n.reset(),n.scale(t.s/100,t.s/100),h=o.data)for(m=h.shapes[0].it,d=m.length,u=new Array(d),f=0;d>f;f+=1){for(p=m[f].ks.k.i.length,c=m[f].ks.k,y=[],l=1;p>l;l+=1)1==l&&y.push(n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),y.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[l][0],c.i[l][1]),n.applyToY(c.i[l][0],c.i[l][1]),n.applyToX(c.v[l][0],c.v[l][1]),n.applyToY(c.v[l][0],c.v[l][1]));y.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[0][0],c.i[0][1]),n.applyToY(c.i[0][0],c.i[0][1]),n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),u[f]=y}else u=[];this.textSpans.push({elem:u})}},CVTextElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext,s=this.finalTransform.mat.props;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.font=this.values.fValue,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.getMeasures();var i,a,r,n,o,h,l=this.renderedLetters,p=this.data.t.d.l;a=p.length;var m,f,d,c=null,u=null,y=null;for(i=0;a>i;i+=1)if(!p[i].n){if(m=l[i],this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(m.props),this.globalData.renderer.ctxOpacity(m.o),this.fill){for(m.fc?c!==m.fc&&(c=m.fc,e.fillStyle=m.fc):c!==this.values.fill&&(c=this.values.fill,e.fillStyle=this.values.fill),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(m.sw?y!==m.sw&&(y=m.sw,e.lineWidth=m.sw):y!==this.values.sWidth&&(y=this.values.sWidth,e.lineWidth=this.values.sWidth),m.sc?u!==m.sc&&(u=m.sc,e.strokeStyle=m.sc):u!==this.values.stroke&&(u=this.values.stroke,e.strokeStyle=this.values.stroke),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}this.globalData.renderer.restore()}this.globalData.renderer.restore(this.data.hasMask)}},createElement(BaseElement,HBaseElement),HBaseElement.prototype.appendNodeToParent=function(t){if(this.placeholder){var e=this.placeholder.phElement;e.parentNode.insertBefore(t,e)}else this.parentContainer.appendChild(t)},HBaseElement.prototype.createElements=function(){this.data.hasMask?(this.layerElement=document.createElementNS(svgNS,"svg"),this.appendNodeToParent(this.layerElement),this.maskedElement=this.layerElement):this.layerElement=this.parentContainer,!this.data.ln||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement.setAttribute("id",this.data.ln)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},HBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.layerElement.style.transform="matrix3d("+s.props[0]+","+s.props[1]+",0,0, "+s.props[2]+","+s.props[3]+",0,0, 0,0,1,0, "+s.props[4]+","+s.props[5]+",0,1)",this.layerElement.style.opacity=this.finalTransform.opacity,this.isVisible},HBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},HBaseElement.prototype.getDomElement=function(){return this.layerElement},HBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},HBaseElement.prototype.hide=function(){},createElement(HBaseElement,HSolidElement),HSolidElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),t.appendChild(e),this.layerElement=t,this.parentContainer.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln);var s=document.createElementNS(svgNS,"rect");s.setAttribute("width",this.data.sw),s.setAttribute("height",this.data.sh),s.setAttribute("fill",this.data.sc),e.appendChild(s),this.data.hasMask&&(this.maskedElement=s)},HSolidElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},HSolidElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),void(this.firstFrame&&(this.firstFrame=!1)))},HSolidElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},
+createElement(HBaseElement,HCompElement),extendPrototype(ExpressionComp,HCompElement),HCompElement.prototype.getDomElement=function(){return this.composingElement},HCompElement.prototype.getComposingElement=function(){return this.layerElement},HCompElement.prototype.createElements=function(){if(this.layerElement=document.createElement("div"),styleDiv(this.layerElement),this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.layerElement.style.clip="rect(0px, "+this.data.w+"px, "+this.data.h+"px, 0px)",this.layerElement!==this.parentContainer&&(this.placeholder=null),this.data.hasMask){var t=document.createElementNS(svgNS,"svg");t.setAttribute("width",this.data.w),t.setAttribute("height",this.data.h);var e=document.createElementNS(svgNS,"g");t.appendChild(e),this.layerElement.appendChild(t),this.maskedElement=e,this.composingElement=e}else this.composingElement=this.layerElement;this.appendNodeToParent(this.layerElement)},HCompElement.prototype.hide=ICompElement.prototype.hide,HCompElement.prototype.prepareFrame=ICompElement.prototype.prepareFrame,HCompElement.prototype.setElements=ICompElement.prototype.setElements,HCompElement.prototype.getElements=ICompElement.prototype.getElements,HCompElement.prototype.destroy=ICompElement.prototype.destroy,HCompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.elements[e].renderFrame();this.firstFrame&&(this.firstFrame=!1)},createElement(HBaseElement,HShapeElement);var parent=HShapeElement.prototype.parent;extendPrototype(IShapeElement,HShapeElement),HShapeElement.prototype.parent=parent,HShapeElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");if(e.setAttribute("width",this.data.bounds.r-this.data.bounds.l),e.setAttribute("height",this.data.bounds.b-this.data.bounds.t),e.setAttribute("viewBox",this.data.bounds.l+" "+this.data.bounds.t+" "+(this.data.bounds.r-this.data.bounds.l)+" "+(this.data.bounds.b-this.data.bounds.t)),e.style.transform="translate("+this.data.bounds.l+"px,"+this.data.bounds.t+"px)",this.data.hasMask){var s=document.createElementNS(svgNS,"g");t.appendChild(e),e.appendChild(s),this.maskedElement=s,this.layerElement=s}else t.appendChild(e),this.layerElement=e;this.parentContainer.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),this.buildExpressionInterface(),this.layerElement=t},HShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden=!1,void this.renderShape(this.transformHelper,null,null,!0))},createElement(HBaseElement,HTextElement),HTextElement.prototype.init=ITextElement.prototype.init,HTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,HTextElement.prototype.createElements=function(){var t=this.data.t.d,e=document.createElement("div");if(styleDiv(e),this.layerElement=e,this.data.hasMask){var s=document.createElementNS(svgNS,"svg");this.cont=s,this.compW=this.comp.data?this.comp.data.w:this.globalData.compSize.w,this.compH=this.comp.data?this.comp.data.h:this.globalData.compSize.h,s.setAttribute("width",this.compW),s.setAttribute("height",this.compH);var i=document.createElementNS(svgNS,"g");s.appendChild(i),e.appendChild(s),this.maskedElement=i,this.innerElem=i}else this.innerElem=e;this.parentContainer.appendChild(e),this.innerElem.style.fill=t.fc?"rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")":"rgba(0,0,0,0)",t.sc&&(this.innerElem.style.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.innerElem.style.strokeWidth=t.sw+"px"),this.innerElem.style.fontSize=t.s+"px";var a=this.globalData.fontManager.getFontByName(t.f);this.innerElem.style.fontFamily=a.fFamily;var r,n,o=t.fWeight,h=t.fStyle;this.innerElem.style.fontStyle=h,this.innerElem.style.fontWeight=o;var l=t.l;n=l.length;{var p,m,f,d,c,u,y,v,g,b=this.mHelper,E="";this.data.singleShape}for(r=0;n>r;r+=1){if(this.globalData.fontManager.chars?(p=document.createElementNS(svgNS,"path"),this.data.hasMask||(m=document.createElement("div"),f=document.createElementNS(svgNS,"svg"),m.appendChild(f),f.appendChild(p),styleDiv(m))):p=document.createElementNS(svgNS,"text"),p.setAttribute("stroke-linecap","butt"),p.setAttribute("stroke-linejoin","round"),p.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var P=this.globalData.fontManager.getCharData(t.t.charAt(r),a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),S=P.data;if(b.reset(),S){for(d=S.shapes[0].it,E="",u=d.length,b.scale(t.s/100,t.s/100),c=0;u>c;c+=1){for(v=d[c].ks.k.i.length,g=d[c].ks.k,y=1;v>y;y+=1)1==y&&(E+=" M"+b.applyToPointStringified(g.v[0][0],g.v[0][1])),E+=" C"+b.applyToPointStringified(g.o[y-1][0],g.o[y-1][1])+" "+b.applyToPointStringified(g.i[y][0],g.i[y][1])+" "+b.applyToPointStringified(g.v[y][0],g.v[y][1]);E+=" C"+b.applyToPointStringified(g.o[y-1][0],g.o[y-1][1])+" "+b.applyToPointStringified(g.i[0][0],g.i[0][1])+" "+b.applyToPointStringified(g.v[0][0],g.v[0][1]),E+="z"}p.setAttribute("d",E)}if(this.data.hasMask)this.innerElem.appendChild(p);else{this.innerElem.appendChild(m);var C=t.s/100;if(S){var k=Math.ceil(S.bounds.r*C),w=Math.floor(S.bounds.t*C),x=Math.floor(S.bounds.l*C),D=Math.ceil(S.bounds.b*C);f.setAttribute("width",k-x),f.setAttribute("height",D-w),f.setAttribute("viewBox",x+" "+w+" "+(k-x)+" "+(D-w)),f.style.transform="translate("+x+"px,"+w+"px)"}}}else p.textContent=l[r].val,p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(p);this.textSpans.push(this.data.hasMask?p:m),this.textPaths.push(p)}},HTextElement.prototype.hide=SVGTextElement.prototype.hide,HTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask&&this.finalTransform.matMdf&&(this.cont.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),this.cont.style.transform="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)"),!this.data.singleShape||this.firstFrame){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].style.transform=n.m,this.textSpans[s].style.opacity=n.o,n.sw&&this.textPaths[s].setAttribute("stroke-width",n.sw),n.sc&&this.textPaths[s].setAttribute("stroke",n.sc),n.fc&&this.textPaths[s].setAttribute("fill",n.fc));if(this.data.hasMask){var o=this.innerElem.getBBox();this.currentBBox.w!==o.width&&(this.currentBBox.w=o.width,this.cont.setAttribute("width",o.width)),this.currentBBox.h!==o.height&&(this.currentBBox.h=o.height,this.cont.setAttribute("height",o.height)),(this.currentBBox.w!==o.width||this.currentBBox.h!==o.height||this.currentBBox.x!==o.x||this.currentBBox.y!==o.y)&&(this.currentBBox.w=o.width,this.currentBBox.h=o.height,this.currentBBox.x=o.x,this.currentBBox.y=o.y,this.cont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.cont.style.transform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}this.firstFrame&&(this.firstFrame=!1)}},HTextElement.prototype.destroy=SVGTextElement.prototype.destroy;var animationManager=function(){function t(t,e){if(!t)return null;for(var s=0;E>s;){if(v[s].elem==t&&null!==v[s].elem)return v[s].animation;s+=1}var i=new AnimationItem;return i.setData(t,e),v.push({elem:t,animation:i}),E+=1,i}function e(t){var e=new AnimationItem;return e.setParams(t),v.push({elem:null,animation:e}),E+=1,e}function s(t,e){var s;for(s=0;E>s;s+=1)v[s].animation.setSpeed(t,e)}function i(t,e){var s;for(s=0;E>s;s+=1)v[s].animation.setDirection(t,e)}function a(t){var e;for(e=0;E>e;e+=1)v[e].animation.play(t)}function r(t,e){b=!1,g=Date.now();var s;for(s=0;E>s;s+=1)v[s].animation.moveFrame(t,e)}function n(t){var e,s=t-g;for(e=0;E>e;e+=1)v[e].animation.renderer.destroyed?(v.splice(e,1),e-=1,E-=1):v[e].animation.advanceTime(s);g=t,requestAnimationFrame(n)}function o(t){g=t,requestAnimationFrame(n)}function h(t){var e;for(e=0;E>e;e+=1)v[e].animation.pause(t)}function l(t,e,s){var i;for(i=0;E>i;i+=1)v[i].animation.goToAndStop(t,e,s)}function p(t){var e;for(e=0;E>e;e+=1)v[e].animation.stop(t)}function m(t){var e;for(e=0;E>e;e+=1)v[e].animation.togglePause(t)}function f(t){var e;for(e=0;E>e;e+=1)v[e].animation.destroy(t)}function d(e,s,i){var a,r=document.getElementsByClassName("bodymovin"),n=r.length;for(a=0;n>a;a+=1)i&&r[a].setAttribute("data-bm-type",i),t(r[a],e);if(s&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),t(h,e)}}function c(){var t;for(t=0;E>t;t+=1)v[t].animation.resize()}function u(){requestAnimationFrame(o)}var y={},v=[],g=0,b=!0,E=0;return setTimeout(u,0),y.registerAnimation=t,y.loadAnimation=e,y.setSpeed=s,y.setDirection=i,y.play=a,y.moveFrame=r,y.pause=h,y.stop=p,y.togglePause=m,y.searchAnimations=d,y.resize=c,y.start=u,y.goToAndStop=l,y.destroy=f,y}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.repeat="indefinite",this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.isScrolling=!1,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.renderedFrameCount=0,this.scaleMode="fit",this.math=Math,this.removed=!1,this.timeCompleted=0,this.segmentPos=0,this.segments=[]};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var s=t.animType?t.animType:t.renderer?t.renderer:"canvas";switch(s){case"canvas":this.renderer=new CanvasRenderer(this,t.renderer);break;case"svg":this.renderer=new SVGRenderer(this,t.renderer);break;case"hybrid":case"html":this.renderer=new HybridRenderer(this,t.renderer)}if(this.animType=s,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},AnimationItem.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||(s.loop="false"===a?!1:"true"===a?!0:parseInt(a)),s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var r=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===r&&(s.prerender=!1),this.setParams(s)},AnimationItem.prototype.includeLayers=function(t){var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;n>s;s+=1)if(r[s].id)for(e=0;a>e;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}else"svg"==this.animType?i.push(r[s]):i.unshift(r[s]);if(t.assets)for(a=t.assets.length,e=0;a>e;e+=1)this.animationData.assets.push(t.assets[e]);dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),this.renderer.buildStage(this.container,this.layers),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.animationData._id=this.animationID,this.animationData._animType=this.animType,this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.loadSegments(),dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():this.checkLoaded()},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(this.renderer.buildItems(this.animationData.layers),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(this.renderer.buildStage(this.container,this.layers),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=subframeEnabled?this.currentRawFrame:this.math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1)},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0)},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?(this.isPaused=!1,this.play()):(this.isPaused=!0,this.pause()))},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.isPaused=!0)},AnimationItem.prototype.advanceTime=function(t){this.isPaused!==!0&&this.isScrolling!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier)},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.trigger("segmentStart")},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;i>s;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&(this.adjustSegment(this.segments.shift()),this.setCurrentRawFrameValue(0)),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||this.renderer.destroy()},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t;var e=!1;if(this.currentRawFrame>=this.totalFrames){if(this.segments.length&&(e=!0),this.loop===!1)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");if(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete")}else if(this.currentRawFrame<0)return this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1?(this.currentRawFrame=0,this.gotoFrame(),this.pause(),void this.trigger("complete")):(this.trigger("loopComplete"),this.currentRawFrame=this.totalFrames+this.currentRawFrame,void this.gotoFrame());if(e){var s=this.currentRawFrame%this.totalFrames;this.adjustSegment(this.segments.shift()),this.currentRawFrame=s}else this.currentRawFrame=this.currentRawFrame%this.totalFrames;this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;s>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames))},AnimationItem.prototype.addEventListener=_addEventListener,AnimationItem.prototype.removeEventListener=_removeEventListener,AnimationItem.prototype.triggerEvent=_triggerEvent,function(t){function e(t){animationManager.play(t)}function s(t){animationManager.pause(t)}function i(t){animationManager.togglePause(t)}function a(t,e){animationManager.setSpeed(t,e)}function r(t,e){animationManager.setDirection(t,e)}function n(t){animationManager.stop(t)}function o(t){animationManager.moveFrame(t)}function h(){E===!0?animationManager.searchAnimations(P,E,S):animationManager.searchAnimations()}function l(t){return animationManager.registerAnimation(t)}function p(){animationManager.resize()}function m(){animationManager.start()}function f(t,e,s){animationManager.goToAndStop(t,e,s)}function d(t){subframeEnabled=t}function c(t){return E===!0&&(t.animationData=JSON.parse(P)),animationManager.loadAnimation(t)}function u(t){return animationManager.destroy(t)}function y(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(defaultCurveSegments>=50?!1:!0)}function v(){"complete"===document.readyState&&(clearInterval(D),h())}function g(t){for(var e=x.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var b={};b.play=e,b.pause=s,b.togglePause=i,b.setSpeed=a,b.setDirection=r,b.stop=n,b.moveFrame=o,b.searchAnimations=h,b.registerAnimation=l,b.loadAnimation=c,b.setSubframeRendering=d,b.resize=p,b.start=m,b.goToAndStop=f,b.destroy=u,b.setQuality=y,b.version="3.1.7",b.checkReady=v,t.bodymovin=b;var E="__[STANDALONE]__",P="__[ANIMATIONDATA]__",S="";if(E){var C=document.getElementsByTagName("script"),k=C.length-1,w=C[k],x=w.src.replace(/^[^\?]+\??/,"");S=g("renderer")}var D=setInterval(v,100)}(window);}(window));
\ No newline at end of file
diff --git a/extension/js/libs/bodymovin.js b/extension/js/libs/bodymovin.js
index 06ad61d..93bb08a 100644
--- a/extension/js/libs/bodymovin.js
+++ b/extension/js/libs/bodymovin.js
@@ -1,4 +1,5 @@
-(function(window){function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,s,i,a,r){return t.reset().translate(a,r).rotate(e).scale(s,i).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 roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.verticalAlign="top",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="hidden",styleUnselectableDiv(t)}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=0>i?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,s,i){this.type=t,this.currentLoop=e,this.totalLoops=s,this.direction=0>i?-1:1}function BMSegmentStartEvent(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}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,i=this._cbs[t].length;i>s;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=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,i=0;s>i;i++)this._cbs[t][i](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}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,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.props=r}function iterateDynamicProperties(t){var e,s=this.dynamicProperties;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)}function createElement(t,e,s){if(!e){var i=Object.create(t.prototype,s),a={};return i&&"[object Function]"===a.toString.call(i.init)&&i.init(),i}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.parent=t.prototype}function bezFunction(){function t(t,e,s,i,a,r){return bm_abs((s-t)*(r-e)-(a-t)*(i-e))<1e-5}function e(t,e,s,i,a){if(a||(a=("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p")),o[a])return o[a];var r,n,h,l,m,p;return o[a]=function(a,o,f,d,c){var u=o/c;a=u;for(var v,y=0;++y<20&&(h=3*t,n=3*(s-t)-h,r=1-h-n,v=a*(h+a*(n+a*r))-u,!(bm_abs(v)<.001));)a-=v/(h+a*(2*n+3*r*a));p=3*e,m=3*(i-e)-p,l=1-p-m;var g=a*(p+a*(m+a*l));return d*g+f},o[a]}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var s=e.segments,i=s.length,a=bm_floor((i-1)*t),r=t*e.addedLength,n=0;if(r==s[a].l)return s[a].p;for(var o=s[a].l>r?-1:1,h=!0;h;)s[a].l<=r&&s[a+1].l>r?(n=(r-s[a].l)/(s[a+1].l-s[a].l),h=!1):a+=o,(0>a||a>=i-1)&&(h=!1);return s[a].p+(s[a+1].p-s[a].p)*n}function r(){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,i,n,o,h){var l=new r;n=0>n?0:n;var m=a(n,h);o=o>1?1:o;var p,f=a(o,h),d=t.length,c=1-m,u=1-f;for(p=0;d>p;p+=1)l.pt1[p]=c*c*c*t[p]+(m*c*c+c*m*c+c*c*m)*s[p]+(m*m*c+c*m*m+m*c*m)*i[p]+m*m*m*e[p],l.pt3[p]=c*c*u*t[p]+(m*c*u+c*m*u+c*c*f)*s[p]+(m*m*u+c*m*f+m*c*f)*i[p]+m*m*f*e[p],l.pt4[p]=c*u*u*t[p]+(m*u*u+c*f*u+c*u*f)*s[p]+(m*f*u+c*f*f+m*u*f)*i[p]+m*f*f*e[p],l.pt2[p]=u*u*u*t[p]+(f*u*u+u*f*u+u*u*f)*s[p]+(f*f*u+u*f*f+f*u*f)*i[p]+f*f*f*e[p];return l}var o=[],h=(Math,function(){function e(t,e){this.l=t,this.p=e}var s={};return function(i,a,r,n){var o=(i.join("_")+"_"+a.join("_")+"_"+r.join("_")+"_"+n.join("_")).replace(/\./g,"p");if(s[o])return s[o];var h,l,m,p,f,d,c=defaultCurveSegments,u=0,v=[],y=[],g={addedLength:0,segments:[]};for((i[0]!=a[0]||i[1]!=a[1])&&t(i[0],i[1],a[0],a[1],r[0],r[1])&&t(i[0],i[1],a[0],a[1],n[0],n[1])&&(c=2),m=r.length,h=0;c>h;h+=1){for(f=h/(c-1),d=0,l=0;m>l;l+=1)p=bm_pow(1-f,3)*i[l]+3*bm_pow(1-f,2)*f*r[l]+3*(1-f)*bm_pow(f,2)*n[l]+bm_pow(f,3)*a[l],v[l]=p,null!==y[l]&&(d+=bm_pow(v[l]-y[l],2)),y[l]=v[l];d&&(d=bm_sqrt(d),u+=d),g.segments.push(new e(u,f))}return g.addedLength=u,s[o]=g,g}}()),l=function(){var e={};return function(a){var r=a.s,n=a.e,o=a.to,h=a.ti,l=(r.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(a.bezierData=e[l]);var m,p,f,d,c,u,v,y=defaultCurveSegments,g=0,b=null;(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+o[0],r[1]+o[1])&&t(r[0],r[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(y=2);var E=new s(y);for(f=o.length,m=0;y>m;m+=1){for(v=new Array(f),c=m/(y-1),u=0,p=0;f>p;p+=1)d=bm_pow(1-c,3)*r[p]+3*bm_pow(1-c,2)*c*(r[p]+o[p])+3*(1-c)*bm_pow(c,2)*(n[p]+h[p])+bm_pow(c,3)*n[p],v[p]=d,null!==b&&(u+=bm_pow(v[p]-b[p],2));u=bm_sqrt(u),g+=u,E.points[m]=new i(u,v),b=v}E.segmentLength=g,a.bezierData=E,e[l]=E}}();return{getEasingCurve:e,getBezierLength:h,getNewSegment:n,buildBezierData:l}}function dataFunctionManager(){function t(a,n,o){var h,l,m,p,f,d,c,u,v=a.length;for(p=0;v>p;p+=1)if(h=a[p],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(a[p-1].td=h.tt),l=[],m=-1,h.hasMask){var y=h.masksProperties;for(d=y.length,f=0;d>f;f+=1)if(y[f].pt.i)i(y[f].pt);else for(u=y[f].pt.length,c=0;u>c;c+=1)y[f].pt[c].s&&i(y[f].pt[c].s[0]),y[f].pt[c].e&&i(y[f].pt[c].e[0])}0===h.ty?(h.layers=e(h.refId,n),t(h.layers,n,o)):4===h.ty?s(h.shapes):5==h.ty&&r(h,o)}}function e(t,e){for(var s=0,i=e.length;i>s;){if(e[s].id===t)return JSON.parse(JSON.stringify(e[s].layers));s+=1}}function s(t,e){var a,r,n,o=t.length,h=e?e:!1;for(a=o-1;a>=0;a-=1)if("tm"==t[a].ty&&(h=!0),"sh"==t[a].ty)if(t[a].trimmed=h,t[a].ks.i)i(t[a].ks);else for(n=t[a].ks.length,r=0;n>r;r+=1)t[a].ks[r].s&&i(t[a].ks[r].s[0]),t[a].ks[r].e&&i(t[a].ks[r].e[0]);else"gr"==t[a].ty&&s(t[a].it,h)}function i(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 a(e,s){t(e.layers,e.assets,s)}function r(t,e){var s,i,a,r,o,h,l,m,p=[],f=t.t.d,d=0,c=t.t.m.g,u=0,v=0,y=0,g=[],b=0,E=0,C=e.getFontByName(f.f),w=C.fStyle.split(" "),S="normal",P="normal";for(i=w.length,s=0;i>s;s+=1)"italic"===w[s].toLowerCase()?P="italic":"bold"===w[s].toLowerCase()?S="700":"black"===w[s].toLowerCase()?S="900":"medium"===w[s].toLowerCase()?S="500":"regular"===w[s].toLowerCase()||"normal"===w[s].toLowerCase()?S="400":("light"===w[s].toLowerCase()||"thin"===w[s].toLowerCase())&&(S="200");for(f.fWeight=S,f.fStyle=P,i=f.t.length,s=0;i>s;s+=1)if(a=!1," "===f.t.charAt(s)?r=" ":13===f.t.charCodeAt(s)?(g.push(b),E=b>E?b:E,b=0,r="",a=!0,y+=1):r=f.t.charAt(s),e.chars?(l=e.getCharData(f.t.charAt(s),C.fStyle,e.getFontByName(f.f).fFamily),m=a?0:l.w*f.s/100):(n.font=f.s+"px "+e.getFontByName(f.f).fFamily,m=n.measureText(r).width),b+=m,p.push({l:m,an:m,add:u,n:a,anIndexes:[],val:r,line:y}),2==c){if(u+=m,""==r||" "==r||s==i-1){for((""==r||" "==r)&&(u-=m);s>=v;)p[v].an=u,p[v].ind=d,p[v].extra=m,v+=1;d+=1,u=0}}else if(3==c){if(u+=m,""==r||s==i-1){for(""==r&&(u-=m);s>=v;)p[v].an=u,p[v].ind=d,p[v].extra=m,v+=1;u=0,d+=1}}else p[d].ind=d,p[d].extra=0,d+=1;switch(f.l=p,E=b>E?b:E,g.push(b),f.boxWidth=E,f.lineWidths=g,f.j){case 1:t.t.d.justifyOffset=-f.boxWidth;break;case 2:t.t.d.justifyOffset=-f.boxWidth/2;break;default:t.t.d.justifyOffset=0}var D=t.t.a;h=D.length;var I,F,T=[];for(o=0;h>o;o+=1){for(D[o].a.sc&&(f.strokeColorAnim=!0),D[o].a.sw&&(f.strokeWidthAnim=!0),D[o].a.fc&&(f.fillColorAnim=!0),F=0,I=D[o].s.b,s=0;i>s;s+=1)p[s].anIndexes[o]=F,(1==I&&""!=p[s].val||2==I&&""!=p[s].val&&" "!=p[s].val||3==I&&(p[s].n||" "==p[s].val||s==i-1)||4==I&&(p[s].n||s==i-1))&&(1===D[o].s.rn&&T.push(F),F+=1);t.t.a[o].totalChars=F;var A,M=-1;if(1===D[o].s.rn)for(s=0;i>s;s+=1)M!=p[s].anIndexes[o]&&(M=p[s].anIndexes[o],A=T.splice(Math.floor(Math.random()*T.length),1)[0]),p[s].anIndexes[o]=A}0!==h||"m"in t.t.p||(t.singleShape=!0),f.yOffset=1.2*f.s}var n=document.createElement("canvas").getContext("2d"),o={};return o.completeData=a,o}function SVGRenderer(t){this.animationItem=t,this.layers=null,this.lastFrame=-1,this.globalData={frameNum:-1},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.lastFrame=-1,this.globalData={frameNum:-1},this.contextData={saved:new Array(15),savedOp:new Array(15),cArrPos:0,cTr:new Matrix,cO:1};var s,i=15;for(s=0;i>s;s+=1)this.contextData.saved[s]=new Array(6);this.elements=[]}function MaskElement(t,e,s){this.dynamicProperties=[],this.data=t,this.element=e,this.globalData=s,this.paths=[],this.masksProperties=this.data.masksProperties,this.viewData=new Array(this.masksProperties.length),this.maskElement=null,this.firstFrame=!0;var i,a,r,n,o,h=this.element.maskedElement,l=this.globalData.defs,m=this.masksProperties.length,p=this.data.masksProperties,f=0,d=[],c=randomString(10),u="clipPath",v="clip-path";for(i=0;m>i;i++)if(("a"!==p[i].mode&&"n"!==p[i].mode||p[i].inv)&&(u="mask",v="mask"),"s"!=p[i].mode&&"i"!=p[i].mode||0!=f||(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%"),d.push(o)),"n"!=p[i].mode){if(f+=1,a=document.createElementNS(svgNS,"path"),p[i].cl?"s"==p[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"):(a.setAttribute("fill","none"),"s"==p[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"),a.setAttribute("stroke-width","1"),a.setAttribute("stroke-miterlimit","10")),a.setAttribute("clip-rule","nonzero"),"i"==p[i].mode){n=d.length;var y=document.createElementNS(svgNS,"g");for(r=0;n>r;r+=1)y.appendChild(d[r]);var g=document.createElementNS(svgNS,"mask");g.setAttribute("mask-type","alpha"),g.setAttribute("id",c+"_"+f),g.appendChild(a),l.appendChild(g),y.setAttribute("mask","url(#"+c+"_"+f+")"),d.length=0,d.push(y)}else d.push(a);p[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",prop:PropertyFactory.getShapeProp(this.data,p[i],3,this.dynamicProperties)},this.viewData[i].prop.k||this.drawPath(p[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={prop:PropertyFactory.getShapeProp(this.data,p[i],3,this.dynamicProperties)};for(this.maskElement=document.createElementNS(svgNS,u),m=d.length,i=0;m>i;i+=1)this.maskElement.appendChild(d[i]);this.maskElement.setAttribute("id",c),f>0&&h.setAttribute(v,"url(#"+c+")"),l.appendChild(this.maskElement)}function BaseElement(){}function SVGBaseElement(t,e,s,i){this.globalData=s,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,i){}function SVGTextElement(t,e,s,i){this.textSpans=[],this.renderType="svg",this.parent.constructor.call(this,t,e,s,i)}function ICompElement(t,e,s,i){this.parent.constructor.call(this,t,e,s,i),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,s.frameRate,this.dynamicProperties))}function IImageElement(t,e,s,i){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this.parent.constructor.call(this,t,e,s,i)}function IShapeElement(t,e,s,i){this.shapes=[],this.parent.constructor.call(this,t,e,s,i)}function ShapeItemElement(t,e,s,i,a,r){this.shape=e,this.parentContainer=s,this.placeholder=i,this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=r,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,a,[]),styleUnselectableDiv(this.shape)}function ISolidElement(t,e,s,i){this.parent.constructor.call(this,t,e,s,i)}function CVBaseElement(t,e){this.globalData=e,this.data=t,this.canvasContext=e.canvasContext,this.init()}function CVCompElement(t,e){this.parent.constructor.call(this,t,e),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,e.frameRate,this.dynamicProperties))}function CVImageElement(t,e){this.animationItem=e.renderer.animationItem,this.assetData=this.animationItem.getAssetData(t.refId),this.path=this.animationItem.getPath(),this.parent.constructor.call(this,t,e),this.animationItem.pendingElements+=1}function CVMaskElement(t,e,s){this.data=t,this.element=e,this.globalData=s,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.ctx=this.element.canvasContext,this.viewData=new Array(this.masksProperties.length);var i,a=this.masksProperties.length;for(i=0;a>i;i++)this.viewData[i]=PropertyFactory.getShapeProp(this.data,this.masksProperties[i],3,this.dynamicProperties)}function CVShapeElement(t,e){this.shapes=[],this.parent.constructor.call(this,t,e)}function CVShapeItemElement(t,e,s){this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=s,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,e,[])}function CVSolidElement(t,e){this.parent.constructor.call(this,t,e)}function CVTextElement(t,e){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.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.parent.constructor.call(this,t,e),this.renderedLetters=[]}var svgNS="http://www.w3.org/2000/svg",Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=1,this.props[4]=0,this.props[5]=0,this}function e(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,s,-s,e,0,0)}function s(t,e){return 1==t&&1==e?this:this._t(t,0,0,e,0,0)}function i(t,e,s,i,a,r){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this}function a(t,e){return(0!==t||0!==e)&&(this.props[4]=this.props[0]*t+this.props[2]*e+this.props[4],this.props[5]=this.props[1]*t+this.props[3]*e+this.props[5]),this}function r(t,e,s,i,a,r){var n=this.props[0],o=this.props[1],h=this.props[2],l=this.props[3],m=this.props[4],p=this.props[5];return 1===t&&0===e&&0===s&&1===i?((0!==a||0!==r)&&(this.props[4]=this.props[0]*a+this.props[2]*r+this.props[4],this.props[5]=this.props[1]*a+this.props[3]*r+this.props[5]),this):(this.props[0]=n*t+h*e,this.props[1]=o*t+l*e,this.props[2]=n*s+h*i,this.props[3]=o*s+l*i,this.props[4]=n*a+h*r+m,this.props[5]=o*a+l*r+p,this)}function n(t,e){return{x:t*this.props[0]+e*this.props[2]+this.props[4],y:t*this.props[1]+e*this.props[3]+this.props[5]}}function o(t,e){return t*this.props[0]+e*this.props[2]+this.props[4]}function h(t,e){return t*this.props[1]+e*this.props[3]+this.props[5]}function l(t,e){return[t*this.props[0]+e*this.props[2]+this.props[4],t*this.props[1]+e*this.props[3]+this.props[5]]}function m(t,e){return bm_rnd(t*this.props[0]+e*this.props[2]+this.props[4])+","+bm_rnd(t*this.props[1]+e*this.props[3]+this.props[5])}function p(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5]]}function f(){return this.cssParts[1]=this.props.join(","),this.cssParts.join("")}function d(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.scale=s,this.setTransform=i,this.translate=a,this.transform=r,this.applyToPoint=n,this.applyToX=o,this.applyToY=h,this.applyToPointArray=l,this.applyToPointStringified=m,this.toArray=p,this.toCSS=f,this.toString=d,this._t=this.transform,this.props=[1,0,0,1,0,0],this.cssParts=["matrix(","",")"]}}(),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 i=(new Date).getTime(),a=Math.max(0,16-(i-t)),r=window.setTimeout(function(){e(i+a)},a);return t=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var subframeEnabled=!0,cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_min=Math.min,defaultCurveSegments=50,degToRads=Math.PI/180;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,i){return 0>t&&(t=0),0>e&&(e=0),0>i&&(i=0),"#"+s[t]+s[e]+s[i]}}(),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]]}}(),bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var s=document.createElement("span");s.style.fontFamily=e;var i=document.createElement("span");i.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(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function e(){var t,s,i,a=this.fonts.length,r=a;for(t=0;a>t;t+=1)this.fonts[t].loaded?r-=1:(s=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,s.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(s=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,s.offsetWidth!==i&&(r-=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!==r&&Date.now()-this.initTime<o?setTimeout(e.bind(this),20):this.loaded=!0}function s(){if(window.Typekit&&window.Typekit.load)try{Typekit.load({async:!1})}catch(t){console.log("errwor",t)}else setTimeout(s,50)}function i(i,a){if(!i)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=i.list);if(i.tk){var r=document.createElement("script");r.setAttribute("src",i.tk),a.appendChild(r),s()}var n,o=i.list,h=o.length;for(n=0;h>n;n+=1){if(o[n].loaded=!1,o[n].monoCase=t(o[n].fFamily,"monospace"),o[n].sansCase=t(o[n].fFamily,"sans-serif"),o[n].fPath&&o[n].fPath){var r=document.createElement("style");r.type="text/css",r.innerHTML="@font-face {font-family: "+o[n].fFamily+"; font-style: normal; src: url('"+o[n].fPath+"');}",a.appendChild(r)}this.fonts.push(o[n])}e.bind(this)()}function a(t){this.chars=t}function r(t,e,s){for(var i=0,a=this.chars.length;a>i;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}}function n(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 o=5e3,h=function(){this.fonts=[],this.chars=null,this.loaded=!1,this.initTime=Date.now()};return h.prototype.addChars=a,h.prototype.addFonts=i,h.prototype.getCharData=r,h.prototype.getFontByName=n,h}(),PropertyFactory=function(){function t(t){if(this.mdf=!1,this.lastFrame!==p&&(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,i=0,a=this.keyframes.length-1,r=1,n=!0;!(!n||(e=this.keyframes[i],s=this.keyframes[i+1],i==a-1&&t>=s.t-this.offsetTime)||s.t-this.offsetTime>t);)a-1>i?i+=r:n=!1;var o,h,l,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.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o])}else{e.__fnct?f=e.__fnct:(f=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y,e.n),e.__fnct=f),l=f("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime));var v,y=c.segmentLength*l,g=0;for(r=1,n=!0,m=c.points.length;n;){if(g+=c.points[d].partialLength*r,0===y||0===l||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.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o]);break}if(y>g&&y<g+c.points[d+1].partialLength){for(v=(y-g)/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])*v)*this.mult:c.points[d].point[o]+(c.points[d+1].point[o]-c.points[d].point[o])*v,this.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o]);break}m-1>d&&1==r||d>0&&-1==r?d+=r:n=!1}}}else{var b,E,C,w,S,P=!1;for(a=e.s.length,i=0;a>i;i+=1)1!==e.h&&(e.o.x instanceof Array?(P=!0,e.__fnct||(e.__fnct=[]),e.__fnct[i]||(b=e.o.x[i]?e.o.x[i]:e.o.x[0],E=e.o.y[i]?e.o.y[i]:e.o.y[0],C=e.i.x[i]?e.i.x[i]:e.i.x[0],w=e.i.y[i]?e.i.y[i]:e.i.y[0])):(P=!1,e.__fnct||(b=e.o.x,E=e.o.y,C=e.i.x,w=e.i.y)),P?e.__fnct[i]?f=e.__fnct[i]:(f=bez.getEasingCurve(b,E,C,w),e.__fnct[i]=f):e.__fnct?f=e.__fnct:(f=bez.getEasingCurve(b,E,C,w),e.__fnct=f),l=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:f("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))),S=1===e.h?e.s[i]:e.s[i]+(e.e[i]-e.s[i])*l,1===a?(this.v=this.mult?S*this.mult:S,this.lastValue!=this.v&&(this.mdf=!0,this.lastValue=this.v)):(this.v[i]=this.mult?S*this.mult:S,this.lastValue[i]!==this.v[i]&&(this.mdf=!0,this.lastValue[i]=this.v[i]))}}this.lastFrame=t}function e(t){if(this.mdf=!1,this.lastFrame!==p&&(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 if(t<this.keyframes[0].t-this.offsetTime)this.mdf=!0,this.v=this.keyframes[0].s[0];else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)this.mdf=!0,this.v=1===this.keyframes[this.keyframes.length-2].h?this.keyframes[this.keyframes.length-2].s[0]:this.keyframes[this.keyframes.length-2].e[0];else{this.mdf=!0;for(var e,s,i,a,r,n,o=0,h=this.keyframes.length-1,l=1,m=!0;m&&(e=this.keyframes[o],s=this.keyframes[o+1],!(s.t-this.offsetTime>t&&1==l));)h-1>o&&1==l||o>0&&-1==l?o+=l:m=!1;var f;if(1!==e.h){var d;e.__fnct?d=e.__fnct:(d=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y),e.__fnct=d),f=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:d("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))}for(a=this.shapeData.i.length,n=e.s[0].i[0].length,i=0;a>i;i+=1)for(r=0;n>r;r+=1)1===e.h?(this.shapeData.i[i][r]=e.s[0].i[i][r],this.shapeData.o[i][r]=e.s[0].o[i][r],this.shapeData.v[i][r]=e.s[0].v[i][r]):(this.shapeData.i[i][r]=e.s[0].i[i][r]+(e.e[0].i[i][r]-e.s[0].i[i][r])*f,this.shapeData.o[i][r]=e.s[0].o[i][r]+(e.e[0].o[i][r]-e.s[0].o[i][r])*f,this.shapeData.v[i][r]=e.s[0].v[i][r]+(e.e[0].v[i][r]-e.s[0].v[i][r])*f);this.v=this.shapeData}this.lastFrame=t}function s(t,e){e=e?e:1,this.v=t*e,this.mdf=!1,this.k=!1}function i(t,e){if(e){var s,i=t.length;for(s=0;i>s;s+=1)t[s]*=e}this.v=t,this.mdf=!1,this.k=!1}function a(e,s,i){this.keyframes=s,this.offsetTime=e.st,this.lastValue=-99999,this.k=!0,this.mult=i,this.lastFrame=p,this.getInterpolatedValue=t}function r(e,s,i){this.keyframes=s,this.offsetTime=e.st,this.k=!0,this.mult=i,this.getInterpolatedValue=t,this.v=new Array(s[0].s.length),this.lastValue=new Array(s[0].s.length),this.lastFrame=p}function n(t,e,n,o,h){if(2===n)return new f(t,e,h);if(7===n)return new u(t,e,h);if(e.length){if("number"==typeof e[0])return new i(e,o);switch(n){case 0:h.push(new a(t,e,o));break;case 1:h.push(new r(t,e,o))}return h[h.length-1]}return new s(e,o)}function o(t,e){this.k=!1,this.mdf=!1,this.closed=3===e?t.cl:t.closed,this.shapeData=t.ks,this.v=3===e?t.pt:t.ks}function h(t,s,i,a){this.offsetTime=t.st,this.getInterpolatedValue=e,this.keyframes=3===a?s.pt:s.ks,this.k=!0,this.closed=3===a?s.cl:s.closed;var r,n=this.keyframes[0].s[0].i.length,o=this.keyframes[0].s[0].i[0].length;for(this.shapeData={i:new Array(n),o:new Array(n),v:new Array(n)},r=0;n>r;r+=1)this.shapeData.i[r]=new Array(o),this.shapeData.o[r]=new Array(o),this.shapeData.v[r]=new Array(o);this.lastFrame=p,i.push(this)}function l(t,e,s,i,a){var r;if(3===s||4===s){var n=3===s?e.pt:e.ks;r=n.length?new h(t,e,i,s):new o(e,s,i)}else 5===s?r=new c(t,e,i):6===s&&(r=new d(t,e,i));var l=!1;if(a)for(var m=0,p=a.length;p>m;){if(!a[m].closed){l=!0;break}m+=1}return l?new v(r,a,i):r}function m(t,e,s){return new y(t,e,s)}var p=-999999,f=function(){function t(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.v.reset().translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1])}return function(e,n,o){this.dynamicProperties=[],this.mdf=!1,this.getInterpolatedValue=t,"number"==typeof n.a[0]?this.a=new i(n.a):(this.a=new r(e,n.a,0),this.dynamicProperties.push(this.a)),"number"==typeof n.p[0]?this.p=new i(n.p):(this.p=new r(e,n.p,0),this.dynamicProperties.push(this.p)),"number"==typeof n.s[0]?this.s=new i(n.s,.01):(this.s=new r(e,n.s,.01),this.dynamicProperties.push(this.s)),n.r.length?(this.r=new a(e,n.r,degToRads),this.dynamicProperties.push(this.r)):this.r=new s(n.r,degToRads),this.dynamicProperties.length?(o.push(this),this.v=new Matrix):this.v=(new Matrix).translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1])}}(),d=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-a],this.v.i[0]=[t-i*s,e-a],this.v.o[0]=[t+i*s,e-a],this.v.v[1]=[t+i,e],this.v.i[1]=[t+i,e-a*s],this.v.o[1]=[t+i,e+a*s],this.v.v[2]=[t,e+a],this.v.i[2]=[t+i*s,e+a],this.v.o[2]=[t-i*s,e+a],this.v.v[3]=[t-i,e],this.v.i[3]=[t-i,e+a*s],this.v.o[3]=[t-i,e-a*s]):(this.v.v[0]=[t,e-a],this.v.o[0]=[t-i*s,e-a],this.v.i[0]=[t+i*s,e-a],this.v.v[1]=[t-i,e],this.v.o[1]=[t-i,e+a*s],this.v.i[1]=[t-i,e-a*s],this.v.v[2]=[t,e+a],this.v.o[2]=[t+i*s,e+a],this.v.i[2]=[t-i*s,e+a],this.v.v[3]=[t+i,e],this.v.o[3]=[t+i,e-a*s],this.v.i[3]=[t+i,e+a*s])}function e(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.convertEllToPath()}var s=.5519;return function(s,a,n){this.v={v:new Array(4),i:new Array(4),o:new Array(4),c:!0},this.d=a.d,this.dynamicProperties=[],a.closed=!0,this.closed=!0,this.mdf=!1,this.getInterpolatedValue=e,this.convertEllToPath=t,"number"==typeof a.p[0]?this.p=new i(a.p):(this.p=new r(s,a.p,0),this.dynamicProperties.push(this.p)),"number"==typeof a.s[0]?this.s=new i(a.s):(this.s=new r(s,a.s,0),this.dynamicProperties.push(this.s)),this.dynamicProperties.length?n.push(this):this.convertEllToPath()}}(),c=function(){function t(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(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,i=this.s.v[1]/2,a=bm_min(s,i,this.r.v),r=a*(1-.5519);2===this.d||1===this.d?(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+s,e-i+r],this.v.v[1]=[t+s,e+i-a],this.v.o[1]=[t+s,e+i-r],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+s-a,e+i],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+s-r,e+i],this.v.v[3]=[t-s+a,e+i],this.v.o[3]=[t-s+r,e+i],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-s,e+i-r],this.v.v[5]=[t-s,e-i+a],this.v.o[5]=[t-s,e-i+r],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-s+a,e-i],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-s+r,e-i],this.v.v[7]=[t+s-a,e-i],this.v.o[7]=[t+s-r,e-i],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=[t+s,e-i+r],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+s-a,e-i],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+s-r,e-i],this.v.v[2]=[t-s+a,e-i],this.v.o[2]=[t-s+r,e-i],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-s,e-i+a],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-s,e-i+r],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=[t-s,e+i-r],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-s+a,e+i],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-s+r,e+i],this.v.v[6]=[t+s-a,e+i],this.v.o[6]=[t+s-r,e+i],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+s,e+i-a],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+s,e+i-r])}return function(n,o,h){this.v={v:new Array(8),i:new Array(8),o:new Array(8),c:!0},this.d=o.d,this.dynamicProperties=[],this.mdf=!1,o.closed=!0,this.closed=!0,this.getInterpolatedValue=t,this.convertRectToPath=e,"number"==typeof o.p[0]?this.p=new i(o.p):(this.p=new r(n,o.p,0),this.dynamicProperties.push(this.p)),"number"==typeof o.s[0]?this.s=new i(o.s):(this.s=new r(n,o.s,0),this.dynamicProperties.push(this.s)),o.r.length?(this.r=new a(n,o.r,0),this.dynamicProperties.push(this.r)):this.r=new s(o.r,degToRads),this.dynamicProperties.length?h.push(this):this.convertRectToPath()}}(),u=function(){function t(t,e){var s,i=this.dynamicProperties.length;for(this.mdf=!1,s=0;i>s;s+=1)this.dynamicProperties[s].getInterpolatedValue(t),this.dynamicProperties[s].mdf&&(this.mdf=!0);if(this.mdf||e){var a=this.o.v%360/360;if(0===a&&0===this.s.v&&1==this.e.v)return void(this.isTrimming=!1);this.isTrimming=!0,0>a&&(a+=1);var r=this.s.v+a,n=this.e.v+a;if(r>n){var o=r;r=n,n=o}this.sValue=r,this.eValue=n,this.oValue=a}}return function(e,i,r){this.dynamicProperties=[],this.sValue=0,this.eValue=0,this.oValue=0,this.mdf=!1,this.getInterpolatedValue=t,this.k=!1,this.isTrimming=!1,i.s.length?(this.s=new a(e,i.s,.01),this.dynamicProperties.push(this.s)):this.s=new s(i.s,.01),i.e.length?(this.e=new a(e,i.e,.01),this.dynamicProperties.push(this.e)):this.e=new s(i.e,.01),i.o.length?(this.o=new a(e,i.o,0),this.dynamicProperties.push(this.o)):this.o=new s(i.o,0),this.dynamicProperties.length?(r.push(this),this.k=!0):this.getInterpolatedValue(0,!0)}}(),v=function(){function t(t,e){this.totalLength=0;var s,i=t.v,a=t.o,r=t.i,n=i.length;for(s=0;n-1>s;s+=1)this.lengths[s]=bez.getBezierLength(i[s],i[s+1],a[s],r[s+1]),this.totalLength+=this.lengths[s].addedLength;e&&(this.lengths[s]=bez.getBezierLength(i[s],i[0],a[s],r[0]),this.totalLength+=this.lengths[s].addedLength)}function e(t,e,s,i,a){this.nextO[this.segmentCount]=e,this.nextI[this.segmentCount+1]=s,this.nextV[this.segmentCount+1]=i,this.pathStarted?this.nextV[this.segmentCount]=t:(this.pathStarted=!0,this.v.s[this.segmentCount]=t),this.segmentCount+=1}function s(t,e){this.mdf=e?!0:!1;var s=0,i=this.trims.length;for(this.pathStarted=!1;i>s;){if(this.trims[s].mdf){this.mdf=!0;break}s+=1}if(this.mdf=this.prop.mdf?!0:this.mdf,this.mdf){this.nextO.length=0,this.nextI.length=0,this.nextV.length=0,this.v.s.length=0;var a=this.prop.closed;this.getSegmentsLength(this.prop.v,a);var r,n,o,h,l,m,p=this.prop.v,f=this.trims.length;for(r=0;f>r;r+=1)if(this.trims[r].isTrimming){if(n=this.trims[r].eValue,o=this.trims[r].sValue,h=this.trims[r].oValue,n===o)return this.v.v=this.nextV,this.v.o=this.nextO,
-void(this.v.i=this.nextI);1>=n?(this.segments[0].s=this.totalLength*o,this.segments[0].e=this.totalLength*n,this.segments[1].vl=!1):o>=1?(this.segments[0].s=this.totalLength*(o-1),this.segments[0].e=this.totalLength*(n-1),this.segments[1].vl=!1):(this.segments[0].s=this.totalLength*o,this.segments[0].e=this.totalLength,this.segments[1].s=0,this.segments[1].e=this.totalLength*(n-1),this.segments[1].vl=!0),this.v.v=p.v,this.v.o=p.o,this.v.i=p.i,m=this.v.v.length;var d=0,c=0;i=this.segments[1].vl?2:1;var u;for(this.segmentCount=0,s=0;i>s;s+=1){for(d=0,l=1;m>l;l++)if(c=this.lengths[l-1].addedLength,d+c<this.segments[s].s)d+=c;else{if(d>this.segments[s].e)break;this.segments[s].s<=d&&this.segments[s].e>=d+c?this.addSegment(this.v.v[l-1],this.v.o[l-1],this.v.i[l],this.v.v[l],this.lengths[l-1]):(u=bez.getNewSegment(this.v.v[l-1],this.v.v[l],this.v.o[l-1],this.v.i[l],(this.segments[s].s-d)/c,(this.segments[s].e-d)/c,this.lengths[l-1]),this.addSegment(u.pt1,u.pt3,u.pt4,u.pt2)),d+=c}a!==!1?d<=this.segments[s].e&&(c=this.lengths[l-1].addedLength,this.segments[s].s<=d&&this.segments[s].e>=d+c?this.addSegment(this.v.v[l-1],this.v.o[l-1],this.v.i[0],this.v.v[0],this.lengths[l-1]):(u=bez.getNewSegment(this.v.v[l-1],this.v.v[0],this.v.o[l-1],this.v.i[0],(this.segments[s].s-d)/c,(this.segments[s].e-d)/c,this.lengths[l-1]),this.addSegment(u.pt1,u.pt3,u.pt4,u.pt2))):this.pathStarted=!1}a=!1}else this.v.v=p.v,this.v.o=p.o,this.v.i=p.i;this.nextV.length?(this.v.v=this.nextV,this.v.o=this.nextO,this.v.i=this.nextI):this.v.s.length=0,this.v.c=a}}return function(i,a,r){this.trims=[],this.k=!1,this.mdf=!1,this.pathStarted=!1,this.segments=[{s:0,e:0,vl:!0},{s:0,e:0,vl:!1}],this.nextO=[],this.nextV=[],this.nextI=[],this.v={i:null,o:null,v:null,s:[],c:!1};var n,o=a.length;for(n=0;o>n;n+=1)a[n].closed||(this.k=a[n].trimProp.k?!0:this.k,this.trims.push(a[n].trimProp));this.prop=i,o=this.prop.shapeData.v.length-1,o+=this.prop.closed?1:0,this.lengths=new Array(o),this.k=i.k?!0:this.k,this.totalLength=0,this.getInterpolatedValue=s,this.addSegment=e,this.getSegmentsLength=t,this.k?r.push(this):this.getInterpolatedValue(0,!0)}}(),y=function(){function t(t,e){var s=0,i=this.dataProps.length;for(this.mdf=e?!0:!1;i>s;){if(this.dataProps[s].p.mdf){this.mdf=!0;break}s+=1}if(this.mdf)for("svg"===this.renderer&&(this.dasharray=""),s=0;i>s;s+=1)"o"!=this.dataProps[s].n?"svg"===this.renderer?this.dasharray+=" "+this.dataProps[s].p.v:this.dasharray[s]=this.dataProps[s].p.v:this.dashoffset=this.dataProps[s].p.v}return function(e,s,i,a){this.dataProps=new Array(s.length),this.renderer=i,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(s.length-1),this.dashoffset=0;var r,o,h=s.length;for(r=0;h>r;r+=1)o=n(e,s[r].v,0,0,a),this.k=o.k?!0:this.k,this.dataProps[r]={n:s[r].n,p:o};this.getInterpolatedValue=t,this.k?a.push(this):this.getInterpolatedValue(0,!0)}}(),g={};return g.getProp=n,g.getShapeProp=l,g.getDashProp=m,g}();SVGRenderer.prototype.createItem=function(t,e,s){switch(t.ty){case 2:return this.createImage(t,e,s);case 0:return this.createComp(t,e,s);case 1:return this.createSolid(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)}return this.createBase(t,e)},SVGRenderer.prototype.buildItems=function(t,e,s,i){var a,r=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var n;for(a=r-1;a>=0;a--)s[a]=this.createItem(t[a],e,i),0===t[a].ty&&(n=[],this.buildItems(t[a].layers,s[a].getDomElement(),n,i),s[a].setElements(n)),t[a].td&&s[a+1].setMatte(s[a].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)for(r=0;h>r;){if(s[r].data.id==t[i].id){o=s[r],s[r]=this.createItem(t[i],e,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,o),s[r].setElements(n));break}r+=1}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},SVGRenderer.prototype.createBase=function(t,e,s){return new SVGBaseElement(t,e,this.globalData,s)},SVGRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,s){return new IShapeElement(t,e,this.globalData,s)},SVGRenderer.prototype.createText=function(t,e,s){return new SVGTextElement(t,e,this.globalData,s)},SVGRenderer.prototype.createImage=function(t,e,s){return new IImageElement(t,e,this.globalData,s)},SVGRenderer.prototype.createComp=function(t,e,s){return new ICompElement(t,e,this.globalData,s)},SVGRenderer.prototype.createSolid=function(t,e,s){return new ISolidElement(t,e,this.globalData,s)},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","xMidYMid meet"),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.compSize={w:t.w,h:t.h},this.globalData.frameRate=t.fr;var s=document.createElementNS(svgNS,"clipPath"),i=document.createElementNS(svgNS,"rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+randomString(10);s.setAttribute("id",a),s.appendChild(i);var r=document.createElementNS(svgNS,"g");r.setAttribute("clip-path","url(#"+a+")"),this.animationItem.container.appendChild(r),e.appendChild(s),this.animationItem.container=r,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 i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;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.lastFrame!=t&&!this.destroyed){null===t?t=this.lastFrame:this.lastFrame=t,this.globalData.frameNum=t;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()}},CanvasRenderer.prototype.createItem=function(t){switch(t.ty){case 0:return this.createComp(t);case 1:return this.createSolid(t);case 2:return this.createImage(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 99:return this.createPlaceHolder(t);default:return this.createBase(t)}return this.createBase(t,parentContainer)},CanvasRenderer.prototype.buildItems=function(t,e){e||(e=this.elements);var s,i=t.length;for(s=0;i>s;s++)if(e[s]=this.createItem(t[s]),0===t[s].ty){var a=[];this.buildItems(t[s].layers,a),e[e.length-1].setElements(a)}},CanvasRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements);var r,n,o=s.length;for(i=0;a>i;i+=1)for(r=0;o>r;){if(s[r].data.id==t[i].id){s[r]=this.createItem(t[i],e),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,n),s[r].setElements(n));break}r+=1}},CanvasRenderer.prototype.createBase=function(t){return new CVBaseElement(t,this.globalData)},CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData)},CanvasRenderer.prototype.createPlaceHolder=function(t){return new PlaceHolderElement(t,null,this.globalData)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[2]||1!==t[3]||0!==t[4]||0!==t[5]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[2],t[3],t[4],t[5]);this.contextData.cTr.transform(t[0],t[1],t[2],t[3],t[4],t[5]);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])}},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(6));var s,i=6,a=this.contextData.saved[this.contextData.cArrPos];for(s=0;i>s;s+=1)a[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],i=6,a=this.contextData.cTr.props;for(e=0;i>e;e+=1)a[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),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.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.updateContainerSize(),this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document)},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,i=this.transformCanvas.w/this.transformCanvas.h;i>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,this.transformCanvas.sy,this.transformCanvas.tx,this.transformCanvas.ty],this.globalData.cWidth=t,this.globalData.cHeight=e},CanvasRenderer.prototype.buildStage=function(t,e,s){s||(s=this.elements);var i,a,r=e.length;for(i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemHierarchy(a,s[i],e,a.parent,s,!0),0==a.ty&&this.buildStage(null,a.layers,s[i].getElements())},CanvasRenderer.prototype.buildItemHierarchy=function(t,e,s,i,a,r){var n=0,o=s.length;for(r&&e.resetHierarchy();o>n;)s[n].ind===i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemHierarchy(t,e,s,s[n].parent,a,!1)),n+=1},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers.length;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.lastFrame==t&&this.renderConfig.clearCanvas===!0||this.destroyed)){this.lastFrame=t,this.globalData.frameNum=t-this.animationItem.firstFrame,this.renderConfig.clearCanvas===!0?(this.reset(),this.canvasContext.canvas.width=this.canvasContext.canvas.width):this.save(),this.ctxTransform(this.transformCanvas.props),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),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()}},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)},MaskElement.prototype.renderFrame=function(){var t,e=this.data.masksProperties.length;for(t=0;e>t;t++)"n"!==this.data.masksProperties[t].mode&&(this.viewData[t].prop.mdf||this.firstFrame)&&this.drawPath(this.data.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]);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 i,a,r="";for(a=e.v.length,i=1;a>i;i+=1)1==i&&(r+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-1][1])+" "+bm_rnd(e.i[i][0])+","+bm_rnd(e.i[i][1])+" "+bm_rnd(e.v[i][0])+","+bm_rnd(e.v[i][1]);t.cl&&(r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-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!==r&&(t.inv?s.elem.setAttribute("d",this.solidPath+r):s.elem.setAttribute("d",r),s.lastPath=r)},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.paths=null,this.masksProperties=null},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.isVisible=!1);var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t);this.data.hasMask&&this.maskManager.prepareFrame(t),this.currentFrameNum=t},BaseElement.prototype.init=function(){this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.dynamicProperties=[],this.currentFrameNum=-99999,this.lastNum=-99999,this.finalTransform={op:PropertyFactory.getProp(this.data,this.data.ks.o,0,.01,this.dynamicProperties),mProp:PropertyFactory.getProp(this.data,this.data.ks,2,null,this.dynamicProperties),matMdf:!1,opMdf:!1,mat:new Matrix,opacity:1},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.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"),i=randomString(10);s.setAttribute("id",i),s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%");var a=document.createElementNS(svgNS,"feComponentTransfer");a.setAttribute("in","SourceGraphic"),s.appendChild(a);var r=document.createElementNS(svgNS,"feFuncA");r.setAttribute("type","table"),r.setAttribute("tableValues","1.0 0.0"),a.appendChild(r),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(#"+i+")"),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},SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.data.hasMask&&(this.finalTransform.matMdf&&this.layerElement.setAttribute("transform","matrix("+s.props.join(",")+")"),this.finalTransform.opMdf&&this.layerElement.setAttribute("opacity",this.finalTransform.opacity)),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getDomElement=function(){return this.layerElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")},SVGBaseElement.prototype.hide=function(){},ITextElement.prototype.init=function(){this.parent.init.call(this);var t=this.data;this.renderedLetters=[],this.viewData={m:{a:PropertyFactory.getProp(t,t.t.m.a,1,0,this.dynamicProperties)}};var e=this.data.t;if(e.a.length){this.viewData.a=new Array(e.a.length);var s,i,a,r=e.a.length;for(s=0;r>s;s+=1)a=e.a[s],i={a:{},s:{}},"r"in a.a&&(i.a.r=PropertyFactory.getProp(t,a.a.r,0,degToRads,this.dynamicProperties)),"s"in a.a&&(i.a.s=PropertyFactory.getProp(t,a.a.s,1,.01,this.dynamicProperties)),"a"in a.a&&(i.a.a=PropertyFactory.getProp(t,a.a.a,1,0,this.dynamicProperties)),"o"in a.a&&(i.a.o=PropertyFactory.getProp(t,a.a.o,0,.01,this.dynamicProperties)),"p"in a.a&&(i.a.p=PropertyFactory.getProp(t,a.a.p,1,0,this.dynamicProperties)),"sw"in a.a&&(i.a.sw=PropertyFactory.getProp(t,a.a.sw,0,0,this.dynamicProperties)),"sc"in a.a&&(i.a.sc=PropertyFactory.getProp(t,a.a.sc,1,0,this.dynamicProperties)),"fc"in a.a&&(i.a.fc=PropertyFactory.getProp(t,a.a.fc,1,0,this.dynamicProperties)),"t"in a.a&&(i.a.t=PropertyFactory.getProp(t,a.a.t,0,0,this.dynamicProperties)),i.s.s="s"in a.s?PropertyFactory.getProp(t,a.s.s,0,0,this.dynamicProperties):{v:0},"e"in a.s&&(i.s.e=PropertyFactory.getProp(t,a.s.e,0,0,this.dynamicProperties)),i.s.o="o"in a.s?PropertyFactory.getProp(t,a.s.o,0,0,this.dynamicProperties):{v:0},i.s.xe="xe"in a.s?PropertyFactory.getProp(t,a.s.xe,0,0,this.dynamicProperties):{v:0},i.s.ne="ne"in a.s?PropertyFactory.getProp(t,a.s.ne,0,0,this.dynamicProperties):{v:0},this.viewData.a[s]=i}else this.viewData.a=[];e.p&&"m"in e.p&&(this.viewData.p={f:PropertyFactory.getProp(t,e.p.f,0,0,this.dynamicProperties),l:PropertyFactory.getProp(t,e.p.l,0,0,this.dynamicProperties),m:this.maskManager.getMaskProperty(e.p.m)})},ITextElement.prototype.getMeasures=function(){var t,e,s,i,a=this.mHelper,r=this.renderType,n=this.data,o=n.t.d,h=o.l;if("m"in n.t.p){var l=this.viewData.p.m;if(!this.viewData.p.n||this.viewData.p.mdf){var m=l.v,p={tLength:0,segments:[]};i=m.v.length-1;var f;for(s=0;i>s;s+=1)f={s:m.v[s],e:m.v[s+1],to:[m.o[s][0]-m.v[s][0],m.o[s][1]-m.v[s][1]],ti:[m.i[s+1][0]-m.v[s+1][0],m.i[s+1][1]-m.v[s+1][1]]},bez.buildBezierData(f),p.tLength+=f.bezierData.segmentLength,p.segments.push(f);s=i,l.closed&&(f={s:m.v[s],e:m.v[0],to:[m.o[s][0]-m.v[s][0],m.o[s][1]-m.v[s][1]],ti:[m.i[0][0]-m.v[0][0],m.i[0][1]-m.v[0][1]]},bez.buildBezierData(f),p.tLength+=f.bezierData.segmentLength,p.segments.push(f)),this.viewData.p.pi=p}var d,c,u,p=this.viewData.p.pi,v=this.viewData.p.f.v,y=0,g=1,b=0,E=!0,C=p.segments;if(0>v&&l.closed)for(p.tLength<Math.abs(v)&&(v=-Math.abs(v)%p.tLength),y=C.length-1,u=C[y].bezierData.points,g=u.length-1;0>v;)v+=u[g].partialLength,g-=1,0>g&&(y-=1,u=C[y].bezierData.points,g=u.length-1);u=C[y].bezierData.points,c=u[g-1],d=u[g];var w,S,P=d.partialLength}i=h.length,t=0,e=0;var D,I,F,T,A=1.2*n.t.d.s*.714,M=!0,x=this.viewData,k=new Array(i),V=!1;F=x.a.length;var L,N,_,R=[],B=n._letters;for(I=0;F>I;I+=1){L=n.t.a[I].totalChars,N=2===n.t.a[I].s.r?1:100/L,"e"in x.a[I].s||(x.a[I].s.e={v:2===n.t.a[I].s.r?L:100});var z=x.a[I].s.o.v/N;0===z&&0===x.a[I].s.s.v&&x.a[I].s.e.v===N;var O=x.a[I].s.s.v/N+z,j=x.a[I].s.e.v/N+z;if(O>j){var G=O;O=j,j=G}R.push({s:O,e:j,ne:x.a[I].s.ne.v,xe:x.a[I].s.xe.v})}var H,W,q,X,J,U,Y,Q,K,Z,$,tt,et,st,it,at=-1,rt=v,nt=y,ot=g,ht=0;for(s=0;i>s;s+=1){switch(a.reset(),o.j){case 1:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line]),0);break;case 2:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line])/2,0)}if(J=1,h[s].n)t=0,e+=o.yOffset,e+=M?1:0,v=rt,M=!1,ht=0,"m"in n.t.p&&(y=nt,g=ot,u=C[y].bezierData.points,c=u[g-1],d=u[g],P=d.partialLength,b=0),k[s]=this.emptyProp;else{if("m"in n.t.p){at!==h[s].ind&&(h[at]&&(v+=h[at].extra),v+=h[s].an/2,at=h[s].ind),v+=x.m.a.v[0]*h[s].an/200;var lt=0;for(I=0;F>I;I+=1)D=x.a[I].a,"p"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),lt+=D.p.v[0]*H);for(E=!0;E;)if(b+P>=v+lt||!u){if(w=(v+lt-b)/d.partialLength,q=c.point[0]+(d.point[0]-c.point[0])*w,X=c.point[1]+(d.point[1]-c.point[1])*w,a.translate(q,X),n.t.p.p){S=(d.point[1]-c.point[1])/(d.point[0]-c.point[0]);var mt=180*Math.atan(S)/Math.PI;d.point[0]<c.point[0]&&(mt+=180),a.rotate(mt*Math.PI/180)}a.translate(0,x.m.a.v[1]*A/100+e),E=!1}else u&&(b+=d.partialLength,g+=1,g>=u.length&&(g=0,y+=1,C[y]?u=C[y].bezierData.points:l.closed?(g=0,y=0,u=C[y].bezierData.points):u=null),u&&(c=d,d=u[g],P=d.partialLength));W=h[s].an/2-h[s].add}else a.translate(t,e),W=h[s].an/2-h[s].add,a.translate(W,0),a.translate(x.m.a.v[0]*h[s].an/200,x.m.a.v[1]*A/100);for(ht+=h[s].l/2,I=0;F>I;I+=1)D=x.a[I].a,"t"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),"m"in n.t.p?v+=D.t*H:t+=D.t.v*H);for(ht+=h[s].l/2,I=0;F>I;I+=1)D=x.a[I].a,"p"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),"m"in n.t.p?a.translate(0,D.p.v[1]*H):a.translate(D.p.v[0]*H,D.p.v[1]*H));for(o.strokeWidthAnim&&(Y=n.t.d.sw||0),o.strokeColorAnim&&(U=n.t.d.sc?[n.t.d.sc[0],n.t.d.sc[1],n.t.d.sc[2]]:[0,0,0]),o.fillColorAnim&&(Q=[n.t.d.fc[0],n.t.d.fc[1],n.t.d.fc[2]]),I=0;F>I;I+=1){if(D=x.a[I].a,H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),"r"in D&&"s"in R[I]&&a.rotate(D.r.v*H),"o"in D&&"s"in R[I]&&(J+=(D.o.v*H-J)*H),o.strokeWidthAnim&&"sw"in D&&"s"in R[I]&&(Y+=D.sw.v*H),o.strokeColorAnim&&"sc"in D&&"s"in R[I])for(K=0;3>K;K+=1)U[K]=Math.round(U[K]+(D.sc.v[K]-U[K])*H);if(o.fillColorAnim&&"fc"in D&&"s"in R[I])for(K=0;3>K;K+=1)Q[K]=Math.round(Q[K]+(D.fc.v[K]-Q[K])*H)}for(o.strokeWidthAnim&&(Z=0>Y?0:Y),o.strokeColorAnim&&($="rgb("+U[0]+","+U[1]+","+U[2]+")"),o.fillColorAnim&&(tt="rgb("+Q[0]+","+Q[1]+","+Q[2]+")"),I=0;F>I;I+=1)D=x.a[I].a,"s"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),a.scale(1+(D.s.v[0]-1)*H,1+(D.s.v[1]-1)*H));for(I=0;F>I;I+=1)D=x.a[I].a,"a"in D&&"s"in R[I]&&(H=this.getMult(h[s].anIndexes[I],R[I].s,R[I].e,R[I].ne,R[I].xe,n.t.a[I].s.sh),a.translate(-D.a.v[0]*H,-D.a.v[1]*H));"m"in n.t.p?(a.translate(-x.m.a.v[0]*h[s].an/200,-x.m.a.v[1]*A/100),v-=x.m.a.v[0]*h[s].an/200,h[s+1]&&at!==h[s+1].ind&&(v+=h[s].an/2,v+=o.tr/1e3*n.t.d.s),a.translate(-W,0)):(a.translate(-W,0),a.translate(-x.m.a.v[0]*h[s].an/200,-x.m.a.v[1]*A/100),t+=h[s].l+o.tr/1e3*n.t.d.s),"svg"===r?et=a.toCSS():st=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]],it=J,B?(_=B[s],_.o!==it||_.sw!==Z||_.sc!==$||_.fc!==tt?(V=!0,T=new LetterProps(it,Z,$,tt,et,st)):"svg"===r&&_.m!==et?(V=!0,T=new LetterProps(it,Z,$,tt,et)):"svg"===r||_.props[1]===a.props[1]&&_.props[2]===a.props[2]&&_.props[3]===a.props[3]&&_.props[4]===a.props[4]&&_.props[5]===a.props[5]?T=_:(V=!0,T=new LetterProps(it,Z,$,tt,null,[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]]))):(V=!0,T=new LetterProps(it,Z,$,tt,et,st)),k[s]=T}}V&&(this.renderedLetters=k)},ITextElement.prototype.getMult=function(t,e,s,i,a,r){var n=bez.getEasingCurve(i/100,0,1-a/100,1),o=0;return 2==r?(o=s===e?t>=s?1:0:Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),o=n("",o,0,1,1)):3==r?(o=s===e?t>=s?0:1:1-Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),o=n("",o,0,1,1)):4==r?s===e?o=t>=s?0:1:(o=Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),.5>o?o*=2:o=1-o):t>=Math.floor(e)&&(o=0>t-e?1-(e-t):Math.max(0,Math.min(s-t,1))),o},ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,SVGTextElement.prototype.getMult=ITextElement.prototype.getMult,SVGTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d;this.innerElem=document.createElementNS(svgNS,"g"),t.fc?this.innerElem.setAttribute("fill","rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.innerElem.setAttribute("fill","rgba(0,0,0,0)"),t.sc&&(this.innerElem.setAttribute("stroke","rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")"),this.innerElem.setAttribute("stroke-width",t.sw)),this.innerElem.setAttribute("font-size",t.s);var e=this.globalData.fontManager.getFontByName(t.f);this.innerElem.setAttribute("font-family",e.fFamily);var s,i,a=t.fWeight,r=t.fStyle;this.innerElem.setAttribute("font-style",r),this.innerElem.setAttribute("font-weight",a),this.layerElement.appendChild(this.innerElem);var n=t.l;i=n.length;var o,h,l,m,p,f,d,c=this.mHelper,u="",v=this.data.singleShape;if(this.globalData.fontManager.chars&&v)var y=0,g=0,b=t.lineWidths,E=t.boxWidth,C=!0;for(s=0;i>s;s+=1){if(this.globalData.fontManager.chars?v&&0!==s||(o=document.createElementNS(svgNS,"path")):o=document.createElementNS(svgNS,"text"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var w=this.globalData.fontManager.getCharData(t.t.charAt(s),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),S=w.data;if(c.reset(),v&&n[s].n&&(y=0,g+=t.yOffset,g+=C?1:0,C=!1),S){if(h=S.shapes[0].it,v){switch(t.j){case 1:
-c.translate(t.justifyOffset+(E-b[n[s].line]),0);break;case 2:c.translate(t.justifyOffset+(E-b[n[s].line])/2,0)}c.translate(y,g)}else u="";for(m=h.length,c.scale(t.s/100,t.s/100),l=0;m>l;l+=1){for(f=h[l].ks.i.length,d=h[l].ks,p=1;f>p;p+=1)1==p&&(u+=" M"+c.applyToPointStringified(d.v[0][0],d.v[0][1])),u+=" C"+c.applyToPointStringified(d.o[p-1][0],d.o[p-1][1])+" "+c.applyToPointStringified(d.i[p][0],d.i[p][1])+" "+c.applyToPointStringified(d.v[p][0],d.v[p][1]);u+=" C"+c.applyToPointStringified(d.o[p-1][0],d.o[p-1][1])+" "+c.applyToPointStringified(d.i[0][0],d.i[0][1])+" "+c.applyToPointStringified(d.v[0][0],d.v[0][1]),u+="z"}v||o.setAttribute("d",u)}v?y+=n[s].l:this.innerElem.appendChild(o)}else o.textContent=n[s].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(o);this.textSpans.push(o)}v&&(o.setAttribute("d",u),this.innerElem.appendChild(o))},SVGTextElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},SVGTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||(this.finalTransform.matMdf&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),this.finalTransform.opMdf&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),!this.data.singleShape){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].setAttribute("transform",n.m),this.textSpans[s].setAttribute("opacity",n.o),n.sw&&this.textSpans[s].setAttribute("stroke-width",n.sw),n.sc&&this.textSpans[s].setAttribute("stroke",n.sc),n.fc&&this.textSpans[s].setAttribute("fill",n.fc))}},SVGTextElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null};var PlaceHolderElement=function(t,e,s){if(this.data=t,this.globalData=s,e){this.parentContainer=e;var i=document.createElementNS(svgNS,"g");i.setAttribute("id",this.data.id),e.appendChild(i),this.phElement=i}this.layerId="ly_"+randomString(10)};PlaceHolderElement.prototype.prepareFrame=function(){},PlaceHolderElement.prototype.renderFrame=function(){},PlaceHolderElement.prototype.draw=function(){},createElement(SVGBaseElement,ICompElement),ICompElement.prototype.getComposingElement=function(){return this.layerElement},ICompElement.prototype.hide=function(){if(!this.hidden){var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t].hide();this.hidden=!0}},ICompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1));var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},ICompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.data.hasMask?this.elements[e].renderFrame():this.elements[e].renderFrame(this.finalTransform);this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this.parent.destroy.call();var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t].destroy()},createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assetData.p),t.maskedElement=t.innerElem},s=new Image;s.addEventListener("load",e,!1),s.addEventListener("error",e,!1),s.src=this.path+this.assetData.p,this.parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},IImageElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||((this.finalTransform.matMdf||this.firstFrame)&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),(this.finalTransform.opMdf||this.firstFrame)&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},IShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.mainShape=new ShapeItemElement(this.data,this.layerElement,this.parentContainer,this.placeholder,this.dynamicProperties,this.globalData)},IShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden=!1,this.firstFrame&&(this.mainShape.firstFrame=!0,this.firstFrame=!1),void(this.data.hasMask?this.mainShape.renderShape(this.transformHelper,null,null,!0):this.mainShape.renderShape(this.finalTransform,null,null,!0)))},IShapeElement.prototype.hide=function(){this.hidden||(this.mainShape.hideShape(),this.hidden=!0)},IShapeElement.prototype.destroy=function(){this.parent.destroy.call(),this.mainShape.destroy()},ShapeItemElement.prototype.appendNodeToParent=SVGBaseElement.prototype.appendNodeToParent,ShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var m;if(e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty){if(m=document.createElementNS(svgNS,"g"),m.setAttribute("stroke-linecap",this.lcEnum[t[a].lc]||"round"),m.setAttribute("stroke-linejoin",this.ljEnum[t[a].lj]||"round"),m.setAttribute("fill-opacity","0"),1==t[a].lj&&m.setAttribute("stroke-miterlimit",t[a].ml),e[a].c.k||m.setAttribute("stroke","rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||m.setAttribute("stroke-opacity",e[a].o.v),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||m.setAttribute("stroke-width",e[a].w.v),t[a].d){var p=PropertyFactory.getDashProp(this.elemData,t[a].d,"svg",s);p.k?e[a].d=p:(m.setAttribute("stroke-dasharray",p.dasharray),m.setAttribute("stroke-dashoffset",p.dashoffset))}}else m=document.createElementNS(svgNS,"path"),e[a].c.k||m.setAttribute("fill","rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||m.setAttribute("fill-opacity",e[a].o.v);this.shape===this.parentContainer?this.appendNodeToParent(m):this.shape.appendChild(m),this.stylesList.push({pathElement:m,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var v={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(v),l.push(v)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},ShapeItemElement.prototype.getElement=function(){return this.shape},ShapeItemElement.prototype.hideShape=function(){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode))},ShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},ShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var m=r.s?r.s:[];for(a=1;i>a;a+=1)m[a-1]?(e.st&&(h+=" M"+m[a-1][0]+","+m[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(m[a-1][0],m[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(m[0]?(e.st&&(h+=" M"+m[0][0]+","+m[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(m[0][0],m[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},ShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&i.pathElement.setAttribute("fill","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&i.pathElement.setAttribute("fill-opacity",e.o.v*s.opacity)},ShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.pathElement.setAttribute("stroke-dasharray",a.dasharray),i.pathElement.setAttribute("stroke-dashoffset",a.dashoffset)),(e.c.mdf||this.firstFrame)&&i.pathElement.setAttribute("stroke","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&i.pathElement.setAttribute("stroke-opacity",e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&i.pathElement.setAttribute("stroke-width",e.w.v)},ShapeItemElement.prototype.destroy=function(t,e){this.shape=null,this.data=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement===this.parentContainer?this.appendNodeToParent(t):this.layerElement.appendChild(t),this.innerElem=t},ISolidElement.prototype.hide=IImageElement.prototype.hide,ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy,createElement(BaseElement,CVBaseElement),CVBaseElement.prototype.createElements=function(){},CVBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(!this.isVisible)return this.isVisible;this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]);return this.data.hasMask&&(this.globalData.renderer.save(!0),this.maskManager.renderFrame(s)),this.isVisible},CVBaseElement.prototype.getCurrentAnimData=function(){return this.currentAnimData},CVBaseElement.prototype.addMasks=function(t){this.maskManager=new CVMaskElement(t,this,this.globalData)},CVBaseElement.prototype.destroy=function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager&&this.maskManager.destroy()},CVBaseElement.prototype.mHelper=new Matrix,createElement(CVBaseElement,CVCompElement),CVCompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1));var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},CVCompElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e,s=this.layers.length;for(e=s-1;e>=0;e-=1)this.elements[e].renderFrame(this.finalTransform);this.data.hasMask&&this.globalData.renderer.restore(!0),this.firstFrame&&(this.firstFrame=!1)}},CVCompElement.prototype.setElements=function(t){this.elements=t},CVCompElement.prototype.getElements=function(){return this.elements},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.layers=null,this.elements=null,this.parent.destroy.call()},createElement(CVBaseElement,CVImageElement),CVImageElement.prototype.createElements=function(){var t=this,e=function(){t.animationItem.elementLoaded()},s=function(){t.failed=!0,t.animationItem.elementLoaded()};this.img=new Image,this.img.addEventListener("load",e,!1),this.img.addEventListener("error",s,!1),this.img.src=this.path+this.assetData.p,this.parent.createElements.call(this)},CVImageElement.prototype.renderFrame=function(t){if(!this.failed&&this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.drawImage(this.img,0,0),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},CVImageElement.prototype.destroy=function(){this.img=null,this.animationItem=null,this.parent.destroy.call()},CVMaskElement.prototype.getMaskProperty=function(t){return this.viewData[t]},CVMaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)},CVMaskElement.prototype.renderFrame=function(t){var e,s,i,a,r,n=this.ctx,o=this.data.masksProperties.length,h=!1;for(e=0;o>e;e++)if("n"!==this.masksProperties[e].mode){h===!1&&(n.beginPath(),h=!0),this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.globalData.compWidth,0),n.lineTo(this.globalData.compWidth,this.globalData.compHeight),n.lineTo(0,this.globalData.compHeight),n.lineTo(0,0)),r=this.viewData[e].v,s=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.moveTo(s[0],s[1]);var l,m=r.v.length;for(l=1;m>l;l++)s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[l][0],r.i[l][1]),a=t.applyToPointArray(r.v[l][0],r.v[l][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1]);s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[0][0],r.i[0][1]),a=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1])}h&&n.clip()},CVMaskElement.prototype.destroy=function(){this.ctx=null},createElement(CVBaseElement,CVShapeElement),CVShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.mainShape=new CVShapeItemElement(this.data,this.dynamicProperties,this.globalData)},CVShapeElement.prototype.renderFrame=function(t){this.parent.renderFrame.call(this,t)!==!1&&(this.firstFrame&&(this.mainShape.firstFrame=!0,this.firstFrame=!1),this.mainShape.renderShape(this.finalTransform,null,null,!0),this.data.hasMask&&this.globalData.renderer.restore(!0))},CVShapeElement.prototype.destroy=function(){this.mainShape.destroy(),this.parent.destroy.call()},CVShapeItemElement.prototype.dashResetter=[],CVShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],m=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var p=PropertyFactory.getDashProp(this.elemData,t[a].d,"canvas",s);e[a].d=p,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(u),m.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=m.length,a=0;h>a;a+=1)m[a].closed=!0},CVShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var m,p,f,d,c,u,v,y=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(v=this.stylesList[a].type,"st"!==v||0!==this.stylesList[a].wi){for(y.save(),c=this.stylesList[a].elements,p=c.length,"st"===v?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml):g.fillStyle=this.stylesList[a].co,y.ctxOpacity(this.stylesList[a].coOp),g.beginPath(),m=0;p>m;m+=1){for("st"===v?(y.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),y.ctxTransform(c[m].tr),u=c[m].nodes):u=c[m].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===v&&(g.stroke(),y.restore())}"st"!==v&&g.fill(),y.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeItemElement.prototype.destroy=function(){this.data=null,this.globalData=null,this.canvasContext=null},createElement(CVBaseElement,CVSolidElement),CVSolidElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.fillStyle=this.data.sc,e.fillRect(0,0,this.data.sw,this.data.sh),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(CVBaseElement,CVTextElement),CVTextElement.prototype.init=ITextElement.prototype.init,CVTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,CVTextElement.prototype.getMult=ITextElement.prototype.getMult,CVTextElement.prototype.tHelper=document.createElement("canvas").getContext("2d"),CVTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d,e=!1;t.fc?(e=!0,this.values.fill="rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.values.sWidth=t.sw);var i,a,r=this.globalData.fontManager.getFontByName(t.f),n=this.mHelper;this.stroke=s,this.values.fValue=t.s+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.t.length,this.tHelper.font=this.values.fValue;var o,h,l,m,p,f,d,c,u,v;for(i=0;a>i;i+=1){if(o=this.globalData.fontManager.getCharData(t.t.charAt(i),r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),n.reset(),n.scale(t.s/100,t.s/100),h=o.data)for(p=h.shapes[0].it,d=p.length,u=new Array(d),f=0;d>f;f+=1){for(m=p[f].ks.i.length,c=p[f].ks,v=[],l=1;m>l;l+=1)1==l&&v.push(n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),v.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[l][0],c.i[l][1]),n.applyToY(c.i[l][0],c.i[l][1]),n.applyToX(c.v[l][0],c.v[l][1]),n.applyToY(c.v[l][0],c.v[l][1]));v.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[0][0],c.i[0][1]),n.applyToY(c.i[0][0],c.i[0][1]),n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),u[f]=v}else u=[];this.textSpans.push({elem:u})}},CVTextElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext,s=this.finalTransform.mat.props;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.font=this.values.fValue,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.getMeasures();var i,a,r,n,o,h,l=this.renderedLetters,m=this.data.t.d.l;a=m.length;var p,f,d,c=null,u=null,v=null;for(i=0;a>i;i+=1)if(!m[i].n){if(p=l[i],this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(p.props),this.globalData.renderer.ctxOpacity(p.o),this.fill){for(p.fc?c!==p.fc&&(c=p.fc,e.fillStyle=p.fc):c!==this.values.fill&&(c=this.values.fill,e.fillStyle=this.values.fill),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(p.sw?v!==p.sw&&(v=p.sw,e.lineWidth=p.sw):v!==this.values.sWidth&&(v=this.values.sWidth,e.lineWidth=this.values.sWidth),p.sc?u!==p.sc&&(u=p.sc,e.strokeStyle=p.sc):u!==this.values.stroke&&(u=this.values.stroke,e.strokeStyle=this.values.stroke),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}this.globalData.renderer.restore()}this.globalData.renderer.restore(this.data.hasMask)}};var animationManager=function(){function t(t,e){if(!t)return null;for(var s=0;b>s;){if(v[s].elem==t&&null!==v[s].elem)return v[s].animation;s+=1}var i=new AnimationItem;return i.setData(t,e),v.push({elem:t,animation:i}),b+=1,i}function e(t){var e=new AnimationItem;return e.setParams(t),v.push({elem:null,animation:e}),b+=1,e}function s(t,e){var s;for(s=0;b>s;s+=1)v[s].animation.setSpeed(t,e)}function i(t,e){var s;for(s=0;b>s;s+=1)v[s].animation.setDirection(t,e)}function a(t){var e;for(e=0;b>e;e+=1)v[e].animation.play(t)}function r(t,e){g=!1,y=Date.now();var s;for(s=0;b>s;s+=1)v[s].animation.moveFrame(t,e)}function n(){var t,e=Date.now(),s=e-y;for(t=0;b>t;t+=1)v[t].animation.renderer.destroyed?(v.splice(t,1),t-=1,b-=1):v[t].animation.advanceTime(s);y=e,requestAnimationFrame(n)}function o(t){var e;for(e=0;b>e;e+=1)v[e].animation.pause(t)}function h(t,e,s){var i;for(i=0;b>i;i+=1)v[i].animation.goToAndStop(t,e,s)}function l(t){var e;for(e=0;b>e;e+=1)v[e].animation.stop(t)}function m(t){var e;for(e=0;b>e;e+=1)v[e].animation.togglePause(t)}function p(t){var e;for(e=0;b>e;e+=1)v[e].animation.destroy(t)}function f(e,s,i){var a,r=document.getElementsByClassName("bodymovin"),n=r.length;for(a=0;n>a;a+=1)i&&r[a].setAttribute("data-bm-type",i),t(r[a],e);if(s&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),t(h,e)}}function d(){var t;for(t=0;b>t;t+=1)v[t].animation.resize()}function c(){y=Date.now(),requestAnimationFrame(n)}var u={},v=[],y=0,g=!0,b=0;return setTimeout(c,0),u.registerAnimation=t,u.loadAnimation=e,u.setSpeed=s,u.setDirection=i,u.play=a,u.moveFrame=r,u.pause=o,u.stop=l,u.togglePause=m,u.searchAnimations=f,u.resize=d,u.start=c,u.goToAndStop=h,u.destroy=p,u}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.repeat="indefinite",this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.isScrolling=!1,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.renderedFrameCount=0,this.scaleMode="fit",this.math=Math,this.removed=!1,this.timeCompleted=0,this.segmentPos=0,this.segments=[]};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var s=t.animType?t.animType:t.renderer?t.renderer:"canvas";switch(s){case"canvas":this.renderer=new CanvasRenderer(this,t.renderer);break;case"svg":this.renderer=new SVGRenderer(this,t.renderer)}if(this.animType=s,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));
-else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},AnimationItem.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||(s.loop="false"===a?!1:"true"===a?!0:parseInt(a)),s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var r=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===r&&(s.prerender=!1),this.setParams(s)},AnimationItem.prototype.includeLayers=function(t){var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;n>s;s+=1)for(e=0;a>e;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}if(t.assets)for(a=t.assets.length,e=0;a>e;e+=1)this.animationData.assets.push(t.assets[e]);dataManager.completeData(this.animationData),this.renderer.includeLayers(t.layers),this.renderer.buildStage(this.container,this.layers),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.animationData._id=this.animationID,this.animationData._animType=this.animType,this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.loadSegments(),dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():this.checkLoaded()},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(this.renderer.buildItems(this.animationData.layers),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(this.renderer.buildStage(this.container,this.layers),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=subframeEnabled?this.currentRawFrame:this.math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1)},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0)},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?(this.isPaused=!1,this.play()):(this.isPaused=!0,this.pause()))},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.isPaused=!0)},AnimationItem.prototype.advanceTime=function(t){this.isPaused!==!0&&this.isScrolling!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier)},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.trigger("segmentStart")},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;i>s;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&(this.adjustSegment(this.segments.shift()),this.setCurrentRawFrameValue(0)),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||this.renderer.destroy()},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t;var e=!1;if(this.currentRawFrame>=this.totalFrames){if(this.segments.length&&(e=!0),this.loop===!1)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");if(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete")}else if(this.currentRawFrame<0)return this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1?(this.currentRawFrame=0,this.gotoFrame(),this.pause(),void this.trigger("complete")):(this.trigger("loopComplete"),this.currentRawFrame=this.totalFrames+this.currentRawFrame,void this.gotoFrame());if(e){var s=this.currentRawFrame%this.totalFrames;this.adjustSegment(this.segments.shift()),this.currentRawFrame=s}else this.currentRawFrame=this.currentRawFrame%this.totalFrames;this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;s>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames))},AnimationItem.prototype.addEventListener=addEventListener,AnimationItem.prototype.removeEventListener=removeEventListener,AnimationItem.prototype.triggerEvent=triggerEvent,function(t){function e(t){animationManager.play(t)}function s(t){animationManager.pause(t)}function i(t){animationManager.togglePause(t)}function a(t,e){animationManager.setSpeed(t,e)}function r(t,e){animationManager.setDirection(t,e)}function n(t){animationManager.stop(t)}function o(t){animationManager.moveFrame(t)}function h(){E===!0?animationManager.searchAnimations(C,E,w):animationManager.searchAnimations()}function l(t){return animationManager.registerAnimation(t)}function m(){animationManager.resize()}function p(){animationManager.start()}function f(t,e,s){animationManager.goToAndStop(t,e,s)}function d(t){subframeEnabled=t}function c(t){return E===!0&&(t.animationData=JSON.parse(C)),animationManager.loadAnimation(t)}function u(t){return animationManager.destroy(t)}function v(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(defaultCurveSegments>=50?!1:!0)}function y(){"complete"===document.readyState&&(clearInterval(F),h())}function g(t){for(var e=I.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var b={};b.play=e,b.pause=s,b.togglePause=i,b.setSpeed=a,b.setDirection=r,b.stop=n,b.moveFrame=o,b.searchAnimations=h,b.registerAnimation=l,b.loadAnimation=c,b.setSubframeRendering=d,b.resize=m,b.start=p,b.goToAndStop=f,b.destroy=u,b.setQuality=v,b.version="3.1.1",b.checkReady=y,t.bodymovin=b;var E="__[STANDALONE]__",C="__[ANIMATIONDATA]__",w="";if(E){var S=document.getElementsByTagName("script"),P=S.length-1,D=S[P],I=D.src.replace(/^[^\?]+\??/,"");w=g("renderer")}var F=setInterval(y,100)}(window);}(window));
\ No newline at end of file
+(function(window){function Matrix(){var t=this;t._t=t.transform,t.a=t.d=1,t.b=t.c=t.e=t.f=0,t.props=[1,0,0,1,0,0],t.cssParts=["matrix(","",")"],t.a1=t.b1=t.c1=t.d1=t.e1=t.f1=0,t.cos=t.sin=0}function matrixManagerFunction(){var t=new Matrix,e=function(t,e,s,i,a,r,n,o,h){var l,m,p,f,d,c,u;return l=$M([[1,0,0,0],[0,Math.cos(t),Math.sin(-t),0],[0,Math.sin(t),Math.cos(t),0],[0,0,0,1]]),m=$M([[Math.cos(e),0,Math.sin(e),0],[0,1,0,0],[Math.sin(-e),0,Math.cos(e),0],[0,0,0,1]]),p=$M([[Math.cos(s),Math.sin(-s),0,0],[Math.sin(s),Math.cos(s),0,0],[0,0,1,0],[0,0,0,1]]),d=$M([[i,0,0,0],[0,a,0,0],[0,0,r,0],[0,0,0,1]]),c=l.x(m).x(p).x(d),c=c.transpose(),u=$M([[1,0,0,0],[0,1,0,0],[0,0,1,0],[n,o,h,1]]),c=c.x(u),f="matrix3d(",f+=c.e(1,1).toFixed(5)+","+c.e(1,2).toFixed(5)+","+c.e(1,3).toFixed(5)+","+c.e(1,4).toFixed(5)+",",f+=c.e(2,1).toFixed(5)+","+c.e(2,2).toFixed(5)+","+c.e(2,3).toFixed(5)+","+c.e(2,4).toFixed(5)+",",f+=c.e(3,1).toFixed(5)+","+c.e(3,2).toFixed(5)+","+c.e(3,3).toFixed(5)+","+c.e(3,4).toFixed(5)+",",f+=c.e(4,1).toFixed(5)+","+c.e(4,2).toFixed(5)+","+c.e(4,3).toFixed(5)+","+c.e(4,4).toFixed(5),f+=")"},s=function(e,s,i,a,r){return t.reset().translate(a,r).rotate(e).scale(s,i).toCSS()},i=function(e,s,i,a,r){return t.reset().translate(a,r).rotate(e).scale(s,i).toArray()},a=function(t){return s(t.r,t.s[0],t.s[1],t.p[0],t.p[1])},r=function(t,i){return i?e(-t.tr.r[0],t.tr.r[1],t.tr.r[2],t.tr.s[0],t.tr.s[1],t.tr.s[2],t.tr.p[0],t.tr.p[1],t.tr.p[2]):s(t.tr.r[2],t.tr.s[0],t.tr.s[1],t.tr.p[0],t.tr.p[1])},n=function(t,i){return i?e(-t.r[0],t.r[1],t.r[2],t.s[0],t.s[1],t.s[2],t.p[0],t.p[1],t.p[2]):s(t.r[2],t.s[0],t.s[1],t.p[0],t.p[1])},o=function(t,e){return e?null:i(t.r[2],t.s[0],t.s[1],t.p[0],t.p[1])};return{get2DMatrix:a,getMatrix:r,getMatrix2:n,getMatrixArray:o,getMatrixArrayFromParams:i,getMatrix2FromParams:s}}function roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.verticalAlign="top",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="hidden",styleUnselectableDiv(t)}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function addEventListener(t,e){this._cbs||(this._cbs=[]),this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e)}function triggerEvent(t,e){this._cbs||(this._cbs=[]);var s=0===this._cbs.length,i=this;if(this._cbs[t])if(s)setTimeout(function(){for(var s=0;s<i._cbs[t].length;s++)i._cbs[t][s](e)},0);else for(var a=0;a<this._cbs[t].length;a++)this._cbs[t][a](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}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,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.props=r}function iterateDynamicProperties(t){var e,s=this.dynamicProperties;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)}function createElement(t,e,s){if(!e){var i=Object.create(t.prototype,s),a={};return i&&"[object Function]"===a.toString.call(i.init)&&i.init(),i}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.parent=t.prototype}function bezFunction(){function t(t,e,s,i,a,r){return bm_abs((s-t)*(r-e)-(a-t)*(i-e))<1e-5}function e(t,e,s,i,a){if(a||(a=("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p")),o[a])return o[a];var r,n,h,l,m,p;return o[a]=function(a,o,f,d,c){var u=o/c;a=u;for(var v,y=0;++y<20&&(h=3*t,n=3*(s-t)-h,r=1-h-n,v=a*(h+a*(n+a*r))-u,!(bm_abs(v)<.001));)a-=v/(h+a*(2*n+3*r*a));p=3*e,m=3*(i-e)-p,l=1-p-m;var g=a*(p+a*(m+a*l));return d*g+f},o[a]}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var s=e.segments,i=s.length,a=bm_floor((i-1)*t),r=t*e.addedLength,n=0;if(r==s[a].l)return s[a].p;for(var o=s[a].l>r?-1:1,h=!0;h;)s[a].l<=r&&s[a+1].l>r?(n=(r-s[a].l)/(s[a+1].l-s[a].l),h=!1):a+=o,(0>a||a>=i-1)&&(h=!1);return s[a].p+(s[a+1].p-s[a].p)*n}function r(){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,i,n,o,h){var l=new r;n=0>n?0:n;var m=a(n,h);o=o>1?1:o;var p,f=a(o,h),d=t.length,c=1-m,u=1-f;for(p=0;d>p;p+=1)l.pt1[p]=c*c*c*t[p]+(m*c*c+c*m*c+c*c*m)*s[p]+(m*m*c+c*m*m+m*c*m)*i[p]+m*m*m*e[p],l.pt3[p]=c*c*u*t[p]+(m*c*u+c*m*u+c*c*f)*s[p]+(m*m*u+c*m*f+m*c*f)*i[p]+m*m*f*e[p],l.pt4[p]=c*u*u*t[p]+(m*u*u+c*f*u+c*u*f)*s[p]+(m*f*u+c*f*f+m*u*f)*i[p]+m*f*f*e[p],l.pt2[p]=u*u*u*t[p]+(f*u*u+u*f*u+u*u*f)*s[p]+(f*f*u+u*f*f+f*u*f)*i[p]+f*f*f*e[p];return l}var o=[],h=(Math,function(){function e(t,e){this.l=t,this.p=e}var s={};return function(i,a,r,n){var o=(i.join("_")+"_"+a.join("_")+"_"+r.join("_")+"_"+n.join("_")).replace(/\./g,"p");if(s[o])return s[o];var h,l,m,p,f,d,c=defaultCurveSegments,u=0,v=[],y=[],g={addedLength:0,segments:[]};for((i[0]!=a[0]||i[1]!=a[1])&&t(i[0],i[1],a[0],a[1],r[0],r[1])&&t(i[0],i[1],a[0],a[1],n[0],n[1])&&(c=2),m=r.length,h=0;c>h;h+=1){for(f=h/(c-1),d=0,l=0;m>l;l+=1)p=bm_pow(1-f,3)*i[l]+3*bm_pow(1-f,2)*f*r[l]+3*(1-f)*bm_pow(f,2)*n[l]+bm_pow(f,3)*a[l],v[l]=p,null!==y[l]&&(d+=bm_pow(v[l]-y[l],2)),y[l]=v[l];d&&(d=bm_sqrt(d),u+=d),g.segments.push(new e(u,f))}return g.addedLength=u,s[o]=g,g}}()),l=function(){var e={};return function(a){var r=a.s,n=a.e,o=a.to,h=a.ti,l=(r.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(a.bezierData=e[l]);var m,p,f,d,c,u,v,y=defaultCurveSegments,g=0,b=null;(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+o[0],r[1]+o[1])&&t(r[0],r[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(y=2);var E=new s(y);for(f=o.length,m=0;y>m;m+=1){for(v=new Array(f),c=m/(y-1),u=0,p=0;f>p;p+=1)d=bm_pow(1-c,3)*r[p]+3*bm_pow(1-c,2)*c*(r[p]+o[p])+3*(1-c)*bm_pow(c,2)*(n[p]+h[p])+bm_pow(c,3)*n[p],v[p]=d,null!==b&&(u+=bm_pow(v[p]-b[p],2));u=bm_sqrt(u),g+=u,E.points[m]=new i(u,v),b=v}E.segmentLength=g,a.bezierData=E,e[l]=E}}();return{getEasingCurve:e,getBezierLength:h,getNewSegment:n,buildBezierData:l}}function dataFunctionManager(){function t(a,n,o){var h,l,m,p,f,d,c,u,v=a.length;for(p=0;v>p;p+=1)if(h=a[p],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(a[p-1].td=h.tt),l=[],m=-1,h.hasMask){var y=h.masksProperties;for(d=y.length,f=0;d>f;f+=1)if(y[f].pt.i)i(y[f].pt);else for(u=y[f].pt.length,c=0;u>c;c+=1)y[f].pt[c].s&&i(y[f].pt[c].s[0]),y[f].pt[c].e&&i(y[f].pt[c].e[0])}0===h.ty?(h.layers=e(h.refId,n),t(h.layers,n,o)):4===h.ty?s(h.shapes):5==h.ty&&r(h,o)}}function e(t,e){for(var s=0,i=e.length;i>s;){if(e[s].id===t)return JSON.parse(JSON.stringify(e[s].layers));s+=1}}function s(t,e){var a,r,n,o=t.length,h=e?e:!1;for(a=o-1;a>=0;a-=1)if("tm"==t[a].ty&&(h=!0),"sh"==t[a].ty)if(t[a].trimmed=h,t[a].ks.i)i(t[a].ks);else for(n=t[a].ks.length,r=0;n>r;r+=1)t[a].ks[r].s&&(i(t[a].ks[r].s[0]),i(t[a].ks[r].e[0]));else"gr"==t[a].ty&&s(t[a].it,h)}function i(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 a(e,s){t(e.layers,e.assets,s)}function r(t,e){var s,i,a,r,o,h,l,m,p=[],f=t.t.d,d=0,c=t.t.m.g,u=0,v=0,y=0,g=[],b=0,E=0,C=e.getFontByName(f.f),w=C.fStyle.split(" "),P="normal",S="normal";for(i=w.length,s=0;i>s;s+=1)"italic"===w[s].toLowerCase()?S="italic":"bold"===w[s].toLowerCase()?P="700":"black"===w[s].toLowerCase()?P="900":"medium"===w[s].toLowerCase()?P="500":"regular"===w[s].toLowerCase()||"normal"===w[s].toLowerCase()?P="400":("light"===w[s].toLowerCase()||"thin"===w[s].toLowerCase())&&(P="200");for(f.fWeight=P,f.fStyle=S,i=f.t.length,s=0;i>s;s+=1)if(a=!1," "===f.t.charAt(s)?r=" ":13===f.t.charCodeAt(s)?(g.push(b),E=b>E?b:E,b=0,r="",a=!0,y+=1):r=f.t.charAt(s),e.chars?(l=e.getCharData(f.t.charAt(s),C.fStyle,e.getFontByName(f.f).fFamily),m=a?0:l.w*f.s/100):(n.font=f.s+"px "+e.getFontByName(f.f).fFamily,m=n.measureText(r).width),b+=m,p.push({l:m,an:m,add:u,n:a,anIndexes:[],val:r,line:y}),2==c){if(u+=m,""==r||" "==r||s==i-1){for((""==r||" "==r)&&(u-=m);s>=v;)p[v].an=u,p[v].ind=d,p[v].extra=m,v+=1;d+=1,u=0}}else if(3==c){if(u+=m,""==r||s==i-1){for(""==r&&(u-=m);s>=v;)p[v].an=u,p[v].ind=d,p[v].extra=m,v+=1;u=0,d+=1}}else p[d].ind=d,p[d].extra=0,d+=1;switch(f.l=p,E=b>E?b:E,g.push(b),f.boxWidth=E,f.lineWidths=g,f.j){case 1:t.t.d.justifyOffset=-f.boxWidth;break;case 2:t.t.d.justifyOffset=-f.boxWidth/2;break;default:t.t.d.justifyOffset=0}var x=t.t.a;h=x.length;var D,I,T=[];for(o=0;h>o;o+=1){for(x[o].a.sc&&(f.strokeColorAnim=!0),x[o].a.sw&&(f.strokeWidthAnim=!0),x[o].a.fc&&(f.fillColorAnim=!0),I=0,D=x[o].s.b,s=0;i>s;s+=1)p[s].anIndexes[o]=I,(1==D&&""!=p[s].val||2==D&&""!=p[s].val&&" "!=p[s].val||3==D&&(p[s].n||" "==p[s].val||s==i-1)||4==D&&(p[s].n||s==i-1))&&(1===x[o].s.rn&&T.push(I),I+=1);t.t.a[o].totalChars=I;var F,M=-1;if(1===x[o].s.rn)for(s=0;i>s;s+=1)M!=p[s].anIndexes[o]&&(M=p[s].anIndexes[o],F=T.splice(Math.floor(Math.random()*T.length),1)[0]),p[s].anIndexes[o]=F}0!==h||"m"in t.t.p||(t.singleShape=!0),f.yOffset=1.2*f.s}var n=document.createElement("canvas").getContext("2d"),o={};return o.completeData=a,o}function SVGRenderer(t){this.animationItem=t,this.layers=null,this.lastFrame=-1,this.globalData={frameNum:-1},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.lastFrame=-1,this.globalData={frameNum:-1},this.contextData={saved:new Array(15),savedOp:new Array(15),cArrPos:0,cTr:new Matrix,cO:1};var s,i=15;for(s=0;i>s;s+=1)this.contextData.saved[s]=new Array(6);this.elements=[]}function MaskElement(t,e,s){this.dynamicProperties=[],this.data=t,this.element=e,this.globalData=s,this.paths=[],this.masksProperties=this.data.masksProperties,this.viewData=new Array(this.masksProperties.length),this.maskElement=null,this.firstFrame=!0;var i,a,r,n,o,h=this.element.maskedElement,l=this.globalData.defs,m=this.masksProperties.length,p=this.data.masksProperties,f=0,d=[],c=randomString(10),u="clipPath",v="clip-path";for(i=0;m>i;i++)if(("a"!==p[i].mode&&"n"!==p[i].mode||p[i].inv)&&(u="mask",v="mask"),"s"!=p[i].mode&&"i"!=p[i].mode||0!=f||(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%"),d.push(o)),"n"!=p[i].mode){if(f+=1,a=document.createElementNS(svgNS,"path"),p[i].cl?"s"==p[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"):(a.setAttribute("fill","none"),"s"==p[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"),a.setAttribute("stroke-width","1"),a.setAttribute("stroke-miterlimit","10")),a.setAttribute("clip-rule","nonzero"),"i"==p[i].mode){n=d.length;var y=document.createElementNS(svgNS,"g");for(r=0;n>r;r+=1)y.appendChild(d[r]);var g=document.createElementNS(svgNS,"mask");g.setAttribute("mask-type","alpha"),g.setAttribute("id",c+"_"+f),g.appendChild(a),l.appendChild(g),y.setAttribute("mask","url(#"+c+"_"+f+")"),d.length=0,d.push(y)}else d.push(a);p[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",prop:PropertyFactory.getShapeProp(this.data,p[i],3,this.dynamicProperties)},this.viewData[i].prop.k||this.drawPath(p[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={prop:PropertyFactory.getShapeProp(this.data,p[i],3,this.dynamicProperties)};for(this.maskElement=document.createElementNS(svgNS,u),m=d.length,i=0;m>i;i+=1)this.maskElement.appendChild(d[i]);this.maskElement.setAttribute("id",c),f>0&&h.setAttribute(v,"url(#"+c+")"),l.appendChild(this.maskElement)}function BaseElement(){}function SVGBaseElement(t,e,s,i){this.globalData=s,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,i){}function SVGTextElement(t,e,s,i){this.textSpans=[],this.renderType="svg",this.parent.constructor.call(this,t,e,s,i)}function ICompElement(t,e,s,i){this.parent.constructor.call(this,t,e,s,i),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,s.frameRate,this.dynamicProperties))}function IImageElement(t,e,s,i){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this.parent.constructor.call(this,t,e,s,i)}function IShapeElement(t,e,s,i){this.shapes=[],this.parent.constructor.call(this,t,e,s,i)}function ShapeItemElement(t,e,s,i,a,r){this.shape=e,this.parentContainer=s,this.placeholder=i,this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=r,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,a,[]),styleUnselectableDiv(this.shape)}function ISolidElement(t,e,s,i){this.parent.constructor.call(this,t,e,s,i)}function CVBaseElement(t,e){this.globalData=e,this.data=t,this.canvasContext=e.canvasContext,this.init()}function CVCompElement(t,e){this.parent.constructor.call(this,t,e),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,e.frameRate,this.dynamicProperties))}function CVImageElement(t,e){this.animationItem=e.renderer.animationItem,this.assetData=this.animationItem.getAssetData(t.refId),this.path=this.animationItem.getPath(),this.parent.constructor.call(this,t,e),this.animationItem.pendingElements+=1}function CVMaskElement(t,e,s){this.data=t,this.element=e,this.globalData=s,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.ctx=this.element.canvasContext,this.viewData=new Array(this.masksProperties.length);var i,a=this.masksProperties.length;for(i=0;a>i;i++)this.viewData[i]=PropertyFactory.getShapeProp(this.data,this.masksProperties[i],3,this.dynamicProperties)}function CVShapeElement(t,e){this.shapes=[],this.parent.constructor.call(this,t,e)}function CVShapeItemElement(t,e,s){this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=s,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,e,[])}function CVSolidElement(t,e){this.parent.constructor.call(this,t,e)}function CVTextElement(t,e){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.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.parent.constructor.call(this,t,e),this.renderedLetters=[]}var svgNS="http://www.w3.org/2000/svg";Matrix.prototype={concat:function(t){return this.clone()._t(t.a,t.b,t.c,t.d,t.e,t.f)},flipX:function(){return this._t(-1,0,0,1,0,0)},flipY:function(){return this._t(1,0,0,-1,0,0)},reflectVector:function(t,e){var s=this.applyToPoint(0,1),i=2*(s.x*t+s.y*e);return t-=i*s.x,e-=i*s.y,{x:t,y:e}},reset:function(){return this.setTransform(1,0,0,1,0,0)},rotate:function(t){return 0===t?this:(this.cos=Math.cos(t),this.sin=Math.sin(t),this._t(this.cos,this.sin,-this.sin,this.cos,0,0))},rotateFromVector:function(t,e){return this.rotate(Math.atan2(e,t))},rotateDeg:function(t){return this.rotate(t*Math.PI/180)},scaleU:function(t){return this._t(t,0,0,t,0,0)},scale:function(t,e){return 1==t&&1==e?this:this._t(t,0,0,e,0,0)},scaleX:function(t){return 1==t?this:this._t(t,0,0,1,0,0)},scaleY:function(t){return 1==t?this:this._t(1,0,0,t,0,0)},shear:function(t,e){return this._t(1,e,t,1,0,0)},shearX:function(t){return this._t(1,0,t,1,0,0)},shearY:function(t){return this._t(1,t,0,1,0,0)},skew:function(t,e){return this.shear(Math.tan(t),Math.tan(e))},skewX:function(t){return this.shearX(Math.tan(t))},skewY:function(t){return this.shearY(Math.tan(t))},setTransform:function(t,e,s,i,a,r){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this._x()},translate:function(t,e){return 0===t&&0===e?this:this._t(1,0,0,1,t,e)},translateX:function(t){return this._t(1,0,0,1,t,0)},translateY:function(t){return this._t(1,0,0,1,0,t)},transform:function(t,e,s,i,a,r){return this.a1=this.props[0],this.b1=this.props[1],this.c1=this.props[2],this.d1=this.props[3],this.e1=this.props[4],this.f1=this.props[5],this.props[0]=this.a1*t+this.c1*e,this.props[1]=this.b1*t+this.d1*e,this.props[2]=this.a1*s+this.c1*i,this.props[3]=this.b1*s+this.d1*i,this.props[4]=this.a1*a+this.c1*r+this.e1,this.props[5]=this.b1*a+this.d1*r+this.f1,this},divide:function(t){if(!t.isInvertible())throw"Input matrix is not invertible";var e=t.inverse();return this._t(e.a,e.b,e.c,e.d,e.e,e.f)},divideScalar:function(t){var e=this;return e.a/=t,e.b/=t,e.c/=t,e.d/=t,e.e/=t,e.f/=t,e._x()},inverse:function(){if(this.isIdentity())return new Matrix;if(this.isInvertible()){var t=this,e=t.a,s=t.b,i=t.c,a=t.d,r=t.e,n=t.f,o=new Matrix,h=e*a-s*i;return o.a=a/h,o.b=-s/h,o.c=-i/h,o.d=e/h,o.e=(i*n-a*r)/h,o.f=-(e*n-s*r)/h,o}throw"Matrix is not invertible."},interpolate:function(t,e,s){var i=this,a=new Matrix;return a.a=i.a+(t.a-i.a)*e,a.b=i.b+(t.b-i.b)*e,a.c=i.c+(t.c-i.c)*e,a.d=i.d+(t.d-i.d)*e,a.e=i.e+(t.e-i.e)*e,a.f=i.f+(t.f-i.f)*e,a._x()},interpolateAnim:function(t,e){var s=this,i=new Matrix,a=s.decompose(),r=t.decompose(),n=a.rotation+(r.rotation-a.rotation)*e,o=a.translate.x+(r.translate.x-a.translate.x)*e,h=a.translate.y+(r.translate.y-a.translate.y)*e,l=a.scale.x+(r.scale.x-a.scale.x)*e,m=a.scale.y+(r.scale.y-a.scale.y)*e;return i.translate(o,h),i.rotate(n),i.scale(l,m),i._x()},decompose:function(t){var e=this.props[0],s=this.props[1],i=this.props[2],a=this.props[3],r=Math.acos,n=Math.atan,o=Math.sqrt,h=Math.PI,l={x:this.props[4],y:this.props[5]},m=0,p={x:1,y:1},f={x:0,y:0},d=e*a-s*i;if(t)e?(f={x:n(i/e),y:n(s/e)},p={x:e,y:d/e}):s?(m=.5*h,p={x:s,y:d/s},f.x=n(a/s)):(p={x:i,y:a},f.x=.25*h);else if(e||s){var c=o(e*e+s*s);m=s>0?r(e/c):-r(e/c),p={x:c,y:d/c},f.x=n((e*i+s*a)/(c*c))}else if(i||a){var u=o(i*i+a*a);m=.5*h-(a>0?r(-i/u):-r(i/u)),p={x:d/u,y:u},f.y=n((e*i+s*a)/(u*u))}else p={x:0,y:0};return{scale:p,translate:l,rotation:m,skew:f}},determinant:function(){return this.a*this.d-this.b*this.c},applyToPoint:function(t,e){return{x:t*this.props[0]+e*this.props[2]+this.props[4],y:t*this.props[1]+e*this.props[3]+this.props[5]}},applyToX:function(t,e){return t*this.props[0]+e*this.props[2]+this.props[4]},applyToY:function(t,e){return t*this.props[1]+e*this.props[3]+this.props[5]},applyToPointArray:function(t,e){return[t*this.props[0]+e*this.props[2]+this.props[4],t*this.props[1]+e*this.props[3]+this.props[5]]},applyToPointStringified:function(t,e){return bm_rnd(t*this.props[0]+e*this.props[2]+this.props[4])+","+bm_rnd(t*this.props[1]+e*this.props[3]+this.props[5])},applyToArray:function(t){var e,s,i=0,a=[];if("number"==typeof t[0])for(s=t.length;s>i;)e=this.applyToPoint(t[i++],t[i++]),a.push(e.x,e.y);else for(s=t.length,i=0;s>i;i++)a.push(this.applyToPoint(t[i].x,t[i].y));return a},applyToTypedArray:function(t,e){for(var s,i=0,a=t.length,r=e?new Float64Array(a):new Float32Array(a);a>i;)s=this.applyToPoint(t[i],t[i+1]),r[i++]=s.x,r[i++]=s.y;return r},applyToContext:function(t){var e=this;return e},isIdentity:function(){var t=this;return t._q(t.a,1)&&t._q(t.b,0)&&t._q(t.c,0)&&t._q(t.d,1)&&t._q(t.e,0)&&t._q(t.f,0)},isInvertible:function(){return!this._q(this.determinant(),0)},isValid:function(){return!this._q(this.a*this.d,0)},clone:function(t){var e=this,s=new Matrix;return s.a=e.a,s.b=e.b,s.c=e.c,s.d=e.d,s.e=e.e,s.f=e.f,t||(s.context=e.context),s},isEqual:function(t){var e=this,s=e._q;return s(e.a,t.a)&&s(e.b,t.b)&&s(e.c,t.c)&&s(e.d,t.d)&&s(e.e,t.e)&&s(e.f,t.f)},toArray:function(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5]]},toCSS:function(){return this.cssParts[1]=this.props.join(","),this.cssParts.join("")},toJSON:function(){var t=this;return'{"a":'+t.a+',"b":'+t.b+',"c":'+t.c+',"d":'+t.d+',"e":'+t.e+',"f":'+t.f+"}"},toString:function(){return""+this.toArray()},_q:function(t,e){return Math.abs(t-e)<1e-14},_x:function(){return this}};var 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 i=(new Date).getTime(),a=Math.max(0,16-(i-t)),r=window.setTimeout(function(){e(i+a)},a);return t=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var subframeEnabled=!0,cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_min=Math.min,defaultCurveSegments=2,degToRads=Math.PI/180;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,i){return 0>t&&(t=0),0>e&&(e=0),0>i&&(i=0),"#"+s[t]+s[e]+s[i]}}(),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]]}}(),bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var s=document.createElement("span");s.style.fontFamily=e;var i=document.createElement("span");i.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(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function e(){var t,s,i,a=this.fonts.length,r=a;for(t=0;a>t;t+=1)this.fonts[t].loaded?r-=1:(s=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,s.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(s=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,s.offsetWidth!==i&&(r-=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!==r&&Date.now()-this.initTime<o?setTimeout(e.bind(this),20):this.loaded=!0}function s(){if(window.Typekit&&window.Typekit.load)try{Typekit.load({async:!1})}catch(t){console.log("errwor",t)}else setTimeout(s,50)}function i(i,a){if(!i)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=i.list);if(i.tk){var r=document.createElement("script");r.setAttribute("src",i.tk),a.appendChild(r),s()}var n,o=i.list,h=o.length;for(n=0;h>n;n+=1){if(o[n].loaded=!1,o[n].monoCase=t(o[n].fFamily,"monospace"),o[n].sansCase=t(o[n].fFamily,"sans-serif"),o[n].fPath&&o[n].fPath){var r=document.createElement("style");r.type="text/css",r.innerHTML="@font-face {font-family: "+o[n].fFamily+"; font-style: normal; src: url('"+o[n].fPath+"');}",a.appendChild(r)}this.fonts.push(o[n])}e.bind(this)()}function a(t){this.chars=t}function r(t,e,s){for(var i=0,a=this.chars.length;a>i;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}}function n(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 o=5e3,h=function(){this.fonts=[],this.chars=null,this.loaded=!1,this.initTime=Date.now()};return h.prototype.addChars=a,h.prototype.addFonts=i,h.prototype.getCharData=r,h.prototype.getFontByName=n,h}(),PropertyFactory=function(){function t(t){if(this.mdf=!1,this.lastFrame!==p&&(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,i=0,a=this.keyframes.length-1,r=1,n=!0;!(!n||(e=this.keyframes[i],s=this.keyframes[i+1],i==a-1&&t>=s.t-this.offsetTime)||s.t-this.offsetTime>t);)a-1>i?i+=r:n=!1;var o,h,l,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.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o])}else{e.__fnct?f=e.__fnct:(f=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y,e.n),e.__fnct=f),l=f("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime));var v,y=c.segmentLength*l,g=0;for(r=1,n=!0,m=c.points.length;n;){if(g+=c.points[d].partialLength*r,0===y||0===l||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.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o]);break}if(y>g&&y<g+c.points[d+1].partialLength){for(v=(y-g)/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])*v)*this.mult:c.points[d].point[o]+(c.points[d+1].point[o]-c.points[d].point[o])*v,this.lastValue[o]!==this.v[o]&&(this.mdf=!0,this.lastValue[o]=this.v[o]);break}m-1>d&&1==r||d>0&&-1==r?d+=r:n=!1}}}else{var b,E,C,w,P,S=!1;for(a=e.s.length,i=0;a>i;i+=1)1!==e.h&&(e.o.x instanceof Array?(S=!0,e.__fnct||(e.__fnct=[]),e.__fnct[i]||(b=e.o.x[i]?e.o.x[i]:e.o.x[0],E=e.o.y[i]?e.o.y[i]:e.o.y[0],C=e.i.x[i]?e.i.x[i]:e.i.x[0],w=e.i.y[i]?e.i.y[i]:e.i.y[0])):(S=!1,e.__fnct||(b=e.o.x,E=e.o.y,C=e.i.x,w=e.i.y)),S?e.__fnct[i]?f=e.__fnct[i]:(f=bez.getEasingCurve(b,E,C,w),e.__fnct[i]=f):e.__fnct?f=e.__fnct:(f=bez.getEasingCurve(b,E,C,w),e.__fnct=f),l=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:f("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))),P=1===e.h?e.s[i]:e.s[i]+(e.e[i]-e.s[i])*l,1===a?(this.v=this.mult?P*this.mult:P,this.lastValue!=this.v&&(this.mdf=!0,this.lastValue=this.v)):(this.v[i]=this.mult?P*this.mult:P,this.lastValue[i]!==this.v[i]&&(this.mdf=!0,this.lastValue[i]=this.v[i]))}}this.lastFrame=t}function e(t){if(this.mdf=!1,this.lastFrame!==p&&(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 if(t<this.keyframes[0].t-this.offsetTime)this.mdf=!0,this.v=this.keyframes[0].s[0];else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)this.mdf=!0,this.v=1===this.keyframes[this.keyframes.length-2].h?this.keyframes[this.keyframes.length-2].s[0]:this.keyframes[this.keyframes.length-2].e[0];else{this.mdf=!0;for(var e,s,i,a,r,n,o=0,h=this.keyframes.length-1,l=1,m=!0;m&&(e=this.keyframes[o],s=this.keyframes[o+1],!(s.t-this.offsetTime>t&&1==l));)h-1>o&&1==l||o>0&&-1==l?o+=l:m=!1;var f;if(1!==e.h){var d;e.__fnct?d=e.__fnct:(d=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y),e.__fnct=d),f=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:d("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))}for(a=this.shapeData.i.length,n=e.s[0].i[0].length,i=0;a>i;i+=1)for(r=0;n>r;r+=1)1===e.h?(this.shapeData.i[i][r]=e.s[0].i[i][r],this.shapeData.o[i][r]=e.s[0].o[i][r],this.shapeData.v[i][r]=e.s[0].v[i][r]):(this.shapeData.i[i][r]=e.s[0].i[i][r]+(e.e[0].i[i][r]-e.s[0].i[i][r])*f,this.shapeData.o[i][r]=e.s[0].o[i][r]+(e.e[0].o[i][r]-e.s[0].o[i][r])*f,this.shapeData.v[i][r]=e.s[0].v[i][r]+(e.e[0].v[i][r]-e.s[0].v[i][r])*f);this.v=this.shapeData}this.lastFrame=t}function s(t,e){e=e?e:1,this.v=t*e,this.mdf=!1,this.k=!1}function i(t,e){if(e){var s,i=t.length;for(s=0;i>s;s+=1)t[s]*=e}this.v=t,this.mdf=!1,this.k=!1}function a(e,s,i){this.keyframes=s,this.offsetTime=e.st,this.lastValue=-99999,this.k=!0,this.mult=i,this.lastFrame=p,this.getInterpolatedValue=t}function r(e,s,i){this.keyframes=s,this.offsetTime=e.st,this.k=!0,this.mult=i,this.getInterpolatedValue=t,this.v=new Array(s[0].s.length),this.lastValue=new Array(s[0].s.length),this.lastFrame=p}function n(t,e,n,o,h){if(2===n)return new f(t,e,h);if(7===n)return new u(t,e,h);if(e.length){if("number"==typeof e[0])return new i(e,o);switch(n){case 0:h.push(new a(t,e,o));break;case 1:h.push(new r(t,e,o))}return h[h.length-1]}return new s(e,o)}function o(t,e){this.k=!1,this.mdf=!1,this.closed=3===e?t.cl:t.closed,this.shapeData=t.ks,this.v=3===e?t.pt:t.ks}function h(t,s,i,a){this.offsetTime=t.st,this.getInterpolatedValue=e,this.keyframes=3===a?s.pt:s.ks,this.k=!0,this.closed=3===a?s.cl:s.closed;var r,n=this.keyframes[0].s[0].i.length,o=this.keyframes[0].s[0].i[0].length;for(this.shapeData={i:new Array(n),o:new Array(n),v:new Array(n)},r=0;n>r;r+=1)this.shapeData.i[r]=new Array(o),this.shapeData.o[r]=new Array(o),this.shapeData.v[r]=new Array(o);this.lastFrame=p,i.push(this)}function l(t,e,s,i,a){var r;if(3===s||4===s){var n=3===s?e.pt:e.ks;r=n.length?new h(t,e,i,s):new o(e,s,i)}else 5===s?r=new c(t,e,i):6===s&&(r=new d(t,e,i));var l=!1;if(a)for(var m=0,p=a.length;p>m;){if(!a[m].closed){l=!0;break}m+=1}return l?new v(r,a,i):r}function m(t,e,s){return new y(t,e,s)}var p=-999999,f=function(){function t(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.v.reset().translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1])}return function(e,n,o){this.dynamicProperties=[],this.mdf=!1,this.getInterpolatedValue=t,"number"==typeof n.a[0]?this.a=new i(n.a):(this.a=new r(e,n.a,0),this.dynamicProperties.push(this.a)),"number"==typeof n.p[0]?this.p=new i(n.p):(this.p=new r(e,n.p,0),this.dynamicProperties.push(this.p)),"number"==typeof n.s[0]?this.s=new i(n.s,.01):(this.s=new r(e,n.s,.01),this.dynamicProperties.push(this.s)),n.r.length?(this.r=new a(e,n.r,degToRads),this.dynamicProperties.push(this.r)):this.r=new s(n.r,degToRads),this.dynamicProperties.length?(o.push(this),this.v=new Matrix):this.v=(new Matrix).translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1])}}(),d=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-a],this.v.i[0]=[t-i*s,e-a],this.v.o[0]=[t+i*s,e-a],this.v.v[1]=[t+i,e],this.v.i[1]=[t+i,e-a*s],this.v.o[1]=[t+i,e+a*s],this.v.v[2]=[t,e+a],this.v.i[2]=[t+i*s,e+a],this.v.o[2]=[t-i*s,e+a],this.v.v[3]=[t-i,e],this.v.i[3]=[t-i,e+a*s],this.v.o[3]=[t-i,e-a*s]):(this.v.v[0]=[t,e-a],this.v.o[0]=[t-i*s,e-a],this.v.i[0]=[t+i*s,e-a],this.v.v[1]=[t-i,e],this.v.o[1]=[t-i,e+a*s],this.v.i[1]=[t-i,e-a*s],this.v.v[2]=[t,e+a],this.v.o[2]=[t+i*s,e+a],this.v.i[2]=[t-i*s,e+a],this.v.v[3]=[t+i,e],this.v.o[3]=[t+i,e-a*s],this.v.i[3]=[t+i,e+a*s])}function e(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.convertEllToPath()}var s=.5519;return function(s,a,n){this.v={v:new Array(4),i:new Array(4),o:new Array(4),c:!0},this.d=a.d,this.dynamicProperties=[],a.closed=!0,this.closed=!0,this.mdf=!1,this.getInterpolatedValue=e,this.convertEllToPath=t,
+"number"==typeof a.p[0]?this.p=new i(a.p):(this.p=new r(s,a.p,0),this.dynamicProperties.push(this.p)),"number"==typeof a.s[0]?this.s=new i(a.s):(this.s=new r(s,a.s,0),this.dynamicProperties.push(this.s)),this.dynamicProperties.length?n.push(this):this.convertEllToPath()}}(),c=function(){function t(t){var e,s=this.dynamicProperties.length;for(this.mdf=!1,e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(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,i=this.s.v[1]/2,a=bm_min(s,i,this.r.v),r=a*(1-.5519);2===this.d||1===this.d?(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+s,e-i+r],this.v.v[1]=[t+s,e+i-a],this.v.o[1]=[t+s,e+i-r],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+s-a,e+i],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+s-r,e+i],this.v.v[3]=[t-s+a,e+i],this.v.o[3]=[t-s+r,e+i],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-s,e+i-r],this.v.v[5]=[t-s,e-i+a],this.v.o[5]=[t-s,e-i+r],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-s+a,e-i],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-s+r,e-i],this.v.v[7]=[t+s-a,e-i],this.v.o[7]=[t+s-r,e-i],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=[t+s,e-i+r],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+s-a,e-i],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+s-r,e-i],this.v.v[2]=[t-s+a,e-i],this.v.o[2]=[t-s+r,e-i],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-s,e-i+a],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-s,e-i+r],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=[t-s,e+i-r],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-s+a,e+i],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-s+r,e+i],this.v.v[6]=[t+s-a,e+i],this.v.o[6]=[t+s-r,e+i],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+s,e+i-a],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+s,e+i-r])}return function(n,o,h){this.v={v:new Array(8),i:new Array(8),o:new Array(8),c:!0},this.d=o.d,this.dynamicProperties=[],this.mdf=!1,o.closed=!0,this.closed=!0,this.getInterpolatedValue=t,this.convertRectToPath=e,"number"==typeof o.p[0]?this.p=new i(o.p):(this.p=new r(n,o.p,0),this.dynamicProperties.push(this.p)),"number"==typeof o.s[0]?this.s=new i(o.s):(this.s=new r(n,o.s,0),this.dynamicProperties.push(this.s)),o.r.length?(this.r=new a(n,o.r,0),this.dynamicProperties.push(this.r)):this.r=new s(o.r,degToRads),this.dynamicProperties.length?h.push(this):this.convertRectToPath()}}(),u=function(){function t(t,e){var s,i=this.dynamicProperties.length;for(this.mdf=!1,s=0;i>s;s+=1)this.dynamicProperties[s].getInterpolatedValue(t),this.dynamicProperties[s].mdf&&(this.mdf=!0);if(this.mdf||e){var a=this.o.v%360/360;if(0===a&&0===this.s.v&&1==this.e.v)return void(this.isTrimming=!1);this.isTrimming=!0,0>a&&(a+=1);var r=this.s.v+a,n=this.e.v+a;if(r>n){var o=r;r=n,n=o}this.sValue=r,this.eValue=n,this.oValue=a}}return function(e,i,r){this.dynamicProperties=[],this.sValue=0,this.eValue=0,this.oValue=0,this.mdf=!1,this.getInterpolatedValue=t,this.k=!1,this.isTrimming=!1,i.s.length?(this.s=new a(e,i.s,.01),this.dynamicProperties.push(this.s)):this.s=new s(i.s,.01),i.e.length?(this.e=new a(e,i.e,.01),this.dynamicProperties.push(this.e)):this.e=new s(i.e,.01),i.o.length?(this.o=new a(e,i.o,0),this.dynamicProperties.push(this.o)):this.o=new s(i.o,0),this.dynamicProperties.length?(r.push(this),this.k=!0):this.getInterpolatedValue(0,!0)}}(),v=function(){function t(t,e){this.totalLength=0;var s,i=t.v,a=t.o,r=t.i,n=i.length;for(s=0;n-1>s;s+=1)this.lengths[s]=bez.getBezierLength(i[s],i[s+1],a[s],r[s+1]),this.totalLength+=this.lengths[s].addedLength;e&&(this.lengths[s]=bez.getBezierLength(i[s],i[0],a[s],r[0]),this.totalLength+=this.lengths[s].addedLength)}function e(t,e,s,i,a){this.nextO[this.segmentCount]=e,this.nextI[this.segmentCount+1]=s,this.nextV[this.segmentCount+1]=i,this.pathStarted?this.nextV[this.segmentCount]=t:(this.pathStarted=!0,this.v.s[this.segmentCount]=t),this.segmentCount+=1}function s(t,e){this.mdf=e?!0:!1;var s=0,i=this.trims.length;for(this.pathStarted=!1;i>s;){if(this.trims[s].mdf){this.mdf=!0;break}s+=1}if(this.mdf=this.prop.mdf?!0:this.mdf,this.mdf){this.nextO.length=0,this.nextI.length=0,this.nextV.length=0,this.v.s.length=0;var a=this.prop.closed;this.getSegmentsLength(this.prop.v,a);var r,n,o,h,l,m,p=this.prop.v,f=this.trims.length;for(r=0;f>r;r+=1)if(this.trims[r].isTrimming){if(n=this.trims[r].eValue,o=this.trims[r].sValue,h=this.trims[r].oValue,n===o)return this.v.v=this.nextV,this.v.o=this.nextO,void(this.v.i=this.nextI);1>=n?(this.segments[0].s=this.totalLength*o,this.segments[0].e=this.totalLength*n,this.segments[1].vl=!1):o>=1?(this.segments[0].s=this.totalLength*(o-1),this.segments[0].e=this.totalLength*(n-1),this.segments[1].vl=!1):(this.segments[0].s=this.totalLength*o,this.segments[0].e=this.totalLength,this.segments[1].s=0,this.segments[1].e=this.totalLength*(n-1),this.segments[1].vl=!0),this.v.v=p.v,this.v.o=p.o,this.v.i=p.i,m=this.v.v.length;var d=0,c=0;i=this.segments[1].vl?2:1;var u;for(this.segmentCount=0,s=0;i>s;s+=1){for(d=0,l=1;m>l;l++)if(c=this.lengths[l-1].addedLength,d+c<this.segments[s].s)d+=c;else{if(d>this.segments[s].e)break;this.segments[s].s<=d&&this.segments[s].e>=d+c?this.addSegment(this.v.v[l-1],this.v.o[l-1],this.v.i[l],this.v.v[l],this.lengths[l-1]):(u=bez.getNewSegment(this.v.v[l-1],this.v.v[l],this.v.o[l-1],this.v.i[l],(this.segments[s].s-d)/c,(this.segments[s].e-d)/c,this.lengths[l-1]),this.addSegment(u.pt1,u.pt3,u.pt4,u.pt2)),d+=c}a!==!1?d<=this.segments[s].e&&(c=this.lengths[l-1].addedLength,this.segments[s].s<=d&&this.segments[s].e>=d+c?this.addSegment(this.v.v[l-1],this.v.o[l-1],this.v.i[0],this.v.v[0],this.lengths[l-1]):(u=bez.getNewSegment(this.v.v[l-1],this.v.v[0],this.v.o[l-1],this.v.i[0],(this.segments[s].s-d)/c,(this.segments[s].e-d)/c,this.lengths[l-1]),this.addSegment(u.pt1,u.pt3,u.pt4,u.pt2))):this.pathStarted=!1}a=!1}else this.v.v=p.v,this.v.o=p.o,this.v.i=p.i;this.nextV.length?(this.v.v=this.nextV,this.v.o=this.nextO,this.v.i=this.nextI):this.v.s.length=0,this.v.c=a}}return function(i,a,r){this.trims=[],this.k=!1,this.mdf=!1,this.pathStarted=!1,this.segments=[{s:0,e:0,vl:!0},{s:0,e:0,vl:!1}],this.nextO=[],this.nextV=[],this.nextI=[],this.v={i:null,o:null,v:null,s:[],c:!1};var n,o=a.length;for(n=0;o>n;n+=1)a[n].closed||(this.k=a[n].trimProp.k?!0:this.k,this.trims.push(a[n].trimProp));this.prop=i,o=this.prop.shapeData.v.length-1,o+=this.prop.closed?1:0,this.lengths=new Array(o),this.k=i.k?!0:this.k,this.totalLength=0,this.getInterpolatedValue=s,this.addSegment=e,this.getSegmentsLength=t,this.k?r.push(this):this.getInterpolatedValue(0,!0)}}(),y=function(){function t(t,e){var s=0,i=this.dataProps.length;for(this.mdf=e?!0:!1;i>s;){if(this.dataProps[s].p.mdf){this.mdf=!0;break}s+=1}if(this.mdf)for("svg"===this.renderer&&(this.dasharray=""),s=0;i>s;s+=1)"o"!=this.dataProps[s].n?"svg"===this.renderer?this.dasharray+=" "+this.dataProps[s].p.v:this.dasharray[s]=this.dataProps[s].p.v:this.dashoffset=this.dataProps[s].p.v}return function(e,s,i,a){this.dataProps=new Array(s.length),this.renderer=i,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(s.length-1),this.dashoffset=0;var r,o,h=s.length;for(r=0;h>r;r+=1)o=n(e,s[r].v,0,0,a),this.k=o.k?!0:this.k,this.dataProps[r]={n:s[r].n,p:o};this.getInterpolatedValue=t,this.k?a.push(this):this.getInterpolatedValue(0,!0)}}(),g={};return g.getProp=n,g.getShapeProp=l,g.getDashProp=m,g}();SVGRenderer.prototype.createItem=function(t,e,s){switch(t.ty){case 2:return this.createImage(t,e,s);case 0:return this.createComp(t,e,s);case 1:return this.createSolid(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)}return this.createBase(t,e)},SVGRenderer.prototype.buildItems=function(t,e,s,i){var a,r=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var n;for(a=r-1;a>=0;a--)s[a]=this.createItem(t[a],e,i),0===t[a].ty&&(n=[],this.buildItems(t[a].layers,s[a].getDomElement(),n,i),s[a].setElements(n)),t[a].td&&s[a+1].setMatte(s[a].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)if(t[i].id)for(r=0;h>r;){if(s[r].data.id==t[i].id){o=s[r],s[r]=this.createItem(t[i],e,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,o),s[r].setElements(n));break}r+=1}else{var l=this.createItem(t[i],e);s.push(l),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,l.getDomElement(),n),l.setElements(n))}},SVGRenderer.prototype.createBase=function(t,e,s){return new SVGBaseElement(t,e,this.globalData,s)},SVGRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,s){return new IShapeElement(t,e,this.globalData,s)},SVGRenderer.prototype.createText=function(t,e,s){return new SVGTextElement(t,e,this.globalData,s)},SVGRenderer.prototype.createImage=function(t,e,s){return new IImageElement(t,e,this.globalData,s)},SVGRenderer.prototype.createComp=function(t,e,s){return new ICompElement(t,e,this.globalData,s)},SVGRenderer.prototype.createSolid=function(t,e,s){return new ISolidElement(t,e,this.globalData,s)},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","xMidYMid meet"),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.compSize={w:t.w,h:t.h},this.globalData.frameRate=t.fr;var s=document.createElementNS(svgNS,"clipPath"),i=document.createElementNS(svgNS,"rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+randomString(10);s.setAttribute("id",a),s.appendChild(i);var r=document.createElementNS(svgNS,"g");r.setAttribute("clip-path","url(#"+a+")"),this.animationItem.container.appendChild(r),e.appendChild(s),this.animationItem.container=r,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 i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;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.lastFrame!=t&&!this.destroyed){null===t?t=this.lastFrame:this.lastFrame=t,this.globalData.frameNum=t;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()}},CanvasRenderer.prototype.createItem=function(t){switch(t.ty){case 0:return this.createComp(t);case 1:return this.createSolid(t);case 2:return this.createImage(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 99:return this.createPlaceHolder(t);default:return this.createBase(t)}return this.createBase(t,parentContainer)},CanvasRenderer.prototype.buildItems=function(t,e){e||(e=this.elements);var s,i=t.length;for(s=0;i>s;s++)if(e[s]=this.createItem(t[s]),0===t[s].ty){var a=[];this.buildItems(t[s].layers,a),e[e.length-1].setElements(a)}},CanvasRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements);var r,n,o=s.length;for(i=0;a>i;i+=1)if(t[i].id)for(r=0;o>r;){if(s[r].data.id==t[i].id){s[r]=this.createItem(t[i],e),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,n),s[r].setElements(n));break}r+=1}else{var h=this.createItem(t[i],e);s.unshift(h),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,n),h.setElements(n))}},CanvasRenderer.prototype.createBase=function(t){return new CVBaseElement(t,this.globalData)},CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData)},CanvasRenderer.prototype.createPlaceHolder=function(t){return new PlaceHolderElement(t,null,this.globalData)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[2]||1!==t[3]||0!==t[4]||0!==t[5]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[2],t[3],t[4],t[5]);this.contextData.cTr.transform(t[0],t[1],t[2],t[3],t[4],t[5]);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])}},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(6));var s,i=6,a=this.contextData.saved[this.contextData.cArrPos];for(s=0;i>s;s+=1)a[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],i=6,a=this.contextData.cTr.props;for(e=0;i>e;e+=1)a[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),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.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.updateContainerSize(),this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document)},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,i=this.transformCanvas.w/this.transformCanvas.h;i>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,this.transformCanvas.sy,this.transformCanvas.tx,this.transformCanvas.ty],this.globalData.cWidth=t,this.globalData.cHeight=e},CanvasRenderer.prototype.buildStage=function(t,e,s){s||(s=this.elements);var i,a,r=e.length;for(i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemHierarchy(a,s[i],e,a.parent,s,!0),0==a.ty&&this.buildStage(null,a.layers,s[i].getElements())},CanvasRenderer.prototype.buildItemHierarchy=function(t,e,s,i,a,r){var n=0,o=s.length;for(r&&e.resetHierarchy();o>n;)s[n].ind===i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemHierarchy(t,e,s,s[n].parent,a,!1)),n+=1},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers.length;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.lastFrame==t&&this.renderConfig.clearCanvas===!0||this.destroyed)){this.lastFrame=t,this.globalData.frameNum=t-this.animationItem.firstFrame,this.renderConfig.clearCanvas===!0?(this.reset(),this.canvasContext.canvas.width=this.canvasContext.canvas.width):this.save(),this.ctxTransform(this.transformCanvas.props),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),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()}},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)},MaskElement.prototype.renderFrame=function(){var t,e=this.data.masksProperties.length;for(t=0;e>t;t++)"n"!==this.data.masksProperties[t].mode&&(this.viewData[t].prop.mdf||this.firstFrame)&&this.drawPath(this.data.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]);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 i,a,r="";for(a=e.v.length,i=1;a>i;i+=1)1==i&&(r+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-1][1])+" "+bm_rnd(e.i[i][0])+","+bm_rnd(e.i[i][1])+" "+bm_rnd(e.v[i][0])+","+bm_rnd(e.v[i][1]);t.cl&&(r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-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!==r&&(t.inv?s.elem.setAttribute("d",this.solidPath+r):s.elem.setAttribute("d",r),s.lastPath=r)},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.paths=null,this.masksProperties=null},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.isVisible=!1);var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t);this.data.hasMask&&this.maskManager.prepareFrame(t),this.currentFrameNum=t},BaseElement.prototype.init=function(){this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.dynamicProperties=[],this.currentFrameNum=-99999,this.lastNum=-99999,this.finalTransform={op:PropertyFactory.getProp(this.data,this.data.ks.o,0,.01,this.dynamicProperties),mProp:PropertyFactory.getProp(this.data,this.data.ks,2,null,this.dynamicProperties),matMdf:!1,opMdf:!1,mat:new Matrix,opacity:1},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.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"),i=randomString(10);s.setAttribute("id",i),s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%");var a=document.createElementNS(svgNS,"feComponentTransfer");a.setAttribute("in","SourceGraphic"),s.appendChild(a);var r=document.createElementNS(svgNS,"feFuncA");r.setAttribute("type","table"),r.setAttribute("tableValues","1.0 0.0"),a.appendChild(r),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(#"+i+")"),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},SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.data.hasMask&&(this.finalTransform.matMdf&&this.layerElement.setAttribute("transform","matrix("+s.props.join(",")+")"),this.finalTransform.opMdf&&this.layerElement.setAttribute("opacity",this.finalTransform.opacity)),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getDomElement=function(){return this.layerElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")},SVGBaseElement.prototype.hide=function(){},ITextElement.prototype.init=function(){this.parent.init.call(this);var t=this.data;this.renderedLetters=[],this.viewData={m:{a:PropertyFactory.getProp(t,t.t.m.a,1,0,this.dynamicProperties)}};var e=this.data.t;if(e.a.length){this.viewData.a=new Array(e.a.length);var s,i,a,r=e.a.length;for(s=0;r>s;s+=1)a=e.a[s],i={a:{},s:{}},"r"in a.a&&(i.a.r=PropertyFactory.getProp(t,a.a.r,0,degToRads,this.dynamicProperties)),"s"in a.a&&(i.a.s=PropertyFactory.getProp(t,a.a.s,1,.01,this.dynamicProperties)),"a"in a.a&&(i.a.a=PropertyFactory.getProp(t,a.a.a,1,0,this.dynamicProperties)),"o"in a.a&&(i.a.o=PropertyFactory.getProp(t,a.a.o,0,.01,this.dynamicProperties)),"p"in a.a&&(i.a.p=PropertyFactory.getProp(t,a.a.p,1,0,this.dynamicProperties)),"sw"in a.a&&(i.a.sw=PropertyFactory.getProp(t,a.a.sw,0,0,this.dynamicProperties)),"sc"in a.a&&(i.a.sc=PropertyFactory.getProp(t,a.a.sc,1,0,this.dynamicProperties)),"fc"in a.a&&(i.a.fc=PropertyFactory.getProp(t,a.a.fc,1,0,this.dynamicProperties)),"t"in a.a&&(i.a.t=PropertyFactory.getProp(t,a.a.t,0,0,this.dynamicProperties)),i.s.s="s"in a.s?PropertyFactory.getProp(t,a.s.s,0,0,this.dynamicProperties):{v:0},"e"in a.s&&(i.s.e=PropertyFactory.getProp(t,a.s.e,0,0,this.dynamicProperties)),i.s.o="o"in a.s?PropertyFactory.getProp(t,a.s.o,0,0,this.dynamicProperties):{v:0},i.s.xe="xe"in a.s?PropertyFactory.getProp(t,a.s.xe,0,0,this.dynamicProperties):{v:0},i.s.ne="ne"in a.s?PropertyFactory.getProp(t,a.s.ne,0,0,this.dynamicProperties):{v:0},this.viewData.a[s]=i}else this.viewData.a=[];e.p&&"m"in e.p&&(this.viewData.p={f:PropertyFactory.getProp(t,e.p.f,0,0,this.dynamicProperties),l:PropertyFactory.getProp(t,e.p.l,0,0,this.dynamicProperties),m:this.maskManager.getMaskProperty(e.p.m)})},ITextElement.prototype.getMeasures=function(){var t,e,s,i,a=this.mHelper,r=this.renderType,n=this.data,o=n.t.d,h=o.l;if("m"in n.t.p){var l=this.viewData.p.m;if(!this.viewData.p.n||this.viewData.p.mdf){var m=l.v,p={tLength:0,segments:[]};i=m.v.length-1;var f;for(s=0;i>s;s+=1)f={s:m.v[s],e:m.v[s+1],to:[m.o[s][0]-m.v[s][0],m.o[s][1]-m.v[s][1]],ti:[m.i[s+1][0]-m.v[s+1][0],m.i[s+1][1]-m.v[s+1][1]]},bez.buildBezierData(f),p.tLength+=f.bezierData.segmentLength,p.segments.push(f);s=i,l.closed&&(f={s:m.v[s],e:m.v[0],to:[m.o[s][0]-m.v[s][0],m.o[s][1]-m.v[s][1]],ti:[m.i[0][0]-m.v[0][0],m.i[0][1]-m.v[0][1]]},bez.buildBezierData(f),p.tLength+=f.bezierData.segmentLength,p.segments.push(f)),this.viewData.p.pi=p}var d,c,u,p=this.viewData.p.pi,v=this.viewData.p.f.v,y=0,g=1,b=0,E=!0,C=p.segments;if(0>v&&l.closed)for(p.tLength<Math.abs(v)&&(v=-Math.abs(v)%p.tLength),y=C.length-1,u=C[y].bezierData.points,g=u.length-1;0>v;)v+=u[g].partialLength,g-=1,0>g&&(y-=1,u=C[y].bezierData.points,g=u.length-1);u=C[y].bezierData.points,c=u[g-1],d=u[g];var w,P,S=d.partialLength}i=h.length,t=0,e=0;var x,D,I,T,F=1.2*n.t.d.s*.714,M=!0,A=this.viewData,k=new Array(i),V=!1;I=A.a.length;var _,N,L,R=[],B=n._letters;for(D=0;I>D;D+=1){_=n.t.a[D].totalChars,N=2===n.t.a[D].s.r?1:100/_,"e"in A.a[D].s||(A.a[D].s.e={v:2===n.t.a[D].s.r?_:100});var z=A.a[D].s.o.v/N;0===z&&0===A.a[D].s.s.v&&A.a[D].s.e.v===N;var O=A.a[D].s.s.v/N+z,j=A.a[D].s.e.v/N+z;if(O>j){var G=O;O=j,j=G}R.push({s:O,e:j,ne:A.a[D].s.ne.v,xe:A.a[D].s.xe.v})}var H,W,q,X,Y,J,U,$,Q,K,Z,tt,et,st,it,at=-1,rt=v,nt=y,ot=g,ht=0;for(s=0;i>s;s+=1){switch(a.reset(),o.j){case 1:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line]),0);break;case 2:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line])/2,0)}if(Y=1,h[s].n)t=0,e+=o.yOffset,e+=M?1:0,v=rt,M=!1,ht=0,"m"in n.t.p&&(y=nt,g=ot,u=C[y].bezierData.points,c=u[g-1],d=u[g],S=d.partialLength,b=0),k[s]=this.emptyProp;else{if("m"in n.t.p){at!==h[s].ind&&(h[at]&&(v+=h[at].extra),v+=h[s].an/2,at=h[s].ind),v+=A.m.a.v[0]*h[s].an/200;var lt=0;for(D=0;I>D;D+=1)x=A.a[D].a,"p"in x&&"s"in R[D]&&(H=this.getMult(h[s].anIndexes[D],R[D].s,R[D].e,R[D].ne,R[D].xe,n.t.a[D].s.sh),lt+=x.p.v[0]*H);for(E=!0;E;)if(b+S>=v+lt||!u){if(w=(v+lt-b)/d.partialLength,q=c.point[0]+(d.point[0]-c.point[0])*w,X=c.point[1]+(d.point[1]-c.point[1])*w,a.translate(q,X),n.t.p.p){P=(d.point[1]-c.point[1])/(d.point[0]-c.point[0]);var mt=180*Math.atan(P)/Math.PI;d.point[0]<c.point[0]&&(mt+=180),a.rotate(mt*Math.PI/180)}a.translate(0,A.m.a.v[1]*F/100+e),E=!1}else u&&(b+=d.partialLength,g+=1,g>=u.length&&(g=0,y+=1,C[y]?u=C[y].bezierData.points:l.closed?(g=0,y=0,u=C[y].bezierData.points):u=null),u&&(c=d,d=u[g],S=d.partialLength));
+
+W=h[s].an/2-h[s].add}else a.translate(t,e),W=h[s].an/2-h[s].add,a.translate(W,0),a.translate(A.m.a.v[0]*h[s].an/200,A.m.a.v[1]*F/100);for(ht+=h[s].l/2,D=0;I>D;D+=1)x=A.a[D].a,"t"in x&&"s"in R[D]&&(H=this.getMult(h[s].anIndexes[D],R[D].s,R[D].e,R[D].ne,R[D].xe,n.t.a[D].s.sh),"m"in n.t.p?v+=x.t*H:t+=x.t.v*H);for(ht+=h[s].l/2,D=0;I>D;D+=1)x=A.a[D].a,"p"in x&&"s"in R[D]&&(H=this.getMult(h[s].anIndexes[D],R[D].s,R[D].e,R[D].ne,R[D].xe,n.t.a[D].s.sh),"m"in n.t.p?a.translate(0,x.p.v[1]*H):a.translate(x.p.v[0]*H,x.p.v[1]*H));for(o.strokeWidthAnim&&(U=n.t.d.sw||0),o.strokeColorAnim&&(J=n.t.d.sc?[n.t.d.sc[0],n.t.d.sc[1],n.t.d.sc[2]]:[0,0,0]),o.fillColorAnim&&($=[n.t.d.fc[0],n.t.d.fc[1],n.t.d.fc[2]]),D=0;I>D;D+=1){if(x=A.a[D].a,H=this.getMult(h[s].anIndexes[D],R[D].s,R[D].e,R[D].ne,R[D].xe,n.t.a[D].s.sh),"r"in x&&"s"in R[D]&&a.rotate(x.r.v*H),"o"in x&&"s"in R[D]&&(Y+=(x.o.v*H-Y)*H),o.strokeWidthAnim&&"sw"in x&&"s"in R[D]&&(U+=x.sw.v*H),o.strokeColorAnim&&"sc"in x&&"s"in R[D])for(Q=0;3>Q;Q+=1)J[Q]=Math.round(J[Q]+(x.sc.v[Q]-J[Q])*H);if(o.fillColorAnim&&"fc"in x&&"s"in R[D])for(Q=0;3>Q;Q+=1)$[Q]=Math.round($[Q]+(x.fc.v[Q]-$[Q])*H)}for(o.strokeWidthAnim&&(K=0>U?0:U),o.strokeColorAnim&&(Z="rgb("+J[0]+","+J[1]+","+J[2]+")"),o.fillColorAnim&&(tt="rgb("+$[0]+","+$[1]+","+$[2]+")"),D=0;I>D;D+=1)x=A.a[D].a,"s"in x&&"s"in R[D]&&(H=this.getMult(h[s].anIndexes[D],R[D].s,R[D].e,R[D].ne,R[D].xe,n.t.a[D].s.sh),a.scale(1+(x.s.v[0]-1)*H,1+(x.s.v[1]-1)*H));for(D=0;I>D;D+=1)x=A.a[D].a,"a"in x&&"s"in R[D]&&(H=this.getMult(h[s].anIndexes[D],R[D].s,R[D].e,R[D].ne,R[D].xe,n.t.a[D].s.sh),a.translate(-x.a.v[0]*H,-x.a.v[1]*H));"m"in n.t.p?(a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*F/100),v-=A.m.a.v[0]*h[s].an/200,h[s+1]&&at!==h[s+1].ind&&(v+=h[s].an/2,v+=o.tr/1e3*n.t.d.s),a.translate(-W,0)):(a.translate(-W,0),a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*F/100),t+=h[s].l+o.tr/1e3*n.t.d.s),"svg"===r?et=a.toCSS():st=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]],it=Y,B?(L=B[s],L.o!==it||L.sw!==K||L.sc!==Z||L.fc!==tt?(V=!0,T=new LetterProps(it,K,Z,tt,et,st)):"svg"===r&&L.m!==et?(V=!0,T=new LetterProps(it,K,Z,tt,et)):"svg"===r||L.props[1]===a.props[1]&&L.props[2]===a.props[2]&&L.props[3]===a.props[3]&&L.props[4]===a.props[4]&&L.props[5]===a.props[5]?T=L:(V=!0,T=new LetterProps(it,K,Z,tt,null,[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]]))):(V=!0,T=new LetterProps(it,K,Z,tt,et,st)),k[s]=T}}V&&(this.renderedLetters=k)},ITextElement.prototype.getMult=function(t,e,s,i,a,r){var n=bez.getEasingCurve(i/100,0,1-a/100,1),o=0;return 2==r?(o=s===e?t>=s?1:0:Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),o=n("",o,0,1,1)):3==r?(o=s===e?t>=s?0:1:1-Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),o=n("",o,0,1,1)):4==r?s===e?o=t>=s?0:1:(o=Math.max(0,Math.min(.5/(s-e)+(t-e)/(s-e),1)),.5>o?o*=2:o=1-o):t>=Math.floor(e)&&(o=0>t-e?1-(e-t):Math.max(0,Math.min(s-t,1))),o},ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,SVGTextElement.prototype.getMult=ITextElement.prototype.getMult,SVGTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d;this.innerElem=document.createElementNS(svgNS,"g"),t.fc?this.innerElem.setAttribute("fill","rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.innerElem.setAttribute("fill","rgba(0,0,0,0)"),t.sc&&(this.innerElem.setAttribute("stroke","rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")"),this.innerElem.setAttribute("stroke-width",t.sw)),this.innerElem.setAttribute("font-size",t.s);var e=this.globalData.fontManager.getFontByName(t.f);this.innerElem.setAttribute("font-family",e.fFamily);var s,i,a=t.fWeight,r=t.fStyle;this.innerElem.setAttribute("font-style",r),this.innerElem.setAttribute("font-weight",a),this.layerElement.appendChild(this.innerElem);var n=t.l;i=n.length;var o,h,l,m,p,f,d,c=this.mHelper,u="",v=this.data.singleShape;if(this.globalData.fontManager.chars&&v)var y=0,g=0,b=t.lineWidths,E=t.boxWidth,C=!0;for(s=0;i>s;s+=1){if(this.globalData.fontManager.chars?v&&0!==s||(o=document.createElementNS(svgNS,"path")):o=document.createElementNS(svgNS,"text"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var w=this.globalData.fontManager.getCharData(t.t.charAt(s),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),P=w.data;if(c.reset(),v&&n[s].n&&(y=0,g+=t.yOffset,g+=C?1:0,C=!1),P){if(h=P.shapes[0].it,v){switch(t.j){case 1:c.translate(t.justifyOffset+(E-b[n[s].line]),0);break;case 2:c.translate(t.justifyOffset+(E-b[n[s].line])/2,0)}c.translate(y,g)}else u="";for(m=h.length,c.scale(t.s/100,t.s/100),l=0;m>l;l+=1){for(f=h[l].ks.i.length,d=h[l].ks,p=1;f>p;p+=1)1==p&&(u+=" M"+c.applyToPointStringified(d.v[0][0],d.v[0][1])),u+=" C"+c.applyToPointStringified(d.o[p-1][0],d.o[p-1][1])+" "+c.applyToPointStringified(d.i[p][0],d.i[p][1])+" "+c.applyToPointStringified(d.v[p][0],d.v[p][1]);u+=" C"+c.applyToPointStringified(d.o[p-1][0],d.o[p-1][1])+" "+c.applyToPointStringified(d.i[0][0],d.i[0][1])+" "+c.applyToPointStringified(d.v[0][0],d.v[0][1]),u+="z"}v||o.setAttribute("d",u)}v?y+=n[s].l:this.innerElem.appendChild(o)}else o.textContent=n[s].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(o);this.textSpans.push(o)}v&&(o.setAttribute("d",u),this.innerElem.appendChild(o))},SVGTextElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},SVGTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||(this.finalTransform.matMdf&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),this.finalTransform.opMdf&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),!this.data.singleShape){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].setAttribute("transform",n.m),this.textSpans[s].setAttribute("opacity",n.o),n.sw&&this.textSpans[s].setAttribute("stroke-width",n.sw),n.sc&&this.textSpans[s].setAttribute("stroke",n.sc),n.fc&&this.textSpans[s].setAttribute("fill",n.fc))}},SVGTextElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null};var PlaceHolderElement=function(t,e,s){if(this.data=t,this.globalData=s,e){this.parentContainer=e;var i=document.createElementNS(svgNS,"g");i.setAttribute("id",this.data.id),e.appendChild(i),this.phElement=i}this.layerId="ly_"+randomString(10)};PlaceHolderElement.prototype.prepareFrame=function(){},PlaceHolderElement.prototype.renderFrame=function(){},PlaceHolderElement.prototype.draw=function(){},createElement(SVGBaseElement,ICompElement),ICompElement.prototype.getComposingElement=function(){return this.layerElement},ICompElement.prototype.hide=function(){if(!this.hidden){var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t].hide();this.hidden=!0}},ICompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1));var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},ICompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.data.hasMask?this.elements[e].renderFrame():this.elements[e].renderFrame(this.finalTransform);this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this.parent.destroy.call();var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t].destroy()},createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assetData.p),t.maskedElement=t.innerElem},s=new Image;s.addEventListener("load",e,!1),s.addEventListener("error",e,!1),s.src=this.path+this.assetData.p,this.parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},IImageElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||((this.finalTransform.matMdf||this.firstFrame)&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),(this.finalTransform.opMdf||this.firstFrame)&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},IShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.mainShape=new ShapeItemElement(this.data,this.layerElement,this.parentContainer,this.placeholder,this.dynamicProperties,this.globalData)},IShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden=!1,this.firstFrame&&(this.mainShape.firstFrame=!0,this.firstFrame=!1),void(this.data.hasMask?this.mainShape.renderShape(this.transformHelper,null,null,!0):this.mainShape.renderShape(this.finalTransform,null,null,!0)))},IShapeElement.prototype.hide=function(){this.hidden||(this.mainShape.hideShape(),this.hidden=!0)},IShapeElement.prototype.destroy=function(){this.parent.destroy.call(),this.mainShape.destroy()},ShapeItemElement.prototype.appendNodeToParent=SVGBaseElement.prototype.appendNodeToParent,ShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var m;if(e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty){if(m=document.createElementNS(svgNS,"g"),m.setAttribute("stroke-linecap",this.lcEnum[t[a].lc]||"round"),m.setAttribute("stroke-linejoin",this.ljEnum[t[a].lj]||"round"),m.setAttribute("fill-opacity","0"),1==t[a].lj&&m.setAttribute("stroke-miterlimit",t[a].ml),e[a].c.k||m.setAttribute("stroke","rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||m.setAttribute("stroke-opacity",e[a].o.v),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||m.setAttribute("stroke-width",e[a].w.v),t[a].d){var p=PropertyFactory.getDashProp(this.elemData,t[a].d,"svg",s);p.k?e[a].d=p:(m.setAttribute("stroke-dasharray",p.dasharray),m.setAttribute("stroke-dashoffset",p.dashoffset))}}else m=document.createElementNS(svgNS,"path"),e[a].c.k||m.setAttribute("fill","rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||m.setAttribute("fill-opacity",e[a].o.v);this.shape===this.parentContainer?this.appendNodeToParent(m):this.shape.appendChild(m),this.stylesList.push({pathElement:m,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var v={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(v),l.push(v)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},ShapeItemElement.prototype.getElement=function(){return this.shape},ShapeItemElement.prototype.hideShape=function(){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode))},ShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},ShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var m=r.s?r.s:[];for(a=1;i>a;a+=1)m[a-1]?(e.st&&(h+=" M"+m[a-1][0]+","+m[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(m[a-1][0],m[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(m[0]?(e.st&&(h+=" M"+m[0][0]+","+m[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(m[0][0],m[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},ShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&i.pathElement.setAttribute("fill","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&i.pathElement.setAttribute("fill-opacity",e.o.v*s.opacity)},ShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.pathElement.setAttribute("stroke-dasharray",a.dasharray),i.pathElement.setAttribute("stroke-dashoffset",a.dashoffset)),(e.c.mdf||this.firstFrame)&&i.pathElement.setAttribute("stroke","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&i.pathElement.setAttribute("stroke-opacity",e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&i.pathElement.setAttribute("stroke-width",e.w.v)},ShapeItemElement.prototype.destroy=function(t,e){this.shape=null,this.data=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement===this.parentContainer?this.appendNodeToParent(t):this.layerElement.appendChild(t),this.innerElem=t},ISolidElement.prototype.hide=IImageElement.prototype.hide,ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy,createElement(BaseElement,CVBaseElement),CVBaseElement.prototype.createElements=function(){},CVBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(!this.isVisible)return this.isVisible;this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]);return this.data.hasMask&&(this.globalData.renderer.save(!0),this.maskManager.renderFrame(s)),this.isVisible},CVBaseElement.prototype.getCurrentAnimData=function(){return this.currentAnimData},CVBaseElement.prototype.addMasks=function(t){this.maskManager=new CVMaskElement(t,this,this.globalData)},CVBaseElement.prototype.destroy=function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager&&this.maskManager.destroy()},CVBaseElement.prototype.mHelper=new Matrix,createElement(CVBaseElement,CVCompElement),CVCompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1));var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},CVCompElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e,s=this.layers.length;for(e=s-1;e>=0;e-=1)this.elements[e].renderFrame(this.finalTransform);this.data.hasMask&&this.globalData.renderer.restore(!0),this.firstFrame&&(this.firstFrame=!1)}},CVCompElement.prototype.setElements=function(t){this.elements=t},CVCompElement.prototype.getElements=function(){return this.elements},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.layers=null,this.elements=null,this.parent.destroy.call()},createElement(CVBaseElement,CVImageElement),CVImageElement.prototype.createElements=function(){var t=this,e=function(){t.animationItem.elementLoaded()},s=function(){t.failed=!0,t.animationItem.elementLoaded()};this.img=new Image,this.img.addEventListener("load",e,!1),this.img.addEventListener("error",s,!1),this.img.src=this.path+this.assetData.p,this.parent.createElements.call(this)},CVImageElement.prototype.renderFrame=function(t){if(!this.failed&&this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.drawImage(this.img,0,0),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},CVImageElement.prototype.destroy=function(){this.img=null,this.animationItem=null,this.parent.destroy.call()},CVMaskElement.prototype.getMaskProperty=function(t){return this.viewData[t]},CVMaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getInterpolatedValue(t)},CVMaskElement.prototype.renderFrame=function(t){var e,s,i,a,r,n=this.ctx,o=this.data.masksProperties.length,h=!1;for(e=0;o>e;e++)if("n"!==this.masksProperties[e].mode){h===!1&&(n.beginPath(),h=!0),this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.globalData.compWidth,0),n.lineTo(this.globalData.compWidth,this.globalData.compHeight),n.lineTo(0,this.globalData.compHeight),n.lineTo(0,0)),r=this.viewData[e].v,s=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.moveTo(s[0],s[1]);var l,m=r.v.length;for(l=1;m>l;l++)s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[l][0],r.i[l][1]),a=t.applyToPointArray(r.v[l][0],r.v[l][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1]);s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[0][0],r.i[0][1]),a=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1])}h&&n.clip()},CVMaskElement.prototype.destroy=function(){this.ctx=null},createElement(CVBaseElement,CVShapeElement),CVShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.mainShape=new CVShapeItemElement(this.data,this.dynamicProperties,this.globalData)},CVShapeElement.prototype.renderFrame=function(t){this.parent.renderFrame.call(this,t)!==!1&&(this.firstFrame&&(this.mainShape.firstFrame=!0,this.firstFrame=!1),this.mainShape.renderShape(this.finalTransform,null,null,!0),this.data.hasMask&&this.globalData.renderer.restore(!0))},CVShapeElement.prototype.destroy=function(){this.mainShape.destroy(),this.parent.destroy.call()},CVShapeItemElement.prototype.dashResetter=[],CVShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],m=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var p=PropertyFactory.getDashProp(this.elemData,t[a].d,"canvas",s);e[a].d=p,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(u),m.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=m.length,a=0;h>a;a+=1)m[a].closed=!0},CVShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var m,p,f,d,c,u,v=this.globalData.renderer,y=this.globalData.canvasContext;for(a=0;r>a;a+=1)if("0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1"),"st"!==this.stylesList[a].type||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,p=c.length,"st"===this.stylesList[a].type?(y.strokeStyle=this.stylesList[a].co,y.lineWidth=this.stylesList[a].wi,y.lineCap=this.stylesList[a].lc,y.lineJoin=this.stylesList[a].lj,y.miterLimit=this.stylesList[a].ml):y.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),y.beginPath(),m=0;p>m;m+=1){for("st"===this.stylesList[a].type?(v.save(),y.beginPath(),this.stylesList[a].da?(y.setLineDash(this.stylesList[a].da),y.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(y.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[m].tr),u=c[m].nodes):u=c[m].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?y.moveTo(u[f].p[0],u[f].p[1]):y.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===this.stylesList[a].type&&(y.stroke(),v.restore())}"st"!==this.stylesList[a].type&&y.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeItemElement.prototype.destroy=function(){this.data=null,this.globalData=null,this.canvasContext=null},createElement(CVBaseElement,CVSolidElement),CVSolidElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.fillStyle=this.data.sc,e.fillRect(0,0,this.data.sw,this.data.sh),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(CVBaseElement,CVTextElement),CVTextElement.prototype.init=ITextElement.prototype.init,CVTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,CVTextElement.prototype.getMult=ITextElement.prototype.getMult,CVTextElement.prototype.tHelper=document.createElement("canvas").getContext("2d"),CVTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d,e=!1;t.fc?(e=!0,this.values.fill="rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.values.sWidth=t.sw);var i,a,r=this.globalData.fontManager.getFontByName(t.f),n=this.mHelper;this.stroke=s,this.values.fValue=t.s+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.t.length,this.tHelper.font=this.values.fValue;var o,h,l,m,p,f,d,c,u,v;for(i=0;a>i;i+=1){if(o=this.globalData.fontManager.getCharData(t.t.charAt(i),r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),n.reset(),n.scale(t.s/100,t.s/100),h=o.data)for(p=h.shapes[0].it,d=p.length,u=new Array(d),f=0;d>f;f+=1){for(m=p[f].ks.i.length,c=p[f].ks,v=[],l=1;m>l;l+=1)1==l&&v.push(n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),v.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[l][0],c.i[l][1]),n.applyToY(c.i[l][0],c.i[l][1]),n.applyToX(c.v[l][0],c.v[l][1]),n.applyToY(c.v[l][0],c.v[l][1]));v.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[0][0],c.i[0][1]),n.applyToY(c.i[0][0],c.i[0][1]),n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),u[f]=v}else u=[];this.textSpans.push({elem:u})}},CVTextElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext,s=this.finalTransform.mat.props;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.font=this.values.fValue,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.getMeasures();var i,a,r,n,o,h,l=this.renderedLetters,m=this.data.t.d.l;a=m.length;var p,f,d,c=null,u=null,v=null;for(i=0;a>i;i+=1)if(!m[i].n){if(p=l[i],this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(p.props),this.globalData.renderer.ctxOpacity(p.o),
+this.fill){for(p.fc?c!==p.fc&&(c=p.fc,e.fillStyle=p.fc):c!==this.values.fill&&(c=this.values.fill,e.fillStyle=this.values.fill),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(p.sw?v!==p.sw&&(v=p.sw,e.lineWidth=p.sw):v!==this.values.sWidth&&(v=this.values.sWidth,e.lineWidth=this.values.sWidth),p.sc?u!==p.sc&&(u=p.sc,e.strokeStyle=p.sc):u!==this.values.stroke&&(u=this.values.stroke,e.strokeStyle=this.values.stroke),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}this.globalData.renderer.restore()}this.globalData.renderer.restore(this.data.hasMask)}};var animationManager=function(){function t(t,e){if(!t)return null;for(var s=0;b>s;){if(v[s].elem==t&&null!==v[s].elem)return v[s].animation;s+=1}var i=new AnimationItem;return i.setData(t,e),v.push({elem:t,animation:i}),b+=1,i}function e(t){var e=new AnimationItem;return e.setParams(t),v.push({elem:null,animation:e}),b+=1,e}function s(t,e){var s;for(s=0;b>s;s+=1)v[s].animation.setSpeed(t,e)}function i(t,e){var s;for(s=0;b>s;s+=1)v[s].animation.setDirection(t,e)}function a(t){var e;for(e=0;b>e;e+=1)v[e].animation.play(t)}function r(t,e){g=!1,y=Date.now();var s;for(s=0;b>s;s+=1)v[s].animation.moveFrame(t,e)}function n(){var t,e=Date.now(),s=e-y;for(t=0;b>t;t+=1)v[t].animation.renderer.destroyed?(v.splice(t,1),t-=1,b-=1):v[t].animation.advanceTime(s);y=e,requestAnimationFrame(n)}function o(t){var e;for(e=0;b>e;e+=1)v[e].animation.pause(t)}function h(t,e,s){var i;for(i=0;b>i;i+=1)v[i].animation.goToAndStop(t,e,s)}function l(t){var e;for(e=0;b>e;e+=1)v[e].animation.stop(t)}function m(t){var e;for(e=0;b>e;e+=1)v[e].animation.togglePause(t)}function p(t){var e;for(e=0;b>e;e+=1)v[e].animation.destroy(t)}function f(e,s,i){var a,r=document.getElementsByClassName("bodymovin"),n=r.length;for(a=0;n>a;a+=1)i&&r[a].setAttribute("data-bm-type",i),t(r[a],e);if(s&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),t(h,e)}}function d(){var t;for(t=0;b>t;t+=1)v[t].animation.resize()}function c(){y=Date.now(),requestAnimationFrame(n)}var u={},v=[],y=0,g=!0,b=0;return setTimeout(c,0),u.registerAnimation=t,u.loadAnimation=e,u.setSpeed=s,u.setDirection=i,u.play=a,u.moveFrame=r,u.pause=o,u.stop=l,u.togglePause=m,u.searchAnimations=f,u.resize=d,u.start=c,u.goToAndStop=h,u.destroy=p,u}(),AnimationItem=function(){this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.repeat="indefinite",this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.isScrolling=!1,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.renderedFrameCount=0,this.scaleMode="fit",this.math=Math,this.removed=!1,this.timeCompleted=0,this.segmentPos=0,this.segments=[]};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),t.wrapper&&(this.wrapper=t.wrapper);var s=t.animType?t.animType:"canvas";switch(s){case"canvas":this.renderer=new CanvasRenderer(this,t.renderer);break;case"svg":this.renderer=new SVGRenderer(this,t.renderer)}if(this.animType=s,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},AnimationItem.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||(s.loop="false"===a?!1:"true"===a?!0:parseInt(a)),s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var r=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===r&&(s.prerender=!1),this.setParams(s)},AnimationItem.prototype.includeLayers=function(t){var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;n>s;s+=1)if(r[s].id)for(e=0;a>e;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}else"svg"==this.animType?i.push(r[s]):i.unshift(r[s]);if(t.assets)for(a=t.assets.length,e=0;a>e;e+=1)this.animationData.assets.push(t.assets[e]);dataManager.completeData(this.animationData),this.renderer.includeLayers(t.layers),this.renderer.buildStage(this.container,this.layers),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length)return this.trigger("bm:data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.animationData._id=this.animationID,this.animationData._animType=this.animType,this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("bm:config_ready"),this.loadSegments(),dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():this.checkLoaded()},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(this.renderer.buildItems(this.animationData.layers),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(this.renderer.buildStage(this.container,this.layers),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=subframeEnabled?this.math.round(100*this.currentRawFrame)/100:this.math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1)},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0)},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?(this.isPaused=!1,this.play()):(this.isPaused=!0,this.pause()))},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.isPaused=!0)},AnimationItem.prototype.advanceTime=function(t){this.isPaused!==!0&&this.isScrolling!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier)},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.currentRawFrame=this.firstFrame},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;i>s;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||this.renderer.destroy()},AnimationItem.prototype.setCurrentRawFrameValue=function(t){if(this.currentRawFrame=t,this.currentRawFrame>=this.totalFrames){if(this.segments.length&&this.adjustSegment(this.segments.shift()),this.loop===!1)return this.currentRawFrame=this.totalFrames,this.gotoFrame(),void this.pause();if(this.playCount+=1,this.loop!==!0&&this.playCount==this.loop)return this.currentRawFrame=this.totalFrames,this.gotoFrame(),void this.pause()}else if(this.currentRawFrame<0)return this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1?(this.currentRawFrame=0,this.gotoFrame(),void this.pause()):(this.currentRawFrame=this.totalFrames+this.currentRawFrame,void this.gotoFrame());this.currentRawFrame=this.currentRawFrame%this.totalFrames,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;s>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.addEventListener=addEventListener,AnimationItem.prototype.trigger=triggerEvent,function(t){function e(t){animationManager.play(t)}function s(t){animationManager.pause(t)}function i(t){animationManager.togglePause(t)}function a(t,e){animationManager.setSpeed(t,e)}function r(t,e){animationManager.setDirection(t,e)}function n(t){animationManager.stop(t)}function o(t){animationManager.moveFrame(t)}function h(){E===!0?animationManager.searchAnimations(C,E,w):animationManager.searchAnimations()}function l(t){return animationManager.registerAnimation(t)}function m(){animationManager.resize()}function p(){animationManager.start()}function f(t,e,s){animationManager.goToAndStop(t,e,s)}function d(t){subframeEnabled=t}function c(t){return E===!0&&(t.animationData=JSON.parse(C)),animationManager.loadAnimation(t)}function u(t){return animationManager.destroy(t)}function v(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(defaultCurveSegments>=50?!1:!0)}function y(){"complete"===document.readyState&&(clearInterval(I),h())}function g(t){for(var e=D.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var b={};b.play=e,b.pause=s,b.togglePause=i,b.setSpeed=a,b.setDirection=r,b.stop=n,b.moveFrame=o,b.searchAnimations=h,b.registerAnimation=l,b.loadAnimation=c,b.setSubframeRendering=d,b.resize=m,b.start=p,b.goToAndStop=f,b.destroy=u,b.setQuality=v,b.checkReady=y,t.bodymovin=b;var E="__[STANDALONE]__",C="__[ANIMATIONDATA]__",w="";if(E){var P=document.getElementsByTagName("script"),S=P.length-1,x=P[S],D=x.src.replace(/^[^\?]+\??/,"");w=g("renderer")}var I=setInterval(y,100)}(window);}(window));
diff --git a/extension/jsx/compsManager.jsx b/extension/jsx/compsManager.jsx
index 96636a2..05c7947 100644
--- a/extension/jsx/compsManager.jsx
+++ b/extension/jsx/compsManager.jsx
@@ -44,10 +44,10 @@
                 if (compData.destination) {
                     var lastInd = compData.destination.lastIndexOf('.');
                     compData.destination = compData.destination.substr(0, lastInd);
-                    compData.destination += compData.settings.standalone ? '.js' : '.json';
+                    compData.destination += compData.settings.standalone ? '.js' : '.js';
                     lastInd = compData.absoluteURI.lastIndexOf('.');
                     compData.absoluteURI = compData.absoluteURI.substr(0, lastInd);
-                    compData.absoluteURI += compData.settings.standalone ? '.js' : '.json';
+                    compData.absoluteURI += compData.settings.standalone ? '.js' : '.js';
                     bm_eventDispatcher.sendEvent('bm:compositions:list', compositions);
                 }
                 break;
@@ -81,7 +81,7 @@
             uri = compData.absoluteURI;
         } else {
             uri = Folder.desktop.absoluteURI + '/data';
-            uri += compData.settings.standalone ? '.js' : '.json';
+            uri += compData.settings.standalone ? '.js' : '.js';
         }
         var f = new File(uri);
         var saveFileData = f.saveDlg();
diff --git a/extension/jsx/dataManager.jsx b/extension/jsx/dataManager.jsx
index 47946bc..1499436 100644
--- a/extension/jsx/dataManager.jsx
+++ b/extension/jsx/dataManager.jsx
@@ -166,10 +166,13 @@
             filePathName = filePathName.substr(0, filePathName.lastIndexOf('.'));
             for (i = 0; i < len; i += 1) {
                 segmentPath = destinationPath.substr(0, destinationPath.lastIndexOf('/') + 1);
-                segmentPath += filePathName + '_' + i + '.json';
+                segmentPath += filePathName + '_' + i + '.js';
                 dataFile = new File(segmentPath);
                 dataFile.open('w', 'TEXT', '????');
                 string = JSON.stringify(animationSegments[i]);
+                /* TODO : To add Export Paths */
+                string = getIndiShapes( animationSegments[i]);
+                /* --- */
                 try {
                     dataFile.write(string); //DO NOT ERASE, JSON UNFORMATTED
                     //dataFile.write(JSON.stringify(ob.renderData.exportData, null, '  ')); //DO NOT ERASE, JSON FORMATTED
@@ -190,6 +193,9 @@
         dataFile = new File(destinationPath);
         dataFile.open('w', 'TEXT', '????');
         string = JSON.stringify(data);
+        /* TODO : To add Export Paths */
+        string = getIndiShapes( data);
+        /* --- */
         string = string.replace(/\n/g, '');
         ////
         if (config.standalone) {
diff --git a/extension/jsx/individeoExport.jsx b/extension/jsx/individeoExport.jsx
new file mode 100644
index 0000000..8e5d780
--- /dev/null
+++ b/extension/jsx/individeoExport.jsx
@@ -0,0 +1,130 @@
+function getIndiShapes( json, objString )
+{
+    //var indiShape = findNodesJSON( json, "shapes", "", []);
+    var indiShape = findNodesJSON( json, "name", "", [],json);
+    return "var individeoRoadMap ="+JSON.stringify(indiShape)+";\nvar bmsmd ="+JSON.stringify(json)+";";
+}
+
+function findAssetPath(root,refId){
+    var assets = root.assets || [],
+        i=0,
+        len = assets.length,
+        asset;
+    for(;i<len;i++){
+        asset = assets[i]||{};
+        if(asset.id === refId){
+            return "assets."+i + ".p";
+        }
+    }
+    return false;
+}
+
+function findNodesJSON( json, node, path, exportArray, root )
+{
+    if(!json){
+        return exportArray;
+    }
+    var exportPath = exportArray;
+    var count = 0;
+    var index = 0;
+    var oldPath = path,
+        i;
+    for(var key in json){
+        ++count;
+        var attrName = key;
+        var attrValue = json[key];
+        var newPath = (oldPath !== "" ? oldPath + "." : "");
+
+        if ( attrName === node )
+        {
+            //if the name exist
+            //if ( undefined !== json["name"] )
+            //{
+            var name = json.name,
+                shapes = json.shapes,
+                refId = json.refId,
+                newElement;
+
+            if ( name.lastIndexOf("indi_",0) === 0 )
+            {
+
+                name = name.substring(5,name.length);
+
+                var ty = json.ty;//layer type
+                ///work
+                if(ty === 2){//still -> assets type
+                    var aPath = findAssetPath(root,refId);
+                    if(aPath){
+                        newElement = {};
+                        newElement.key = name;
+                        newElement.value = aPath;
+                        newElement.type = "image";
+                        exportPath.push(newElement);
+                    }
+
+                }
+                //else if ( typeof attrValue === "object" && attrValue.length !== undefined )
+                else if ( typeof shapes === "object" && shapes.length !== undefined )
+                {
+
+                    newPath = newPath + "shapes";
+
+                    for (i=0 ; i<shapes.length ; ++i )
+                    {
+                        if ( shapes[i].ty === "gr" )
+                        {
+                            newElement = {};
+                            newElement.key = name;
+                            newElement.value = [];
+
+                            var firstItType = shapes[i].it[0].ty;
+                            /* If the first it is a rectangle */
+                            if(firstItType === "rc"){
+                                newElement.type = "boxTransform";
+                                newElement.value.push(newPath+"."+i+".it.0");
+                            }
+                            /* If the first it is a shape */
+                            else if(firstItType === "sh"){
+                                var ks = shapes[i].it[0].ks;
+                                /* if there is a morph */
+                                if(ks.length){
+                                    var start = ks[0].s;
+                                    var end = ks[0].e;
+                                    if(start&&start[0]&&end&&end[0]){
+                                        newElement.value.push(newPath+"."+i+".it.0.ks.0.s.0");
+                                        newElement.value.push(newPath+"."+i+".it.0.ks.0.e.0");
+                                    }
+                                }
+                                /* if there is only one shape */
+                                else{
+                                    newElement.value.push(newPath+"."+i+".it.0");
+                                }
+                                newElement.type = "tracking";
+                            }
+                            exportPath.push(newElement);
+                        }
+                    }
+
+                }
+
+                json.name = undefined;
+
+            }
+            //}
+        }
+        else if ( attrValue !== null && typeof attrValue === "object" && attrValue.length !== undefined )
+        {
+            newPath = newPath + key;
+            for (i=0 ; i<attrValue.length ; ++i )
+                findNodesJSON(attrValue[i], node, newPath+"."+i, exportArray,root);
+        }
+        else if ( attrValue !== null && typeof attrValue === "object" )
+        {
+            newPath = newPath + key;
+            findNodesJSON(attrValue, node, newPath, exportArray,root);
+        }
+
+
+    }
+    return exportPath;
+}
\ No newline at end of file
diff --git a/extension/jsx/initializer.jsx b/extension/jsx/initializer.jsx
index 3bb685c..a3fc3ed 100644
--- a/extension/jsx/initializer.jsx
+++ b/extension/jsx/initializer.jsx
@@ -3,6 +3,7 @@
 
 var extensionPath = $.fileName.split('/').slice(0, -1).join('/') + '/';
 $.evalFile(extensionPath + 'JSON.jsx');
+$.evalFile(extensionPath + 'individeoExport.jsx');
 $.evalFile(extensionPath + 'eventManager.jsx');
 $.evalFile(extensionPath + 'projectManager.jsx');
 $.evalFile(extensionPath + 'compsManager.jsx');
@@ -28,4 +29,4 @@
 $.evalFile(extensionPath + 'utils/markerHelper.jsx');
 $.evalFile(extensionPath + 'utils/bez.jsx');
 $.evalFile(extensionPath + 'utils/transformation-matrix.jsx');
-$.evalFile(extensionPath + 'utils/PropertyFactory.jsx');
\ No newline at end of file
+$.evalFile(extensionPath + 'utils/PropertyFactory.jsx');
diff --git a/extension/jsx/renderManager.jsx b/extension/jsx/renderManager.jsx
index 65bacbe..ba542f9 100644
--- a/extension/jsx/renderManager.jsx
+++ b/extension/jsx/renderManager.jsx
@@ -68,6 +68,14 @@
                 layerData.layers = [];
                 createLayers(layerInfo.source, layerData.layers, framerate);
             }
+            /* TODO : This add the layerName to be used for export paths */
+            var layerName = layerInfo.name;
+            var tyValue = layerData.ty;
+            if ( undefined !== tyValue && layerName.lastIndexOf("indi_",0) === 0 )
+            {
+                layerData.name = layerName;
+            }
+            /* --------------------------------------------------------- */
         }
     }
     
@@ -84,7 +92,7 @@
         exportData.assets = [];
         exportData.comps = [];
         exportData.fonts = [];
-        exportData.v = '3.1.6';
+        exportData.v = '3.1.7';
         exportData.layers = [];
         exportData.ip = comp.workAreaStart * comp.frameRate;
         exportData.op = (comp.workAreaStart + comp.workAreaDuration) * comp.frameRate;
diff --git a/player/bodymovin.js b/player/bodymovin.js
new file mode 100644
index 0000000..ca689d5
--- /dev/null
+++ b/player/bodymovin.js
@@ -0,0 +1,5 @@
+(function(window){function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,s,i,a,r){return t.reset().translate(a,r).rotate(e).scale(s,i).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 roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="hidden",styleUnselectableDiv(t)}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=0>i?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,s,i){this.type=t,this.currentLoop=e,this.totalLoops=s,this.direction=0>i?-1:1}function BMSegmentStartEvent(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s}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,i=this._cbs[t].length;i>s;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=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,i=0;s>i;i++)this._cbs[t][i](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var s,i="";for(s=t;s>0;--s)i+=e[Math.round(Math.random()*(e.length-1))];return i}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,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.props=r}function iterateDynamicProperties(t){var e,s=this.dynamicProperties;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)}function createElement(t,e,s){if(!e){var i=Object.create(t.prototype,s),a={};return i&&"[object Function]"===a.toString.call(i.init)&&i.init(),i}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,i,a,r){return bm_abs((s-t)*(r-e)-(a-t)*(i-e))<1e-5}function e(t,e,s,i,a){if(a||(a=("bez_"+t+"_"+e+"_"+s+"_"+i).replace(/\./g,"p")),o[a])return o[a];var r,n,h,l,p,m;return o[a]=function(a,o,f,d,c){var u=o/c;a=u;for(var y,v=0;++v<20&&(h=3*t,n=3*(s-t)-h,r=1-h-n,y=a*(h+a*(n+a*r))-u,!(bm_abs(y)<.001));)a-=y/(h+a*(2*n+3*r*a));m=3*e,p=3*(i-e)-m,l=1-m-p;var g=a*(m+a*(p+a*l));return d*g+f},o[a]}function s(t){this.segmentLength=0,this.points=new Array(t)}function i(t,e){this.partialLength=t,this.point=e}function a(t,e){var s=e.segments,i=s.length,a=bm_floor((i-1)*t),r=t*e.addedLength,n=0;if(r==s[a].l)return s[a].p;for(var o=s[a].l>r?-1:1,h=!0;h;)s[a].l<=r&&s[a+1].l>r?(n=(r-s[a].l)/(s[a+1].l-s[a].l),h=!1):a+=o,(0>a||a>=i-1)&&(h=!1);return s[a].p+(s[a+1].p-s[a].p)*n}function r(){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,i,n,o,h){var l=new r;n=0>n?0:n;var p=a(n,h);o=o>1?1:o;var m,f=a(o,h),d=t.length,c=1-p,u=1-f;for(m=0;d>m;m+=1)l.pt1[m]=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)*i[m]+p*p*p*e[m],l.pt3[m]=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)*i[m]+p*p*f*e[m],l.pt4[m]=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)*i[m]+p*f*f*e[m],l.pt2[m]=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)*i[m]+f*f*f*e[m];return l}var o=[],h=(Math,function(){function e(t,e){this.l=t,this.p=e}var s={};return function(i,a,r,n){var o=(i.join("_")+"_"+a.join("_")+"_"+r.join("_")+"_"+n.join("_")).replace(/\./g,"p");if(s[o])return s[o];var h,l,p,m,f,d,c=defaultCurveSegments,u=0,y=[],v=[],g={addedLength:0,segments:[]};for((i[0]!=a[0]||i[1]!=a[1])&&t(i[0],i[1],a[0],a[1],r[0],r[1])&&t(i[0],i[1],a[0],a[1],n[0],n[1])&&(c=2),p=r.length,h=0;c>h;h+=1){for(f=h/(c-1),d=0,l=0;p>l;l+=1)m=bm_pow(1-f,3)*i[l]+3*bm_pow(1-f,2)*f*r[l]+3*(1-f)*bm_pow(f,2)*n[l]+bm_pow(f,3)*a[l],y[l]=m,null!==v[l]&&(d+=bm_pow(y[l]-v[l],2)),v[l]=y[l];d&&(d=bm_sqrt(d),u+=d),g.segments.push(new e(u,f))}return g.addedLength=u,s[o]=g,g}}()),l=function(){var e={};return function(a){var r=a.s,n=a.e,o=a.to,h=a.ti,l=(r.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[l])return void(a.bezierData=e[l]);var p,m,f,d,c,u,y,v=defaultCurveSegments,g=0,b=null;(r[0]!=n[0]||r[1]!=n[1])&&t(r[0],r[1],n[0],n[1],r[0]+o[0],r[1]+o[1])&&t(r[0],r[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(v=2);var E=new s(v);for(f=o.length,p=0;v>p;p+=1){for(y=new Array(f),c=p/(v-1),u=0,m=0;f>m;m+=1)d=bm_pow(1-c,3)*r[m]+3*bm_pow(1-c,2)*c*(r[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),g+=u,E.points[p]=new i(u,y),b=y}E.segmentLength=g,a.bezierData=E,e[l]=E}}();return{getEasingCurve:e,getBezierLength:h,getNewSegment:n,buildBezierData:l}}function dataFunctionManager(){function t(a,n,o){var h,l,p,m,f,d,c,u,y=a.length;for(m=0;y>m;m+=1)if(h=a[m],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(a[m-1].td=h.tt),l=[],p=-1,h.hasMask){var v=h.masksProperties;for(d=v.length,f=0;d>f;f+=1)if(v[f].pt.k.i)i(v[f].pt.k);else for(u=v[f].pt.k.length,c=0;u>c;c+=1)v[f].pt.k[c].s&&i(v[f].pt.k[c].s[0]),v[f].pt.k[c].e&&i(v[f].pt.k[c].e[0])}0===h.ty?(h.layers=e(h.refId,n),t(h.layers,n,o)):4===h.ty?s(h.shapes,!1):5==h.ty&&r(h,o)}}function e(t,e){for(var s=0,i=e.length;i>s;){if(e[s].id===t)return JSON.parse(JSON.stringify(e[s].layers));s+=1}}function s(t,e){var a,r,n,o=t.length,h=e?e:!1;for(a=o-1;a>=0;a-=1)if("tm"==t[a].ty&&(h=!0),"sh"==t[a].ty)if(t[a].trimmed=h,t[a].ks.k.i)i(t[a].ks.k);else for(n=t[a].ks.k.length,r=0;n>r;r+=1)t[a].ks.k[r].s&&i(t[a].ks.k[r].s[0]),t[a].ks.k[r].e&&i(t[a].ks.k[r].e[0]);else"gr"==t[a].ty&&s(t[a].it,h)}function i(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 a(e,s){t(e.layers,e.assets,s)}function r(t,e){var s,i,a,r,o,h,l,p,m=[],f=t.t.d,d=0,c=t.t.m.g,u=0,y=0,v=0,g=[],b=0,E=0,P=e.getFontByName(f.f),S=P.fStyle.split(" "),C="normal",k="normal";for(i=S.length,s=0;i>s;s+=1)"italic"===S[s].toLowerCase()?k="italic":"bold"===S[s].toLowerCase()?C="700":"black"===S[s].toLowerCase()?C="900":"medium"===S[s].toLowerCase()?C="500":"regular"===S[s].toLowerCase()||"normal"===S[s].toLowerCase()?C="400":("light"===S[s].toLowerCase()||"thin"===S[s].toLowerCase())&&(C="200");for(f.fWeight=C,f.fStyle=k,i=f.t.length,s=0;i>s;s+=1)if(a=!1," "===f.t.charAt(s)?r=" ":13===f.t.charCodeAt(s)?(g.push(b),E=b>E?b:E,b=0,r="",a=!0,v+=1):r=f.t.charAt(s),e.chars?(l=e.getCharData(f.t.charAt(s),P.fStyle,e.getFontByName(f.f).fFamily),p=a?0:l.w*f.s/100):(n.font=f.s+"px "+e.getFontByName(f.f).fFamily,p=n.measureText(r).width),b+=p,m.push({l:p,an:p,add:u,n:a,anIndexes:[],val:r,line:v}),2==c){if(u+=p,""==r||" "==r||s==i-1){for((""==r||" "==r)&&(u-=p);s>=y;)m[y].an=u,m[y].ind=d,m[y].extra=p,y+=1;d+=1,u=0}}else if(3==c){if(u+=p,""==r||s==i-1){for(""==r&&(u-=p);s>=y;)m[y].an=u,m[y].ind=d,m[y].extra=p,y+=1;u=0,d+=1}}else m[d].ind=d,m[d].extra=0,d+=1;switch(f.l=m,E=b>E?b:E,g.push(b),f.boxWidth=E,f.lineWidths=g,f.j){case 1:t.t.d.justifyOffset=-f.boxWidth;break;case 2:t.t.d.justifyOffset=-f.boxWidth/2;break;default:t.t.d.justifyOffset=0}var w=t.t.a;h=w.length;var x,D,I=[];for(o=0;h>o;o+=1){for(w[o].a.sc&&(f.strokeColorAnim=!0),w[o].a.sw&&(f.strokeWidthAnim=!0),w[o].a.fc&&(f.fillColorAnim=!0),D=0,x=w[o].s.b,s=0;i>s;s+=1)m[s].anIndexes[o]=D,(1==x&&""!=m[s].val||2==x&&""!=m[s].val&&" "!=m[s].val||3==x&&(m[s].n||" "==m[s].val||s==i-1)||4==x&&(m[s].n||s==i-1))&&(1===w[o].s.rn&&I.push(D),D+=1);t.t.a[o].s.totalChars=D;var F,T=-1;if(1===w[o].s.rn)for(s=0;i>s;s+=1)T!=m[s].anIndexes[o]&&(T=m[s].anIndexes[o],F=I.splice(Math.floor(Math.random()*I.length),1)[0]),m[s].anIndexes[o]=F}0!==h||"m"in t.t.p||(t.singleShape=!0),f.yOffset=1.2*f.s}var n=document.createElement("canvas").getContext("2d"),o=(new Matrix,{});return o.completeData=a,o}function ExpressionComp(){}function ShapeInterface(){}function SVGRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},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:new Array(15),savedOp:new Array(15),cArrPos:0,cTr:new Matrix,cO:1};var s,i=15;for(s=0;i>s;s+=1)this.contextData.saved[s]=new Array(6);this.elements=[]}function HybridRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},this.elements=[],this.destroyed=!1}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 i,a,r,n,o,h,l,p=this.element.maskedElement,m=this.globalData.defs,f=this.masksProperties.length,d=this.masksProperties,c=0,u=[],y=randomString(10),v="clipPath",g="clip-path";for(i=0;f>i;i++)if(("a"!==d[i].mode&&"n"!==d[i].mode||d[i].inv)&&(v="mask",g="mask"),"s"!=d[i].mode&&"i"!=d[i].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[i].mode){if(c+=1,a=document.createElementNS(svgNS,"path"),d[i].cl?"s"==d[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"):(a.setAttribute("fill","none"),"s"==d[i].mode?a.setAttribute("fill","#000000"):a.setAttribute("fill","#ffffff"),a.setAttribute("stroke-width","1"),a.setAttribute("stroke-miterlimit","10")),a.setAttribute("clip-rule","nonzero"),0!==d[i].x.k){v="mask",g="mask";var b=PropertyFactory.getProp(this.element,d[i].x,0,null,this.dynamicProperties),E="fi_"+randomString(10);h=document.createElementNS(svgNS,"filter"),h.setAttribute("id",E),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[i].mode?a.setAttribute("stroke","#000000"):a.setAttribute("stroke","#ffffff")}else l=null;if(this.storedData[i]={elem:a,x:b,expan:l,lastPath:"",lastOperator:"",filterId:E,lastRadius:0},"i"==d[i].mode){n=u.length;var P=document.createElementNS(svgNS,"g");for(r=0;n>r;r+=1)P.appendChild(u[r]);var S=document.createElementNS(svgNS,"mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",y+"_"+c),S.appendChild(a),m.appendChild(S),P.setAttribute("mask","url(#"+y+"_"+c+")"),u.length=0,u.push(P)}else u.push(a);d[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:a,lastPath:"",prop:PropertyFactory.getShapeProp(this.element,d[i],3,this.dynamicProperties,null)},this.viewData[i].prop.k||this.drawPath(d[i],this.viewData[i].prop.v,this.viewData[i])}else this.viewData[i]={prop:PropertyFactory.getShapeProp(this.element,d[i],3,this.dynamicProperties,null)};for(this.maskElement=document.createElementNS(svgNS,v),f=u.length,i=0;f>i;i+=1)this.maskElement.appendChild(u[i]);this.maskElement.setAttribute("id",y),c>0&&p.setAttribute(g,"url(#"+y+")"),m.appendChild(this.maskElement)}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,1/255,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 EffectsManager(t,e,s){this.data=t,this.element=e;var i=t.ef;this.effectElements=[];var a,r,n=i.length;for(a=0;n>a;a++)switch(i[a].ty){case 0:r=new SliderEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 1:r=new AngleEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 2:r=new ColorEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 3:r=new PointEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r));break;case 4:r=new CheckboxEffect(i[a],e,s),this.effectElements.push(r.proxyFunction.bind(r))}}function BaseElement(){}function SVGBaseElement(t,e,s,i,a){this.globalData=s,this.comp=i,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=a?a.layerId:"ly_"+randomString(10),this.placeholder=a,this.init()}function ITextElement(t,e,s,i){}function SVGTextElement(t,e,s,i,a){this.textSpans=[],this.renderType="svg",this.parent.constructor.call(this,t,e,s,i,a)}function ICompElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a),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,i,a){this.assetData=s.getAssetData(t.refId),this.path=s.getPath(),this.parent.constructor.call(this,t,e,s,i,a)}function IShapeElement(t,e,s,i,a){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.parent.constructor.call(this,t,e,s,i,a)}function ShapeItemElement(t,e,s,i,a,r){this.shape=e,this.parentContainer=s,this.placeholder=i,this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=r,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,a,[]),styleUnselectableDiv(this.shape)}function ISolidElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a)}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),this.layers=t.layers,this.data.tm&&(this.tm=PropertyFactory.getProp(this.data,this.data.tm,0,s.frameRate,this.dynamicProperties,this.comp))}function CVImageElement(t,e,s){this.animationItem=s.renderer.animationItem,this.assetData=this.animationItem.getAssetData(t.refId),this.path=this.animationItem.getPath(),this.parent.constructor.call(this,t,e,s),this.animationItem.pendingElements+=1}function CVMaskElement(t,e,s){this.data=t,this.element=e,this.globalData=s,this.dynamicProperties=[],this.masksProperties=this.data.masksProperties,this.ctx=this.element.canvasContext,this.viewData=new Array(this.masksProperties.length);var i,a=this.masksProperties.length;for(i=0;a>i;i++)this.viewData[i]=PropertyFactory.getShapeProp(this.element,this.masksProperties[i],3,this.dynamicProperties,null)}function CVShapeElement(t,e,s){this.shapes=[],this.stylesList=[],this.viewData=[],this.shapesData=t.shapes,this.firstFrame=!0,this.parent.constructor.call(this,t,e,s)}function CVShapeItemElement(t,e,s){this.lcEnum={1:"butt",2:"round",3:"butt"},this.ljEnum={1:"miter",2:"round",3:"bevel"},this.stylesList=[],this.viewData=[],this.elemData=t,this.data=t.shapes,this.globalData=s,this.firstFrame=!0,this.searchShapes(this.data,this.viewData,e,[])}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.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.parent.constructor.call(this,t,e,s),this.renderedLetters=[]}function HBaseElement(t,e,s,i,a){this.globalData=s,this.comp=i,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=a?a.layerId:"ly_"+randomString(10),this.placeholder=a,this.init()}function HSolidElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a)}function HCompElement(t,e,s,i,a){this.parent.constructor.call(this,t,e,s,i,a),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,i,a){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.parent.constructor.call(this,t,e,s,i,a)}function HTextElement(t,e,s,i,a){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.parent.constructor.call(this,t,e,s,i,a)}var svgNS="http://www.w3.org/2000/svg",Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=1,this.props[4]=0,this.props[5]=0,this}function e(t){if(0===t)return this;var e=Math.cos(t),s=Math.sin(t);return this._t(e,s,-s,e,0,0)}function s(t,e){return this._t(1,e,t,1,0,0)}function i(t,e){return this.shear(Math.tan(t),Math.tan(e))}function a(t,e){var s=Math.cos(e),i=Math.sin(e);return this._t(s,i,-i,s,0,0)._t(1,0,Math.tan(t),1,0,0)._t(s,-i,i,s,0,0)}function r(t,e){return 1==t&&1==e?this:this._t(t,0,0,e,0,0)}function n(t,e,s,i,a,r){return this.props[0]=t,this.props[1]=e,this.props[2]=s,this.props[3]=i,this.props[4]=a,this.props[5]=r,this}function o(t,e){return(0!==t||0!==e)&&(this.props[4]=this.props[0]*t+this.props[2]*e+this.props[4],this.props[5]=this.props[1]*t+this.props[3]*e+this.props[5]),this}function h(t,e,s,i,a,r){if(1===t&&0===e&&0===s&&1===i)return(0!==a||0!==r)&&(this.props[4]=this.props[0]*a+this.props[2]*r+this.props[4],this.props[5]=this.props[1]*a+this.props[3]*r+this.props[5]),this;var n=this.props[0],o=this.props[1],h=this.props[2],l=this.props[3],p=this.props[4],m=this.props[5];return this.props[0]=n*t+h*e,this.props[1]=o*t+l*e,this.props[2]=n*s+h*i,this.props[3]=o*s+l*i,this.props[4]=n*a+h*r+p,this.props[5]=o*a+l*r+m,this}function l(t){t.props[0]=this.props[0],t.props[1]=this.props[1],t.props[2]=this.props[2],t.props[3]=this.props[3],t.props[4]=this.props[4],t.props[5]=this.props[5]}function p(t,e){return{x:t*this.props[0]+e*this.props[2]+this.props[4],y:t*this.props[1]+e*this.props[3]+this.props[5]}}function m(t,e){return t*this.props[0]+e*this.props[2]+this.props[4]}function f(t,e){return t*this.props[1]+e*this.props[3]+this.props[5]}function d(t,e){return[t*this.props[0]+e*this.props[2]+this.props[4],t*this.props[1]+e*this.props[3]+this.props[5]]}function c(t,e){return bm_rnd(t*this.props[0]+e*this.props[2]+this.props[4])+","+bm_rnd(t*this.props[1]+e*this.props[3]+this.props[5])}function u(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5]]}function y(){return this.cssParts[1]=this.props.join(","),this.cssParts.join("")}function v(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.skew=i,this.skewFromAxis=a,this.shear=s,this.scale=r,this.setTransform=n,this.translate=o,this.transform=h,this.applyToPoint=p,this.applyToX=m,this.applyToY=f,this.applyToPointArray=d,this.applyToPointStringified=c,this.toArray=u,this.toCSS=y,this.toString=v,this.clone=l,this._t=this.transform,this.props=[1,0,0,1,0,0],this.cssParts=["matrix(","",")"]}}(),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 i=(new Date).getTime(),a=Math.max(0,16-(i-t)),r=window.setTimeout(function(){e(i+a)},a);return t=i+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var subframeEnabled=!0,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,defaultCurveSegments=50,degToRads=Math.PI/180;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,i){return 0>t&&(t=0),0>e&&(e=0),0>i&&(i=0),"#"+s[t]+s[e]+s[i]}}(),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]]}}(),bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var s=document.createElement("span");s.style.fontFamily=e;var i=document.createElement("span");i.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(i),document.body.appendChild(s);var a=i.offsetWidth;return i.style.fontFamily=t+", "+e,{node:i,w:a,parent:s}}function e(){var t,s,i,a=this.fonts.length,r=a;for(t=0;a>t;t+=1)this.fonts[t].loaded?r-=1:(s=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,s.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(s=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,s.offsetWidth!==i&&(r-=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!==r&&Date.now()-this.initTime<o?setTimeout(e.bind(this),20):this.loaded=!0}function s(){if(window.Typekit&&window.Typekit.load)try{Typekit.load({async:!1})}catch(t){console.log("errwor",t)}else setTimeout(s,50)}function i(i,a){if(!i)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=i.list);if(i.tk){var r=document.createElement("script");r.setAttribute("src",i.tk),a.appendChild(r),s()}var n,o=i.list,h=o.length;for(n=0;h>n;n+=1){if(o[n].loaded=!1,o[n].monoCase=t(o[n].fFamily,"monospace"),o[n].sansCase=t(o[n].fFamily,"sans-serif"),o[n].fPath&&o[n].fPath){var r=document.createElement("style");r.type="text/css",r.innerHTML="@font-face {font-family: "+o[n].fFamily+"; font-style: normal; src: url('"+o[n].fPath+"');}",a.appendChild(r)}this.fonts.push(o[n])}e.bind(this)()}function a(t){this.chars=t}function r(t,e,s){for(var i=0,a=this.chars.length;a>i;){if(this.chars[i].ch===t&&this.chars[i].style===e&&this.chars[i].fFamily===s)return this.chars[i];i+=1}}function n(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 o=5e3,h=function(){this.fonts=[],this.chars=null,this.loaded=!1,this.initTime=Date.now()};return h.prototype.addChars=a,h.prototype.addFonts=i,h.prototype.getCharData=r,h.prototype.getFontByName=n,h}(),ExpressionManager=function(){function sum(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("object"==typeof t&&"number"==typeof e)return t[0]=t[0]+e,t;if("number"==typeof t&&"object"==typeof e)return e[0]=t+e[0],e;if("object"==typeof t&&"object"==typeof e){for(var s=0,i=t.length,a=e.length,r=[];i>s||a>s;)r[s]=t[s]&&e[s]?t[s]+e[s]:t[s]||e[s],s+=1;return r}return 0}function sub(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("object"==typeof t&&"number"==typeof e)return t[0]=t[0]-e,t;if("number"==typeof t&&"object"==typeof e)return e[0]=t-e[0],e;if("object"==typeof t&&"object"==typeof e){for(var s=0,i=t.length,a=e.length,r=[];i>s||a>s;)r[s]=t[s]&&e[s]?t[s]-e[s]:t[s]||e[s],s+=1;return r}return 0}function mul(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;var s,i;if("object"==typeof t&&"number"==typeof e){for(i=t.length,s=0;i>s;s+=1)t[s]=t[s]*e;return t}if("number"==typeof t&&"object"==typeof e){for(i=e.length,s=0;i>s;s+=1)e[s]=t*e[s];return e}return 0}function div(t,e){if("number"==typeof t&&"number"==typeof e)return t/e;var s,i;if("object"==typeof t&&"number"==typeof e){for(i=t.length,s=0;i>s;s+=1)t[s]=t[s]/e;return t}if("number"==typeof t&&"object"==typeof e){for(i=e.length,s=0;i>s;s+=1)e[s]=t/e[s];return e}return 0}function clamp(t,e,s){return Math.min(Math.max(t,e),s)}function random(t,e){if(e||(e=0),t>e){var s=e;e=t,t=s}return t+Math.random()*(e-t)}function initiateExpression(elem,data){function effect(t){return elem.effectsManager.getEffect(t)}function nearestKey(t){var e=0,s=data.k.length,i={};for(e=0;s>e;e+=1){if(t===data.k[e].t){i.index=e;break}if(t<data.k[e].t){i.index=e;break}if(t>data.k[e].t&&e===s-1){i.index=s-1;break}}return i}function key(t){t-=1;var e,s={time:data.k[t].t/thisComp.globalData.frameRate};e=t===data.k.length-1?data.k[t-1].e:data.k[t].s;var i,a=e.length;for(i=0;a>i;i+=1)s[i]=e[i];return s}function execute(){"textSelector"===this.type&&(textIndex=this.textIndex,textTotal=this.textTotal),transform||(transform=elem.transform),!content&&elem.content&&(content=elem.content.bind(elem)),this.getPreValue&&this.getPreValue(),value=this.pv,time=this.comp.renderedFrame/this.comp.globalData.frameRate,bindedFn();var t,e;if(this.mult)if("number"==typeof this.v)this.v*=this.mult;else for(e=this.v.length,value===this.v&&(this.v=2===e?[value[0],value[1]]:[value[0],value[1],value[2]]),t=0;e>t;t+=1)this.v[t]*=this.mult;if("number"==typeof this.v)this.lastValue!==this.v&&(this.lastValue=this.v,this.mdf=!0);else for(e=this.v.length,t=0;e>t;t+=1)this.v[t]!==this.lastValue[t]&&(this.lastValue[t]=this.v[t],this.mdf=!0)}var val=data.x,transform,content,effect,thisComp=elem.comp,fnStr="var fn = function(){"+val+";this.v = $bm_rt;}";eval(fnStr);var bindedFn=fn.bind(this),numKeys=data.k?data.k.length:0,time,value,textIndex,textTotal;return execute}var ob={};return ob.initiateExpression=initiateExpression,ob}();!function(){ExpressionComp.prototype.layer=function(t){for(var e=0,s=this.layers.length;s>e;){if(this.layers[e].nm===t)return this.elements[e];e+=1}}}(),ShapeInterface.prototype.fillInterface=function(t){var e={get color(){return t.c.k&&t.c.getValue(),[t.c.pv[0],t.c.pv[1],t.c.pv[2]]},get opacity(){return t.o.k&&t.o.getValue(),t.o.pv}};return e},ShapeInterface.prototype.strokeInterface=function(t,e){var s={get color(){return e.c.k&&e.c.getValue(),[e.c.pv[0],e.c.pv[1],e.c.pv[2]]},get opacity(){return e.o.k&&e.o.getValue(),e.o.pv},get strokeWidth(){return e.w.k&&e.w.getValue(),e.w.pv},dashOb:{},get dash(){var s,i=e.d,a=t.d,r=a.length;for(s=0;r>s;s+=1)i.dataProps[s].p.k&&i.dataProps[s].p.getValue(),this.dashOb[a[s].nm]=i.dataProps[s].p.v;return this.dashOb}};return s},ShapeInterface.prototype.shapeInterface=function(t){var e={get shape(){return t.sh.k&&t.sh.getValue(),t.sh.pv}};return e},ShapeInterface.prototype.ellipseInterface=function(t){var e={get size(){return t.sh.s.k&&t.sh.s.getValue(),[t.sh.s.pv[0],t.sh.s.pv[1]]},get position(){return t.sh.p.k&&t.sh.p.getValue(),[t.sh.p.pv[0],t.sh.p.pv[1]]}};return e},ShapeInterface.prototype.rectangleInterface=function(t){var e="tm"===t.sh.ty?t.sh.prop:t.sh,s={get size(){return e.s.k&&e.s.getValue(),[e.s.pv[0],e.s.pv[1]]},get position(){return e.p.k&&e.p.getValue(),[e.p.pv[0],e.p.pv[1]]},get roundness(){return e.r.k&&e.r.getValue(),e.r.pv}};return s},ShapeInterface.prototype.trimInterface=function(t){var e={get start(){return t.tr.s.k&&t.tr.s.getValue(),t.tr.s.pv},get end(){return t.tr.e.k&&t.tr.e.getValue(),t.tr.e.pv},get offset(){return t.tr.o.k&&t.tr.o.getValue(),t.tr.o.pv}};return e},ShapeInterface.prototype.transformInterface=function(t){var e={get opacity(){return t.transform.mProps.o.k&&t.transform.mProps.o.getValue(),t.transform.mProps.o.pv},get position(){return t.transform.mProps.p.k&&t.transform.mProps.p.getValue(),[t.transform.mProps.p.pv[0],t.transform.mProps.p.pv[1]]},get anchorPoint(){return t.transform.mProps.a.k&&t.transform.mProps.a.getValue(),[t.transform.mProps.a.pv[0],t.transform.mProps.a.pv[1]]},get scale(){return t.transform.mProps.s.k&&t.transform.mProps.s.getValue(),[t.transform.mProps.s.pv[0],t.transform.mProps.s.pv[1]]},get rotation(){return t.transform.mProps.r.k&&t.transform.mProps.r.getValue(),t.transform.mProps.r.pv}};return e},ShapeInterface.prototype.groupInterface=function(t,e,s){var i,a,r=[],n=t.length;for(i=0;n>i;i+=1)"gr"===t[i].ty?(a={},this.groupInterface(t[i].it,e[i].it,a),r.push(a)):"sh"===t[i].ty?(a=this.shapeInterface(e[i]),r.push(a)):"fl"===t[i].ty?(a=this.fillInterface(e[i]),r.push(a)):"st"===t[i].ty?(a=this.strokeInterface(t[i],e[i]),r.push(a)):"el"===t[i].ty?(a=this.ellipseInterface(e[i]),r.push(a)):"rc"===t[i].ty?(a=this.rectangleInterface(e[i]),r.push(a)):"tr"===t[i].ty?s.transform=this.transformInterface(e[i]):"tm"===t[i].ty?(a=this.trimInterface(e[i]),r.push(a)):r.push("");s.content=function(e){var s,i=t.length;for(s=0;i>s;s+=1)if(t[s].nm===e)return r[s]}},ShapeInterface.prototype.buildExpressionInterface=function(){this.groupInterface(this.shapesData,this.viewData,this)};var PropertyFactory=function(){function t(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var t=this.comp.renderedFrame-this.offsetTime;if(t===this.lastFrame||this.lastFrame!==d&&(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,i=0,a=this.keyframes.length-1,r=1,n=!0;n;){if(e=this.keyframes[i],s=this.keyframes[i+1],i==a-1&&t>=s.t-this.offsetTime){e.h&&(e=s);break}if(s.t-this.offsetTime>t)break;a-1>i?i+=r:n=!1}var o,h,l,p,m,f=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?m=e.__fnct:(m=bez.getEasingCurve(e.o.x,e.o.y,e.i.x,e.i.y,e.n),e.__fnct=m),l=m("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime));var y,v=c.segmentLength*l,g=0;for(r=1,n=!0,p=c.points.length;n;){if(g+=c.points[f].partialLength*r,0===v||0===l||f==c.points.length-1){for(h=c.points[f].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?c.points[f].point[o]*this.mult:c.points[f].point[o],this.pv[o]=c.points[f].point[o],this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}if(v>g&&v<g+c.points[f+1].partialLength){for(y=(v-g)/c.points[f+1].partialLength,h=c.points[f].point.length,o=0;h>o;o+=1)this.v[o]=this.mult?(c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y)*this.mult:c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.pv[o]=c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}p-1>f&&1==r||f>0&&-1==r?f+=r:n=!1}}}else{var b,E,P,S,C,k=!1;for(a=e.s.length,i=0;a>i;i+=1)1!==e.h&&(e.o.x instanceof Array?(k=!0,e.__fnct||(e.__fnct=[]),e.__fnct[i]||(b=e.o.x[i]||e.o.x[0],E=e.o.y[i]||e.o.y[0],P=e.i.x[i]||e.i.x[0],S=e.i.y[i]||e.i.y[0])):(k=!1,e.__fnct||(b=e.o.x,E=e.o.y,P=e.i.x,S=e.i.y)),k?e.__fnct[i]?m=e.__fnct[i]:(m=bez.getEasingCurve(b,E,P,S),e.__fnct[i]=m):e.__fnct?m=e.__fnct:(m=bez.getEasingCurve(b,E,P,S),e.__fnct=m),l=t>=s.t-this.offsetTime?1:t<e.t-this.offsetTime?0:m("",t-(e.t-this.offsetTime),0,1,s.t-this.offsetTime-(e.t-this.offsetTime))),C=1===e.h?e.s[i]:e.s[i]+(e.e[i]-e.s[i])*l,1===a?(this.v=this.mult?C*this.mult:C,
+this.pv=C,this.lastPValue!=this.pv&&(this.mdf=!0,this.lastPValue=this.pv)):(this.v[i]=this.mult?C*this.mult:C,this.pv[i]=C,this.lastPValue[i]!==this.pv[i]&&(this.mdf=!0,this.lastPValue[i]=this.pv[i]))}}this.lastFrame=t}}function e(){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime;if(this.lastFrame!==d&&(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,i;if(t<this.keyframes[0].t-this.offsetTime)this.mdf=!0,e=this.keyframes[0].s[0],i=!0;else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)this.mdf=!0,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],i=!0;else{this.mdf=!0;for(var a,r,n,o,h,l,p=0,m=this.keyframes.length-1,f=1,c=!0;c&&(a=this.keyframes[p],r=this.keyframes[p+1],!(r.t-this.offsetTime>t&&1==f));)m-1>p&&1==f||p>0&&-1==f?p+=f:c=!1;var u;if(1!==a.h){var y;a.__fnct?y=a.__fnct:(y=bez.getEasingCurve(a.o.x,a.o.y,a.i.x,a.i.y),a.__fnct=y),u=t>=r.t-this.offsetTime?1:t<a.t-this.offsetTime?0:y("",t-(a.t-this.offsetTime),0,1,r.t-this.offsetTime-(a.t-this.offsetTime)),s=a.e[0]}e=a.s[0],i=1===a.h}for(o=this.v.i.length,l=e.i[0].length,n=0;o>n;n+=1)for(h=0;l>h;h+=1)i?(this.v.i[n][h]=e.i[n][h],this.v.o[n][h]=e.o[n][h],this.v.v[n][h]=e.v[n][h],this.pv.i[n][h]=e.i[n][h],this.pv.o[n][h]=e.o[n][h],this.pv.v[n][h]=e.v[n][h]):(this.v.i[n][h]=e.i[n][h]+(s.i[n][h]-e.i[n][h])*u,this.v.o[n][h]=e.o[n][h]+(s.o[n][h]-e.o[n][h])*u,this.v.v[n][h]=e.v[n][h]+(s.v[n][h]-e.v[n][h])*u,this.pv.i[n][h]=e.i[n][h]+(s.i[n][h]-e.i[n][h])*u,this.pv.o[n][h]=e.o[n][h]+(s.o[n][h]-e.o[n][h])*u,this.pv.v[n][h]=e.v[n][h]+(s.v[n][h]-e.v[n][h])*u)}this.lastFrame=t}function s(t,e){this.getExpression=ExpressionManager.initiateExpression,e.x&&(this.k=!0,this.x=!0,this.getValue&&(this.getPreValue=this.getValue),this.getValue=this.getExpression(t,e))}function i(t,e,i){this.mult=i,this.v=i?e.k*i:e.k,this.pv=e.k,this.mdf=!1,this.comp=t.comp,this.k=!1,s.bind(this)(t,e)}function a(t,e,i){this.mult=i,this.mdf=!1,this.comp=t.comp,this.k=!1,s.bind(this)(t,e),this.v=new Array(e.k.length),this.pv=new Array(e.k.length);var a,r=e.k.length;for(a=0;r>a;a+=1)this.v[a]=i?e.k[a]*i:e.k[a],this.pv[a]=e.k[a]}function r(e,i,a){this.keyframes=i.k,this.offsetTime=e.data.st,this.lastValue=-99999,this.lastPValue=-99999,this.frameId=-1,this.k=!0,this.mult=a,this.elem=e,this.comp=e.comp,this.lastFrame=d,this.v=a?i.k[0].s[0]*a:i.k[0].s[0],this.pv=i.k[0].s[0],this.getValue=t,s.bind(this)(e,i)}function n(e,i,a){this.keyframes=i.k,this.offsetTime=e.data.st,this.k=!0,this.mult=a,this.elem=e,this.comp=e.comp,this.getValue=t,this.frameId=-1,this.v=new Array(i.k[0].s.length),this.pv=new Array(i.k[0].s.length),this.lastValue=new Array(i.k[0].s.length),this.lastPValue=new Array(i.k[0].s.length),this.lastFrame=d,s.bind(this)(e,i)}function o(t,e,s,o,h){var l;if(2===s)l=new c(t,e,h);else if(7===s)l=new v(t,e,h);else if(e.k.length)if("number"==typeof e.k[0])l=new a(t,e,o);else switch(s){case 0:l=new r(t,e,o);break;case 1:l=new n(t,e,o)}else l=new i(t,e,o);return(l.k||l.x)&&h.push(l),l}function h(t,e,i){this.comp=t.comp,this.k=!1,this.mdf=!1,this.closed=3===i?e.cl:e.closed,this.numNodes=3===i?e.pt.k.v.length:e.ks.k.v.length,this.v=3===i?e.pt.k:e.ks.k;var a=3===i?e.pt:e.ks;this.pv=this.v,s.bind(this)(t,a)}function l(t,s,i){this.comp=t.comp,this.offsetTime=t.data.st,this.getValue=e,this.keyframes=3===i?s.pt.k:s.ks.k,this.k=!0,this.closed=3===i?s.cl:s.closed;var a,r=this.keyframes[0].s[0].i.length,n=this.keyframes[0].s[0].i[0].length;for(this.numNodes=r,this.v={i:new Array(r),o:new Array(r),v:new Array(r)},this.pv={i:new Array(r),o:new Array(r),v:new Array(r)},a=0;r>a;a+=1)this.v.i[a]=new Array(n),this.v.o[a]=new Array(n),this.v.v[a]=new Array(n),this.pv.i[a]=new Array(n),this.pv.o[a]=new Array(n),this.pv.v[a]=new Array(n);this.lastFrame=d}function p(t,e,s,i,a){var r;if(3===s||4===s){var n=3===s?e.pt.k:e.ks.k;r=n.length?new l(t,e,s):new h(t,e,s)}else 5===s?r=new y(t,e):6===s&&(r=new u(t,e));var o=!1;if(a)for(var p=0,m=a.length;m>p;){if(!a[p].closed){o=!0;break}p+=1}return o&&(r=new g(r,a)),r.k&&i.push(r),r}function m(t,e,s,i){return new b(t,e,s,i)}function f(t,e,s){switch(e.t){case 0:return new P(t,e,s);case 1:return new E(t,e)}}var d=-999999,c=function(){function t(){return this.p.k&&this.getValue(),this.p.pv}function e(){return this.a.k&&this.getValue(),this.a.pv}function s(){return this.r.k&&this.getValue(),this.r.pv}function i(){return this.s.k&&this.getValue(),this.s.pv}function a(){return this.o.k&&this.o.getValue(),this.o.pv}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.data.p.s?this.v.reset().translate(this.px.v,this.py.v).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]):this.v.reset().translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]))}}return function(n,h,l){this.elem=n,this.frameId=-1,this.dynamicProperties=[],this.mdf=!1,this.data=h,this.getValue=r,this.v=new Matrix,this.a=o(n,h.a,1,0,this.dynamicProperties),h.p.s?(this.px=o(n,h.p.x,0,0,this.dynamicProperties),this.py=o(n,h.p.y,0,0,this.dynamicProperties)):this.p=o(n,h.p,1,0,this.dynamicProperties),this.s=o(n,h.s,1,.01,this.dynamicProperties),this.r=o(n,h.r,0,degToRads,this.dynamicProperties),this.o=o(n,h.o,0,.01,l),this.dynamicProperties.length?l.push(this):this.data.p.s?this.v.translate(this.px.v,this.py.v).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]):this.v.translate(this.p.v[0],this.p.v[1]).rotate(this.r.v).scale(this.s.v[0],this.s.v[1]).translate(-this.a.v[0],-this.a.v[1]),Object.defineProperty(this,"position",{get:t}),Object.defineProperty(this,"anchorPoint",{get:e}),Object.defineProperty(this,"rotation",{get:s}),Object.defineProperty(this,"scale",{get:i}),Object.defineProperty(this,"opacity",{get:a})}}(),u=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,a=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-a],this.v.i[0]=[t-i*s,e-a],this.v.o[0]=[t+i*s,e-a],this.v.v[1]=[t+i,e],this.v.i[1]=[t+i,e-a*s],this.v.o[1]=[t+i,e+a*s],this.v.v[2]=[t,e+a],this.v.i[2]=[t+i*s,e+a],this.v.o[2]=[t-i*s,e+a],this.v.v[3]=[t-i,e],this.v.i[3]=[t-i,e+a*s],this.v.o[3]=[t-i,e-a*s]):(this.v.v[0]=[t,e-a],this.v.o[0]=[t-i*s,e-a],this.v.i[0]=[t+i*s,e-a],this.v.v[1]=[t-i,e],this.v.o[1]=[t-i,e+a*s],this.v.i[1]=[t-i,e-a*s],this.v.v[2]=[t,e+a],this.v.o[2]=[t+i*s,e+a],this.v.i[2]=[t-i*s,e+a],this.v.v[3]=[t+i,e],this.v.o[3]=[t+i,e-a*s],this.v.i[3]=[t+i,e+a*s])}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()}}var s=.5519;return function(s,i){this.v={v:new Array(4),i:new Array(4),o:new Array(4),c:!0},this.numNodes=4,this.d=i.d,this.dynamicProperties=[],i.closed=!0,this.closed=!0,this.elem=s,this.comp=s.comp,this.frameId=-1,this.mdf=!1,this.getValue=e,this.convertEllToPath=t,this.p=o(s,i.p,1,0,this.dynamicProperties),this.s=o(s,i.s,1,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertEllToPath()}}(),y=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,i=this.s.v[1]/2,a=bm_min(s,i,this.r.v),r=a*(1-.5519);2===this.d||1===this.d?(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+s,e-i+r],this.v.v[1]=[t+s,e+i-a],this.v.o[1]=[t+s,e+i-r],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+s-a,e+i],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+s-r,e+i],this.v.v[3]=[t-s+a,e+i],this.v.o[3]=[t-s+r,e+i],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-s,e+i-r],this.v.v[5]=[t-s,e-i+a],this.v.o[5]=[t-s,e-i+r],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-s+a,e-i],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-s+r,e-i],this.v.v[7]=[t+s-a,e-i],this.v.o[7]=[t+s-r,e-i],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+s,e-i+a],this.v.o[0]=[t+s,e-i+r],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+s-a,e-i],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+s-r,e-i],this.v.v[2]=[t-s+a,e-i],this.v.o[2]=[t-s+r,e-i],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-s,e-i+a],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-s,e-i+r],this.v.v[4]=[t-s,e+i-a],this.v.o[4]=[t-s,e+i-r],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-s+a,e+i],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-s+r,e+i],this.v.v[6]=[t+s-a,e+i],this.v.o[6]=[t+s-r,e+i],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+s,e+i-a],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+s,e+i-r])}return function(s,i){this.v={v:new Array(8),i:new Array(8),o:new Array(8),c:!0},this.numNodes=8,this.elem=s,this.comp=s.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.p=o(s,i.p,1,0,this.dynamicProperties),this.s=o(s,i.s,1,0,this.dynamicProperties),this.r=o(s,i.r,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertRectToPath()}}(),v=function(){function t(t){if(this.elem.globalData.frameId!==this.frameId||t){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(),this.dynamicProperties[e].mdf&&(this.mdf=!0);if(this.mdf||t){var i=this.o.v%360/360;if(0===i&&0===this.s.v&&1==this.e.v)return void(this.isTrimming=!1);this.isTrimming=!0,0>i&&(i+=1);var a=this.s.v+i,r=this.e.v+i;if(a>r){var n=a;a=r,r=n}this.sValue=a,this.eValue=r,this.oValue=i}}}return function(e,s){this.elem=e,this.frameId=-1,this.dynamicProperties=[],this.sValue=0,this.eValue=0,this.oValue=0,this.mdf=!1,this.getValue=t,this.k=!1,this.isTrimming=!1,this.comp=e.comp,this.s=o(e,s.s,0,.01,this.dynamicProperties),this.e=o(e,s.e,0,.01,this.dynamicProperties),this.o=o(e,s.o,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.getValue(!0)}}(),g=function(){function t(t,e){this.totalLength=0;var s,i=t.v,a=t.o,r=t.i,n=i.length;for(s=0;n-1>s;s+=1)this.lengths[s]=bez.getBezierLength(i[s],i[s+1],a[s],r[s+1]),this.totalLength+=this.lengths[s].addedLength;e&&(this.lengths[s]=bez.getBezierLength(i[s],i[0],a[s],r[0]),this.totalLength+=this.lengths[s].addedLength)}function e(t,e,s,i,a){this.nextO[this.segmentCount]=e,this.nextI[this.segmentCount+1]=s,this.nextV[this.segmentCount+1]=i,this.pathStarted?this.nextV[this.segmentCount]=t:(this.pathStarted=!0,this.v.s[this.segmentCount]=t),this.segmentCount+=1}function s(t){this.mdf=t?!0:!1,this.prop.k&&this.prop.getValue();var e=0,s=this.trims.length;for(this.pathStarted=!1;s>e;){if(this.trims[e].mdf){this.mdf=!0;break}e+=1}if(this.mdf=this.prop.mdf?!0:this.mdf,this.mdf){this.nextO.length=0,this.nextI.length=0,this.nextV.length=0,this.v.s.length=0;var i=this.prop.closed;this.getSegmentsLength(this.prop.v,i);var a,r,n,o,h,l,p=this.prop.v,m=this.trims.length;for(a=0;m>a;a+=1)if(this.trims[a].isTrimming){if(r=this.trims[a].eValue,n=this.trims[a].sValue,o=this.trims[a].oValue,r===n)return this.v.v=this.nextV,this.v.o=this.nextO,void(this.v.i=this.nextI);1>=r?(this.segments[0].s=this.totalLength*n,this.segments[0].e=this.totalLength*r,this.segments[1].vl=!1):n>=1?(this.segments[0].s=this.totalLength*(n-1),this.segments[0].e=this.totalLength*(r-1),this.segments[1].vl=!1):(this.segments[0].s=this.totalLength*n,this.segments[0].e=this.totalLength,this.segments[1].s=0,this.segments[1].e=this.totalLength*(r-1),this.segments[1].vl=!0),this.v.v=p.v,this.v.o=p.o,this.v.i=p.i,l=this.v.v.length;var f=0,d=0;s=this.segments[1].vl?2:1;var c;for(this.segmentCount=0,e=0;s>e;e+=1){for(f=0,h=1;l>h;h++)if(d=this.lengths[h-1].addedLength,f+d<this.segments[e].s)f+=d;else{if(f>this.segments[e].e)break;this.segments[e].s<=f&&this.segments[e].e>=f+d?this.addSegment(this.v.v[h-1],this.v.o[h-1],this.v.i[h],this.v.v[h],this.lengths[h-1]):(c=bez.getNewSegment(this.v.v[h-1],this.v.v[h],this.v.o[h-1],this.v.i[h],(this.segments[e].s-f)/d,(this.segments[e].e-f)/d,this.lengths[h-1]),this.addSegment(c.pt1,c.pt3,c.pt4,c.pt2)),f+=d}i!==!1?f<=this.segments[e].e&&(d=this.lengths[h-1].addedLength,this.segments[e].s<=f&&this.segments[e].e>=f+d?this.addSegment(this.v.v[h-1],this.v.o[h-1],this.v.i[0],this.v.v[0],this.lengths[h-1]):(c=bez.getNewSegment(this.v.v[h-1],this.v.v[0],this.v.o[h-1],this.v.i[0],(this.segments[e].s-f)/d,(this.segments[e].e-f)/d,this.lengths[h-1]),this.addSegment(c.pt1,c.pt3,c.pt4,c.pt2))):this.pathStarted=!1}i=!1}else this.v.v=p.v,this.v.o=p.o,this.v.i=p.i;this.nextV.length?(this.v.v=this.nextV,this.v.o=this.nextO,this.v.i=this.nextI):this.v.s.length=0,this.v.c=i}}return function(i,a){this.trims=[],this.k=!1,this.mdf=!1,this.ty="tm",this.pathStarted=!1,this.segments=[{s:0,e:0,vl:!0},{s:0,e:0,vl:!1}],this.nextO=[],this.nextV=[],this.nextI=[],this.v={i:null,o:null,v:null,s:[],c:!1};var r,n=a.length;for(r=0;n>r;r+=1)a[r].closed||(this.k=a[r].trimProp.k?!0:this.k,this.trims.push(a[r].trimProp));this.prop=i,n=this.prop.numNodes-1,n+=this.prop.closed?1:0,this.lengths=new Array(n),this.k=i.k?!0:this.k,this.totalLength=0,this.getValue=s,this.addSegment=e,this.getSegmentsLength=t,this.k||(this.prop.getValue(),this.getValue(!0))}}(),b=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,i,a){this.elem=e,this.frameId=-1,this.dataProps=new Array(s.length),this.renderer=i,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(s.length-1),this.dashoffset=0;var r,n,h=s.length;for(r=0;h>r;r+=1)n=o(e,s[r].v,0,0,a),this.k=n.k?!0:this.k,this.dataProps[r]={n:s[r].n,p:n};this.getValue=t,this.k?a.push(this):this.getValue(!0)}}(),E=function(){function t(t,e){return this.textIndex=t+1,this.textTotal=e,this.getValue(),this.v}return function(e,i){this.pv=1,this.comp=e.comp,this.mult=.01,this.type="textSelector",this.textTotal=i.totalChars,s.bind(this)(e,i),this.getMult=t}}(),P=function(){function t(){if(this.dynamicProperties.length){var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue()}var s=this.data.totalChars,i=2===this.data.r?1:100/s,a=this.o.v/i,r=this.s.v/i+a,n=this.e.v/i+a;if(r>n){var o=r;r=n,n=o}this.finalS=r,this.finalE=n}function e(t){var e=bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1),r=0,n=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)r=o===n?t>=o?1:0:s(0,i(.5/(o-n)+(t-n)/(o-n),1)),r=e("",r,0,1,1);else if(3==h)r=o===n?t>=o?0:1:1-s(0,i(.5/(o-n)+(t-n)/(o-n),1)),r=e("",r,0,1,1);else if(4==h)o===n?r=t>=o?0:1:(r=s(0,i(.5/(o-n)+(t-n)/(o-n),1)),.5>r?r*=2:r=1-r);else if(5==h)if(o===n)r=t>=o?0:1;else{var l=o-n;r=-4/(l*l)*t*t+4/l*t}else 6==h?r=o===n?t>=o?0:1:(1+(Math.cos(Math.PI+2*Math.PI*(t-n)/(o-n))+0))/2:t>=a(n)&&(r=0>t-n?1-(n-t):s(0,i(o-t,1)));return r}var s=Math.max,i=Math.min,a=Math.floor;return function(s,i,a){this.mdf=!1,this.k=!1,this.data=i,this.dynamicProperties=[],this.getValue=t,this.getMult=e,this.comp=s.comp,this.finalS=0,this.finalE=0,this.s=o(s,i.s||{k:0},0,0,this.dynamicProperties),this.e="e"in i?o(s,i.e,0,0,this.dynamicProperties):{v:2===i.r?i.totalChars:100},this.o=o(s,i.o||{k:0},0,0,this.dynamicProperties),this.xe=o(s,i.xe||{k:0},0,0,this.dynamicProperties),this.ne=o(s,i.ne||{k:0},0,0,this.dynamicProperties),this.dynamicProperties.length?a.push(this):this.getValue()}}(),S={};return S.getProp=o,S.getShapeProp=p,S.getDashProp=m,S.getTextSelectorProp=f,S}();SVGRenderer.prototype.createItem=function(t,e,s,i){switch(t.ty){case 2:return this.createImage(t,e,s,i);case 0:return this.createComp(t,e,s,i);case 1:return this.createSolid(t,e,s,i);case 4:return this.createShape(t,e,s,i);case 5:return this.createText(t,e,s,i);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},SVGRenderer.prototype.buildItems=function(t,e,s,i,a){var r,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),i||(i=this);var o;for(r=n-1;r>=0;r--)s[r]=this.createItem(t[r],e,i,a),0===t[r].ty&&(o=[],this.buildItems(t[r].layers,s[r].getDomElement(),o,s[r],s[r].placeholder),s[r].setElements(o)),t[r].td&&s[r+1].setMatte(s[r].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)if(t[i].id)for(r=0;h>r;)s[r].data.id==t[i].id&&(o=s[r],s[r]=this.createItem(t[i],e,this,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,s[r],s[i].placeholder),s[r].setElements(n))),r+=1;else{var l=this.createItem(t[i],e,this);s.push(l),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,l.getDomElement(),n,l),l.setElements(n))}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},SVGRenderer.prototype.createBase=function(t,e,s,i){return new SVGBaseElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,s,i){return new IShapeElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createText=function(t,e,s,i){return new SVGTextElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createImage=function(t,e,s,i){return new IImageElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createComp=function(t,e,s,i){return new ICompElement(t,e,this.globalData,s,i)},SVGRenderer.prototype.createSolid=function(t,e,s,i){return new ISolidElement(t,e,this.globalData,s,i)},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","xMidYMid meet"),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"),i=document.createElementNS(svgNS,"rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var a="animationMask_"+randomString(10);s.setAttribute("id",a),s.appendChild(i);var r=document.createElementNS(svgNS,"g");r.setAttribute("clip-path","url(#"+a+")"),this.animationItem.container.appendChild(r),e.appendChild(s),this.animationItem.container=r,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 i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;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=0;s>e;e++)this.elements[e].prepareFrame(t-this.layers[e].st);for(e=0;s>e;e++)this.elements[e].renderFrame()}},extendPrototype(ExpressionComp,SVGRenderer),CanvasRenderer.prototype.createItem=function(t,e){switch(t.ty){case 0:return this.createComp(t,e);case 1:return this.createSolid(t,e);case 2:return this.createImage(t,e);case 4:return this.createShape(t,e);case 5:return this.createText(t,e);case 99:return this.createPlaceHolder(t,e);default:return this.createBase(t,e)}return this.createBase(t,e)},CanvasRenderer.prototype.buildItems=function(t,e,s){e||(e=this.elements),s||(s=this);var i,a=t.length;for(i=0;a>i;i++)if(e[i]=this.createItem(t[i],s),0===t[i].ty){var r=[];this.buildItems(t[i].layers,r,e[i]),e[e.length-1].setElements(r)}},CanvasRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements);var r,n,o=s.length;for(i=0;a>i;i+=1)if(t[i].id)for(r=0;o>r;)s[r].data.id==t[i].id&&(s[r]=this.createItem(t[i],this),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,n,s[r]),s[r].setElements(n))),r+=1;else{var h=this.createItem(t[i],this);s.unshift(h),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,h),h.setElements(n))}},CanvasRenderer.prototype.createBase=function(t,e){return new CVBaseElement(t,e,this.globalData)},CanvasRenderer.prototype.createShape=function(t,e){return new CVShapeElement(t,e,this.globalData)},CanvasRenderer.prototype.createText=function(t,e){return new CVTextElement(t,e,this.globalData)},CanvasRenderer.prototype.createPlaceHolder=function(t){return new PlaceHolderElement(t,null,this.globalData)},CanvasRenderer.prototype.createImage=function(t,e){return new CVImageElement(t,e,this.globalData)},CanvasRenderer.prototype.createComp=function(t,e){return new CVCompElement(t,e,this.globalData)},CanvasRenderer.prototype.createSolid=function(t,e){return new CVSolidElement(t,e,this.globalData)},CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[2]||1!==t[3]||0!==t[4]||0!==t[5]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[2],t[3],t[4],t[5]);this.contextData.cTr.transform(t[0],t[1],t[2],t[3],t[4],t[5]);var e=this.contextData.cTr.props;this.canvasContext.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])}},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(6));var s,i=6,a=this.contextData.saved[this.contextData.cArrPos];for(s=0;i>s;s+=1)a[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],i=6,a=this.contextData.cTr.props;for(e=0;i>e;e+=1)a[e]=s[e];this.canvasContext.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),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.layers=t.layers,this.transformCanvas={},this.transformCanvas.w=t.w,this.transformCanvas.h=t.h,this.updateContainerSize(),this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,document)},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,i=this.transformCanvas.w/this.transformCanvas.h;i>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,this.transformCanvas.sy,this.transformCanvas.tx,this.transformCanvas.ty],this.globalData.cWidth=t,this.globalData.cHeight=e},CanvasRenderer.prototype.buildStage=function(t,e,s){s||(s=this.elements);var i,a,r=e.length;for(i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemHierarchy(a,s[i],e,a.parent,s,!0),0==a.ty&&this.buildStage(null,a.layers,s[i].getElements())},CanvasRenderer.prototype.buildItemHierarchy=function(t,e,s,i,a,r){var n=0,o=s.length;for(r&&e.resetHierarchy();o>n;)s[n].ind===i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemHierarchy(t,e,s,s[n].parent,a,!1)),n+=1},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&(this.animationItem.wrapper.innerHTML="");var t,e=this.layers.length;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.clearRect(0,0,this.globalData.cWidth,this.globalData.cHeight)):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()}},extendPrototype(ExpressionComp,CanvasRenderer),HybridRenderer.prototype.createItem=function(t,e,s,i){switch(t.ty){case 2:return this.createImage(t,e,s,i);case 0:return this.createComp(t,e,s,i);case 1:return this.createSolid(t,e,s,i);case 4:return this.createShape(t,e,s,i);case 5:return this.createText(t,e,s,i);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,s)},HybridRenderer.prototype.buildItems=function(t,e,s,i,a){var r,n=t.length;s||(s=this.elements),e||(e=this.animationItem.container),i||(i=this);var o;for(r=n-1;r>=0;r--)s[r]=this.createItem(t[r],e,i,a),0===t[r].ty&&(o=[],this.buildItems(t[r].layers,s[r].getDomElement(),o,s[r],s[r].placeholder),s[r].setElements(o)),t[r].td&&s[r+1].setMatte(s[r].layerId)},HybridRenderer.prototype.includeLayers=function(t,e,s){var i,a=t.length;s||(s=this.elements),e||(e=this.animationItem.container);var r,n,o,h=s.length;for(i=0;a>i;i+=1)for(r=0;h>r;){if(s[r].data.id==t[i].id){o=s[r],s[r]=this.createItem(t[i],e,this,o),0===t[i].ty&&(n=[],this.buildItems(t[i].layers,s[r].getDomElement(),n,s[r],s[i].placeholder),s[r].setElements(n));break}r+=1}for(i=0;a>i;i+=1)t[i].td&&s[i+1].setMatte(s[i].layerId)},HybridRenderer.prototype.createBase=function(t,e,s,i){return new SVGBaseElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},HybridRenderer.prototype.createShape=function(t,e,s,i){return s.isSvg?new IShapeElement(t,e,this.globalData,s,i):new HShapeElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createText=function(t,e,s,i){return s.isSvg?new SVGTextElement(t,e,this.globalData,s,i):new HTextElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createImage=function(t,e,s,i){return new IImageElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createComp=function(t,e,s,i){return s.isSvg?new ICompElement(t,e,this.globalData,s,i):new HCompElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.createSolid=function(t,e,s,i){return s.isSvg?new ISolidElement(t,e,this.globalData,s,i):new HSolidElement(t,e,this.globalData,s,i)},HybridRenderer.prototype.configAnimation=function(t){this.animationItem.container=document.createElement("div"),this.animationItem.container.style.width=t.w+"px",this.animationItem.container.style.height=t.h+"px",this.animationItem.container.style.transform="translate3d(0,0,0)",this.animationItem.container.style.position="absolute",this.animationItem.container.style.clip="rect(0px, "+t.w+"px, "+t.h+"px, 0px)",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,"svg");e.setAttribute("width","1"),e.setAttribute("height","1"),styleDiv(e),this.animationItem.container.appendChild(e);var s=document.createElementNS(svgNS,"defs");e.appendChild(s),this.globalData.defs=s,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,document)},HybridRenderer.prototype.buildStage=function(t,e,s){var i,a,r=e.length;for(s||(s=this.elements),i=r-1;i>=0;i--)a=e[i],void 0!==a.parent&&this.buildItemParenting(a,s[i],e,a.parent,s,!0),0===a.ty&&this.buildStage(s[i].getComposingElement(),a.layers,s[i].getElements())},HybridRenderer.prototype.buildItemParenting=function(t,e,s,i,a,r){t.parents||(t.parents=[]),r&&e.resetHierarchy();for(var n=0,o=s.length;o>n;)s[n].ind==i&&(e.getHierarchy().push(a[n]),void 0!==s[n].parent&&this.buildItemParenting(t,e,s,s[n].parent,a,!1)),n+=1},HybridRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;for(t=0;e>t;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0},HybridRenderer.prototype.updateContainerSize=function(){},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()}},extendPrototype(ExpressionComp,HybridRenderer),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.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)),console.log(2*this.storedData[t].x.v),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 i,a,r="";for(a=e.v.length,i=1;a>i;i+=1)1==i&&(r+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-1][1])+" "+bm_rnd(e.i[i][0])+","+bm_rnd(e.i[i][1])+" "+bm_rnd(e.v[i][0])+","+bm_rnd(e.v[i][1]);t.cl&&(r+=" C"+bm_rnd(e.o[i-1][0])+","+bm_rnd(e.o[i-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!==r&&(t.inv?s.elem.setAttribute("d",this.solidPath+r):s.elem.setAttribute("d",r),s.lastPath=r)},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},SliderEffect.prototype.proxyFunction=function(){return this.p.v},AngleEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,ColorEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,PointEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,CheckboxEffect.prototype.proxyFunction=SliderEffect.prototype.proxyFunction,EffectsManager.prototype.getEffect=function(t){for(var e=this.data.ef,s=0,i=e.length;i>s;){if(e[s].nm===t)return this.effectElements[s];s+=1}},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.isVisible=!1);var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t);return this.data.hasMask&&this.maskManager.prepareFrame(t),this.currentFrameNum=t,this.isVisible},BaseElement.prototype.init=function(){this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.dynamicProperties=[],this.currentFrameNum=-99999,this.lastNum=-99999,this.data.ef&&(this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties),this.effect=this.effectsManager.getEffect.bind(this.effectsManager)),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,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,BaseElement.prototype.mask=function(t){return this.maskManager.getMask(t)},createElement(BaseElement,SVGBaseElement),SVGBaseElement.prototype.appendNodeToParent=function(t){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"),i=randomString(10);s.setAttribute("id",i),s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%");var a=document.createElementNS(svgNS,"feComponentTransfer");a.setAttribute("in","SourceGraphic"),s.appendChild(a);var r=document.createElementNS(svgNS,"feFuncA");r.setAttribute("type","table"),r.setAttribute("tableValues","1.0 0.0"),a.appendChild(r),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(#"+i+")"),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||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement.setAttribute("id",this.data.ln)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.data.hasMask&&(this.finalTransform.matMdf&&this.layerElement.setAttribute("transform","matrix("+s.props.join(",")+")"),this.finalTransform.opMdf&&this.layerElement.setAttribute("opacity",this.finalTransform.opacity)),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getDomElement=function(){return this.layerElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")},SVGBaseElement.prototype.hide=function(){},ITextElement.prototype.init=function(){this.parent.init.call(this);var t=this.data;this.renderedLetters=[],this.viewData={m:{a:PropertyFactory.getProp(this,t.t.m.a,1,0,this.dynamicProperties)}};var e=this.data.t;if(e.a.length){this.viewData.a=new Array(e.a.length);var s,i,a,r=e.a.length;for(s=0;r>s;s+=1)a=e.a[s],i={a:{},s:{}},"r"in a.a&&(i.a.r=PropertyFactory.getProp(this,a.a.r,0,degToRads,this.dynamicProperties)),"sk"in a.a&&(i.a.sk=PropertyFactory.getProp(this,a.a.sk,0,degToRads,this.dynamicProperties)),"sa"in a.a&&(i.a.sa=PropertyFactory.getProp(this,a.a.sa,0,degToRads,this.dynamicProperties)),"s"in a.a&&(i.a.s=PropertyFactory.getProp(this,a.a.s,1,.01,this.dynamicProperties)),"a"in a.a&&(i.a.a=PropertyFactory.getProp(this,a.a.a,1,0,this.dynamicProperties)),"o"in a.a&&(i.a.o=PropertyFactory.getProp(this,a.a.o,0,.01,this.dynamicProperties)),"p"in a.a&&(i.a.p=PropertyFactory.getProp(this,a.a.p,1,0,this.dynamicProperties)),"sw"in a.a&&(i.a.sw=PropertyFactory.getProp(this,a.a.sw,0,0,this.dynamicProperties)),"sc"in a.a&&(i.a.sc=PropertyFactory.getProp(this,a.a.sc,1,0,this.dynamicProperties)),"fc"in a.a&&(i.a.fc=PropertyFactory.getProp(this,a.a.fc,1,0,this.dynamicProperties)),"t"in a.a&&(i.a.t=PropertyFactory.getProp(this,a.a.t,0,0,this.dynamicProperties)),i.s=PropertyFactory.getTextSelectorProp(this,a.s,this.dynamicProperties),i.s.t=a.s.t,this.viewData.a[s]=i}else this.viewData.a=[];e.p&&"m"in e.p&&(this.viewData.p={f:PropertyFactory.getProp(this,e.p.f,0,0,this.dynamicProperties),l:PropertyFactory.getProp(this,e.p.l,0,0,this.dynamicProperties),m:this.maskManager.getMaskProperty(e.p.m)})},ITextElement.prototype.getMeasures=function(){var t,e,s,i,a=this.mHelper,r=this.renderType,n=this.data,o=n.t.d,h=o.l;if("m"in n.t.p){var l=this.viewData.p.m;if(!this.viewData.p.n||this.viewData.p.mdf){var p=l.v,m={tLength:0,segments:[]};i=p.v.length-1;var f;for(s=0;i>s;s+=1)f={s:p.v[s],e:p.v[s+1],to:[p.o[s][0]-p.v[s][0],p.o[s][1]-p.v[s][1]],ti:[p.i[s+1][0]-p.v[s+1][0],p.i[s+1][1]-p.v[s+1][1]]},bez.buildBezierData(f),m.tLength+=f.bezierData.segmentLength,m.segments.push(f);s=i,l.closed&&(f={s:p.v[s],e:p.v[0],to:[p.o[s][0]-p.v[s][0],p.o[s][1]-p.v[s][1]],ti:[p.i[0][0]-p.v[0][0],p.i[0][1]-p.v[0][1]]},bez.buildBezierData(f),m.tLength+=f.bezierData.segmentLength,m.segments.push(f)),this.viewData.p.pi=m}var d,c,u,m=this.viewData.p.pi,y=this.viewData.p.f.v,v=0,g=1,b=0,E=!0,P=m.segments;if(0>y&&l.closed)for(m.tLength<Math.abs(y)&&(y=-Math.abs(y)%m.tLength),v=P.length-1,u=P[v].bezierData.points,g=u.length-1;0>y;)y+=u[g].partialLength,g-=1,0>g&&(v-=1,u=P[v].bezierData.points,g=u.length-1);u=P[v].bezierData.points,c=u[g-1],d=u[g];var S,C,k=d.partialLength}i=h.length,t=0,e=0;var w,x,D,I,F,T=1.2*n.t.d.s*.714,M=!0,A=this.viewData,V=new Array(i),L=!1;I=A.a.length;var N,_,B,R,H,j,O,z,G,W,q,X,J,U,Y,K,Q=n._letters,$=-1,Z=y,tt=v,et=g,st=0;for(s=0;i>s;s+=1){switch(a.reset(),o.j){case 1:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line]),0);break;case 2:a.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[s].line])/2,0)}if(j=1,h[s].n)t=0,e+=o.yOffset,e+=M?1:0,y=Z,M=!1,st=0,"m"in n.t.p&&(v=tt,g=et,u=P[v].bezierData.points,c=u[g-1],d=u[g],k=d.partialLength,b=0),V[s]=this.emptyProp;else{if("m"in n.t.p){$!==h[s].ind&&(h[$]&&(y+=h[$].extra),y+=h[s].an/2,$=h[s].ind),y+=A.m.a.v[0]*h[s].an/200;var it=0;for(D=0;I>D;D+=1)w=A.a[D].a,"p"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),it+=w.p.v[0]*_);for(E=!0;E;)if(b+k>=y+it||!u){if(S=(y+it-b)/d.partialLength,R=c.point[0]+(d.point[0]-c.point[0])*S,H=c.point[1]+(d.point[1]-c.point[1])*S,a.translate(R,H),n.t.p.p){C=(d.point[1]-c.point[1])/(d.point[0]-c.point[0]);var at=180*Math.atan(C)/Math.PI;d.point[0]<c.point[0]&&(at+=180),a.rotate(at*Math.PI/180)}a.translate(0,A.m.a.v[1]*T/100+e),E=!1}else u&&(b+=d.partialLength,g+=1,g>=u.length&&(g=0,v+=1,P[v]?u=P[v].bezierData.points:l.closed?(g=0,v=0,u=P[v].bezierData.points):u=null),u&&(c=d,d=u[g],k=d.partialLength));B=h[s].an/2-h[s].add}else a.translate(t,e),B=h[s].an/2-h[s].add,a.translate(B,0),a.translate(A.m.a.v[0]*h[s].an/200,A.m.a.v[1]*T/100);for(st+=h[s].l/2,D=0;I>D;D+=1)w=A.a[D].a,"t"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"m"in n.t.p?y+=w.t*_:t+=w.t.v*_);for(st+=h[s].l/2,D=0;I>D;D+=1)w=A.a[D].a,"p"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"m"in n.t.p?a.translate(0,w.p.v[1]*_):a.translate(w.p.v[0]*_,w.p.v[1]*_));for(o.strokeWidthAnim&&(z=n.t.d.sw||0),o.strokeColorAnim&&(O=n.t.d.sc?[n.t.d.sc[0],n.t.d.sc[1],n.t.d.sc[2]]:[0,0,0]),o.fillColorAnim&&(G=[n.t.d.fc[0],n.t.d.fc[1],n.t.d.fc[2]]),D=0;I>D;D+=1){if(w=A.a[D].a,x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),"r"in w&&a.rotate(w.r.v*_),"sk"in w&&a.skewFromAxis(-(w.sk.v*_),-w.sa.v*_),"o"in w&&(j+=(w.o.v*_-j)*_),o.strokeWidthAnim&&"sw"in w&&(z+=w.sw.v*_),o.strokeColorAnim&&"sc"in w)for(W=0;3>W;W+=1)O[W]=Math.round(O[W]+(w.sc.v[W]-O[W])*_);if(o.fillColorAnim&&"fc"in w)for(W=0;3>W;W+=1)G[W]=Math.round(G[W]+(w.fc.v[W]-G[W])*_)}for(o.strokeWidthAnim&&(q=0>z?0:z),o.strokeColorAnim&&(X="rgb("+O[0]+","+O[1]+","+O[2]+")"),o.fillColorAnim&&(J="rgb("+G[0]+","+G[1]+","+G[2]+")"),D=0;I>D;D+=1)w=A.a[D].a,"s"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),a.scale(1+(w.s.v[0]-1)*_,1+(w.s.v[1]-1)*_));for(D=0;I>D;D+=1)w=A.a[D].a,"a"in w&&(x=A.a[D].s,_=x.getMult(h[s].anIndexes[D]),a.translate(-w.a.v[0]*_,-w.a.v[1]*_));"m"in n.t.p?(a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*T/100),y-=A.m.a.v[0]*h[s].an/200,h[s+1]&&$!==h[s+1].ind&&(y+=h[s].an/2,y+=o.tr/1e3*n.t.d.s),a.translate(-B,0)):(a.translate(-B,0),a.translate(-A.m.a.v[0]*h[s].an/200,-A.m.a.v[1]*T/100),t+=h[s].l+o.tr/1e3*n.t.d.s),"svg"===r?U=a.toCSS():Y=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]],K=j,Q?(N=Q[s],N.o!==K||N.sw!==q||N.sc!==X||N.fc!==J?(L=!0,F=new LetterProps(K,q,X,J,U,Y)):"svg"===r&&N.m!==U?(L=!0,F=new LetterProps(K,q,X,J,U)):"svg"===r||N.props[1]===a.props[1]&&N.props[2]===a.props[2]&&N.props[3]===a.props[3]&&N.props[4]===a.props[4]&&N.props[5]===a.props[5]?F=N:(L=!0,F=new LetterProps(K,q,X,J,null,[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5]]))):(L=!0,F=new LetterProps(K,q,X,J,U,Y)),V[s]=F}}L&&(this.renderedLetters=V)},ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,SVGTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d;this.innerElem=document.createElementNS(svgNS,"g"),t.fc?this.innerElem.setAttribute("fill","rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.innerElem.setAttribute("fill","rgba(0,0,0,0)"),t.sc&&(this.innerElem.setAttribute("stroke","rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")"),this.innerElem.setAttribute("stroke-width",t.sw)),this.innerElem.setAttribute("font-size",t.s);var e=this.globalData.fontManager.getFontByName(t.f);this.innerElem.setAttribute("font-family",e.fFamily);var s,i,a=t.fWeight,r=t.fStyle;this.innerElem.setAttribute("font-style",r),this.innerElem.setAttribute("font-weight",a),this.layerElement.appendChild(this.innerElem);var n=t.l;i=n.length;var o,h,l,p,m,f,d,c=this.mHelper,u="",y=this.data.singleShape;if(this.globalData.fontManager.chars&&y)var v=0,g=0,b=t.lineWidths,E=t.boxWidth,P=!0;for(s=0;i>s;s+=1){if(this.globalData.fontManager.chars?y&&0!==s||(o=document.createElementNS(svgNS,"path")):o=document.createElementNS(svgNS,"text"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var S=this.globalData.fontManager.getCharData(t.t.charAt(s),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),C=S.data;if(c.reset(),y&&n[s].n&&(v=0,g+=t.yOffset,g+=P?1:0,P=!1),C){if(h=C.shapes[0].it,y){switch(t.j){case 1:c.translate(t.justifyOffset+(E-b[n[s].line]),0);break;case 2:c.translate(t.justifyOffset+(E-b[n[s].line])/2,0)}c.translate(v,g)}else u="";for(p=h.length,c.scale(t.s/100,t.s/100),l=0;p>l;l+=1){for(f=h[l].ks.k.i.length,d=h[l].ks.k,m=1;f>m;m+=1)1==m&&(u+=" M"+c.applyToPointStringified(d.v[0][0],d.v[0][1])),u+=" C"+c.applyToPointStringified(d.o[m-1][0],d.o[m-1][1])+" "+c.applyToPointStringified(d.i[m][0],d.i[m][1])+" "+c.applyToPointStringified(d.v[m][0],d.v[m][1]);u+=" C"+c.applyToPointStringified(d.o[m-1][0],d.o[m-1][1])+" "+c.applyToPointStringified(d.i[0][0],d.i[0][1])+" "+c.applyToPointStringified(d.v[0][0],d.v[0][1]),u+="z"}y||o.setAttribute("d",u)}y?v+=n[s].l:this.innerElem.appendChild(o)}else o.textContent=n[s].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(o);this.textSpans.push(o)}y&&(o.setAttribute("d",u),this.innerElem.appendChild(o))},SVGTextElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},SVGTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask||(this.finalTransform.matMdf&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),this.finalTransform.opMdf&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),!this.data.singleShape){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].setAttribute("transform",n.m),this.textSpans[s].setAttribute("opacity",n.o),n.sw&&this.textSpans[s].setAttribute("stroke-width",n.sw),n.sc&&this.textSpans[s].setAttribute("stroke",n.sc),n.fc&&this.textSpans[s].setAttribute("fill",n.fc))}},SVGTextElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null};var PlaceHolderElement=function(t,e,s){if(this.data=t,this.globalData=s,e){this.parentContainer=e;var i=document.createElementNS(svgNS,"g");i.setAttribute("id",this.data.id),e.appendChild(i),this.phElement=i}this.layerId="ly_"+randomString(10)};PlaceHolderElement.prototype.prepareFrame=function(){},PlaceHolderElement.prototype.renderFrame=function(){},PlaceHolderElement.prototype.draw=function(){},createElement(SVGBaseElement,ICompElement),extendPrototype(ExpressionComp,ICompElement),ICompElement.prototype.getComposingElement=function(){return this.layerElement},ICompElement.prototype.hide=function(){if(!this.hidden){var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t].hide();this.hidden=!0}},ICompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},ICompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.data.hasMask?this.elements[e].renderFrame():this.elements[e].renderFrame(this.finalTransform);this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this.parent.destroy.call();var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t].destroy()},createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assetData.p),t.maskedElement=t.innerElem},s=new Image;s.addEventListener("load",e,!1),s.addEventListener("error",e,!1),s.src=this.path+this.assetData.p,this.parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln)},IImageElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},IImageElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||((this.finalTransform.matMdf||this.firstFrame)&&this.innerElem.setAttribute("transform","matrix("+this.finalTransform.mat.props.join(",")+")"),(this.finalTransform.opMdf||this.firstFrame)&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.ljEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},IShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),styleUnselectableDiv(this.layerElement),this.buildExpressionInterface()},IShapeElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var p;if(e[a].c=PropertyFactory.getProp(this,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this,t[a].o,0,.01,s),"st"==t[a].ty){if(p=document.createElementNS(svgNS,"g"),p.style.strokeLinecap=this.lcEnum[t[a].lc]||"round",p.style.strokeLinejoin=this.ljEnum[t[a].lj]||"round",p.style.fillOpacity=0,1==t[a].lj&&(p.style.strokeMiterlimit=t[a].ml),e[a].c.k||(p.style.stroke="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.strokeOpacity=e[a].o.v),e[a].w=PropertyFactory.getProp(this,t[a].w,0,null,s),e[a].w.k||(p.style.strokeWidth=e[a].w.v),t[a].d){var m=PropertyFactory.getDashProp(this,t[a].d,"svg",s);m.k||(p.style.strokeDasharray=m.dasharray,p.style.strokeDashoffset=m.dashoffset),e[a].d=m}}else p=document.createElementNS(svgNS,"path"),e[a].c.k||(p.style.fill="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.fillOpacity=e[a].o.v);this.layerElement===this.parentContainer?this.appendNodeToParent(p):this.layerElement.appendChild(p),this.stylesList.push({pathElement:p,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),i.length&&(t[a].trimmed=!0),e[a].sh=PropertyFactory.getShapeProp(this,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var y={closed:!1,trimProp:PropertyFactory.getProp(this,t[a],7,null,s)};e[a]={tr:y.trimProp},i.push(y),l.push(y)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},IShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();this.hidden=!1;var s=this.data.hasMask?this.transformHelper:this.finalTransform;this.renderShape(s,null,null,!0)},IShapeElement.prototype.hide=function(){if(!this.hidden){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode));this.hidden=!0}},IShapeElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.shapesData,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},IShapeElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var p=r.s?r.s:[];for(a=1;i>a;a+=1)p[a-1]?(e.st&&(h+=" M"+p[a-1][0]+","+p[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[a-1][0],p[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(p[0]?(e.st&&(h+=" M"+p[0][0]+","+p[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[0][0],p[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},IShapeElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.pathElement.style.fill="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.fillOpacity=e.o.v*s.opacity)},IShapeElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&a.k&&(a.mdf||this.firstFrame)&&(i.pathElement.style.strokeDasharray=a.dasharray,i.pathElement.style.strokeDashoffset=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.pathElement.style.stroke="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.strokeOpacity=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.pathElement.style.strokeWidth=e.w.v)},IShapeElement.prototype.destroy=function(){this.parent.destroy.call(),this.shapeData=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},extendPrototype(ShapeInterface,IShapeElement),ShapeItemElement.prototype.appendNodeToParent=SVGBaseElement.prototype.appendNodeToParent,ShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o=t.length-1,h=[],l=[];for(a=o;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){e[a]={};var p;if(e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),
+"st"==t[a].ty){if(p=document.createElementNS(svgNS,"g"),p.style.strokeLinecap=this.lcEnum[t[a].lc]||"round",p.style.strokeLinejoin=this.ljEnum[t[a].lj]||"round",p.style.fillOpacity=0,1==t[a].lj&&(p.style.strokeMiterlimit=t[a].ml),e[a].c.k||(p.style.stroke="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.strokeOpacity=e[a].o.v),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(p.style.strokeWidth=e[a].w.v),t[a].d){var m=PropertyFactory.getDashProp(this.elemData,t[a].d,"svg",s);m.k?e[a].d=m:(p.style.strokeDasharray=m.dasharray,p.style.strokeDashoffset=m.dashoffset)}}else p=document.createElementNS(svgNS,"path"),e[a].c.k||(p.style.fill="rgb("+e[a].c.v[0]+","+e[a].c.v[1]+","+e[a].c.v[2]+")"),e[a].o.k||(p.style.fillOpacity=e[a].o.v);this.shape===this.parentContainer?this.appendNodeToParent(p):this.shape.appendChild(p),this.stylesList.push({pathElement:p,type:t[a].ty,d:"",ld:"",mdf:!1}),e[a].style=this.stylesList[this.stylesList.length-1],h.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={elements:[],styles:[],lStr:""};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d,c=!1,u=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(c=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[a].elements.push({ty:this.stylesList[r].type,el:d})):(u=!0,e[a].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[a].st=c,e[a].fl=u}else if("tm"==t[a].ty){var y={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(y),l.push(y)}for(o=h.length,a=0;o>a;a+=1)h[a].closed=!0;for(o=l.length,a=0;o>a;a+=1)l[a].closed=!0},ShapeItemElement.prototype.getElement=function(){return this.shape},ShapeItemElement.prototype.hideShape=function(){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode))},ShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){for(r=this.stylesList.length,a=0;r>a;a+=1)"0"===this.stylesList[a].ld&&(this.stylesList[a].ld="1",this.stylesList[a].pathElement.style.display="block"),"fl"===this.stylesList[a].type&&(this.stylesList[a].mdf||this.firstFrame)&&this.stylesList[a].pathElement.setAttribute("d",this.stylesList[a].d);this.firstFrame&&(this.firstFrame=!1)}},ShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v,n="",o="",h="";if(r.v){i=r.v.length;var l=s.matMdf||e.sh.mdf||this.firstFrame;if(l){var p=r.s?r.s:[];for(a=1;i>a;a+=1)p[a-1]?(e.st&&(h+=" M"+p[a-1][0]+","+p[a-1][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[a-1][0],p[a-1][1]))):1==a&&(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[a][0]+","+r.i[a][1]+" "+r.v[a][0]+","+r.v[a][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[a][0],r.i[a][1])+" "+s.mat.applyToPointStringified(r.v[a][0],r.v[a][1]));1==i&&(p[0]?(e.st&&(h+=" M"+p[0][0]+","+p[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(p[0][0],p[0][1]))):(e.st&&(h+=" M"+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" M"+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1])))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&(h+=" C"+r.o[a-1][0]+","+r.o[a-1][1]+" "+r.i[0][0]+","+r.i[0][1]+" "+r.v[0][0]+","+r.v[0][1]),e.fl&&(o+=" C"+s.mat.applyToPointStringified(r.o[a-1][0],r.o[a-1][1])+" "+s.mat.applyToPointStringified(r.i[0][0],r.i[0][1])+" "+s.mat.applyToPointStringified(r.v[0][0],r.v[0][1]))),e.st&&(n="matrix("+s.mat.props.join(",")+")"),e.lStr=o}else o=e.lStr;for(i=e.elements.length,a=0;i>a;a+=1)"st"===e.elements[a].ty?((e.sh.mdf||this.firstFrame)&&e.elements[a].el.setAttribute("d",h),(s.matMdf||this.firstFrame)&&e.elements[a].el.setAttribute("transform",n)):(e.elements[a].st.mdf=l?!0:e.elements[a].st.mdf,e.elements[a].st.d+=o)}},ShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.pathElement.style.fill="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.fillOpacity=e.o.v*s.opacity)},ShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.pathElement.style.strokeDasharray=a.dasharray,i.pathElement.style.strokeDashoffset=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.pathElement.style.stroke="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.pathElement.style.strokeOpacity=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.pathElement.style.strokeWidth=e.w.v)},ShapeItemElement.prototype.destroy=function(t,e){this.shape=null,this.data=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement===this.parentContainer?this.appendNodeToParent(t):this.layerElement.appendChild(t),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.innerElem=t},ISolidElement.prototype.hide=IImageElement.prototype.hide,ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy,createElement(BaseElement,CVBaseElement),CVBaseElement.prototype.createElements=function(){},CVBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(!this.isVisible)return this.isVisible;this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v;var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]);return this.data.hasMask&&(this.globalData.renderer.save(!0),this.maskManager.renderFrame(s)),this.isVisible},CVBaseElement.prototype.getCurrentAnimData=function(){return this.currentAnimData},CVBaseElement.prototype.addMasks=function(t){this.maskManager=new CVMaskElement(t,this,this.globalData)},CVBaseElement.prototype.destroy=function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager&&this.maskManager.destroy()},CVBaseElement.prototype.mHelper=new Matrix,createElement(CVBaseElement,CVCompElement),CVCompElement.prototype.prepareFrame=function(t){if(this.parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var s,i=this.elements.length;for(s=0;i>s;s+=1)this.elements[s].prepareFrame(e-this.layers[s].st)}},CVCompElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e,s=this.layers.length;for(e=s-1;e>=0;e-=1)this.elements[e].renderFrame(this.finalTransform);this.data.hasMask&&this.globalData.renderer.restore(!0),this.firstFrame&&(this.firstFrame=!1)}},CVCompElement.prototype.setElements=function(t){this.elements=t},CVCompElement.prototype.getElements=function(){return this.elements},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t].destroy();this.layers=null,this.elements=null,this.parent.destroy.call()},createElement(CVBaseElement,CVImageElement),CVImageElement.prototype.createElements=function(){var t=this,e=function(){t.animationItem.elementLoaded()},s=function(){t.failed=!0,t.animationItem.elementLoaded()};this.img=new Image,this.img.addEventListener("load",e,!1),this.img.addEventListener("error",s,!1),this.img.src=this.path+this.assetData.p,this.parent.createElements.call(this)},CVImageElement.prototype.renderFrame=function(t){if(!this.failed&&this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.drawImage(this.img,0,0),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},CVImageElement.prototype.destroy=function(){this.img=null,this.animationItem=null,this.parent.destroy.call()},CVMaskElement.prototype.getMaskProperty=function(t){return this.viewData[t]},CVMaskElement.prototype.prepareFrame=function(t){var e,s=this.dynamicProperties.length;for(e=0;s>e;e+=1)this.dynamicProperties[e].getValue(t)},CVMaskElement.prototype.renderFrame=function(t){var e,s,i,a,r,n=this.ctx,o=this.data.masksProperties.length,h=!1;for(e=0;o>e;e++)if("n"!==this.masksProperties[e].mode){h===!1&&(n.beginPath(),h=!0),this.masksProperties[e].inv&&(n.moveTo(0,0),n.lineTo(this.globalData.compWidth,0),n.lineTo(this.globalData.compWidth,this.globalData.compHeight),n.lineTo(0,this.globalData.compHeight),n.lineTo(0,0)),r=this.viewData[e].v,s=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.moveTo(s[0],s[1]);var l,p=r.v.length;for(l=1;p>l;l++)s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[l][0],r.i[l][1]),a=t.applyToPointArray(r.v[l][0],r.v[l][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1]);s=t.applyToPointArray(r.o[l-1][0],r.o[l-1][1]),i=t.applyToPointArray(r.i[0][0],r.i[0][1]),a=t.applyToPointArray(r.v[0][0],r.v[0][1]),n.bezierCurveTo(s[0],s[1],i[0],i[1],a[0],a[1])}h&&n.clip()},CVMaskElement.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].pv};e+=1}},CVMaskElement.prototype.destroy=function(){this.ctx=null},createElement(CVBaseElement,CVShapeElement),CVShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},CVShapeElement.prototype.ljEnum={1:"butt",2:"round",3:"butt"},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createElements=function(){this.parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),this.buildExpressionInterface()},CVShapeElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],p=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var m=PropertyFactory.getDashProp(this,t[a].d,"canvas",s);e[a].d=m,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),i.length&&(t[a].trimmed=!0),e[a].sh=PropertyFactory.getShapeProp(this,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this,t[a],7,null,s)};i.push(u),p.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=p.length,a=0;h>a;a+=1)p[a].closed=!0},CVShapeElement.prototype.renderFrame=function(t){this.parent.renderFrame.call(this,t)!==!1&&(this.renderShape(this.finalTransform,null,null,!0),this.data.hasMask&&this.globalData.renderer.restore(!0))},CVShapeElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.shapesData,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var p,m,f,d,c,u,y,v=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(y=this.stylesList[a].type,"st"!==y||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,m=c.length,"st"===y?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml||0):g.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),"st"!==y&&g.beginPath(),p=0;m>p;p+=1){for("st"===y?(v.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[p].tr),u=c[p].nodes):u=c[p].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===y&&(g.stroke(),v.restore())}"st"!==y&&g.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.viewData.length=0,this.parent.destroy.call()},extendPrototype(ShapeInterface,CVShapeElement),CVShapeItemElement.prototype.dashResetter=[],CVShapeItemElement.prototype.searchShapes=function(t,e,s,i){var a,r,n,o,h=t.length-1,l=[],p=[];for(a=h;a>=0;a-=1)if("fl"==t[a].ty||"st"==t[a].ty){if(o={type:t[a].ty,elements:[]},e[a]={},e[a].c=PropertyFactory.getProp(this.elemData,t[a].c,1,null,s),e[a].c.k||(o.co="rgb("+bm_floor(e[a].c.v[0])+","+bm_floor(e[a].c.v[1])+","+bm_floor(e[a].c.v[2])+")"),e[a].o=PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),"st"==t[a].ty&&(o.lc=this.lcEnum[t[a].lc]||"round",o.lj=this.ljEnum[t[a].lj]||"round",1==t[a].lj&&(o.ml=t[a].ml),e[a].w=PropertyFactory.getProp(this.elemData,t[a].w,0,null,s),e[a].w.k||(o.wi=e[a].w.v),t[a].d)){var m=PropertyFactory.getDashProp(this.elemData,t[a].d,"canvas",s);e[a].d=m,e[a].d.k||(o.da=e[a].d.dasharray,o["do"]=e[a].d.dashoffset)}this.stylesList.push(o),e[a].style=o,l.push(e[a].style)}else if("gr"==t[a].ty)e[a]={it:[]},this.searchShapes(t[a].it,e[a].it,s,i);else if("tr"==t[a].ty)e[a]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this.elemData,t[a].o,0,.01,s),mProps:PropertyFactory.getProp(this.elemData,t[a],2,null,s)},elements:[]};else if("sh"==t[a].ty||"rc"==t[a].ty||"el"==t[a].ty){e[a]={nodes:[],trNodes:[],tr:[0,0,0,0,0,0]};var f=4;"rc"==t[a].ty?f=5:"el"==t[a].ty&&(f=6),e[a].sh=PropertyFactory.getShapeProp(this.elemData,t[a],f,s,i),n=this.stylesList.length;var d=!1,c=!1;for(r=0;n>r;r+=1)this.stylesList[r].closed||(this.stylesList[r].elements.push(e[a]),"st"===this.stylesList[r].type?d=!0:c=!0);e[a].st=d,e[a].fl=c}else if("tm"==t[a].ty){var u={closed:!1,trimProp:PropertyFactory.getProp(this.elemData,t[a],7,null,s)};i.push(u),p.push(u)}for(h=l.length,a=0;h>a;a+=1)l[a].closed=!0;for(h=p.length,a=0;h>a;a+=1)p[a].closed=!0},CVShapeItemElement.prototype.renderShape=function(t,e,s,i){var a,r;if(!e)for(e=this.data,r=this.stylesList.length,a=0;r>a;a+=1)this.stylesList[a].d="",this.stylesList[a].mdf=!1;s||(s=this.viewData),r=e.length-1;var n,o;for(n=t,a=r;a>=0;a-=1)if("tr"==e[a].ty){n=s[a].transform;var h=s[a].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.reset(),t){var l=t.mat.props;n.opacity=t.opacity,n.opacity*=s[a].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}else n.opacity=n.op.o;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}else"sh"==e[a].ty||"el"==e[a].ty||"rc"==e[a].ty?this.renderPath(e[a],s[a],n):"fl"==e[a].ty?this.renderFill(e[a],s[a],n):"st"==e[a].ty?this.renderStroke(e[a],s[a],n):"gr"==e[a].ty?this.renderShape(n,e[a].it,s[a].it):"tm"==e[a].ty;if(i){r=this.stylesList.length;var p,m,f,d,c,u,y,v=this.globalData.renderer,g=this.globalData.canvasContext;for(a=0;r>a;a+=1)if(y=this.stylesList[a].type,"st"!==y||0!==this.stylesList[a].wi){for(v.save(),c=this.stylesList[a].elements,m=c.length,"st"===y?(g.strokeStyle=this.stylesList[a].co,g.lineWidth=this.stylesList[a].wi,g.lineCap=this.stylesList[a].lc,g.lineJoin=this.stylesList[a].lj,g.miterLimit=this.stylesList[a].ml):g.fillStyle=this.stylesList[a].co,v.ctxOpacity(this.stylesList[a].coOp),g.beginPath(),p=0;m>p;p+=1){for("st"===y?(v.save(),g.beginPath(),this.stylesList[a].da?(g.setLineDash(this.stylesList[a].da),g.lineDashOffset=this.stylesList[a]["do"],this.globalData.isDashed=!0):this.globalData.isDashed&&(g.setLineDash(this.dashResetter),this.globalData.isDashed=!1),v.ctxTransform(c[p].tr),u=c[p].nodes):u=c[p].trNodes,d=u.length,f=0;d>f;f+=1)"m"==u[f].t?g.moveTo(u[f].p[0],u[f].p[1]):g.bezierCurveTo(u[f].p1[0],u[f].p1[1],u[f].p2[0],u[f].p2[1],u[f].p3[0],u[f].p3[1]);"st"===y&&(g.stroke(),v.restore())}"st"!==y&&g.fill(),v.restore()}this.firstFrame&&(this.firstFrame=!1)}},CVShapeItemElement.prototype.renderPath=function(t,e,s){var i,a,r=e.sh.v;if(r.v){i=r.v.length;var n=s.matMdf||e.sh.mdf||this.firstFrame;if(n){var o=e.trNodes,h=e.nodes;o.length=0,h.length=0;var l=r.s?r.s:[];for(a=1;i>a;a+=1)l[a-1]?(e.st&&h.push({t:"m",p:l[a-1]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[a-1][0],l[a-1][1])})):1==a&&(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[a],p3:r.v[a]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[a][0],r.i[a][1]),p3:s.mat.applyToPointArray(r.v[a][0],r.v[a][1])});1==i&&(l[0]?(e.st&&h.push({t:"m",p:l[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(l[0][0],l[0][1])})):(e.st&&h.push({t:"m",p:r.v[0]}),e.fl&&o.push({t:"m",p:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])}))),i&&t.closed&&(!t.trimmed||r.c)&&(e.st&&h.push({t:"c",p1:r.o[a-1],p2:r.i[0],p3:r.v[0]}),e.fl&&o.push({t:"c",p1:s.mat.applyToPointArray(r.o[a-1][0],r.o[a-1][1]),p2:s.mat.applyToPointArray(r.i[0][0],r.i[0][1]),p3:s.mat.applyToPointArray(r.v[0][0],r.v[0][1])})),e.st&&(e.tr[0]=s.mat.props[0],e.tr[1]=s.mat.props[1],e.tr[2]=s.mat.props[2],e.tr[3]=s.mat.props[3],e.tr[4]=s.mat.props[4],e.tr[5]=s.mat.props[5]),e.nodes=h,e.trNodes=o}}},CVShapeItemElement.prototype.renderFill=function(t,e,s){var i=e.style;(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity)},CVShapeItemElement.prototype.renderStroke=function(t,e,s){var i=e.style,a=e.d;a&&(a.mdf||this.firstFrame)&&(i.da=a.dasharray,i["do"]=a.dashoffset),(e.c.mdf||this.firstFrame)&&(i.co="rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||s.opMdf||this.firstFrame)&&(i.coOp=e.o.v*s.opacity),(e.w.mdf||this.firstFrame)&&(i.wi=e.w.v)},CVShapeItemElement.prototype.destroy=function(){this.data=null,this.globalData=null,this.canvasContext=null},createElement(CVBaseElement,CVSolidElement),CVSolidElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext;this.globalData.renderer.save();var s=this.finalTransform.mat.props;this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.fillStyle=this.data.sc,e.fillRect(0,0,this.data.sw,this.data.sh),this.globalData.renderer.restore(this.data.hasMask),this.firstFrame&&(this.firstFrame=!1)}},createElement(CVBaseElement,CVTextElement),CVTextElement.prototype.init=ITextElement.prototype.init,CVTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,CVTextElement.prototype.getMult=ITextElement.prototype.getMult,CVTextElement.prototype.tHelper=document.createElement("canvas").getContext("2d"),CVTextElement.prototype.createElements=function(){this.parent.createElements.call(this);var t=this.data.t.d,e=!1;t.fc?(e=!0,this.values.fill="rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")"):this.values.fill="rgba(0,0,0,0)",this.fill=e;var s=!1;t.sc&&(s=!0,this.values.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.values.sWidth=t.sw);var i,a,r=this.globalData.fontManager.getFontByName(t.f),n=this.mHelper;this.stroke=s,this.values.fValue=t.s+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,a=t.t.length,this.tHelper.font=this.values.fValue;var o,h,l,p,m,f,d,c,u,y;for(i=0;a>i;i+=1){if(o=this.globalData.fontManager.getCharData(t.t.charAt(i),r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),n.reset(),n.scale(t.s/100,t.s/100),h=o.data)for(m=h.shapes[0].it,d=m.length,u=new Array(d),f=0;d>f;f+=1){for(p=m[f].ks.k.i.length,c=m[f].ks.k,y=[],l=1;p>l;l+=1)1==l&&y.push(n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),y.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[l][0],c.i[l][1]),n.applyToY(c.i[l][0],c.i[l][1]),n.applyToX(c.v[l][0],c.v[l][1]),n.applyToY(c.v[l][0],c.v[l][1]));y.push(n.applyToX(c.o[l-1][0],c.o[l-1][1]),n.applyToY(c.o[l-1][0],c.o[l-1][1]),n.applyToX(c.i[0][0],c.i[0][1]),n.applyToY(c.i[0][0],c.i[0][1]),n.applyToX(c.v[0][0],c.v[0][1]),n.applyToY(c.v[0][0],c.v[0][1])),u[f]=y}else u=[];this.textSpans.push({elem:u})}},CVTextElement.prototype.renderFrame=function(t){if(this.parent.renderFrame.call(this,t)!==!1){var e=this.canvasContext,s=this.finalTransform.mat.props;this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(s),this.globalData.renderer.ctxOpacity(this.finalTransform.opacity),e.font=this.values.fValue,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4,this.getMeasures();var i,a,r,n,o,h,l=this.renderedLetters,p=this.data.t.d.l;a=p.length;var m,f,d,c=null,u=null,y=null;for(i=0;a>i;i+=1)if(!p[i].n){if(m=l[i],this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(m.props),this.globalData.renderer.ctxOpacity(m.o),this.fill){for(m.fc?c!==m.fc&&(c=m.fc,e.fillStyle=m.fc):c!==this.values.fill&&(c=this.values.fill,e.fillStyle=this.values.fill),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(m.sw?y!==m.sw&&(y=m.sw,e.lineWidth=m.sw):y!==this.values.sWidth&&(y=this.values.sWidth,e.lineWidth=this.values.sWidth),m.sc?u!==m.sc&&(u=m.sc,e.strokeStyle=m.sc):u!==this.values.stroke&&(u=this.values.stroke,e.strokeStyle=this.values.stroke),f=this.textSpans[i].elem,n=f.length,this.globalData.canvasContext.beginPath(),r=0;n>r;r+=1)for(d=f[r],h=d.length,this.globalData.canvasContext.moveTo(d[0],d[1]),o=2;h>o;o+=6)this.globalData.canvasContext.bezierCurveTo(d[o],d[o+1],d[o+2],d[o+3],d[o+4],d[o+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}this.globalData.renderer.restore()}this.globalData.renderer.restore(this.data.hasMask)}},createElement(BaseElement,HBaseElement),HBaseElement.prototype.appendNodeToParent=function(t){if(this.placeholder){var e=this.placeholder.phElement;e.parentNode.insertBefore(t,e)}else this.parentContainer.appendChild(t)},HBaseElement.prototype.createElements=function(){this.data.hasMask?(this.layerElement=document.createElementNS(svgNS,"svg"),this.appendNodeToParent(this.layerElement),this.maskedElement=this.layerElement):this.layerElement=this.parentContainer,!this.data.ln||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement.setAttribute("id",this.data.ln)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},HBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,s=this.finalTransform.mat;if(t&&(e=t.mat.props,s.reset().transform(e[0],e[1],e[2],e[3],e[4],e[5]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.hierarchy){var i,a=this.hierarchy.length;for(t||s.reset(),i=a-1;i>=0;i-=1)this.finalTransform.matMdf=this.hierarchy[i].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[i].finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5]);e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,s.transform(e[0],e[1],e[2],e[3],e[4],e[5])):(s.props[0]=this.finalTransform.mProp.v.props[0],s.props[1]=this.finalTransform.mProp.v.props[1],s.props[2]=this.finalTransform.mProp.v.props[2],s.props[3]=this.finalTransform.mProp.v.props[3],s.props[4]=this.finalTransform.mProp.v.props[4],s.props[5]=this.finalTransform.mProp.v.props[5]));return this.layerElement.style.transform="matrix3d("+s.props[0]+","+s.props[1]+",0,0, "+s.props[2]+","+s.props[3]+",0,0, 0,0,1,0, "+s.props[4]+","+s.props[5]+",0,1)",this.layerElement.style.opacity=this.finalTransform.opacity,this.isVisible},HBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},HBaseElement.prototype.getDomElement=function(){return this.layerElement},HBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},HBaseElement.prototype.hide=function(){},createElement(HBaseElement,HSolidElement),HSolidElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),t.appendChild(e),this.layerElement=t,this.parentContainer.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln);var s=document.createElementNS(svgNS,"rect");s.setAttribute("width",this.data.sw),s.setAttribute("height",this.data.sh),s.setAttribute("fill",this.data.sc),e.appendChild(s),this.data.hasMask&&(this.maskedElement=s)},HSolidElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},HSolidElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),void(this.firstFrame&&(this.firstFrame=!1)))},HSolidElement.prototype.destroy=function(){this.parent.destroy.call(),this.innerElem=null},createElement(HBaseElement,HCompElement),extendPrototype(ExpressionComp,HCompElement),
+HCompElement.prototype.getDomElement=function(){return this.composingElement},HCompElement.prototype.getComposingElement=function(){return this.layerElement},HCompElement.prototype.createElements=function(){if(this.layerElement=document.createElement("div"),styleDiv(this.layerElement),this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.layerElement.style.clip="rect(0px, "+this.data.w+"px, "+this.data.h+"px, 0px)",this.layerElement!==this.parentContainer&&(this.placeholder=null),this.data.hasMask){var t=document.createElementNS(svgNS,"svg");t.setAttribute("width",this.data.w),t.setAttribute("height",this.data.h);var e=document.createElementNS(svgNS,"g");t.appendChild(e),this.layerElement.appendChild(t),this.maskedElement=e,this.composingElement=e}else this.composingElement=this.layerElement;this.appendNodeToParent(this.layerElement)},HCompElement.prototype.hide=ICompElement.prototype.hide,HCompElement.prototype.prepareFrame=ICompElement.prototype.prepareFrame,HCompElement.prototype.setElements=ICompElement.prototype.setElements,HCompElement.prototype.getElements=ICompElement.prototype.getElements,HCompElement.prototype.destroy=ICompElement.prototype.destroy,HCompElement.prototype.renderFrame=function(t){var e,s=this.parent.renderFrame.call(this,t),i=this.layers.length;if(s===!1)return void this.hide();for(this.hidden=!1,e=0;i>e;e+=1)this.elements[e].renderFrame();this.firstFrame&&(this.firstFrame=!1)},createElement(HBaseElement,HShapeElement);var parent=HShapeElement.prototype.parent;extendPrototype(IShapeElement,HShapeElement),HShapeElement.prototype.parent=parent,HShapeElement.prototype.createElements=function(){var t=document.createElement("div");styleDiv(t);var e=document.createElementNS(svgNS,"svg");if(e.setAttribute("width",this.data.bounds.r-this.data.bounds.l),e.setAttribute("height",this.data.bounds.b-this.data.bounds.t),e.setAttribute("viewBox",this.data.bounds.l+" "+this.data.bounds.t+" "+(this.data.bounds.r-this.data.bounds.l)+" "+(this.data.bounds.b-this.data.bounds.t)),e.style.transform="translate("+this.data.bounds.l+"px,"+this.data.bounds.t+"px)",this.data.hasMask){var s=document.createElementNS(svgNS,"g");t.appendChild(e),e.appendChild(s),this.maskedElement=s,this.layerElement=s}else t.appendChild(e),this.layerElement=e;this.parentContainer.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties,[]),this.buildExpressionInterface(),this.layerElement=t},HShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden=!1,void this.renderShape(this.transformHelper,null,null,!0))},createElement(HBaseElement,HTextElement),HTextElement.prototype.init=ITextElement.prototype.init,HTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,HTextElement.prototype.createElements=function(){var t=this.data.t.d,e=document.createElement("div");if(styleDiv(e),this.layerElement=e,this.data.hasMask){var s=document.createElementNS(svgNS,"svg");this.cont=s,this.compW=this.comp.data?this.comp.data.w:this.globalData.compSize.w,this.compH=this.comp.data?this.comp.data.h:this.globalData.compSize.h,s.setAttribute("width",this.compW),s.setAttribute("height",this.compH);var i=document.createElementNS(svgNS,"g");s.appendChild(i),e.appendChild(s),this.maskedElement=i,this.innerElem=i}else this.innerElem=e;this.parentContainer.appendChild(e),this.innerElem.style.fill=t.fc?"rgb("+t.fc[0]+","+t.fc[1]+","+t.fc[2]+")":"rgba(0,0,0,0)",t.sc&&(this.innerElem.style.stroke="rgb("+t.sc[0]+","+t.sc[1]+","+t.sc[2]+")",this.innerElem.style.strokeWidth=t.sw+"px"),this.innerElem.style.fontSize=t.s+"px";var a=this.globalData.fontManager.getFontByName(t.f);this.innerElem.style.fontFamily=a.fFamily;var r,n,o=t.fWeight,h=t.fStyle;this.innerElem.style.fontStyle=h,this.innerElem.style.fontWeight=o;var l=t.l;n=l.length;{var p,m,f,d,c,u,y,v,g,b=this.mHelper,E="";this.data.singleShape}for(r=0;n>r;r+=1){if(this.globalData.fontManager.chars?(p=document.createElementNS(svgNS,"path"),this.data.hasMask||(m=document.createElement("div"),f=document.createElementNS(svgNS,"svg"),m.appendChild(f),f.appendChild(p),styleDiv(m))):p=document.createElementNS(svgNS,"text"),p.setAttribute("stroke-linecap","butt"),p.setAttribute("stroke-linejoin","round"),p.setAttribute("stroke-miterlimit","4"),this.globalData.fontManager.chars){var P=this.globalData.fontManager.getCharData(t.t.charAt(r),a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),S=P.data;if(b.reset(),S){for(d=S.shapes[0].it,E="",u=d.length,b.scale(t.s/100,t.s/100),c=0;u>c;c+=1){for(v=d[c].ks.k.i.length,g=d[c].ks.k,y=1;v>y;y+=1)1==y&&(E+=" M"+b.applyToPointStringified(g.v[0][0],g.v[0][1])),E+=" C"+b.applyToPointStringified(g.o[y-1][0],g.o[y-1][1])+" "+b.applyToPointStringified(g.i[y][0],g.i[y][1])+" "+b.applyToPointStringified(g.v[y][0],g.v[y][1]);E+=" C"+b.applyToPointStringified(g.o[y-1][0],g.o[y-1][1])+" "+b.applyToPointStringified(g.i[0][0],g.i[0][1])+" "+b.applyToPointStringified(g.v[0][0],g.v[0][1]),E+="z"}p.setAttribute("d",E)}if(this.data.hasMask)this.innerElem.appendChild(p);else if(this.innerElem.appendChild(m),S){var C=Math.ceil(S.bounds.r*t.s/100),k=Math.floor(S.bounds.t*t.s/100);f.setAttribute("width",C-S.bounds.l),f.setAttribute("height",S.bounds.b-k),f.setAttribute("viewBox",S.bounds.l+" "+k+" "+(C-S.bounds.l)+" "+(S.bounds.b-k)),f.style.transform="translate("+S.bounds.l+"px,"+k+"px)"}}else p.textContent=l[r].val,p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(p);this.textSpans.push(this.data.hasMask?p:m),this.textPaths.push(p)}},HTextElement.prototype.hide=SVGTextElement.prototype.hide,HTextElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask&&this.finalTransform.matMdf&&(this.cont.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),this.cont.style.transform="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)"),!this.data.singleShape||this.firstFrame){this.getMeasures();var s,i,a=this.renderedLetters,r=this.data.t.d.l;i=r.length;var n;for(s=0;i>s;s+=1)r[s].n||(n=a[s],this.textSpans[s].style.transform=n.m,this.textSpans[s].style.opacity=n.o,n.sw&&this.textPaths[s].setAttribute("stroke-width",n.sw),n.sc&&this.textPaths[s].setAttribute("stroke",n.sc),n.fc&&this.textPaths[s].setAttribute("fill",n.fc));if(this.data.hasMask){var o=this.innerElem.getBBox();this.currentBBox.w!==o.width&&(this.currentBBox.w=o.width,this.cont.setAttribute("width",o.width)),this.currentBBox.h!==o.height&&(this.currentBBox.h=o.height,this.cont.setAttribute("height",o.height)),(this.currentBBox.w!==o.width||this.currentBBox.h!==o.height||this.currentBBox.x!==o.x||this.currentBBox.y!==o.y)&&(this.currentBBox.w=o.width,this.currentBBox.h=o.height,this.currentBBox.x=o.x,this.currentBBox.y=o.y,this.cont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),this.cont.style.transform="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)")}this.firstFrame&&(this.firstFrame=!1)}},HTextElement.prototype.destroy=SVGTextElement.prototype.destroy;var animationManager=function(){function t(t,e){if(!t)return null;for(var s=0;E>s;){if(v[s].elem==t&&null!==v[s].elem)return v[s].animation;s+=1}var i=new AnimationItem;return i.setData(t,e),v.push({elem:t,animation:i}),E+=1,i}function e(t){var e=new AnimationItem;return e.setParams(t),v.push({elem:null,animation:e}),E+=1,e}function s(t,e){var s;for(s=0;E>s;s+=1)v[s].animation.setSpeed(t,e)}function i(t,e){var s;for(s=0;E>s;s+=1)v[s].animation.setDirection(t,e)}function a(t){var e;for(e=0;E>e;e+=1)v[e].animation.play(t)}function r(t,e){b=!1,g=Date.now();var s;for(s=0;E>s;s+=1)v[s].animation.moveFrame(t,e)}function n(t){var e,s=t-g;for(e=0;E>e;e+=1)v[e].animation.renderer.destroyed?(v.splice(e,1),e-=1,E-=1):v[e].animation.advanceTime(s);g=t,requestAnimationFrame(n)}function o(t){g=t,requestAnimationFrame(n)}function h(t){var e;for(e=0;E>e;e+=1)v[e].animation.pause(t)}function l(t,e,s){var i;for(i=0;E>i;i+=1)v[i].animation.goToAndStop(t,e,s)}function p(t){var e;for(e=0;E>e;e+=1)v[e].animation.stop(t)}function m(t){var e;for(e=0;E>e;e+=1)v[e].animation.togglePause(t)}function f(t){var e;for(e=0;E>e;e+=1)v[e].animation.destroy(t)}function d(e,s,i){var a,r=document.getElementsByClassName("bodymovin"),n=r.length;for(a=0;n>a;a+=1)i&&r[a].setAttribute("data-bm-type",i),t(r[a],e);if(s&&0===n){i||(i="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",i),o.appendChild(h),t(h,e)}}function c(){var t;for(t=0;E>t;t+=1)v[t].animation.resize()}function u(){requestAnimationFrame(o)}var y={},v=[],g=0,b=!0,E=0;return setTimeout(u,0),y.registerAnimation=t,y.loadAnimation=e,y.setSpeed=s,y.setDirection=i,y.play=a,y.moveFrame=r,y.pause=h,y.stop=p,y.togglePause=m,y.searchAnimations=d,y.resize=c,y.start=u,y.goToAndStop=l,y.destroy=f,y}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.repeat="indefinite",this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.isScrolling=!1,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.renderedFrameCount=0,this.scaleMode="fit",this.math=Math,this.removed=!1,this.timeCompleted=0,this.segmentPos=0,this.segments=[]};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var s=t.animType?t.animType:t.renderer?t.renderer:"canvas";switch(s){case"canvas":this.renderer=new CanvasRenderer(this,t.renderer);break;case"svg":this.renderer=new SVGRenderer(this,t.renderer);break;case"hybrid":case"html":this.renderer=new HybridRenderer(this,t.renderer)}if(this.animType=s,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var i=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),i.open("GET",t.path,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)e.configAnimation(JSON.parse(i.responseText));else try{var t=JSON.parse(i.responseText);e.configAnimation(t)}catch(s){}}}},AnimationItem.prototype.setData=function(t,e){var s={wrapper:t,animationData:e?JSON.parse(e):null},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";""===a||(s.loop="false"===a?!1:"true"===a?!0:parseInt(a)),s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var r=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";"false"===r&&(s.prerender=!1),this.setParams(s)},AnimationItem.prototype.includeLayers=function(t){var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;n>s;s+=1)if(r[s].id)for(e=0;a>e;){if(i[e].id==r[s].id){i[e]=r[s];break}e+=1}else"svg"==this.animType?i.push(r[s]):i.unshift(r[s]);if(t.assets)for(a=t.assets.length,e=0;a>e;e+=1)this.animationData.assets.push(t.assets[e]);dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),this.renderer.buildStage(this.container,this.layers),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=new XMLHttpRequest,i=this,a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,s.open("GET",a,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)i.includeLayers(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);i.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.animationData._id=this.animationID,this.animationData._animType=this.animType,this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.loadSegments(),dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():this.checkLoaded()},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(this.renderer.buildItems(this.animationData.layers),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(this.renderer.buildStage(this.container,this.layers),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=subframeEnabled?this.currentRawFrame:this.math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1)},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0)},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?(this.isPaused=!1,this.play()):(this.isPaused=!0,this.pause()))},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,s){s&&this.name!=s||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.isPaused=!0)},AnimationItem.prototype.advanceTime=function(t){this.isPaused!==!0&&this.isScrolling!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier)},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.trigger("segmentStart")},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var s,i=t.length;for(s=0;i>s;s+=1)this.segments.push(t[s])}else this.segments.push(t);e&&(this.adjustSegment(this.segments.shift()),this.setCurrentRawFrameValue(0)),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||this.renderer.destroy()},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t;var e=!1;if(this.currentRawFrame>=this.totalFrames){if(this.segments.length&&(e=!0),this.loop===!1)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");if(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete")}else if(this.currentRawFrame<0)return this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1?(this.currentRawFrame=0,this.gotoFrame(),this.pause(),void this.trigger("complete")):(this.trigger("loopComplete"),this.currentRawFrame=this.totalFrames+this.currentRawFrame,void this.gotoFrame());if(e){var s=this.currentRawFrame%this.totalFrames;this.adjustSegment(this.segments.shift()),this.currentRawFrame=s}else this.currentRawFrame=this.currentRawFrame%this.totalFrames;this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;s>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames))},AnimationItem.prototype.addEventListener=_addEventListener,AnimationItem.prototype.removeEventListener=_removeEventListener,AnimationItem.prototype.triggerEvent=_triggerEvent,function(t){function e(t){animationManager.play(t)}function s(t){animationManager.pause(t)}function i(t){animationManager.togglePause(t)}function a(t,e){animationManager.setSpeed(t,e)}function r(t,e){animationManager.setDirection(t,e)}function n(t){animationManager.stop(t)}function o(t){animationManager.moveFrame(t)}function h(){E===!0?animationManager.searchAnimations(P,E,S):animationManager.searchAnimations()}function l(t){return animationManager.registerAnimation(t)}function p(){animationManager.resize()}function m(){animationManager.start()}function f(t,e,s){animationManager.goToAndStop(t,e,s)}function d(t){subframeEnabled=t}function c(t){return E===!0&&(t.animationData=JSON.parse(P)),animationManager.loadAnimation(t)}function u(t){return animationManager.destroy(t)}function y(t){if("string"==typeof t)switch(t){case"high":defaultCurveSegments=200;break;case"medium":defaultCurveSegments=50;break;case"low":defaultCurveSegments=10}else!isNaN(t)&&t>1&&(defaultCurveSegments=t);roundValues(defaultCurveSegments>=50?!1:!0)}function v(){"complete"===document.readyState&&(clearInterval(D),h())}function g(t){for(var e=x.split("&"),s=0;s<e.length;s++){var i=e[s].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}}var b={};b.play=e,b.pause=s,b.togglePause=i,b.setSpeed=a,b.setDirection=r,b.stop=n,b.moveFrame=o,b.searchAnimations=h,b.registerAnimation=l,b.loadAnimation=c,b.setSubframeRendering=d,b.resize=p,b.start=m,b.goToAndStop=f,b.destroy=u,b.setQuality=y,b.version="3.1.6",b.checkReady=v,t.bodymovin=b;var E="__[STANDALONE]__",P="__[ANIMATIONDATA]__",S="";if(E){var C=document.getElementsByTagName("script"),k=C.length-1,w=C[k],x=w.src.replace(/^[^\?]+\??/,"");S=g("renderer")}var D=setInterval(v,100)}(window);}(window));
\ No newline at end of file
diff --git a/player/index.html b/player/index.html
index 5e8018d..a2ff73a 100644
--- a/player/index.html
+++ b/player/index.html
@@ -76,7 +76,6 @@
      <script src="js/module.js"></script>
     <!-- endbuild -->
     <!-- <script src="bodymovin.js"></script> -->
-    <script src="js/utils/stats.js"></script>
 </head>
 <body>
 <canvas id="cvs" width="100" height="100" style="position: absolute;top:0;left: 0"></canvas>
@@ -87,7 +86,7 @@
     var animData = {
         container: document.getElementById('bodymovin'),
         renderer: 'svg',
-        loop: false,
+        loop: true,
         prerender: false,
         autoplay: true,
         path: 'exports/splitted/data.json'
@@ -95,6 +94,7 @@
     var anim = bodymovin.loadAnimation(animData);
 
     var secondPart = {"assets":[{"id":"comp_1","layers":[{"ddd":0,"ind":0,"ty":5,"nm":"90","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[378,462,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"t":{"d":{"s":71,"f":"MongolianBaiti","t":"90","j":0,"tr":0,"fc":[255,0,0]},"p":{},"m":{"g":1,"a":{"k":[0,0]}},"a":[]},"ip":0,"op":750,"st":0},{"ddd":0,"ind":1,"ty":5,"nm":"67","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[224,394,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"t":{"d":{"s":71,"f":"Impact","t":"67","j":0,"tr":0,"fc":[0,121,255]},"p":{},"m":{"g":1,"a":{"k":[0,0]}},"a":[]},"ip":0,"op":750,"st":0},{"ddd":0,"ind":2,"ty":5,"nm":"34","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[70,346,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"t":{"d":{"s":71,"f":"GrafolitaScript-Medium","t":"34","j":0,"tr":0,"fc":[255,0,0]},"p":{},"m":{"g":1,"a":{"k":[0,0]}},"a":[]},"ip":0,"op":750,"st":0},{"ddd":0,"ind":3,"ty":1,"nm":"Medium Red Solid 1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[300.019,461.73,0]},"a":{"k":[125,125,0]},"s":{"k":[64,100,100]}},"sw":250,"sh":250,"sc":"#c55252","ip":0,"op":750,"st":0},{"ddd":0,"ind":4,"ty":1,"nm":"Medium Magenta Solid 1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[198.5,435.5,0]},"a":{"k":[125,125,0]},"s":{"k":[100,100,100]}},"sw":250,"sh":250,"sc":"#0d1b70","ip":0,"op":750,"st":0},{"ddd":0,"ind":5,"ty":1,"nm":"Medium Magenta Solid 1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[444.341,537.73,0]},"a":{"k":[125,125,0]},"s":{"k":[100,100,100]}},"sw":250,"sh":250,"sc":"#0d1b70","ip":0,"op":750,"st":0}]}],"fonts":{"list":[{"fName":"GrafolitaScript-Medium","fFamily":"Grafolita Script","fStyle":"Medium","ascent":77.6046752929688},{"fName":"Impact","fFamily":"Impact","fStyle":"Regular","ascent":79.0985107421875},{"fName":"MongolianBaiti","fFamily":"Mongolian Baiti","fStyle":"Regular","ascent":69.3984985351563}]},"v":"3.1.6","layers":[{"ddd":0,"ind":0,"ty":0,"nm":"_texto_box 2","refId":"comp_1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[250,-58,0]},"a":{"k":[250,250,0]},"s":{"k":[100,100,100]}},"w":500,"h":500,"ip":111,"op":861,"st":111}],"ip":0,"op":750,"fr":25,"w":500,"h":500,"chars":[{"ch":"3","size":71,"style":"Medium","w":49.5,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[10.574,20.444],[46.426,11.481],[35.348,-15.409],[29.507,-16.818],[29.709,-17.524],[46.124,-25.983],[38.269,-48.843],[22.156,-47.535],[13.092,-39.377],[16.214,-28.904],[20.343,-29.306],[18.027,-33.334],[22.155,-44.714],[38.269,-39.78],[29.608,-20.443],[20.947,-14.904],[21.048,-11.279],[39.377,-7.251],[32.227,16.315],[8.057,9.769],[8.963,-2.719],[9.164,-6.143],[3.021,1.209]],"o":[[33.838,20.444],[46.426,-12.487],[29.91,-16.718],[29.507,-17.422],[37.464,-21.451],[46.124,-43.808],[26.083,-48.843],[15.61,-42.902],[13.092,-31.623],[19.437,-28.098],[18.732,-31.018],[18.027,-40.686],[33.938,-44.714],[38.269,-24.774],[21.249,-16.415],[20.947,-12.286],[27.997,-9.467],[39.377,10.574],[14.099,16.315],[8.057,-0.302],[10.474,-5.035],[5.136,-3.021],[3.021,13.999]],"v":[[21.249,20.444],[46.426,-0.906],[30.313,-16.617],[29.507,-17.12],[30.112,-17.725],[46.124,-35.147],[30.212,-48.843],[19.034,-45.319],[13.092,-35.651],[19.437,-28.098],[20.343,-29.306],[18.027,-35.449],[27.795,-44.714],[38.269,-33.536],[21.652,-17.825],[20.947,-13.293],[21.35,-10.373],[39.377,2.719],[23.465,16.315],[8.057,2.518],[10.474,-5.035],[9.164,-6.143],[3.021,5.64]]}},"nm":"3"}],"nm":"3"},{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[-10.675,0],[0,12.387],[5.035,1.208],[0,0.302],[-0.403,0.201],[0,9.164],[8.057,0],[3.122,-2.216],[0,-3.726],[-3.223,-0.806],[0,0],[0,2.115],[-5.64,0],[0,-6.244],[7.956,-2.618],[0,-1.611],[-0.302,-0.906],[0,-9.97],[8.762,0],[0,7.251],[-1.511,2.316],[0,0],[0,-4.431]],"o":[[12.589,0],[0,-11.581],[-0.403,-0.101],[0,-0.302],[7.352,-3.726],[0,-8.661],[-4.129,0],[-3.424,2.417],[0,4.028],[0,0],[-1.611,-1.712],[0,-5.237],[6.143,0],[0,8.762],[-0.403,1.41],[0,1.007],[6.647,0.906],[0,7.855],[-9.366,0],[0,-2.82],[0,0],[-4.028,3.122],[0,8.359]],"v":[[70.749,20.444],[95.926,-0.906],[79.813,-16.617],[79.007,-17.12],[79.611,-17.725],[95.624,-35.147],[79.712,-48.843],[68.533,-45.319],[62.592,-35.651],[68.936,-28.098],[69.843,-29.306],[67.526,-35.449],[77.295,-44.714],[87.769,-33.536],[71.152,-17.825],[70.447,-13.293],[70.85,-10.373],[88.876,2.719],[72.964,16.315],[57.556,2.518],[59.973,-5.035],[58.664,-6.143],[52.521,5.64]]}},"nm":"3"}],"nm":"3"}],"bounds":{"l":3,"t":-49,"b":21,"r":96}},"fFamily":"Grafolita Script"},{"ch":"4","size":71,"style":"Medium","w":50.3,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[54.987,-4.633],[44.312,-6.848],[42.801,-33.334],[40.687,-47.937],[11.884,-19.135],[7.15,-0.403],[22.961,-0.604],[28.198,15.107],[28.601,21.149],[35.248,19.537],[37.161,7.855],[49.145,-2.115]],"o":[[49.448,-5.942],[40.585,-20.645],[43.808,-46.728],[26.386,-38.974],[5.338,-3.928],[16.013,0],[28.702,8.56],[28.198,19.739],[31.924,21.149],[36.96,14.603],[43.909,-2.014],[54.684,-2.115]],"v":[[54.987,-4.633],[38.974,-7.352],[45.923,-45.016],[37.766,-48.138],[4.935,-6.546],[8.963,1.007],[29.91,-1.108],[28.198,17.725],[30.212,21.149],[36.96,18.329],[38.269,-1.712],[54.684,-2.115]]}},"nm":"4"},{"ind":1,"ty":"sh","closed":true,"ks":{"k":{"i":[[27.09,-7.956],[13.998,-7.754],[9.769,-7.755],[27.292,-32.932],[35.449,-40.585],[36.658,-40.284],[36.456,-38.571],[32.63,-20.041]],"o":[[19.739,-7.956],[9.869,-7.553],[15.509,-17.222],[34.946,-40.284],[36.356,-40.585],[36.658,-39.377],[34.442,-29.407],[29.004,-7.956]],"v":[[25.177,-7.956],[9.869,-7.553],[9.769,-7.755],[34.14,-39.478],[35.953,-40.585],[36.658,-39.78],[36.255,-37.665],[30.817,-7.855]]}},"nm":"4"}],"nm":"4"},{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[0,0],[5.338,0.504],[-3.122,11.682],[2.921,0.201],[6.949,-12.589],[-1.813,-1.41],[-6.949,0.504],[0,-2.618],[-1.611,0],[-1.712,1.208],[-1.108,9.567],[-5.539,0]],"o":[[-5.539,-1.309],[1.611,-13.293],[-2.115,-1.712],[-11.38,9.164],[0.403,2.618],[7.05,-1.007],[-1.208,9.668],[0,2.014],[1.712,0],[0,-3.726],[5.64,-0.302],[0,0]],"v":[[105.286,-4.633],[89.273,-7.352],[96.222,-45.016],[88.065,-48.138],[55.234,-6.546],[59.262,1.007],[80.209,-1.108],[78.497,17.725],[80.511,21.149],[87.259,18.329],[88.568,-1.712],[104.984,-2.115]]}},"nm":"4"},{"ind":1,"ty":"sh","closed":true,"ks":{"k":{"i":[[1.913,0],[4.129,-0.201],[0,0],[-6.848,6.546],[-0.504,0],[0,-0.504],[0.201,-0.906],[1.813,-12.186]],"o":[[-5.438,0],[0,0],[5.74,-9.467],[0.806,-0.806],[0.403,0],[0,0.403],[-1.813,8.258],[-1.813,-0.101]],"v":[[75.476,-7.956],[60.168,-7.553],[60.068,-7.755],[84.439,-39.478],[86.252,-40.585],[86.957,-39.78],[86.554,-37.665],[81.116,-7.855]]}},"nm":"4"},{"ty":"mm","mm":1,"nm":"Merge Paths 1"}],"nm":"4"}],"bounds":{"l":4,"t":-49,"b":22,"r":106}},"fFamily":"Grafolita Script"},{"ch":"6","size":71,"style":"Regular","w":54.15,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[50.114,-67.106],[44.515,-76.139],[32.878,-80.615],[18.888,-79.907],[9.309,-74.951],[4.207,-66.284],[3.516,-53.645],[3.516,-33.301],[3.669,-18.701],[5.363,-9.757],[11.653,-2.149],[22.77,1.514],[36.075,0.879],[45.012,-3.442],[49.821,-10.53],[50.879,-20.052],[50.879,-31.885],[50.504,-40.235],[47.248,-48.047],[38.525,-52.93],[29.639,-52.4],[24.251,-48.698],[23.242,-59.18],[23.291,-64.111],[23.86,-66.861],[25.993,-68.408],[29.158,-68.083],[30.948,-65.975],[31.152,-61.735],[50.879,-58.057]],"o":[[47.054,-73.616],[37.419,-79.72],[22.852,-80.615],[12.019,-77.075],[5.338,-69.287],[3.654,-59.936],[3.516,-44.238],[3.516,-24.577],[4.288,-12.647],[9.041,-4.256],[18.424,0.781],[32.34,1.514],[42.488,-1.661],[48.69,-8.032],[50.667,-15.934],[50.879,-25.586],[50.879,-36.54],[49.007,-45.703],[41.715,-51.953],[32.047,-52.93],[25.733,-50.285],[23.242,-46.582],[23.242,-62.142],[23.487,-66.065],[25.163,-68.098],[28.206,-68.408],[30.558,-66.78],[31.111,-64.054],[31.152,-58.057],[50.879,-63.005]],"v":[[48.584,-70.361],[40.967,-77.93],[27.344,-80.615],[15.454,-78.491],[7.324,-72.119],[3.931,-63.11],[3.516,-44.238],[3.516,-33.301],[3.979,-15.674],[7.202,-7.007],[15.039,-0.684],[28.076,1.514],[39.282,-0.391],[46.851,-5.737],[50.244,-13.232],[50.879,-25.586],[50.879,-31.885],[49.756,-42.969],[44.482,-50],[34.912,-52.93],[27.686,-51.343],[23.242,-46.582],[23.242,-59.18],[23.389,-65.088],[24.512,-67.48],[27.002,-68.408],[29.858,-67.432],[31.03,-65.015],[31.152,-58.057],[50.879,-58.057]]}},"nm":"6"},{"ind":1,"ty":"sh","closed":true,"ks":{"k":{"i":[[31.152,-18.604],[30.696,-12.72],[27.994,-10.645],[24.748,-11.182],[23.242,-15.608],[23.242,-33.398],[23.559,-38.24],[25.83,-40.723],[29.606,-40.201],[31.152,-36.197]],"o":[[31.152,-14.958],[28.873,-11.06],[25.748,-10.645],[23.543,-13.33],[23.242,-19.092],[23.242,-36.295],[24.829,-40.226],[28.596,-40.723],[30.843,-38.118],[31.152,-33.398]],"v":[[31.152,-18.604],[29.785,-11.89],[27.148,-10.645],[24.146,-12.256],[23.242,-19.092],[23.242,-33.398],[24.194,-39.233],[27.197,-40.723],[30.225,-39.16],[31.152,-33.398]]}},"nm":"6"}],"nm":"6"},{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[1.53,3.255],[3.548,1.791],[5.534,0],[3.434,-1.416],[1.985,-2.832],[0.276,-3.174],[0,-9.407],[0,0],[-0.31,-3.027],[-1.839,-2.75],[-3.386,-1.465],[-5.306,0],[-3.207,1.27],[-1.839,2.295],[-0.423,2.702],[0,5.534],[0,0],[0.748,2.734],[2.766,1.953],[3.613,0],[1.953,-1.057],[1.009,-2.116],[0,0],[-0.098,0.977],[-0.652,0.619],[-1.009,0],[-0.7,-0.651],[-0.082,-0.96],[0,-3.678],[0,0]],"o":[[-1.53,-3.255],[-3.548,-1.79],[-4.492,0],[-3.435,1.416],[-1.986,2.832],[-0.277,3.174],[0,0],[0,8.724],[0.309,3.027],[1.839,2.751],[3.385,1.465],[4.264,0],[3.206,-1.27],[1.839,-2.295],[0.423,-2.702],[0,0],[0,-4.655],[-0.749,-2.734],[-2.767,-1.953],[-2.865,0],[-1.953,1.058],[0,0],[0,-2.962],[0.098,-0.977],[0.651,-0.618],[1.204,0],[0.7,0.652],[0.081,0.961],[0,0],[0,-4.948]],"v":[[102.734,-70.361],[95.117,-77.93],[81.494,-80.615],[69.604,-78.491],[61.475,-72.119],[58.081,-63.11],[57.666,-44.238],[57.666,-33.301],[58.13,-15.674],[61.353,-7.007],[69.189,-0.684],[82.227,1.514],[93.433,-0.391],[101.001,-5.737],[104.395,-13.232],[105.029,-25.586],[105.029,-31.885],[103.906,-42.969],[98.633,-50],[89.063,-52.93],[81.836,-51.343],[77.393,-46.582],[77.393,-59.18],[77.539,-65.088],[78.662,-67.48],[81.152,-68.408],[84.009,-67.432],[85.181,-65.015],[85.303,-58.057],[105.029,-58.057]]}},"nm":"6"},{"ind":1,"ty":"sh","closed":true,"ks":{"k":{"i":[[0,0],[0.911,-0.83],[0.846,0],[0.602,1.074],[0,3.484],[0,0],[-0.635,0.993],[-1.367,0],[-0.619,-1.041],[0,-2.799]],"o":[[0,3.646],[-0.912,0.83],[-1.4,0],[-0.603,-1.074],[0,0],[0,-2.897],[0.635,-0.993],[1.399,0],[0.618,1.042],[0,0]],"v":[[85.303,-18.604],[83.936,-11.89],[81.299,-10.645],[78.296,-12.256],[77.393,-19.092],[77.393,-33.398],[78.345,-39.233],[81.348,-40.723],[84.375,-39.16],[85.303,-33.398]]}},"nm":"6"},{"ty":"mm","mm":1,"nm":"Merge Paths 1"}],"nm":"6"}],"bounds":{"l":3,"t":-81,"b":2,"r":106}},"fFamily":"Impact"},{"ch":"7","size":71,"style":"Regular","w":40.97,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[0.586,-79.053],[0.586,-64.844],[20.093,-64.844],[6.055,0],[25.684,0],[38.281,-61.829],[38.281,-79.053]],"o":[[0.586,-79.053],[0.586,-64.844],[20.093,-64.844],[6.055,0],[25.684,0],[38.281,-61.829],[38.281,-79.053]],"v":[[0.586,-79.053],[0.586,-64.844],[20.093,-64.844],[6.055,0],[25.684,0],[38.281,-61.829],[38.281,-79.053]]}},"nm":"7"}],"nm":"7"},{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[41.553,-79.053],[41.553,-64.844],[61.06,-64.844],[47.021,0],[66.65,0],[79.248,-61.829],[79.248,-79.053]]}},"nm":"7"}],"nm":"7"}],"bounds":{"l":0,"t":-80,"b":0,"r":80}},"fFamily":"Impact"},{"ch":"9","size":71,"style":"Regular","w":50,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[8.057,1.367],[12.541,1.123],[18.848,-0.553],[24.633,-3.451],[29.996,-7.308],[35.831,-13.11],[40.787,-20.426],[44.116,-28.54],[45.703,-37.239],[45.19,-47.2],[41.699,-56.69],[35.767,-63.794],[27.734,-67.578],[18.701,-66.894],[11.451,-62.369],[6.437,-55.411],[3.955,-46.81],[4.402,-38.192],[7.406,-31.266],[12.263,-26.481],[18.586,-24.121],[29.622,-25.765],[31.087,-18.164],[24.544,-9.367],[19.661,-4.89],[14.152,-1.969],[7.746,-0.537],[5.273,1.367]],"o":[[10.335,1.367],[16.805,0.147],[22.754,-2.376],[28.247,-5.925],[33.869,-10.889],[39.314,-17.896],[43.196,-25.765],[45.386,-34.302],[45.703,-43.782],[43.14,-53.776],[37.989,-61.768],[30.591,-66.822],[21.516,-67.578],[13.623,-64.16],[7.837,-57.942],[4.451,-49.714],[3.955,-40.886],[6.193,-33.342],[10.466,-27.815],[16.398,-24.592],[25,-24.121],[33.464,-23.389],[26.107,-11.231],[21.354,-6.209],[16.08,-2.775],[10.017,-0.862],[5.273,-0.439],[5.273,1.367]],"v":[[8.057,1.367],[14.673,0.635],[20.801,-1.465],[26.44,-4.688],[31.689,-8.838],[37.573,-15.503],[41.992,-23.096],[44.751,-31.421],[45.703,-40.234],[44.165,-50.488],[39.844,-59.229],[33.179,-65.308],[24.609,-67.578],[16.162,-65.527],[9.644,-60.156],[5.444,-52.563],[3.955,-43.848],[5.298,-35.767],[8.936,-29.541],[14.331,-25.537],[20.898,-24.121],[34.766,-29.053],[27.637,-13.379],[22.949,-7.788],[17.871,-3.833],[12.085,-1.416],[5.273,-0.439],[5.273,1.367]]}},"nm":"9"},{"ind":1,"ty":"sh","closed":true,"ks":{"k":{"i":[[33.952,-31.437],[31.104,-30.005],[28.199,-29.052],[25.521,-28.564],[21.224,-29.085],[16.951,-32.592],[14.03,-38.346],[12.646,-45.979],[12.947,-53.711],[14.958,-59.236],[18.132,-62.776],[22.102,-64.404],[26.285,-64.07],[29.768,-61.832],[32.487,-58.252],[34.513,-53.784],[35.816,-48.95],[36.426,-44.221],[36.133,-36.897]],"o":[[32.063,-30.428],[29.15,-29.321],[26.343,-28.662],[22.917,-28.564],[18.229,-31.168],[14.836,-36.206],[12.923,-43.293],[12.646,-51.448],[14.152,-57.617],[16.976,-61.808],[20.736,-64.079],[24.967,-64.404],[28.694,-62.735],[31.657,-59.553],[33.919,-55.322],[35.456,-50.562],[36.304,-45.728],[36.426,-40.283],[34.798,-32.014]],"v":[[33.008,-30.933],[30.127,-29.663],[27.271,-28.857],[24.805,-28.564],[19.727,-30.127],[15.894,-34.399],[13.477,-40.82],[12.646,-48.877],[13.55,-55.664],[15.967,-60.522],[19.434,-63.428],[23.535,-64.404],[27.49,-63.403],[30.713,-60.693],[33.203,-56.787],[34.985,-52.173],[36.06,-47.339],[36.426,-42.822],[35.547,-32.666]]}},"nm":"9"}],"nm":"9"},{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[0,0],[-2.132,0.488],[-1.953,0.912],[-1.807,1.237],[-1.693,1.53],[-1.742,2.393],[-1.205,2.67],[-0.635,2.881],[0,2.995],[1.025,3.288],[1.855,2.539],[2.588,1.514],[3.125,0],[2.539,-1.367],[1.807,-2.213],[0.993,-2.848],[0,-2.962],[-0.896,-2.425],[-1.53,-1.725],[-2.068,-0.944],[-2.312,0],[-5.144,3.288],[3.45,-4.785],[1.595,-1.579],[1.79,-1.057],[2.067,-0.553],[2.473,-0.098],[0,0]],"o":[[2.278,0],[2.132,-0.488],[1.953,-0.911],[1.807,-1.237],[2.18,-2.051],[1.741,-2.393],[1.204,-2.669],[0.635,-2.881],[0,-3.548],[-1.025,-3.288],[-1.855,-2.539],[-2.588,-1.514],[-3.093,0],[-2.539,1.367],[-1.807,2.214],[-0.993,2.849],[0,2.962],[0.895,2.425],[1.53,1.726],[2.067,0.945],[4.102,0],[-1.302,5.664],[-1.53,2.148],[-1.595,1.579],[-1.791,1.058],[-2.068,0.554],[0,0],[0,0]],"v":[[58.057,1.367],[64.673,0.635],[70.801,-1.465],[76.44,-4.688],[81.689,-8.838],[87.573,-15.503],[91.992,-23.096],[94.751,-31.421],[95.703,-40.234],[94.165,-50.488],[89.844,-59.229],[83.179,-65.308],[74.609,-67.578],[66.162,-65.527],[59.644,-60.156],[55.444,-52.563],[53.955,-43.848],[55.298,-35.767],[58.936,-29.541],[64.331,-25.537],[70.898,-24.121],[84.766,-29.053],[77.637,-13.379],[72.949,-7.788],[67.871,-3.833],[62.085,-1.416],[55.273,-0.439],[55.273,1.367]]}},"nm":"9"},{"ind":1,"ty":"sh","closed":true,"ks":{"k":{"i":[[0.944,-0.504],[0.977,-0.342],[0.928,-0.195],[0.716,0],[1.497,1.042],[1.057,1.807],[0.553,2.474],[0,2.898],[-0.603,1.953],[-1.009,1.286],[-1.302,0.652],[-1.433,0],[-1.205,-0.667],[-0.945,-1.139],[-0.716,-1.465],[-0.472,-1.611],[-0.244,-1.611],[0,-1.399],[0.586,-4.231]],"o":[[-0.945,0.505],[-0.977,0.342],[-0.928,0.195],[-1.888,0],[-1.498,-1.041],[-1.058,-1.807],[-0.554,-2.473],[0,-2.571],[0.602,-1.953],[1.009,-1.286],[1.302,-0.651],[1.432,0],[1.204,0.668],[0.944,1.14],[0.716,1.465],[0.471,1.611],[0.244,1.611],[0,2.539],[-0.749,0.652]],"v":[[83.008,-30.933],[80.127,-29.663],[77.271,-28.857],[74.805,-28.564],[69.727,-30.127],[65.894,-34.399],[63.477,-40.82],[62.646,-48.877],[63.55,-55.664],[65.967,-60.522],[69.434,-63.428],[73.535,-64.404],[77.49,-63.403],[80.713,-60.693],[83.203,-56.787],[84.985,-52.173],[86.06,-47.339],[86.426,-42.822],[85.547,-32.666]]}},"nm":"9"},{"ty":"mm","mm":1,"nm":"Merge Paths 1"}],"nm":"9"}],"bounds":{"l":3,"t":-68,"b":2,"r":96}},"fFamily":"Mongolian Baiti"},{"ch":"0","size":71,"style":"Regular","w":50,"data":{"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[4.199,-23.152],[8.137,-11.164],[14.282,-2.897],[21.907,1.172],[27.36,0.952],[31.511,-0.537],[35.343,-3.011],[38.655,-6.201],[41.943,-11.157],[44.409,-17.253],[45.866,-23.893],[46.436,-31.135],[43.912,-53.401],[30.24,-67.578],[21.053,-67.155],[15.699,-64.331],[11.311,-59.863],[7.877,-54.215],[3.613,-40.332]],"o":[[6.543,-14.787],[12.076,-5.175],[19.262,0.357],[26.009,1.172],[30.159,0.074],[34.115,-2.099],[37.654,-5.094],[40.836,-9.228],[43.701,-15.161],[45.483,-21.614],[46.321,-28.646],[46.436,-44.71],[34.797,-64.99],[23.047,-67.578],[17.375,-65.462],[12.671,-61.499],[8.902,-56.153],[4.752,-46.826],[3.613,-27.735]],"v":[[5.371,-18.97],[10.156,-8.105],[16.772,-1.27],[24.707,1.172],[28.76,0.513],[32.813,-1.318],[36.499,-4.053],[39.502,-7.373],[42.822,-13.159],[44.946,-19.434],[46.094,-26.27],[46.436,-33.74],[38.867,-59.814],[25.195,-67.578],[19.214,-66.309],[14.185,-62.915],[10.107,-58.008],[7.031,-52.197],[3.613,-32.715]]}},"nm":"0"},{"ind":1,"ty":"sh","closed":true,"ks":{"k":{"i":[[13.289,-37.158],[14.03,-45.703],[16.471,-57.478],[22.509,-64.355],[29.346,-63.566],[33.512,-58.008],[36.865,-43.441],[36.678,-26.22],[35.367,-15.039],[33.512,-8.773],[31.201,-5.102],[28.532,-2.84],[25.733,-1.904],[20.931,-2.742],[16.715,-8.381],[14.241,-17.008],[13.184,-27.588]],"o":[[13.712,-42.822],[15.169,-53.613],[20.247,-62.979],[27.457,-64.355],[32.276,-60.408],[36.084,-49.739],[36.865,-30.745],[35.929,-18.408],[34.131,-10.352],[32.015,-6.169],[29.443,-3.442],[26.643,-2.091],[22.738,-1.904],[17.936,-6.095],[14.892,-13.948],[13.395,-23.909],[13.184,-34.326]],"v":[[13.501,-39.99],[14.453,-48.633],[18.359,-60.229],[25.146,-64.355],[30.811,-61.987],[34.521,-54.785],[36.865,-35.889],[36.304,-22.314],[34.619,-12.207],[32.764,-7.471],[30.322,-4.272],[27.588,-2.466],[24.854,-1.904],[19.434,-4.419],[15.771,-11.279],[13.818,-20.459],[13.184,-31.494]]}},"nm":"0"}],"nm":"0"},{"ty":"gr","it":[{"ind":0,"ty":"sh","closed":true,"ks":{"k":{"i":[[-1.172,-4.182],[-2.019,-3.059],[-2.49,-1.627],[-2.8,0],[-1.4,0.439],[-1.302,0.781],[-1.156,1.042],[-0.847,1.172],[-0.879,2.002],[-0.537,2.181],[-0.228,2.377],[0,2.605],[5.045,6.413],[5.045,0],[1.839,-0.846],[1.514,-1.416],[1.204,-1.855],[0.846,-2.018],[0,-7.617]],"o":[[1.172,4.183],[1.92,2.93],[2.49,1.627],[1.302,0],[1.399,-0.439],[1.302,-0.781],[1.155,-1.041],[1.334,-1.855],[0.879,-2.002],[0.537,-2.18],[0.227,-2.376],[0,-10.97],[-4.07,-5.176],[-2.148,0],[-1.839,0.847],[-1.514,1.416],[-1.205,1.855],[-2.279,5.371],[0,4.98]],"v":[[55.371,-18.97],[60.156,-8.105],[66.772,-1.27],[74.707,1.172],[78.76,0.513],[82.813,-1.318],[86.499,-4.053],[89.502,-7.373],[92.822,-13.159],[94.946,-19.434],[96.094,-26.27],[96.436,-33.74],[88.867,-59.814],[75.195,-67.578],[69.214,-66.309],[64.185,-62.915],[60.107,-58.008],[57.031,-52.197],[53.613,-32.715]]}},"nm":"0"},{"ind":1,"ty":"sh","closed":true,"ks":{"k":{"i":[[-0.212,2.832],[-0.423,2.93],[-1.888,2.751],[-2.637,0],[-1.465,-1.579],[-1.009,-3.223],[0,-7.552],[0.374,-3.906],[0.748,-2.832],[0.748,-1.302],[0.879,-0.83],[0.944,-0.374],[0.879,0],[1.497,1.677],[0.944,2.898],[0.423,3.451],[0,3.906]],"o":[[0.211,-2.832],[0.716,-4.98],[1.888,-2.75],[2.311,0],[1.465,1.579],[1.563,5.046],[0,5.144],[-0.375,3.906],[-0.488,1.855],[-0.749,1.302],[-0.879,0.83],[-0.945,0.375],[-2.116,0],[-1.498,-1.676],[-0.879,-2.669],[-0.423,-3.45],[0,-2.832]],"v":[[63.501,-39.99],[64.453,-48.633],[68.359,-60.229],[75.146,-64.355],[80.811,-61.987],[84.521,-54.785],[86.865,-35.889],[86.304,-22.314],[84.619,-12.207],[82.764,-7.471],[80.322,-4.272],[77.588,-2.466],[74.854,-1.904],[69.434,-4.419],[65.771,-11.279],[63.818,-20.459],[63.184,-31.494]]}},"nm":"0"},{"ty":"mm","mm":1,"nm":"Merge Paths 1"}],"nm":"0"}],"bounds":{"l":3,"t":-68,"b":2,"r":97}},"fFamily":"Mongolian Baiti"}]};
+
     //anim.play();
     //anim.playSegments([0,40],true);
 
diff --git a/player/js/animation/AnimationItem.js b/player/js/animation/AnimationItem.js
index 49b7db4..a45cd98 100644
--- a/player/js/animation/AnimationItem.js
+++ b/player/js/animation/AnimationItem.js
@@ -137,13 +137,21 @@
     var newLayers = data.layers;
     var j, jLen = newLayers.length;
     for(j=0;j<jLen;j+=1){
-        i = 0;
-        while(i<len){
-            if(layers[i].id == newLayers[j].id){
-                layers[i] = newLayers[j];
-                break;
+        if(!newLayers[j].id){
+            if(this.animType == 'svg'){
+                layers.push(newLayers[j]);
+            }else{
+                layers.unshift(newLayers[j]);
             }
-            i += 1;
+        }else{
+            i = 0;
+            while(i<len){
+                if(layers[i].id == newLayers[j].id){
+                    layers[i] = newLayers[j];
+                    break;
+                }
+                i += 1;
+            }
         }
     }
     if(data.chars || data.fonts){
diff --git a/player/js/module.js b/player/js/module.js
index feb2bf6..26eda40 100644
--- a/player/js/module.js
+++ b/player/js/module.js
@@ -94,7 +94,7 @@
     bodymovinjs.goToAndStop = goToAndStop;
     bodymovinjs.destroy = destroy;
     bodymovinjs.setQuality = setQuality;
-    bodymovinjs.version = '3.1.6';
+    bodymovinjs.version = '3.1.7';
 
     function checkReady(){
         if (document.readyState === "complete") {
diff --git a/player/js/renderers/CanvasRenderer.js b/player/js/renderers/CanvasRenderer.js
index 7cf05c7..776f3e0 100644
--- a/player/js/renderers/CanvasRenderer.js
+++ b/player/js/renderers/CanvasRenderer.js
@@ -70,20 +70,29 @@
     if(!elements){
         elements = this.elements;
     }
-    var j, jLen = elements.length, elems, placeholder;
+    var j, jLen = elements.length, elems;
     for(i=0;i<len;i+=1){
-        j = 0;
-        while(j<jLen){
-            if(elements[j].data.id == layers[i].id){
-                elements[j] = this.createItem(layers[i],this);
-                if (layers[i].ty === 0) {
-                    elems = [];
-                    this.buildItems(layers[i].layers,elems, elements[j]);
-                    elements[j].setElements(elems);
-                }
-                break;
+        if(!layers[i].id){
+            var elem = this.createItem(layers[i],this);
+            elements.unshift(elem);
+            if (layers[i].ty === 0) {
+                elems = [];
+                this.buildItems(layers[i].layers,elem);
+                elem.setElements(elems);
             }
-            j += 1;
+        }else {
+            j = 0;
+            while (j < jLen) {
+                if (elements[j].data.id == layers[i].id) {
+                    elements[j] = this.createItem(layers[i], this);
+                    if (layers[i].ty === 0) {
+                        elems = [];
+                        this.buildItems(layers[i].layers, elems, elements[j]);
+                        elements[j].setElements(elems);
+                    }
+                }
+                j += 1;
+            }
         }
     }
 };
@@ -337,5 +346,4 @@
         this.restore();
     }
 };
-
-extendPrototype(ExpressionComp,CanvasRenderer);
\ No newline at end of file
+extendPrototype(ExpressionComp,CanvasRenderer);
diff --git a/player/js/renderers/SVGRenderer.js b/player/js/renderers/SVGRenderer.js
index a96273c..18f2a9b 100644
--- a/player/js/renderers/SVGRenderer.js
+++ b/player/js/renderers/SVGRenderer.js
@@ -63,19 +63,28 @@
     }
     var j, jLen = elements.length, elems, placeholder;
     for(i=0;i<len;i+=1){
-        j = 0;
-        while(j<jLen){
-            if(elements[j].data.id == layers[i].id){
-                placeholder = elements[j];
-                elements[j] = this.createItem(layers[i],parentContainer,this, placeholder);
-                if (layers[i].ty === 0) {
-                    elems = [];
-                    this.buildItems(layers[i].layers,elements[j].getDomElement(),elems,elements[j], elements[i].placeholder);
-                    elements[j].setElements(elems);
-                }
-                break;
+        if(!layers[i].id){
+            var elem = this.createItem(layers[i],parentContainer, this);
+            elements.push(elem);
+            if (layers[i].ty === 0) {
+                elems = [];
+                this.buildItems(layers[i].layers,elem.getDomElement(),elems, elem);
+                elem.setElements(elems);
             }
-            j += 1;
+        }else {
+            j = 0;
+            while (j < jLen) {
+                if (elements[j].data.id == layers[i].id) {
+                    placeholder = elements[j];
+                    elements[j] = this.createItem(layers[i], parentContainer, this, placeholder);
+                    if (layers[i].ty === 0) {
+                        elems = [];
+                        this.buildItems(layers[i].layers, elements[j].getDomElement(), elems, elements[j], elements[i].placeholder);
+                        elements[j].setElements(elems);
+                    }
+                }
+                j += 1;
+            }
         }
     }
     for(i=0;i<len;i+=1){