import{bb as commonjsGlobal,d as defineComponent,S as ref,V as computed,a2 as watch,U as onMounted,o as openBlock,bh as createElementBlock,bj as normalizeStyle}from"./index.394decd7.js";var lottie={exports:{}};(function(module,exports){typeof navigator!="undefined"&&function(e,t){module.exports=t()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var r,i=e.length,s;for(r=0;r1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(e,t){var r=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return r[2]+=t,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(e,t){var r=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return r[0]+=t/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var e=[],t,r;for(t=0;t<256;t+=1)r=t.toString(16),e[t]=r.length===1?"0"+r:r;return function(i,s,a){return i<0&&(i=0),s<0&&(s=0),a<0&&(a=0),"#"+e[i]+e[s]+e[a]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(r){return typeof r}:_typeof$5=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$5(e)}var dataManager=function(){var e=1,t=[],r,i,s={onmessage:function(){},postMessage:function(P){r({data:P})}},a={postMessage:function(P){s.onmessage({data:P})}};function n(u){if(window.Worker&&window.Blob&&getWebWorker()){var P=new Blob(["var _workerSelf = self; self.onmessage = ",u.toString()],{type:"text/javascript"}),y=URL.createObjectURL(P);return new Worker(y)}return r=u,s}function p(){i||(i=n(function(P){function y(){function x(w,k){var A,S,T=w.length,V,M,G,N;for(S=0;S=0;k-=1)if(w[k].ty==="sh")if(w[k].ks.k.i)v(w[k].ks.k);else for(T=w[k].ks.k.length,S=0;SA[0]?!0:A[0]>w[0]?!1:w[1]>A[1]?!0:A[1]>w[1]?!1:w[2]>A[2]?!0:A[2]>w[2]?!1:null}var _=function(){var w=[4,4,14];function k(S){var T=S.t.d;S.t.d={k:[{s:T,t:0}]}}function A(S){var T,V=S.length;for(T=0;T=0;T-=1)if(S[T].ty==="sh")if(S[T].ks.k.i)S[T].ks.k.c=S[T].closed;else for(G=S[T].ks.k.length,M=0;M500)&&(this._imageLoaded(),clearInterval(l)),f+=1}.bind(this),50)}function a(o){var f=i(o,this.assetsPath,this.path),l=createNS("image");isSafari?this.testImageLoaded(l):l.addEventListener("load",this._imageLoaded,!1),l.addEventListener("error",function(){h.img=e,this._imageLoaded()}.bind(this),!1),l.setAttributeNS("http://www.w3.org/1999/xlink","href",f),this._elementHelper.append?this._elementHelper.append(l):this._elementHelper.appendChild(l);var h={img:l,assetData:o};return h}function n(o){var f=i(o,this.assetsPath,this.path),l=createTag("img");l.crossOrigin="anonymous",l.addEventListener("load",this._imageLoaded,!1),l.addEventListener("error",function(){h.img=e,this._imageLoaded()}.bind(this),!1),l.src=f;var h={img:l,assetData:o};return h}function p(o){var f={assetData:o},l=i(o,this.assetsPath,this.path);return dataManager.loadData(l,function(h){f.img=h,this._footageLoaded()}.bind(this),function(){f.img={},this._footageLoaded()}.bind(this)),f}function c(o,f){this.imagesLoadedCb=f;var l,h=o.length;for(l=0;lthis.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t=this.animationData.layers,r,i=t.length,s=e.layers,a,n=s.length;for(a=0;athis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_pause"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_play"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,r=0;r=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(r=!0,t=this.totalFrames-1):t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):t<0?this.checkSegments(t%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(r=!0,t=0)):this.setCurrentRawFrameValue(t),r&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramet&&(r=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,r!==-1&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),_typeof$4(e[0])==="object"){var r,i=e.length;for(r=0;r=0;A-=1)t[A].animation.destroy(k)}function E(k,A,S){var T=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),V,M=T.length;for(V=0;V0?h=E:l=E;while(Math.abs(_)>a&&++F=s?x(l,R,h,v):I===0?R:d(l,_,_+c,h,v)}},e}(),pooling=function(){function e(t){return t.concat(createSizedArray(t.length))}return{double:e}}(),poolFactory=function(){return function(e,t,r){var i=0,s=e,a=createSizedArray(s),n={newElement:p,release:c};function p(){var m;return i?(i-=1,m=a[i]):m=t(),m}function c(m){i===s&&(a=pooling.double(a),s*=2),r&&r(m),a[i]=m,i+=1}return n}}(),bezierLengthPool=function(){function e(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,e)}(),segmentsLengthPool=function(){function e(){return{lengths:[],totalLength:0}}function t(r){var i,s=r.lengths.length;for(i=0;i-.001&&f<.001}function r(u,P,y,d,x,o,f,l,h){if(y===0&&o===0&&h===0)return t(u,P,d,x,f,l);var v=e.sqrt(e.pow(d-u,2)+e.pow(x-P,2)+e.pow(o-y,2)),g=e.sqrt(e.pow(f-u,2)+e.pow(l-P,2)+e.pow(h-y,2)),_=e.sqrt(e.pow(f-d,2)+e.pow(l-x,2)+e.pow(h-o,2)),E;return v>g?v>_?E=v-g-_:E=_-g-v:_>g?E=_-g-v:E=g-v-_,E>-1e-4&&E<1e-4}var i=function(){return function(u,P,y,d){var x=getDefaultCurveSegments(),o,f,l,h,v,g=0,_,E=[],F=[],L=bezierLengthPool.newElement();for(l=y.length,o=0;of?-1:1,v=!0;v;)if(d[o]<=f&&d[o+1]>f?(l=(f-d[o])/(d[o+1]-d[o]),v=!1):o+=h,o<0||o>=x-1){if(o===x-1)return y[o];v=!1}return y[o]+(y[o+1]-y[o])*l}function m(u,P,y,d,x,o){var f=c(x,o),l=1-f,h=e.round((l*l*l*u[0]+(f*l*l+l*f*l+l*l*f)*y[0]+(f*f*l+l*f*f+f*l*f)*d[0]+f*f*f*P[0])*1e3)/1e3,v=e.round((l*l*l*u[1]+(f*l*l+l*f*l+l*l*f)*y[1]+(f*f*l+l*f*f+f*l*f)*d[1]+f*f*f*P[1])*1e3)/1e3;return[h,v]}var b=createTypedArray("float32",8);function C(u,P,y,d,x,o,f){x<0?x=0:x>1&&(x=1);var l=c(x,f);o=o>1?1:o;var h=c(o,f),v,g=u.length,_=1-l,E=1-h,F=_*_*_,L=l*_*_*3,R=l*l*_*3,I=l*l*l,D=_*_*E,B=l*_*E+_*l*E+_*_*h,w=l*l*E+_*l*h+l*_*h,k=l*l*h,A=_*E*E,S=l*E*E+_*h*E+_*E*h,T=l*h*E+_*h*h+l*E*h,V=l*h*h,M=E*E*E,G=h*E*E+E*h*E+E*E*h,N=h*h*E+E*h*h+h*E*h,z=h*h*h;for(v=0;v=F.t-f){E.h&&(E=F),h=0;break}if(F.t-f>x){h=v;break}v=A||x=A?V.points.length-1:0;for(I=V.points[M].point.length,R=0;R=z&&G=A)l[0]=T[0],l[1]=T[1],l[2]=T[2];else if(x<=S)l[0]=E.s[0],l[1]=E.s[1],l[2]=E.s[2];else{var $=a(E.s),q=a(T),X=(x-S)/(A-S);s(l,i($,q,X))}else for(v=0;v=A?D=1:x1e-6?(I=Math.acos(D),B=Math.sin(I),w=Math.sin((1-f)*I)/B,k=Math.sin(f*I)/B):(w=1-f,k=f),l[0]=w*h+k*E,l[1]=w*v+k*F,l[2]=w*g+k*L,l[3]=w*_+k*R,l}function s(x,o){var f=o[0],l=o[1],h=o[2],v=o[3],g=Math.atan2(2*l*v-2*f*h,1-2*l*l-2*h*h),_=Math.asin(2*f*l+2*h*v),E=Math.atan2(2*f*v-2*l*h,1-2*f*f-2*h*h);x[0]=g/degToRads,x[1]=_/degToRads,x[2]=E/degToRads}function a(x){var o=x[0]*degToRads,f=x[1]*degToRads,l=x[2]*degToRads,h=Math.cos(o/2),v=Math.cos(f/2),g=Math.cos(l/2),_=Math.sin(o/2),E=Math.sin(f/2),F=Math.sin(l/2),L=h*v*g-_*E*F,R=_*E*g+h*v*F,I=_*v*g+h*E*F,D=h*E*g-_*v*F;return[R,I,D,L]}function n(){var x=this.comp.renderedFrame-this.offsetTime,o=this.keyframes[0].t-this.offsetTime,f=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(x===this._caching.lastFrame||this._caching.lastFrame!==e&&(this._caching.lastFrame>=f&&x>=f||this._caching.lastFrame=x&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var l=this.interpolateValue(x,this._caching);this.pv=l}return this._caching.lastFrame=x,this.pv}function p(x){var o;if(this.propType==="unidimensional")o=x*this.mult,t(this.v-o)>1e-5&&(this.v=o,this._mdf=!0);else for(var f=0,l=this.v.length;f1e-5&&(this.v[f]=o,this._mdf=!0),f+=1}function c(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var x,o=this.effectsSequence.length,f=this.kf?this.pv:this.data.k;for(x=0;x=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=e,a[i][1]=t},ShapePath.prototype.setTripleAt=function(e,t,r,i,s,a,n,p){this.setXYAt(e,t,"v",n,p),this.setXYAt(r,i,"o",n,p),this.setXYAt(s,a,"i",n,p)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,r=this.o,i=this.i,s=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a=this._length-1,n=this._length,p;for(p=s;p=B[B.length-1].t-this.offsetTime)v=B[B.length-1].s?B[B.length-1].s[0]:B[B.length-2].e[0],_=!0;else{for(var w=h,k=B.length-1,A=!0,S,T,V;A&&(S=B[w],T=B[w+1],!(T.t-this.offsetTime>o));)w=T.t-this.offsetTime)I=1;else if(ol&&o>l)||(this._caching.lastIndex=h0||A>-1e-6&&A<0?i(A*S)/S:A}function k(){var A=this.props,S=w(A[0]),T=w(A[1]),V=w(A[4]),M=w(A[5]),G=w(A[12]),N=w(A[13]);return"matrix("+S+","+T+","+V+","+M+","+G+","+N+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=n,this.rotateY=p,this.rotateZ=c,this.skew=b,this.skewFromAxis=C,this.shear=m,this.scale=u,this.setTransform=P,this.translate=y,this.transform=d,this.applyToPoint=h,this.applyToX=v,this.applyToY=g,this.applyToZ=_,this.applyToPointArray=I,this.applyToTriplePoints=R,this.applyToPointStringified=D,this.toCSS=B,this.to2dCSS=k,this.clone=f,this.cloneFromProps=l,this.equals=o,this.inversePoints=L,this.inversePoint=F,this.getInverseMatrix=E,this._t=this.transform,this.isIdentity=x,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(r){return typeof r}:_typeof$3=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$3(e)}var lottie={};function setLocation(e){setLocationHref(e)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return animationManager.loadAnimation(e)}function setQuality(e){if(typeof e=="string")switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e)}function inBrowser(){return typeof navigator!="undefined"}function installPlugin(e,t){e==="expressions"&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.9.6";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),r=0;r=1?a.push({s:e-1,e:t-1}):(a.push({s:e,e:1}),a.push({s:0,e:t-1}));var n=[],p,c=a.length,m;for(p=0;pi+r)){var b,C;m.s*s<=i?b=0:b=(m.s*s-i)/r,m.e*s>=i+r?C=1:C=(m.e*s-i)/r,n.push([b,C])}return n.length||n.push([0,0]),n},TrimModifier.prototype.releasePathsData=function(e){var t,r=e.length;for(t=0;t1?t=1+i:this.s.v<0?t=0+i:t=this.s.v+i,this.e.v>1?r=1+i:this.e.v<0?r=0+i:r=this.e.v+i,t>r){var s=t;t=r,r=s}t=Math.round(t*1e4)*1e-4,r=Math.round(r*1e4)*1e-4,this.sValue=t,this.eValue=r}else t=this.sValue,r=this.eValue;var a,n,p=this.shapes.length,c,m,b,C,u,P=0;if(r===t)for(n=0;n=0;n-=1)if(d=this.shapes[n],d.shape._mdf){for(x=d.localShapeCollection,x.releaseShapes(),this.m===2&&p>1?(h=this.calculateShapeEdges(t,r,d.totalShapeLength,l,P),l+=d.totalShapeLength):h=[[o,f]],m=h.length,c=0;c=1?y.push({s:d.totalShapeLength*(o-1),e:d.totalShapeLength*(f-1)}):(y.push({s:d.totalShapeLength*o,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(f-1)}));var v=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1){var g=d.shape.paths.shapes[d.shape.paths._length-1];if(g.c){var _=v.pop();this.addPaths(v,x),v=this.addShapes(d,y[1],_)}else this.addPaths(v,x),v=this.addShapes(d,y[1])}this.addPaths(v,x)}}d.shape.paths=x}}},TrimModifier.prototype.addPaths=function(e,t){var r,i=e.length;for(r=0;rt.e){r.c=!1;break}else t.s<=m&&t.e>=m+b.addedLength?(this.addSegment(s[a].v[p-1],s[a].o[p-1],s[a].i[p],s[a].v[p],r,C,x),x=!1):(P=bez.getNewSegment(s[a].v[p-1],s[a].v[p],s[a].o[p-1],s[a].i[p],(t.s-m)/b.addedLength,(t.e-m)/b.addedLength,u[p-1]),this.addSegmentFromArray(P,r,C,x),x=!1,r.c=!1),m+=b.addedLength,C+=1;if(s[a].c&&u.length){if(b=u[p-1],m<=t.e){var o=u[p-1].addedLength;t.s<=m&&t.e>=m+o?(this.addSegment(s[a].v[p-1],s[a].o[p-1],s[a].i[0],s[a].v[0],r,C,x),x=!1):(P=bez.getNewSegment(s[a].v[p-1],s[a].v[0],s[a].o[p-1],s[a].i[0],(t.s-m)/o,(t.e-m)/o,u[p-1]),this.addSegmentFromArray(P,r,C,x),x=!1,r.c=!1)}else r.c=!1;m+=b.addedLength,C+=1}if(r._length&&(r.setXYAt(r.v[d][0],r.v[d][1],"i",d),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),m>t.e)break;a=this.p.keyframes[this.p.keyframes.length-1].t?(b=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/m,0),C=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/m,0)):(b=this.p.pv,C=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/m,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){b=[],C=[];var u=this.px,P=this.py;u._caching.lastFrame+u.offsetTime<=u.keyframes[0].t?(b[0]=u.getValueAtTime((u.keyframes[0].t+.01)/m,0),b[1]=P.getValueAtTime((P.keyframes[0].t+.01)/m,0),C[0]=u.getValueAtTime(u.keyframes[0].t/m,0),C[1]=P.getValueAtTime(P.keyframes[0].t/m,0)):u._caching.lastFrame+u.offsetTime>=u.keyframes[u.keyframes.length-1].t?(b[0]=u.getValueAtTime(u.keyframes[u.keyframes.length-1].t/m,0),b[1]=P.getValueAtTime(P.keyframes[P.keyframes.length-1].t/m,0),C[0]=u.getValueAtTime((u.keyframes[u.keyframes.length-1].t-.01)/m,0),C[1]=P.getValueAtTime((P.keyframes[P.keyframes.length-1].t-.01)/m,0)):(b=[u.pv,P.pv],C[0]=u.getValueAtTime((u._caching.lastFrame+u.offsetTime-.01)/m,u.offsetTime),C[1]=P.getValueAtTime((P._caching.lastFrame+P.offsetTime-.01)/m,P.offsetTime))}else C=e,b=C;this.v.rotate(-Math.atan2(b[1]-C[1],b[0]-C[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function i(){if(!this.a.k)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function s(){}function a(c){this._addDynamicProperty(c),this.elem.addDynamicProperty(c),this._isDirty=!0}function n(c,m,b){if(this.elem=c,this.frameId=-1,this.propType="transform",this.data=m,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(b||c),m.p&&m.p.s?(this.px=PropertyFactory.getProp(c,m.p.x,0,0,this),this.py=PropertyFactory.getProp(c,m.p.y,0,0,this),m.p.z&&(this.pz=PropertyFactory.getProp(c,m.p.z,0,0,this))):this.p=PropertyFactory.getProp(c,m.p||{k:[0,0,0]},1,0,this),m.rx){if(this.rx=PropertyFactory.getProp(c,m.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(c,m.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(c,m.rz,0,degToRads,this),m.or.k[0].ti){var C,u=m.or.k.length;for(C=0;C0;)r-=1,this._elements.unshift(t[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,r=e.length;for(t=0;t0?Math.floor(u):Math.ceil(u),d=this.pMatrix.props,x=this.rMatrix.props,o=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var f=0;if(u>0){for(;fy;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),f-=1;P&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-P,!0),f-=P)}i=this.data.m===1?0:this._currentCopies-1,s=this.data.m===1?1:-1,a=this._currentCopies;for(var l,h;a;){if(t=this.elemsData[i].it,r=t[t.length-1].transform.mProps.v.props,h=r.length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),f!==0){for((i!==0&&s===1||i!==this._currentCopies-1&&s===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15]),this.matrix.transform(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9],o[10],o[11],o[12],o[13],o[14],o[15]),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),l=0;l0&&(L=!1),L){var D=createTag("style");D.setAttribute("f-forigin",g[_].fOrigin),D.setAttribute("f-origin",g[_].origin),D.setAttribute("f-family",g[_].fFamily),D.type="text/css",D.innerText="@font-face {font-family: "+g[_].fFamily+"; font-style: normal; src: url('"+g[_].fPath+"');}",v.appendChild(D)}}else if(g[_].fOrigin==="g"||g[_].origin===1){for(R=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),I=0;It?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,r=this.renderableComponents.length;for(t=0;t.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(e){var t,r=this.layers.length,i;for(this.completeLayers=!0,t=r-1;t>=0;t-=1)this.elements[t]||(i=this.layers[t],i.ip-i.st<=e-this.layers[t].st&&i.op-i.st>e-this.layers[t].st&&this.buildItem(t)),this.completeLayers=this.elements[t]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e);default:return this.createNull(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e0&&(this.maskElement.setAttribute("id",u),this.element.maskedElement.setAttribute(f,"url("+getLocationHref()+"#"+u+")"),i.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t=this.element.finalTransform.mat,r,i=this.masksProperties.length;for(r=0;r1&&(i+=" C"+t.o[s-1][0]+","+t.o[s-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),r.lastPath!==i){var n="";r.elem&&(t.c&&(n=e.inv?this.solidPath+i:i),r.elem.setAttribute("d",n)),r.lastPath=i}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={};e.createFilter=t,e.createAlphaToLuminanceFilter=r;function t(i,s){var a=createNS("filter");return a.setAttribute("id",i),s!==!0&&(a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%")),a}function r(){var i=createNS("feColorMatrix");return i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),i}return e}(),featureSupport=function(){var e={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),e}(),registeredEffects={},idPrefix="filter_result_";function SVGEffects(e){var t,r="SourceGraphic",i=e.data.ef?e.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;this.filters=[];var p;for(t=0;t=0&&(i=this.shapeModifiers[t].processShapes(this._isFirstFrame),!i);t-=1);}},searchProcessedElement:function(t){for(var r=this.processedElements,i=0,s=r.length;i.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e0;)o=u.transformers[L].mProps._mdf||o,F-=1,L-=1;if(o)for(F=v-u.styles[l].lvl,L=u.transformers.length-1;F>0;)E=u.transformers[L].mProps.v.props,_.transform(E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],E[8],E[9],E[10],E[11],E[12],E[13],E[14],E[15]),F-=1,L-=1}else _=e;if(g=u.sh.paths,d=g._length,o){for(x="",y=0;y=1?D=.99:D<=-1&&(D=-.99);var B=R*D,w=Math.cos(I+u.a.v)*B+x[0],k=Math.sin(I+u.a.v)*B+x[1];y.setAttribute("fx",w),y.setAttribute("fy",k),d&&!u.g._collapsable&&(u.of.setAttribute("fx",w),u.of.setAttribute("fy",k))}}}function b(C,u,P){var y=u.style,d=u.d;d&&(d._mdf||P)&&d.dashStr&&(y.pElem.setAttribute("stroke-dasharray",d.dashStr),y.pElem.setAttribute("stroke-dashoffset",d.dashoffset[0])),u.c&&(u.c._mdf||P)&&y.pElem.setAttribute("stroke","rgb("+bmFloor(u.c.v[0])+","+bmFloor(u.c.v[1])+","+bmFloor(u.c.v[2])+")"),(u.o._mdf||P)&&y.pElem.setAttribute("stroke-opacity",u.o.v),(u.w._mdf||P)&&(y.pElem.setAttribute("stroke-width",u.w.v),y.msElem&&y.msElem.setAttribute("stroke-width",u.w.v))}return r}();function SVGShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,r),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t=this.shapes.length,r,i,s=this.stylesList.length,a,n=[],p=!1;for(i=0;i1&&p&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,r=e.length;for(t=0;t=0;c-=1){if(x=this.searchProcessedElement(e[c]),x?t[c]=r[x-1]:e[c]._render=n,e[c].ty==="fl"||e[c].ty==="st"||e[c].ty==="gf"||e[c].ty==="gs"||e[c].ty==="no")x?t[c].style.closed=!1:t[c]=this.createStyleElement(e[c],s),e[c]._render&&t[c].style.pElem.parentNode!==i&&i.appendChild(t[c].style.pElem),u.push(t[c].style);else if(e[c].ty==="gr"){if(!x)t[c]=this.createGroupElement(e[c]);else for(C=t[c].it.length,b=0;b1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!e)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,r=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var i,s=this.effectsSequence.length,a=e||this.data.d.k[this.keysIndex].s;for(i=0;it);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t=[],r=0,i=e.length,s,a,n=!1;r=55296&&s<=56319?(a=e.charCodeAt(r+1),a>=56320&&a<=57343?(n||FontManager.isModifier(s,a)?(t[t.length-1]+=e.substr(r,2),n=!1):t.push(e.substr(r,2)),r+=1):t.push(e.charAt(r))):s>56319?(a=e.charCodeAt(r+1),FontManager.isZeroWidthJoiner(s,a)?(n=!0,t[t.length-1]+=e.substr(r,2),r+=1):t.push(e.charAt(r))):FontManager.isZeroWidthJoiner(s)?(t[t.length-1]+=e.charAt(r),n=!0):t.push(e.charAt(r)),r+=1;return t},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t=this.elem.globalData.fontManager,r=this.data,i=[],s,a,n,p=0,c,m=r.m.g,b=0,C=0,u=0,P=[],y=0,d=0,x,o,f=t.getFontByName(e.f),l,h=0,v=getFontProperties(f);e.fWeight=v.weight,e.fStyle=v.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),a=e.finalText.length,e.finalLineHeight=e.lh;var g=e.tr/1e3*e.finalSize,_;if(e.sz)for(var E=!0,F=e.sz[0],L=e.sz[1],R,I;E;){I=this.buildFinalText(e.t),R=0,y=0,a=I.length,g=e.tr/1e3*e.finalSize;var D=-1;for(s=0;sF&&I[s]!==" "?(D===-1?a+=1:s=D,R+=e.finalLineHeight||e.finalSize*1.2,I.splice(s,D===s?1:0,"\r"),D=-1,y=0):(y+=h,y+=g);R+=f.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&Ld?y:d,y=-2*g,c="",n=!0,u+=1):c=w,t.chars?(l=t.getCharData(w,f.fStyle,t.getFontByName(e.f).fFamily),h=n?0:l.w*e.finalSize/100):h=t.measureText(c,e.f,e.finalSize),w===" "?B+=h+g:(y+=h+g+B,B=0),i.push({l:h,an:h,add:b,n,anIndexes:[],val:c,line:u,animatorJustifyOffset:0}),m==2){if(b+=h,c===""||c===" "||s===a-1){for((c===""||c===" ")&&(b-=h);C<=s;)i[C].an=b,i[C].ind=p,i[C].extra=h,C+=1;p+=1,b=0}}else if(m==3){if(b+=h,c===""||s===a-1){for(c===""&&(b-=h);C<=s;)i[C].an=b,i[C].ind=p,i[C].extra=h,C+=1;b=0,p+=1}}else i[p].ind=p,i[p].extra=0,p+=1;if(e.l=i,d=y>d?y:d,P.push(y),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=d,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=P;var k=r.a,A,S;o=k.length;var T,V,M=[];for(x=0;x0?p=this.ne.v/100:c=-this.ne.v/100,this.xe.v>0?m=1-this.xe.v/100:b=1+this.xe.v/100;var C=BezierFactory.getBezierEasing(p,c,m,b).get,u=0,P=this.finalS,y=this.finalE,d=this.data.sh;if(d===2)y===P?u=n>=y?1:0:u=e(0,t(.5/(y-P)+(n-P)/(y-P),1)),u=C(u);else if(d===3)y===P?u=n>=y?0:1:u=1-e(0,t(.5/(y-P)+(n-P)/(y-P),1)),u=C(u);else if(d===4)y===P?u=0:(u=e(0,t(.5/(y-P)+(n-P)/(y-P),1)),u<.5?u*=2:u=1-2*(u-.5)),u=C(u);else if(d===5){if(y===P)u=0;else{var x=y-P;n=t(e(0,n+.5-P),y-P);var o=-x/2+n,f=x/2;u=Math.sqrt(1-o*o/(f*f))}u=C(u)}else d===6?(y===P?u=0:(n=t(e(0,n+.5-P),y-P),u=(1+Math.cos(Math.PI+Math.PI*2*n/(y-P)))/2),u=C(u)):(n>=r(P)&&(n-P<0?u=e(0,t(t(y,1)-(P-n),1)):u=e(0,t(y-n,1))),u=C(u));if(this.sm.v!==100){var l=this.sm.v*.01;l===0&&(l=1e-8);var h=.5-l*.5;u1&&(u=1))}return u*this.a.v},getValue:function(n){this.iterateDynamicProperties(),this._mdf=n||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,n&&this.data.r===2&&(this.e.v=this._currentTextLength);var p=this.data.r===2?1:100/this.data.totalChars,c=this.o.v/p,m=this.s.v/p+c,b=this.e.v/p+c;if(m>b){var C=m;m=b,b=C}this.finalS=m,this.finalE=b}},extendPrototype([DynamicPropertyContainer],i);function s(a,n,p){return new i(a,n)}return{getTextSelectorProp:s}}();function TextAnimatorDataProperty(e,t,r){var i={propType:!1},s=PropertyFactory.getProp,a=t.a;this.a={r:a.r?s(e,a.r,0,degToRads,r):i,rx:a.rx?s(e,a.rx,0,degToRads,r):i,ry:a.ry?s(e,a.ry,0,degToRads,r):i,sk:a.sk?s(e,a.sk,0,degToRads,r):i,sa:a.sa?s(e,a.sa,0,degToRads,r):i,s:a.s?s(e,a.s,1,.01,r):i,a:a.a?s(e,a.a,1,0,r):i,o:a.o?s(e,a.o,0,.01,r):i,p:a.p?s(e,a.p,1,0,r):i,sw:a.sw?s(e,a.sw,0,0,r):i,sc:a.sc?s(e,a.sc,1,0,r):i,fc:a.fc?s(e,a.fc,1,0,r):i,fh:a.fh?s(e,a.fh,0,0,r):i,fs:a.fs?s(e,a.fs,0,.01,r):i,fb:a.fb?s(e,a.fb,0,.01,r):i,t:a.t?s(e,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,r),this.s.t=t.s.t}function TextAnimatorProperty(e,t,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}TextAnimatorProperty.prototype.searchProperties=function(){var e,t=this._textData.a.length,r,i=PropertyFactory.getProp;for(e=0;e=y+Q||!v?(F=(y+Q-x)/d.partialLength,z=h.point[0]+(d.point[0]-h.point[0])*F,W=h.point[1]+(d.point[1]-h.point[1])*F,a.translate(-r[0]*u[b].an*.005,-(r[1]*B)*.01),o=!1):v&&(x+=d.partialLength,f+=1,f>=v.length&&(f=0,l+=1,g[l]?v=g[l].points:R.v.c?(f=0,l=0,v=g[l].points):(x-=d.partialLength,v=null)),v&&(h=d,d=v[f],_=d.partialLength));N=u[b].an/2-u[b].add,a.translate(-N,0,0)}else N=u[b].an/2-u[b].add,a.translate(-N,0,0),a.translate(-r[0]*u[b].an*.005,-r[1]*B*.01,0);for(S=0;Se?this.textSpans[e].span:createNS(p?"g":"text"),l<=e){if(c.setAttribute("stroke-linecap","butt"),c.setAttribute("stroke-linejoin","round"),c.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=c,p){var v=createNS("g");c.appendChild(v),this.textSpans[e].childSpan=v}this.textSpans[e].span=c,this.layerElement.appendChild(c)}c.style.display="inherit"}if(m.reset(),C&&(n[e].n&&(u=-d,P+=r.yOffset,P+=y?1:0,y=!1),this.applyTextPropertiesToMatrix(r,m,n[e].line,u,P),u+=n[e].l||0,u+=d),p){h=this.globalData.fontManager.getCharData(r.finalText[e],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);var g;if(h.t===1)g=new SVGCompElement(h.data,this.globalData,this);else{var _=emptyShapeData;h.data&&h.data.shapes&&(_=this.buildShapeData(h.data,r.finalSize)),g=new SVGShapeElement(_,this.globalData,this)}if(this.textSpans[e].glyph){var E=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(E.layerElement),E.destroy()}this.textSpans[e].glyph=g,g._debug=!0,g.prepareFrame(0),g.renderFrame(),this.textSpans[e].childSpan.appendChild(g.layerElement),h.t===1&&this.textSpans[e].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else C&&c.setAttribute("transform","translate("+m.props[12]+","+m.props[13]+")"),c.textContent=n[e].val,c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}C&&c&&c.setAttribute("d",b)}for(;e=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e=0;i-=1)n=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])}t._mdf=a},processSequences:function(t){var r,i=this.sequenceList.length;for(r=0;r=0;a-=1){if(C=this.searchProcessedElement(e[a]),C?t[a]=r[C-1]:e[a]._shouldRender=i,e[a].ty==="fl"||e[a].ty==="st"||e[a].ty==="gf"||e[a].ty==="gs")C?t[a].style.closed=!1:t[a]=this.createStyleElement(e[a],y),m.push(t[a].style);else if(e[a].ty==="gr"){if(!C)t[a]=this.createGroupElement(e[a]);else for(c=t[a].it.length,p=0;p=0;s-=1)t[s].ty==="tr"?(n=r[s].transform,this.renderShapeTransform(e,n)):t[s].ty==="sh"||t[s].ty==="el"||t[s].ty==="rc"||t[s].ty==="sr"?this.renderPath(t[s],r[s]):t[s].ty==="fl"?this.renderFill(t[s],r[s],n):t[s].ty==="st"?this.renderStroke(t[s],r[s],n):t[s].ty==="gf"||t[s].ty==="gs"?this.renderGradientFill(t[s],r[s],n):t[s].ty==="gr"?this.renderShape(n,t[s].it,r[s].it):t[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var r=e.trNodes,i=t.paths,s,a,n,p=i._length;r.length=0;var c=e.transforms.finalTransform;for(n=0;n=1?b=.99:b<=-1&&(b=-.99);var C=c*b,u=Math.cos(m+t.a.v)*C+n[0],P=Math.sin(m+t.a.v)*C+n[1];s=a.createRadialGradient(u,P,0,n[0],n[1],c)}var y,d=e.g.p,x=t.g.c,o=1;for(y=0;ya&&c==="xMidYMid slice"||sr&&a==="meet"||ir&&a==="slice")?this.transformCanvas.tx=(e-this.transformCanvas.w*(t/this.transformCanvas.h))/2*this.renderConfig.dpr:p==="xMax"&&(ir&&a==="slice")?this.transformCanvas.tx=(e-this.transformCanvas.w*(t/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,c==="YMid"&&(i>r&&a==="meet"||ir&&a==="meet"||i=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if(!(this.renderedFrame===e&&this.renderConfig.clearCanvas===!0&&!t||this.destroyed||e===-1)){this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var r,i=this.layers.length;for(this.completeLayers||this.checkLayers(e),r=0;r=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){var r=this.createItem(this.layers[e],this,this.globalData);t[e]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();e.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CVCompElement(e,t,r){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e=this.canvasContext;e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip();var t,r=this.layers.length;for(t=r-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var e,t=this.layers.length;for(e=t-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)};function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:t&&t.clearCanvas!==void 0?t.clearCanvas:!0,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||""},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects,this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var r=this.finalTransform.mat.toCSS();t.transform=r,t.webkitTransform=r}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(e,t,r){this.initElement(e,t,r)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?(e=createNS("rect"),e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(e=createTag("div"),e.style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)};function HShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var r,i=e.length;for(r=0;r0&&c<1&&s[u].push(this.calculateF(c,e,t,r,i,u))):(m=n*n-4*p*a,m>=0&&(b=(-n+bmSqrt(m))/(2*a),b>0&&b<1&&s[u].push(this.calculateF(b,e,t,r,i,u)),C=(-n-bmSqrt(m))/(2*a),C>0&&C<1&&s[u].push(this.calculateF(C,e,t,r,i,u)))));this.shapeBoundingBox.left=bmMin.apply(null,s[0]),this.shapeBoundingBox.top=bmMin.apply(null,s[1]),this.shapeBoundingBox.right=bmMax.apply(null,s[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,s[1])},HShapeElement.prototype.calculateF=function(e,t,r,i,s,a){return bmPow(1-e,3)*t[a]+3*bmPow(1-e,2)*e*r[a]+3*(1-e)*bmPow(e,2)*i[a]+bmPow(e,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var r,i=e.length;for(r=0;rr&&(r=s)}r*=e.mult}else r=e.v*e.mult;t.x-=r,t.xMax+=r,t.y-=r,t.yMax+=r},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax=0;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;this.p?s=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:s=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],p=Math.sqrt(n[2]*n[2]+n[0]*n[0]),c=Math.atan2(n[1],p),m=Math.atan2(n[0],-n[2]);this.mat.rotateY(m).rotateX(-c)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var b=!this._prevMat.equals(this.mat);if((b||this.pe._mdf)&&this.comp.threeDElements){r=this.comp.threeDElements.length;var C,u,P;for(t=0;t=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var r=createTag("div"),i,s;styleDiv(r);var a=createTag("div");if(styleDiv(a),t==="3d"){i=r.style,i.width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var n="50% 50%";i.webkitTransformOrigin=n,i.mozTransformOrigin=n,i.transformOrigin=n,s=a.style;var p="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";s.transform=p,s.webkitTransform=p}r.appendChild(a);var c={container:a,perspectiveElem:r,startPos:e,endPos:e,type:t};return this.threeDElements.push(c),c},HybridRendererBase.prototype.build3dContainers=function(){var e,t=this.layers.length,r,i="";for(e=0;e=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var r=0,i=this.threeDElements.length;rr?(s=e/this.globalData.compSize.w,a=e/this.globalData.compSize.w,n=0,p=(t-this.globalData.compSize.h*(e/this.globalData.compSize.w))/2):(s=t/this.globalData.compSize.h,a=t/this.globalData.compSize.h,n=(e-this.globalData.compSize.w*(t/this.globalData.compSize.h))/2,p=0);var c=this.resizerElem.style;c.webkitTransform="matrix3d("+s+",0,0,0,0,"+a+",0,0,0,0,1,0,"+n+","+p+",0,1)",c.transform=c.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e=this.globalData.compSize.w,t=this.globalData.compSize.h,r,i=this.threeDElements.length;for(r=0;r=m;)R/=2,I/=2,D>>>=1;return(R+D)/I};return F.int32=function(){return E.g(4)|0},F.quick=function(){return E.g(4)/4294967296},F.double=F,x(f(E.S),e),(h.pass||v||function(L,R,I,D){return D&&(D.S&&y(D,E),L.state=function(){return y(E,{})}),I?(t[n]=L,R):L})(F,_,"global"in h?h.global:this==t,h.state)}t["seed"+n]=u;function P(l){var h,v=l.length,g=this,_=0,E=g.i=g.j=0,F=g.S=[];for(v||(l=[v++]);_r){var i=r;r=t,t=i}return Math.min(Math.max(e,t),r)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if(typeof e=="number"||e instanceof Number)return t=t||0,Math.abs(e-t);t||(t=helperLengthArray);var r,i=Math.min(e.length,t.length),s=0;for(r=0;r.5?m/(2-s-a):m/(s+a),s){case t:n=(r-i)/m+(r1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function hslToRgb(e){var t=e[0],r=e[1],i=e[2],s,a,n;if(r===0)s=i,n=i,a=i;else{var p=i<.5?i*(1+r):i+r-i*r,c=2*i-p;s=hue2rgb(c,p,t+1/3),a=hue2rgb(c,p,t),n=hue2rgb(c,p,t-1/3)}return[s,a,n,e[3]]}function linear(e,t,r,i,s){if((i===void 0||s===void 0)&&(i=t,s=r,t=0,r=1),r=r)return s;var n=r===t?0:(e-t)/(r-t);if(!i.length)return i+(s-i)*n;var p,c=i.length,m=createTypedArray("float32",c);for(p=0;p1){for(s=0;s1?t=1:t<0&&(t=0);var n=e(t);if($bm_isInstanceOfArray(s)){var p,c=s.length,m=createTypedArray("float32",c);for(p=0;pdata.k[t].t&&edata.k[t+1].t-e?(i=t+2,s=data.k[t+1].t):(i=t+1,s=data.k[t].t);break}i===-1&&(i=t+1,s=data.k[t].t)}var a={};return a.index=i,a.time=s/elem.comp.globalData.frameRate,a}function key(e){var t,r,i;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(i=s.length,r=0;rx.length-1)&&(P=x.length-1),l=x[x.length-1-P].t,f=o-l);var h,v,g;if(u==="pingpong"){var _=Math.floor((d-l)/f);if(_%2!==0)return this.getValueAtTime((f-(d-l)%f+l)/this.comp.globalData.frameRate,0)}else if(u==="offset"){var E=this.getValueAtTime(l/this.comp.globalData.frameRate,0),F=this.getValueAtTime(o/this.comp.globalData.frameRate,0),L=this.getValueAtTime(((d-l)%f+l)/this.comp.globalData.frameRate,0),R=Math.floor((d-l)/f);if(this.pv.length){for(g=new Array(E.length),v=g.length,h=0;h=o)return this.pv;var f,l;y?(P?f=Math.abs(this.elem.comp.globalData.frameRate*P):f=Math.max(0,this.elem.data.op-o),l=o+f):((!P||P>x.length-1)&&(P=x.length-1),l=x[P].t,f=l-o);var h,v,g;if(u==="pingpong"){var _=Math.floor((o-d)/f);if(_%2===0)return this.getValueAtTime(((o-d)%f+o)/this.comp.globalData.frameRate,0)}else if(u==="offset"){var E=this.getValueAtTime(o/this.comp.globalData.frameRate,0),F=this.getValueAtTime(l/this.comp.globalData.frameRate,0),L=this.getValueAtTime((f-(o-d)%f+o)/this.comp.globalData.frameRate,0),R=Math.floor((o-d)/f)+1;if(this.pv.length){for(g=new Array(E.length),v=g.length,h=0;h1?(x-d)/(P-1):1,f=0,l=0,h;this.pv.length?h=createTypedArray("float32",this.pv.length):h=0;for(var v;ff){var _=l,E=d.c&&l===h-1?0:l+1,F=(f-v)/o[l].addedLength;g=bez.getPointInSegment(d.v[_],d.v[E],d.o[_],d.i[E],F,o[l]);break}else v+=o[l].addedLength;l+=1}return g||(g=d.c?[d.v[0][0],d.v[0][1]]:[d.v[d._length-1][0],d.v[d._length-1][1]]),g},vectorOnPath:function(P,y,d){P==1?P=this.v.c:P==0&&(P=.999);var x=this.pointOnPath(P,y),o=this.pointOnPath(P+.001,y),f=o[0]-x[0],l=o[1]-x[1],h=Math.sqrt(Math.pow(f,2)+Math.pow(l,2));if(h===0)return[0,0];var v=d==="tangent"?[f/h,l/h]:[-l/h,f/h];return v},tangentOnPath:function(P,y){return this.vectorOnPath(P,y,"tangent")},normalOnPath:function(P,y){return this.vectorOnPath(P,y,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([b],c),extendPrototype([b],m),m.prototype.getValueAtTime=p,m.prototype.initiateExpression=ExpressionManager.initiateExpression;var C=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(u,P,y,d,x){var o=C(u,P,y,d,x);return o.propertyIndex=P.ix,o.lock=!1,y===3?expressionHelpers.searchExpressions(u,P.pt,o):y===4&&expressionHelpers.searchExpressions(u,P.ks,o),o.k&&u.addDynamicProperty(o),o}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function e(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(t,r){var i=this.calculateExpression(r);if(t.t!==i){var s={};return this.copyData(s,t),s.t=i.toString(),s.__complete=!1,s}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),r=this.searchExpressions();return this.kf=t||r,this.kf},TextProperty.prototype.searchExpressions=e}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function e(t,r){var i=createNS("feMerge");i.setAttribute("result",t);var s,a;for(a=0;a=m?C=y<0?i:s:C=i+P*Math.pow((p-e)/y,1/r),b[u]=C,u+=1,a+=256/(n-1);return b.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,r=this.filterManager.effectElements;this.feFuncRComposed&&(e||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(t=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(t=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(t=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(t=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(t=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",t))}};function SVGDropShadowEffect(e,t,r,i,s){var a=t.container.globalData.renderConfig.filterSize,n=t.data.fs||a;e.setAttribute("x",n.x||a.x),e.setAttribute("y",n.y||a.y),e.setAttribute("width",n.width||a.width),e.setAttribute("height",n.height||a.height),this.filterManager=t;var p=createNS("feGaussianBlur");p.setAttribute("in","SourceAlpha"),p.setAttribute("result",i+"_drop_shadow_1"),p.setAttribute("stdDeviation","0"),this.feGaussianBlur=p,e.appendChild(p);var c=createNS("feOffset");c.setAttribute("dx","25"),c.setAttribute("dy","0"),c.setAttribute("in",i+"_drop_shadow_1"),c.setAttribute("result",i+"_drop_shadow_2"),this.feOffset=c,e.appendChild(c);var m=createNS("feFlood");m.setAttribute("flood-color","#00ff00"),m.setAttribute("flood-opacity","1"),m.setAttribute("result",i+"_drop_shadow_3"),this.feFlood=m,e.appendChild(m);var b=createNS("feComposite");b.setAttribute("in",i+"_drop_shadow_3"),b.setAttribute("in2",i+"_drop_shadow_2"),b.setAttribute("operator","in"),b.setAttribute("result",i+"_drop_shadow_4"),e.appendChild(b);var C=this.createMergeNode(i,[i+"_drop_shadow_4",s]);e.appendChild(C)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(t[0]*255),Math.round(t[1]*255),Math.round(t[2]*255)))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,r){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,r=_svgMatteSymbols.length;t{const r=e.__vccOpts||e;for(const[i,s]of t)r[i]=s;return r};const _sfc_main=defineComponent({props:{animationData:{type:Object,default:()=>({})},animationLink:{type:String,default:""},loop:{type:[Boolean,Number],default:!0},autoPlay:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},speed:{type:Number,default:1},delay:{type:Number,default:0},direction:{type:String,default:"forward"},pauseOnHover:{type:Boolean,default:!1},playOnHover:{type:Boolean,default:!1},backgroundColor:{type:String,default:"transparent"},pauseAnimation:{type:Boolean,default:!1}},emits:{onComplete:null,onLoopComplete:null,onEnterFrame:null,onSegmentStart:null,onAnimationLoaded:null},setup(e,{emit:t}){let r=ref(null);const i=ref("");let s=1;const a=E=>document.querySelector(`[data-id="${E}" ]`)!==null,n=async E=>{let F=e.autoPlay;e.playOnHover&&(F=!1);let L={};if(e.animationData!=={}&&(L=JSON.parse(JSON.stringify(e.animationData))),e.animationLink!="")try{L=await(await fetch(e.animationLink)).json()}catch(I){console.error(I);return}let R=e.loop;typeof R=="number"&&R>0&&(R=R-1),e.delay>0&&(F=!1),r=Lottie.loadAnimation({container:E,renderer:"svg",loop:R,autoplay:F,animationData:L}),setTimeout(()=>{F=e.autoPlay,e.playOnHover?r.pause():F?r.play():r.pause(),t("onAnimationLoaded")},e.delay),r.setSpeed(e.speed),e.direction==="reverse"&&r.setDirection(-1),e.direction==="normal"&&r.setDirection(1),(e.pauseAnimation||e.playOnHover)&&r.pause(),r.addEventListener("loopComplete",()=>{e.direction==="alternate"&&(r.stop(),s=s*-1,r.setDirection(s),r.play()),t("onLoopComplete")}),r.addEventListener("complete",()=>{t("onComplete")}),r.addEventListener("enterFrame",()=>{t("onEnterFrame")}),r.addEventListener("segmentStart",()=>{t("onSegmentStart")})},p=computed(()=>{let E=e.width,F=e.height;return typeof e.width=="number"&&(E=`${e.width}px`),typeof e.height=="number"&&(F=`${e.height}px`),{"--lottie-animation-container-width":E,"--lottie-animation-container-height":F,"--lottie-animation-container-background-color":e.backgroundColor}}),c=()=>{r&&e.pauseOnHover&&r.pause(),r&&e.playOnHover&&r.play()},m=()=>{r&&e.pauseOnHover&&r.play(),r&&e.playOnHover&&r.pause()};watch(()=>e.pauseAnimation,()=>{if((e.pauseOnHover||e.playOnHover)&&e.pauseAnimation){console.error("If you are using pauseAnimation prop for Vue3-Lottie, please remove the props pauseOnHover and playOnHover");return}r&&(e.pauseAnimation?r.pause():r.play())});const b=()=>{r&&r.play()},C=()=>{r&&r.pause()},u=()=>{r&&r.stop()},P=()=>{r&&r.destroy()},y=(E=1)=>{if(E<=0)throw new Error("Speed must be greater than 0");r&&r.setSpeed(E)},d=E=>{r&&(E==="forward"?r.setDirection(1):E==="reverse"&&r.setDirection(-1))},x=(E,F=!0)=>{r&&r.goToAndStop(E,F)},o=(E,F=!0)=>{r&&r.goToAndPlay(E,F)},f=(E,F=!1)=>{r&&r.playSegments(E,F)},l=(E=!0)=>{r&&r.setSubframe(E)},h=(E=!0)=>{if(r)return r.getDuration(E)},v=(E,F=0)=>{r&&r.renderer.elements[F].updateDocumentData(E)},g=E=>{for(var F="",L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",R=L.length,I=0;I{if(e.pauseOnHover&&e.playOnHover)throw new Error("You cannot set pauseOnHover and playOnHover for Vue3-Lottie at the same time.");if(e.animationLink===""&&e.animationData==={})throw new Error("You must provide either animationLink or animationData");const F=setInterval(()=>{if(a(E)){clearInterval(F);const L=document.querySelector(`[data-id="${E}" ]`);L&&n(L)}},0)};return onMounted(async()=>{i.value=g(20),_(i.value)}),{elementid:i,hoverEnded:m,hoverStarted:c,getCurrentStyle:p,play:b,pause:C,stop:u,destroy:P,setSpeed:y,setDirection:d,goToAndStop:x,goToAndPlay:o,playSegments:f,setSubFrame:l,getDuration:h,updateDocumentData:v}}}),_hoisted_1=["data-id"];function _sfc_render(e,t,r,i,s,a){return openBlock(),createElementBlock("div",{"data-id":e.elementid,class:"lottie-animation-container",style:normalizeStyle(e.getCurrentStyle),onMouseenter:t[0]||(t[0]=(...n)=>e.hoverStarted&&e.hoverStarted(...n)),onMouseleave:t[1]||(t[1]=(...n)=>e.hoverEnded&&e.hoverEnded(...n))},null,44,_hoisted_1)}var Vue3Lottie=_export_sfc(_sfc_main,[["render",_sfc_render]]);export{Vue3Lottie as V};