;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o);},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i1){hsv[1]=1;}else if(hsv[1]<=0){hsv[1]=0;}return HSVtoRGB(hsv[0],hsv[1],hsv[2]);}function addBrightnessToRGB(color,offset){var hsv=RGBtoHSV(color[0]*255,color[1]*255,color[2]*255);hsv[2]+=offset;if(hsv[2]>1){hsv[2]=1;}else if(hsv[2]<0){hsv[2]=0;}return HSVtoRGB(hsv[0],hsv[1],hsv[2]);}function addHueToRGB(color,offset){var hsv=RGBtoHSV(color[0]*255,color[1]*255,color[2]*255);hsv[0]+=offset/360;if(hsv[0]>1){hsv[0]-=1;}else if(hsv[0]<0){hsv[0]+=1;}return HSVtoRGB(hsv[0],hsv[1],hsv[2]);}var rgbToHex=function(){var colorMap=[];var i;var hex;for(i=0;i<256;i+=1){hex=i.toString(16);colorMap[i]=hex.length===1?'0'+hex:hex;}return function(r,g,b){if(r<0){r=0;}if(g<0){g=0;}if(b<0){b=0;}return'#'+colorMap[r]+colorMap[g]+colorMap[b];};}();var setSubframeEnabled=function setSubframeEnabled(flag){subframeEnabled=!!flag;};var getSubframeEnabled=function getSubframeEnabled(){return subframeEnabled;};var setExpressionsPlugin=function setExpressionsPlugin(value){expressionsPlugin=value;};var getExpressionsPlugin=function getExpressionsPlugin(){return expressionsPlugin;};var setDefaultCurveSegments=function setDefaultCurveSegments(value){defaultCurveSegments=value;};var getDefaultCurveSegments=function getDefaultCurveSegments(){return defaultCurveSegments;};var setIdPrefix=function setIdPrefix(value){idPrefix$1=value;};function createNS(type){// return {appendChild:function(){},setAttribute:function(){},style:{}} return document.createElementNS(svgNS,type);}function _typeof$5(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof$5=function _typeof(obj){return typeof obj;};}else{_typeof$5=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof$5(obj);}var dataManager=function(){var _counterId=1;var processes=[];var workerFn;var workerInstance;var workerProxy={onmessage:function onmessage(){},postMessage:function postMessage(path){workerFn({data:path});}};var _workerSelf={postMessage:function postMessage(data){workerProxy.onmessage({data:data});}};function createWorker(fn){if(window.Worker&&window.Blob&&getWebWorker()){var blob=new Blob(['var _workerSelf = self; self.onmessage = ',fn.toString()],{type:'text/javascript'});// var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' }); var url=URL.createObjectURL(blob);return new Worker(url);}workerFn=fn;return workerProxy;}function setupWorker(){if(!workerInstance){workerInstance=createWorker(function workerStart(e){function dataFunctionManager(){function completeLayers(layers,comps){var layerData;var i;var len=layers.length;var j;var jLen;var k;var kLen;for(i=0;i=0;i-=1){if(arr[i].ty==='sh'){if(arr[i].ks.k.i){convertPathsToAbsoluteValues(arr[i].ks.k);}else{jLen=arr[i].ks.k.length;for(j=0;janimVersion[0]){return true;}if(animVersion[0]>minimum[0]){return false;}if(minimum[1]>animVersion[1]){return true;}if(animVersion[1]>minimum[1]){return false;}if(minimum[2]>animVersion[2]){return true;}if(animVersion[2]>minimum[2]){return false;}return null;}var checkText=function(){var minimumVersion=[4,4,14];function updateTextLayer(textLayer){var documentData=textLayer.t.d;textLayer.t.d={k:[{s:documentData,t:0}]};}function iterateLayers(layers){var i;var len=layers.length;for(i=0;i=0;i-=1){if(arr[i].ty==='sh'){if(arr[i].ks.k.i){arr[i].ks.k.c=arr[i].closed;}else{jLen=arr[i].ks.k.length;for(j=0;j500){this._imageLoaded();clearInterval(intervalId);}_count+=1;}.bind(this),50);}function createImageData(assetData){var path=getAssetsPath(assetData,this.assetsPath,this.path);var img=createNS('image');if(isSafari){this.testImageLoaded(img);}else{img.addEventListener('load',this._imageLoaded,false);}img.addEventListener('error',function(){ob.img=proxyImage;this._imageLoaded();}.bind(this),false);img.setAttributeNS('http://www.w3.org/1999/xlink','href',path);if(this._elementHelper.append){this._elementHelper.append(img);}else{this._elementHelper.appendChild(img);}var ob={img:img,assetData:assetData};return ob;}function createImgData(assetData){var path=getAssetsPath(assetData,this.assetsPath,this.path);var img=createTag('img');img.crossOrigin='anonymous';img.addEventListener('load',this._imageLoaded,false);img.addEventListener('error',function(){ob.img=proxyImage;this._imageLoaded();}.bind(this),false);img.src=path;var ob={img:img,assetData:assetData};return ob;}function createFootageData(data){var ob={assetData:data};var path=getAssetsPath(data,this.assetsPath,this.path);dataManager.loadData(path,function(footageData){ob.img=footageData;this._footageLoaded();}.bind(this),function(){ob.img={};this._footageLoaded();}.bind(this));return ob;}function loadAssets(assets,cb){this.imagesLoadedCb=cb;var i;var len=assets.length;for(i=0;ithis.animationData.op){this.animationData.op=data.op;this.totalFrames=Math.floor(data.op-this.animationData.ip);}var layers=this.animationData.layers;var i;var len=layers.length;var newLayers=data.layers;var j;var jLen=newLayers.length;for(j=0;jthis.timeCompleted){this.currentFrame=this.timeCompleted;}this.trigger('enterFrame');this.renderFrame();this.trigger('drawnFrame');};AnimationItem.prototype.renderFrame=function(){if(this.isLoaded===false||!this.renderer){return;}try{this.renderer.renderFrame(this.currentFrame+this.firstFrame);}catch(error){this.triggerRenderFrameError(error);}};AnimationItem.prototype.play=function(name){if(name&&this.name!==name){return;}if(this.isPaused===true){this.isPaused=false;this.trigger('_pause');this.audioController.resume();if(this._idle){this._idle=false;this.trigger('_active');}}};AnimationItem.prototype.pause=function(name){if(name&&this.name!==name){return;}if(this.isPaused===false){this.isPaused=true;this.trigger('_play');this._idle=true;this.trigger('_idle');this.audioController.pause();}};AnimationItem.prototype.togglePause=function(name){if(name&&this.name!==name){return;}if(this.isPaused===true){this.play();}else{this.pause();}};AnimationItem.prototype.stop=function(name){if(name&&this.name!==name){return;}this.pause();this.playCount=0;this._completedLoop=false;this.setCurrentRawFrameValue(0);};AnimationItem.prototype.getMarkerData=function(markerName){var marker;for(var i=0;i totalFrames - 1 for addressing non looping and looping animations. // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop. if(nextValue>=this.totalFrames-1&&this.frameModifier>0){if(!this.loop||this.playCount===this.loop){if(!this.checkSegments(nextValue>this.totalFrames?nextValue%this.totalFrames:0)){_isComplete=true;nextValue=this.totalFrames-1;}}else if(nextValue>=this.totalFrames){this.playCount+=1;if(!this.checkSegments(nextValue%this.totalFrames)){this.setCurrentRawFrameValue(nextValue%this.totalFrames);this._completedLoop=true;this.trigger('loopComplete');}}else{this.setCurrentRawFrameValue(nextValue);}}else if(nextValue<0){if(!this.checkSegments(nextValue%this.totalFrames)){if(this.loop&&!(this.playCount--<=0&&this.loop!==true)){// eslint-disable-line no-plusplus this.setCurrentRawFrameValue(this.totalFrames+nextValue%this.totalFrames);if(!this._completedLoop){this._completedLoop=true;}else{this.trigger('loopComplete');}}else{_isComplete=true;nextValue=0;}}}else{this.setCurrentRawFrameValue(nextValue);}if(_isComplete){this.setCurrentRawFrameValue(nextValue);this.pause();this.trigger('complete');}};AnimationItem.prototype.adjustSegment=function(arr,offset){this.playCount=0;if(arr[1]0){if(this.playSpeed<0){this.setSpeed(-this.playSpeed);}else{this.setDirection(-1);}}this.totalFrames=arr[0]-arr[1];this.timeCompleted=this.totalFrames;this.firstFrame=arr[1];this.setCurrentRawFrameValue(this.totalFrames-0.001-offset);}else if(arr[1]>arr[0]){if(this.frameModifier<0){if(this.playSpeed<0){this.setSpeed(-this.playSpeed);}else{this.setDirection(1);}}this.totalFrames=arr[1]-arr[0];this.timeCompleted=this.totalFrames;this.firstFrame=arr[0];this.setCurrentRawFrameValue(0.001+offset);}this.trigger('segmentStart');};AnimationItem.prototype.setSegment=function(init,end){var pendingFrame=-1;if(this.isPaused){if(this.currentRawFrame+this.firstFrameend){pendingFrame=end-init;}}this.firstFrame=init;this.totalFrames=end-init;this.timeCompleted=this.totalFrames;if(pendingFrame!==-1){this.goToAndStop(pendingFrame,true);}};AnimationItem.prototype.playSegments=function(arr,forceFlag){if(forceFlag){this.segments.length=0;}if(_typeof$4(arr[0])==='object'){var i;var len=arr.length;for(i=0;i=0;i-=1){registeredAnimations[i].animation.destroy(animation);}}function searchAnimations(animationData,standalone,renderer){var animElements=[].concat([].slice.call(document.getElementsByClassName('lottie')),[].slice.call(document.getElementsByClassName('bodymovin')));var i;var lenAnims=animElements.length;for(i=0;i returns the easing value | x must be in [0, 1] range * */var ob={};ob.getBezierEasing=getBezierEasing;var beziers={};function getBezierEasing(a,b,c,d,nm){var str=nm||('bez_'+a+'_'+b+'_'+c+'_'+d).replace(/\./g,'p');if(beziers[str]){return beziers[str];}var bezEasing=new BezierEasing([a,b,c,d]);beziers[str]=bezEasing;return bezEasing;}// These values are established by empiricism with tests (tradeoff: performance VS precision) var NEWTON_ITERATIONS=4;var NEWTON_MIN_SLOPE=0.001;var SUBDIVISION_PRECISION=0.0000001;var SUBDIVISION_MAX_ITERATIONS=10;var kSplineTableSize=11;var kSampleStepSize=1.0/(kSplineTableSize-1.0);var float32ArraySupported=typeof Float32Array==='function';function A(aA1,aA2){return 1.0-3.0*aA2+3.0*aA1;}function B(aA1,aA2){return 3.0*aA2-6.0*aA1;}function C(aA1){return 3.0*aA1;}// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. function calcBezier(aT,aA1,aA2){return((A(aA1,aA2)*aT+B(aA1,aA2))*aT+C(aA1))*aT;}// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2. function getSlope(aT,aA1,aA2){return 3.0*A(aA1,aA2)*aT*aT+2.0*B(aA1,aA2)*aT+C(aA1);}function binarySubdivide(aX,aA,aB,mX1,mX2){var currentX,currentT,i=0;do{currentT=aA+(aB-aA)/2.0;currentX=calcBezier(currentT,mX1,mX2)-aX;if(currentX>0.0){aB=currentT;}else{aA=currentT;}}while(Math.abs(currentX)>SUBDIVISION_PRECISION&&++i=NEWTON_MIN_SLOPE){return newtonRaphsonIterate(aX,guessForT,mX1,mX2);}if(initialSlope===0.0){return guessForT;}return binarySubdivide(aX,intervalStart,intervalStart+kSampleStepSize,mX1,mX2);}};return ob;}();var pooling=function(){function _double(arr){return arr.concat(createSizedArray(arr.length));}return{"double":_double};}();var poolFactory=function(){return function(initialLength,_create,_release){var _length=0;var _maxLength=initialLength;var pool=createSizedArray(_maxLength);var ob={newElement:newElement,release:release};function newElement(){var element;if(_length){_length-=1;element=pool[_length];}else{element=_create();}return element;}function release(element){if(_length===_maxLength){pool=pooling["double"](pool);_maxLength*=2;}if(_release){_release(element);}pool[_length]=element;_length+=1;}return ob;};}();var bezierLengthPool=function(){function create(){return{addedLength:0,percents:createTypedArray('float32',getDefaultCurveSegments()),lengths:createTypedArray('float32',getDefaultCurveSegments())};}return poolFactory(8,create);}();var segmentsLengthPool=function(){function create(){return{lengths:[],totalLength:0};}function release(element){var i;var len=element.lengths.length;for(i=0;i-0.001&&det1<0.001;}function pointOnLine3D(x1,y1,z1,x2,y2,z2,x3,y3,z3){if(z1===0&&z2===0&&z3===0){return pointOnLine2D(x1,y1,x2,y2,x3,y3);}var dist1=math.sqrt(math.pow(x2-x1,2)+math.pow(y2-y1,2)+math.pow(z2-z1,2));var dist2=math.sqrt(math.pow(x3-x1,2)+math.pow(y3-y1,2)+math.pow(z3-z1,2));var dist3=math.sqrt(math.pow(x3-x2,2)+math.pow(y3-y2,2)+math.pow(z3-z2,2));var diffDist;if(dist1>dist2){if(dist1>dist3){diffDist=dist1-dist2-dist3;}else{diffDist=dist3-dist2-dist1;}}else if(dist3>dist2){diffDist=dist3-dist2-dist1;}else{diffDist=dist2-dist1-dist3;}return diffDist>-0.0001&&diffDist<0.0001;}var getBezierLength=function(){return function(pt1,pt2,pt3,pt4){var curveSegments=getDefaultCurveSegments();var k;var i;var len;var ptCoord;var perc;var addedLength=0;var ptDistance;var point=[];var lastPoint=[];var lengthData=bezierLengthPool.newElement();len=pt3.length;for(k=0;klengthPos?-1:1;var flag=true;while(flag){if(lengths[initPos]<=lengthPos&&lengths[initPos+1]>lengthPos){lPerc=(lengthPos-lengths[initPos])/(lengths[initPos+1]-lengths[initPos]);flag=false;}else{initPos+=dir;}if(initPos<0||initPos>=len-1){// FIX for TypedArrays that don't store floating point values with enough accuracy if(initPos===len-1){return percents[initPos];}flag=false;}}return percents[initPos]+(percents[initPos+1]-percents[initPos])*lPerc;}function getPointInSegment(pt1,pt2,pt3,pt4,percent,bezierData){var t1=getDistancePerc(percent,bezierData);var u1=1-t1;var ptX=math.round((u1*u1*u1*pt1[0]+(t1*u1*u1+u1*t1*u1+u1*u1*t1)*pt3[0]+(t1*t1*u1+u1*t1*t1+t1*u1*t1)*pt4[0]+t1*t1*t1*pt2[0])*1000)/1000;var ptY=math.round((u1*u1*u1*pt1[1]+(t1*u1*u1+u1*t1*u1+u1*u1*t1)*pt3[1]+(t1*t1*u1+u1*t1*t1+t1*u1*t1)*pt4[1]+t1*t1*t1*pt2[1])*1000)/1000;return[ptX,ptY];}var bezierSegmentPoints=createTypedArray('float32',8);function getNewSegment(pt1,pt2,pt3,pt4,startPerc,endPerc,bezierData){if(startPerc<0){startPerc=0;}else if(startPerc>1){startPerc=1;}var t0=getDistancePerc(startPerc,bezierData);endPerc=endPerc>1?1:endPerc;var t1=getDistancePerc(endPerc,bezierData);var i;var len=pt1.length;var u0=1-t0;var u1=1-t1;var u0u0u0=u0*u0*u0;var t0u0u0_3=t0*u0*u0*3;// eslint-disable-line camelcase var t0t0u0_3=t0*t0*u0*3;// eslint-disable-line camelcase var t0t0t0=t0*t0*t0;// var u0u0u1=u0*u0*u1;var t0u0u1_3=t0*u0*u1+u0*t0*u1+u0*u0*t1;// eslint-disable-line camelcase var t0t0u1_3=t0*t0*u1+u0*t0*t1+t0*u0*t1;// eslint-disable-line camelcase var t0t0t1=t0*t0*t1;// var u0u1u1=u0*u1*u1;var t0u1u1_3=t0*u1*u1+u0*t1*u1+u0*u1*t1;// eslint-disable-line camelcase var t0t1u1_3=t0*t1*u1+u0*t1*t1+t0*u1*t1;// eslint-disable-line camelcase var t0t1t1=t0*t1*t1;// var u1u1u1=u1*u1*u1;var t1u1u1_3=t1*u1*u1+u1*t1*u1+u1*u1*t1;// eslint-disable-line camelcase var t1t1u1_3=t1*t1*u1+u1*t1*t1+t1*u1*t1;// eslint-disable-line camelcase var t1t1t1=t1*t1*t1;for(i=0;i=nextKeyData.t-offsetTime){if(keyData.h){keyData=nextKeyData;}iterationIndex=0;break;}if(nextKeyData.t-offsetTime>frameNum){iterationIndex=i;break;}if(i=nextKeyTime||frameNum=nextKeyTime?bezierData.points.length-1:0;kLen=bezierData.points[ind].point.length;for(k=0;k=addedLength&&distanceInLine=nextKeyTime){newValue[0]=endValue[0];newValue[1]=endValue[1];newValue[2]=endValue[2];}else if(frameNum<=keyTime){newValue[0]=keyData.s[0];newValue[1]=keyData.s[1];newValue[2]=keyData.s[2];}else{var quatStart=createQuaternion(keyData.s);var quatEnd=createQuaternion(endValue);var time=(frameNum-keyTime)/(nextKeyTime-keyTime);quaternionToEuler(newValue,slerp(quatStart,quatEnd,time));}}else{for(i=0;i=nextKeyTime){perc=1;}else if(frameNum0.000001){omega=Math.acos(cosom);sinom=Math.sin(omega);scale0=Math.sin((1.0-t)*omega)/sinom;scale1=Math.sin(t*omega)/sinom;}else{scale0=1.0-t;scale1=t;}out[0]=scale0*ax+scale1*bx;out[1]=scale0*ay+scale1*by;out[2]=scale0*az+scale1*bz;out[3]=scale0*aw+scale1*bw;return out;}function quaternionToEuler(out,quat){var qx=quat[0];var qy=quat[1];var qz=quat[2];var qw=quat[3];var heading=Math.atan2(2*qy*qw-2*qx*qz,1-2*qy*qy-2*qz*qz);var attitude=Math.asin(2*qx*qy+2*qz*qw);var bank=Math.atan2(2*qx*qw-2*qy*qz,1-2*qx*qx-2*qz*qz);out[0]=heading/degToRads;out[1]=attitude/degToRads;out[2]=bank/degToRads;}function createQuaternion(values){var heading=values[0]*degToRads;var attitude=values[1]*degToRads;var bank=values[2]*degToRads;var c1=Math.cos(heading/2);var c2=Math.cos(attitude/2);var c3=Math.cos(bank/2);var s1=Math.sin(heading/2);var s2=Math.sin(attitude/2);var s3=Math.sin(bank/2);var w=c1*c2*c3-s1*s2*s3;var x=s1*s2*c3+c1*c2*s3;var y=s1*c2*c3+c1*s2*s3;var z=c1*s2*c3-s1*c2*s3;return[x,y,z,w];}function getValueAtCurrentTime(){var frameNum=this.comp.renderedFrame-this.offsetTime;var initTime=this.keyframes[0].t-this.offsetTime;var endTime=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(frameNum===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=endTime&&frameNum>=endTime||this._caching.lastFrame=frameNum){this._caching._lastKeyframeIndex=-1;this._caching.lastIndex=0;}var renderResult=this.interpolateValue(frameNum,this._caching);this.pv=renderResult;}this._caching.lastFrame=frameNum;return this.pv;}function setVValue(val){var multipliedValue;if(this.propType==='unidimensional'){multipliedValue=val*this.mult;if(mathAbs(this.v-multipliedValue)>0.00001){this.v=multipliedValue;this._mdf=true;}}else{var i=0;var len=this.v.length;while(i0.00001){this.v[i]=multipliedValue;this._mdf=true;}i+=1;}}}function processEffectsSequence(){if(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length){return;}if(this.lock){this.setVValue(this.pv);return;}this.lock=true;this._mdf=this._isFirstFrame;var i;var len=this.effectsSequence.length;var finalValue=this.kf?this.pv:this.data.k;for(i=0;i=this._maxLength){this.doubleArrayLength();}switch(type){case'v':arr=this.v;break;case'i':arr=this.i;break;case'o':arr=this.o;break;default:arr=[];break;}if(!arr[pos]||arr[pos]&&!replace){arr[pos]=pointPool.newElement();}arr[pos][0]=x;arr[pos][1]=y;};ShapePath.prototype.setTripleAt=function(vX,vY,oX,oY,iX,iY,pos,replace){this.setXYAt(vX,vY,'v',pos,replace);this.setXYAt(oX,oY,'o',pos,replace);this.setXYAt(iX,iY,'i',pos,replace);};ShapePath.prototype.reverse=function(){var newPath=new ShapePath();newPath.setPathData(this.c,this._length);var vertices=this.v;var outPoints=this.o;var inPoints=this.i;var init=0;if(this.c){newPath.setTripleAt(vertices[0][0],vertices[0][1],inPoints[0][0],inPoints[0][1],outPoints[0][0],outPoints[0][1],0,false);init=1;}var cnt=this._length-1;var len=this._length;var i;for(i=init;i=kf[kf.length-1].t-this.offsetTime){keyPropS=kf[kf.length-1].s?kf[kf.length-1].s[0]:kf[kf.length-2].e[0];/* if(kf[kf.length - 1].s){ keyPropS = kf[kf.length - 1].s[0]; }else{ keyPropS = kf[kf.length - 2].e[0]; } */isHold=true;}else{var i=iterationIndex;var len=kf.length-1;var flag=true;var keyData;var nextKeyData;var keyframeMetadata;while(flag){keyData=kf[i];nextKeyData=kf[i+1];if(nextKeyData.t-this.offsetTime>frameNum){break;}if(i=nextKeyData.t-this.offsetTime){perc=1;}else if(frameNumendTime&&frameNum>endTime))){/// / this._caching.lastIndex=lastFrame0||val>-0.000001&&val<0){return _rnd(val*v)/v;}return val;}function to2dCSS(){// Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed. /* if(this.isIdentity()) { return ''; } */var props=this.props;var _a=roundMatrixProperty(props[0]);var _b=roundMatrixProperty(props[1]);var _c=roundMatrixProperty(props[4]);var _d=roundMatrixProperty(props[5]);var _e=roundMatrixProperty(props[12]);var _f=roundMatrixProperty(props[13]);return'matrix('+_a+','+_b+','+_c+','+_d+','+_e+','+_f+')';}return function(){this.reset=reset;this.rotate=rotate;this.rotateX=rotateX;this.rotateY=rotateY;this.rotateZ=rotateZ;this.skew=skew;this.skewFromAxis=skewFromAxis;this.shear=shear;this.scale=scale;this.setTransform=setTransform;this.translate=translate;this.transform=transform;this.applyToPoint=applyToPoint;this.applyToX=applyToX;this.applyToY=applyToY;this.applyToZ=applyToZ;this.applyToPointArray=applyToPointArray;this.applyToTriplePoints=applyToTriplePoints;this.applyToPointStringified=applyToPointStringified;this.toCSS=toCSS;this.to2dCSS=to2dCSS;this.clone=clone;this.cloneFromProps=cloneFromProps;this.equals=equals;this.inversePoints=inversePoints;this.inversePoint=inversePoint;this.getInverseMatrix=getInverseMatrix;this._t=this.transform;this.isIdentity=isIdentity;this._identity=true;this._identityCalculated=false;this.props=createTypedArray('float32',16);this.reset();};}();function _typeof$3(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof$3=function _typeof(obj){return typeof obj;};}else{_typeof$3=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof$3(obj);}var lottie={};function setLocation(href){setLocationHref(href);}function searchAnimations(){{animationManager.searchAnimations();}}function setSubframeRendering(flag){setSubframeEnabled(flag);}function setPrefix(prefix){setIdPrefix(prefix);}function loadAnimation(params){return animationManager.loadAnimation(params);}function setQuality(value){if(typeof value==='string'){switch(value){case'high':setDefaultCurveSegments(200);break;default:case'medium':setDefaultCurveSegments(50);break;case'low':setDefaultCurveSegments(10);break;}}else if(!isNaN(value)&&value>1){setDefaultCurveSegments(value);}}function inBrowser(){return typeof navigator!=='undefined';}function installPlugin(type,plugin){if(type==='expressions'){setExpressionsPlugin(plugin);}}function getFactory(name){switch(name){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.start = start; 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(){if(document.readyState==='complete'){clearInterval(readyStateCheckInterval);searchAnimations();}}function getQueryVariable(variable){var vars=queryString.split('&');for(var i=0;i=1){segments.push({s:s-1,e:e-1});}else{segments.push({s:s,e:1});segments.push({s:0,e:e-1});}var shapeSegments=[];var i;var len=segments.length;var segmentOb;for(i=0;iaddedLength+shapeLength)){var shapeS;var shapeE;if(segmentOb.s*totalModifierLength<=addedLength){shapeS=0;}else{shapeS=(segmentOb.s*totalModifierLength-addedLength)/shapeLength;}if(segmentOb.e*totalModifierLength>=addedLength+shapeLength){shapeE=1;}else{shapeE=(segmentOb.e*totalModifierLength-addedLength)/shapeLength;}shapeSegments.push([shapeS,shapeE]);}}if(!shapeSegments.length){shapeSegments.push([0,0]);}return shapeSegments;};TrimModifier.prototype.releasePathsData=function(pathsData){var i;var len=pathsData.length;for(i=0;i1){s=1+o;}else if(this.s.v<0){s=0+o;}else{s=this.s.v+o;}if(this.e.v>1){e=1+o;}else if(this.e.v<0){e=0+o;}else{e=this.e.v+o;}if(s>e){var _s=s;s=e;e=_s;}s=Math.round(s*10000)*0.0001;e=Math.round(e*10000)*0.0001;this.sValue=s;this.eValue=e;}else{s=this.sValue;e=this.eValue;}var shapePaths;var i;var len=this.shapes.length;var j;var jLen;var pathsData;var pathData;var totalShapeLength;var totalModifierLength=0;if(e===s){for(i=0;i=0;i-=1){shapeData=this.shapes[i];if(shapeData.shape._mdf){localShapeCollection=shapeData.localShapeCollection;localShapeCollection.releaseShapes();// if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group if(this.m===2&&len>1){edges=this.calculateShapeEdges(s,e,shapeData.totalShapeLength,addedLength,totalModifierLength);addedLength+=shapeData.totalShapeLength;}else{edges=[[shapeS,shapeE]];}jLen=edges.length;for(j=0;j=1){segments.push({s:shapeData.totalShapeLength*(shapeS-1),e:shapeData.totalShapeLength*(shapeE-1)});}else{segments.push({s:shapeData.totalShapeLength*shapeS,e:shapeData.totalShapeLength});segments.push({s:0,e:shapeData.totalShapeLength*(shapeE-1)});}var newShapesData=this.addShapes(shapeData,segments[0]);if(segments[0].s!==segments[0].e){if(segments.length>1){var lastShapeInCollection=shapeData.shape.paths.shapes[shapeData.shape.paths._length-1];if(lastShapeInCollection.c){var lastShape=newShapesData.pop();this.addPaths(newShapesData,localShapeCollection);newShapesData=this.addShapes(shapeData,segments[1],lastShape);}else{this.addPaths(newShapesData,localShapeCollection);newShapesData=this.addShapes(shapeData,segments[1]);}}this.addPaths(newShapesData,localShapeCollection);}}shapeData.shape.paths=localShapeCollection;}}}else if(this._mdf){for(i=0;ishapeSegment.e){shapePath.c=false;break;}else{if(shapeSegment.s<=addedLength&&shapeSegment.e>=addedLength+currentLengthData.addedLength){this.addSegment(shapePaths[i].v[j-1],shapePaths[i].o[j-1],shapePaths[i].i[j],shapePaths[i].v[j],shapePath,segmentCount,newShape);newShape=false;}else{segment=bez.getNewSegment(shapePaths[i].v[j-1],shapePaths[i].v[j],shapePaths[i].o[j-1],shapePaths[i].i[j],(shapeSegment.s-addedLength)/currentLengthData.addedLength,(shapeSegment.e-addedLength)/currentLengthData.addedLength,lengths[j-1]);this.addSegmentFromArray(segment,shapePath,segmentCount,newShape);// this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape); newShape=false;shapePath.c=false;}addedLength+=currentLengthData.addedLength;segmentCount+=1;}}if(shapePaths[i].c&&lengths.length){currentLengthData=lengths[j-1];if(addedLength<=shapeSegment.e){var segmentLength=lengths[j-1].addedLength;if(shapeSegment.s<=addedLength&&shapeSegment.e>=addedLength+segmentLength){this.addSegment(shapePaths[i].v[j-1],shapePaths[i].o[j-1],shapePaths[i].i[0],shapePaths[i].v[0],shapePath,segmentCount,newShape);newShape=false;}else{segment=bez.getNewSegment(shapePaths[i].v[j-1],shapePaths[i].v[0],shapePaths[i].o[j-1],shapePaths[i].i[0],(shapeSegment.s-addedLength)/segmentLength,(shapeSegment.e-addedLength)/segmentLength,lengths[j-1]);this.addSegmentFromArray(segment,shapePath,segmentCount,newShape);// this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape); newShape=false;shapePath.c=false;}}else{shapePath.c=false;}addedLength+=currentLengthData.addedLength;segmentCount+=1;}if(shapePath._length){shapePath.setXYAt(shapePath.v[initPos][0],shapePath.v[initPos][1],'i',initPos);shapePath.setXYAt(shapePath.v[shapePath._length-1][0],shapePath.v[shapePath._length-1][1],'o',shapePath._length-1);}if(addedLength>shapeSegment.e){break;}if(i=this.p.keyframes[this.p.keyframes.length-1].t){v1=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/frameRate,0);v2=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-0.05)/frameRate,0);}else{v1=this.p.pv;v2=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-0.01)/frameRate,this.p.offsetTime);}}else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){v1=[];v2=[];var px=this.px;var py=this.py;if(px._caching.lastFrame+px.offsetTime<=px.keyframes[0].t){v1[0]=px.getValueAtTime((px.keyframes[0].t+0.01)/frameRate,0);v1[1]=py.getValueAtTime((py.keyframes[0].t+0.01)/frameRate,0);v2[0]=px.getValueAtTime(px.keyframes[0].t/frameRate,0);v2[1]=py.getValueAtTime(py.keyframes[0].t/frameRate,0);}else if(px._caching.lastFrame+px.offsetTime>=px.keyframes[px.keyframes.length-1].t){v1[0]=px.getValueAtTime(px.keyframes[px.keyframes.length-1].t/frameRate,0);v1[1]=py.getValueAtTime(py.keyframes[py.keyframes.length-1].t/frameRate,0);v2[0]=px.getValueAtTime((px.keyframes[px.keyframes.length-1].t-0.01)/frameRate,0);v2[1]=py.getValueAtTime((py.keyframes[py.keyframes.length-1].t-0.01)/frameRate,0);}else{v1=[px.pv,py.pv];v2[0]=px.getValueAtTime((px._caching.lastFrame+px.offsetTime-0.01)/frameRate,px.offsetTime);v2[1]=py.getValueAtTime((py._caching.lastFrame+py.offsetTime-0.01)/frameRate,py.offsetTime);}}else{v2=defaultVector;v1=v2;}this.v.rotate(-Math.atan2(v1[1]-v2[1],v1[0]-v2[0]));}if(this.data.p&&this.data.p.s){if(this.data.p.z){this.v.translate(this.px.v,this.py.v,-this.pz.v);}else{this.v.translate(this.px.v,this.py.v,0);}}else{this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2]);}}this.frameId=this.elem.globalData.frameId;}function precalculateMatrix(){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;}}if(this.r){if(!this.r.effectsSequence.length){this.pre.rotate(-this.r.v);this.appliedTransformations=4;}}else if(!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 autoOrient(){// // var prevP = this.getValueAtTime(); }function addDynamicProperty(prop){this._addDynamicProperty(prop);this.elem.addDynamicProperty(prop);this._isDirty=true;}function TransformProperty(elem,data,container){this.elem=elem;this.frameId=-1;this.propType='transform';this.data=data;this.v=new Matrix();// Precalculated matrix with non animated properties this.pre=new Matrix();this.appliedTransformations=0;this.initDynamicPropertyContainer(container||elem);if(data.p&&data.p.s){this.px=PropertyFactory.getProp(elem,data.p.x,0,0,this);this.py=PropertyFactory.getProp(elem,data.p.y,0,0,this);if(data.p.z){this.pz=PropertyFactory.getProp(elem,data.p.z,0,0,this);}}else{this.p=PropertyFactory.getProp(elem,data.p||{k:[0,0,0]},1,0,this);}if(data.rx){this.rx=PropertyFactory.getProp(elem,data.rx,0,degToRads,this);this.ry=PropertyFactory.getProp(elem,data.ry,0,degToRads,this);this.rz=PropertyFactory.getProp(elem,data.rz,0,degToRads,this);if(data.or.k[0].ti){var i;var len=data.or.k.length;for(i=0;i0){pos-=1;// this._elements.unshift(arr.splice(pos,1)[0]); this._elements.unshift(arr[pos]);}if(this.dynamicProperties.length){this.k=true;}else{this.getValue(true);}};RepeaterModifier.prototype.resetElements=function(elements){var i;var len=elements.length;for(i=0;i0?Math.floor(offset):Math.ceil(offset);var pProps=this.pMatrix.props;var rProps=this.rMatrix.props;var sProps=this.sMatrix.props;this.pMatrix.reset();this.rMatrix.reset();this.sMatrix.reset();this.tMatrix.reset();this.matrix.reset();var iteration=0;if(offset>0){while(iterationroundOffset){this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,true);iteration-=1;}if(offsetModulo){this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-offsetModulo,true);iteration-=offsetModulo;}}i=this.data.m===1?0:this._currentCopies-1;dir=this.data.m===1?1:-1;cont=this._currentCopies;var j;var jLen;while(cont){items=this.elemsData[i].it;itemsTransform=items[items.length-1].transform.mProps.v.props;jLen=itemsTransform.length;items[items.length-1].transform.mProps._mdf=true;items[items.length-1].transform.op._mdf=true;items[items.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1));if(iteration!==0){if(i!==0&&dir===1||i!==this._currentCopies-1&&dir===-1){this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,false);}this.matrix.transform(rProps[0],rProps[1],rProps[2],rProps[3],rProps[4],rProps[5],rProps[6],rProps[7],rProps[8],rProps[9],rProps[10],rProps[11],rProps[12],rProps[13],rProps[14],rProps[15]);this.matrix.transform(sProps[0],sProps[1],sProps[2],sProps[3],sProps[4],sProps[5],sProps[6],sProps[7],sProps[8],sProps[9],sProps[10],sProps[11],sProps[12],sProps[13],sProps[14],sProps[15]);this.matrix.transform(pProps[0],pProps[1],pProps[2],pProps[3],pProps[4],pProps[5],pProps[6],pProps[7],pProps[8],pProps[9],pProps[10],pProps[11],pProps[12],pProps[13],pProps[14],pProps[15]);for(j=0;j0){shouldLoadFont=false;}if(shouldLoadFont){var s=createTag('style');s.setAttribute('f-forigin',fontArr[i].fOrigin);s.setAttribute('f-origin',fontArr[i].origin);s.setAttribute('f-family',fontArr[i].fFamily);s.type='text/css';s.innerText='@font-face {font-family: '+fontArr[i].fFamily+"; font-style: normal; src: url('"+fontArr[i].fPath+"');}";defs.appendChild(s);}}else if(fontArr[i].fOrigin==='g'||fontArr[i].origin===1){loadedSelector=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');for(j=0;j