@dotlottie/player-component
Version:
dotLottie animation player web component.
5 lines (4 loc) • 194 kB
JavaScript
import { a } from './chunk-HDDX7F4A.mjs';
import './chunk-ZWH2ESXT.mjs';
var wa=a((Be,ss)=>{typeof navigator<"u"&&function(ve,le){typeof Be=="object"&&typeof ss<"u"?ss.exports=le():typeof define=="function"&&define.amd?define(le):(ve=typeof globalThis<"u"?globalThis:ve||self,ve.lottie=le());}(Be,function(){var ve="http://www.w3.org/2000/svg",le="",ks=!1,is=-999999,vi=function(t){ks=!!t;},bi=function(){return ks},xi=function(t){le=t;},bt=function(){return le};function nt(t){return document.createElement(t)}function W(t,e){var s,i=t.length,a;for(s=0;s<i;s+=1){a=t[s].prototype;for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e.prototype[r]=a[r]);}}function _i(t){function e(){}return e.prototype=t,e}var ki=function(){function t(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1;}return t.prototype={addAudio:function(e){this.audios.push(e);},pause:function(){var e,s=this.audios.length;for(e=0;e<s;e+=1)this.audios[e].pause();},resume:function(){var e,s=this.audios.length;for(e=0;e<s;e+=1)this.audios[e].resume();},setRate:function(e){var s,i=this.audios.length;for(s=0;s<i;s+=1)this.audios[s].setRate(e);},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0;},seek:function(){this.isPlaying=!1;},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e;},setVolume:function(e){this._volume=e,this._updateVolume();},mute:function(){this._isMuted=!0,this._updateVolume();},unmute:function(){this._isMuted=!1,this._updateVolume();},getVolume:function(){return this._volume},_updateVolume:function(){var e,s=this.audios.length;for(e=0;e<s;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1));}},function(){return new t}}(),ht=function(){function t(s,i){var a=0,r=[],n;switch(s){case"int16":case"uint8c":n=1;break;default:n=1.1;break}for(a=0;a<i;a+=1)r.push(n);return r}function e(s,i){return s==="float32"?new Float32Array(i):s==="int16"?new Int16Array(i):s==="uint8c"?new Uint8ClampedArray(i):t(s,i)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?e:t}();function K(t){return Array.apply(null,{length:t})}var Ps=!0,ws=null,Ss="",Pi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),mt=Math.pow,ze=Math.sqrt,ee=Math.floor,Ve=Math.max,be=Math.min,Ds=150,U=Math.PI/180,Ht=.5519;function Wt(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d";}function as(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1;}function Cs(t,e){this.type=t,this.direction=e<0?-1:1;}function Ms(t,e,s,i){this.type=t,this.currentLoop=s,this.totalLoops=e,this.direction=i<0?-1:1;}function Es(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s;}function Ts(t,e){this.type=t,this.target=e;}function wi(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e;}function Si(t){this.type="configError",this.nativeError=t;}var ut=function(){var t=0;return function(){return t+=1,Ss+"__lottie_element_"+t}}();function rs(t,e,s){var i,a,r,n,d,o,c,y;switch(n=Math.floor(t*6),d=t*6-n,o=s*(1-e),c=s*(1-d*e),y=s*(1-(1-d)*e),n%6){case 0:i=s,a=y,r=o;break;case 1:i=c,a=s,r=o;break;case 2:i=o,a=s,r=y;break;case 3:i=o,a=c,r=s;break;case 4:i=y,a=o,r=s;break;case 5:i=s,a=o,r=c;break}return [i,a,r]}function ns(t,e,s){var i=Math.max(t,e,s),a=Math.min(t,e,s),r=i-a,n,d=i===0?0:r/i,o=i/255;switch(i){case a:n=0;break;case t:n=e-s+r*(e<s?6:0),n/=6*r;break;case e:n=s-t+r*2,n/=6*r;break;case s:n=t-e+r*4,n/=6*r;break}return [n,d,o]}function As(t,e){var s=ns(t[0]*255,t[1]*255,t[2]*255);return s[1]+=e,s[1]>1?s[1]=1:s[1]<=0&&(s[1]=0),rs(s[0],s[1],s[2])}function Fs(t,e){var s=ns(t[0]*255,t[1]*255,t[2]*255);return s[2]+=e,s[2]>1?s[2]=1:s[2]<0&&(s[2]=0),rs(s[0],s[1],s[2])}function Is(t,e){var s=ns(t[0]*255,t[1]*255,t[2]*255);return s[0]+=e/360,s[0]>1?s[0]-=1:s[0]<0&&(s[0]+=1),rs(s[0],s[1],s[2])}(function(){var t=[],e,s;for(e=0;e<256;e+=1)s=e.toString(16),t[e]=s.length===1?"0"+s:s;return function(i,a,r){return i<0&&(i=0),a<0&&(a=0),r<0&&(r=0),"#"+t[i]+t[a]+t[r]}})();var Di=function(t){Ps=!!t;},Ci=function(){return Ps},Mi=function(t){ws=t;},Re=function(){return ws},Oe=function(t){Ds=t;},Ne=function(){return Ds},Ei=function(t){Ss=t;};function R(t){return document.createElementNS(ve,t)}function je(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?je=function(e){return typeof e}:je=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},je(t)}var xe=function(){var t=1,e=[],s,i,a={onmessage:function(){},postMessage:function(f){s({data:f});}},r={postMessage:function(f){a.onmessage({data:f});}};function n(f){if(window.Worker&&window.Blob&&bi()){var P=new Blob(["var _workerSelf = self; self.onmessage = ",f.toString()],{type:"text/javascript"}),w=URL.createObjectURL(P);return new Worker(w)}return s=f,a}function d(){i||(i=n(function(f){function P(){function _(A,F){var u,b,h=A.length,v,M,S,H;for(b=0;b<h;b+=1)if(u=A[b],"ks"in u&&!u.completed){if(u.completed=!0,u.hasMask){var z=u.masksProperties;for(M=z.length,v=0;v<M;v+=1)if(z[v].pt.k.i)m(z[v].pt.k);else for(H=z[v].pt.k.length,S=0;S<H;S+=1)z[v].pt.k[S].s&&m(z[v].pt.k[S].s[0]),z[v].pt.k[S].e&&m(z[v].pt.k[S].e[0]);}u.ty===0?(u.layers=l(u.refId,F),_(u.layers,F)):u.ty===4?p(u.shapes):u.ty===5&&B(u);}}function D(A,F){if(A){var u=0,b=A.length;for(u=0;u<b;u+=1)A[u].t===1&&(A[u].data.layers=l(A[u].data.refId,F),_(A[u].data.layers,F));}}function g(A,F){for(var u=0,b=F.length;u<b;){if(F[u].id===A)return F[u];u+=1;}return null}function l(A,F){var u=g(A,F);return u?u.layers.__used?JSON.parse(JSON.stringify(u.layers)):(u.layers.__used=!0,u.layers):null}function p(A){var F,u=A.length,b,h;for(F=u-1;F>=0;F-=1)if(A[F].ty==="sh")if(A[F].ks.k.i)m(A[F].ks.k);else for(h=A[F].ks.k.length,b=0;b<h;b+=1)A[F].ks.k[b].s&&m(A[F].ks.k[b].s[0]),A[F].ks.k[b].e&&m(A[F].ks.k[b].e[0]);else A[F].ty==="gr"&&p(A[F].it);}function m(A){var F,u=A.i.length;for(F=0;F<u;F+=1)A.i[F][0]+=A.v[F][0],A.i[F][1]+=A.v[F][1],A.o[F][0]+=A.v[F][0],A.o[F][1]+=A.v[F][1];}function x(A,F){var u=F?F.split("."):[100,100,100];return A[0]>u[0]?!0:u[0]>A[0]?!1:A[1]>u[1]?!0:u[1]>A[1]?!1:A[2]>u[2]?!0:u[2]>A[2]?!1:null}var C=function(){var A=[4,4,14];function F(b){var h=b.t.d;b.t.d={k:[{s:h,t:0}]};}function u(b){var h,v=b.length;for(h=0;h<v;h+=1)b[h].ty===5&&F(b[h]);}return function(b){if(x(A,b.v)&&(u(b.layers),b.assets)){var h,v=b.assets.length;for(h=0;h<v;h+=1)b.assets[h].layers&&u(b.assets[h].layers);}}}(),E=function(){var A=[4,7,99];return function(F){if(F.chars&&!x(A,F.v)){var u,b=F.chars.length;for(u=0;u<b;u+=1){var h=F.chars[u];h.data&&h.data.shapes&&(p(h.data.shapes),h.data.ip=0,h.data.op=99999,h.data.st=0,h.data.sr=1,h.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},F.chars[u].t||(h.data.shapes.push({ty:"no"}),h.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})));}}}}(),T=function(){var A=[5,7,15];function F(b){var h=b.t.p;typeof h.a=="number"&&(h.a={a:0,k:h.a}),typeof h.p=="number"&&(h.p={a:0,k:h.p}),typeof h.r=="number"&&(h.r={a:0,k:h.r});}function u(b){var h,v=b.length;for(h=0;h<v;h+=1)b[h].ty===5&&F(b[h]);}return function(b){if(x(A,b.v)&&(u(b.layers),b.assets)){var h,v=b.assets.length;for(h=0;h<v;h+=1)b.assets[h].layers&&u(b.assets[h].layers);}}}(),L=function(){var A=[4,1,9];function F(b){var h,v=b.length,M,S;for(h=0;h<v;h+=1)if(b[h].ty==="gr")F(b[h].it);else if(b[h].ty==="fl"||b[h].ty==="st")if(b[h].c.k&&b[h].c.k[0].i)for(S=b[h].c.k.length,M=0;M<S;M+=1)b[h].c.k[M].s&&(b[h].c.k[M].s[0]/=255,b[h].c.k[M].s[1]/=255,b[h].c.k[M].s[2]/=255,b[h].c.k[M].s[3]/=255),b[h].c.k[M].e&&(b[h].c.k[M].e[0]/=255,b[h].c.k[M].e[1]/=255,b[h].c.k[M].e[2]/=255,b[h].c.k[M].e[3]/=255);else b[h].c.k[0]/=255,b[h].c.k[1]/=255,b[h].c.k[2]/=255,b[h].c.k[3]/=255;}function u(b){var h,v=b.length;for(h=0;h<v;h+=1)b[h].ty===4&&F(b[h].shapes);}return function(b){if(x(A,b.v)&&(u(b.layers),b.assets)){var h,v=b.assets.length;for(h=0;h<v;h+=1)b.assets[h].layers&&u(b.assets[h].layers);}}}(),N=function(){var A=[4,4,18];function F(b){var h,v=b.length,M,S;for(h=v-1;h>=0;h-=1)if(b[h].ty==="sh")if(b[h].ks.k.i)b[h].ks.k.c=b[h].closed;else for(S=b[h].ks.k.length,M=0;M<S;M+=1)b[h].ks.k[M].s&&(b[h].ks.k[M].s[0].c=b[h].closed),b[h].ks.k[M].e&&(b[h].ks.k[M].e[0].c=b[h].closed);else b[h].ty==="gr"&&F(b[h].it);}function u(b){var h,v,M=b.length,S,H,z,Z;for(v=0;v<M;v+=1){if(h=b[v],h.hasMask){var X=h.masksProperties;for(H=X.length,S=0;S<H;S+=1)if(X[S].pt.k.i)X[S].pt.k.c=X[S].cl;else for(Z=X[S].pt.k.length,z=0;z<Z;z+=1)X[S].pt.k[z].s&&(X[S].pt.k[z].s[0].c=X[S].cl),X[S].pt.k[z].e&&(X[S].pt.k[z].e[0].c=X[S].cl);}h.ty===4&&F(h.shapes);}}return function(b){if(x(A,b.v)&&(u(b.layers),b.assets)){var h,v=b.assets.length;for(h=0;h<v;h+=1)b.assets[h].layers&&u(b.assets[h].layers);}}}();function O(A){A.__complete||(L(A),C(A),E(A),T(A),N(A),_(A.layers,A.assets),D(A.chars,A.assets),A.__complete=!0);}function B(A){A.t.a.length===0&&"m"in A.t.p;}var j={};return j.completeData=O,j.checkColors=L,j.checkChars=E,j.checkPathProperties=T,j.checkShapes=N,j.completeLayers=_,j}if(r.dataManager||(r.dataManager=P()),r.assetLoader||(r.assetLoader=function(){function _(g){var l=g.getResponseHeader("content-type");return l&&g.responseType==="json"&&l.indexOf("json")!==-1||g.response&&je(g.response)==="object"?g.response:g.response&&typeof g.response=="string"?JSON.parse(g.response):g.responseText?JSON.parse(g.responseText):null}function D(g,l,p,m){var x,C=new XMLHttpRequest;try{C.responseType="json";}catch{}C.onreadystatechange=function(){if(C.readyState===4)if(C.status===200)x=_(C),p(x);else try{x=_(C),p(x);}catch(E){m&&m(E);}};try{C.open(["G","E","T"].join(""),g,!0);}catch{C.open(["G","E","T"].join(""),l+"/"+g,!0);}C.send();}return {load:D}}()),f.data.type==="loadAnimation")r.assetLoader.load(f.data.path,f.data.fullPath,function(_){r.dataManager.completeData(_),r.postMessage({id:f.data.id,payload:_,status:"success"});},function(){r.postMessage({id:f.data.id,status:"error"});});else if(f.data.type==="complete"){var w=f.data.animation;r.dataManager.completeData(w),r.postMessage({id:f.data.id,payload:w,status:"success"});}else f.data.type==="loadData"&&r.assetLoader.load(f.data.path,f.data.fullPath,function(_){r.postMessage({id:f.data.id,payload:_,status:"success"});},function(){r.postMessage({id:f.data.id,status:"error"});});}),i.onmessage=function(f){var P=f.data,w=P.id,_=e[w];e[w]=null,P.status==="success"?_.onComplete(P.payload):_.onError&&_.onError();});}function o(f,P){t+=1;var w="processId_"+t;return e[w]={onComplete:f,onError:P},w}function c(f,P,w){d();var _=o(P,w);i.postMessage({type:"loadAnimation",path:f,fullPath:window.location.origin+window.location.pathname,id:_});}function y(f,P,w){d();var _=o(P,w);i.postMessage({type:"loadData",path:f,fullPath:window.location.origin+window.location.pathname,id:_});}function k(f,P,w){d();var _=o(P,w);i.postMessage({type:"complete",animation:f,id:_});}return {loadAnimation:c,loadData:y,completeAnimation:k}}(),Ti=function(){var t=function(){var g=nt("canvas");g.width=1,g.height=1;var l=g.getContext("2d");return l.fillStyle="rgba(0,0,0,0)",l.fillRect(0,0,1,1),g}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null);}function s(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null);}function i(g,l,p){var m="";if(g.e)m=g.p;else if(l){var x=g.p;x.indexOf("images/")!==-1&&(x=x.split("/")[1]),m=l+x;}else m=p,m+=g.u?g.u:"",m+=g.p;return m}function a(g){var l=0,p=setInterval(function(){var m=g.getBBox();(m.width||l>500)&&(this._imageLoaded(),clearInterval(p)),l+=1;}.bind(this),50);}function r(g){var l=i(g,this.assetsPath,this.path),p=R("image");Pi?this.testImageLoaded(p):p.addEventListener("load",this._imageLoaded,!1),p.addEventListener("error",function(){m.img=t,this._imageLoaded();}.bind(this),!1),p.setAttributeNS("http://www.w3.org/1999/xlink","href",l),this._elementHelper.append?this._elementHelper.append(p):this._elementHelper.appendChild(p);var m={img:p,assetData:g};return m}function n(g){var l=i(g,this.assetsPath,this.path),p=nt("img");p.crossOrigin="anonymous",p.addEventListener("load",this._imageLoaded,!1),p.addEventListener("error",function(){m.img=t,this._imageLoaded();}.bind(this),!1),p.src=l;var m={img:p,assetData:g};return m}function d(g){var l={assetData:g},p=i(g,this.assetsPath,this.path);return xe.loadData(p,function(m){l.img=m,this._footageLoaded();}.bind(this),function(){l.img={},this._footageLoaded();}.bind(this)),l}function o(g,l){this.imagesLoadedCb=l;var p,m=g.length;for(p=0;p<m;p+=1)g[p].layers||(!g[p].t||g[p].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(g[p]))):g[p].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(g[p]))));}function c(g){this.path=g||"";}function y(g){this.assetsPath=g||"";}function k(g){for(var l=0,p=this.images.length;l<p;){if(this.images[l].assetData===g)return this.images[l].img;l+=1;}return null}function f(){this.imagesLoadedCb=null,this.images.length=0;}function P(){return this.totalImages===this.loadedAssets}function w(){return this.totalFootages===this.loadedFootagesCount}function _(g,l){g==="svg"?(this._elementHelper=l,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this);}function D(){this._imageLoaded=e.bind(this),this._footageLoaded=s.bind(this),this.testImageLoaded=a.bind(this),this.createFootageData=d.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[];}return D.prototype={loadAssets:o,setAssetsPath:y,setPath:c,loadedImages:P,loadedFootages:w,destroy:f,getAsset:k,createImgData:n,createImageData:r,imageLoaded:e,footageLoaded:s,setCacheType:_},D}();function Ls(){}Ls.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var s=this._cbs[t],i=0;i<s.length;i+=1)s[i](e);},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e);}.bind(this)},removeEventListener:function(t,e){if(!e)this._cbs[t]=null;else if(this._cbs[t]){for(var s=0,i=this._cbs[t].length;s<i;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null);}}};var Ai=function(){function t(e){for(var s=e.split(`\r
`),i={},a,r=0,n=0;n<s.length;n+=1)a=s[n].split(":"),a.length===2&&(i[a[0]]=a[1].trim(),r+=1);if(r===0)throw new Error;return i}return function(e){for(var s=[],i=0;i<e.length;i+=1){var a=e[i],r={time:a.tm,duration:a.dr};try{r.payload=JSON.parse(e[i].cm);}catch{try{r.payload=t(e[i].cm);}catch{r.payload={name:e[i].cm};}}s.push(r);}return s}}(),Fi=function(){function t(e){this.compositions.push(e);}return function(){function e(s){for(var i=0,a=this.compositions.length;i<a;){if(this.compositions[i].data&&this.compositions[i].data.nm===s)return this.compositions[i].prepareFrame&&this.compositions[i].data.xt&&this.compositions[i].prepareFrame(this.currentFrame),this.compositions[i].compInterface;i+=1;}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),_e={},Ii=function(t,e){_e[t]=e;};function Li(t){return _e[t]}function Bi(){if(_e.canvas)return "canvas";for(var t in _e)if(_e[t])return t;return ""}function ke(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ke=function(e){return typeof e}:ke=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(t)}var q=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=ut(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=Ci(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=Fi(),this.imagePreloader=new Ti,this.audioController=ki(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new as("drawnFrame",0,0,0),this.expressionsPlugin=Re();};W([Ls],q),q.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var s=Li(e);this.renderer=new s(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,t.loop===""||t.loop===null||t.loop===void 0||t.loop===!0?this.loop=!0:t.loop===!1?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(t,"autoloadSegments")?t.autoloadSegments:!0,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(t.path.lastIndexOf("\\")!==-1?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),xe.loadAnimation(t.path,this.configAnimation,this.onSetupError));},q.prototype.onSetupError=function(){this.trigger("data_failed");},q.prototype.setupAnimation=function(t){xe.completeAnimation(t,this.configAnimation);},q.prototype.setData=function(t,e){e&&ke(e)!=="object"&&(e=JSON.parse(e));var s={wrapper:t,animationData:e},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:Bi()||"canvas";var a=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";a==="false"?s.loop=!1:a==="true"?s.loop=!0:a!==""&&(s.loop=parseInt(a,10));var r=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:i.getNamedItem("bm-autoplay")?i.getNamedItem("bm-autoplay").value:!0;s.autoplay=r!=="false",s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var n=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";n==="false"&&(s.prerender=!1),s.path?this.setParams(s):this.trigger("destroy");},q.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e=this.animationData.layers,s,i=e.length,a=t.layers,r,n=a.length;for(r=0;r<n;r+=1)for(s=0;s<i;){if(e[s].id===a[r].id){e[s]=a[r];break}s+=1;}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(i=t.assets.length,s=0;s<i;s+=1)this.animationData.assets.push(t.assets[s]);this.animationData.__complete=!1,xe.completeAnimation(this.animationData,this.onSegmentComplete);},q.prototype.onSegmentComplete=function(t){this.animationData=t;var e=Re();e&&e.initExpressions(this),this.loadNextSegment();},q.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||t.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,xe.loadData(s,this.includeLayers.bind(this),function(){this.trigger("data_failed");}.bind(this));},q.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.totalFrames),this.loadNextSegment();},q.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded();},q.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this));},q.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=Ai(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause();}catch(e){this.triggerConfigError(e);}},q.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20));},q.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=Re();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded");}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play();}},q.prototype.resize=function(t,e){var s=typeof t=="number"?t:void 0,i=typeof e=="number"?e:void 0;this.renderer.updateContainerSize(s,i);},q.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t;},q.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame");},q.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame);}catch(t){this.triggerRenderFrameError(t);}},q.prototype.play=function(t){t&&this.name!==t||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")));},q.prototype.pause=function(t){t&&this.name!==t||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause());},q.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause());},q.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0));},q.prototype.getMarkerData=function(t){for(var e,s=0;s<this.markers.length;s+=1)if(e=this.markers[s],e.payload&&e.payload.name===t)return e;return null},q.prototype.goToAndStop=function(t,e,s){if(!(s&&this.name!==s)){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&this.goToAndStop(a.time,!0);}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause();}},q.prototype.goToAndPlay=function(t,e,s){if(!(s&&this.name!==s)){var i=Number(t);if(isNaN(i)){var a=this.getMarkerData(t);a&&(a.duration?this.playSegments([a.time,a.time+a.duration],!0):this.goToAndStop(a.time,!0));}else this.goToAndStop(i,e,s);this.play();}},q.prototype.advanceTime=function(t){if(!(this.isPaused===!0||this.isLoaded===!1)){var e=this.currentRawFrame+t*this.frameModifier,s=!1;e>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(s=!0,e=this.totalFrames-1):e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):e<0?this.checkSegments(e%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(s=!0,e=0)):this.setCurrentRawFrameValue(e),s&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"));}},q.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart");},q.prototype.setSegment=function(t,e){var s=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?s=t:this.currentRawFrame+this.firstFrame>e&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,s!==-1&&this.goToAndStop(s,!0);},q.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),ke(t[0])==="object"){var s,i=t.length;for(s=0;s<i;s+=1)this.segments.push(t[s]);}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play();},q.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0);},q.prototype.checkSegments=function(t){return this.segments.length?(this.adjustSegment(this.segments.shift(),t),!0):!1},q.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null);},q.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame();},q.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier();},q.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier();},q.prototype.setLoop=function(t){this.loop=t;},q.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t);},q.prototype.getVolume=function(){return this.audioController.getVolume()},q.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute();},q.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute();},q.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection);},q.prototype.getPath=function(){return this.path},q.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var s=t.p;s.indexOf("images/")!==-1&&(s=s.split("/")[1]),e=this.assetsPath+s;}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},q.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;e<s;){if(t===this.assets[e].id)return this.assets[e];e+=1;}return null},q.prototype.hide=function(){this.renderer.hide();},q.prototype.show=function(){this.renderer.show();},q.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},q.prototype.updateDocumentData=function(t,e,s){try{var i=this.renderer.getElementByPath(t);i.updateDocumentData(e,s);}catch{}},q.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new as(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(t,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(t,new Ms(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new Cs(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new Es(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new Ts(t,this));break;default:this.triggerEvent(t);}t==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new as(t,this.currentFrame,this.totalFrames,this.frameMult)),t==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new Ms(t,this.loop,this.playCount,this.frameMult)),t==="complete"&&this.onComplete&&this.onComplete.call(this,new Cs(t,this.frameMult)),t==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new Es(t,this.firstFrame,this.totalFrames)),t==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new Ts(t,this));},q.prototype.triggerRenderFrameError=function(t){var e=new wi(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e);},q.prototype.triggerConfigError=function(t){var e=new Si(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e);};var st=function(){var t={},e=[],s=0,i=0,a=0,r=!0,n=!1;function d(u){for(var b=0,h=u.target;b<i;)e[b].animation===h&&(e.splice(b,1),b-=1,i-=1,h.isPaused||k()),b+=1;}function o(u,b){if(!u)return null;for(var h=0;h<i;){if(e[h].elem===u&&e[h].elem!==null)return e[h].animation;h+=1;}var v=new q;return f(v,u),v.setData(u,b),v}function c(){var u,b=e.length,h=[];for(u=0;u<b;u+=1)h.push(e[u].animation);return h}function y(){a+=1,N();}function k(){a-=1;}function f(u,b){u.addEventListener("destroy",d),u.addEventListener("_active",y),u.addEventListener("_idle",k),e.push({elem:b,animation:u}),i+=1;}function P(u){var b=new q;return f(b,null),b.setParams(u),b}function w(u,b){var h;for(h=0;h<i;h+=1)e[h].animation.setSpeed(u,b);}function _(u,b){var h;for(h=0;h<i;h+=1)e[h].animation.setDirection(u,b);}function D(u){var b;for(b=0;b<i;b+=1)e[b].animation.play(u);}function g(u){var b=u-s,h;for(h=0;h<i;h+=1)e[h].animation.advanceTime(b);s=u,a&&!n?window.requestAnimationFrame(g):r=!0;}function l(u){s=u,window.requestAnimationFrame(g);}function p(u){var b;for(b=0;b<i;b+=1)e[b].animation.pause(u);}function m(u,b,h){var v;for(v=0;v<i;v+=1)e[v].animation.goToAndStop(u,b,h);}function x(u){var b;for(b=0;b<i;b+=1)e[b].animation.stop(u);}function C(u){var b;for(b=0;b<i;b+=1)e[b].animation.togglePause(u);}function E(u){var b;for(b=i-1;b>=0;b-=1)e[b].animation.destroy(u);}function T(u,b,h){var v=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),M,S=v.length;for(M=0;M<S;M+=1)h&&v[M].setAttribute("data-bm-type",h),o(v[M],u);if(b&&S===0){h||(h="svg");var H=document.getElementsByTagName("body")[0];H.innerText="";var z=nt("div");z.style.width="100%",z.style.height="100%",z.setAttribute("data-bm-type",h),H.appendChild(z),o(z,u);}}function L(){var u;for(u=0;u<i;u+=1)e[u].animation.resize();}function N(){!n&&a&&r&&(window.requestAnimationFrame(l),r=!1);}function O(){n=!0;}function B(){n=!1,N();}function j(u,b){var h;for(h=0;h<i;h+=1)e[h].animation.setVolume(u,b);}function A(u){var b;for(b=0;b<i;b+=1)e[b].animation.mute(u);}function F(u){var b;for(b=0;b<i;b+=1)e[b].animation.unmute(u);}return t.registerAnimation=o,t.loadAnimation=P,t.setSpeed=w,t.setDirection=_,t.play=D,t.pause=p,t.stop=x,t.togglePause=C,t.searchAnimations=T,t.resize=L,t.goToAndStop=m,t.destroy=E,t.freeze=O,t.unfreeze=B,t.setVolume=j,t.mute=A,t.unmute=F,t.getRegisteredAnimations=c,t}(),Pe=function(){var t={};t.getBezierEasing=s;var e={};function s(l,p,m,x,C){var E=C||("bez_"+l+"_"+p+"_"+m+"_"+x).replace(/\./g,"p");if(e[E])return e[E];var T=new g([l,p,m,x]);return e[E]=T,T}var i=4,a=.001,r=1e-7,n=10,d=11,o=1/(d-1),c=typeof Float32Array=="function";function y(l,p){return 1-3*p+3*l}function k(l,p){return 3*p-6*l}function f(l){return 3*l}function P(l,p,m){return ((y(p,m)*l+k(p,m))*l+f(p))*l}function w(l,p,m){return 3*y(p,m)*l*l+2*k(p,m)*l+f(p)}function _(l,p,m,x,C){var E,T,L=0;do T=p+(m-p)/2,E=P(T,x,C)-l,E>0?m=T:p=T;while(Math.abs(E)>r&&++L<n);return T}function D(l,p,m,x){for(var C=0;C<i;++C){var E=w(p,m,x);if(E===0)return p;var T=P(p,m,x)-l;p-=T/E;}return p}function g(l){this._p=l,this._mSampleValues=c?new Float32Array(d):new Array(d),this._precomputed=!1,this.get=this.get.bind(this);}return g.prototype={get:function(l){var p=this._p[0],m=this._p[1],x=this._p[2],C=this._p[3];return this._precomputed||this._precompute(),p===m&&x===C?l:l===0?0:l===1?1:P(this._getTForX(l),m,C)},_precompute:function(){var l=this._p[0],p=this._p[1],m=this._p[2],x=this._p[3];this._precomputed=!0,(l!==p||m!==x)&&this._calcSampleValues();},_calcSampleValues:function(){for(var l=this._p[0],p=this._p[2],m=0;m<d;++m)this._mSampleValues[m]=P(m*o,l,p);},_getTForX:function(l){for(var p=this._p[0],m=this._p[2],x=this._mSampleValues,C=0,E=1,T=d-1;E!==T&&x[E]<=l;++E)C+=o;--E;var L=(l-x[E])/(x[E+1]-x[E]),N=C+L*o,O=w(N,p,m);return O>=a?D(l,N,p,m):O===0?N:_(l,C,C+o,p,m)}},t}(),Bs=function(){function t(e){return e.concat(K(e.length))}return {double:t}}(),qe=function(){return function(t,e,s){var i=0,a=t,r=K(a),n={newElement:d,release:o};function d(){var c;return i?(i-=1,c=r[i]):c=e(),c}function o(c){i===a&&(r=Bs.double(r),a*=2),s&&s(c),r[i]=c,i+=1;}return n}}(),zs=function(){function t(){return {addedLength:0,percents:ht("float32",Ne()),lengths:ht("float32",Ne())}}return qe(8,t)}(),Vs=function(){function t(){return {lengths:[],totalLength:0}}function e(s){var i,a=s.lengths.length;for(i=0;i<a;i+=1)zs.release(s.lengths[i]);s.lengths.length=0;}return qe(8,t,e)}();function zi(){var t=Math;function e(f,P,w,_,D,g){var l=f*_+P*D+w*g-D*_-g*f-w*P;return l>-.001&&l<.001}function s(f,P,w,_,D,g,l,p,m){if(w===0&&g===0&&m===0)return e(f,P,_,D,l,p);var x=t.sqrt(t.pow(_-f,2)+t.pow(D-P,2)+t.pow(g-w,2)),C=t.sqrt(t.pow(l-f,2)+t.pow(p-P,2)+t.pow(m-w,2)),E=t.sqrt(t.pow(l-_,2)+t.pow(p-D,2)+t.pow(m-g,2)),T;return x>C?x>E?T=x-C-E:T=E-C-x:E>C?T=E-C-x:T=C-x-E,T>-1e-4&&T<1e-4}var i=function(){return function(f,P,w,_){var D=Ne(),g,l,p,m,x,C=0,E,T=[],L=[],N=zs.newElement();for(p=w.length,g=0;g<D;g+=1){for(x=g/(D-1),E=0,l=0;l<p;l+=1)m=mt(1-x,3)*f[l]+3*mt(1-x,2)*x*w[l]+3*(1-x)*mt(x,2)*_[l]+mt(x,3)*P[l],T[l]=m,L[l]!==null&&(E+=mt(T[l]-L[l],2)),L[l]=T[l];E&&(E=ze(E),C+=E),N.percents[g]=x,N.lengths[g]=C;}return N.addedLength=C,N}}();function a(f){var P=Vs.newElement(),w=f.c,_=f.v,D=f.o,g=f.i,l,p=f._length,m=P.lengths,x=0;for(l=0;l<p-1;l+=1)m[l]=i(_[l],_[l+1],D[l],g[l+1]),x+=m[l].addedLength;return w&&p&&(m[l]=i(_[l],_[0],D[l],g[0]),x+=m[l].addedLength),P.totalLength=x,P}function r(f){this.segmentLength=0,this.points=new Array(f);}function n(f,P){this.partialLength=f,this.point=P;}var d=function(){var f={};return function(P,w,_,D){var g=(P[0]+"_"+P[1]+"_"+w[0]+"_"+w[1]+"_"+_[0]+"_"+_[1]+"_"+D[0]+"_"+D[1]).replace(/\./g,"p");if(!f[g]){var l=Ne(),p,m,x,C,E,T=0,L,N,O=null;P.length===2&&(P[0]!==w[0]||P[1]!==w[1])&&e(P[0],P[1],w[0],w[1],P[0]+_[0],P[1]+_[1])&&e(P[0],P[1],w[0],w[1],w[0]+D[0],w[1]+D[1])&&(l=2);var B=new r(l);for(x=_.length,p=0;p<l;p+=1){for(N=K(x),E=p/(l-1),L=0,m=0;m<x;m+=1)C=mt(1-E,3)*P[m]+3*mt(1-E,2)*E*(P[m]+_[m])+3*(1-E)*mt(E,2)*(w[m]+D[m])+mt(E,3)*w[m],N[m]=C,O!==null&&(L+=mt(N[m]-O[m],2));L=ze(L),T+=L,B.points[p]=new n(L,N),O=N;}B.segmentLength=T,f[g]=B;}return f[g]}}();function o(f,P){var w=P.percents,_=P.lengths,D=w.length,g=ee((D-1)*f),l=f*P.addedLength,p=0;if(g===D-1||g===0||l===_[g])return w[g];for(var m=_[g]>l?-1:1,x=!0;x;)if(_[g]<=l&&_[g+1]>l?(p=(l-_[g])/(_[g+1]-_[g]),x=!1):g+=m,g<0||g>=D-1){if(g===D-1)return w[g];x=!1;}return w[g]+(w[g+1]-w[g])*p}function c(f,P,w,_,D,g){var l=o(D,g),p=1-l,m=t.round((p*p*p*f[0]+(l*p*p+p*l*p+p*p*l)*w[0]+(l*l*p+p*l*l+l*p*l)*_[0]+l*l*l*P[0])*1e3)/1e3,x=t.round((p*p*p*f[1]+(l*p*p+p*l*p+p*p*l)*w[1]+(l*l*p+p*l*l+l*p*l)*_[1]+l*l*l*P[1])*1e3)/1e3;return [m,x]}var y=ht("float32",8);function k(f,P,w,_,D,g,l){D<0?D=0:D>1&&(D=1);var p=o(D,l);g=g>1?1:g;var m=o(g,l),x,C=f.length,E=1-p,T=1-m,L=E*E*E,N=p*E*E*3,O=p*p*E*3,B=p*p*p,j=E*E*T,A=p*E*T+E*p*T+E*E*m,F=p*p*T+E*p*m+p*E*m,u=p*p*m,b=E*T*T,h=p*T*T+E*m*T+E*T*m,v=p*m*T+E*m*m+p*T*m,M=p*m*m,S=T*T*T,H=m*T*T+T*m*T+T*T*m,z=m*m*T+T*m*m+m*T*m,Z=m*m*m;for(x=0;x<C;x+=1)y[x*4]=t.round((L*f[x]+N*w[x]+O*_[x]+B*P[x])*1e3)/1e3,y[x*4+1]=t.round((j*f[x]+A*w[x]+F*_[x]+u*P[x])*1e3)/1e3,y[x*4+2]=t.round((b*f[x]+h*w[x]+v*_[x]+M*P[x])*1e3)/1e3,y[x*4+3]=t.round((S*f[x]+H*w[x]+z*_[x]+Z*P[x])*1e3)/1e3;return y}return {getSegmentsLength:a,getNewSegment:k,getPointInSegment:c,buildBezierData:d,pointOnLine2D:e,pointOnLine3D:s}}var Et=zi(),se=is,Rs=Math.abs;function Os(t,e){var s=this.offsetTime,i;this.propType==="multidimensional"&&(i=ht("float32",this.pv.length));for(var a=e.lastIndex,r=a,n=this.keyframes.length-1,d=!0,o,c,y;d;){if(o=this.keyframes[r],c=this.keyframes[r+1],r===n-1&&t>=c.t-s){o.h&&(o=c),a=0;break}if(c.t-s>t){a=r;break}r<n-1?r+=1:(a=0,d=!1);}y=this.keyframesMetadata[r]||{};var k,f,P,w,_,D,g=c.t-s,l=o.t-s,p;if(o.to){y.bezierData||(y.bezierData=Et.buildBezierData(o.s,c.s||o.e,o.to,o.ti));var m=y.bezierData;if(t>=g||t<l){var x=t>=g?m.points.length-1:0;for(f=m.points[x].point.length,k=0;k<f;k+=1)i[k]=m.points[x].point[k];}else {y.__fnct?D=y.__fnct:(D=Pe.getBezierEasing(o.o.x,o.o.y,o.i.x,o.i.y,o.n).get,y.__fnct=D),P=D((t-l)/(g-l));var C=m.segmentLength*P,E,T=e.lastFrame<t&&e._lastKeyframeIndex===r?e._lastAddedLength:0;for(_=e.lastFrame<t&&e._lastKeyframeIndex===r?e._lastPoint:0,d=!0,w=m.points.length;d;){if(T+=m.points[_].partialLength,C===0||P===0||_===m.points.length-1){for(f=m.points[_].point.length,k=0;k<f;k+=1)i[k]=m.points[_].point[k];break}else if(C>=T&&C<T+m.points[_+1].partialLength){for(E=(C-T)/m.points[_+1].partialLength,f=m.points[_].point.length,k=0;k<f;k+=1)i[k]=m.points[_].point[k]+(m.points[_+1].point[k]-m.points[_].point[k])*E;break}_<w-1?_+=1:d=!1;}e._lastPoint=_,e._lastAddedLength=T-m.points[_].partialLength,e._lastKeyframeIndex=r;}}else {var L,N,O,B,j;if(n=o.s.length,p=c.s||o.e,this.sh&&o.h!==1)if(t>=g)i[0]=p[0],i[1]=p[1],i[2]=p[2];else if(t<=l)i[0]=o.s[0],i[1]=o.s[1],i[2]=o.s[2];else {var A=Ns(o.s),F=Ns(p),u=(t-l)/(g-l);Ri(i,Vi(A,F,u));}else for(r=0;r<n;r+=1)o.h!==1&&(t>=g?P=1:t<l?P=0:(o.o.x.constructor===Array?(y.__fnct||(y.__fnct=[]),y.__fnct[r]?D=y.__fnct[r]:(L=o.o.x[r]===void 0?o.o.x[0]:o.o.x[r],N=o.o.y[r]===void 0?o.o.y[0]:o.o.y[r],O=o.i.x[r]===void 0?o.i.x[0]:o.i.x[r],B=o.i.y[r]===void 0?o.i.y[0]:o.i.y[r],D=Pe.getBezierEasing(L,N,O,B).get,y.__fnct[r]=D)):y.__fnct?D=y.__fnct:(L=o.o.x,N=o.o.y,O=o.i.x,B=o.i.y,D=Pe.getBezierEasing(L,N,O,B).get,o.keyframeMetadata=D),P=D((t-l)/(g-l)))),p=c.s||o.e,j=o.h===1?o.s[r]:o.s[r]+(p[r]-o.s[r])*P,this.propType==="multidimensional"?i[r]=j:i=j;}return e.lastIndex=a,i}function Vi(t,e,s){var i=[],a=t[0],r=t[1],n=t[2],d=t[3],o=e[0],c=e[1],y=e[2],k=e[3],f,P,w,_,D;return P=a*o+r*c+n*y+d*k,P<0&&(P=-P,o=-o,c=-c,y=-y,k=-k),1-P>1e-6?(f=Math.acos(P),w=Math.sin(f),_=Math.sin((1-s)*f)/w,D=Math.sin(s*f)/w):(_=1-s,D=s),i[0]=_*a+D*o,i[1]=_*r+D*c,i[2]=_*n+D*y,i[3]=_*d+D*k,i}function Ri(t,e){var s=e[0],i=e[1],a=e[2],r=e[3],n=Math.atan2(2*i*r-2*s*a,1-2*i*i-2*a*a),d=Math.asin(2*s*i+2*a*r),o=Math.atan2(2*s*r-2*i*a,1-2*s*s-2*a*a);t[0]=n/U,t[1]=d/U,t[2]=o/U;}function Ns(t){var e=t[0]*U,s=t[1]*U,i=t[2]*U,a=Math.cos(e/2),r=Math.cos(s/2),n=Math.cos(i/2),d=Math.sin(e/2),o=Math.sin(s/2),c=Math.sin(i/2),y=a*r*n-d*o*c,k=d*o*n+a*r*c,f=d*r*n+a*o*c,P=a*o*n-d*r*c;return [k,f,P,y]}function js(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==se&&(this._caching.lastFrame>=s&&t>=s||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i;}return this._caching.lastFrame=t,this.pv}function He(t){var e;if(this.propType==="unidimensional")e=t*this.mult,Rs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var s=0,i=this.v.length;s<i;)e=t[s]*this.mult,Rs(this.v[s]-e)>1e-5&&(this.v[s]=e,this._mdf=!0),s+=1;}function We(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var t,e=this.effectsSequence.length,s=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)s=this.effectsSequence[t](s);this.setVValue(s),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId;}}function Xe(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this);}function Oi(t,e,s,i){this.propType="unidimensional",this.mult=s||1,this.data=e,this.v=s?e.k*s:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=We,this.setVValue=He,this.addEffect=Xe;}function Ni(t,e,s,i){this.propType="multidimensional",this.mult=s||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a,r=e.k.length;for(this.v=ht("float32",r),this.pv=ht("float32",r),this.vel=ht("float32",r),a=0;a<r;a+=1)this.v[a]=e.k[a]*this.mult,this.pv[a]=e.k[a];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=We,this.setVValue=He,this.addEffect=Xe;}function ji(t,e,s,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:se,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=se,this.pv=se,this._isFirstFrame=!0,this.getValue=We,this.setVValue=He,this.interpolateValue=Os,this.effectsSequence=[js.bind(this)],this.addEffect=Xe;}function qi(t,e,s,i){this.propType="multidimensional";var a,r=e.k.length,n,d,o,c;for(a=0;a<r-1;a+=1)e.k[a].to&&e.k[a].s&&e.k[a+1]&&e.k[a+1].s&&(n=e.k[a].s,d=e.k[a+1].s,o=e.k[a].to,c=e.k[a].ti,(n.length===2&&!(n[0]===d[0]&&n[1]===d[1])&&Et.pointOnLine2D(n[0],n[1],d[0],d[1],n[0]+o[0],n[1]+o[1])&&Et.pointOnLine2D(n[0],n[1],d[0],d[1],d[0]+c[0],d[1]+c[1])||n.length===3&&!(n[0]===d[0]&&n[1]===d[1]&&n[2]===d[2])&&Et.pointOnLine3D(n[0],n[1],n[2],d[0],d[1],d[2],n[0]+o[0],n[1]+o[1],n[2]+o[2])&&Et.pointOnLine3D(n[0],n[1],n[2],d[0],d[1],d[2],d[0]+c[0],d[1]+c[1],d[2]+c[2]))&&(e.k[a].to=null,e.k[a].ti=null),n[0]===d[0]&&n[1]===d[1]&&o[0]===0&&o[1]===0&&c[0]===0&&c[1]===0&&(n.length===2||n[2]===d[2]&&o[2]===0&&c[2]===0)&&(e.k[a].to=null,e.k[a].ti=null));this.effectsSequence=[js.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=We,this.setVValue=He,this.interpolateValue=Os,this.frameId=-1;var y=e.k[0].s.length;for(this.v=ht("float32",y),this.pv=ht("float32",y),a=0;a<y;a+=1)this.v[a]=se,this.pv[a]=se;this._caching={lastFrame:se,lastIndex:0,value:ht("float32",y)},this.addEffect=Xe;}var I=function(){function t(s,i,a,r,n){i.sid&&(i=s.globalData.slotManager.getProp(i));var d;if(!i.k.length)d=new Oi(s,i,r,n);else if(typeof i.k[0]=="number")d=new Ni(s,i,r,n);else switch(a){case 0:d=new ji(s,i,r,n);break;case 1:d=new qi(s,i,r,n);break}return d.effectsSequence.length&&n.addDynamicProperty(d),d}var e={getProp:t};return e}();function ot(){}ot.prototype={addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0);},iterateDynamicProperties:function(){this._mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0);},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1;}};var ie=function(){function t(){return ht("float32",2)}return qe(8,t)}();function Vt(){this.c=!1,this._length=0,this._maxLength=8,this.v=K(this._maxLength),this.o=K(this._maxLength),this.i=K(this._maxLength);}Vt.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var s=0;s<e;)this.v[s]=ie.newElement(),this.o[s]=ie.newElement(),this.i[s]=ie.newElement(),s+=1;},Vt.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t;},Vt.prototype.doubleArrayLength=function(){this.v=this.v.concat(K(this._maxLength)),this.i=this.i.concat(K(this._maxLength)),this.o=this.o.concat(K(this._maxLength)),this._maxLength*=2;},Vt.prototype.setXYAt=function(t,e,s,i,a){var r;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[];break}(!r[i]||r[i]&&!a)&&(r[i]=ie.newElement()),r[i][0]=t,r[i][1]=e;},Vt.prototype.setTripleAt=function(t,e,s,i,a,r,n,d){this.setXYAt(t,e,"v",n,d),this.setXYAt(s,i,"o",n,d),this.setXYAt(a,r,"i",n,d);},Vt.prototype.reverse=function(){var t=new Vt;t.setPathData(this.c,this._length);var e=this.v,s=this.o,i=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],s[0][0],s[0][1],0,!1),a=1);var r=this._length-1,n=this._length,d;for(d=a;d<n;d+=1)t.setTripleAt(e[r][0],e[r][1],i[r][0],i[r][1],s[r][0],s[r][1],d,!1),r-=1;return t},Vt.prototype.length=function(){return this._length};var pt=function(){function t(){return new Vt}function e(a){var r=a._length,n;for(n=0;n<r;n+=1)ie.release(a.v[n]),ie.release(a.i[n]),ie.release(a.o[n]),a.v[n]=null,a.i[n]=null,a.o[n]=null;a._length=0,a.c=!1;}function s(a){var r=i.newElement(),n,d=a._length===void 0?a.v.length:a._length;for(r.setLength(d),r.c=a.c,n=0;n<d;n+=1)r.setTripleAt(a.v[n][0],a.v[n][1],a.o[n][0],a.o[n][1],a.i[n][0],a.i[n][1],n);return r}var i=qe(4,t,e);return i.clone=s,i}();function hs(){this._length=0,this._maxLength=4,this.shapes=K(this._maxLength);}hs.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(K(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1;},hs.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)pt.release(this.shapes[t]);this._length=0;};var pe=function(){var t={newShapeCollection:a,release:r},e=0,s=4,i=K(s);function a(){var n;return e?(e-=1,n=i[e]):n=new hs,n}function r(n){var d,o=n._length;for(d=0;d<o;d+=1)pt.release(n.shapes[d]);n._length=0,e===s&&(i=Bs.double(i),s*=2),i[e]=n,e+=1;}return t}(),Ze=function(){var t=-999999;function e(g,l,p){var m=p.lastIndex,x,C,E,T,L,N,O,B,j,A=this.keyframes;if(g<A[0].t-this.offsetTime)x=A[0].s[0],E=!0,m=0;else if(g>=A[A.length-1].t-this.offsetTime)x=A[A.length-1].s?A[A.length-1].s[0]:A[A.length-2].e[0],E=!0;else {for(var F=m,u=A.length-1,b=!0,h,v,M;b&&(h=A[F],v=A[F+1],!(v.t-this.offsetTime>g));)F<u-1?F+=1:b=!1;if(M=this.keyframesMetadata[F]||{},E=h.h===1,m=F,!E){if(g>=v.t-this.offsetTime)B=1;else if(g<h.t-this.offsetTime)B=0;else {var S;M.__fnct?S=M.__fnct:(S=Pe.getBezierEasing(h.o.x,h.o.y,h.i.x,h.i.y).get,M.__fnct=S),B=S((g-(h.t-this.offsetTime))/(v.t-this.offsetTime-(h.t-this.offsetTime)));}C=v.s?v.s[0]:h.e[0];}x=h.s[0];}for(N=l._length,O=x.i[0].length,p.lastIndex=m,T=0;T<N;T+=1)for(L=0;L<O;L+=1)j=E?x.i[T][L]:x.i[T][L]+(C.i[T][L]-x.i[T][L])*B,l.i[T][L]=j,j=E?x.o[T][L]:x.o[T][L]+(C.o[T][L]-x.o[T][L])*B,l.o[T][L]=j,j=E?x.v[T][L]:x.v[T][L]+(C.v[T][L]-x.v[T][L])*B,l.v[T][L]=j;}function s(){var g=this.comp.renderedFrame-this.offsetTime,l=this.keyframes[0].t-this.offsetTime,p=this.keyframes[this.keyframes.length-1].t-this.offsetTime,m=this._caching.lastFrame;return m!==t&&(m<l&&g<l||m>p&&g>p)||(this._caching.lastIndex=m<g?this._caching.lastIndex:0,this.interpolateShape(g,this.pv,this._caching)),this._caching.lastFrame=g,this.pv}function i(){this.paths=this.localShapeCollection;}function a(g,l){if(g._length!==l._length||g.c!==l.c)return !1;var p,m=g._length;for(p=0;p<m;p+=1)if(g.v[p][0]!==l.v[p][0]||g.v[p][1]!==l.v[p][1]||g.o[p][0]!==l.o[p][0]||g.o[p][1]!==l.o[p][1]||g.i[p][0]!==l.i[p][0]||g.i[p][1]!==l.i[p][1])return !1;return !0}function r(g){a(this.v,g)||(this.v=pt.clone(g),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.l