import{t as __esmMin}from"./rolldown-runtime.CMAw1HyY.mjs";import{B as window,L as global,M as te,N as ue,O as pe,R as init_ssg_sandbox_shims,l as p,s as init_jsx_runtime,w as init_npm_react_18_2,z as navigator}from"./react.D3LpXLeJ.mjs";import{C as motion,s as MotionValue,w as motionValue}from"./motion.DmxynPzX.mjs";import{A as animate2,S as RenderTarget,Y as init_framer_4SOIBOB7,a as ControlType,k as addPropertyControls}from"./framer.B9eBDazG.mjs";import{l as init_useConstant,m as defaultEvents,u as useConstant}from"./OIjZRBmWDcIE2B6qgG1j.C7ytnr-7.mjs";import{t as init_default_utils_js__0_45}from"./default-utils.js@_0.45.BxBfodVv.mjs";var isMotionValue,init_isMotionValue=__esmMin((()=>{init_framer_4SOIBOB7(),isMotionValue=v=>v instanceof MotionValue}));function useAutoMotionValue(inputValue,options){let optionsRef=pe(options),animation=pe(),didInitialMount=pe(!1),isOnCanvas=RenderTarget.current()===RenderTarget.canvas,onChangeDeps=options?.onChangeDeps?options.onChangeDeps:[],onChange=te(options?.onChange,[...onChangeDeps]),transformer=te(value=>{var ref;return optionsRef.current?.transform?optionsRef.current.transform(value):value},[]),value1=useConstant(()=>isMotionValue(inputValue)?inputValue:motionValue(transformer(inputValue)));return ue(()=>{if(!isMotionValue(inputValue)&&didInitialMount.current){var ref,ref1;let newValue=transformer(inputValue);if((ref=animation.current)==null||ref.stop(),onChange&&onChange(newValue,value1),optionsRef.current?.animate&&!isOnCanvas){var ref2;animation.current=animate2(value1,newValue,optionsRef.current?.transition)}else value1.set(newValue)}didInitialMount.current=!0},[inputValue,...onChangeDeps]),value1}var init_useAutoMotionValue=__esmMin((()=>{init_npm_react_18_2(),init_framer_4SOIBOB7(),init_isMotionValue(),init_useConstant()})),init_useAutoMotionValue_js_0_3=__esmMin((()=>{init_useAutoMotionValue()})),_global,exports,exports$1,npm_lottie_web_5_7_default,init_npm_lottie_web_5_7=__esmMin((()=>{init_ssg_sandbox_shims(),_global=typeof globalThis<`u`?globalThis:typeof self<`u`?self:global,exports={},navigator!==void 0&&function(root,factory){exports?exports=factory(root):(root.lottie=factory(root),root.bodymovin=root.lottie)}(window||{},function(window$1){var svgNS=`http://www.w3.org/2000/svg`,locationHref=``,initialDefaultFrame=-999999,subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bmRnd,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var propertyNames=`abs.acos.acosh.asin.asinh.atan.atanh.atan2.ceil.cbrt.expm1.clz32.cos.cosh.exp.floor.fround.hypot.imul.log.log1p.log2.log10.max.min.pow.random.round.sign.sin.sinh.sqrt.tan.tanh.trunc.E.LN10.LN2.LOG10E.LOG2E.PI.SQRT1_2.SQRT2`.split(`.`),i,len=propertyNames.length;for(i=0;i1?hsv[1]=1:hsv[1]<=0&&(hsv[1]=0),HSVtoRGB(hsv[0],hsv[1],hsv[2])}function addBrightnessToRGB(color,offset){var hsv=RGBtoHSV(color[0]*255,color[1]*255,color[2]*255);return hsv[2]+=offset,hsv[2]>1?hsv[2]=1:hsv[2]<0&&(hsv[2]=0),HSVtoRGB(hsv[0],hsv[1],hsv[2])}function addHueToRGB(color,offset){var hsv=RGBtoHSV(color[0]*255,color[1]*255,color[2]*255);return hsv[0]+=offset/360,hsv[0]>1?--hsv[0]:hsv[0]<0&&(hsv[0]+=1),HSVtoRGB(hsv[0],hsv[1],hsv[2])}var rgbToHex=function(){var colorMap=[],i,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){return r<0&&(r=0),g<0&&(g=0),b<0&&(b=0),`#`+colorMap[r]+colorMap[g]+colorMap[b]}}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(eventName,args){if((this||_global)._cbs[eventName])for(var len=(this||_global)._cbs[eventName].length,i=0;i0||val>-1e-6&&val<0?_rnd(val*v)/v:val}function to2dCSS(){var props=(this||_global).props,_a=roundMatrixProperty(props[0]),_b=roundMatrixProperty(props[1]),_c=roundMatrixProperty(props[4]),_d=roundMatrixProperty(props[5]),_e=roundMatrixProperty(props[12]),_f=roundMatrixProperty(props[13]);return`matrix(`+_a+`,`+_b+`,`+_c+`,`+_d+`,`+_e+`,`+_f+`)`}return function(){(this||_global).reset=reset,(this||_global).rotate=rotate,(this||_global).rotateX=rotateX,(this||_global).rotateY=rotateY,(this||_global).rotateZ=rotateZ,(this||_global).skew=skew,(this||_global).skewFromAxis=skewFromAxis,(this||_global).shear=shear,(this||_global).scale=scale,(this||_global).setTransform=setTransform,(this||_global).translate=translate,(this||_global).transform=transform,(this||_global).applyToPoint=applyToPoint,(this||_global).applyToX=applyToX,(this||_global).applyToY=applyToY,(this||_global).applyToZ=applyToZ,(this||_global).applyToPointArray=applyToPointArray,(this||_global).applyToTriplePoints=applyToTriplePoints,(this||_global).applyToPointStringified=applyToPointStringified,(this||_global).toCSS=toCSS,(this||_global).to2dCSS=to2dCSS,(this||_global).clone=clone,(this||_global).cloneFromProps=cloneFromProps,(this||_global).equals=equals,(this||_global).inversePoints=inversePoints,(this||_global).inversePoint=inversePoint,(this||_global).getInverseMatrix=getInverseMatrix,(this||_global)._t=(this||_global).transform,(this||_global).isIdentity=isIdentity,(this||_global)._identity=!0,(this||_global)._identityCalculated=!1,(this||_global).props=createTypedArray(`float32`,16),this.reset()}}();(function(pool,math){var global$1=this||_global,width=256,chunks=6,digits=52,rngname=`random`,startdenom=math.pow(width,chunks),significance=math.pow(2,digits),overflow=significance*2,mask=width-1,nodecrypto;function seedrandom(seed,options,callback){var key=[];options=options===!0?{entropy:!0}:options||{};var shortseed=mixkey(flatten(options.entropy?[seed,tostring(pool)]:seed===null?autoseed():seed,3),key),arc4=new ARC4(key),prng=function(){for(var n=arc4.g(chunks),d=startdenom,x=0;n=overflow;)n/=2,d/=2,x>>>=1;return(n+x)/d};return prng.int32=function(){return arc4.g(4)|0},prng.quick=function(){return arc4.g(4)/4294967296},prng.double=prng,mixkey(tostring(arc4.S),pool),(options.pass||callback||function(prng$1,seed$1,is_math_call,state){return state&&(state.S&©(state,arc4),prng$1.state=function(){return copy(arc4,{})}),is_math_call?(math[rngname]=prng$1,seed$1):prng$1})(prng,shortseed,`global`in options?options.global:(this||_global)==math,options.state)}math[`seed`+rngname]=seedrandom;function ARC4(key){var t,keylen=key.length,me=this||_global,i=0,j=me.i=me.j=0,s=me.S=[];for(keylen||(key=[keylen++]);i0?aB=currentT:aA=currentT;while(Math.abs(currentX)>SUBDIVISION_PRECISION&&++i=NEWTON_MIN_SLOPE?newtonRaphsonIterate(aX,guessForT,mX1,mX2):initialSlope===0?guessForT:binarySubdivide(aX,intervalStart,intervalStart+kSampleStepSize,mX1,mX2)}},ob}();(function(){for(var lastTime=0,vendors=[`ms`,`moz`,`webkit`,`o`],x=0;x-.001&&det1<.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)),dist2=math.sqrt(math.pow(x3-x1,2)+math.pow(y3-y1,2)+math.pow(z3-z1,2)),dist3=math.sqrt(math.pow(x3-x2,2)+math.pow(y3-y2,2)+math.pow(z3-z2,2)),diffDist=dist1>dist2?dist1>dist3?dist1-dist2-dist3:dist3-dist2-dist1:dist3>dist2?dist3-dist2-dist1:dist2-dist1-dist3;return diffDist>-1e-4&&diffDist<1e-4}var getBezierLength=function(){return function(pt1,pt2,pt3,pt4){var curveSegments=defaultCurveSegments,k,i,len,ptCoord,perc,addedLength=0,ptDistance,point=[],lastPoint=[],lengthData=bezierLengthPool.newElement();for(len=pt3.length,k=0;klengthPos?-1:1,flag=!0;flag;)if(lengths[initPos]<=lengthPos&&lengths[initPos+1]>lengthPos?(lPerc=(lengthPos-lengths[initPos])/(lengths[initPos+1]-lengths[initPos]),flag=!1):initPos+=dir,initPos<0||initPos>=len-1){if(initPos===len-1)return percents[initPos];flag=!1}return percents[initPos]+(percents[initPos+1]-percents[initPos])*lPerc}function getPointInSegment(pt1,pt2,pt3,pt4,percent,bezierData){var t1=getDistancePerc(percent,bezierData),u1=1-t1;return[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])*1e3)/1e3,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])*1e3)/1e3]}var bezierSegmentPoints=createTypedArray(`float32`,8);function getNewSegment(pt1,pt2,pt3,pt4,startPerc,endPerc,bezierData){startPerc<0?startPerc=0:startPerc>1&&(startPerc=1);var t0=getDistancePerc(startPerc,bezierData);endPerc=endPerc>1?1:endPerc;var t1=getDistancePerc(endPerc,bezierData),i,len=pt1.length,u0=1-t0,u1=1-t1,u0u0u0=u0*u0*u0,t0u0u0_3=t0*u0*u0*3,t0t0u0_3=t0*t0*u0*3,t0t0t0=t0*t0*t0,u0u0u1=u0*u0*u1,t0u0u1_3=t0*u0*u1+u0*t0*u1+u0*u0*t1,t0t0u1_3=t0*t0*u1+u0*t0*t1+t0*u0*t1,t0t0t1=t0*t0*t1,u0u1u1=u0*u1*u1,t0u1u1_3=t0*u1*u1+u0*t1*u1+u0*u1*t1,t0t1u1_3=t0*t1*u1+u0*t1*t1+t0*u1*t1,t0t1t1=t0*t1*t1,u1u1u1=u1*u1*u1,t1u1u1_3=t1*u1*u1+u1*t1*u1+u1*u1*t1,t1t1u1_3=t1*t1*u1+u1*t1*t1+t1*u1*t1,t1t1t1=t1*t1*t1;for(i=0;i=0;--i)if(arr[i].ty===`sh`)if(arr[i].ks.k.i)convertPathsToAbsoluteValues(arr[i].ks.k);else for(jLen=arr[i].ks.k.length,j=0;janimVersion[0]?!0:animVersion[0]>minimum[0]?!1:minimum[1]>animVersion[1]?!0:animVersion[1]>minimum[1]?!1:minimum[2]>animVersion[2]?!0:animVersion[2]>minimum[2]?!1: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,len=layers.length;for(i=0;i=0;--i)if(arr[i].ty===`sh`)if(arr[i].ks.k.i)arr[i].ks.k.c=arr[i].closed;else for(jLen=arr[i].ks.k.length,j=0;j0&&(shouldLoadFont=!1),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){for(loadedSelector=document.querySelectorAll(`link[f-forigin="g"], link[f-origin="1"]`),j=0;j=nextKeyData.t-offsetTime){keyData.h&&(keyData=nextKeyData),iterationIndex=0;break}if(nextKeyData.t-offsetTime>frameNum){iterationIndex=i;break}i=nextKeyTime||frameNum=nextKeyTime?bezierData.points.length-1:0;for(kLen=bezierData.points[ind].point.length,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),quatEnd=createQuaternion(endValue),time=(frameNum-keyTime)/(nextKeyTime-keyTime);quaternionToEuler(newValue,slerp(quatStart,quatEnd,time))}else for(i=0;i=nextKeyTime?perc=1:frameNum1e-6?(omega=Math.acos(cosom),sinom=Math.sin(omega),scale0=Math.sin((1-t)*omega)/sinom,scale1=Math.sin(t*omega)/sinom):(scale0=1-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,out}function quaternionToEuler(out,quat){var qx=quat[0],qy=quat[1],qz=quat[2],qw=quat[3],heading=Math.atan2(2*qy*qw-2*qx*qz,1-2*qy*qy-2*qz*qz),attitude=Math.asin(2*qx*qy+2*qz*qw),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,attitude=values[1]*degToRads,bank=values[2]*degToRads,c1=Math.cos(heading/2),c2=Math.cos(attitude/2),c3=Math.cos(bank/2),s1=Math.sin(heading/2),s2=Math.sin(attitude/2),s3=Math.sin(bank/2),w=c1*c2*c3-s1*s2*s3;return[s1*s2*c3+c1*c2*s3,s1*c2*c3+c1*s2*s3,c1*s2*c3-s1*c2*s3,w]}function getValueAtCurrentTime(){var frameNum=(this||_global).comp.renderedFrame-(this||_global).offsetTime,initTime=(this||_global).keyframes[0].t-(this||_global).offsetTime,endTime=(this||_global).keyframes[(this||_global).keyframes.length-1].t-(this||_global).offsetTime;if(!(frameNum===(this||_global)._caching.lastFrame||(this||_global)._caching.lastFrame!==initFrame&&((this||_global)._caching.lastFrame>=endTime&&frameNum>=endTime||(this||_global)._caching.lastFrame=frameNum&&((this||_global)._caching._lastKeyframeIndex=-1,(this||_global)._caching.lastIndex=0);var renderResult=this.interpolateValue(frameNum,(this||_global)._caching);(this||_global).pv=renderResult}return(this||_global)._caching.lastFrame=frameNum,(this||_global).pv}function setVValue(val){var multipliedValue;if((this||_global).propType===`unidimensional`)multipliedValue=val*(this||_global).mult,mathAbs((this||_global).v-multipliedValue)>1e-5&&((this||_global).v=multipliedValue,(this||_global)._mdf=!0);else for(var i=0,len=(this||_global).v.length;i1e-5&&((this||_global).v[i]=multipliedValue,(this||_global)._mdf=!0),i+=1}function processEffectsSequence(){if(!((this||_global).elem.globalData.frameId===(this||_global).frameId||!(this||_global).effectsSequence.length)){if((this||_global).lock){this.setVValue((this||_global).pv);return}(this||_global).lock=!0,(this||_global)._mdf=(this||_global)._isFirstFrame;var i,len=(this||_global).effectsSequence.length,finalValue=(this||_global).kf?(this||_global).pv:(this||_global).data.k;for(i=0;i=(this||_global).p.keyframes[(this||_global).p.keyframes.length-1].t?(v1=(this||_global).p.getValueAtTime((this||_global).p.keyframes[(this||_global).p.keyframes.length-1].t/frameRate,0),v2=(this||_global).p.getValueAtTime(((this||_global).p.keyframes[(this||_global).p.keyframes.length-1].t-.05)/frameRate,0)):(v1=(this||_global).p.pv,v2=(this||_global).p.getValueAtTime(((this||_global).p._caching.lastFrame+(this||_global).p.offsetTime-.01)/frameRate,(this||_global).p.offsetTime));else if((this||_global).px&&(this||_global).px.keyframes&&(this||_global).py.keyframes&&(this||_global).px.getValueAtTime&&(this||_global).py.getValueAtTime){v1=[],v2=[];var px=(this||_global).px,py=(this||_global).py;px._caching.lastFrame+px.offsetTime<=px.keyframes[0].t?(v1[0]=px.getValueAtTime((px.keyframes[0].t+.01)/frameRate,0),v1[1]=py.getValueAtTime((py.keyframes[0].t+.01)/frameRate,0),v2[0]=px.getValueAtTime(px.keyframes[0].t/frameRate,0),v2[1]=py.getValueAtTime(py.keyframes[0].t/frameRate,0)):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-.01)/frameRate,0),v2[1]=py.getValueAtTime((py.keyframes[py.keyframes.length-1].t-.01)/frameRate,0)):(v1=[px.pv,py.pv],v2[0]=px.getValueAtTime((px._caching.lastFrame+px.offsetTime-.01)/frameRate,px.offsetTime),v2[1]=py.getValueAtTime((py._caching.lastFrame+py.offsetTime-.01)/frameRate,py.offsetTime))}else v2=defaultVector,v1=v2;(this||_global).v.rotate(-Math.atan2(v1[1]-v2[1],v1[0]-v2[0]))}(this||_global).data.p&&(this||_global).data.p.s?(this||_global).data.p.z?(this||_global).v.translate((this||_global).px.v,(this||_global).py.v,-(this||_global).pz.v):(this||_global).v.translate((this||_global).px.v,(this||_global).py.v,0):(this||_global).v.translate((this||_global).p.v[0],(this||_global).p.v[1],-(this||_global).p.v[2])}(this||_global).frameId=(this||_global).elem.globalData.frameId}}function precalculateMatrix(){if(!(this||_global).a.k)(this||_global).pre.translate(-(this||_global).a.v[0],-(this||_global).a.v[1],(this||_global).a.v[2]),(this||_global).appliedTransformations=1;else return;if(!(this||_global).s.effectsSequence.length)(this||_global).pre.scale((this||_global).s.v[0],(this||_global).s.v[1],(this||_global).s.v[2]),(this||_global).appliedTransformations=2;else return;if((this||_global).sk)if(!(this||_global).sk.effectsSequence.length&&!(this||_global).sa.effectsSequence.length)(this||_global).pre.skewFromAxis(-(this||_global).sk.v,(this||_global).sa.v),(this||_global).appliedTransformations=3;else return;(this||_global).r?(this||_global).r.effectsSequence.length||((this||_global).pre.rotate(-(this||_global).r.v),(this||_global).appliedTransformations=4):!(this||_global).rz.effectsSequence.length&&!(this||_global).ry.effectsSequence.length&&!(this||_global).rx.effectsSequence.length&&!(this||_global).or.effectsSequence.length&&((this||_global).pre.rotateZ(-(this||_global).rz.v).rotateY((this||_global).ry.v).rotateX((this||_global).rx.v).rotateZ(-(this||_global).or.v[2]).rotateY((this||_global).or.v[1]).rotateX((this||_global).or.v[0]),(this||_global).appliedTransformations=4)}function autoOrient(){}function addDynamicProperty(prop){this._addDynamicProperty(prop),(this||_global).elem.addDynamicProperty(prop),(this||_global)._isDirty=!0}function TransformProperty(elem,data,container){if((this||_global).elem=elem,(this||_global).frameId=-1,(this||_global).propType=`transform`,(this||_global).data=data,(this||_global).v=new Matrix,(this||_global).pre=new Matrix,(this||_global).appliedTransformations=0,this.initDynamicPropertyContainer(container||elem),data.p&&data.p.s?((this||_global).px=PropertyFactory.getProp(elem,data.p.x,0,0,this||_global),(this||_global).py=PropertyFactory.getProp(elem,data.p.y,0,0,this||_global),data.p.z&&((this||_global).pz=PropertyFactory.getProp(elem,data.p.z,0,0,this||_global))):(this||_global).p=PropertyFactory.getProp(elem,data.p||{k:[0,0,0]},1,0,this||_global),data.rx){if((this||_global).rx=PropertyFactory.getProp(elem,data.rx,0,degToRads,this||_global),(this||_global).ry=PropertyFactory.getProp(elem,data.ry,0,degToRads,this||_global),(this||_global).rz=PropertyFactory.getProp(elem,data.rz,0,degToRads,this||_global),data.or.k[0].ti){var i,len=data.or.k.length;for(i=0;i=(this||_global)._maxLength&&this.doubleArrayLength(),type){case`v`:arr=(this||_global).v;break;case`i`:arr=(this||_global).i;break;case`o`:arr=(this||_global).o;break;default:arr=[];break}(!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||_global).c,(this||_global)._length);var vertices=(this||_global).v,outPoints=(this||_global).o,inPoints=(this||_global).i,init=0;(this||_global).c&&(newPath.setTripleAt(vertices[0][0],vertices[0][1],inPoints[0][0],inPoints[0][1],outPoints[0][0],outPoints[0][1],0,!1),init=1);var cnt=(this||_global)._length-1,len=(this||_global)._length,i;for(i=init;i=kf[kf.length-1].t-(this||_global).offsetTime)keyPropS=kf[kf.length-1].s?kf[kf.length-1].s[0]:kf[kf.length-2].e[0],isHold=!0;else{for(var i=iterationIndex,len=kf.length-1,flag=!0,keyData,nextKeyData;flag&&(keyData=kf[i],nextKeyData=kf[i+1],!(nextKeyData.t-(this||_global).offsetTime>frameNum));)i=nextKeyData.t-(this||_global).offsetTime)perc=1;else if(frameNumendTime&&frameNum>endTime)||((this||_global)._caching.lastIndex=lastFrame=1?segments.push({s:s-1,e:e-1}):(segments.push({s,e:1}),segments.push({s:0,e:e-1}));var shapeSegments=[],i,len=segments.length,segmentOb;for(i=0;iaddedLength+shapeLength)){var shapeS=segmentOb.s*totalModifierLength<=addedLength?0:(segmentOb.s*totalModifierLength-addedLength)/shapeLength,shapeE=segmentOb.e*totalModifierLength>=addedLength+shapeLength?1:(segmentOb.e*totalModifierLength-addedLength)/shapeLength;shapeSegments.push([shapeS,shapeE])}return shapeSegments.length||shapeSegments.push([0,0]),shapeSegments},TrimModifier.prototype.releasePathsData=function(pathsData){var i,len=pathsData.length;for(i=0;i1?1+o:(this||_global).s.v<0?0+o:(this||_global).s.v+o,e=(this||_global).e.v>1?1+o:(this||_global).e.v<0?0+o:(this||_global).e.v+o,s>e){var _s=s;s=e,e=_s}s=Math.round(s*1e4)*1e-4,e=Math.round(e*1e4)*1e-4,(this||_global).sValue=s,(this||_global).eValue=e}else s=(this||_global).sValue,e=(this||_global).eValue;var shapePaths,i,len=(this||_global).shapes.length,j,jLen,pathsData,pathData,totalShapeLength,totalModifierLength=0;if(e===s)for(i=0;i=0;--i)if(shapeData=(this||_global).shapes[i],shapeData.shape._mdf){for(localShapeCollection=shapeData.localShapeCollection,localShapeCollection.releaseShapes(),(this||_global).m===2&&len>1?(edges=this.calculateShapeEdges(s,e,shapeData.totalShapeLength,addedLength,totalModifierLength),addedLength+=shapeData.totalShapeLength):edges=[[shapeS,shapeE]],jLen=edges.length,j=0;j=1?segments.push({s:shapeData.totalShapeLength*(shapeS-1),e:shapeData.totalShapeLength*(shapeE-1)}):(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)if(shapeData.shape.paths.shapes[shapeData.shape.paths._length-1].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}}},TrimModifier.prototype.addPaths=function(newPaths,localShapeCollection){var i,len=newPaths.length;for(i=0;ishapeSegment.e){shapePath.c=!1;break}else 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=!1):(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),newShape=!1,shapePath.c=!1),addedLength+=currentLengthData.addedLength,segmentCount+=1;if(shapePaths[i].c&&lengths.length){if(currentLengthData=lengths[j-1],addedLength<=shapeSegment.e){var segmentLength=lengths[j-1].addedLength;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=!1):(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),newShape=!1,shapePath.c=!1)}else shapePath.c=!1;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)),addedLength>shapeSegment.e)break;i0;)--pos,(this||_global)._elements.unshift(arr[pos]);(this||_global).dynamicProperties.length?(this||_global).k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(elements){var i,len=elements.length;for(i=0;i0?Math.floor(offset):Math.ceil(offset),pProps=(this||_global).pMatrix.props,rProps=(this||_global).rMatrix.props,sProps=(this||_global).sMatrix.props;(this||_global).pMatrix.reset(),(this||_global).rMatrix.reset(),(this||_global).sMatrix.reset(),(this||_global).tMatrix.reset(),(this||_global).matrix.reset();var iteration=0;if(offset>0){for(;iterationroundOffset;)this.applyTransforms((this||_global).pMatrix,(this||_global).rMatrix,(this||_global).sMatrix,(this||_global).tr,1,!0),--iteration;offsetModulo&&(this.applyTransforms((this||_global).pMatrix,(this||_global).rMatrix,(this||_global).sMatrix,(this||_global).tr,-offsetModulo,!0),iteration-=offsetModulo)}i=(this||_global).data.m===1?0:(this||_global)._currentCopies-1,dir=(this||_global).data.m===1?1:-1,cont=(this||_global)._currentCopies;for(var j,jLen;cont;){if(items=(this||_global).elemsData[i].it,itemsTransform=items[items.length-1].transform.mProps.v.props,jLen=itemsTransform.length,items[items.length-1].transform.mProps._mdf=!0,items[items.length-1].transform.op._mdf=!0,items[items.length-1].transform.op.v=(this||_global)._currentCopies===1?(this||_global).so.v:(this||_global).so.v+((this||_global).eo.v-(this||_global).so.v)*(i/((this||_global)._currentCopies-1)),iteration!==0){for((i!==0&&dir===1||i!==(this||_global)._currentCopies-1&&dir===-1)&&this.applyTransforms((this||_global).pMatrix,(this||_global).rMatrix,(this||_global).sMatrix,(this||_global).tr,1,!1),(this||_global).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||_global).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||_global).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]),j=0;j.01)return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if((this||_global).o.length/2!=(this||_global).c.length/4)return!1;if((this||_global).data.k.k[0].s)for(var i=0,len=(this||_global).data.k.k.length;i500)&&(this._imageLoaded(),clearInterval(intervalId)),_count+=1}.bind(this||_global),50)}function createImageData(assetData){var path=getAssetsPath(assetData,(this||_global).assetsPath,(this||_global).path),img=createNS(`image`);isSafari?this.testImageLoaded(img):img.addEventListener(`load`,(this||_global)._imageLoaded,!1),img.addEventListener(`error`,function(){ob.img=proxyImage,this._imageLoaded()}.bind(this||_global),!1),img.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,path),(this||_global)._elementHelper.append?(this||_global)._elementHelper.append(img):(this||_global)._elementHelper.appendChild(img);var ob={img,assetData};return ob}function createImgData(assetData){var path=getAssetsPath(assetData,(this||_global).assetsPath,(this||_global).path),img=createTag(`img`);img.crossOrigin=`anonymous`,img.addEventListener(`load`,(this||_global)._imageLoaded,!1),img.addEventListener(`error`,function(){ob.img=proxyImage,this._imageLoaded()}.bind(this||_global),!1),img.src=path;var ob={img,assetData};return ob}function createFootageData(data){var ob={assetData:data},path=getAssetsPath(data,(this||_global).assetsPath,(this||_global).path);return assetLoader.load(path,function(footageData){ob.img=footageData,this._footageLoaded()}.bind(this||_global),function(){ob.img={},this._footageLoaded()}.bind(this||_global)),ob}function loadAssets(assets,cb){(this||_global).imagesLoadedCb=cb;var i,len=assets.length;for(i=0;i=currentLength+animatorOffset||!points?(perc=(currentLength+animatorOffset-segmentLength)/currentPoint.partialLength,xPathPos=prevPoint.point[0]+(currentPoint.point[0]-prevPoint.point[0])*perc,yPathPos=prevPoint.point[1]+(currentPoint.point[1]-prevPoint.point[1])*perc,matrixHelper.translate(-alignment[0]*letters[i].an*.005,-(alignment[1]*yOff)*.01),flag=!1):points&&(segmentLength+=currentPoint.partialLength,pointInd+=1,pointInd>=points.length&&(pointInd=0,segmentInd+=1,segments[segmentInd]?points=segments[segmentInd].points:mask.v.c?(pointInd=0,segmentInd=0,points=segments[segmentInd].points):(segmentLength-=currentPoint.partialLength,points=null)),points&&(prevPoint=currentPoint,currentPoint=points[pointInd],partialLength=currentPoint.partialLength));offf=letters[i].an/2-letters[i].add,matrixHelper.translate(-offf,0,0)}else offf=letters[i].an/2-letters[i].add,matrixHelper.translate(-offf,0,0),matrixHelper.translate(-alignment[0]*letters[i].an*.005,-alignment[1]*yOff*.01,0);for(j=0;j1,(this||_global).kf&&this.addEffect((this||_global).getKeyframeValue.bind(this||_global)),(this||_global).kf},TextProperty.prototype.addEffect=function(effectFunction){(this||_global).effectsSequence.push(effectFunction),(this||_global).elem.addDynamicProperty(this||_global)},TextProperty.prototype.getValue=function(_finalValue){if(!(((this||_global).elem.globalData.frameId===(this||_global).frameId||!(this||_global).effectsSequence.length)&&!_finalValue)){(this||_global).currentData.t=(this||_global).data.d.k[(this||_global).keysIndex].s.t;var currentValue=(this||_global).currentData,currentIndex=(this||_global).keysIndex;if((this||_global).lock){this.setCurrentData((this||_global).currentData);return}(this||_global).lock=!0,(this||_global)._mdf=!1;var i,len=(this||_global).effectsSequence.length,finalValue=_finalValue||(this||_global).data.d.k[(this||_global).keysIndex].s;for(i=0;iframeNum);)i+=1;return(this||_global).keysIndex!==i&&((this||_global).keysIndex=i),(this||_global).data.d.k[(this||_global).keysIndex].s},TextProperty.prototype.buildFinalText=function(text){for(var combinedCharacters=FontManager.getCombinedCharacterCodes(),charactersArray=[],i=0,len=text.length,charCode;i=55296&&charCode<=56319?(charCode=text.charCodeAt(i+1),charCode>=56320&&charCode<=57343?(charactersArray.push(text.substr(i,2)),i+=1):charactersArray.push(text.charAt(i))):charactersArray.push(text.charAt(i)):charactersArray[charactersArray.length-1]+=text.charAt(i),i+=1;return charactersArray},TextProperty.prototype.completeTextData=function(documentData){documentData.__complete=!0;var fontManager=(this||_global).elem.globalData.fontManager,data=(this||_global).data,letters=[],i,len,newLineFlag,index=0,val,anchorGrouping=data.m.g,currentSize=0,currentPos=0,currentLine=0,lineWidths=[],lineWidth=0,maxLineWidth=0,j,jLen,fontData=fontManager.getFontByName(documentData.f),charData,cLength=0,fontProps=getFontProperties(fontData);documentData.fWeight=fontProps.weight,documentData.fStyle=fontProps.style,documentData.finalSize=documentData.s,documentData.finalText=this.buildFinalText(documentData.t),len=documentData.finalText.length,documentData.finalLineHeight=documentData.lh;var trackingOffset=documentData.tr/1e3*documentData.finalSize,charCode;if(documentData.sz)for(var flag=!0,boxWidth=documentData.sz[0],boxHeight=documentData.sz[1],currentHeight,finalText;flag;){finalText=this.buildFinalText(documentData.t),currentHeight=0,lineWidth=0,len=finalText.length,trackingOffset=documentData.tr/1e3*documentData.finalSize;var lastSpaceIndex=-1;for(i=0;iboxWidth&&finalText[i]!==` `?(lastSpaceIndex===-1?len+=1:i=lastSpaceIndex,currentHeight+=documentData.finalLineHeight||documentData.finalSize*1.2,finalText.splice(i,lastSpaceIndex===i?1:0,`\r`),lastSpaceIndex=-1,lineWidth=0):(lineWidth+=cLength,lineWidth+=trackingOffset);currentHeight+=fontData.ascent*documentData.finalSize/100,(this||_global).canResize&&documentData.finalSize>(this||_global).minimumFontSize&&boxHeightmaxLineWidth?lineWidth:maxLineWidth,lineWidth=-2*trackingOffset,val=``,newLineFlag=!0,currentLine+=1):val=currentChar,fontManager.chars?(charData=fontManager.getCharData(currentChar,fontData.fStyle,fontManager.getFontByName(documentData.f).fFamily),cLength=newLineFlag?0:charData.w*documentData.finalSize/100):cLength=fontManager.measureText(val,documentData.f,documentData.finalSize),currentChar===` `?uncollapsedSpaces+=cLength+trackingOffset:(lineWidth+=cLength+trackingOffset+uncollapsedSpaces,uncollapsedSpaces=0),letters.push({l:cLength,an:cLength,add:currentSize,n:newLineFlag,anIndexes:[],val,line:currentLine,animatorJustifyOffset:0}),anchorGrouping==2){if(currentSize+=cLength,val===``||val===` `||i===len-1){for((val===``||val===` `)&&(currentSize-=cLength);currentPos<=i;)letters[currentPos].an=currentSize,letters[currentPos].ind=index,letters[currentPos].extra=cLength,currentPos+=1;index+=1,currentSize=0}}else if(anchorGrouping==3){if(currentSize+=cLength,val===``||i===len-1){for(val===``&&(currentSize-=cLength);currentPos<=i;)letters[currentPos].an=currentSize,letters[currentPos].ind=index,letters[currentPos].extra=cLength,currentPos+=1;currentSize=0,index+=1}}else letters[index].ind=index,letters[index].extra=0,index+=1;if(documentData.l=letters,maxLineWidth=lineWidth>maxLineWidth?lineWidth:maxLineWidth,lineWidths.push(lineWidth),documentData.sz)documentData.boxWidth=documentData.sz[0],documentData.justifyOffset=0;else switch(documentData.boxWidth=maxLineWidth,documentData.j){case 1:documentData.justifyOffset=-documentData.boxWidth;break;case 2:documentData.justifyOffset=-documentData.boxWidth/2;break;default:documentData.justifyOffset=0}documentData.lineWidths=lineWidths;var animators=data.a,animatorData,letterData;jLen=animators.length;var based,ind,indexes=[];for(j=0;j0?x1=(this||_global).ne.v/100:y1=-(this||_global).ne.v/100,(this||_global).xe.v>0?x2=1-(this||_global).xe.v/100:y2=1+(this||_global).xe.v/100;var easer=BezierFactory.getBezierEasing(x1,y1,x2,y2).get,mult=0,s=(this||_global).finalS,e=(this||_global).finalE,type=(this||_global).data.sh;if(type===2)mult=e===s?ind>=e?1:0:max(0,min(.5/(e-s)+(ind-s)/(e-s),1)),mult=easer(mult);else if(type===3)mult=e===s?ind>=e?0:1:1-max(0,min(.5/(e-s)+(ind-s)/(e-s),1)),mult=easer(mult);else if(type===4)e===s?mult=0:(mult=max(0,min(.5/(e-s)+(ind-s)/(e-s),1)),mult<.5?mult*=2:mult=1-2*(mult-.5)),mult=easer(mult);else if(type===5){if(e===s)mult=0;else{var tot=e-s;ind=min(max(0,ind+.5-s),e-s);var x=-tot/2+ind,a=tot/2;mult=Math.sqrt(1-x*x/(a*a))}mult=easer(mult)}else type===6?(e===s?mult=0:(ind=min(max(0,ind+.5-s),e-s),mult=(1+Math.cos(Math.PI+Math.PI*2*ind/(e-s)))/2),mult=easer(mult)):(ind>=floor(s)&&(mult=ind-s<0?max(0,min(min(e,1)-(s-ind),1)):max(0,min(e-ind,1))),mult=easer(mult));return mult*(this||_global).a.v},getValue:function(newCharsFlag){this.iterateDynamicProperties(),(this||_global)._mdf=newCharsFlag||(this||_global)._mdf,(this||_global)._currentTextLength=(this||_global).elem.textProperty.currentData.l.length||0,newCharsFlag&&(this||_global).data.r===2&&((this||_global).e.v=(this||_global)._currentTextLength);var divisor=(this||_global).data.r===2?1:100/(this||_global).data.totalChars,o=(this||_global).o.v/divisor,s=(this||_global).s.v/divisor+o,e=(this||_global).e.v/divisor+o;if(s>e){var _s=s;s=e,e=_s}(this||_global).finalS=s,(this||_global).finalE=e}},extendPrototype([DynamicPropertyContainer],TextSelectorPropFactory);function getTextSelectorProp(elem,data,arr){return new TextSelectorPropFactory(elem,data,arr)}return{getTextSelectorProp}}(),poolFactory=function(){return function(initialLength,_create,_release){var _length=0,_maxLength=initialLength,pool=createSizedArray(_maxLength),ob={newElement,release};function newElement(){var element;return _length?(--_length,element=pool[_length]):element=_create(),element}function release(element){_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),_release&&_release(element),pool[_length]=element,_length+=1}return ob}}(),pooling=function(){function double(arr){return arr.concat(createSizedArray(arr.length))}return{double}}(),pointPool=function(){function create(){return createTypedArray(`float32`,2)}return poolFactory(8,create)}(),shapePool=function(){function create(){return new ShapePath}function release(shapePath){var len=shapePath._length,i;for(i=0;i=0;--i)(this||_global).elements[i]||(data=(this||_global).layers[i],data.ip-data.st<=num-(this||_global).layers[i].st&&data.op-data.st>num-(this||_global).layers[i].st&&this.buildItem(i)),(this||_global).completeLayers=(this||_global).elements[i]?(this||_global).completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(layer){switch(layer.ty){case 2:return this.createImage(layer);case 0:return this.createComp(layer);case 1:return this.createSolid(layer);case 3:return this.createNull(layer);case 4:return this.createShape(layer);case 5:return this.createText(layer);case 6:return this.createAudio(layer);case 13:return this.createCamera(layer);case 15:return this.createFootage(layer);default:return this.createNull(layer)}},BaseRenderer.prototype.createCamera=function(){throw Error(`You're using a 3d camera. Try the html renderer.`)},BaseRenderer.prototype.createAudio=function(data){return new AudioElement(data,(this||_global).globalData,this||_global)},BaseRenderer.prototype.createFootage=function(data){return new FootageElement(data,(this||_global).globalData,this||_global)},BaseRenderer.prototype.buildAllItems=function(){var i,len=(this||_global).layers.length;for(i=0;i=0;--i)((this||_global).completeLayers||(this||_global).elements[i])&&(this||_global).elements[i].prepareFrame(num-(this||_global).layers[i].st);if((this||_global).globalData._mdf)for(i=0;ielementRel&&fillType===`meet`||animationRelelementRel&&fillType===`slice`)?(this||_global).transformCanvas.tx=(elementWidth-(this||_global).transformCanvas.w*(elementHeight/(this||_global).transformCanvas.h))/2*(this||_global).renderConfig.dpr:xPos===`xMax`&&(animationRelelementRel&&fillType===`slice`)?(this||_global).transformCanvas.tx=(elementWidth-(this||_global).transformCanvas.w*(elementHeight/(this||_global).transformCanvas.h))*(this||_global).renderConfig.dpr:(this||_global).transformCanvas.tx=0,yPos===`YMid`&&(animationRel>elementRel&&fillType===`meet`||animationRelelementRel&&fillType===`meet`||animationRel=0;--i)(this||_global).elements[i]&&(this||_global).elements[i].destroy();(this||_global).elements.length=0,(this||_global).globalData.canvasContext=null,(this||_global).animationItem.container=null,(this||_global).destroyed=!0},CanvasRenderer.prototype.renderFrame=function(num,forceRender){if(!((this||_global).renderedFrame===num&&(this||_global).renderConfig.clearCanvas===!0&&!forceRender||(this||_global).destroyed||num===-1)){(this||_global).renderedFrame=num,(this||_global).globalData.frameNum=num-(this||_global).animationItem._isFirstFrame,(this||_global).globalData.frameId+=1,(this||_global).globalData._mdf=!(this||_global).renderConfig.clearCanvas||forceRender,(this||_global).globalData.projectInterface.currentFrame=num;var i,len=(this||_global).layers.length;for((this||_global).completeLayers||this.checkLayers(num),i=0;i=0;--i)((this||_global).completeLayers||(this||_global).elements[i])&&(this||_global).elements[i].renderFrame();(this||_global).renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRenderer.prototype.buildItem=function(pos){var elements=(this||_global).elements;if(!(elements[pos]||(this||_global).layers[pos].ty===99)){var element=this.createItem((this||_global).layers[pos],this||_global,(this||_global).globalData);elements[pos]=element,element.initExpressions()}},CanvasRenderer.prototype.checkPendingElements=function(){for(;(this||_global).pendingElements.length;)(this||_global).pendingElements.pop().checkParenting()},CanvasRenderer.prototype.hide=function(){(this||_global).animationItem.container.style.display=`none`},CanvasRenderer.prototype.show=function(){(this||_global).animationItem.container.style.display=`block`};function HybridRenderer(animationItem,config){(this||_global).animationItem=animationItem,(this||_global).layers=null,(this||_global).renderedFrame=-1,(this||_global).renderConfig={className:config&&config.className||``,imagePreserveAspectRatio:config&&config.imagePreserveAspectRatio||`xMidYMid slice`,hideOnTransparent:!(config&&config.hideOnTransparent===!1),filterSize:{width:config&&config.filterSize&&config.filterSize.width||`400%`,height:config&&config.filterSize&&config.filterSize.height||`400%`,x:config&&config.filterSize&&config.filterSize.x||`-100%`,y:config&&config.filterSize&&config.filterSize.y||`-100%`}},(this||_global).globalData={_mdf:!1,frameNum:-1,renderConfig:(this||_global).renderConfig},(this||_global).pendingElements=[],(this||_global).elements=[],(this||_global).threeDElements=[],(this||_global).destroyed=!1,(this||_global).camera=null,(this||_global).supports3d=!0,(this||_global).rendererType=`html`}extendPrototype([BaseRenderer],HybridRenderer),HybridRenderer.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRenderer.prototype.checkPendingElements=function(){for(;(this||_global).pendingElements.length;)(this||_global).pendingElements.pop().checkParenting()},HybridRenderer.prototype.appendElementInPos=function(element,pos){var newDOMElement=element.getBaseElement();if(newDOMElement){var layer=(this||_global).layers[pos];if(!layer.ddd||!(this||_global).supports3d)if((this||_global).threeDElements)this.addTo3dContainer(newDOMElement,pos);else{for(var i=0,nextDOMElement,nextLayer,tmpDOMElement;i=pos)return(this||_global).threeDElements[i].perspectiveElem;i+=1}return null},HybridRenderer.prototype.createThreeDContainer=function(pos,type){var perspectiveElem=createTag(`div`),style,containerStyle;styleDiv(perspectiveElem);var container=createTag(`div`);if(styleDiv(container),type===`3d`){style=perspectiveElem.style,style.width=(this||_global).globalData.compSize.w+`px`,style.height=(this||_global).globalData.compSize.h+`px`;var center=`50% 50%`;style.webkitTransformOrigin=center,style.mozTransformOrigin=center,style.transformOrigin=center,containerStyle=container.style;var matrix=`matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)`;containerStyle.transform=matrix,containerStyle.webkitTransform=matrix}perspectiveElem.appendChild(container);var threeDContainerData={container,perspectiveElem,startPos:pos,endPos:pos,type};return(this||_global).threeDElements.push(threeDContainerData),threeDContainerData},HybridRenderer.prototype.build3dContainers=function(){var i,len=(this||_global).layers.length,lastThreeDContainerData,currentContainer=``;for(i=0;i=0;--i)(this||_global).resizerElem.appendChild((this||_global).threeDElements[i].perspectiveElem)},HybridRenderer.prototype.addTo3dContainer=function(elem,pos){for(var i=0,len=(this||_global).threeDElements.length;ielementRel?(sx=elementWidth/(this||_global).globalData.compSize.w,sy=elementWidth/(this||_global).globalData.compSize.w,tx=0,ty=(elementHeight-(this||_global).globalData.compSize.h*(elementWidth/(this||_global).globalData.compSize.w))/2):(sx=elementHeight/(this||_global).globalData.compSize.h,sy=elementHeight/(this||_global).globalData.compSize.h,tx=(elementWidth-(this||_global).globalData.compSize.w*(elementHeight/(this||_global).globalData.compSize.h))/2,ty=0);var style=(this||_global).resizerElem.style;style.webkitTransform=`matrix3d(`+sx+`,0,0,0,0,`+sy+`,0,0,0,0,1,0,`+tx+`,`+ty+`,0,1)`,style.transform=style.webkitTransform},HybridRenderer.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRenderer.prototype.hide=function(){(this||_global).resizerElem.style.display=`none`},HybridRenderer.prototype.show=function(){(this||_global).resizerElem.style.display=`block`},HybridRenderer.prototype.initItems=function(){if(this.buildAllItems(),(this||_global).camera)(this||_global).camera.setup();else{var cWidth=(this||_global).globalData.compSize.w,cHeight=(this||_global).globalData.compSize.h,i,len=(this||_global).threeDElements.length;for(i=0;i0&&((this||_global).maskElement.setAttribute(`id`,layerId),(this||_global).element.maskedElement.setAttribute(maskRef,`url(`+locationHref+`#`+layerId+`)`),defs.appendChild((this||_global).maskElement)),(this||_global).viewData.length&&(this||_global).element.addRenderableComponent(this||_global)}MaskElement.prototype.getMaskProperty=function(pos){return(this||_global).viewData[pos].prop},MaskElement.prototype.renderFrame=function(isFirstFrame){var finalMat=(this||_global).element.finalTransform.mat,i,len=(this||_global).masksProperties.length;for(i=0;i1&&(pathString+=` C`+pathNodes.o[i-1][0]+`,`+pathNodes.o[i-1][1]+` `+pathNodes.i[0][0]+`,`+pathNodes.i[0][1]+` `+pathNodes.v[0][0]+`,`+pathNodes.v[0][1]),viewData.lastPath!==pathString){var pathShapeValue=``;viewData.elem&&(pathNodes.c&&(pathShapeValue=pathData.inv?(this||_global).solidPath+pathString:pathString),viewData.elem.setAttribute(`d`,pathShapeValue)),viewData.lastPath=pathString}},MaskElement.prototype.destroy=function(){(this||_global).element=null,(this||_global).globalData=null,(this||_global).maskElement=null,(this||_global).data=null,(this||_global).masksProperties=null};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){(this||_global).hierarchy=[],(this||_global)._isParent=!1,this.checkParenting()},setHierarchy:function(hierarchy){(this||_global).hierarchy=hierarchy},setAsParent:function(){(this||_global)._isParent=!0},checkParenting:function(){(this||_global).data.parent!==void 0&&(this||_global).comp.buildElementParenting(this||_global,(this||_global).data.parent,[])}};function FrameElement(){}FrameElement.prototype={initFrame:function(){(this||_global)._isFirstFrame=!1,(this||_global).dynamicProperties=[],(this||_global)._mdf=!1},prepareProperties:function(num,isVisible){var i,len=(this||_global).dynamicProperties.length;for(i=0;inum?(this||_global).isInRange!==!0&&((this||_global).globalData._mdf=!0,(this||_global)._mdf=!0,(this||_global).isInRange=!0,this.show()):(this||_global).isInRange!==!1&&((this||_global).globalData._mdf=!0,(this||_global).isInRange=!1,this.hide())},renderRenderable:function(){var i,len=(this||_global).renderableComponents.length;for(i=0;i0;)redraw=itemData.transformers[k].mProps._mdf||redraw,--iterations,--k;if(redraw)for(iterations=lvl-itemData.styles[l].lvl,k=itemData.transformers.length-1;iterations>0;)props=itemData.transformers[k].mProps.v.props,mat.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]),--iterations,--k}else mat=_identityMatrix;if(paths=itemData.sh.paths,jLen=paths._length,redraw){for(pathStringTransformed=``,j=0;j=1?percent=.99:percent<=-1&&(percent=-.99);var dist=rad*percent,x=Math.cos(ang+itemData.a.v)*dist+pt1[0],y=Math.sin(ang+itemData.a.v)*dist+pt1[1];gfill.setAttribute(`fx`,x),gfill.setAttribute(`fy`,y),hasOpacity&&!itemData.g._collapsable&&(itemData.of.setAttribute(`fx`,x),itemData.of.setAttribute(`fy`,y))}}}function renderStroke(styleData,itemData,isFirstFrame){var styleElem=itemData.style,d=itemData.d;d&&(d._mdf||isFirstFrame)&&d.dashStr&&(styleElem.pElem.setAttribute(`stroke-dasharray`,d.dashStr),styleElem.pElem.setAttribute(`stroke-dashoffset`,d.dashoffset[0])),itemData.c&&(itemData.c._mdf||isFirstFrame)&&styleElem.pElem.setAttribute(`stroke`,`rgb(`+bmFloor(itemData.c.v[0])+`,`+bmFloor(itemData.c.v[1])+`,`+bmFloor(itemData.c.v[2])+`)`),(itemData.o._mdf||isFirstFrame)&&styleElem.pElem.setAttribute(`stroke-opacity`,itemData.o.v),(itemData.w._mdf||isFirstFrame)&&(styleElem.pElem.setAttribute(`stroke-width`,itemData.w.v),styleElem.msElem&&styleElem.msElem.setAttribute(`stroke-width`,itemData.w.v))}return ob}();function ShapeTransformManager(){(this||_global).sequences={},(this||_global).sequenceList=[],(this||_global).transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(transforms){var i,len=transforms.length,key=`_`;for(i=0;i=0;--i)props=sequence.transforms[i].transform.mProps.v.props,sequence.finalTransform.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15])}sequence._mdf=_mdf},processSequences:function(isFirstFrame){var i,len=(this||_global).sequenceList.length;for(i=0;i=0&&(shouldBreakProcess=(this||_global).shapeModifiers[i].processShapes((this||_global)._isFirstFrame),!shouldBreakProcess);--i);}},lcEnum:{1:`butt`,2:`round`,3:`square`},ljEnum:{1:`miter`,2:`round`,3:`bevel`},searchProcessedElement:function(elem){for(var elements=(this||_global).processedElements,i=0,len=elements.length;i=0;--i)((this||_global).completeLayers||(this||_global).elements[i])&&((this||_global).elements[i].prepareFrame((this||_global).renderedFrame-(this||_global).layers[i].st),(this||_global).elements[i]._mdf&&((this||_global)._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var i,len=(this||_global).layers.length;for(i=0;i.1)&&(this||_global).audio.seek((this||_global)._currentTime/(this||_global).globalData.frameRate):((this||_global).audio.play(),(this||_global).audio.seek((this||_global)._currentTime/(this||_global).globalData.frameRate),(this||_global)._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){(this||_global).audio.pause(),(this||_global)._isPlaying=!1},AudioElement.prototype.pause=function(){(this||_global).audio.pause(),(this||_global)._isPlaying=!1,(this||_global)._canPlay=!1},AudioElement.prototype.resume=function(){(this||_global)._canPlay=!0},AudioElement.prototype.setRate=function(rateValue){(this||_global).audio.rate(rateValue)},AudioElement.prototype.volume=function(volumeValue){(this||_global).audio.volume(volumeValue)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function FootageElement(data,globalData,comp){this.initFrame(),this.initRenderable(),(this||_global).assetData=globalData.getAssetData(data.refId),(this||_global).footageData=globalData.imageLoader.getAsset((this||_global).assetData),this.initBaseData(data,globalData,comp)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){(this||_global).layerInterface=FootageInterface(this||_global)},FootageElement.prototype.getFootageData=function(){return(this||_global).footageData};function SVGCompElement(data,globalData,comp){(this||_global).layers=data.layers,(this||_global).supports3d=!0,(this||_global).completeLayers=!1,(this||_global).pendingElements=[],(this||_global).elements=(this||_global).layers?createSizedArray((this||_global).layers.length):[],this.initElement(data,globalData,comp),(this||_global).tm=data.tm?PropertyFactory.getProp(this||_global,data.tm,0,globalData.frameRate,this||_global):{_placeholder:!0}}extendPrototype([SVGRenderer,ICompElement,SVGBaseElement],SVGCompElement);function SVGTextLottieElement(data,globalData,comp){(this||_global).textSpans=[],(this||_global).renderType=`svg`,this.initElement(data,globalData,comp)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){(this||_global).data.singleShape&&!(this||_global).globalData.fontManager.chars&&((this||_global).textContainer=createNS(`text`))},SVGTextLottieElement.prototype.buildTextContents=function(textArray){for(var i=0,len=textArray.length,textContents=[],currentTextContent=``;ii?(this||_global).textSpans[i]:createNS(usesGlyphs?`path`:`text`),cachedSpansLength<=i&&(tSpan.setAttribute(`stroke-linecap`,`butt`),tSpan.setAttribute(`stroke-linejoin`,`round`),tSpan.setAttribute(`stroke-miterlimit`,`4`),(this||_global).textSpans[i]=tSpan,(this||_global).layerElement.appendChild(tSpan)),tSpan.style.display=`inherit`),matrixHelper.reset(),matrixHelper.scale(documentData.finalSize/100,documentData.finalSize/100),singleShape&&(letters[i].n&&(xPos=-trackingOffset,yPos+=documentData.yOffset,yPos+=firstLine?1:0,firstLine=!1),this.applyTextPropertiesToMatrix(documentData,matrixHelper,letters[i].line,xPos,yPos),xPos+=letters[i].l||0,xPos+=trackingOffset),usesGlyphs?(charData=(this||_global).globalData.fontManager.getCharData(documentData.finalText[i],fontData.fStyle,(this||_global).globalData.fontManager.getFontByName(documentData.f).fFamily),shapeData=charData&&charData.data||{},shapes=shapeData.shapes?shapeData.shapes[0].it:[],singleShape?shapeStr+=this.createPathShape(matrixHelper,shapes):tSpan.setAttribute(`d`,this.createPathShape(matrixHelper,shapes))):(singleShape&&tSpan.setAttribute(`transform`,`translate(`+matrixHelper.props[12]+`,`+matrixHelper.props[13]+`)`),tSpan.textContent=letters[i].val,tSpan.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`));singleShape&&tSpan&&tSpan.setAttribute(`d`,shapeStr)}for(;i<(this||_global).textSpans.length;)(this||_global).textSpans[i].style.display=`none`,i+=1;(this||_global)._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame((this||_global).comp.renderedFrame-(this||_global).data.st),this.renderInnerContent(),(this||_global)._sizeChanged){(this||_global)._sizeChanged=!1;var textBox=(this||_global).layerElement.getBBox();(this||_global).bbox={top:textBox.y,left:textBox.x,width:textBox.width,height:textBox.height}}return(this||_global).bbox},SVGTextLottieElement.prototype.renderInnerContent=function(){if(!(this||_global).data.singleShape&&((this||_global).textAnimator.getMeasures((this||_global).textProperty.currentData,(this||_global).lettersChangedFlag),(this||_global).lettersChangedFlag||(this||_global).textAnimator.lettersChangedFlag)){(this||_global)._sizeChanged=!0;var i,len,renderedLetters=(this||_global).textAnimator.renderedLetters,letters=(this||_global).textProperty.currentData.l;len=letters.length;var renderedLetter,textSpan;for(i=0;i1&&areAnimated&&this.setShapesAsAnimated(tempShapes)}},SVGShapeElement.prototype.setShapesAsAnimated=function(shapes){var i,len=shapes.length;for(i=0;i=0;--i){if(processedPos=this.searchProcessedElement(arr[i]),processedPos?itemsData[i]=prevViewData[processedPos-1]:arr[i]._render=render,arr[i].ty===`fl`||arr[i].ty===`st`||arr[i].ty===`gf`||arr[i].ty===`gs`)processedPos?itemsData[i].style.closed=!1:itemsData[i]=this.createStyleElement(arr[i],level),arr[i]._render&&container.appendChild(itemsData[i].style.pElem),ownStyles.push(itemsData[i].style);else if(arr[i].ty===`gr`){if(!processedPos)itemsData[i]=this.createGroupElement(arr[i]);else for(jLen=itemsData[i].it.length,j=0;j=max?inputDelta<0?outputBlack:outputWhite:outputBlack+outputDelta*((perc-inputBlack)/inputDelta)**(1/gamma),table[pos]=colorValue,pos+=1,cnt+=256/(segments-1);return table.join(` `)},SVGProLevelsFilter.prototype.renderFrame=function(forceRender){if(forceRender||(this||_global).filterManager._mdf){var val,effectElements=(this||_global).filterManager.effectElements;(this||_global).feFuncRComposed&&(forceRender||effectElements[3].p._mdf||effectElements[4].p._mdf||effectElements[5].p._mdf||effectElements[6].p._mdf||effectElements[7].p._mdf)&&(val=this.getTableValue(effectElements[3].p.v,effectElements[4].p.v,effectElements[5].p.v,effectElements[6].p.v,effectElements[7].p.v),(this||_global).feFuncRComposed.setAttribute(`tableValues`,val),(this||_global).feFuncGComposed.setAttribute(`tableValues`,val),(this||_global).feFuncBComposed.setAttribute(`tableValues`,val)),(this||_global).feFuncR&&(forceRender||effectElements[10].p._mdf||effectElements[11].p._mdf||effectElements[12].p._mdf||effectElements[13].p._mdf||effectElements[14].p._mdf)&&(val=this.getTableValue(effectElements[10].p.v,effectElements[11].p.v,effectElements[12].p.v,effectElements[13].p.v,effectElements[14].p.v),(this||_global).feFuncR.setAttribute(`tableValues`,val)),(this||_global).feFuncG&&(forceRender||effectElements[17].p._mdf||effectElements[18].p._mdf||effectElements[19].p._mdf||effectElements[20].p._mdf||effectElements[21].p._mdf)&&(val=this.getTableValue(effectElements[17].p.v,effectElements[18].p.v,effectElements[19].p.v,effectElements[20].p.v,effectElements[21].p.v),(this||_global).feFuncG.setAttribute(`tableValues`,val)),(this||_global).feFuncB&&(forceRender||effectElements[24].p._mdf||effectElements[25].p._mdf||effectElements[26].p._mdf||effectElements[27].p._mdf||effectElements[28].p._mdf)&&(val=this.getTableValue(effectElements[24].p.v,effectElements[25].p.v,effectElements[26].p.v,effectElements[27].p.v,effectElements[28].p.v),(this||_global).feFuncB.setAttribute(`tableValues`,val)),(this||_global).feFuncA&&(forceRender||effectElements[31].p._mdf||effectElements[32].p._mdf||effectElements[33].p._mdf||effectElements[34].p._mdf||effectElements[35].p._mdf)&&(val=this.getTableValue(effectElements[31].p.v,effectElements[32].p.v,effectElements[33].p.v,effectElements[34].p.v,effectElements[35].p.v),(this||_global).feFuncA.setAttribute(`tableValues`,val))}};function SVGDropShadowEffect(filter,filterManager){var filterSize=filterManager.container.globalData.renderConfig.filterSize;filter.setAttribute(`x`,filterSize.x),filter.setAttribute(`y`,filterSize.y),filter.setAttribute(`width`,filterSize.width),filter.setAttribute(`height`,filterSize.height),(this||_global).filterManager=filterManager;var feGaussianBlur=createNS(`feGaussianBlur`);feGaussianBlur.setAttribute(`in`,`SourceAlpha`),feGaussianBlur.setAttribute(`result`,`drop_shadow_1`),feGaussianBlur.setAttribute(`stdDeviation`,`0`),(this||_global).feGaussianBlur=feGaussianBlur,filter.appendChild(feGaussianBlur);var feOffset=createNS(`feOffset`);feOffset.setAttribute(`dx`,`25`),feOffset.setAttribute(`dy`,`0`),feOffset.setAttribute(`in`,`drop_shadow_1`),feOffset.setAttribute(`result`,`drop_shadow_2`),(this||_global).feOffset=feOffset,filter.appendChild(feOffset);var feFlood=createNS(`feFlood`);feFlood.setAttribute(`flood-color`,`#00ff00`),feFlood.setAttribute(`flood-opacity`,`1`),feFlood.setAttribute(`result`,`drop_shadow_3`),(this||_global).feFlood=feFlood,filter.appendChild(feFlood);var feComposite=createNS(`feComposite`);feComposite.setAttribute(`in`,`drop_shadow_3`),feComposite.setAttribute(`in2`,`drop_shadow_2`),feComposite.setAttribute(`operator`,`in`),feComposite.setAttribute(`result`,`drop_shadow_4`),filter.appendChild(feComposite);var feMerge=createNS(`feMerge`);filter.appendChild(feMerge);var feMergeNode=createNS(`feMergeNode`);feMerge.appendChild(feMergeNode),feMergeNode=createNS(`feMergeNode`),feMergeNode.setAttribute(`in`,`SourceGraphic`),(this||_global).feMergeNode=feMergeNode,(this||_global).feMerge=feMerge,(this||_global).originalNodeAdded=!1,feMerge.appendChild(feMergeNode)}SVGDropShadowEffect.prototype.renderFrame=function(forceRender){if(forceRender||(this||_global).filterManager._mdf){if((forceRender||(this||_global).filterManager.effectElements[4].p._mdf)&&(this||_global).feGaussianBlur.setAttribute(`stdDeviation`,(this||_global).filterManager.effectElements[4].p.v/4),forceRender||(this||_global).filterManager.effectElements[0].p._mdf){var col=(this||_global).filterManager.effectElements[0].p.v;(this||_global).feFlood.setAttribute(`flood-color`,rgbToHex(Math.round(col[0]*255),Math.round(col[1]*255),Math.round(col[2]*255)))}if((forceRender||(this||_global).filterManager.effectElements[1].p._mdf)&&(this||_global).feFlood.setAttribute(`flood-opacity`,(this||_global).filterManager.effectElements[1].p.v/255),forceRender||(this||_global).filterManager.effectElements[2].p._mdf||(this||_global).filterManager.effectElements[3].p._mdf){var distance=(this||_global).filterManager.effectElements[3].p.v,angle=((this||_global).filterManager.effectElements[2].p.v-90)*degToRads,x=distance*Math.cos(angle),y=distance*Math.sin(angle);(this||_global).feOffset.setAttribute(`dx`,x),(this||_global).feOffset.setAttribute(`dy`,y)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(filterElem,filterManager,elem){(this||_global).initialized=!1,(this||_global).filterManager=filterManager,(this||_global).filterElem=filterElem,(this||_global).elem=elem,elem.matteElement=createNS(`g`),elem.matteElement.appendChild(elem.layerElement),elem.matteElement.appendChild(elem.transformedElement),elem.baseElement=elem.matteElement}SVGMatte3Effect.prototype.findSymbol=function(mask){for(var i=0,len=_svgMatteSymbols.length;icanvasRel&&par===`xMidYMid slice`||imgRel=0;--i)((this||_global).completeLayers||(this||_global).elements[i])&&(this||_global).elements[i].renderFrame()},CVCompElement.prototype.destroy=function(){var i;for(i=(this||_global).layers.length-1;i>=0;--i)(this||_global).elements[i]&&(this||_global).elements[i].destroy();(this||_global).layers=null,(this||_global).elements=null};function CVMaskElement(data,element){(this||_global).data=data,(this||_global).element=element,(this||_global).masksProperties=(this||_global).data.masksProperties||[],(this||_global).viewData=createSizedArray((this||_global).masksProperties.length);var i,len=(this||_global).masksProperties.length,hasMasks=!1;for(i=0;i=0;--i){if(processedPos=this.searchProcessedElement(arr[i]),processedPos?itemsData[i]=prevViewData[processedPos-1]:arr[i]._shouldRender=shouldRender,arr[i].ty===`fl`||arr[i].ty===`st`||arr[i].ty===`gf`||arr[i].ty===`gs`)processedPos?itemsData[i].style.closed=!1:itemsData[i]=this.createStyleElement(arr[i],ownTransforms),ownStyles.push(itemsData[i].style);else if(arr[i].ty===`gr`){if(!processedPos)itemsData[i]=this.createGroupElement(arr[i]);else for(jLen=itemsData[i].it.length,j=0;j=0;--i)items[i].ty===`tr`?(groupTransform=data[i].transform,this.renderShapeTransform(parentTransform,groupTransform)):items[i].ty===`sh`||items[i].ty===`el`||items[i].ty===`rc`||items[i].ty===`sr`?this.renderPath(items[i],data[i]):items[i].ty===`fl`?this.renderFill(items[i],data[i],groupTransform):items[i].ty===`st`?this.renderStroke(items[i],data[i],groupTransform):items[i].ty===`gf`||items[i].ty===`gs`?this.renderGradientFill(items[i],data[i],groupTransform):items[i].ty===`gr`?this.renderShape(groupTransform,items[i].it,data[i].it):items[i].ty;isMain&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(styledShape,shape){if((this||_global)._isFirstFrame||shape._mdf||styledShape.transforms._mdf){var shapeNodes=styledShape.trNodes,paths=shape.paths,i,len,j,jLen=paths._length;shapeNodes.length=0;var groupTransformMat=styledShape.transforms.finalTransform;for(j=0;j=1?percent=.99:percent<=-1&&(percent=-.99);var dist=rad*percent,x=Math.cos(ang+itemData.a.v)*dist+pt1[0],y=Math.sin(ang+itemData.a.v)*dist+pt1[1];grd=ctx.createRadialGradient(x,y,0,pt1[0],pt1[1],rad)}var i,len=styleData.g.p,cValues=itemData.g.c,opacity=1;for(i=0;i0&&t<1&&bounds[i].push(this.calculateF(t,p0,p1,p2,p3,i))):(b2ac=b*b-4*c*a,b2ac>=0&&(t1=(-b+bmSqrt(b2ac))/(2*a),t1>0&&t1<1&&bounds[i].push(this.calculateF(t1,p0,p1,p2,p3,i)),t2=(-b-bmSqrt(b2ac))/(2*a),t2>0&&t2<1&&bounds[i].push(this.calculateF(t2,p0,p1,p2,p3,i)))));(this||_global).shapeBoundingBox.left=bmMin.apply(null,bounds[0]),(this||_global).shapeBoundingBox.top=bmMin.apply(null,bounds[1]),(this||_global).shapeBoundingBox.right=bmMax.apply(null,bounds[0]),(this||_global).shapeBoundingBox.bottom=bmMax.apply(null,bounds[1])},HShapeElement.prototype.calculateF=function(t,p0,p1,p2,p3,i){return bmPow(1-t,3)*p0[i]+3*bmPow(1-t,2)*t*p1[i]+3*(1-t)*bmPow(t,2)*p2[i]+bmPow(t,3)*p3[i]},HShapeElement.prototype.calculateBoundingBox=function(itemsData,boundingBox){var i,len=itemsData.length;for(i=0;i=box.x+box.width&&(this||_global).currentBBox.height+(this||_global).currentBBox.y>=box.y+box.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!(this||_global).hidden&&((this||_global)._isFirstFrame||(this||_global)._mdf)){var tempBoundingBox=(this||_global).tempBoundingBox,max=999999;if(tempBoundingBox.x=max,tempBoundingBox.xMax=-max,tempBoundingBox.y=max,tempBoundingBox.yMax=-max,this.calculateBoundingBox((this||_global).itemsData,tempBoundingBox),tempBoundingBox.width=tempBoundingBox.xMax=0;--i){var mTransf=(this||_global).hierarchy[i].finalTransform.mProp;(this||_global).mat.translate(-mTransf.p.v[0],-mTransf.p.v[1],mTransf.p.v[2]),(this||_global).mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]),(this||_global).mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v),(this||_global).mat.scale(1/mTransf.s.v[0],1/mTransf.s.v[1],1/mTransf.s.v[2]),(this||_global).mat.translate(mTransf.a.v[0],mTransf.a.v[1],mTransf.a.v[2])}if((this||_global).p?(this||_global).mat.translate(-(this||_global).p.v[0],-(this||_global).p.v[1],(this||_global).p.v[2]):(this||_global).mat.translate(-(this||_global).px.v,-(this||_global).py.v,(this||_global).pz.v),(this||_global).a){var diffVector=(this||_global).p?[(this||_global).p.v[0]-(this||_global).a.v[0],(this||_global).p.v[1]-(this||_global).a.v[1],(this||_global).p.v[2]-(this||_global).a.v[2]]:[(this||_global).px.v-(this||_global).a.v[0],(this||_global).py.v-(this||_global).a.v[1],(this||_global).pz.v-(this||_global).a.v[2]],mag=Math.sqrt(diffVector[0]**2+diffVector[1]**2+diffVector[2]**2),lookDir=[diffVector[0]/mag,diffVector[1]/mag,diffVector[2]/mag],lookLengthOnXZ=Math.sqrt(lookDir[2]*lookDir[2]+lookDir[0]*lookDir[0]),mRotationX=Math.atan2(lookDir[1],lookLengthOnXZ),mRotationY=Math.atan2(lookDir[0],-lookDir[2]);(this||_global).mat.rotateY(mRotationY).rotateX(-mRotationX)}(this||_global).mat.rotateX(-(this||_global).rx.v).rotateY(-(this||_global).ry.v).rotateZ((this||_global).rz.v),(this||_global).mat.rotateX(-(this||_global).or.v[0]).rotateY(-(this||_global).or.v[1]).rotateZ((this||_global).or.v[2]),(this||_global).mat.translate((this||_global).globalData.compSize.w/2,(this||_global).globalData.compSize.h/2,0),(this||_global).mat.translate(0,0,(this||_global).pe.v);var hasMatrixChanged=!(this||_global)._prevMat.equals((this||_global).mat);if((hasMatrixChanged||(this||_global).pe._mdf)&&(this||_global).comp.threeDElements){len=(this||_global).comp.threeDElements.length;var comp,perspectiveStyle,containerStyle;for(i=0;i=0;--i)registeredAnimations[i].animation.destroy(animation)}function searchAnimations$1(animationData$1,standalone$1,renderer$1){var animElements=[].concat([].slice.call(document.getElementsByClassName(`lottie`)),[].slice.call(document.getElementsByClassName(`bodymovin`))),i,lenAnims=animElements.length;for(i=0;i(this||_global).animationData.op&&((this||_global).animationData.op=data.op,(this||_global).totalFrames=Math.floor(data.op-(this||_global).animationData.ip));var layers=(this||_global).animationData.layers,i,len=layers.length,newLayers=data.layers,j,jLen=newLayers.length;for(j=0;j(this||_global).timeCompleted&&((this||_global).currentFrame=(this||_global).timeCompleted),this.trigger(`enterFrame`),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){if(!((this||_global).isLoaded===!1||!(this||_global).renderer))try{(this||_global).renderer.renderFrame((this||_global).currentFrame+(this||_global).firstFrame)}catch(error){this.triggerRenderFrameError(error)}},AnimationItem.prototype.play=function(name){name&&(this||_global).name!==name||(this||_global).isPaused===!0&&((this||_global).isPaused=!1,(this||_global).audioController.resume(),(this||_global)._idle&&((this||_global)._idle=!1,this.trigger(`_active`)))},AnimationItem.prototype.pause=function(name){name&&(this||_global).name!==name||(this||_global).isPaused===!1&&((this||_global).isPaused=!0,(this||_global)._idle=!0,this.trigger(`_idle`),(this||_global).audioController.pause())},AnimationItem.prototype.togglePause=function(name){name&&(this||_global).name!==name||((this||_global).isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(name){name&&(this||_global).name!==name||(this.pause(),(this||_global).playCount=0,(this||_global)._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(markerName){for(var marker,i=0;i<(this||_global).markers.length;i+=1)if(marker=(this||_global).markers[i],marker.payload&&marker.payload.name===markerName)return marker;return null},AnimationItem.prototype.goToAndStop=function(value,isFrame,name){if(!(name&&(this||_global).name!==name)){var numValue=Number(value);if(isNaN(numValue)){var marker=this.getMarkerData(value);marker&&this.goToAndStop(marker.time,!0)}else isFrame?this.setCurrentRawFrameValue(value):this.setCurrentRawFrameValue(value*(this||_global).frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(value,isFrame,name){if(!(name&&(this||_global).name!==name)){var numValue=Number(value);if(isNaN(numValue)){var marker=this.getMarkerData(value);marker&&(marker.duration?this.playSegments([marker.time,marker.time+marker.duration],!0):this.goToAndStop(marker.time,!0))}else this.goToAndStop(numValue,isFrame,name);this.play()}},AnimationItem.prototype.advanceTime=function(value){if(!((this||_global).isPaused===!0||(this||_global).isLoaded===!1)){var nextValue=(this||_global).currentRawFrame+value*(this||_global).frameModifier,_isComplete=!1;nextValue>=(this||_global).totalFrames-1&&(this||_global).frameModifier>0?!(this||_global).loop||(this||_global).playCount===(this||_global).loop?this.checkSegments(nextValue>(this||_global).totalFrames?nextValue%(this||_global).totalFrames:0)||(_isComplete=!0,nextValue=(this||_global).totalFrames-1):nextValue>=(this||_global).totalFrames?((this||_global).playCount+=1,this.checkSegments(nextValue%(this||_global).totalFrames)||(this.setCurrentRawFrameValue(nextValue%(this||_global).totalFrames),(this||_global)._completedLoop=!0,this.trigger(`loopComplete`))):this.setCurrentRawFrameValue(nextValue):nextValue<0?this.checkSegments(nextValue%(this||_global).totalFrames)||((this||_global).loop&&!((this||_global).playCount--<=0&&(this||_global).loop!==!0)?(this.setCurrentRawFrameValue((this||_global).totalFrames+nextValue%(this||_global).totalFrames),(this||_global)._completedLoop?this.trigger(`loopComplete`):(this||_global)._completedLoop=!0):(_isComplete=!0,nextValue=0)):this.setCurrentRawFrameValue(nextValue),_isComplete&&(this.setCurrentRawFrameValue(nextValue),this.pause(),this.trigger(`complete`))}},AnimationItem.prototype.adjustSegment=function(arr,offset){(this||_global).playCount=0,arr[1]0&&((this||_global).playSpeed<0?this.setSpeed(-(this||_global).playSpeed):this.setDirection(-1)),(this||_global).totalFrames=arr[0]-arr[1],(this||_global).timeCompleted=(this||_global).totalFrames,(this||_global).firstFrame=arr[1],this.setCurrentRawFrameValue((this||_global).totalFrames-.001-offset)):arr[1]>arr[0]&&((this||_global).frameModifier<0&&((this||_global).playSpeed<0?this.setSpeed(-(this||_global).playSpeed):this.setDirection(1)),(this||_global).totalFrames=arr[1]-arr[0],(this||_global).timeCompleted=(this||_global).totalFrames,(this||_global).firstFrame=arr[0],this.setCurrentRawFrameValue(.001+offset)),this.trigger(`segmentStart`)},AnimationItem.prototype.setSegment=function(init,end){var pendingFrame=-1;(this||_global).isPaused&&((this||_global).currentRawFrame+(this||_global).firstFrameend&&(pendingFrame=end-init)),(this||_global).firstFrame=init,(this||_global).totalFrames=end-init,(this||_global).timeCompleted=(this||_global).totalFrames,pendingFrame!==-1&&this.goToAndStop(pendingFrame,!0)},AnimationItem.prototype.playSegments=function(arr,forceFlag){if(forceFlag&&((this||_global).segments.length=0),typeof arr[0]==`object`){var i,len=arr.length;for(i=0;imax){var mm=max;max=min,min=mm}return Math$1.min(Math$1.max(num,min),max)}function radiansToDegrees(val){return val/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(val){return val*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(arr1,arr2){if(typeof arr1==`number`||arr1 instanceof Number)return arr2||=0,Math$1.abs(arr1-arr2);arr2||=helperLengthArray;var i,len=Math$1.min(arr1.length,arr2.length),addedLength=0;for(i=0;i.5?d/(2-max-min):d/(max+min),max){case r:h=(g-b)/d+(g1&&--t,t<1/6?p$1+(q-p$1)*6*t:t<1/2?q:t<2/3?p$1+(q-p$1)*(2/3-t)*6:p$1}function hslToRgb(val){var h=val[0],s=val[1],l=val[2],r,g,b;if(s===0)r=l,b=l,g=l;else{var q=l<.5?l*(1+s):l+s-l*s,p$1=2*l-q;r=hue2rgb(p$1,q,h+1/3),g=hue2rgb(p$1,q,h),b=hue2rgb(p$1,q,h-1/3)}return[r,g,b,val[3]]}function linear(t,tMin,tMax,value1,value2){if((value1===void 0||value2===void 0)&&(value1=tMin,value2=tMax,tMin=0,tMax=1),tMax=tMax)return value2;var perc=tMax===tMin?0:(t-tMin)/(tMax-tMin);if(!value1.length)return value1+(value2-value1)*perc;var i,len=value1.length,arr=createTypedArray(`float32`,len);for(i=0;i1){for(j=0;j1?t=1:t<0&&(t=0);var mult=fn(t);if($bm_isInstanceOfArray(val1)){var iKey,lenKey=val1.length,arr=createTypedArray(`float32`,lenKey);for(iKey=0;iKeydata.k[iKey].t&&time$1data.k[iKey+1].t-time$1?(index$1=iKey+2,keyTime=data.k[iKey+1].t):(index$1=iKey+1,keyTime=data.k[iKey].t);break}index$1===-1&&(index$1=iKey+1,keyTime=data.k[iKey].t)}var obKey={};return obKey.index=index$1,obKey.time=keyTime/elem.comp.globalData.frameRate,obKey}function key(ind){var obKey,iKey,lenKey;if(!data.k.length||typeof data.k[0]==`number`)throw Error(`The property has no keyframe at index `+ind);--ind,obKey={time:data.k[ind].t/elem.comp.globalData.frameRate,value:[]};var arr=Object.prototype.hasOwnProperty.call(data.k[ind],`s`)?data.k[ind].s:data.k[ind-1].e;for(lenKey=arr.length,iKey=0;iKeykeyframes.length-1)&&(duration=keyframes.length-1),firstKeyFrame=keyframes[keyframes.length-1-duration].t,cycleDuration=lastKeyFrame-firstKeyFrame);var i,len,ret;if(type===`pingpong`){if(Math.floor((currentFrame-firstKeyFrame)/cycleDuration)%2!=0)return this.getValueAtTime((cycleDuration-(currentFrame-firstKeyFrame)%cycleDuration+firstKeyFrame)/(this||_global).comp.globalData.frameRate,0)}else if(type===`offset`){var initV=this.getValueAtTime(firstKeyFrame/(this||_global).comp.globalData.frameRate,0),endV=this.getValueAtTime(lastKeyFrame/(this||_global).comp.globalData.frameRate,0),current=this.getValueAtTime(((currentFrame-firstKeyFrame)%cycleDuration+firstKeyFrame)/(this||_global).comp.globalData.frameRate,0),repeats=Math.floor((currentFrame-firstKeyFrame)/cycleDuration);if((this||_global).pv.length){for(ret=Array(initV.length),len=ret.length,i=0;i=firstKeyFrame)return(this||_global).pv;var cycleDuration,lastKeyFrame;durationFlag?(cycleDuration=duration?Math.abs((this||_global).elem.comp.globalData.frameRate*duration):Math.max(0,(this||_global).elem.data.op-firstKeyFrame),lastKeyFrame=firstKeyFrame+cycleDuration):((!duration||duration>keyframes.length-1)&&(duration=keyframes.length-1),lastKeyFrame=keyframes[duration].t,cycleDuration=lastKeyFrame-firstKeyFrame);var i,len,ret;if(type===`pingpong`){if(Math.floor((firstKeyFrame-currentFrame)/cycleDuration)%2==0)return this.getValueAtTime(((firstKeyFrame-currentFrame)%cycleDuration+firstKeyFrame)/(this||_global).comp.globalData.frameRate,0)}else if(type===`offset`){var initV=this.getValueAtTime(firstKeyFrame/(this||_global).comp.globalData.frameRate,0),endV=this.getValueAtTime(lastKeyFrame/(this||_global).comp.globalData.frameRate,0),current=this.getValueAtTime((cycleDuration-(firstKeyFrame-currentFrame)%cycleDuration+firstKeyFrame)/(this||_global).comp.globalData.frameRate,0),repeats=Math.floor((firstKeyFrame-currentFrame)/cycleDuration)+1;if((this||_global).pv.length){for(ret=Array(initV.length),len=ret.length,i=0;i1?(endFrame-initFrame)/(samples-1):1,i=0,j=0,value=(this||_global).pv.length?createTypedArray(`float32`,(this||_global).pv.length):0,sampleValue;ilengthPos){var initIndex=i,endIndex=shapePath.c&&i===len-1?0:i+1,segmentPerc=(lengthPos-accumulatedLength)/lengths[i].addedLength;pt=bez.getPointInSegment(shapePath.v[initIndex],shapePath.v[endIndex],shapePath.o[initIndex],shapePath.i[endIndex],segmentPerc,lengths[i]);break}else accumulatedLength+=lengths[i].addedLength;i+=1}return pt||=shapePath.c?[shapePath.v[0][0],shapePath.v[0][1]]:[shapePath.v[shapePath._length-1][0],shapePath.v[shapePath._length-1][1]],pt},vectorOnPath:function(perc,time,vectorType){perc==1?perc=(this||_global).v.c:perc==0&&(perc=.999);var pt1=this.pointOnPath(perc,time),pt2=this.pointOnPath(perc+.001,time),xLength=pt2[0]-pt1[0],yLength=pt2[1]-pt1[1],magnitude=Math.sqrt(xLength**2+yLength**2);return magnitude===0?[0,0]:vectorType===`tangent`?[xLength/magnitude,yLength/magnitude]:[-yLength/magnitude,xLength/magnitude]},tangentOnPath:function(perc,time){return this.vectorOnPath(perc,time,`tangent`)},normalOnPath:function(perc,time){return this.vectorOnPath(perc,time,`normal`)},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([ShapeExpressions],ShapePropertyConstructorFunction),extendPrototype([ShapeExpressions],KeyframedShapePropertyConstructorFunction),KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime=getShapeValueAtTime,KeyframedShapePropertyConstructorFunction.prototype.initiateExpression=ExpressionManager.initiateExpression;var propertyGetShapeProp=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(elem,data,type,arr,trims){var prop=propertyGetShapeProp(elem,data,type,arr,trims);return prop.propertyIndex=data.ix,prop.lock=!1,type===3?expressionHelpers.searchExpressions(elem,data.pt,prop):type===4&&expressionHelpers.searchExpressions(elem,data.ks,prop),prop.k&&elem.addDynamicProperty(prop),prop}})(),(function(){function searchExpressions(){return(this||_global).data.d.x?((this||_global).calculateExpression=ExpressionManager.initiateExpression.bind(this||_global)((this||_global).elem,(this||_global).data.d,this||_global),this.addEffect((this||_global).getExpressionValue.bind(this||_global)),!0):null}TextProperty.prototype.getExpressionValue=function(currentValue,text){var newValue=this.calculateExpression(text);if(currentValue.t!==newValue){var newData={};return this.copyData(newData,currentValue),newData.t=newValue.toString(),newData.__complete=!1,newData}return currentValue},TextProperty.prototype.searchProperty=function(){var isKeyframed=this.searchKeyframes(),hasExpressions=this.searchExpressions();return(this||_global).kf=isKeyframed||hasExpressions,(this||_global).kf},TextProperty.prototype.searchExpressions=searchExpressions})();var ShapePathInterface=function(){return function(shape,view,propertyGroup){var prop=view.sh;function interfaceFunction(val){return val===`Shape`||val===`shape`||val===`Path`||val===`path`||val===`ADBE Vector Shape`||val===2?interfaceFunction.path:null}var _propertyGroup=propertyGroupFactory(interfaceFunction,propertyGroup);return prop.setGroupProperty(PropertyInterface(`Path`,_propertyGroup)),Object.defineProperties(interfaceFunction,{path:{get:function(){return prop.k&&prop.getValue(),prop}},shape:{get:function(){return prop.k&&prop.getValue(),prop}},_name:{value:shape.nm},ix:{value:shape.ix},propertyIndex:{value:shape.ix},mn:{value:shape.mn},propertyGroup:{value:propertyGroup}}),interfaceFunction}}(),propertyGroupFactory=function(){return function(interfaceFunction,parentPropertyGroup){return function(val){return val=val===void 0?1:val,val<=0?interfaceFunction:parentPropertyGroup(val-1)}}}(),PropertyInterface=function(){return function(propertyName,propertyGroup){var interfaceFunction={_name:propertyName};function _propertyGroup(val){return val=val===void 0?1:val,val<=0?interfaceFunction:propertyGroup(val-1)}return _propertyGroup}}(),ShapeExpressionInterface=function(){function iterateElements(shapes,view,propertyGroup){var arr=[],i,len=shapes?shapes.length:0;for(i=0;i1&&(defaultCurveSegments=value);roundValues(!(defaultCurveSegments>=50))}function inBrowser(){return navigator!==void 0}function installPlugin(type,plugin){type===`expressions`&&(expressionsPlugin=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=setLocationHref,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.__getFactory=getFactory,lottie.version=`5.7.8`;function checkReady(){document.readyState===`complete`&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(variable){for(var vars=queryString.split(`&`),i=0;i{init_npm_lottie_web_5_7()}));function Lottie(props){let{style,srcUrl,srcFile,srcType,poster,progress:progressRaw,playing,loop,posterProgress,pauseOnCanvas,isForwardsDirection,speed,onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,onComplete}=props,isOnCanvas=RenderTarget.current()===RenderTarget.canvas,shouldPlay=(!pauseOnCanvas||!isOnCanvas)&&playing,direction=isForwardsDirection?1:-1,isCustomPoster=poster===`Custom`,el=pe(),didInitialMount=pe(!1),animationInfo=pe({data:null,animation:null,duration:null}),progress=useAutoMotionValue(progressRaw,{transform:v=>v*.01}),play=()=>{var _animationInfo_current_animation,_animationInfo_current;return animationInfo.current?.animation?.play()},pause=()=>{var _animationInfo_current_animation,_animationInfo_current;return animationInfo.current?.animation?.pause()},destroy=()=>{var _animationInfo_current_animation,_animationInfo_current;return animationInfo.current?.animation?.destroy()},scrubTo=te((normalizedProgress,shouldPlayAfter)=>{if(!animationInfo.current.duration||!animationInfo.current.animation)return;let frameNumberTarget=normalizedProgress===1?animationInfo.current.duration-1:normalizedProgress*animationInfo.current.duration;shouldPlayAfter?animationInfo.current.animation.goToAndPlay(frameNumberTarget,!0):animationInfo.current.animation.goToAndStop(frameNumberTarget,!0)},[]),fetchLottieData=te(async url=>url?await fetch(url,{method:`GET`,credentials:`omit`,redirect:`follow`}).then(d=>d.json()):null,[]),init=te(async()=>{destroy();let dataUrl;srcType===`URL`&&(dataUrl=srcUrl),srcType===`Upload`&&(dataUrl=srcFile),dataUrl||=(console.warn(`No valid Lottie animation provided`),placeholderUrl);let data=await fetchLottieData(dataUrl);return animationInfo.current.data=data,setup(didInitialMount.current)},[srcType,srcUrl,srcFile]),setup=te(shouldPlayAfter=>{if(!el.current)return;destroy();let options={container:el.current,renderer:`svg`,loop,autoplay:shouldPlay,animationData:animationInfo.current.data,rendererSettings:{preserveAspectRatio:`xMidYMid slice`}},anim=animationInfo.current.animation=npm_lottie_web_5_7_default.loadAnimation(options);return animationInfo.current.duration=anim.getDuration(!0),anim.setDirection(direction),anim.setSpeed(speed),didInitialMount.current=!0,isOnCanvas&&isCustomPoster?scrubTo(posterProgress,!1):scrubTo(progress.get(),shouldPlay||shouldPlayAfter),()=>{anim.destroy()}},[loop,shouldPlay,speed,direction,isOnCanvas,isCustomPoster,posterProgress]);return ue(()=>{let cleanup;return init().then(c=>cleanup=c),()=>{cleanup&&cleanup()}},[srcType,srcFile,srcUrl]),ue(()=>{if(didInitialMount.current)return setup(!1)},[loop]),ue(()=>npm_lottie_web_5_7_default.setQuality(isOnCanvas?`low`:`medium`),[]),ue(()=>progress.onChange(val=>{isOnCanvas||(shouldPlay?scrubTo(val,!0):scrubTo(val,!1))}),[]),ue(()=>{let val=progress.get();shouldPlay?scrubTo(val,!0):scrubTo(val,!1)},[progressRaw]),ue(()=>{if(!isOnCanvas)return;let normalizedPosterProgress=posterProgress*.01;scrubTo(isCustomPoster?normalizedPosterProgress:progress.get(),!1)},[isCustomPoster,posterProgress]),ue(()=>{var _animationInfo_current;animationInfo.current?.animation&&(animationInfo.current.animation.setSpeed(speed),scrubTo(progress.get(),!0))},[speed]),ue(()=>{var _animationInfo_current;animationInfo.current?.animation&&(animationInfo.current.animation.setDirection(direction),scrubTo(progress.get(),!0))},[direction]),ue(()=>{shouldPlay?play():pause()},[shouldPlay]),p(motion.div,{ref:el,style,onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp})}var SrcType,Poster,placeholderUrl,init_Lottie=__esmMin((()=>{init_jsx_runtime(),init_npm_react_18_2(),init_framer_4SOIBOB7(),init_default_utils_js__0_45(),init_useAutoMotionValue_js_0_3(),init_lottie_web_5_7(),(function(SrcType$1){SrcType$1.File=`Upload`,SrcType$1.Url=`URL`})(SrcType||={}),(function(Poster$1){Poster$1.Auto=`Auto`,Poster$1.Custom=`Custom`})(Poster||={}),placeholderUrl=`https://misc.framerstatic.com/lottie/logo.json`,Lottie.defaultProps={height:200,width:200,srcType:`URL`,pauseOnCanvas:!0,srcUrl:placeholderUrl,progress:0,poster:`Auto`,posterProgress:0},addPropertyControls(Lottie,{srcType:{type:ControlType.Enum,displaySegmentedControl:!0,title:`Source`,options:[`URL`,`Upload`]},srcUrl:{type:ControlType.String,title:`URL`,placeholder:`../example.json`,hidden:props=>props.srcType===`Upload`},srcFile:{type:ControlType.File,title:`File`,allowedFileTypes:[`json`],hidden:props=>props.srcType===`URL`},playing:{type:ControlType.Boolean,title:`Playing`,enabledTitle:`Yes`,disabledTitle:`No`},pauseOnCanvas:{type:ControlType.Boolean,title:`Canvas`,disabledTitle:`Play`,enabledTitle:`Pause`,hidden:props=>props.playing===!1},loop:{type:ControlType.Boolean,title:`Loop`,enabledTitle:`Yes`,disabledTitle:`No`},isForwardsDirection:{title:`Direction`,type:ControlType.Boolean,enabledTitle:`Normal`,disabledTitle:`Reverse`},speed:{type:ControlType.Number,defaultValue:1,min:0,max:10,step:.5,displayStepper:!0,unit:`x`},poster:{title:`Poster`,type:ControlType.Enum,options:[`Auto`,`Custom`],displaySegmentedControl:!0},posterProgress:{title:` `,type:ControlType.Number,max:100,min:0,unit:`%`,hidden:({poster})=>poster===`Auto`},progress:{title:`Progress`,type:ControlType.Number,max:100,min:0,unit:`%`,description:`This component is made for JSON files. [Learn more here](https://lottiefiles.com/what-is-lottie).`},...defaultEvents})}));export{init_Lottie as n,Lottie as t}; //# sourceMappingURL=Lottie.C5tvGmRt.mjs.map