UNPKG

@dotlottie/player-component

Version:

dotLottie animation player web component.

5 lines (4 loc) 205 kB
import { a } from './chunk-HDDX7F4A.mjs'; import './chunk-ZWH2ESXT.mjs'; var wa=a((Re,ss)=>{typeof navigator<"u"&&function(ve,he){typeof Re=="object"&&typeof ss<"u"?ss.exports=he():typeof define=="function"&&define.amd?define(he):(ve=typeof globalThis<"u"?globalThis:ve||self,ve.lottie=he());}(Re,function(){var ve="http://www.w3.org/2000/svg",he="",ks=!1,is=-999999,Ci=function(t){ks=!!t;},ki=function(){return ks},Pi=function(t){he=t;},bt=function(){return he};function _t(t){return document.createElement(t)}function Y(t,e){var s,i=t.length,r;for(s=0;s<i;s+=1){r=t[s].prototype;for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e.prototype[a]=r[a]);}}function Si(t){function e(){}return e.prototype=t,e}var Di=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}}(),at=function(){function t(s,i){var r=0,a=[],n;switch(s){case"int16":case"uint8c":n=1;break;default:n=1.1;break}for(r=0;r<i;r+=1)a.push(n);return a}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 Q(t){return Array.apply(null,{length:t})}var Ps=!0,Ss=null,Ds="",Ai=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Mt=Math.pow,As=Math.sqrt,ft=Math.floor,Ti=Math.min,Ts=150,Z=Math.PI/180,Jt=.5519;function as(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1;}function Ms(t,e){this.type=t,this.direction=e<0?-1:1;}function ws(t,e,s,i){this.type=t,this.currentLoop=s,this.totalLoops=e,this.direction=i<0?-1:1;}function Fs(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s;}function Es(t,e){this.type=t,this.target=e;}function Mi(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e;}function wi(t){this.type="configError",this.nativeError=t;}var mt=function(){var t=0;return function(){return t+=1,Ds+"__lottie_element_"+t}}();function rs(t,e,s){var i,r,a,n,l,o,m,g;switch(n=Math.floor(t*6),l=t*6-n,o=s*(1-e),m=s*(1-l*e),g=s*(1-(1-l)*e),n%6){case 0:i=s,r=g,a=o;break;case 1:i=m,r=s,a=o;break;case 2:i=o,r=s,a=g;break;case 3:i=o,r=m,a=s;break;case 4:i=g,r=o,a=s;break;case 5:i=s,r=o,a=m;break}return [i,r,a]}function ns(t,e,s){var i=Math.max(t,e,s),r=Math.min(t,e,s),a=i-r,n,l=i===0?0:a/i,o=i/255;switch(i){case r:n=0;break;case t:n=e-s+a*(e<s?6:0),n/=6*a;break;case e:n=s-t+a*2,n/=6*a;break;case s:n=t-e+a*4,n/=6*a;break}return [n,l,o]}function Ls(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 Is(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 Rs(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,r,a){return i<0&&(i=0),r<0&&(r=0),a<0&&(a=0),"#"+t[i]+t[r]+t[a]}})();var Fi=function(t){Ps=!!t;},Ei=function(){return Ps},Li=function(t){Ss=t;},ze=function(){return Ss},Oe=function(t){Ts=t;},Ve=function(){return Ts},Ii=function(t){Ds=t;};function B(t){return document.createElementNS(ve,t)}function Ne(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ne=function(e){return typeof e}:Ne=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(t)}var be=function(){var t=1,e=[],s,i,r={onmessage:function(){},postMessage:function(f){s({data:f});}},a={postMessage:function(f){r.onmessage({data:f});}};function n(f){if(window.Worker&&window.Blob&&ki()){var P=new Blob(["var _workerSelf = self; self.onmessage = ",f.toString()],{type:"text/javascript"}),k=URL.createObjectURL(P);return new Worker(k)}return s=f,r}function l(){i||(i=n(function(f){function P(){function v(F,E){var u,_,h=F.length,b,T,S,j;for(_=0;_<h;_+=1)if(u=F[_],"ks"in u&&!u.completed){if(u.completed=!0,u.hasMask){var z=u.masksProperties;for(T=z.length,b=0;b<T;b+=1)if(z[b].pt.k.i)d(z[b].pt.k);else for(j=z[b].pt.k.length,S=0;S<j;S+=1)z[b].pt.k[S].s&&d(z[b].pt.k[S].s[0]),z[b].pt.k[S].e&&d(z[b].pt.k[S].e[0]);}u.ty===0?(u.layers=c(u.refId,E),v(u.layers,E)):u.ty===4?p(u.shapes):u.ty===5&&R(u);}}function D(F,E){if(F){var u=0,_=F.length;for(u=0;u<_;u+=1)F[u].t===1&&(F[u].data.layers=c(F[u].data.refId,E),v(F[u].data.layers,E));}}function y(F,E){for(var u=0,_=E.length;u<_;){if(E[u].id===F)return E[u];u+=1;}return null}function c(F,E){var u=y(F,E);return u?u.layers.__used?JSON.parse(JSON.stringify(u.layers)):(u.layers.__used=!0,u.layers):null}function p(F){var E,u=F.length,_,h;for(E=u-1;E>=0;E-=1)if(F[E].ty==="sh")if(F[E].ks.k.i)d(F[E].ks.k);else for(h=F[E].ks.k.length,_=0;_<h;_+=1)F[E].ks.k[_].s&&d(F[E].ks.k[_].s[0]),F[E].ks.k[_].e&&d(F[E].ks.k[_].e[0]);else F[E].ty==="gr"&&p(F[E].it);}function d(F){var E,u=F.i.length;for(E=0;E<u;E+=1)F.i[E][0]+=F.v[E][0],F.i[E][1]+=F.v[E][1],F.o[E][0]+=F.v[E][0],F.o[E][1]+=F.v[E][1];}function x(F,E){var u=E?E.split("."):[100,100,100];return F[0]>u[0]?!0:u[0]>F[0]?!1:F[1]>u[1]?!0:u[1]>F[1]?!1:F[2]>u[2]?!0:u[2]>F[2]?!1:null}var A=function(){var F=[4,4,14];function E(_){var h=_.t.d;_.t.d={k:[{s:h,t:0}]};}function u(_){var h,b=_.length;for(h=0;h<b;h+=1)_[h].ty===5&&E(_[h]);}return function(_){if(x(F,_.v)&&(u(_.layers),_.assets)){var h,b=_.assets.length;for(h=0;h<b;h+=1)_.assets[h].layers&&u(_.assets[h].layers);}}}(),M=function(){var F=[4,7,99];return function(E){if(E.chars&&!x(F,E.v)){var u,_=E.chars.length;for(u=0;u<_;u+=1){var h=E.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}},E.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"})));}}}}(),w=function(){var F=[5,7,15];function E(_){var h=_.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(_){var h,b=_.length;for(h=0;h<b;h+=1)_[h].ty===5&&E(_[h]);}return function(_){if(x(F,_.v)&&(u(_.layers),_.assets)){var h,b=_.assets.length;for(h=0;h<b;h+=1)_.assets[h].layers&&u(_.assets[h].layers);}}}(),I=function(){var F=[4,1,9];function E(_){var h,b=_.length,T,S;for(h=0;h<b;h+=1)if(_[h].ty==="gr")E(_[h].it);else if(_[h].ty==="fl"||_[h].ty==="st")if(_[h].c.k&&_[h].c.k[0].i)for(S=_[h].c.k.length,T=0;T<S;T+=1)_[h].c.k[T].s&&(_[h].c.k[T].s[0]/=255,_[h].c.k[T].s[1]/=255,_[h].c.k[T].s[2]/=255,_[h].c.k[T].s[3]/=255),_[h].c.k[T].e&&(_[h].c.k[T].e[0]/=255,_[h].c.k[T].e[1]/=255,_[h].c.k[T].e[2]/=255,_[h].c.k[T].e[3]/=255);else _[h].c.k[0]/=255,_[h].c.k[1]/=255,_[h].c.k[2]/=255,_[h].c.k[3]/=255;}function u(_){var h,b=_.length;for(h=0;h<b;h+=1)_[h].ty===4&&E(_[h].shapes);}return function(_){if(x(F,_.v)&&(u(_.layers),_.assets)){var h,b=_.assets.length;for(h=0;h<b;h+=1)_.assets[h].layers&&u(_.assets[h].layers);}}}(),N=function(){var F=[4,4,18];function E(_){var h,b=_.length,T,S;for(h=b-1;h>=0;h-=1)if(_[h].ty==="sh")if(_[h].ks.k.i)_[h].ks.k.c=_[h].closed;else for(S=_[h].ks.k.length,T=0;T<S;T+=1)_[h].ks.k[T].s&&(_[h].ks.k[T].s[0].c=_[h].closed),_[h].ks.k[T].e&&(_[h].ks.k[T].e[0].c=_[h].closed);else _[h].ty==="gr"&&E(_[h].it);}function u(_){var h,b,T=_.length,S,j,z,X;for(b=0;b<T;b+=1){if(h=_[b],h.hasMask){var J=h.masksProperties;for(j=J.length,S=0;S<j;S+=1)if(J[S].pt.k.i)J[S].pt.k.c=J[S].cl;else for(X=J[S].pt.k.length,z=0;z<X;z+=1)J[S].pt.k[z].s&&(J[S].pt.k[z].s[0].c=J[S].cl),J[S].pt.k[z].e&&(J[S].pt.k[z].e[0].c=J[S].cl);}h.ty===4&&E(h.shapes);}}return function(_){if(x(F,_.v)&&(u(_.layers),_.assets)){var h,b=_.assets.length;for(h=0;h<b;h+=1)_.assets[h].layers&&u(_.assets[h].layers);}}}();function V(F){F.__complete||(I(F),A(F),M(F),w(F),N(F),v(F.layers,F.assets),D(F.chars,F.assets),F.__complete=!0);}function R(F){F.t.a.length===0&&"m"in F.t.p;}var q={};return q.completeData=V,q.checkColors=I,q.checkChars=M,q.checkPathProperties=w,q.checkShapes=N,q.completeLayers=v,q}if(a.dataManager||(a.dataManager=P()),a.assetLoader||(a.assetLoader=function(){function v(y){var c=y.getResponseHeader("content-type");return c&&y.responseType==="json"&&c.indexOf("json")!==-1||y.response&&Ne(y.response)==="object"?y.response:y.response&&typeof y.response=="string"?JSON.parse(y.response):y.responseText?JSON.parse(y.responseText):null}function D(y,c,p,d){var x,A=new XMLHttpRequest;try{A.responseType="json";}catch{}A.onreadystatechange=function(){if(A.readyState===4)if(A.status===200)x=v(A),p(x);else try{x=v(A),p(x);}catch(M){d&&d(M);}};try{A.open(["G","E","T"].join(""),y,!0);}catch{A.open(["G","E","T"].join(""),c+"/"+y,!0);}A.send();}return {load:D}}()),f.data.type==="loadAnimation")a.assetLoader.load(f.data.path,f.data.fullPath,function(v){a.dataManager.completeData(v),a.postMessage({id:f.data.id,payload:v,status:"success"});},function(){a.postMessage({id:f.data.id,status:"error"});});else if(f.data.type==="complete"){var k=f.data.animation;a.dataManager.completeData(k),a.postMessage({id:f.data.id,payload:k,status:"success"});}else f.data.type==="loadData"&&a.assetLoader.load(f.data.path,f.data.fullPath,function(v){a.postMessage({id:f.data.id,payload:v,status:"success"});},function(){a.postMessage({id:f.data.id,status:"error"});});}),i.onmessage=function(f){var P=f.data,k=P.id,v=e[k];e[k]=null,P.status==="success"?v.onComplete(P.payload):v.onError&&v.onError();});}function o(f,P){t+=1;var k="processId_"+t;return e[k]={onComplete:f,onError:P},k}function m(f,P,k){l();var v=o(P,k);i.postMessage({type:"loadAnimation",path:f,fullPath:window.location.origin+window.location.pathname,id:v});}function g(f,P,k){l();var v=o(P,k);i.postMessage({type:"loadData",path:f,fullPath:window.location.origin+window.location.pathname,id:v});}function C(f,P,k){l();var v=o(P,k);i.postMessage({type:"complete",animation:f,id:v});}return {loadAnimation:m,loadData:g,completeAnimation:C}}(),Ri=function(){var t=function(){var y=_t("canvas");y.width=1,y.height=1;var c=y.getContext("2d");return c.fillStyle="rgba(0,0,0,0)",c.fillRect(0,0,1,1),y}();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(y,c,p){var d="";if(y.e)d=y.p;else if(c){var x=y.p;x.indexOf("images/")!==-1&&(x=x.split("/")[1]),d=c+x;}else d=p,d+=y.u?y.u:"",d+=y.p;return d}function r(y){var c=0,p=setInterval(function(){var d=y.getBBox();(d.width||c>500)&&(this._imageLoaded(),clearInterval(p)),c+=1;}.bind(this),50);}function a(y){var c=i(y,this.assetsPath,this.path),p=B("image");Ai?this.testImageLoaded(p):p.addEventListener("load",this._imageLoaded,!1),p.addEventListener("error",function(){d.img=t,this._imageLoaded();}.bind(this),!1),p.setAttributeNS("http://www.w3.org/1999/xlink","href",c),this._elementHelper.append?this._elementHelper.append(p):this._elementHelper.appendChild(p);var d={img:p,assetData:y};return d}function n(y){var c=i(y,this.assetsPath,this.path),p=_t("img");p.crossOrigin="anonymous",p.addEventListener("load",this._imageLoaded,!1),p.addEventListener("error",function(){d.img=t,this._imageLoaded();}.bind(this),!1),p.src=c;var d={img:p,assetData:y};return d}function l(y){var c={assetData:y},p=i(y,this.assetsPath,this.path);return be.loadData(p,function(d){c.img=d,this._footageLoaded();}.bind(this),function(){c.img={},this._footageLoaded();}.bind(this)),c}function o(y,c){this.imagesLoadedCb=c;var p,d=y.length;for(p=0;p<d;p+=1)y[p].layers||(!y[p].t||y[p].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(y[p]))):y[p].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(y[p]))));}function m(y){this.path=y||"";}function g(y){this.assetsPath=y||"";}function C(y){for(var c=0,p=this.images.length;c<p;){if(this.images[c].assetData===y)return this.images[c].img;c+=1;}return null}function f(){this.imagesLoadedCb=null,this.images.length=0;}function P(){return this.totalImages===this.loadedAssets}function k(){return this.totalFootages===this.loadedFootagesCount}function v(y,c){y==="svg"?(this._elementHelper=c,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=r.bind(this),this.createFootageData=l.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:g,setPath:m,loadedImages:P,loadedFootages:k,destroy:f,getAsset:C,createImgData:n,createImageData:a,imageLoaded:e,footageLoaded:s,setCacheType:v},D}();function zs(){}zs.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 zi=function(){function t(e){for(var s=e.split(`\r `),i={},r,a=0,n=0;n<s.length;n+=1)r=s[n].split(":"),r.length===2&&(i[r[0]]=r[1].trim(),a+=1);if(a===0)throw new Error;return i}return function(e){for(var s=[],i=0;i<e.length;i+=1){var r=e[i],a={time:r.tm,duration:r.dr};try{a.payload=JSON.parse(e[i].cm);}catch{try{a.payload=t(e[i].cm);}catch{a.payload={name:e[i].cm};}}s.push(a);}return s}}(),Oi=function(){function t(e){this.compositions.push(e);}return function(){function e(s){for(var i=0,r=this.compositions.length;i<r;){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={},Vi=function(t,e){_e[t]=e;};function Ni(t){return _e[t]}function qi(){if(_e.canvas)return "canvas";for(var t in _e)if(_e[t])return t;return ""}function xe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xe=function(e){return typeof e}:xe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xe(t)}var W=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=mt(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=Ei(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=Oi(),this.imagePreloader=new Ri,this.audioController=Di(),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=ze();};Y([zs],W),W.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=Ni(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")),be.loadAnimation(t.path,this.configAnimation,this.onSetupError));},W.prototype.onSetupError=function(){this.trigger("data_failed");},W.prototype.setupAnimation=function(t){be.completeAnimation(t,this.configAnimation);},W.prototype.setData=function(t,e){e&&xe(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:qi()||"canvas";var r=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:"";r==="false"?s.loop=!1:r==="true"?s.loop=!0:r!==""&&(s.loop=parseInt(r,10));var a=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=a!=="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");},W.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,r=t.layers,a,n=r.length;for(a=0;a<n;a+=1)for(s=0;s<i;){if(e[s].id===r[a].id){e[s]=r[a];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,be.completeAnimation(this.animationData,this.onSegmentComplete);},W.prototype.onSegmentComplete=function(t){this.animationData=t;var e=ze();e&&e.initExpressions(this),this.loadNextSegment();},W.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,be.loadData(s,this.includeLayers.bind(this),function(){this.trigger("data_failed");}.bind(this));},W.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.totalFrames),this.loadNextSegment();},W.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded();},W.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this));},W.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=zi(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause();}catch(e){this.triggerConfigError(e);}},W.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20));},W.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=ze();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded");}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play();}},W.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);},W.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t;},W.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");},W.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);}},W.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")));},W.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());},W.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause());},W.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0));},W.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},W.prototype.goToAndStop=function(t,e,s){if(!(s&&this.name!==s)){var i=Number(t);if(isNaN(i)){var r=this.getMarkerData(t);r&&this.goToAndStop(r.time,!0);}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause();}},W.prototype.goToAndPlay=function(t,e,s){if(!(s&&this.name!==s)){var i=Number(t);if(isNaN(i)){var r=this.getMarkerData(t);r&&(r.duration?this.playSegments([r.time,r.time+r.duration],!0):this.goToAndStop(r.time,!0));}else this.goToAndStop(i,e,s);this.play();}},W.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"));}},W.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");},W.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);},W.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),xe(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();},W.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0);},W.prototype.checkSegments=function(t){return this.segments.length?(this.adjustSegment(this.segments.shift(),t),!0):!1},W.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);},W.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame();},W.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier();},W.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier();},W.prototype.setLoop=function(t){this.loop=t;},W.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t);},W.prototype.getVolume=function(){return this.audioController.getVolume()},W.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute();},W.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute();},W.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection);},W.prototype.getPath=function(){return this.path},W.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},W.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},W.prototype.hide=function(){this.renderer.hide();},W.prototype.show=function(){this.renderer.show();},W.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},W.prototype.updateDocumentData=function(t,e,s){try{var i=this.renderer.getElementByPath(t);i.updateDocumentData(e,s);}catch{}},W.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 ws(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new Ms(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new Fs(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new Es(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 ws(t,this.loop,this.playCount,this.frameMult)),t==="complete"&&this.onComplete&&this.onComplete.call(this,new Ms(t,this.frameMult)),t==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new Fs(t,this.firstFrame,this.totalFrames)),t==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new Es(t,this));},W.prototype.triggerRenderFrameError=function(t){var e=new Mi(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e);},W.prototype.triggerConfigError=function(t){var e=new wi(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e);};var rt=function(){var t={},e=[],s=0,i=0,r=0,a=!0,n=!1;function l(u){for(var _=0,h=u.target;_<i;)e[_].animation===h&&(e.splice(_,1),_-=1,i-=1,h.isPaused||C()),_+=1;}function o(u,_){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 b=new W;return f(b,u),b.setData(u,_),b}function m(){var u,_=e.length,h=[];for(u=0;u<_;u+=1)h.push(e[u].animation);return h}function g(){r+=1,N();}function C(){r-=1;}function f(u,_){u.addEventListener("destroy",l),u.addEventListener("_active",g),u.addEventListener("_idle",C),e.push({elem:_,animation:u}),i+=1;}function P(u){var _=new W;return f(_,null),_.setParams(u),_}function k(u,_){var h;for(h=0;h<i;h+=1)e[h].animation.setSpeed(u,_);}function v(u,_){var h;for(h=0;h<i;h+=1)e[h].animation.setDirection(u,_);}function D(u){var _;for(_=0;_<i;_+=1)e[_].animation.play(u);}function y(u){var _=u-s,h;for(h=0;h<i;h+=1)e[h].animation.advanceTime(_);s=u,r&&!n?window.requestAnimationFrame(y):a=!0;}function c(u){s=u,window.requestAnimationFrame(y);}function p(u){var _;for(_=0;_<i;_+=1)e[_].animation.pause(u);}function d(u,_,h){var b;for(b=0;b<i;b+=1)e[b].animation.goToAndStop(u,_,h);}function x(u){var _;for(_=0;_<i;_+=1)e[_].animation.stop(u);}function A(u){var _;for(_=0;_<i;_+=1)e[_].animation.togglePause(u);}function M(u){var _;for(_=i-1;_>=0;_-=1)e[_].animation.destroy(u);}function w(u,_,h){var b=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),T,S=b.length;for(T=0;T<S;T+=1)h&&b[T].setAttribute("data-bm-type",h),o(b[T],u);if(_&&S===0){h||(h="svg");var j=document.getElementsByTagName("body")[0];j.innerText="";var z=_t("div");z.style.width="100%",z.style.height="100%",z.setAttribute("data-bm-type",h),j.appendChild(z),o(z,u);}}function I(){var u;for(u=0;u<i;u+=1)e[u].animation.resize();}function N(){!n&&r&&a&&(window.requestAnimationFrame(c),a=!1);}function V(){n=!0;}function R(){n=!1,N();}function q(u,_){var h;for(h=0;h<i;h+=1)e[h].animation.setVolume(u,_);}function F(u){var _;for(_=0;_<i;_+=1)e[_].animation.mute(u);}function E(u){var _;for(_=0;_<i;_+=1)e[_].animation.unmute(u);}return t.registerAnimation=o,t.loadAnimation=P,t.setSpeed=k,t.setDirection=v,t.play=D,t.pause=p,t.stop=x,t.togglePause=A,t.searchAnimations=w,t.resize=I,t.goToAndStop=d,t.destroy=M,t.freeze=V,t.unfreeze=R,t.setVolume=q,t.mute=F,t.unmute=E,t.getRegisteredAnimations=m,t}(),Ce=function(){var t={};t.getBezierEasing=s;var e={};function s(c,p,d,x,A){var M=A||("bez_"+c+"_"+p+"_"+d+"_"+x).replace(/\./g,"p");if(e[M])return e[M];var w=new y([c,p,d,x]);return e[M]=w,w}var i=4,r=.001,a=1e-7,n=10,l=11,o=1/(l-1),m=typeof Float32Array=="function";function g(c,p){return 1-3*p+3*c}function C(c,p){return 3*p-6*c}function f(c){return 3*c}function P(c,p,d){return ((g(p,d)*c+C(p,d))*c+f(p))*c}function k(c,p,d){return 3*g(p,d)*c*c+2*C(p,d)*c+f(p)}function v(c,p,d,x,A){var M,w,I=0;do w=p+(d-p)/2,M=P(w,x,A)-c,M>0?d=w:p=w;while(Math.abs(M)>a&&++I<n);return w}function D(c,p,d,x){for(var A=0;A<i;++A){var M=k(p,d,x);if(M===0)return p;var w=P(p,d,x)-c;p-=w/M;}return p}function y(c){this._p=c,this._mSampleValues=m?new Float32Array(l):new Array(l),this._precomputed=!1,this.get=this.get.bind(this);}return y.prototype={get:function(c){var p=this._p[0],d=this._p[1],x=this._p[2],A=this._p[3];return this._precomputed||this._precompute(),p===d&&x===A?c:c===0?0:c===1?1:P(this._getTForX(c),d,A)},_precompute:function(){var c=this._p[0],p=this._p[1],d=this._p[2],x=this._p[3];this._precomputed=!0,(c!==p||d!==x)&&this._calcSampleValues();},_calcSampleValues:function(){for(var c=this._p[0],p=this._p[2],d=0;d<l;++d)this._mSampleValues[d]=P(d*o,c,p);},_getTForX:function(c){for(var p=this._p[0],d=this._p[2],x=this._mSampleValues,A=0,M=1,w=l-1;M!==w&&x[M]<=c;++M)A+=o;--M;var I=(c-x[M])/(x[M+1]-x[M]),N=A+I*o,V=k(N,p,d);return V>=r?D(c,N,p,d):V===0?N:v(c,A,A+o,p,d)}},t}(),Os=function(){function t(e){return e.concat(Q(e.length))}return {double:t}}(),qe=function(){return function(t,e,s){var i=0,r=t,a=Q(r),n={newElement:l,release:o};function l(){var m;return i?(i-=1,m=a[i]):m=e(),m}function o(m){i===r&&(a=Os.double(a),r*=2),s&&s(m),a[i]=m,i+=1;}return n}}(),Vs=function(){function t(){return {addedLength:0,percents:at("float32",Ve()),lengths:at("float32",Ve())}}return qe(8,t)}(),Ns=function(){function t(){return {lengths:[],totalLength:0}}function e(s){var i,r=s.lengths.length;for(i=0;i<r;i+=1)Vs.release(s.lengths[i]);s.lengths.length=0;}return qe(8,t,e)}();function Wi(){var t=Math;function e(f,P,k,v,D,y){var c=f*v+P*D+k*y-D*v-y*f-k*P;return c>-.001&&c<.001}function s(f,P,k,v,D,y,c,p,d){if(k===0&&y===0&&d===0)return e(f,P,v,D,c,p);var x=t.sqrt(t.pow(v-f,2)+t.pow(D-P,2)+t.pow(y-k,2)),A=t.sqrt(t.pow(c-f,2)+t.pow(p-P,2)+t.pow(d-k,2)),M=t.sqrt(t.pow(c-v,2)+t.pow(p-D,2)+t.pow(d-y,2)),w;return x>A?x>M?w=x-A-M:w=M-A-x:M>A?w=M-A-x:w=A-x-M,w>-1e-4&&w<1e-4}var i=function(){return function(f,P,k,v){var D=Ve(),y,c,p,d,x,A=0,M,w=[],I=[],N=Vs.newElement();for(p=k.length,y=0;y<D;y+=1){for(x=y/(D-1),M=0,c=0;c<p;c+=1)d=Mt(1-x,3)*f[c]+3*Mt(1-x,2)*x*k[c]+3*(1-x)*Mt(x,2)*v[c]+Mt(x,3)*P[c],w[c]=d,I[c]!==null&&(M+=Mt(w[c]-I[c],2)),I[c]=w[c];M&&(M=As(M),A+=M),N.percents[y]=x,N.lengths[y]=A;}return N.addedLength=A,N}}();function r(f){var P=Ns.newElement(),k=f.c,v=f.v,D=f.o,y=f.i,c,p=f._length,d=P.lengths,x=0;for(c=0;c<p-1;c+=1)d[c]=i(v[c],v[c+1],D[c],y[c+1]),x+=d[c].addedLength;return k&&p&&(d[c]=i(v[c],v[0],D[c],y[0]),x+=d[c].addedLength),P.totalLength=x,P}function a(f){this.segmentLength=0,this.points=new Array(f);}function n(f,P){this.partialLength=f,this.point=P;}var l=function(){var f={};return function(P,k,v,D){var y=(P[0]+"_"+P[1]+"_"+k[0]+"_"+k[1]+"_"+v[0]+"_"+v[1]+"_"+D[0]+"_"+D[1]).replace(/\./g,"p");if(!f[y]){var c=Ve(),p,d,x,A,M,w=0,I,N,V=null;P.length===2&&(P[0]!==k[0]||P[1]!==k[1])&&e(P[0],P[1],k[0],k[1],P[0]+v[0],P[1]+v[1])&&e(P[0],P[1],k[0],k[1],k[0]+D[0],k[1]+D[1])&&(c=2);var R=new a(c);for(x=v.length,p=0;p<c;p+=1){for(N=Q(x),M=p/(c-1),I=0,d=0;d<x;d+=1)A=Mt(1-M,3)*P[d]+3*Mt(1-M,2)*M*(P[d]+v[d])+3*(1-M)*Mt(M,2)*(k[d]+D[d])+Mt(M,3)*k[d],N[d]=A,V!==null&&(I+=Mt(N[d]-V[d],2));I=As(I),w+=I,R.points[p]=new n(I,N),V=N;}R.segmentLength=w,f[y]=R;}return f[y]}}();function o(f,P){var k=P.percents,v=P.lengths,D=k.length,y=ft((D-1)*f),c=f*P.addedLength,p=0;if(y===D-1||y===0||c===v[y])return k[y];for(var d=v[y]>c?-1:1,x=!0;x;)if(v[y]<=c&&v[y+1]>c?(p=(c-v[y])/(v[y+1]-v[y]),x=!1):y+=d,y<0||y>=D-1){if(y===D-1)return k[y];x=!1;}return k[y]+(k[y+1]-k[y])*p}function m(f,P,k,v,D,y){var c=o(D,y),p=1-c,d=t.round((p*p*p*f[0]+(c*p*p+p*c*p+p*p*c)*k[0]+(c*c*p+p*c*c+c*p*c)*v[0]+c*c*c*P[0])*1e3)/1e3,x=t.round((p*p*p*f[1]+(c*p*p+p*c*p+p*p*c)*k[1]+(c*c*p+p*c*c+c*p*c)*v[1]+c*c*c*P[1])*1e3)/1e3;return [d,x]}var g=at("float32",8);function C(f,P,k,v,D,y,c){D<0?D=0:D>1&&(D=1);var p=o(D,c);y=y>1?1:y;var d=o(y,c),x,A=f.length,M=1-p,w=1-d,I=M*M*M,N=p*M*M*3,V=p*p*M*3,R=p*p*p,q=M*M*w,F=p*M*w+M*p*w+M*M*d,E=p*p*w+M*p*d+p*M*d,u=p*p*d,_=M*w*w,h=p*w*w+M*d*w+M*w*d,b=p*d*w+M*d*d+p*w*d,T=p*d*d,S=w*w*w,j=d*w*w+w*d*w+w*w*d,z=d*d*w+w*d*d+d*w*d,X=d*d*d;for(x=0;x<A;x+=1)g[x*4]=t.round((I*f[x]+N*k[x]+V*v[x]+R*P[x])*1e3)/1e3,g[x*4+1]=t.round((q*f[x]+F*k[x]+E*v[x]+u*P[x])*1e3)/1e3,g[x*4+2]=t.round((_*f[x]+h*k[x]+b*v[x]+T*P[x])*1e3)/1e3,g[x*4+3]=t.round((S*f[x]+j*k[x]+z*v[x]+X*P[x])*1e3)/1e3;return g}return {getSegmentsLength:r,getNewSegment:C,getPointInSegment:m,buildBezierData:l,pointOnLine2D:e,pointOnLine3D:s}}var wt=Wi(),ee=is,qs=Math.abs;function Ws(t,e){var s=this.offsetTime,i;this.propType==="multidimensional"&&(i=at("float32",this.pv.length));for(var r=e.lastIndex,a=r,n=this.keyframes.length-1,l=!0,o,m,g;l;){if(o=this.keyframes[a],m=this.keyframes[a+1],a===n-1&&t>=m.t-s){o.h&&(o=m),r=0;break}if(m.t-s>t){r=a;break}a<n-1?a+=1:(r=0,l=!1);}g=this.keyframesMetadata[a]||{};var C,f,P,k,v,D,y=m.t-s,c=o.t-s,p;if(o.to){g.bezierData||(g.bezierData=wt.buildBezierData(o.s,m.s||o.e,o.to,o.ti));var d=g.bezierData;if(t>=y||t<c){var x=t>=y?d.points.length-1:0;for(f=d.points[x].point.length,C=0;C<f;C+=1)i[C]=d.points[x].point[C];}else {g.__fnct?D=g.__fnct:(D=Ce.getBezierEasing(o.o.x,o.o.y,o.i.x,o.i.y,o.n).get,g.__fnct=D),P=D((t-c)/(y-c));var A=d.segmentLength*P,M,w=e.lastFrame<t&&e._lastKeyframeIndex===a?e._lastAddedLength:0;for(v=e.lastFrame<t&&e._lastKeyframeIndex===a?e._lastPoint:0,l=!0,k=d.points.length;l;){if(w+=d.points[v].partialLength,A===0||P===0||v===d.points.length-1){for(f=d.points[v].point.length,C=0;C<f;C+=1)i[C]=d.points[v].point[C];break}else if(A>=w&&A<w+d.points[v+1].partialLength){for(M=(A-w)/d.points[v+1].partialLength,f=d.points[v].point.length,C=0;C<f;C+=1)i[C]=d.points[v].point[C]+(d.points[v+1].point[C]-d.points[v].point[C])*M;break}v<k-1?v+=1:l=!1;}e._lastPoint=v,e._lastAddedLength=w-d.points[v].partialLength,e._lastKeyframeIndex=a;}}else {var I,N,V,R,q;if(n=o.s.length,p=m.s||o.e,this.sh&&o.h!==1)if(t>=y)i[0]=p[0],i[1]=p[1],i[2]=p[2];else if(t<=c)i[0]=o.s[0],i[1]=o.s[1],i[2]=o.s[2];else {var F=Bs(o.s),E=Bs(p),u=(t-c)/(y-c);ji(i,Bi(F,E,u));}else for(a=0;a<n;a+=1)o.h!==1&&(t>=y?P=1:t<c?P=0:(o.o.x.constructor===Array?(g.__fnct||(g.__fnct=[]),g.__fnct[a]?D=g.__fnct[a]:(I=o.o.x[a]===void 0?o.o.x[0]:o.o.x[a],N=o.o.y[a]===void 0?o.o.y[0]:o.o.y[a],V=o.i.x[a]===void 0?o.i.x[0]:o.i.x[a],R=o.i.y[a]===void 0?o.i.y[0]:o.i.y[a],D=Ce.getBezierEasing(I,N,V,R).get,g.__fnct[a]=D)):g.__fnct?D=g.__fnct:(I=o.o.x,N=o.o.y,V=o.i.x,R=o.i.y,D=Ce.getBezierEasing(I,N,V,R).get,o.keyframeMetadata=D),P=D((t-c)/(y-c)))),p=m.s||o.e,q=o.h===1?o.s[a]:o.s[a]+(p[a]-o.s[a])*P,this.propType==="multidimensional"?i[a]=q:i=q;}return e.lastIndex=r,i}function Bi(t,e,s){var i=[],r=t[0],a=t[1],n=t[2],l=t[3],o=e[0],m=e[1],g=e[2],C=e[3],f,P,k,v,D;return P=r*o+a*m+n*g+l*C,P<0&&(P=-P,o=-o,m=-m,g=-g,C=-C),1-P>1e-6?(f=Math.acos(P),k=Math.sin(f),v=Math.sin((1-s)*f)/k,D=Math.sin(s*f)/k):(v=1-s,D=s),i[0]=v*r+D*o,i[1]=v*a+D*m,i[2]=v*n+D*g,i[3]=v*l+D*C,i}function ji(t,e){var s=e[0],i=e[1],r=e[2],a=e[3],n=Math.atan2(2*i*a-2*s*r,1-2*i*i-2*r*r),l=Math.asin(2*s*i+2*r*a),o=Math.atan2(2*s*a-2*i*r,1-2*s*s-2*r*r);t[0]=n/Z,t[1]=l/Z,t[2]=o/Z;}function Bs(t){var e=t[0]*Z,s=t[1]*Z,i=t[2]*Z,r=Math.cos(e/2),a=Math.cos(s/2),n=Math.cos(i/2),l=Math.sin(e/2),o=Math.sin(s/2),m=Math.sin(i/2),g=r*a*n-l*o*m,C=l*o*n+r*a*m,f=l*a*n+r*o*m,P=r*o*n-l*a*m;return [C,f,P,g]}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!==ee&&(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 We(t){var e;if(this.propType==="unidimensional")e=t*this.mult,qs(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,qs(this.v[s]-e)>1e-5&&(this.v[s]=e,this._mdf=!0),s+=1;}function Be(){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 je(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this);}function Yi(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=Be,this.setVValue=We,this.addEffect=je;}function Ji(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 r,a=e.k.length;for(this.v=at("float32",a),this.pv=at("float32",a),this.vel=at("float32",a),r=0;r<a;r+=1)this.v[r]=e.k[r]*this.mult,this.pv[r]=e.k[r];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=Be,this.setVValue=We,this.addEffect=je;}function Xi(t,e,s,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:ee,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=ee,this.pv=ee,this._isFirstFrame=!0,this.getValue=Be,this.setVValue=We,this.interpolateValue=Ws,this.effectsSequence=[js.bind(this)],this.addEffect=je;}function Gi(t,e,s,i){this.propType="multidimensional";var r,a=e.k.length,n,l,o,m;for(r=0;r<a-1;r+=1)e.k[r].to&&e.k[r].s&&e.k[r+1]&&e.k[r+1].s&&(n=e.k[r].s,l=e.k[r+1].s,o=e.k[r].to,m=e.k[r].ti,(n.length===2&&!(n[0]===l[0]&&n[1]===l[1])&&wt.pointOnLine2D(n[0],n[1],l[0],l[1],n[0]+o[0],n[1]+o[1])&&wt.pointOnLine2D(n[0],n[1],l[0],l[1],l[0]+m[0],l[1]+m[1])||n.length===3&&!(n[0]===l[0]&&n[1]===l[1]&&n[2]===l[2])&&wt.pointOnLine3D(n[0],n[1],n[2],l[0],l[1],l[2],n[0]+o[0],n[1]+o[1],n[2]+o[2])&&wt.pointOnLine3D(n[0],n[1],n[2],l[0],l[1],l[2],l[0]+m[0],l[1]+m[1],l[2]+m[2]))&&(e.k[r].to=null,e.k[r].ti=null),n[0]===l[0]&&n[1]===l[1]&&o[0]===0&&o[1]===0&&m[0]===0&&m[1]===0&&(n.length===2||n[2]===l[2]&&o[2]===0&&m[2]===0)&&(e.k[r].to=null,e.k[r].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=Be,this.setVValue=We,this.interpolateValue=Ws,this.frameId=-1;var g=e.k[0].s.length;for(this.v=at("float32",g),this.pv=at("float32",g),r=0;r<g;r+=1)this.v[r]=ee,this.pv[r]=ee;this._caching={lastFrame:ee,lastIndex:0,value:at("float32",g)},this.addEffect=je;}var L=function(){function t(s,i,r,a,n){i.sid&&(i=s.globalData.slotManager.getProp(i));var l;if(!i.k.length)l=new Yi(s,i,a,n);else if(typeof i.k[0]=="number")l=new Ji(s,i,a,n);else switch(r){case 0:l=new Xi(s,i,a,n);break;case 1:l=new Gi(s,i,a,n);break}return l.effectsSequence.length&&n.addDynamicProperty(l),l}var e={getProp:t};return e}();function ht(){}ht.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 se=function(){function t(){return at("float32",2)}return qe(8,t)}();function Nt(){this.c=!1,this._length=0,this._maxLength=8,this.v=Q(this._maxLength),this.o=Q(this._maxLength),this.i=Q(this._maxLength);}Nt.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var s=0;s<e;)this.v[s]=se.newElement(),this.o[s]=se.newElement(),this.i[s]=se.newElement(),s+=1;},Nt.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t;},Nt.prototype.doubleArrayLength=function(){this.v=this.v.concat(Q(this._maxLength)),this.i=this.i.concat(Q(this._maxLength)),this.o=this.o.concat(Q(this._maxLength)),this._maxLength*=2;},Nt.prototype.setXYAt=function(t,e,s,i,r){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[i]||a[i]&&!r)&&(a[i]=se.newElement()),a[i][0]=t,a[i][1]=e;},Nt.prototype.setTripleAt=function(t,e,s,i,r,a,n,l){this.setXYAt(t,e,"v",n,l),this.setXYAt(s,i,"o",n,l),this.setXYAt(r,a,"i",n,l);},Nt.prototype.reverse=function(){var t=new Nt;t.setPathData(this.c,this._length);var e=this.v,s=this.o,i=this.i,r=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),r=1);var a=this._length-1,n=this._length,l;for(l=r;l<n;l+=1)t.setTripleAt(e[a][0],e[a][1],i[a][0],i[a][1],s[a][0],s[a][1],l,!1),a-=1;return t},Nt.prototype.length=function(){return this._length};var ct=function(){function t(){return new Nt}function e(r){var a=r._length,n;for(n=0;n<a;n+=1)se.release(r.v[n]),se.release(r.i[n]),se.release(r.o[n]),r.v[n]=null,r.i[n]=null,r.o[n]=null;r._length=0,r.c=!1;}function s(r){var a=i.newElement(),n,l=r._length===void 0?r.v.length:r._length;for(a.setLength(l),a.c=r.c,n=0;n<l;n+=1)a.setTripleAt(r.v[n][0],r.v[n][1],r.o[n][0],r.o[n][1],r.i[n][0],r.i[n][1],n);return a}var i=qe(4,t,e);return i.clone=s,i}();function os(){this._length=0,this._maxLength=4,this.shapes=Q(this._maxLength);}os.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(Q(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1;},os.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)ct.release(this.shapes[t]);this._length=0;};var le=function(){var t={newShapeCollection:r,release:a},e=0,s=4,i=Q(s);function r(){var n;return e?(e-=1,n=i[e]):n=new os,n}function a(n){var l,o=n._length;for(l=0;l<o;l+=1)ct.release(n.shapes[l]);n._length=0,e===s&&(i=Os.double(i),s*=2),i[e]=n,e+=1;}return t}(),pe=function(){var t=-999999;function e(y,c,p){var d=p.lastIndex,x,A,M,w,I,N,V,R,q,F=this.keyframes;if(y<F[0].t-this.offsetTime)x=F[0].s[0],M=!0,d=0;else if(y>=F[F.length-1].t-this.offsetTime)x=F[F.length-1].s?F[F.length-1].s[0]:F[F.length-2].e[0],M=!0;else {for(var E=d,u=F.length-1,_=!0,h,b,T;_&&(h=F[E],b=F[E+1],!(b.t-this.offsetTime>y));)E<u-1?E+=1:_=!1;if(T=this.keyframesMetadata[E]||{},M=h.h===1,d=E,!M){if(y>=b.t-this.offsetTime)R=1;else if(y<h.t-this.offsetTime)R=0;else {var S;T.__fnct?S=T.__fnct:(S=Ce.getBezierEasing(h.o.x,h.o.y,h.i.x,h.i.y).get,T.__fnct=S),R=S((y-(h.t-this.offsetTime))/(b.t-this.offsetTime-(h.t-this.offsetTime)));}A=b.s?b.s[0]:h.e[0];}x=h.s[0];}for(N=c._length,V=x.i[0].length,p.lastIndex=d,w=0;w<N;w+=1)for(I=0;I<V;I+=1)q=M?x.i[w][I]:x.i[w][I]+(A.i[w][I]-x.i[w][I])*R,c.i[w][I]=q,q=M?x.o[w][I]:x.o[w][I]+(A.o[w][I]-x.o[w][I])*R,c.o[w][I]=q,q=M?x.v[w][I]:x.v[w][I]+(A.v[w][I]-x.v[w][I])*R,c.v[w][I]=q;}function s(){var y=this.comp.renderedFrame-this.offsetTime,c=this.keyframes[0].t-this.offsetTime,p=this.keyframes[this.keyframes.length-1].t-this.offsetTime,d=this._caching.lastFrame;return d!==t&&(d<c&&y<c||d>p&&y>p)||(this._caching.lastIndex=d<y?this._caching.lastIndex:0,this.interpolateShape(y,this.pv,this._caching)),this._caching.lastFrame=y,this.pv}function i(){this.paths=this.localShapeCollection;}function r(y,c){if(y._length!==c._length||y.c!==c.c)return !1;var p,d=y._length;for(p=0;p<d;p+=1)if(y.v[p][0]!==c.v[p][0]||y.v[p][1]!==c.v[p][1]||y.o[p][0]!==c.o[p][0]||y.o[p][1]!==c.o[p][1]||y.i[p][0]!==c.i[p][0]||y.i[p][1]!==c.i[p][1])return !1;return !0}function a(y){r(this.v,y)||(this.v=ct.clone(y),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection);}function n(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var y;this.kf?y=this.pv:this.data.ks?y=this.data.ks.k:y=this.data.pt.k;var c,p=this.effectsSequence.length;for(c=0;c<p;c+=1)y=this.effectsSequence[c](y);this.setVValue(