@aarsteinmedia/dotlottie-player 6.4.2 → 6.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,13 +3,13 @@
3
3
  `,t),Error(`${this.constructor.name}: Could not set data`)}}setDirection(t,e){e&&this.name!==e||(this.playDirection=t<0?-1:1,this.updateFrameModifier())}setLoop(t){this.loop=t}setParams(t){try{var s,i,r;let a;(t.wrapper||t.container)&&(this.wrapper=t.wrapper??t.container??null);let n=tr.SVG;switch(t.animType?n=t.animType:t.renderer&&(n=t.renderer),n){case tr.SVG:this.renderer=new sR(this,t.rendererSettings);break;case tr.Canvas:this.renderer=new sG(this,t.rendererSettings);break;case tr.HTML:this.renderer=new s7(this,t.rendererSettings);break;default:throw Error(`Unknown renderer type: ${n}`)}if(this.imagePreloader.setCacheType(n,this.renderer.globalData?.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=n,["",null,void 0,!0,1].includes(t.loop)?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(`${t.loop}`,10),this.autoplay=!("autoplay"in t)||!!t.autoplay,this.name=t.name??"",this.autoloadSegments=!!(!Object.hasOwn(t,"autoloadSegments")||t.autoloadSegments),this.assetsPath=t.assetsPath??this.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData)return void this.setupAnimation(t.animationData);if(!t.path)return;t.path.includes("\\")?this.path=t.path.slice(0,Math.max(0,t.path.lastIndexOf("\\")+1)):this.path=t.path.slice(0,Math.max(0,t.path.lastIndexOf("/")+1)),this.fileName=t.path.slice(Math.max(0,t.path.lastIndexOf("/")+1)),this.fileName=this.fileName.slice(0,Math.max(0,this.fileName.lastIndexOf(".json"))),s=t.path,i=this.configAnimation,r=this.onSetupError,iS(),a=iC(i,r),e?.postMessage({fullPath:v?s:window.location.origin+window.location.pathname,id:a,path:s,type:"loadAnimation"})}catch(t){throw k(`${this.constructor.name}:
4
4
  `,t),Error(`${this.constructor.name}: Could not set params`)}}setSegment(t,e){let 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,-1!==s&&this.goToAndStop(s,!0)}setSpeed(t,e){e&&this.name!==e||(this.playSpeed=t,this.updateFrameModifier())}setSubframe(t=!1){this.isSubframeEnabled=t}setupAnimation(t){iM(t,this.configAnimation)}setVolume(t,e){e&&this.name!==e||this.audioController.setVolume(t)}show(){this.renderer.show()}stop(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))}togglePause(t){t&&this.name!==t||(this.isPaused?this.play():this.pause())}trigger(t){try{if(!this._cbs[t])return;switch(t){case ts.EnterFrame:{let e=this.enterFrameEvent;e.type=t,e.currentTime=this.currentFrame,e.totalTime=this.totalFrames,e.direction=this.frameModifier<0?-1:1,this.triggerEvent(t,e);let s=this.enterFrameLegacyEvent;s.type=t,s.currentTime=this.currentFrame,s.totalTime=this.totalFrames,s.direction=this.frameMult<0?-1:1,this.onEnterFrame?.(s);break}case ts.DrawnFrame:{let e=this.drawnFrameEvent;e.type=t,e.currentTime=this.currentFrame,e.direction=this.frameModifier<0?-1:1,e.totalTime=this.totalFrames,this.triggerEvent(t,e);break}case ts.LoopComplete:this.triggerEvent(t,new sJ(t,Number(this.loop),this.playCount,this.frameMult)),this.onLoopComplete?.(new sJ(t,this.loop,this.playCount,this.frameMult));break;case ts.Complete:this.triggerEvent(t,new sW(t,this.frameMult)),this.onComplete?.(new sW(t,this.frameMult));break;case ts.SegmentStart:this.triggerEvent(t,new sU(t,this.firstFrame,this.totalFrames)),this.onSegmentStart?.(new sU(t,this.firstFrame,this.totalFrames));break;case ts.Destroy:this.triggerEvent(t,new sX(t,this)),this.onDestroy?.(new sX(t,this));break;default:this.triggerEvent(t)}}catch(t){k(`${this.constructor.name}:
5
5
  `,t)}}triggerConfigError(t){let e=new sK(t,this.currentFrame);this.triggerEvent(ts.Error,e),this.onError?.(e)}triggerRenderFrameError(t){let e=new sZ(t,this.currentFrame);this.triggerEvent(ts.Error,e),this.onError?.(e)}unmute(t){t&&this.name!==t||this.audioController.unmute()}updateDocumentData(t,e,s){try{let i=this.renderer.getElementByPath(t);i?.updateDocumentData([],e,s)}catch(t){k(this.constructor.name,t)}}updateFrameModifier(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)}waitForFontsLoaded(){this.renderer.globalData?.fontManager?.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20)}}let iF=!1,i$=!0,iI=0,iN=0,iB=0,iz=[];function iR(t){try{let e=new iL;return iY(e,null),e.setParams(t),e}catch(t){throw k("AnimationManager:\n",t),Error("Could not load animation",{cause:t})}}function iO(t,e){try{if(!t)return null;let s=0;for(;s<iN;){if(iz[s]?.elem===t&&iz[s]?.elem!==null)return iz[s]?.animation;s++}let i=new iL;return iY(i,t),i.setData(t,e),i}catch(t){throw k("AnimationManager:\n",t),Error("Could not register animation")}}function iV(t,e,s){if(v)return;let i=[...document.getElementsByClassName("lottie"),...document.getElementsByClassName("bodymovin")],{length:r}=i;for(let e=0;e<r;e++)iO(i[e],t)}function iq(){!iF&&iB&&i$&&!v&&(requestAnimationFrame(iG),i$=!1)}function iH(){iB++,iq()}function iG(t){iI=t,v||requestAnimationFrame(iW)}function ij({target:t}){let e=0;if(!t)throw Error("No animation to remove");for(;e<iN;)iz[e]?.animation===t&&(iz.splice(e,1),e--,iN-=1,t.isPaused||iJ()),e++}function iW(t){let e=t-iI;for(let t=0;t<iN;t++)iz[t].animation.advanceTime(e);iI=t,!iB||iF||i$?i$=!0:v||requestAnimationFrame(iW)}function iY(t,e){t.addEventListener(ts.Destroy,ij),t.addEventListener(ts.Active,iH),t.addEventListener(ts.Idle,iJ),iz.push({animation:t,elem:e}),iN++}function iJ(){iB--}let iU=(t,e,s,i)=>[-t+3*e-3*s+i,3*t-6*e+3*s,-3*t+3*e,t],iX=(t,e,s)=>t*(1-s)+e*s,iZ=(t,e,s)=>[iX(t[0],e[0],s),iX(t[1],e[1],s)],iK=(t,e,s)=>{let i=t.boundingBox();return{bez:t,cx:i.cx,cy:i.cy,height:i.height,t:(e+s)/2,t1:e,t2:s,width:i.width}},iQ=t=>{let e=t.bez.split(.5);if(!e[0]||!e[1])throw Error("Could not set PolynomialBezier");return[iK(e[0],t.t1,t.t),iK(e[1],t.t,t.t2)]},i0=(t,e,s,i,r,a)=>{if(!(2*Math.abs(t.cx-e.cx)<t.width+e.width&&2*Math.abs(t.cy-e.cy)<t.height+e.height))return;if(s>=a||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i)return void r.push([t.t,e.t]);let n=iQ(t),o=iQ(e);if(!n[0]||!n[1]||!o[0]||!o[1])throw Error("Could not set IntersectData");i0(n[0],o[0],s+1,i,r,a),i0(n[0],o[1],s+1,i,r,a),i0(n[1],o[0],s+1,i,r,a),i0(n[1],o[1],s+1,i,r,a)},i1=t=>new i2(t,t,t,t,!1);class i2{constructor(t,e,s,i,r){let a=e,n=s;r&&S(t,a)&&(a=iZ(t,i,1/3)),r&&S(n,i)&&(n=iZ(t,i,2/3));const o=iU(t[0],a[0],n[0],i[0]),h=iU(t[1],a[1],n[1],i[1]);this.a=[o[0],h[0]],this.b=[o[1],h[1]],this.c=[o[2],h[2]],this.d=[o[3],h[3]],this.points=[t,a,n,i]}boundingBox(){let t=this.bounds();return{bottom:t.y.max,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2,height:t.y.max-t.y.min,left:t.x.min,right:t.x.max,top:t.y.min,width:t.x.max-t.x.min}}bounds(){return{x:this._extrema(this,0),y:this._extrema(this,1)}}derivative(t){return[(3*t*this.a[0]+2*this.b[0])*t+this.c[0],(3*t*this.a[1]+2*this.b[1])*t+this.c[1]]}inflectionPoints(){let t=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(E(t))return[];let e=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/t,s=e*e-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/t;if(s<0)return[];let i=Math.sqrt(s);return E(i)?i>0&&i<1?[e]:[]:[e-i,e+i].filter(t=>t>0&&t<1)}intersections(t,e,s){let i=e,r=s;i=i??2,r=r??7;let a=[];return i0(iK(this,0,1),iK(t,0,1),0,i,a,r),a}normalAngle(t){let e=this.derivative(t);return Math.atan2(e[0]??0,e[1]??0)}point(t){return[((this.a[0]*t+this.b[0])*t+this.c[0])*t+this.d[0],((this.a[1]*t+this.b[1])*t+this.c[1])*t+this.d[1]]}split(t){if(t<=0)return[i1(this.points[0]),this];if(t>=1)return[this,i1(this.points[this.points.length-1])];let e=iZ(this.points[0],this.points[1],t),s=iZ(this.points[1],this.points[2],t),i=iZ(this.points[2],this.points[3],t),r=iZ(e,s,t),a=iZ(s,i,t),n=iZ(r,a,t);return[new i2(this.points[0],e,r,n,!0),new i2(n,a,i,this.points[3],!0)]}tangentAngle(t){let e=this.derivative(t);return Math.atan2(e[1]??0,e[0]??0)}_extrema(t,e){let s=t.points[0][e]??0,i=t.points[t.points.length-1]?.[e]??0;if(s>i){let t=i;i=s,s=t}let r=((t,e,s)=>{if(0===t)return[];let i=e*e-4*t*s;if(i<0)return[];let r=-e/(2*t);if(0===i)return[r];let a=Math.sqrt(i)/(2*t);return[r-a,r+a]})(3*(t.a[e]??0),2*(t.b[e]??0),t.c[e]??0),{length:a}=r;for(let n=0;n<a;n++){if((r[n]??0)<=0||(r[n]??0)>=1)continue;let a=t.point(r[n]??0)[e]??0;if(a<s){s=a;continue}a>i&&(i=a)}return{max:i,min:s}}}function i3(t,e){let s=(e+1)%t.length();return new i2(t.v[e],t.o[e],t.i[s],t.v[s],!0)}class i5 extends tG{addShape(t){if(this.closed)return;t.sh?.container?.addDynamicProperty(t.sh);let e={data:t,localShapeCollection:t6(),shape:t.sh};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}addShapeToModifier(t){}init(t,e,s,i){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=-999999,this.closed=!1,this.k=!1,this.dynamicProperties.length>0?this.k=!0:this.getValue(!0)}initModifierProperties(t,e){throw Error(`${this.constructor.name}: Method initModifierProperties is not implemented`)}isAnimatedWithShape(t){throw Error(`${this.constructor.name}: Method isAnimatedWithShape is not implemented`)}processKeys(){return this.elem?.globalData?.frameId===this.frameId||(this.frameId=this.elem?.globalData?.frameId,this.iterateDynamicProperties()),0}constructor(...t){super(...t),this.shapes=[]}}let i4=(t,e)=>[(t[1]??0)*(e[2]??0)-(t[2]??0)*(e[1]??0),(t[2]??0)*(e[0]??0)-(t[0]??0)*(e[2]??0),(t[0]??0)*(e[1]??0)-(t[1]??0)*(e[0]??0)],i6=(t,e,s)=>[t[0]+Math.cos(e)*s,t[1]-Math.sin(e)*s],i8=(t,e,s)=>{let i=Math.atan2(e[0]-t[0],e[1]-t[1]);return[i6(t,i,s),i6(e,i,s)]},i9=(t,e,s,i)=>{let r=[t[0],t[1],1],a=[e[0],e[1],1],n=[s[0],s[1],1],o=[i[0],i[1],1],h=i4(i4(r,a),i4(n,o));return E(h[2]??0)?null:[(h[0]??0)/(h[2]??0),(h[1]??0)/(h[2]??0)]},i7=(t,e)=>Math.hypot(t[0]-e[0],t[1]-e[1]),rt=(t,e,s,i,r)=>{let a=e.points[3],n=s.points[0];if(3===i||S(a,n))return a;if(2===i){let i=-e.tangentAngle(1),r=-s.tangentAngle(0)+Math.PI,o=i9(a,i6(a,i+Math.PI/2,100),n,i6(n,i+Math.PI/2,100)),h=o?i7(o,a):i7(a,n)/2,l=i6(a,i,2*h*.5519);return t.setXYAt(l[0],l[1],"o",t.length()-1),l=i6(n,r,2*h*.5519),t.setTripleAt(n[0],n[1],n[0],n[1],l[0],l[1],t.length()),n}let o=S(a,e.points[2])?e.points[0]:e.points[2],h=S(n,s.points[1])?s.points[3]:s.points[1],l=i9(o,a,n,h);return l&&i7(l,a)<r?(t.setTripleAt(l[0],l[1],l[0],l[1],l[0],l[1],t.length()),l):a},re=(t,e)=>{let s,i=(s=i8(t.points[0],t.points[1],e))[0],r=s[1],a=(s=i8(t.points[1],t.points[2],e))[0],n=s[1],o=(s=i8(t.points[2],t.points[3],e))[0],h=s[1],l=i9(i,r,a,n);l=l??r;let m=i9(o,h,a,n);return new i2(i,l,m=m??o,h)},rs=(t,e)=>{let s,i,r,a=t.inflectionPoints();if(0===a.length)return[re(t,e)];if(1===a.length||_(a[1]??0,1))return s=(r=t.split(a[0]??0))[0],i=r[1],[re(s,e),re(i,e)];s=(r=t.split(a[0]??0))[0];let n=((a[1]??0)-(a[0]??0))/(1-(a[0]??0)),o=(r=r[1]?.split(n))[0];return i=r[1],[re(s,e),re(o,e),re(i,e)]},ri=(t,e)=>{let s=t.intersections(e);return(s.length>0&&_(s[0]?.[0]??0,1)&&s.shift(),s.length>0)?s[0]:null},rr=(t,e)=>{let s=[...t],i=[...e],r=ri(t[t.length-1],e[0]);return(r&&(s[t.length-1]=t[t.length-1]?.split(r[0]??0)[0],i[0]=e[0]?.split(r[1]??0)[1]),t.length>1&&e.length>1&&(r=ri(t[0],e[e.length-1])))?[[t[0]?.split(r[0]??0)[0]],[e[e.length-1]?.split(r[1]??0)[1]]]:[s,i]};class ra extends i5{initModifierProperties(t,e){this.getValue=this.processKeys,this.amount=tK.getProp(t,e.a,0,null,this),this.miterLimit=tK.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length>0}processPath(t,e,s,i){let r=t2();r.c=t.c;let a=t.length();t.c||(a-=1);let n,o=[];for(let s=0;s<a;s++)n=i3(t,s),o.push(rs(n,e));if(!t.c)for(let s=a-1;s>=0;s--)n=function(t,e){let s=(e+1)%t.length();return new i2(t.v[s],t.i[s],t.o[e],t.v[e],!0)}(t,s),o.push(rs(n,e));o=(t=>{let e;for(let s=1;s<t.length;s++)e=rr(t[s-1],t[s]),t[s-1]=e[0],t[s]=e[1];return t.length>1&&(e=rr(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t})(o);let h=null,l=null,{length:m}=o;for(let t=0;t<m;t++){let e=o[t];l&&(h=rt(r,l,e[0],s,i)),l=e[e.length-1];let{length:a}=e;for(let t=0;t<a;t++)n=e[t],h&&S(n.points[0],h)?r.setXYAt(n.points[1][0],n.points[1][1],"o",r.length()-1):r.setTripleAt(n.points[0][0],n.points[0][1],n.points[1][0],n.points[1][1],n.points[0][0],n.points[0][1],r.length()),r.setTripleAt(n.points[3][0],n.points[3][1],n.points[3][0],n.points[3][1],n.points[2][0],n.points[2][1],r.length()),h=n.points[3]}return m>0&&l&&rt(r,l,o[0]?.[0],s,i),r}processShapes(t){let{length:e}=this.shapes,s=Number(this.amount?.v),i=Number(this.miterLimit?.v),r=Number(this.lineJoin);if(0!==s){let a,n,o;for(let h=0;h<e;h++){if(o=(n=this.shapes[h]).localShapeCollection,!(!n.shape?._mdf&&!this._mdf&&!t)){o?.releaseShapes(),n.shape&&(n.shape._mdf=!0),a=n.shape?.paths?.shapes;let t=n.shape?.paths?._length||0;for(let e=0;e<t;e++){let t=a?.[e];t&&o?.addShape(this.processPath(t,s,r,i))}}n.shape&&(n.shape.paths=n.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}class rn extends i5{initModifierProperties(t,e){this.getValue=this.processKeys,this.amount=tK.getProp(t,e.a,0,null,this),this._isAnimated=this.amount.effectsSequence.length>0}processPath(t,e){let s,i,r,a,n,o,h,l=e/100,m=[0,0],p=t._length;for(s=0;s<p;s++)m[0]+=t.v[s]?.[0]??0,m[1]+=t.v[s]?.[1]??0;m[0]/=p,m[1]/=p;let c=t2();for(c.c=t.c,s=0;s<p;s++)i=(t.v[s]?.[0]??0)+((m[0]??0)-(t.v[s]?.[0]??0))*l,r=(t.v[s]?.[1]??0)+((m[1]??0)-(t.v[s]?.[1]??0))*l,a=(t.o[s]?.[0]??0)+-(((m[0]??0)-(t.o[s]?.[0]??0))*l),n=(t.o[s]?.[1]??0)+-(((m[1]??0)-(t.o[s]?.[1]??0))*l),o=(t.i[s]?.[0]??0)+-(((m[0]??0)-(t.i[s]?.[0]??0))*l),h=(t.i[s]?.[1]??0)+-(((m[1]??0)-(t.i[s]?.[1]??0))*l),c.setTripleAt(i,r,a,n,o,h,s);return c}processShapes(t){let{length:e}=this.shapes,s=this.amount?.v;if(0!==s){let i,r,a;for(let n=0;n<e;n++){if(a=(r=this.shapes[n]).localShapeCollection,!(!r.shape?._mdf&&!this._mdf&&!t)){a?.releaseShapes(),r.shape&&(r.shape._mdf=!0),i=r.shape?.paths?.shapes;let t=r.shape?.paths?._length||0;for(let e=0;e<t;e++){let t=i?.[e];t&&a?.addShape(this.processPath(t,s||0))}}r.localShapeCollection&&r.shape&&(r.shape.paths=r.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}class ro extends i5{addShapeToModifier(t){t.pathsData=[]}applyTransforms(t,e,s,i,r,a){if(!i.s||!i.p||!i.a||!i.r)throw Error(`${this.constructor.name}: Missing required data from Transform`);let n=a?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-r),h=i.s.v[1]+(1-i.s.v[1])*(1-r);t.translate(i.p.v[0]*n*r,i.p.v[1]*n*r,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*n*r),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),s.translate(-(i.a.v[0]??0),-(i.a.v[1]??0),i.a.v[2]),s.scale(a?1/o:o,a?1/h:h),s.translate(i.a.v[0],i.a.v[1],i.a.v[2])}changeGroupRender(t,e=!1){let{length:s}=t;for(let i=0;i<s;i++)t[i]._shouldRender=e,t[i]?.ty===ta.Group&&this.changeGroupRender(t[i]?.it,e)}cloneElements(t){let e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e}init(t,e,s,i=[]){if(!F(e))throw TypeError(`${this.constructor.name}: Method init, param arr must be array`);let r=Number(s);for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r--,this._elements.unshift(e[r]);if(this.dynamicProperties.length>0){this.k=!0;return}this.getValue(!0)}initModifierProperties(t,e){this.getValue=this.processKeys,this.c=tK.getProp(t,e.c,0,null,this),this.o=tK.getProp(t,e.o,0,null,this),e.tr&&(this.tr=e_(t,e.tr,this),this.so=tK.getProp(t,e.tr.so,0,.01,this),this.eo=tK.getProp(t,e.tr.eo,0,.01,this)),this.data=e,0===this.dynamicProperties.length&&this.getValue(!0),this._isAnimated=this.dynamicProperties.length>0,this.pMatrix=new tc,this.rMatrix=new tc,this.sMatrix=new tc,this.tMatrix=new tc,this.matrix=new tc}processShapes(t){let e,s;if(!this.data)throw Error(`${this.constructor.name}: data (Shape) is not implemented`);let i,r,a,n,o,h=!1;if(!this._mdf&&!t){for(o=Number(this._currentCopies),a=0,n=1;o;)(i=this.elemsData[a]?.it??[])[i.length-1].transform.mProps._mdf=!1,i[i.length-1].transform.op._mdf=!1,o--,a+=n;return h}let l=Math.ceil(Number(this.c?.v));if(this._groups.length<l){for(;this._groups.length<l;){let t={it:this.cloneElements(this._elements),ty:"gr"};t.it?.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{e:0,s:0,t:0},{e:0,s:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:ta.Transform}),this.arr.splice(0,0,t),this._groups.splice(0,0,t),this._currentCopies?this._currentCopies++:this._currentCopies=1}this.elem?.reloadShapes(),h=!0}o=0;let m=this._groups.length-1;for(a=0;a<=m-1;a++){if(e=o<l,this._groups[a]&&(this._groups[a]._shouldRender=e),this.changeGroupRender(this._groups[a]?.it??[],e),!e){let t=this.elemsData[a]?.it??[],e=t[t.length-1];0===e.transform.op.v?e.transform.op._mdf=!1:(e.transform.op._mdf=!0,e.transform.op.v=0)}o++}if(this._currentCopies=l,!this.matrix||!this.pMatrix||!this.rMatrix||!this.sMatrix||!this.tMatrix)throw Error(`${this.constructor.name}: Could not set Matrix`);if(!this.tr)throw Error(`${this.constructor.name}: Transformproperty is not set`);let p=Number(this.o?.v),c=p%1,d=p>0?Math.floor(p):Math.ceil(p),u=this.pMatrix.props,f=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();let y=0;if(p>0){for(;y<d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),y++;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,c,!1),y+=c)}else if(p<0){for(;y>d;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),y--;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),y-=c)}for(a=1===this.data.m?0:this._currentCopies-1,n=1===this.data.m?1:-1,o=this._currentCopies;o;){i=this.elemsData[a]?.it??[];let{length:t}=r=i[i.length-1]?.transform.mProps.v.props??[];if(i[i.length-1]&&(i[i.length-1].transform.mProps._mdf=!0,i[i.length-1].transform.op._mdf=!0,i[i.length-1].transform.op.v=1===this._currentCopies?Number(this.so?.v):Number(this.so?.v)+(Number(this.eo?.v)-Number(this.so?.v))*(a/(this._currentCopies-1))),0===y)for(this.matrix.reset(),s=0;s<t;s++)r[s]=this.matrix.props[s]??0;else{for((0!==a&&1===n||a!==this._currentCopies-1&&-1===n)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),s=0;s<t;s++)r[s]=this.matrix.props[s]??0;this.matrix.reset()}y++,o--,a+=n}return h}resetElements(t){let{length:e}=t;for(let s=0;s<e;s++){t[s]._processed=!1;let{it:e}=t[s]??{};t[s]?.ty===ta.Group&&e&&this.resetElements(e)}}constructor(...t){super(...t),this.arr=[],this.data=void 0,this.elemsData=[],this._elements=[],this._groups=[]}}class rh extends i5{initModifierProperties(t,e){this.getValue=this.processKeys,this.rd=tK.getProp(t,e.r,0,null,this),this._isAnimated=this.rd.effectsSequence.length>0}processPath(t,e){let s=t2();s.c=t.c;let i=t._length,r,a,n,o,h,l,m=0,p,c,d,u,f,g;for(let y=0;y<i;y++)r=t.v[y],n=t.o[y],a=t.i[y],r[0]===n[0]&&r[1]===n[1]&&r[0]===a[0]&&r[1]===a[1]?0!==y&&y!==i-1||t.c?(o=0===y?t.v[i-1]:t.v[y-1],l=(h=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=f=r[0]+(o[0]-r[0])*l,c=g=r[1]-(r[1]-o[1])*l,d=p-(p-r[0])*.5519,u=c-(c-r[1])*.5519,s.setTripleAt(p,c,d,u,f,g,m),m++,o=y===i-1?t.v[0]:t.v[y+1],l=(h=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(h/2,e)/h:0,p=d=r[0]+(o[0]-r[0])*l,c=u=r[1]+(o[1]-r[1])*l,f=p-(p-r[0])*.5519,g=c-(c-r[1])*.5519,s.setTripleAt(p,c,d,u,f,g,m)):s.setTripleAt(r[0],r[1],n[0],n[1],a[0],a[1],m):s.setTripleAt(t.v[y]?.[0]??0,t.v[y]?.[1]??0,t.o[y]?.[0]??0,t.o[y]?.[1]??0,t.i[y]?.[0]??0,t.i[y]?.[1]??0,m),m++;return s}processShapes(t){let{length:e}=this.shapes,s=this.rd?.v;if(0!==s){let i,r,a;for(let n=0;n<e;n++){if(a=(i=this.shapes[n]).localShapeCollection,!(!i.shape?._mdf&&!this._mdf&&!t)){a?.releaseShapes(),i.shape&&(i.shape._mdf=!0),r=i.shape?.paths?.shapes??[];let t=i.shape?.paths?._length||0;for(let e=0;e<t;e++)a?.addShape(this.processPath(r[e],s))}i.shape&&(i.shape.paths=i.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}class rl extends i5{addPaths(t,e){let{length:s}=t;for(let i=0;i<s;i++)e.addShape(t[i])}addSegment(t,e,s,i,r,a,n){r.setXYAt(e[0],e[1],"o",a),r.setXYAt(s[0],s[1],"i",a+1),n&&r.setXYAt(t[0],t[1],"v",a),r.setXYAt(i[0],i[1],"v",a+1)}addSegmentFromArray(t,e,s,i){e.setXYAt(t[1]??0,t[5]??0,"o",s),e.setXYAt(t[2]??0,t[6]??0,"i",s+1),i&&e.setXYAt(t[0]??0,t[4]??0,"v",s),e.setXYAt(t[3]??0,t[7]??0,"v",s+1)}addShapes(t,e,s){let i=s,{pathsData:r,shape:a}=t,n=a?.paths?.shapes??[],o=a?.paths?._length||0,h,l,m=0,p,c,d,u=[],f,g=!0;i?(c=i._length,f=i._length):(i=t2(),c=0,f=0),u.push(i);for(let t=0;t<o;t++){let{lengths:s}=r[t]??{lengths:[]};for(i.c=n[t]?.c,l=n[t]?.c?s.length:s.length+1,h=1;h<l;h++){if(m+(p=s[h-1]).addedLength<e.s){m+=p.addedLength,i.c=!1;continue}if(m>e.e){i.c=!1;break}e.s<=m&&e.e>=m+p.addedLength?(this.addSegment(n[t]?.v[h-1],n[t]?.o[h-1],n[t]?.i[h],n[t]?.v[h],i,c,g),g=!1):(d=t$(n[t]?.v[h-1],n[t]?.v[h],n[t]?.o[h-1],n[t]?.i[h],(e.s-m)/p.addedLength,(e.e-m)/p.addedLength,s[h-1]),this.addSegmentFromArray(d,i,c,g),g=!1,i.c=!1),m+=p.addedLength,c++}if(n[t]?.c&&s.length>0){if(p=s[h-1],m<=e.e){let r=s[h-1]?.addedLength??0;e.s<=m&&e.e>=m+r?(this.addSegment(n[t]?.v[h-1],n[t]?.o[h-1],n[t]?.i[0],n[t]?.v[0],i,c,g),g=!1):(d=t$(n[t]?.v[h-1],n[t]?.v[0],n[t]?.o[h-1],n[t]?.i[0],(e.s-m)/r,(e.e-m)/r,s[h-1]),this.addSegmentFromArray(d,i,c,g),g=!1,i.c=!1)}else i.c=!1;m+=p.addedLength,c++}if(i._length&&(i.setXYAt(i.v[f]?.[0]??0,i.v[f]?.[1]??0,"i",f),i.setXYAt(i.v[i._length-1]?.[0]??0,i.v[i._length-1]?.[1]??0,"o",i._length-1)),m>e.e)break;t<o-1&&(i=t2(),g=!0,u.push(i),c=0)}return u}addShapeToModifier(t){t.pathsData=[]}calculateShapeEdges(t,e,s,i,r){let a=[];e<=1?a.push({e,s:t}):t>=1?a.push({e:e-1,s:t-1}):a.push({e:1,s:t},{e:e-1,s:0});let n=[],{length:o}=a;for(let t=0;t<o;t++)if(!((a[t]?.e??0)*r<i||(a[t]?.s??0)*r>i+s)){let e,o;e=(a[t]?.s??0)*r<=i?0:((a[t]?.s??0)*r-i)/s,o=(a[t]?.e??0)*r>=i+s?1:((a[t]?.e??0)*r-i)/s,n.push([e,o])}return 0===n.length&&n.push([0,0]),n}initModifierProperties(t,e){this.s=tK.getProp(t,e.s,0,.01,this),this.e=tK.getProp(t,e.e,0,.01,this),this.o=tK.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=this.s.effectsSequence.length>0||this.e.effectsSequence.length>0||this.o.effectsSequence.length>0}processShapes(t){let e,s;if(this._mdf||t){let t=Number(this.o?.v)%360/360;if(t<0&&t++,(e=Number(this.s?.v)>1?1+t:0>Number(this.s?.v)?0+t:Number(this.s?.v)+t)>(s=Number(this.e?.v)>1?1+t:0>Number(this.e?.v)?0+t:Number(this.e?.v)+t)){let t=e;e=s,s=t}e=1e-4*Math.round(1e4*e),s=1e-4*Math.round(1e4*s),this.sValue=e,this.eValue=s}else e=this.sValue||0,s=this.eValue||0;let i,r,a,n,o,h,l=0,{length:m}=this.shapes;if(s===e)for(let t=0;t<m;t++){let e=this.shapes[t];e.localShapeCollection?.releaseShapes();let{localShapeCollection:s,shape:i}=e;i&&(i._mdf=!0,i.paths=s),this._mdf&&(e.pathsData.length=0)}else if((1!==s||0!==e)&&(0!==s||1!==e)){let p,c,d=[];for(let e=0;e<m;e++)if(p=this.shapes[e],p.shape?._mdf||this._mdf||t||2===this.m){if(i=p.shape?.paths,a=i?._length||0,h=0,!p.shape?._mdf&&p.pathsData.length>0)h=p.totalShapeLength;else{for(n=this.releasePathsData(p.pathsData),r=0;r<a;r++)i&&(o=function(t){let e,s=tT.newElement(),i=t.c,r=t.v,a=t.o,n=t.i,o=t._length||0,{lengths:h}=s,l=0;for(e=0;e<o-1;e++)h[e]=tB(r[e],r[e+1],a[e],n[e+1]),l+=h[e]?.addedLength??0;return i&&o&&(h[e]=tB(r[e],r[0],a[e],n[0]),l+=h[e]?.addedLength??0),s.totalLength=l,s}(i.shapes[r]),n.push(o),h+=o.totalLength);p.totalShapeLength=h,p.pathsData=n}l+=Number(h),p.shape&&(p.shape._mdf=!0)}else p.shape&&(p.shape.paths=p.localShapeCollection);let u=e,f=s,g=0,y;for(let t=m-1;t>=0;t--)if(p=this.shapes[t],p.shape?._mdf){if(!(c=p.localShapeCollection))throw Error(`${this.constructor.name}: Could not set localShapeCollection`);for(c.releaseShapes(),2===this.m&&m>1?(y=this.calculateShapeEdges(e,s,p.totalShapeLength||0,g,l),g+=Number(p.totalShapeLength)):y=[[u,f]],a=y.length,r=0;r<a;r++){u=y[r]?.[0]??0,f=y[r]?.[1]??0,d.length=0,f<=1?d.push({e:Number(p.totalShapeLength)*f,s:Number(p.totalShapeLength)*u}):u>=1?d.push({e:Number(p.totalShapeLength)*(f-1),s:Number(p.totalShapeLength)*(u-1)}):d.push({e:Number(p.totalShapeLength),s:Number(p.totalShapeLength)*u},{e:Number(p.totalShapeLength)*(f-1),s:0});let t={e:0,s:0},e=this.addShapes(p,d[0]??t);if(d[0]?.s!==d[0]?.e){if(d.length>1){let s=p.shape.paths?.shapes[p.shape.paths._length-1];if(s?.c){let s=e.pop();this.addPaths(e,c),e=this.addShapes(p,d[1]??t,s)}else this.addPaths(e,c),e=this.addShapes(p,d[1]??t)}this.addPaths(e,c)}}p.shape.paths=c}}else if(this._mdf)for(let t=0;t<m;t++){let e=this.shapes[t];e.pathsData.length=0;let{shape:s}=e;s&&(s._mdf=!0)}}releasePathsData(t){let{length:e}=t;for(let s=0;s<e;s++)tT.release(t[s]);return t.length=0,t}}let rm=(t,e,s,i,r,a,n)=>{let o=s-Math.PI/2,h=s+Math.PI/2,l=e[0]+Math.cos(s)*i*r,m=e[1]-Math.sin(s)*i*r;t.setTripleAt(l,m,l+Math.cos(o)*a,m-Math.sin(o)*a,l+Math.cos(h)*n,m-Math.sin(h)*n,t.length())},rp=(t,e,s,i,r,a,n)=>{let o,h,l,m,p,c,d,u=(l=0===s?e.length()-1:s-1,m=(s+1)%e.length(),p=e.v[l],c=e.v[m],o=[c[0]-p[0],c[1]-p[1]],Math.atan2(0,1)-Math.atan2((d=[Math.cos(h=-(.5*Math.PI))*(o[0]??0)-Math.sin(h)*(o[1]??0),Math.sin(h)*(o[0]??0)+Math.cos(h)*(o[1]??0)])[1],d[0])),f=e.v[s%e._length],g=e.v[0===s?e._length-1:s-1],y=e.v[(s+1)%e._length],v=2===a?Math.sqrt(Math.pow(f[0]-g[0],2)+Math.pow(f[1]-g[1],2)):0,b=2===a?Math.sqrt(Math.pow(f[0]-y[0],2)+Math.pow(f[1]-y[1],2)):0;rm(t,e.v[s%e._length]??[0,0],u,n,i,b/((r+1)*2),v/((r+1)*2))},rc=(t,e,s,i,r,a)=>{let n=a;for(let a=0;a<i;a++){let o=(a+1)/(i+1),h=2===r?Math.sqrt(Math.pow(e.points[3][0]-e.points[0][0],2)+Math.pow(e.points[3][1]-e.points[0][1],2)):0,l=e.normalAngle(o);rm(t,e.point(o),l,n,s,h/((i+1)*2),h/((i+1)*2)),n=-n}return n};class rd extends i5{initModifierProperties(t,e){this.getValue=this.processKeys,this.amplitude=tK.getProp(t,e.s,0,null,this),this.frequency=tK.getProp(t,e.r,0,null,this),this.pointsType=tK.getProp(t,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length>0||this.frequency.effectsSequence.length>0||this.pointsType.effectsSequence.length>0}processPath(t,e,s,i){let r=t._length,a=t2();if(a.c=t.c,t.c||(r-=1),0===r)return a;let n=-1,o=i3(t,0);rp(a,t,0,e,s,i,n);for(let h=0;h<r;h++)n=rc(a,o,e,s,i,-n),o=h!==r-1||t.c?i3(t,(h+1)%r):null,rp(a,t,h+1,e,s,i,n);return a}processShapes(t){let e=Number(this.amplitude?.v),s=Math.max(0,Math.round(Number(this.frequency?.v))),i=Number(this.pointsType?.v);if(0!==e){let r,a,n,{length:o}=this.shapes;for(let h=0;h<o;h++){if(a=(r=this.shapes[h]).localShapeCollection,!(!r.shape?._mdf&&!this._mdf&&!t)){a?.releaseShapes(),r.shape&&(r.shape._mdf=!0),n=r.shape?.paths?.shapes??[];let{_length:t}=r.shape?.paths??{_length:0};for(let r=0;r<t;r++)a?.addShape(this.processPath(n[r],e,s,i))}r.shape&&(r.shape.paths=r.localShapeCollection)}}0===this.dynamicProperties.length&&(this._mdf=!1)}}v||("complete"===document.readyState?iV():addEventListener("DOMContentLoaded",()=>{iV()},{once:!0})),!function({effects:t,expressions:e,renderers:s}){e?.installPlugin,s.forEach(({renderer:t,rendererType:e})=>{s0[e]=t}),se(tt.TrimModifier,rl),se(tt.PuckerAndBloatModifier,rn),se(tt.RepeaterModifier,ro),se(tt.RoundCornersModifier,rh),se(tt.ZigZagModifier,rd),se(tt.OffsetPathModifier,ra),e?.registerExpressions(),t.forEach(({countsAsEffect:t,effect:e,id:s,isCanvas:i})=>{i?tg[s]={countsAsEffect:void 0,effect:e}:eN[s]={countsAsEffect:t,effect:e}}),e?.installPlugin}({effects:[],renderers:[{renderer:sR,rendererType:tr.SVG}]});var ru={},rf=function(t,e,s,i,r){var a=new Worker(ru[e]||(ru[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(t){var e=t.data,s=e.$e$;if(s){var i=Error(s[0]);i.code=s[1],i.stack=s[2],r(i,null)}else r(null,e)},a.postMessage(s,i),a},rg=Uint8Array,ry=Uint16Array,rv=Int32Array,rb=new rg([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),rw=new rg([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),rx=new rg([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),r_=function(t,e){for(var s=new ry(31),i=0;i<31;++i)s[i]=e+=1<<t[i-1];for(var r=new rv(s[30]),i=1;i<30;++i)for(var a=s[i];a<s[i+1];++a)r[a]=a-s[i]<<5|i;return{b:s,r:r}},rE=r_(rb,2),rS=rE.b,rC=rE.r;rS[28]=258,rC[258]=28;for(var rk=r_(rw,0),rM=rk.b,rD=rk.r,rP=new ry(32768),rA=0;rA<32768;++rA){var rT=(43690&rA)>>1|(21845&rA)<<1;rT=(61680&(rT=(52428&rT)>>2|(13107&rT)<<2))>>4|(3855&rT)<<4,rP[rA]=((65280&rT)>>8|(255&rT)<<8)>>1}for(var rL=function(t,e,s){for(var i,r=t.length,a=0,n=new ry(e);a<r;++a)t[a]&&++n[t[a]-1];var o=new ry(e);for(a=1;a<e;++a)o[a]=o[a-1]+n[a-1]<<1;if(s){i=new ry(1<<e);var h=15-e;for(a=0;a<r;++a)if(t[a])for(var l=a<<4|t[a],m=e-t[a],p=o[t[a]-1]++<<m,c=p|(1<<m)-1;p<=c;++p)i[rP[p]>>h]=l}else for(i=new ry(r),a=0;a<r;++a)t[a]&&(i[a]=rP[o[t[a]-1]++]>>15-t[a]);return i},rF=new rg(288),rA=0;rA<144;++rA)rF[rA]=8;for(var rA=144;rA<256;++rA)rF[rA]=9;for(var rA=256;rA<280;++rA)rF[rA]=7;for(var rA=280;rA<288;++rA)rF[rA]=8;for(var r$=new rg(32),rA=0;rA<32;++rA)r$[rA]=5;var rI=rL(rF,9,0),rN=rL(rF,9,1),rB=rL(r$,5,0),rz=rL(r$,5,1),rR=function(t){for(var e=t[0],s=1;s<t.length;++s)t[s]>e&&(e=t[s]);return e},rO=function(t,e,s){var i=e/8|0;return(t[i]|t[i+1]<<8)>>(7&e)&s},rV=function(t,e){var s=e/8|0;return(t[s]|t[s+1]<<8|t[s+2]<<16)>>(7&e)},rq=function(t){return(t+7)/8|0},rH=function(t,e,s){return(null==e||e<0)&&(e=0),(null==s||s>t.length)&&(s=t.length),new rg(t.subarray(e,s))},rG=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],rj=function(t,e,s){var i=Error(e||rG[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,rj),!s)throw i;return i},rW=function(t,e,s,i){var r=t.length,a=i?i.length:0;if(!r||e.f&&!e.l)return s||new rg(0);var n=!s,o=n||2!=e.i,h=e.i;n&&(s=new rg(3*r));var l=function(t){var e=s.length;if(t>e){var i=new rg(Math.max(2*e,t));i.set(s),s=i}},m=e.f||0,p=e.p||0,c=e.b||0,d=e.l,u=e.d,f=e.m,g=e.n,y=8*r;do{if(!d){m=rO(t,p,1);var v=rO(t,p+1,3);if(p+=3,v)if(1==v)d=rN,u=rz,f=9,g=5;else if(2==v){var b=rO(t,p,31)+257,w=rO(t,p+10,15)+4,x=b+rO(t,p+5,31)+1;p+=14;for(var _=new rg(x),E=new rg(19),S=0;S<w;++S)E[rx[S]]=rO(t,p+3*S,7);p+=3*w;for(var C=rR(E),k=(1<<C)-1,M=rL(E,C,1),S=0;S<x;){var D=M[rO(t,p,k)];p+=15&D;var P=D>>4;if(P<16)_[S++]=P;else{var A=0,T=0;for(16==P?(T=3+rO(t,p,3),p+=2,A=_[S-1]):17==P?(T=3+rO(t,p,7),p+=3):18==P&&(T=11+rO(t,p,127),p+=7);T--;)_[S++]=A}}var L=_.subarray(0,b),F=_.subarray(b);f=rR(L),g=rR(F),d=rL(L,f,1),u=rL(F,g,1)}else rj(1);else{var P=rq(p)+4,$=t[P-4]|t[P-3]<<8,I=P+$;if(I>r){h&&rj(0);break}o&&l(c+$),s.set(t.subarray(P,I),c),e.b=c+=$,e.p=p=8*I,e.f=m;continue}if(p>y){h&&rj(0);break}}o&&l(c+131072);for(var N=(1<<f)-1,B=(1<<g)-1,z=p;;z=p){var A=d[rV(t,p)&N],R=A>>4;if((p+=15&A)>y){h&&rj(0);break}if(A||rj(2),R<256)s[c++]=R;else if(256==R){z=p,d=null;break}else{var O=R-254;if(R>264){var S=R-257,V=rb[S];O=rO(t,p,(1<<V)-1)+rS[S],p+=V}var q=u[rV(t,p)&B],H=q>>4;q||rj(3),p+=15&q;var F=rM[H];if(H>3){var V=rw[H];F+=rV(t,p)&(1<<V)-1,p+=V}if(p>y){h&&rj(0);break}o&&l(c+131072);var G=c+O;if(c<F){var j=a-F,W=Math.min(F,G);for(j+c<0&&rj(3);c<W;++c)s[c]=i[j+c]}for(;c<G;++c)s[c]=s[c-F]}}e.l=d,e.p=z,e.b=c,e.f=m,d&&(m=1,e.m=f,e.d=u,e.n=g)}while(!m);return c!=s.length&&n?rH(s,0,c):s.subarray(0,c)},rY=function(t,e,s){s<<=7&e;var i=e/8|0;t[i]|=s,t[i+1]|=s>>8},rJ=function(t,e,s){s<<=7&e;var i=e/8|0;t[i]|=s,t[i+1]|=s>>8,t[i+2]|=s>>16},rU=function(t,e){for(var s=[],i=0;i<t.length;++i)t[i]&&s.push({s:i,f:t[i]});var r=s.length,a=s.slice();if(!r)return{t:r2,l:0};if(1==r){var n=new rg(s[0].s+1);return n[s[0].s]=1,{t:n,l:1}}s.sort(function(t,e){return t.f-e.f}),s.push({s:-1,f:25001});var o=s[0],h=s[1],l=0,m=1,p=2;for(s[0]={s:-1,f:o.f+h.f,l:o,r:h};m!=r-1;)o=s[s[l].f<s[p].f?l++:p++],h=s[l!=m&&s[l].f<s[p].f?l++:p++],s[m++]={s:-1,f:o.f+h.f,l:o,r:h};for(var c=a[0].s,i=1;i<r;++i)a[i].s>c&&(c=a[i].s);var d=new ry(c+1),u=rX(s[m-1],d,0);if(u>e){var i=0,f=0,g=u-e,y=1<<g;for(a.sort(function(t,e){return d[e.s]-d[t.s]||t.f-e.f});i<r;++i){var v=a[i].s;if(d[v]>e)f+=y-(1<<u-d[v]),d[v]=e;else break}for(f>>=g;f>0;){var b=a[i].s;d[b]<e?f-=1<<e-d[b]++-1:++i}for(;i>=0&&f;--i){var w=a[i].s;d[w]==e&&(--d[w],++f)}u=e}return{t:new rg(d),l:u}},rX=function(t,e,s){return -1==t.s?Math.max(rX(t.l,e,s+1),rX(t.r,e,s+1)):e[t.s]=s},rZ=function(t){for(var e=t.length;e&&!t[--e];);for(var s=new ry(++e),i=0,r=t[0],a=1,n=function(t){s[i++]=t},o=1;o<=e;++o)if(t[o]==r&&o!=e)++a;else{if(!r&&a>2){for(;a>138;a-=138)n(32754);a>2&&(n(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(n(r),--a;a>6;a-=6)n(8304);a>2&&(n(a-3<<5|8208),a=0)}for(;a--;)n(r);a=1,r=t[o]}return{c:s.subarray(0,i),n:e}},rK=function(t,e){for(var s=0,i=0;i<e.length;++i)s+=t[i]*e[i];return s},rQ=function(t,e,s){var i=s.length,r=rq(e+2);t[r]=255&i,t[r+1]=i>>8,t[r+2]=255^t[r],t[r+3]=255^t[r+1];for(var a=0;a<i;++a)t[r+a+4]=s[a];return(r+4+i)*8},r0=function(t,e,s,i,r,a,n,o,h,l,m){rY(e,m++,s),++r[256];for(var p,c,d,u,f=rU(r,15),g=f.t,y=f.l,v=rU(a,15),b=v.t,w=v.l,x=rZ(g),_=x.c,E=x.n,S=rZ(b),C=S.c,k=S.n,M=new ry(19),D=0;D<_.length;++D)++M[31&_[D]];for(var D=0;D<C.length;++D)++M[31&C[D]];for(var P=rU(M,7),A=P.t,T=P.l,L=19;L>4&&!A[rx[L-1]];--L);var F=l+5<<3,$=rK(r,rF)+rK(a,r$)+n,I=rK(r,g)+rK(a,b)+n+14+3*L+rK(M,A)+2*M[16]+3*M[17]+7*M[18];if(h>=0&&F<=$&&F<=I)return rQ(e,m,t.subarray(h,h+l));if(rY(e,m,1+(I<$)),m+=2,I<$){p=rL(g,y,0),c=g,d=rL(b,w,0),u=b;var N=rL(A,T,0);rY(e,m,E-257),rY(e,m+5,k-1),rY(e,m+10,L-4),m+=14;for(var D=0;D<L;++D)rY(e,m+3*D,A[rx[D]]);m+=3*L;for(var B=[_,C],z=0;z<2;++z)for(var R=B[z],D=0;D<R.length;++D){var O=31&R[D];rY(e,m,N[O]),m+=A[O],O>15&&(rY(e,m,R[D]>>5&127),m+=R[D]>>12)}}else p=rI,c=rF,d=rB,u=r$;for(var D=0;D<o;++D){var V=i[D];if(V>255){var O=V>>18&31;rJ(e,m,p[O+257]),m+=c[O+257],O>7&&(rY(e,m,V>>23&31),m+=rb[O]);var q=31&V;rJ(e,m,d[q]),m+=u[q],q>3&&(rJ(e,m,V>>5&8191),m+=rw[q])}else rJ(e,m,p[V]),m+=c[V]}return rJ(e,m,p[256]),m+c[256]},r1=new rv([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),r2=new rg(0),r3=function(t,e,s,i,r,a){var n=a.z||t.length,o=new rg(i+n+5*(1+Math.ceil(n/7e3))+r),h=o.subarray(i,o.length-r),l=a.l,m=7&(a.r||0);if(e){m&&(h[0]=a.r>>3);for(var p=r1[e-1],c=p>>13,d=8191&p,u=(1<<s)-1,f=a.p||new ry(32768),g=a.h||new ry(u+1),y=Math.ceil(s/3),v=2*y,b=function(e){return(t[e]^t[e+1]<<y^t[e+2]<<v)&u},w=new rv(25e3),x=new ry(288),_=new ry(32),E=0,S=0,C=a.i||0,k=0,M=a.w||0,D=0;C+2<n;++C){var P=b(C),A=32767&C,T=g[P];if(f[A]=T,g[P]=A,M<=C){var L=n-C;if((E>7e3||k>24576)&&(L>423||!l)){m=r0(t,h,0,w,x,_,S,k,D,C-D,m),k=E=S=0,D=C;for(var F=0;F<286;++F)x[F]=0;for(var F=0;F<30;++F)_[F]=0}var $=2,I=0,N=d,B=A-T&32767;if(L>2&&P==b(C-B))for(var z=Math.min(c,L)-1,R=Math.min(32767,C),O=Math.min(258,L);B<=R&&--N&&A!=T;){if(t[C+$]==t[C+$-B]){for(var V=0;V<O&&t[C+V]==t[C+V-B];++V);if(V>$){if($=V,I=B,V>z)break;for(var q=Math.min(B,V-2),H=0,F=0;F<q;++F){var G=C-B+F&32767,j=f[G],W=G-j&32767;W>H&&(H=W,T=G)}}}T=f[A=T],B+=A-T&32767}if(I){w[k++]=0x10000000|rC[$]<<18|rD[I];var Y=31&rC[$],J=31&rD[I];S+=rb[Y]+rw[J],++x[257+Y],++_[J],M=C+$,++E}else w[k++]=t[C],++x[t[C]]}}for(C=Math.max(C,M);C<n;++C)w[k++]=t[C],++x[t[C]];m=r0(t,h,l,w,x,_,S,k,D,C-D,m),l||(a.r=7&m|h[m/8|0]<<3,m-=7,a.h=g,a.p=f,a.i=C,a.w=M)}else{for(var C=a.w||0;C<n+l;C+=65535){var U=C+65535;U>=n&&(h[m/8|0]=l,U=n),m=rQ(h,m+1,t.subarray(C,U))}a.i=n}return rH(o,0,i+rq(m)+r)},r5=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var s=e,i=9;--i;)s=(1&s&&-0x12477ce0)^s>>>1;t[e]=s}return t}(),r4=function(){var t=-1;return{p:function(e){for(var s=t,i=0;i<e.length;++i)s=r5[255&s^e[i]]^s>>>8;t=s},d:function(){return~t}}},r6=function(t,e,s,i,r){if(!r&&(r={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),n=new rg(a.length+t.length);n.set(a),n.set(t,a.length),t=n,r.w=a.length}return r3(t,null==e.level?6:e.level,null==e.mem?r.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+e.mem,s,i,r)},r8=function(t,e){var s={};for(var i in t)s[i]=t[i];for(var i in e)s[i]=e[i];return s},r9=function(t,e,s){for(var i=t(),r=t.toString(),a=r.slice(r.indexOf("[")+1,r.lastIndexOf("]")).replace(/\s+/g,"").split(","),n=0;n<i.length;++n){var o=i[n],h=a[n];if("function"==typeof o){e+=";"+h+"=";var l=o.toString();if(o.prototype)if(-1!=l.indexOf("[native code]")){var m=l.indexOf(" ",8)+1;e+=l.slice(m,l.indexOf("(",m))}else for(var p in e+=l,o.prototype)e+=";"+h+".prototype."+p+"="+o.prototype[p].toString();else e+=l}else s[h]=o}return e},r7=[],at=function(t){var e=[];for(var s in t)t[s].buffer&&e.push((t[s]=new t[s].constructor(t[s])).buffer);return e},ae=function(t,e,s,i){if(!r7[s]){for(var r="",a={},n=t.length-1,o=0;o<n;++o)r=r9(t[o],r,a);r7[s]={c:r9(t[n],r,a),e:a}}var h=r8({},r7[s].e);return rf(r7[s].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",s,h,at(h),i)},as=function(){return[rg,ry,rv,rb,rw,rx,rS,rM,rN,rz,rP,rG,rL,rR,rO,rV,rq,rH,rj,rW,ac,ar,aa]},ai=function(){return[rg,ry,rv,rb,rw,rx,rC,rD,rI,rF,rB,r$,rP,r1,r2,rL,rY,rJ,rU,rX,rZ,rK,rQ,r0,rq,rH,r3,r6,ap,ar]},ar=function(t){return postMessage(t,[t.buffer])},aa=function(t){return t&&{out:t.size&&new rg(t.size),dictionary:t.dictionary}},an=function(t,e,s,i,r,a){var n=ae(s,i,r,function(t,e){n.terminate(),a(t,e)});return n.postMessage([t,e],e.consume?[t.buffer]:[]),function(){n.terminate()}},ao=function(t,e){return t[e]|t[e+1]<<8},ah=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},al=function(t,e){return ah(t,e)+0x100000000*ah(t,e+4)},am=function(t,e,s){for(;s;++e)t[e]=s,s>>>=8};function ap(t,e){return r6(t,e||{},0,0)}function ac(t,e){return rW(t,{i:2},e&&e.out,e&&e.dictionary)}var ad=function(t,e,s,i){for(var r in t){var a=t[r],n=e+r,o=i;Array.isArray(a)&&(o=r8(i,a[1]),a=a[0]),ArrayBuffer.isView(a)?s[n]=[a,o]:(s[n+="/"]=[new rg(0),o],ad(a,n,s,i))}},au="u">typeof TextEncoder&&new TextEncoder,af="u">typeof TextDecoder&&new TextDecoder;try{af.decode(r2,{stream:!0})}catch(t){}var ag=function(t){for(var e="",s=0;;){var i=t[s++],r=(i>127)+(i>223)+(i>239);if(s+r>t.length)return{s:e,r:rH(t,s-1)};r?3==r?e+=String.fromCharCode(55296|(i=((15&i)<<18|(63&t[s++])<<12|(63&t[s++])<<6|63&t[s++])-65536)>>10,56320|1023&i):1&r?e+=String.fromCharCode((31&i)<<6|63&t[s++]):e+=String.fromCharCode((15&i)<<12|(63&t[s++])<<6|63&t[s++]):e+=String.fromCharCode(i)}};function ay(t,e){if(e){for(var s=new rg(t.length),i=0;i<t.length;++i)s[i]=t.charCodeAt(i);return s}if(au)return au.encode(t);for(var r=t.length,a=new rg(t.length+(t.length>>1)),n=0,o=function(t){a[n++]=t},i=0;i<r;++i){if(n+5>a.length){var h=new rg(n+8+(r-i<<1));h.set(a),a=h}var l=t.charCodeAt(i);l<128||e?o(l):(l<2048?o(192|l>>6):(l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++i))>>18),o(128|l>>12&63)):o(224|l>>12),o(128|l>>6&63)),o(128|63&l))}return rH(a,0,n)}function av(t,e){if(e){for(var s="",i=0;i<t.length;i+=16384)s+=String.fromCharCode.apply(null,t.subarray(i,i+16384));return s}if(af)return af.decode(t);var r=ag(t),a=r.s,s=r.r;return s.length&&rj(8),a}var ab=function(t,e,s){var i=ao(t,e+28),r=ao(t,e+30),a=av(t.subarray(e+46,e+46+i),!(2048&ao(t,e+8))),n=e+46+i,o=aw(t,n,r,s,ah(t,e+20),ah(t,e+24),ah(t,e+42)),h=o[0],l=o[1],m=o[2];return[ao(t,e+10),h,l,a,n+r+ao(t,e+32),m]},aw=function(t,e,s,i,r,a,n){var o=0xffffffff==r,h=0xffffffff==a,l=0xffffffff==n,m=e+s;if(i&&o+h+l){for(;e+4<m;e+=4+ao(t,e+2))if(1==ao(t,e))return[o?al(t,e+4+8*h):r,h?al(t,e+4):a,l?al(t,e+4+8*(h+o)):n,1];i<2&&rj(13)}return[r,a,n,0]},ax=function(t){var e=0;if(t)for(var s in t){var i=t[s].length;i>65535&&rj(9),e+=i+4}return e},a_=function(t,e,s,i,r,a,n,o){var h=i.length,l=s.extra,m=o&&o.length,p=ax(l);am(t,e,null!=n?0x2014b50:0x4034b50),e+=4,null!=n&&(t[e++]=20,t[e++]=s.os),t[e]=20,e+=2,t[e++]=s.flag<<1|(a<0&&8),t[e++]=r&&8,t[e++]=255&s.compression,t[e++]=s.compression>>8;var c=new Date(null==s.mtime?Date.now():s.mtime),d=c.getFullYear()-1980;if((d<0||d>119)&&rj(10),am(t,e,d<<25|c.getMonth()+1<<21|c.getDate()<<16|c.getHours()<<11|c.getMinutes()<<5|c.getSeconds()>>1),e+=4,-1!=a&&(am(t,e,s.crc),am(t,e+4,a<0?-a-2:a),am(t,e+8,s.size)),am(t,e+12,h),am(t,e+14,p),e+=16,null!=n&&(am(t,e,m),am(t,e+6,s.attrs),am(t,e+10,n),e+=14),t.set(i,e),e+=h,p)for(var u in l){var f=l[u],g=f.length;am(t,e,+u),am(t,e+2,g),t.set(f,e+4),e+=4+g}return m&&(t.set(o,e),e+=m),e},aE=function(t,e,s,i,r){am(t,e,0x6054b50),am(t,e+8,s),am(t,e+10,s),am(t,e+12,i),am(t,e+16,r)},aS="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(t){t()};let aC=async t=>await new Promise((e,s)=>{!function(t,e,s){s||(s=e,e={}),"function"!=typeof s&&rj(7);var i={};ad(t,"",i,e);var r=Object.keys(i),a=r.length,n=0,o=0,h=a,l=Array(a),m=[],p=function(){for(var t=0;t<m.length;++t)m[t]()},c=function(t,e){aS(function(){s(t,e)})};aS(function(){c=s});var d=function(){var t=new rg(o+22),e=n,s=o-n;o=0;for(var i=0;i<h;++i){var r=l[i];try{var a=r.c.length;a_(t,o,r,r.f,r.u,a);var m=30+r.f.length+ax(r.extra),p=o+m;t.set(r.c,p),a_(t,n,r,r.f,r.u,a,o,r.m),n+=16+m+(r.m?r.m.length:0),o=p+a}catch(t){return c(t,null)}}aE(t,n,l.length,s,e),c(null,t)};a||d();for(var u=function(t){var e,s,h=r[t],u=i[h],f=u[0],g=u[1],y=r4(),v=f.length;y.p(f);var b=ay(h),w=b.length,x=g.comment,_=x&&ay(x),E=_&&_.length,S=ax(g.extra),C=8*(0!=g.level),k=function(e,s){if(e)p(),c(e,null);else{var i=s.length;l[t]=r8(g,{size:v,crc:y.d(),c:s,f:b,m:_,u:w!=h.length||_&&x.length!=E,compression:C}),n+=30+w+S+i,o+=76+2*(w+S)+(E||0)+i,--a||d()}};if(w>65535&&k(rj(11,0,1),null),C)if(v<16e4)try{k(null,ap(f,g))}catch(t){k(t,null)}else m.push((e=g,(s=k)||(s=e,e={}),"function"!=typeof s&&rj(7),an(f,e,[ai],function(t){return ar(ap(t.data[0],t.data[1]))},0,s)));else k(null,f)},f=0;f<h;++f)u(f)}(t,{level:9},(t,i)=>{t?s(t):i.buffer instanceof ArrayBuffer?e(i.buffer):s(Error("Data is not transferable"))})}),ak=async t=>{let e=await fetch(t),s=await e.blob();return new Promise((t,e)=>{try{let i=new FileReader;i.onload=()=>{"string"==typeof i.result?t(i.result):e(Error("Could not create bas64"))},i.readAsDataURL(s)}catch(t){t instanceof Error&&e(t)}})},aM=t=>ay(v?Buffer.from(z(t),"base64").toString("binary"):atob(z(t)),!0);async function aD({animations:t=[],fileName:e,manifest:s,shouldDownload:i=!0}){try{if(0===t.length||!s)throw Error(`Missing or malformed required parameter(s):
6
- ${t.length>0?"- manifest\n":""} ${s?"- animations\n":""}`);let r=L("lottie",e)||`${C()}.lottie`,a={"manifest.json":[ay(JSON.stringify(s),!0),{level:0}]},{length:n}=t;for(let e=0;e<n;e++){let{length:i}=t[e]?.assets??[];for(let s=0;s<i;s++){let i=t[e]?.assets[s];if(!i.p||!N(i)&&!I(i))continue;let{p:r,u:n}=i;if(!r)continue;let o=C(),h=r.startsWith("data:"),l=h?A(r):P(r),m=h?r:await ak(n?n.endsWith("/")&&`${n}${r}`||`${n}/${r}`:r),p=t[e]?.assets[s];p.e=1,p.p=`${o}.${l}`,p.u="",a[`${I(i)?"audio":"i"}/${o}.${l}`]=[aM(m),{level:9}]}let{length:r}=t[e]?.layers??[];for(let s=0;s<r;s++){let{ks:i}=t[e]?.layers[s]??{},r=Object.keys(i),{length:a}=r;for(let n=0;n<a;n++){let{x:a}=i[r[n]];if(!a)continue;let o=t[e]?.layers[s]?.ks[r[n]];o.x=btoa(a),o.e=1}}a[`a/${s.animations[e]?.id}.json`]=[ay(JSON.stringify(t[e]),!0),{level:9}]}let o=await aC(a);if(i)return M(o,{mimeType:"application/zip+dotlottie",name:r}),null;return o}catch(t){return k(t),null}}let aP=t=>{switch(t){case"svg":case"svg+xml":return"image/svg+xml";case"jpg":case"jpeg":return"image/jpeg";case"png":case"gif":case"webp":case"avif":return`image/${t}`;case"mp3":case"mpeg":case"wav":return`audio/${t}`;default:return""}},aA=t=>!!t&&/^(?:[0-9a-z+/]{4})*(?:[0-9a-z+/]{2}==|[0-9a-z+/]{3}=)?$/i.test(z(t));async function aT(t,e){if(!Array.isArray(e))return;let s=[],{length:i}=e;for(let r=0;r<i;r++){let i,a=e[r];if(!I(a)&&!N(a))continue;let n=N(a),o=n?"images":"audio",h=a.u?.replace(/^\/+/,"");h&&""!==h?i=t?.[`${h}${a.p}`]:n&&(i=t?.[`i/${a.p}`]),(i=i??t?.[`${o}/${a.p}`])&&s.push(new Promise(t=>{let e;if(v)e=Buffer.from(i).toString("base64");else{let t="",{length:s}=i;for(let e=0;e<s;e++)t+=String.fromCharCode(i[e]);e=btoa(t)}a.p=a.p?.startsWith("data:")||aA(a.p)?a.p:`data:${aP(P(a.p))};base64,${e}`,a.e=1,a.u="",t()}))}await Promise.all(s)}let aL=async t=>{let e=new Uint8Array(await t.arrayBuffer());return await new Promise((t,s)=>{!function(t,e,s){s||(s=e,e={}),"function"!=typeof s&&rj(7);var i=[],r=function(){for(var t=0;t<i.length;++t)i[t]()},a={},n=function(t,e){aS(function(){s(t,e)})};aS(function(){n=s});for(var o=t.length-22;0x6054b50!=ah(t,o);--o)if(!o||t.length-o>65558)return n(rj(13,0,1),null),r;var h=ao(t,o+8);if(h){var l=h,m=ah(t,o+16),p=0x7064b50==ah(t,o-20);if(p){var c=ah(t,o-12);(p=0x6064b50==ah(t,c))&&(l=h=ah(t,c+32),m=ah(t,c+48))}for(var d=e&&e.filter,u=0;u<l;++u)!function(){var e=ab(t,m,p),s=e[0],o=e[1],l=e[2],c=e[3],u=e[4],f=e[5],g=f+30+ao(t,f+26)+ao(t,f+28);m=u;var y=function(t,e){t?(r(),n(t,null)):(e&&(a[c]=e),--h||n(null,a))};if(!d||d({name:c,size:o,originalSize:l,compression:s}))if(s)if(8==s){var v,b,w=t.subarray(g,g+o);if(l<524288||o>.8*l)try{y(null,ac(w,{out:new rg(l)}))}catch(t){y(t,null)}else i.push((v={size:l},(b=y)||(b=v,v={}),"function"!=typeof b&&rj(7),an(w,v,[as],function(t){return ar(ac(t.data[0],aa(t.data[1])))},1,b)))}else y(rj(14,"unknown compression type "+s,1),null);else y(null,rH(t,g,g+o));else y(null,null)}()}else n(null,{})}(e,(e,i)=>{e&&s(e),t(i)})})},aF=t=>t.replaceAll(RegExp(/"""/,"g"),'""').replaceAll(/(["'])(.*?)\1/g,(t,e,s)=>`${e}${s}${e}`);async function a$(t){let e=await aL(t),s=(t=>{let e=JSON.parse(av(t["manifest.json"],!1));if(!("animations"in e))throw Error("Manifest not found");if(0===e.animations.length)throw Error("No animations listed in manifest");return e})(e),i=[],r=[],{length:a}=s.animations,n="animations";("2"===s.version||e[`a/${s.animations[0]?.id}.json`])&&(n="a");for(let t=0;t<a;t++){let a=JSON.parse(aF(av(e[`${n}/${s.animations[t]?.id}.json`]))),{length:o}=a.layers;for(let t=0;t<o;t++){let{ks:e}=a.layers[t]??{},s=Object.keys(e),{length:i}=s;for(let r=0;r<i;r++){let{e:i,x:n}=e[s[r]];if(!n||!i)continue;let o=a.layers[t]?.ks[s[r]];o&&(o.x=atob(n))}}r.push(aT(e,a.assets)),i.push(a)}return await Promise.all(r),{data:i,manifest:s}}async function aI(t){try{if(!t||"string"!=typeof t&&"object"!=typeof t)throw Error("Broken file or invalid file format");if("string"!=typeof t)return{animations:Array.isArray(t)?t:[t],isDotLottie:!1,manifest:null};let e=await fetch(t,{headers:{"Content-Type":"application/json; charset=UTF-8"}});if(!e.ok)throw Error(e.statusText);let s=!0,i=e.headers.get("content-type");if("application/zip+dotlottie"===i&&(s=!1),s){let s=P(t);if("json"===s)return{animations:[await e.json()],isDotLottie:!1,manifest:null};let i=await e.clone().text();try{return{animations:[JSON.parse(i)],isDotLottie:!1,manifest:null}}catch(t){}}let{data:r,manifest:a}=await a$(e);return{animations:r,isDotLottie:!0,manifest:a}}catch(t){return k(t),{animations:void 0,isDotLottie:!1,manifest:null}}}function aN({animation:t,fileName:e,shouldDownload:s}){try{if(!t)throw Error("createJSON: Missing or malformed required parameter(s):\n - animation\n'");let i=L("json",e)||`${C()}.json`,r=JSON.stringify(t);if(s)return M(r,{mimeType:"application/json",name:i}),null;return r}catch(t){return k(t),null}}var aB=Object.freeze({__proto__:null,addAnimation:async function({configs:t,fileName:e,generator:s,id:i,shouldDownload:r=!0,src:a}){let{animations:n=[],manifest:o={animations:a?[{id:i}]:[]}}=a?await aI(a):{};try{if(!o)throw Error("Manifest is not set");o.generator=s;let{length:i}=t;for(let e=0;e<i;e++){let{url:s}=t[e]??{},{animations:i}=await aI(s);if(!i)throw Error("No animation loaded");if(o.animations.some(s=>s.id===t[e]?.id))throw Error("Duplicate id for animation");o.animations=[...o.animations,{id:t[e]?.id??""}],n.push(...i)}return{result:await aD({animations:n,fileName:e,manifest:o,shouldDownload:r}),success:!0}}catch(t){return{error:t.message,success:!1}}},convert:async function({animations:t,currentAnimation:e=0,fileName:s,generator:i,isDotLottie:r,manifest:a,shouldDownload:n=!0,src:o,typeCheck:h}){try{if(!o&&!t?.length)throw Error("No animation to convert");let l=t;if(l||(l=(await aI(o)).animations??[]),h||r){let t=T(s||o||"converted");return l.length>1&&(t+=`-${e+1}`),t+=".json",{result:aN({animation:l[e],fileName:t,shouldDownload:n}),success:!0}}return{result:await aD({animations:l,fileName:`${T(s||o||"converted")}.lottie`,manifest:{...a??a,generator:i,version:"2"},shouldDownload:n}),success:!0}}catch(t){return{error:t.message,success:!1}}},createDotLottie:aD,createJSON:aN,getAnimationData:aI,getLottieJSON:a$,resolveAssets:aT});let az=Symbol("UPDATE_ON_CONNECTED");v&&(global.HTMLElement=class{});class aR extends HTMLElement{constructor(){super(),az in this&&(this[az]=[]);const{observedProperties:t}=this.constructor,{length:e}=t;for(let s=0;s<e;s++){const e=this[t[s]],i=Symbol(t[s]);this[i]=e,Object.defineProperty(this,t[s]??"",{get(){return this[i]},set(e){let r=this[i];this[i]=e,this.propertyChangedCallback(t[s],r,e)}}),void 0!==e&&az in this&&Array.isArray(this[az])&&this[az].push(t[s])}}connectedCallback(){let t=[];az in this&&Array.isArray(this[az])&&(t=this[az]);let{length:e}=t;for(let s=0;s<e;s++)"propertyChangedCallback"in this&&"function"==typeof this.propertyChangedCallback&&(t[s]??""in this)&&this.propertyChangedCallback(t[s]??"",void 0,this[t[s]])}propertyChangedCallback(t,e,s){throw Error(`${this.constructor.name}: Method propertyChangedCallback is not implemented`)}}let aO=null,aV=null,aq=`
6
+ ${t.length>0?"- manifest\n":""} ${s?"- animations\n":""}`);let r=L("lottie",e)||`${C()}.lottie`,a={"manifest.json":[ay(JSON.stringify(s),!0),{level:0}]},{length:n}=t;for(let e=0;e<n;e++){let{length:i}=t[e]?.assets??[];for(let s=0;s<i;s++){let i=t[e]?.assets[s];if(!i.p||!N(i)&&!I(i))continue;let{p:r,u:n}=i;if(!r)continue;let o=C(),h=r.startsWith("data:"),l=h?A(r):P(r),m=h?r:await ak(n?n.endsWith("/")&&`${n}${r}`||`${n}/${r}`:r),p=t[e]?.assets[s];p.e=1,p.p=`${o}.${l}`,p.u="",a[`${I(i)?"audio":"i"}/${o}.${l}`]=[aM(m),{level:9}]}let{length:r}=t[e]?.layers??[];for(let s=0;s<r;s++){let{ks:i}=t[e]?.layers[s]??{},r=Object.keys(i),{length:a}=r;for(let n=0;n<a;n++){let{x:a}=i[r[n]];if(!a)continue;let o=t[e]?.layers[s]?.ks[r[n]];o.x=btoa(a),o.e=1}}a[`a/${s.animations[e]?.id}.json`]=[ay(JSON.stringify(t[e]),!0),{level:9}]}let o=await aC(a);if(i)return M(o,{mimeType:"application/zip+dotlottie",name:r}),null;return o}catch(t){return k(t),null}}let aP=t=>{switch(t){case"svg":case"svg+xml":return"image/svg+xml";case"jpg":case"jpeg":return"image/jpeg";case"png":case"gif":case"webp":case"avif":return`image/${t}`;case"mp3":case"mpeg":case"wav":return`audio/${t}`;default:return""}},aA=t=>!!t&&/^(?:[0-9a-z+/]{4})*(?:[0-9a-z+/]{2}==|[0-9a-z+/]{3}=)?$/i.test(z(t));async function aT(t,e){if(!Array.isArray(e))return;let s=[],{length:i}=e;for(let r=0;r<i;r++){let i,a=e[r];if(!I(a)&&!N(a))continue;let n=N(a),o=n?"images":"audio",h=a.u?.replace(/^\/+/,"");h&&""!==h?i=t?.[`${h}${a.p}`]:n&&(i=t?.[`i/${a.p}`]),(i=i??t?.[`${o}/${a.p}`])&&s.push(new Promise(t=>{let e;if(v)e=Buffer.from(i).toString("base64");else{let t="",{length:s}=i;for(let e=0;e<s;e++)t+=String.fromCharCode(i[e]);e=btoa(t)}a.p=a.p?.startsWith("data:")||aA(a.p)?a.p:`data:${aP(P(a.p))};base64,${e}`,a.e=1,a.u="",t()}))}await Promise.all(s)}let aL=async t=>{let e=new Uint8Array(await t.arrayBuffer());return await new Promise((t,s)=>{!function(t,e,s){s||(s=e,e={}),"function"!=typeof s&&rj(7);var i=[],r=function(){for(var t=0;t<i.length;++t)i[t]()},a={},n=function(t,e){aS(function(){s(t,e)})};aS(function(){n=s});for(var o=t.length-22;0x6054b50!=ah(t,o);--o)if(!o||t.length-o>65558)return n(rj(13,0,1),null),r;var h=ao(t,o+8);if(h){var l=h,m=ah(t,o+16),p=0x7064b50==ah(t,o-20);if(p){var c=ah(t,o-12);(p=0x6064b50==ah(t,c))&&(l=h=ah(t,c+32),m=ah(t,c+48))}for(var d=e&&e.filter,u=0;u<l;++u)!function(){var e=ab(t,m,p),s=e[0],o=e[1],l=e[2],c=e[3],u=e[4],f=e[5],g=f+30+ao(t,f+26)+ao(t,f+28);m=u;var y=function(t,e){t?(r(),n(t,null)):(e&&(a[c]=e),--h||n(null,a))};if(!d||d({name:c,size:o,originalSize:l,compression:s}))if(s)if(8==s){var v,b,w=t.subarray(g,g+o);if(l<524288||o>.8*l)try{y(null,ac(w,{out:new rg(l)}))}catch(t){y(t,null)}else i.push((v={size:l},(b=y)||(b=v,v={}),"function"!=typeof b&&rj(7),an(w,v,[as],function(t){return ar(ac(t.data[0],aa(t.data[1])))},1,b)))}else y(rj(14,"unknown compression type "+s,1),null);else y(null,rH(t,g,g+o));else y(null,null)}()}else n(null,{})}(e,(e,i)=>{e&&s(e),t(i)})})},aF=t=>t.replaceAll(RegExp(/"""/,"g"),'""').replaceAll(/(["'])(.*?)\1/g,(t,e,s)=>`${e}${s}${e}`);async function a$(t){let e=await aL(t),s=(t=>{let e=JSON.parse(av(t["manifest.json"],!1));if(!("animations"in e))throw Error("Manifest not found");if(0===e.animations.length)throw Error("No animations listed in manifest");return e})(e),i=[],r=[],{length:a}=s.animations,n="animations";("2"===s.version||e[`a/${s.animations[0]?.id}.json`])&&(n="a");for(let t=0;t<a;t++){let a=JSON.parse(aF(av(e[`${n}/${s.animations[t]?.id}.json`]))),{length:o}=a.layers;for(let t=0;t<o;t++){let{ks:e}=a.layers[t]??{},s=Object.keys(e),{length:i}=s;for(let r=0;r<i;r++){let{e:i,x:n}=e[s[r]];if(!n||!i)continue;let o=a.layers[t]?.ks[s[r]];o&&(o.x=atob(n))}}r.push(aT(e,a.assets)),i.push(a)}return await Promise.all(r),{data:i,manifest:s}}async function aI(t){try{if(!t||"string"!=typeof t&&"object"!=typeof t)throw Error("Broken file or invalid file format");if("string"!=typeof t)return{animations:Array.isArray(t)?t:[t],isDotLottie:!1,manifest:null};let e=await fetch(t,{headers:{"Content-Type":"application/json; charset=UTF-8"}});if(!e.ok)throw Error(e.statusText);let s=!0,i=e.headers.get("content-type");if("application/zip+dotlottie"===i&&(s=!1),s){let s=P(t);if("json"===s)return{animations:[await e.json()],isDotLottie:!1,manifest:null};let i=await e.clone().text();try{return{animations:[JSON.parse(i)],isDotLottie:!1,manifest:null}}catch(t){}}let{data:r,manifest:a}=await a$(e);return{animations:r,isDotLottie:!0,manifest:a}}catch(t){return k(t),{animations:void 0,isDotLottie:!1,manifest:null}}}function aN({animation:t,fileName:e,shouldDownload:s}){try{if(!t)throw Error("createJSON: Missing or malformed required parameter(s):\n - animation\n'");let i=L("json",e)||`${C()}.json`,r=JSON.stringify(t);if(s)return M(r,{mimeType:"application/json",name:i}),null;return r}catch(t){return k(t),null}}var aB=Object.freeze({__proto__:null,addAnimation:async function({configs:t,fileName:e,generator:s,id:i,shouldDownload:r=!0,src:a}){let{animations:n=[],manifest:o={animations:a?[{id:i}]:[]}}=a?await aI(a):{};try{if(!o)throw Error("Manifest is not set");o.generator=s;let{length:i}=t;for(let e=0;e<i;e++){let{url:s}=t[e]??{},{animations:i}=await aI(s);if(!i)throw Error("No animation loaded");if(o.animations.some(s=>s.id===t[e]?.id))throw Error("Duplicate id for animation");o.animations=[...o.animations,{id:t[e]?.id??""}],n.push(...i)}return{result:await aD({animations:n,fileName:e,manifest:o,shouldDownload:r}),success:!0}}catch(t){return{error:t.message,success:!1}}},convert:async function({animations:t,currentAnimation:e=0,fileName:s,generator:i,isDotLottie:r,manifest:a,shouldDownload:n=!0,src:o,typeCheck:h}){try{if(!o&&!t?.length)throw Error("No animation to convert");let l=t;if(l||(l=(await aI(o)).animations??[]),h||r){let t=T(s||o||"converted");return l.length>1&&(t+=`-${e+1}`),t+=".json",{result:aN({animation:l[e],fileName:t,shouldDownload:n}),success:!0}}return{result:await aD({animations:l,fileName:`${T(s||o||"converted")}.lottie`,manifest:{...a??a,generator:i,version:"2"},shouldDownload:n}),success:!0}}catch(t){return{error:t.message,success:!1}}},createDotLottie:aD,createJSON:aN,getAnimationData:aI,getLottieJSON:a$,resolveAssets:aT});let az=null,aR=Symbol("UPDATE_ON_CONNECTED");v&&(global.HTMLElement=class{});class aO extends HTMLElement{constructor(){super(),aR in this&&(this[aR]=[]);const{observedProperties:t}=this.constructor,{length:e}=t;for(let s=0;s<e;s++){const e=this[t[s]],i=Symbol(t[s]);this[i]=e,Object.defineProperty(this,t[s]??"",{get(){return this[i]},set(e){let r=this[i];this[i]=e,this.propertyChangedCallback(t[s],r,e)}}),void 0!==e&&aR in this&&Array.isArray(this[aR])&&this[aR].push(t[s])}}connectedCallback(){let t=[];aR in this&&Array.isArray(this[aR])&&(t=this[aR]);let{length:e}=t;for(let s=0;s<e;s++)"propertyChangedCallback"in this&&"function"==typeof this.propertyChangedCallback&&(t[s]??""in this)&&this.propertyChangedCallback(t[s]??"",void 0,this[t[s]])}propertyChangedCallback(t,e,s){throw Error(`${this.constructor.name}: Method propertyChangedCallback is not implemented`)}}let aV=null,aq=null,aH=`
7
7
  <svg width="24" height="24" aria-hidden="true" focusable="false">
8
8
  <path
9
9
  d="m11.8 13.2-.3.3c-.5.5-1.1 1.1-1.7 1.5-.5.4-1 .6-1.5.8-.5.2-1.1.3-1.6.3s-1-.1-1.5-.3c-.6-.2-1-.5-1.4-1-.5-.6-.8-1.2-.9-1.9-.2-.9-.1-1.8.3-2.6.3-.7.8-1.2 1.3-1.6.3-.2.6-.4 1-.5.2-.2.5-.2.8-.3.3 0 .7-.1 1 0 .3 0 .6.1.9.2.9.3 1.7.9 2.4 1.5.4.4.8.7 1.1 1.1l.1.1.4-.4c.6-.6 1.2-1.2 1.9-1.6.5-.3 1-.6 1.5-.7.4-.1.7-.2 1-.2h.9c1 .1 1.9.5 2.6 1.4.4.5.7 1.1.8 1.8.2.9.1 1.7-.2 2.5-.4.9-1 1.5-1.8 2-.4.2-.7.4-1.1.4-.4.1-.8.1-1.2.1-.5 0-.9-.1-1.3-.3-.8-.3-1.5-.9-2.1-1.5-.4-.4-.8-.7-1.1-1.1h-.3zm-1.1-1.1c-.1-.1-.1-.1 0 0-.3-.3-.6-.6-.8-.9-.5-.5-1-.9-1.6-1.2-.4-.3-.8-.4-1.3-.4-.4 0-.8 0-1.1.2-.5.2-.9.6-1.1 1-.2.3-.3.7-.3 1.1 0 .3 0 .6.1.9.1.5.4.9.8 1.2.5.4 1.1.5 1.7.5.5 0 1-.2 1.5-.5.6-.4 1.1-.8 1.6-1.3.1-.3.3-.5.5-.6zM13 12c.5.5 1 1 1.5 1.4.5.5 1.1.9 1.9 1 .4.1.8 0 1.2-.1.3-.1.6-.3.9-.5.4-.4.7-.9.8-1.4.1-.5 0-.9-.1-1.4-.3-.8-.8-1.2-1.7-1.4-.4-.1-.8-.1-1.2 0-.5.1-1 .4-1.4.7-.5.4-1 .8-1.4 1.2-.2.2-.4.3-.5.5z"
10
10
  />
11
11
  </svg>
12
- `,aH=`
12
+ `,aG=`
13
13
  <svg
14
14
  width="24"
15
15
  height="24"
@@ -20,7 +20,7 @@
20
20
  d="M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z"
21
21
  />
22
22
  </svg>
23
- `,aG=`
23
+ `,aj=`
24
24
  <svg
25
25
  width="24"
26
26
  height="24"
@@ -31,40 +31,40 @@
31
31
  d="M16.8 10.8 12 15.6l-4.8-4.8h3V3.6h3.6v7.2h3zM12 15.6H3v4.8h18v-4.8h-9zm7.8 2.4h-2.4v-1.2h2.4V18z"
32
32
  />
33
33
  </svg>
34
- `,aj=`
34
+ `,aW=`
35
35
  <svg width="24" height="24" aria-hidden="true" focusable="false">
36
36
  <path
37
37
  d="M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z"
38
38
  />
39
39
  </svg>
40
- `,aW=`
40
+ `,aY=`
41
41
  <svg width="24" height="24" aria-hidden="true" focusable="false">
42
42
  <path d="m6.1 5.8 9.8 6.2-9.8 6.2V5.8zM16.4 5.8h1.5v12.4h-1.5z" />
43
43
  </svg>
44
- `,aY=`
44
+ `,aJ=`
45
45
  <svg width="24" height="24" aria-hidden="true" focusable="false">
46
46
  <path
47
47
  d="M14.016 5.016H18v13.969h-3.984V5.016zM6 18.984V5.015h3.984v13.969H6z"
48
48
  />
49
49
  </svg>
50
- `,aJ=`
50
+ `,aU=`
51
51
  <svg width="24" height="24" aria-hidden="true" focusable="false">
52
52
  <path d="M8.016 5.016L18.985 12 8.016 18.984V5.015z" />
53
53
  </svg>
54
- `,aU=`
54
+ `,aX=`
55
55
  <svg width="24" height="24" aria-hidden="true" focusable="false">
56
56
  <path d="M17.9 18.2 8.1 12l9.8-6.2v12.4zm-10.3 0H6.1V5.8h1.5v12.4z" />
57
57
  </svg>
58
- `,aX=`
58
+ `,aZ=`
59
59
  <svg width="24" height="24" aria-hidden="true" focusable="false">
60
60
  <circle cx="12" cy="5.4" r="2.5" />
61
61
  <circle cx="12" cy="12" r="2.5" />
62
62
  <circle cx="12" cy="18.6" r="2.5" />
63
63
  </svg>
64
- `,aZ=`
64
+ `,aK=`
65
65
  <svg width="24" height="24" aria-hidden="true" focusable="false">
66
66
  <path d="M6 6h12v12H6V6z" />
67
67
  </svg>
68
- `;var aK=((X={}).Contain="contain",X.Cover="cover",X.Fill="fill",X.None="none",X.ScaleDown="scale-down",X),aQ=((Z={}).Pause="pause",Z.Reverse="reverse",Z.Stop="stop",Z.Void="void",Z),a0=((K={}).Completed="completed",K.Destroyed="destroyed",K.Error="error",K.Frozen="frozen",K.Loading="loading",K.Paused="paused",K.Playing="playing",K.Stopped="stopped",K);let a1="dotlottie-player";function a2(t,e){let s=e===a0.Playing||e===a0.Paused;t.dataset.active=s.toString(),t.innerHTML=e===a0.Playing?aY:aJ}var a3=Object.freeze({__proto__:null,default:function(){if(!this.shadow)throw Error("No Shadow Element");let t=this.shadow.querySelector("slot[name=controls]");if(!t)return;if(!this.controls){t.innerHTML="";return}t.innerHTML=`<div class="lottie-controls toolbar ${this.playerState===a0.Error?"has-error":""}" aria-label="Lottie Animation controls"><button class="togglePlay" data-active="${this.autoplay}" aria-label="Toggle Play/Pause">${aJ}</button> <button class="stop" data-active="${!this.autoplay}" aria-label="Stop">${aZ}</button> <button class="prev" aria-label="Previous animation" hidden="false">${aU}</button> <button class="next" aria-label="Next animation" hidden>${aW}</button><form class="progress-container${this.simple?" simple":""}"><input type="range" class="seeker" min="0" max="100" step="1" value="${this._seeker.toString()}" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${this._seeker.toString()}" tabindex="0" aria-label="Slider for search"><progress max="100" value="${this._seeker}"></progress></form>${this.simple?"":`<button class="toggleLoop" data-active="${this.loop}" tabindex="0" aria-label="Toggle loop">${aj}</button> <button class="toggleBoomerang" data-active="${this.mode===te.Bounce}" aria-label="Toggle boomerang" tabindex="0">${aq}</button> <button class="toggleSettings" aria-label="Settings" aria-haspopup="true" aria-expanded="${this._isSettingsOpen}" aria-controls="${this._identifier}-settings">${aX}</button><div id="${this._identifier}-settings" class="popover" hidden><button class="convert" aria-label="Convert JSON animation to dotLottie format" aria-label="Convert ${this.isDotLottie?"dotLottie animation to JSON format":"JSON animation to dotLottie format"}" hidden>${aH} ${this.isDotLottie?"Convert to JSON":"Convert to dotLottie"}</button> <button class="snapshot" aria-label="Download still image">${aG} Download still image</button></div>`}</div>`;let e=this.shadow.querySelector(".togglePlay");e instanceof HTMLButtonElement&&(e.onclick=this.togglePlay);let s=this.shadow.querySelector(".stop");s instanceof HTMLButtonElement&&(s.onclick=this.stop);let i=this.shadow.querySelector(".prev");i instanceof HTMLButtonElement&&(this.animations.length>0&&this.currentAnimation&&(i.hidden=!1),i.onclick=this.prev);let r=this.shadow.querySelector(".next");r instanceof HTMLButtonElement&&(this.animations.length>0&&this.currentAnimation<this.animations.length-1&&(r.hidden=!1),r.onclick=this.next);let a=this.shadow.querySelector(".seeker");if(a instanceof HTMLInputElement&&(a.onchange=this._handleSeekChange,a.onmousedown=this._freeze),!this.simple){let t=this.shadow.querySelector(".toggleLoop");t instanceof HTMLButtonElement&&(t.onclick=this.toggleLoop);let e=this.shadow.querySelector(".toggleBoomerang");e instanceof HTMLButtonElement&&(e.onclick=this.toggleBoomerang);let s=this.shadow.querySelector(".convert");s instanceof HTMLButtonElement&&(s.onclick=async()=>{s.disabled=!0;try{let{convert:t}=await (aO?Promise.resolve(aO):aV=aV??(async()=>{let{addAnimation:t,convert:e}=await Promise.resolve().then(function(){return aB});return aO={addAnimation:t,convert:e},{addAnimation:t,convert:e}})());await t({isDotLottie:this.isDotLottie,manifest:this.getManifest(),src:this.src||this.source})}finally{s.disabled=!1}});let i=this.shadow.querySelector(".snapshot");i instanceof HTMLButtonElement&&(i.onclick=()=>this.snapshot(!0));let r=this.shadow.querySelector(".toggleSettings");r instanceof HTMLButtonElement&&(r.onclick=this._handleSettingsClick,r.onblur=this._handleBlur)}},updatePlayPauseButton:a2});async function a5(){if(!this.shadow||!this.template)throw Error("No Shadow Element or Template");this.template.innerHTML=`<div class="animation-container main" data-controls="${this.controls??!1}" lang="${this.description?document.documentElement.lang:"en"}" data-loaded="${this._playerState.loaded}"><figure class="animation" style="background:${this.background}" ${this.description?`
68
+ `;var aQ=((X={}).Contain="contain",X.Cover="cover",X.Fill="fill",X.None="none",X.ScaleDown="scale-down",X),a0=((Z={}).Pause="pause",Z.Reverse="reverse",Z.Stop="stop",Z.Void="void",Z),a1=((K={}).Completed="completed",K.Destroyed="destroyed",K.Error="error",K.Frozen="frozen",K.Loading="loading",K.Paused="paused",K.Playing="playing",K.Stopped="stopped",K);let a2="dotlottie-player";function a3(t,e){let s=e===a1.Playing||e===a1.Paused;t.dataset.active=s.toString(),t.innerHTML=e===a1.Playing?aJ:aU}var a5=Object.freeze({__proto__:null,renderControls:function(){if(!this.shadow)throw Error("No Shadow Element");let t=this.shadow.querySelector("slot[name=controls]");if(!t)return;if(!this.controls){t.innerHTML="";return}t.innerHTML=`<div class="lottie-controls toolbar ${this.playerState===a1.Error?"has-error":""}" aria-label="Lottie Animation controls"><button class="togglePlay" data-active="${this.autoplay}" aria-label="Toggle Play/Pause">${aU}</button> <button class="stop" data-active="${!this.autoplay}" aria-label="Stop">${aK}</button> <button class="prev" aria-label="Previous animation" hidden="false">${aX}</button> <button class="next" aria-label="Next animation" hidden>${aY}</button><form class="progress-container${this.simple?" simple":""}"><input type="range" class="seeker" min="0" max="100" step="1" value="${this._seeker.toString()}" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${this._seeker.toString()}" tabindex="0" aria-label="Slider for search"><progress max="100" value="${this._seeker}"></progress></form>${this.simple?"":`<button class="toggleLoop" data-active="${this.loop}" tabindex="0" aria-label="Toggle loop">${aW}</button> <button class="toggleBoomerang" data-active="${this.mode===te.Bounce}" aria-label="Toggle boomerang" tabindex="0">${aH}</button> <button class="toggleSettings" aria-label="Settings" aria-haspopup="true" aria-expanded="${this._isSettingsOpen}" aria-controls="${this._identifier}-settings">${aZ}</button><div id="${this._identifier}-settings" class="popover" hidden><button class="convert" aria-label="Convert JSON animation to dotLottie format" aria-label="Convert ${this.isDotLottie?"dotLottie animation to JSON format":"JSON animation to dotLottie format"}" hidden>${aG} ${this.isDotLottie?"Convert to JSON":"Convert to dotLottie"}</button> <button class="snapshot" aria-label="Download still image">${aj} Download still image</button></div>`}</div>`;let e=this.shadow.querySelector(".togglePlay");e instanceof HTMLButtonElement&&(e.onclick=this.togglePlay);let s=this.shadow.querySelector(".stop");s instanceof HTMLButtonElement&&(s.onclick=this.stop);let i=this.shadow.querySelector(".prev");i instanceof HTMLButtonElement&&(this.animations.length>0&&this.currentAnimation&&(i.hidden=!1),i.onclick=this.prev);let r=this.shadow.querySelector(".next");r instanceof HTMLButtonElement&&(this.animations.length>0&&this.currentAnimation<this.animations.length-1&&(r.hidden=!1),r.onclick=this.next);let a=this.shadow.querySelector(".seeker");if(a instanceof HTMLInputElement&&(a.onchange=this._handleSeekChange,a.onmousedown=this._freeze),!this.simple){let t=this.shadow.querySelector(".toggleLoop");t instanceof HTMLButtonElement&&(t.onclick=this.toggleLoop);let e=this.shadow.querySelector(".toggleBoomerang");e instanceof HTMLButtonElement&&(e.onclick=this.toggleBoomerang);let s=this.shadow.querySelector(".convert");s instanceof HTMLButtonElement&&(s.onclick=async()=>{s.disabled=!0;try{let{convert:t}=await (aV?Promise.resolve(aV):aq=aq??(async()=>{let{addAnimation:t,convert:e}=await Promise.resolve().then(function(){return aB});return aV={addAnimation:t,convert:e},{addAnimation:t,convert:e}})());await t({isDotLottie:this.isDotLottie,manifest:this.getManifest(),src:this.src||this.source})}finally{s.disabled=!1}});let i=this.shadow.querySelector(".snapshot");i instanceof HTMLButtonElement&&(i.onclick=()=>this.snapshot(!0));let r=this.shadow.querySelector(".toggleSettings");r instanceof HTMLButtonElement&&(r.onclick=this._handleSettingsClick,r.onblur=this._handleBlur)}},updatePlayPauseButton:a3});async function a4(){if(!this.shadow||!this.template)throw Error("No Shadow Element or Template");this.template.innerHTML=`<div class="animation-container main" data-controls="${this.controls??!1}" lang="${this.description?document.documentElement.lang:"en"}" data-loaded="${this._playerState.loaded}"><figure class="animation" style="background:${this.background}" ${this.description?`
69
69
  aria-label="${this.description}"
70
- `:""}></figure><slot name="controls"></slot></div>`,this.shadow.adoptedStyleSheets=[await ne.styles()],this.shadow.appendChild(this.template.content.cloneNode(!0))}let a4=t=>{let e={message:"Unknown error",status:v?500:400};return t&&"object"==typeof t&&("message"in t&&"string"==typeof t.message&&(e.message=t.message),"status"in t&&(e.status=Number(t.status))),e},a6=(t,e)=>null!=t&&Object.keys(e).filter(t=>Number.isNaN(Number(t))).some(s=>e[s]===t),a8=t=>null!==t&&["true","","1"].includes(t),a9=null,a7="Method is not implemented",nt=async()=>{let t=new CSSStyleSheet;return await t.replace("* {\n box-sizing: border-box;\n}\n\n:host {\n --lottie-player-toolbar-height: 35px;\n --lottie-player-toolbar-background-color: #fff;\n --lottie-player-toolbar-icon-color: #000;\n --lottie-player-toolbar-icon-hover-color: #000;\n --lottie-player-toolbar-icon-active-color: #4285f4;\n --lottie-player-seeker-track-color: rgb(0 0 0 / 20%);\n --lottie-player-seeker-thumb-color: #4285f4;\n --lottie-player-seeker-display: block;\n\n width: 100%;\n height: 100%;\n\n &:not([hidden]) {\n display: block;\n }\n\n .main {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n }\n\n .animation {\n width: 100%;\n height: 100%;\n display: flex;\n margin: 0;\n padding: 0;\n }\n\n [data-controls='true'] .animation {\n height: calc(100% - 35px);\n }\n\n .animation-container {\n position: relative;\n }\n\n .popover {\n position: absolute;\n right: 5px;\n bottom: 40px;\n background-color: var(--lottie-player-toolbar-background-color);\n border-radius: 5px;\n padding: 10px 15px;\n border: solid 2px var(--lottie-player-toolbar-icon-color);\n animation: fade-in 0.2s ease-in-out;\n\n &::before {\n content: '';\n right: 10px;\n border: 7px solid transparent;\n margin-right: -7px;\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n top: 100%;\n border-top-color: var(--lottie-player-toolbar-icon-color);\n }\n }\n\n .error {\n display: flex;\n margin: auto;\n justify-content: center;\n height: 100%;\n align-items: center;\n\n & svg {\n width: 100%;\n height: auto;\n }\n }\n\n .toolbar {\n display: flex;\n place-items: center center;\n background: var(--lottie-player-toolbar-background-color);\n margin: 0;\n height: 35px;\n padding: 5px;\n border-radius: 5px;\n gap: 5px;\n\n &.has-error {\n pointer-events: none;\n opacity: 0.5;\n }\n\n & button {\n cursor: pointer;\n fill: var(--lottie-player-toolbar-icon-color);\n color: var(--lottie-player-toolbar-icon-color);\n background: none;\n border: 0;\n padding: 0;\n outline: 0;\n height: 100%;\n margin: 0;\n align-items: center;\n gap: 5px;\n opacity: 0.9;\n\n &:not([hidden]) {\n display: flex;\n }\n\n &:hover {\n opacity: 1;\n }\n\n &[data-active='true'] {\n opacity: 1;\n fill: var(--lottie-player-toolbar-icon-active-color);\n }\n\n &:disabled {\n opacity: 0.5;\n }\n\n &:focus {\n outline: 0;\n }\n\n & svg {\n pointer-events: none;\n\n & > * {\n fill: inherit;\n }\n }\n\n &.disabled svg {\n display: none;\n }\n }\n }\n\n .progress-container {\n position: relative;\n width: 100%;\n\n &.simple {\n margin-right: 12px;\n }\n }\n\n & progress {\n appearance: none;\n outline: none;\n position: absolute;\n width: 100%;\n height: 5px;\n border-radius: 3px;\n border: 0;\n top: 0;\n left: 0;\n margin: 7.5px 0;\n background-color: var(--lottie-player-seeker-track-color);\n pointer-events: none;\n\n &::-webkit-progress-inner-element {\n border-radius: 3px;\n overflow: hidden;\n }\n\n &::-webkit-slider-runnable-track {\n background-color: transparent;\n }\n\n &::-webkit-progress-value {\n background-color: var(--lottie-player-seeker-thumb-color);\n }\n }\n\n .seeker {\n appearance: none;\n outline: none;\n width: 100%;\n height: 20px;\n border-radius: 3px;\n border: 0;\n cursor: pointer;\n background-color: transparent;\n\n display: var(--lottie-player-seeker-display);\n color: var(--lottie-player-seeker-thumb-color);\n margin: 0;\n padding: 7.5px 0;\n position: relative;\n z-index: 1;\n\n &::-webkit-slider-runnable-track,\n &::-webkit-slider-thumb {\n appearance: none;\n outline: none;\n }\n\n &::-webkit-slider-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n border: 0;\n background-color: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -webkit-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-webkit-slider-thumb,\n &:focus::-webkit-slider-thumb {\n transform: scale(1);\n }\n\n &::-moz-range-progress {\n background-color: var(--lottie-player-seeker-thumb-color);\n height: 5px;\n border-radius: 3px;\n }\n\n &::-moz-range-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background-color: var(--lottie-player-seeker-thumb-color);\n border: 0;\n cursor: pointer;\n -moz-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-moz-range-thumb,\n &:focus::-moz-range-thumb {\n transform: scale(1);\n }\n\n &::-ms-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: transparent;\n border-color: transparent;\n color: transparent;\n }\n\n &::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n\n &::-ms-fill-lower {\n background-color: var(--lottie-player-seeker-thumb-color);\n border-radius: 3px;\n }\n\n &::-ms-thumb {\n border: 0;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -ms-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-ms-thumb {\n transform: scale(1);\n }\n\n &:focus {\n &::-ms-thumb {\n transform: scale(1);\n }\n\n &::-ms-fill-lower,\n &::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n }\n }\n }\n\n & *::-moz-progress-bar {\n background-color: var(--lottie-player-seeker-thumb-color);\n }\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n :host {\n --lottie-player-toolbar-background-color: #000;\n --lottie-player-toolbar-icon-color: #fff;\n --lottie-player-toolbar-icon-hover-color: #fff;\n --lottie-player-seeker-track-color: rgb(255 255 255 / 60%);\n }\n}\n"),t};class ne extends aR{static get observedAttributes(){return["animateOnScroll","autoplay","controls","direction","hover","loop","mode","playOnClick","playOnVisible","selector","speed","src","subframe"]}static get observedProperties(){return["playerState","_isSettingsOpen","_seeker","_currentAnimation","_animations"]}static get styles(){return nt}set animateOnScroll(t){this.setAttribute("animateOnScroll",(!!t).toString())}get animateOnScroll(){return a8(this.getAttribute("animateOnScroll"))}get animations(){return this._animations}set autoplay(t){this.setAttribute("autoplay",(!!t).toString())}get autoplay(){return a8(this.getAttribute("autoplay"))}set background(t){this.setAttribute("background",t)}get background(){return this.getAttribute("background")||"transparent"}set controls(t){this.setAttribute("controls",(!!t).toString())}get controls(){return a8(this.getAttribute("controls"))}set count(t){this.setAttribute("count",t.toString())}get count(){let t=this.getAttribute("count");return t?Number(t):0}get currentAnimation(){return this._currentAnimation}set delay(t){this.setAttribute("delay",t.toString())}get delay(){let t=this.getAttribute("delay");return t?Number(t):0}set description(t){t&&this.setAttribute("description",t)}get description(){return this.getAttribute("description")}set direction(t){this.setAttribute("direction",t.toString())}get direction(){let t=Number(this.getAttribute("direction"));return -1===t?t:1}set dontFreezeOnBlur(t){this.setAttribute("dontFreezeOnBlur",(!!t).toString())}get dontFreezeOnBlur(){return a8(this.getAttribute("dontFreezeOnBlur"))}set hover(t){this.setAttribute("hover",(!!t).toString())}get hover(){return a8(this.getAttribute("hover"))}set intermission(t){this.setAttribute("intermission",t.toString())}get intermission(){let t=Number(this.getAttribute("intermission"));return isNaN(t)?0:t}get isDotLottie(){return this._isDotLottie}set loop(t){this.setAttribute("loop",(!!t).toString())}get loop(){return a8(this.getAttribute("loop"))}set mode(t){this.setAttribute("mode",t)}get mode(){let t=this.getAttribute("mode");return t===te.Bounce?t:te.Normal}set mouseout(t){this.setAttribute("mouseout",t)}get mouseout(){let t=this.getAttribute("mouseout");switch(t){case aQ.Void:case aQ.Pause:case aQ.Reverse:return t;default:return aQ.Stop}}set objectfit(t){this.setAttribute("objectfit",t)}get objectfit(){let t=this.getAttribute("objectfit");return a6(t,aK)?t:aK.Contain}set once(t){this.setAttribute("once",(!!t).toString())}get once(){return a8(this.getAttribute("once"))}set playOnClick(t){this.setAttribute("playOnClick",(!!t).toString())}get playOnClick(){return a8(this.getAttribute("playOnClick"))}set playOnVisible(t){this.setAttribute("playOnVisible",(!!t).toString())}get playOnVisible(){return a8(this.getAttribute("playOnVisible"))}set preserveAspectRatio(t){this.setAttribute("preserveAspectRatio",t||ti.Contain)}get preserveAspectRatio(){let t=this.getAttribute("preserveAspectRatio");return a6(t,ti)?t:null}set quiet(t){this.setAttribute("quiet",(!!t).toString())}get quiet(){return a8(this.getAttribute("quiet"))}set renderer(t){this.setAttribute("renderer",t)}get renderer(){let t=this.getAttribute("renderer");return t===tr.Canvas||t===tr.HTML?t:tr.SVG}set selector(t){t?this.setAttribute("selector",t):this.removeAttribute("selector")}get selector(){return this.getAttribute("selector")}set simple(t){this.setAttribute("simple",(!!t).toString())}get simple(){return a8(this.getAttribute("simple"))}set speed(t){this.setAttribute("speed",t.toString())}get speed(){let t=this.getAttribute("speed");return null===t||isNaN(Number(t))?1:Number(t)}set src(t){this.setAttribute("src",t||"")}get src(){return this.getAttribute("src")}set subframe(t){this.setAttribute("subframe",(!!t).toString())}get subframe(){return a8(this.getAttribute("subframe"))}constructor(){super(),this.isLight=!1,this.playerState=a0.Loading,this._container=null,this._DOMRect=null,this._errorMessage="Something went wrong",this._identifier=this.id||C(),this._isSettingsOpen=!1,this._playerState={count:0,loaded:!1,prev:a0.Loading,scrollTimeout:null,scrollY:0,visible:!1},this._render=a5,this._seeker=0,this._animations=[],this._controlsLoadId=0,this._currentAnimation=0,this._errorLoadId=0,this._isBounce=!1,this._isDotLottie=!1,this._lottieInstance=null,this._multiAnimationSettings=[],this._renderControls=async()=>{let t=this.shadow?.querySelector("slot[name=controls]");if(!t)return;if(!this.controls){t.innerHTML="";return}let e=++this._controlsLoadId,{default:i}=await (s=s??Promise.resolve().then(function(){return a3}));e===this._controlsLoadId&&i.call(this)},this._complete=this._complete.bind(this),this._dataFailed=this._dataFailed.bind(this),this._dataReady=this._dataReady.bind(this),this._DOMLoaded=this._DOMLoaded.bind(this),this._enterFrame=this._enterFrame.bind(this),this._freeze=this._freeze.bind(this),this._handleBlur=this._handleBlur.bind(this),this._handleClick=this._handleClick.bind(this),this._handleScroll=this._handleScroll.bind(this),this._handleSeekChange=this._handleSeekChange.bind(this),this._handleWindowBlur=this._handleWindowBlur.bind(this),this._loopComplete=this._loopComplete.bind(this),this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._switchInstance=this._switchInstance.bind(this),this._handleSettingsClick=this._handleSettingsClick.bind(this),this.togglePlay=this.togglePlay.bind(this),this.stop=this.stop.bind(this),this.prev=this.prev.bind(this),this.next=this.next.bind(this),this.snapshot=this.snapshot.bind(this),this.toggleLoop=this.toggleLoop.bind(this),this.toggleBoomerang=this.toggleBoomerang.bind(this),this.destroy=this.destroy.bind(this),this.template=document.createElement("template"),this.shadow=this.attachShadow({mode:"open"})}addAnimation(t){throw Error(a7)}async attributeChangedCallback(t,e,s){if(this._lottieInstance&&this.shadow&&this._container)switch(t){case"animateOnScroll":if(""===s||s){this._lottieInstance.autoplay=!1,addEventListener("scroll",this._handleScroll,{capture:!0,passive:!0});return}removeEventListener("scroll",this._handleScroll,!0);break;case"autoplay":if(this.animateOnScroll||this.playOnVisible)return;if(""===s||s)return void this.play();this.stop();break;case"controls":await this._renderControls();break;case"direction":if(-1===Number(s))return void this.setDirection(-1);this.setDirection(1);break;case"hover":if(""===s||s){this._container.addEventListener("mouseenter",this._mouseEnter),this._container.addEventListener("mouseleave",this._mouseLeave);return}this._container.removeEventListener("mouseenter",this._mouseEnter),this._container.removeEventListener("mouseleave",this._mouseLeave);break;case"loop":{let t=this.shadow.querySelector(".toggleLoop");t instanceof HTMLButtonElement&&(t.dataset.active=s),this.setLoop(""===s||!!s);break}case"mode":{let t=this.shadow.querySelector(".toggleBoomerang");if(!a6(s,te))break;t instanceof HTMLButtonElement&&(t.dataset.active=(s===te.Bounce).toString()),this._isBounce=s===te.Bounce;break}case"playOnClick":if(""===s||s){this._lottieInstance.autoplay=!1,this._container.addEventListener("click",this._handleClick);return}this._container.removeEventListener("click",this._handleClick);break;case"playOnVisible":(""===s||s)&&(this._lottieInstance.autoplay=!1);break;case"selector":{let t=document.getElementById(this.selector??"");t?.addEventListener("click",this._handleClick);break}case"speed":{let t=Number(s);t&&!isNaN(t)&&this.setSpeed(t);break}case"src":await this.load(s);break;case"subframe":this.setSubframe(""===s||!!s)}}connectedCallback(){super.connectedCallback();try{(async()=>{if(await this._render(),!this.shadow)throw Error("Missing Shadow element");this._container=this.shadow.querySelector(".animation"),await this.load(this.src),void 0!==document.hidden&&document.addEventListener("visibilitychange",this._onVisibilityChange),this._container&&(this._DOMRect=this._container.getBoundingClientRect()),this._addIntersectionObserver(),this.dispatchEvent(new CustomEvent(ts.Rendered))})()}catch(t){this._handleError(t)}}convert(t){throw Error(a7)}destroy(){this._lottieInstance?.destroy&&(this.playerState=a0.Destroyed,this._lottieInstance.destroy(),this._lottieInstance=null,this.dispatchEvent(new CustomEvent(ts.Destroyed)),this.remove(),document.removeEventListener("visibilitychange",this._onVisibilityChange))}disconnectedCallback(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0),document.removeEventListener("visibilitychange",this._onVisibilityChange),this.destroy()}getLottie(){return this._lottieInstance}getManifest(){return this._manifest}getMultiAnimationSettings(){return this._multiAnimationSettings}getSegment(){return this._segment}async load(t){try{if(!this.shadowRoot||!t)return;this.source=t;let{animations:e,isDotLottie:s,manifest:i}=await aI(t);if(!e||e.some(t=>!["v","ip","op","layers","fr","w","h"].every(e=>Object.hasOwn(t,e))))throw Error("Broken or corrupted file");let r=this.parentElement?.querySelector('script[type="application/ld+json"]');if(r){let t=JSON.parse(r.innerHTML);t.selector&&(this.selector=t.selector),t.segment&&this.setSegment(t.segment),t.multiAnimationSettings&&this.setMultiAnimationSettings(t.multiAnimationSettings)}this._isBounce=this.mode===te.Bounce,this._multiAnimationSettings.length>0&&this._multiAnimationSettings[this._currentAnimation]?.mode&&(this._isBounce=this._multiAnimationSettings[this._currentAnimation]?.mode===te.Bounce);let a=i?.animations[0];a&&(a.autoplay=!this.animateOnScroll&&!this.playOnVisible&&this.autoplay,a.loop=this.loop),this._isDotLottie=s,this._animations=e,this._manifest=i??{animations:[{autoplay:!this.animateOnScroll&&!this.playOnVisible&&this.autoplay,direction:this.direction,id:C(),loop:this.loop,mode:this.mode,speed:this.speed}]},this._clearPrevious(),this.playerState=a0.Stopped,!this.animateOnScroll&&(this.autoplay||this._multiAnimationSettings[this._currentAnimation]?.autoplay||this.playOnVisible)&&(this.playerState=a0.Playing),this._lottieInstance=this.loadAnimation({...this._getOptions(),animationData:e[this._currentAnimation]}),this._addEventListeners();let n=this._multiAnimationSettings[this._currentAnimation]?.speed??this.speed,o=this._multiAnimationSettings[this._currentAnimation]?.direction??this.direction;this._lottieInstance.setSpeed(n),this._lottieInstance.setDirection(o),this._lottieInstance.setSubframe(!!this.subframe),(this.autoplay||this.animateOnScroll||this.playOnVisible)&&-1===this.direction&&this.seek("99%"),await this._renderControls()}catch(t){await this._handleError(t)}}loadAnimation(t){throw Error(a7)}next(){this._currentAnimation++,this._switchInstance()}pause(){if(!this._lottieInstance)return;this._playerState.prev=this.playerState;let t=!1;try{this._lottieInstance.pause(),this.dispatchEvent(new CustomEvent(ts.Pause))}catch(e){t=!0,console.error(e)}finally{this.playerState=t?a0.Error:a0.Paused}}play(){if(!this._lottieInstance)return;this._playerState.prev=this.playerState;let t=!1;try{this._lottieInstance.play(),this.dispatchEvent(new CustomEvent(ts.Play))}catch(e){t=!0,console.error(e)}finally{this.playerState=t?a0.Error:a0.Playing}}prev(){this._currentAnimation--,this._switchInstance(!0)}propertyChangedCallback(t,e,s){if(!this.shadow)return;let i=this.shadow.querySelector(".togglePlay"),r=this.shadow.querySelector(".stop"),a=this.shadow.querySelector(".prev"),n=this.shadow.querySelector(".next"),o=this.shadow.querySelector(".seeker"),h=this.shadow.querySelector("progress"),l=this.shadow.querySelector(".popover"),m=this.shadow.querySelector(".convert"),p=this.shadow.querySelector(".snapshot");i instanceof HTMLButtonElement&&r instanceof HTMLButtonElement&&n instanceof HTMLButtonElement&&a instanceof HTMLButtonElement&&o instanceof HTMLInputElement&&h instanceof HTMLProgressElement&&("playerState"===t&&(a2(i,s),r.dataset.active=(s===a0.Stopped).toString()),"_seeker"===t&&"number"==typeof s&&(o.value=s.toString(),o.ariaValueNow=s.toString(),h.value=s),"_animations"===t&&Array.isArray(s)&&this._currentAnimation+1<s.length&&(n.hidden=!1),"_currentAnimation"===t&&"number"==typeof s&&(n.hidden=s+1>=this._animations.length,a.hidden=!s),"_isSettingsOpen"===t&&"boolean"==typeof s&&l instanceof HTMLDivElement&&m instanceof HTMLButtonElement&&p instanceof HTMLButtonElement&&(l.hidden=!s,m.hidden=this.isLight,p.hidden=this.renderer!==tr.SVG))}async reload(){this._lottieInstance&&this.src&&(this._lottieInstance.destroy(),await this.load(this.src))}seek(t){if(!this._lottieInstance)return;let e=t.toString().match(/^(\d+)(%?)$/);if(!e)return;let s=Math.round("%"===e[2]?this._lottieInstance.totalFrames*Number(e[1])/100:Number(e[1]));if(this._seeker=s,this.playerState===a0.Playing||this.playerState===a0.Frozen&&this._playerState.prev===a0.Playing){this._lottieInstance.goToAndPlay(s,!0),this.playerState=a0.Playing;return}this._lottieInstance.goToAndStop(s,!0),this._lottieInstance.pause()}setCount(t){this.count=t}setDirection(t){this._lottieInstance&&this._lottieInstance.setDirection(t)}setLoop(t){this._lottieInstance&&this._lottieInstance.setLoop(t)}setMultiAnimationSettings(t){this._multiAnimationSettings=t}setSegment(t){this._segment=t}setSpeed(t=1){this._lottieInstance&&this._lottieInstance.setSpeed(t)}setSubframe(t){this._lottieInstance&&this._lottieInstance.setSubframe(t)}snapshot(t=!0,e="AM Lottie"){try{if(!this.shadowRoot)throw Error("Unknown error");let s=this.shadowRoot.querySelector(".animation svg");if(!s)throw Error("Could not retrieve animation from DOM");let i=s instanceof Node?new XMLSerializer().serializeToString(s):null;if(!i)throw Error("Could not serialize SVG element");return t&&M(i,{mimeType:"image/svg+xml",name:`${T(this.src||e)}-${((this._seeker??0)+1).toString().padStart(3,"0")}.svg`}),i}catch(t){return console.error(t),null}}stop(){if(this._lottieInstance){this._playerState.prev=this.playerState,this._playerState.count=0;try{this._lottieInstance.stop(),this.dispatchEvent(new CustomEvent(ts.Stop))}finally{this.playerState=a0.Stopped}}}toggleBoomerang(){let t=this._multiAnimationSettings[this._currentAnimation]??{};if(void 0!==t.mode){if(t.mode===te.Normal){t.mode=te.Bounce,this._isBounce=!0;return}t.mode=te.Normal,this._isBounce=!1;return}if(this.mode===te.Normal){this.mode=te.Bounce,this._isBounce=!0;return}this.mode=te.Normal,this._isBounce=!1}toggleLoop(){let t=!this.loop;this.loop=t,this.setLoop(t)}togglePlay(){if(!this._lottieInstance)return;let{currentFrame:t,playDirection:e,totalFrames:s}=this._lottieInstance;if(this.playerState===a0.Playing)return void this.pause();if(this.playerState!==a0.Completed)return void this.play();if(this.playerState=a0.Playing,this._isBounce){this.setDirection(-1*e),this._lottieInstance.goToAndPlay(t,!0);return}-1===e?this._lottieInstance.goToAndPlay(s,!0):this._lottieInstance.goToAndPlay(0,!0)}_freeze(){if(this._lottieInstance){this._playerState.prev=this.playerState;try{this._lottieInstance.pause(),this.dispatchEvent(new CustomEvent(ts.Freeze))}finally{this.playerState=a0.Frozen}}}_handleBlur(){setTimeout(()=>{this._toggleSettings(!1)},200)}_handleClick(){(this.playOnClick||this.selector)&&this.togglePlay()}_handleSeekChange({target:t}){!(!(t instanceof HTMLInputElement)||!this._lottieInstance||isNaN(Number(t.value)))&&this.seek(Math.round(Number(t.value)/100*this._lottieInstance.totalFrames))}_handleSettingsClick({target:t}){this._toggleSettings(),t instanceof HTMLElement&&t.focus()}async _showError(){if(this.playerState!==a0.Error)return;let t=this.shadow?.querySelector(".animation"),e=this.shadow?.querySelector("slot[name=controls]");if(e&&(e.innerHTML=""),!(t instanceof HTMLElement))return;let s=++this._errorLoadId,{default:i}=await (a9=a9??Promise.resolve().then(function(){return ni}));s===this._errorLoadId&&(t.innerHTML=i(this._errorMessage))}setOptions(t){throw Error("Method not implemented")}_addEventListeners(){this._toggleEventListeners("add")}_addIntersectionObserver(){if(this._container&&!this._intersectionObserver){if(!("IntersectionObserver"in window)){this._intersectionObserverFallback(),removeEventListener("scroll",this._intersectionObserverFallback,!0),addEventListener("scroll",this._intersectionObserverFallback,{capture:!0,passive:!0});return}this._intersectionObserver=new IntersectionObserver(t=>{let{length:e}=t;for(let s=0;s<e;s++){if(!t[s]?.isIntersecting||document.hidden){this.playerState===a0.Playing&&this._freeze(),this._playerState.visible=!1;continue}this.animateOnScroll||this.playOnVisible||this.playerState!==a0.Frozen||this.play(),this.playOnVisible&&(this.playerState!==a0.Completed||this.once?setTimeout(()=>{this.play()},this.delay):(this.playerState=a0.Playing,this._lottieInstance?.goToAndPlay(1===this.direction?0:this._lottieInstance.totalFrames))),!this._playerState.scrollY&&(t[s]?.boundingClientRect.y||0)>0&&(this._playerState.scrollY=scrollY),this._playerState.visible=!0}}),this._intersectionObserver.observe(this._container)}}_clearPrevious(){this._lottieInstance?.destroy();let t=this.shadow?.querySelector(".animation");t&&(t.innerHTML="")}_complete(){if(!this._lottieInstance)return;if(this._animations.length>1){if(this._multiAnimationSettings[this._currentAnimation+1]?.autoplay)return void this.next();if(this.loop&&this._currentAnimation===this._animations.length-1){this._currentAnimation=0,this._switchInstance();return}}let{currentFrame:t,totalFrames:e}=this._lottieInstance;this._seeker=Math.round(t/e*100),this.playerState=a0.Completed,this.dispatchEvent(new CustomEvent(ts.Complete,{detail:{frame:t,seeker:this._seeker}}))}_dataFailed(){this.playerState=a0.Error,this.dispatchEvent(new CustomEvent(ts.Error))}_dataReady(){this.dispatchEvent(new CustomEvent(ts.Load))}_DOMLoaded(){this._playerState.loaded=!0,this.dispatchEvent(new CustomEvent(ts.Ready))}_enterFrame(){if(!this._lottieInstance)return;let{currentFrame:t,totalFrames:e}=this._lottieInstance;this._seeker=Math.round(t/e*100),this.dispatchEvent(new CustomEvent(ts.Frame,{detail:{frame:t,seeker:this._seeker}}))}_getOptions(){if(!this._container)throw Error("Container not rendered");let t=this.preserveAspectRatio??(t=>{switch(t){case aK.Contain:case aK.ScaleDown:return ti.Contain;case aK.Cover:return ti.Cover;case aK.Fill:return ti.Initial;case aK.None:return ti.None;default:return ti.Contain}})(this.objectfit),e=this._multiAnimationSettings.length>0?this._multiAnimationSettings[this._currentAnimation]:void 0,s=this._manifest?.animations[this._currentAnimation],i=!!this.loop;s?.loop!==void 0&&(i=!!s.loop),e?.loop!==void 0&&(i=!!e.loop);let r=!!this.autoplay;s?.autoplay!==void 0&&(r=!!s.autoplay),e?.autoplay!==void 0&&(r=!!e.autoplay),this.animateOnScroll&&(r=!1);let a=this._segment;return this._segment?.every(t=>t>0)&&(a=[this._segment[0]-1,this._segment[1]-1]),this._segment?.some(t=>t<0)&&(a=void 0),this.setOptions({container:this._container,hasAutoplay:r,hasLoop:i,initialSegment:a,preserveAspectRatio:t,rendererType:this.renderer})}async _handleError(t){this.playerState=a0.Error,this.quiet||(this._errorMessage=a4(t).message,await this._showError()),this.dispatchEvent(new CustomEvent(ts.Error)),console.error(t)}_handleScroll(){if(!this.animateOnScroll||!this._DOMRect||!this._lottieInstance)return;if(v)return void console.warn("DotLottie: Scroll animations might not work properly in a Server Side Rendering context. Try to wrap this in a client component.");if(!this._playerState.visible)return;this._playerState.scrollTimeout&&clearTimeout(this._playerState.scrollTimeout),this._playerState.scrollTimeout=setTimeout(()=>{this.playerState=a0.Paused},400);let{totalFrames:t}=this._lottieInstance,e=scrollY-this._playerState.scrollY;scrollY<=this._playerState.scrollY&&(e=this._playerState.scrollY-scrollY);let{bottom:s,height:i,top:r}=this._DOMRect,a=i-s;r>=innerHeight&&(a=i);let n=((t,e=0,s=100)=>{let i=e,r=s;if(i>r){let t=r;r=i,i=t}return Math.min(Math.max(t,i),r)})(e/(innerHeight+a)*(t-1),0,t);requestAnimationFrame(()=>{if(n>=t){this.playerState=a0.Paused;return}this.playerState=a0.Playing,this._lottieInstance?.goToAndStop(n,!0)})}_handleWindowBlur({type:t}){this.dontFreezeOnBlur||(this.playerState===a0.Playing&&"blur"===t&&this._freeze(),this.playerState===a0.Frozen&&"focus"===t&&this.play())}_intersectionObserverFallback(){if(!this._container)return;let{bottom:t,left:e,right:s,top:i}=this._container.getBoundingClientRect();this._playerState.visible=i>=0&&e>=0&&t<=innerHeight&&s<=innerWidth,(this.autoplay||this.playOnVisible||this.playerState===a0.Playing||this.playerState===a0.Frozen)&&(this._playerState.visible?this.play():this._freeze())}_loopComplete(){if(!this._lottieInstance)return;let{playDirection:t,totalFrames:e}=this._lottieInstance,s=this._segment?this._segment[0]:0,i=this._segment?this._segment[1]:e;if(this.count&&(this._isBounce?this._playerState.count+=.5:this._playerState.count+=1,this._playerState.count>=this.count)){this.setLoop(!1),this.playerState=a0.Completed,this.dispatchEvent(new CustomEvent(ts.Complete));return}return(this.dispatchEvent(new CustomEvent(ts.Loop)),this._isBounce)?(this._lottieInstance.goToAndStop(-1===t?s:.99*i,!0),this._lottieInstance.setDirection(-1*t),setTimeout(()=>{this.animateOnScroll||this._lottieInstance?.play()},this.intermission)):(this._lottieInstance.goToAndStop(-1===t?.99*i:s,!0),setTimeout(()=>{this.animateOnScroll||this._lottieInstance?.play()},this.intermission))}_mouseEnter(){if(!(!this.hover||!this._lottieInstance||"ontouchstart"in window)){if(this.mouseout===aQ.Reverse&&this._lottieInstance.setDirection(1),this.playerState===a0.Completed){this._lottieInstance.goToAndPlay(0,!0),this.playerState=a0.Playing;return}this.playerState!==a0.Playing&&this.play()}}_mouseLeave(){if(!(!this.hover||!this._lottieInstance||"ontouchstart"in window))switch(this.mouseout){case aQ.Void:break;case aQ.Pause:this.pause();break;case aQ.Reverse:this._lottieInstance.setDirection(-1),this.play();break;default:this.stop()}}_onVisibilityChange(){document.hidden&&this.playerState===a0.Playing?this._freeze():this.playerState===a0.Frozen&&this.play()}_removeEventListeners(){this._toggleEventListeners("remove")}_switchInstance(t=!1){if(this._animations[this._currentAnimation])try{if(this._lottieInstance&&this._lottieInstance.destroy(),this._lottieInstance=this.loadAnimation({...this._getOptions(),animationData:this._animations[this._currentAnimation]}),this._multiAnimationSettings[this._currentAnimation]?.mode&&(this._isBounce=this._multiAnimationSettings[this._currentAnimation]?.mode===te.Bounce),this._removeEventListeners(),this._addEventListeners(),this.dispatchEvent(new CustomEvent(t?ts.Previous:ts.Next)),this._multiAnimationSettings[this._currentAnimation]?.autoplay??this.autoplay){if(this.animateOnScroll){this._lottieInstance.goToAndStop(0,!0),this.playerState=a0.Paused;return}this._lottieInstance.goToAndPlay(0,!0),this.playerState=a0.Playing;return}this._lottieInstance.goToAndStop(0,!0),this.playerState=a0.Stopped}catch(t){this._errorMessage=a4(t).message,this.playerState=a0.Error,this.dispatchEvent(new CustomEvent(ts.Error))}}_toggleEventListeners(t){let e="add"===t?"addEventListener":"removeEventListener";if(this._lottieInstance&&(this._lottieInstance[e](ts.EnterFrame,this._enterFrame),this._lottieInstance[e](ts.Complete,this._complete),this._lottieInstance[e](ts.LoopComplete,this._loopComplete),this._lottieInstance[e](ts.DOMLoaded,this._DOMLoaded),this._lottieInstance[e](ts.DataReady,this._dataReady),this._lottieInstance[e](ts.DataFailed,this._dataFailed)),this.selector){let t=document.getElementById(this.selector);t?this.hover?(t[e]("mouseenter",this._mouseEnter),t[e]("mouseleave",this._mouseLeave)):t[e]("click",this._handleClick):this.selector=null}this._container&&!this.selector&&(this.hover&&(this._container[e]("mouseenter",this._mouseEnter),this._container[e]("mouseleave",this._mouseLeave)),this.playOnClick&&this._container[e]("click",this._handleClick)),window[e]("focus",this._handleWindowBlur,{capture:!1,passive:!0}),window[e]("blur",this._handleWindowBlur,{capture:!1,passive:!0}),this.animateOnScroll&&window[e]("scroll",this._handleScroll,{capture:!0,passive:!0})}_toggleSettings(t){if(void 0===t){this._isSettingsOpen=!this._isSettingsOpen;return}this._isSettingsOpen=t}}class ns extends ne{get renderer(){return tr.SVG}constructor(){super(),this.isLight=!0}loadAnimation(t){return iR(t)}setOptions({container:t,hasAutoplay:e,hasLoop:s,initialSegment:i,preserveAspectRatio:r}){return{autoplay:e,container:t,initialSegment:i,loop:s,renderer:tr.SVG,rendererSettings:{hideOnTransparent:!0,imagePreserveAspectRatio:r,preserveAspectRatio:r,progressiveLoad:!0}}}}globalThis.dotLottiePlayer=()=>new ns,v||customElements.define(a1,ns);var ni=Object.freeze({__proto__:null,default:function(t){return`<div class="error"><svg preserveAspectRatio="${ti.Cover}" xmlns="${y}" width="1920" height="1080" viewBox="0 0 1920 1080" style="white-space:preserve"><path fill="#fff" d="M0 0h1920v1080H0z"/><path fill="#3a6d8b" d="M1190.2 531 1007 212.4c-22-38.2-77.2-38-98.8.5L729.5 531.3c-21.3 37.9 6.1 84.6 49.5 84.6l361.9.3c43.7 0 71.1-47.3 49.3-85.2zM937.3 288.7c.2-7.5 3.3-23.9 23.2-23.9 16.3 0 23 16.1 23 23.5 0 55.3-10.7 197.2-12.2 214.5-.1 1-.9 1.7-1.9 1.7h-18.3c-1 0-1.8-.7-1.9-1.7-1.4-17.5-13.4-162.9-11.9-214.1zm24.2 283.8c-13.1 0-23.7-10.6-23.7-23.7s10.6-23.7 23.7-23.7 23.7 10.6 23.7 23.7-10.6 23.7-23.7 23.7zM722.1 644h112.6v34.4h-70.4V698h58.8v31.7h-58.8v22.6h72.4v36.2H722.1V644zm162 57.1h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5h36.4v15.6zm78.9 0h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5H963v15.6zm39.5 36.2c0-31.3 22.2-54.8 56.6-54.8 34.4 0 56.2 23.5 56.2 54.8s-21.8 54.6-56.2 54.6c-34.4-.1-56.6-23.3-56.6-54.6zm74 0c0-17.4-6.1-29.1-17.8-29.1-11.7 0-17.4 11.7-17.4 29.1 0 17.4 5.7 29.1 17.4 29.1s17.8-11.8 17.8-29.1zm83.1-36.2h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5h36.4v15.6z"/><path fill="none" d="M718.9 807.7h645v285.4h-645z"/><text fill="#3a6d8b" style="text-align:center;position:absolute;left:100%;font-size:47px;font-family:system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',sans-serif" x="50%" y="848.017" text-anchor="middle">${t}</text></svg></div>`}});t.DotLottiePlayerBase=ne,t.MouseOut=aQ,t.PlayMode=te,t.PlayerEvent=ts,t.PlayerState=a0,t.RendererType=tr,t.default=ns,t.tagName=a1,Object.defineProperty(t,"__esModule",{value:!0})}(this["@aarsteinmedia/dotlottie-player"]=this["@aarsteinmedia/dotlottie-player"]||{});
70
+ `:""}></figure><slot name="controls"></slot></div>`,this.shadow.adoptedStyleSheets=[await ns.styles()],this.shadow.appendChild(this.template.content.cloneNode(!0))}let a6=t=>{let e={message:"Unknown error",status:v?500:400};return t&&"object"==typeof t&&("message"in t&&"string"==typeof t.message&&(e.message=t.message),"status"in t&&(e.status=Number(t.status))),e},a8=(t,e)=>null!=t&&Object.keys(e).filter(t=>Number.isNaN(Number(t))).some(s=>e[s]===t),a9=t=>["v","ip","op","layers","fr","w","h"].every(e=>Object.hasOwn(t,e)),a7=t=>null!==t&&["true","","1"].includes(t),nt="Method is not implemented",ne=async()=>{let t=new CSSStyleSheet;return await t.replace("* {\n box-sizing: border-box;\n}\n\n:host {\n --lottie-player-toolbar-height: 35px;\n --lottie-player-toolbar-background-color: #fff;\n --lottie-player-toolbar-icon-color: #000;\n --lottie-player-toolbar-icon-hover-color: #000;\n --lottie-player-toolbar-icon-active-color: #4285f4;\n --lottie-player-seeker-track-color: rgb(0 0 0 / 20%);\n --lottie-player-seeker-thumb-color: #4285f4;\n --lottie-player-seeker-display: block;\n\n width: 100%;\n height: 100%;\n\n &:not([hidden]) {\n display: block;\n }\n\n .main {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n }\n\n .animation {\n width: 100%;\n height: 100%;\n display: flex;\n margin: 0;\n padding: 0;\n }\n\n [data-controls='true'] .animation {\n height: calc(100% - 35px);\n }\n\n .animation-container {\n position: relative;\n }\n\n .popover {\n position: absolute;\n right: 5px;\n bottom: 40px;\n background-color: var(--lottie-player-toolbar-background-color);\n border-radius: 5px;\n padding: 10px 15px;\n border: solid 2px var(--lottie-player-toolbar-icon-color);\n animation: fade-in 0.2s ease-in-out;\n\n &::before {\n content: '';\n right: 10px;\n border: 7px solid transparent;\n margin-right: -7px;\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n top: 100%;\n border-top-color: var(--lottie-player-toolbar-icon-color);\n }\n }\n\n .error {\n display: flex;\n margin: auto;\n justify-content: center;\n height: 100%;\n align-items: center;\n\n & svg {\n width: 100%;\n height: auto;\n }\n }\n\n .toolbar {\n display: flex;\n place-items: center center;\n background: var(--lottie-player-toolbar-background-color);\n margin: 0;\n height: 35px;\n padding: 5px;\n border-radius: 5px;\n gap: 5px;\n\n &.has-error {\n pointer-events: none;\n opacity: 0.5;\n }\n\n & button {\n cursor: pointer;\n fill: var(--lottie-player-toolbar-icon-color);\n color: var(--lottie-player-toolbar-icon-color);\n background: none;\n border: 0;\n padding: 0;\n outline: 0;\n height: 100%;\n margin: 0;\n align-items: center;\n gap: 5px;\n opacity: 0.9;\n\n &:not([hidden]) {\n display: flex;\n }\n\n &:hover {\n opacity: 1;\n }\n\n &[data-active='true'] {\n opacity: 1;\n fill: var(--lottie-player-toolbar-icon-active-color);\n }\n\n &:disabled {\n opacity: 0.5;\n }\n\n &:focus {\n outline: 0;\n }\n\n & svg {\n pointer-events: none;\n\n & > * {\n fill: inherit;\n }\n }\n\n &.disabled svg {\n display: none;\n }\n }\n }\n\n .progress-container {\n position: relative;\n width: 100%;\n\n &.simple {\n margin-right: 12px;\n }\n }\n\n & progress {\n appearance: none;\n outline: none;\n position: absolute;\n width: 100%;\n height: 5px;\n border-radius: 3px;\n border: 0;\n top: 0;\n left: 0;\n margin: 7.5px 0;\n background-color: var(--lottie-player-seeker-track-color);\n pointer-events: none;\n\n &::-webkit-progress-inner-element {\n border-radius: 3px;\n overflow: hidden;\n }\n\n &::-webkit-slider-runnable-track {\n background-color: transparent;\n }\n\n &::-webkit-progress-value {\n background-color: var(--lottie-player-seeker-thumb-color);\n }\n }\n\n .seeker {\n appearance: none;\n outline: none;\n width: 100%;\n height: 20px;\n border-radius: 3px;\n border: 0;\n cursor: pointer;\n background-color: transparent;\n\n display: var(--lottie-player-seeker-display);\n color: var(--lottie-player-seeker-thumb-color);\n margin: 0;\n padding: 7.5px 0;\n position: relative;\n z-index: 1;\n\n &::-webkit-slider-runnable-track,\n &::-webkit-slider-thumb {\n appearance: none;\n outline: none;\n }\n\n &::-webkit-slider-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n border: 0;\n background-color: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -webkit-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-webkit-slider-thumb,\n &:focus::-webkit-slider-thumb {\n transform: scale(1);\n }\n\n &::-moz-range-progress {\n background-color: var(--lottie-player-seeker-thumb-color);\n height: 5px;\n border-radius: 3px;\n }\n\n &::-moz-range-thumb {\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background-color: var(--lottie-player-seeker-thumb-color);\n border: 0;\n cursor: pointer;\n -moz-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-moz-range-thumb,\n &:focus::-moz-range-thumb {\n transform: scale(1);\n }\n\n &::-ms-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n background: transparent;\n border-color: transparent;\n color: transparent;\n }\n\n &::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n border-radius: 3px;\n }\n\n &::-ms-fill-lower {\n background-color: var(--lottie-player-seeker-thumb-color);\n border-radius: 3px;\n }\n\n &::-ms-thumb {\n border: 0;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: var(--lottie-player-seeker-thumb-color);\n cursor: pointer;\n -ms-transition: transform 0.2s ease-in-out;\n transition: transform 0.2s ease-in-out;\n transform: scale(0);\n }\n\n &:hover::-ms-thumb {\n transform: scale(1);\n }\n\n &:focus {\n &::-ms-thumb {\n transform: scale(1);\n }\n\n &::-ms-fill-lower,\n &::-ms-fill-upper {\n background: var(--lottie-player-seeker-track-color);\n }\n }\n }\n\n & *::-moz-progress-bar {\n background-color: var(--lottie-player-seeker-thumb-color);\n }\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n :host {\n --lottie-player-toolbar-background-color: #000;\n --lottie-player-toolbar-icon-color: #fff;\n --lottie-player-toolbar-icon-hover-color: #fff;\n --lottie-player-seeker-track-color: rgb(255 255 255 / 60%);\n }\n}\n"),t};class ns extends aO{static get observedAttributes(){return["animateOnScroll","autoplay","controls","direction","hover","loop","mode","playOnClick","playOnVisible","selector","speed","src","subframe"]}static get observedProperties(){return["playerState","_isSettingsOpen","_seeker","_currentAnimation","_animations"]}static get styles(){return ne}set animateOnScroll(t){this.setAttribute("animateOnScroll",(!!t).toString())}get animateOnScroll(){return a7(this.getAttribute("animateOnScroll"))}get animations(){return this._animations}set autoplay(t){this.setAttribute("autoplay",(!!t).toString())}get autoplay(){return a7(this.getAttribute("autoplay"))}set background(t){this.setAttribute("background",t)}get background(){return this.getAttribute("background")||"transparent"}set controls(t){this.setAttribute("controls",(!!t).toString())}get controls(){return a7(this.getAttribute("controls"))}set count(t){this.setAttribute("count",t.toString())}get count(){let t=this.getAttribute("count");return t?Number(t):0}get currentAnimation(){return this._currentAnimation}set delay(t){this.setAttribute("delay",t.toString())}get delay(){let t=this.getAttribute("delay");return t?Number(t):0}set description(t){t&&this.setAttribute("description",t)}get description(){return this.getAttribute("description")}set direction(t){this.setAttribute("direction",t.toString())}get direction(){let t=Number(this.getAttribute("direction"));return -1===t?t:1}set dontFreezeOnBlur(t){this.setAttribute("dontFreezeOnBlur",(!!t).toString())}get dontFreezeOnBlur(){return a7(this.getAttribute("dontFreezeOnBlur"))}set hover(t){this.setAttribute("hover",(!!t).toString())}get hover(){return a7(this.getAttribute("hover"))}set intermission(t){this.setAttribute("intermission",t.toString())}get intermission(){let t=Number(this.getAttribute("intermission"));return isNaN(t)?0:t}get isDotLottie(){return this._isDotLottie}set loop(t){this.setAttribute("loop",(!!t).toString())}get loop(){return a7(this.getAttribute("loop"))}set mode(t){this.setAttribute("mode",t)}get mode(){let t=this.getAttribute("mode");return t===te.Bounce?t:te.Normal}set mouseout(t){this.setAttribute("mouseout",t)}get mouseout(){let t=this.getAttribute("mouseout");switch(t){case a0.Void:case a0.Pause:case a0.Reverse:return t;default:return a0.Stop}}set objectfit(t){this.setAttribute("objectfit",t)}get objectfit(){let t=this.getAttribute("objectfit");return a8(t,aQ)?t:aQ.Contain}set once(t){this.setAttribute("once",(!!t).toString())}get once(){return a7(this.getAttribute("once"))}set playOnClick(t){this.setAttribute("playOnClick",(!!t).toString())}get playOnClick(){return a7(this.getAttribute("playOnClick"))}set playOnVisible(t){this.setAttribute("playOnVisible",(!!t).toString())}get playOnVisible(){return a7(this.getAttribute("playOnVisible"))}set preserveAspectRatio(t){this.setAttribute("preserveAspectRatio",t||ti.Contain)}get preserveAspectRatio(){let t=this.getAttribute("preserveAspectRatio");return a8(t,ti)?t:null}set quiet(t){this.setAttribute("quiet",(!!t).toString())}get quiet(){return a7(this.getAttribute("quiet"))}set renderer(t){this.setAttribute("renderer",t)}get renderer(){let t=this.getAttribute("renderer");return t===tr.Canvas||t===tr.HTML?t:tr.SVG}set selector(t){t?this.setAttribute("selector",t):this.removeAttribute("selector")}get selector(){return this.getAttribute("selector")}set simple(t){this.setAttribute("simple",(!!t).toString())}get simple(){return a7(this.getAttribute("simple"))}set speed(t){this.setAttribute("speed",t.toString())}get speed(){let t=this.getAttribute("speed");return null===t||isNaN(Number(t))?1:Number(t)}set src(t){this.setAttribute("src",t||"")}get src(){return this.getAttribute("src")}set subframe(t){this.setAttribute("subframe",(!!t).toString())}get subframe(){return a7(this.getAttribute("subframe"))}constructor(){super(),this.isLight=!1,this.playerState=a1.Loading,this._container=null,this._DOMRect=null,this._errorMessage="Something went wrong",this._identifier=this.id||C(),this._isSettingsOpen=!1,this._playerState={count:0,loaded:!1,prev:a1.Loading,scrollTimeout:null,scrollY:0,visible:!1},this._render=a4,this._seeker=0,this._animations=[],this._controlsLoadId=0,this._currentAnimation=0,this._errorLoadId=0,this._isBounce=!1,this._isDotLottie=!1,this._lottieInstance=null,this._multiAnimationSettings=[],this._renderControls=async()=>{let t=this.shadow?.querySelector("slot[name=controls]");if(!t)return;if(!this.controls){t.innerHTML="";return}let e=++this._controlsLoadId,{renderControls:i}=await (s=s??Promise.resolve().then(function(){return a5}));e===this._controlsLoadId&&i.call(this)},this._complete=this._complete.bind(this),this._dataFailed=this._dataFailed.bind(this),this._dataReady=this._dataReady.bind(this),this._DOMLoaded=this._DOMLoaded.bind(this),this._enterFrame=this._enterFrame.bind(this),this._freeze=this._freeze.bind(this),this._handleBlur=this._handleBlur.bind(this),this._handleClick=this._handleClick.bind(this),this._handleScroll=this._handleScroll.bind(this),this._handleSeekChange=this._handleSeekChange.bind(this),this._handleWindowBlur=this._handleWindowBlur.bind(this),this._loopComplete=this._loopComplete.bind(this),this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._switchInstance=this._switchInstance.bind(this),this._handleSettingsClick=this._handleSettingsClick.bind(this),this.togglePlay=this.togglePlay.bind(this),this.stop=this.stop.bind(this),this.prev=this.prev.bind(this),this.next=this.next.bind(this),this.snapshot=this.snapshot.bind(this),this.toggleLoop=this.toggleLoop.bind(this),this.toggleBoomerang=this.toggleBoomerang.bind(this),this.destroy=this.destroy.bind(this),this.template=document.createElement("template"),this.shadow=this.attachShadow({mode:"open"})}addAnimation(t){throw Error(nt)}async attributeChangedCallback(t,e,s){if(this._lottieInstance&&this.shadow&&this._container)switch(t){case"animateOnScroll":if(""===s||s){this._lottieInstance.autoplay=!1,addEventListener("scroll",this._handleScroll,{capture:!0,passive:!0});return}removeEventListener("scroll",this._handleScroll,!0);break;case"autoplay":if(this.animateOnScroll||this.playOnVisible)return;if(""===s||s)return void this.play();this.stop();break;case"controls":await this._renderControls();break;case"direction":if(-1===Number(s))return void this.setDirection(-1);this.setDirection(1);break;case"hover":if(""===s||s){this._container.addEventListener("mouseenter",this._mouseEnter),this._container.addEventListener("mouseleave",this._mouseLeave);return}this._container.removeEventListener("mouseenter",this._mouseEnter),this._container.removeEventListener("mouseleave",this._mouseLeave);break;case"loop":{let t=this.shadow.querySelector(".toggleLoop");t instanceof HTMLButtonElement&&(t.dataset.active=s),this.setLoop(""===s||!!s);break}case"mode":{let t=this.shadow.querySelector(".toggleBoomerang");if(!a8(s,te))break;t instanceof HTMLButtonElement&&(t.dataset.active=(s===te.Bounce).toString()),this._isBounce=s===te.Bounce;break}case"playOnClick":if(""===s||s){this._lottieInstance.autoplay=!1,this._container.addEventListener("click",this._handleClick);return}this._container.removeEventListener("click",this._handleClick);break;case"playOnVisible":(""===s||s)&&(this._lottieInstance.autoplay=!1);break;case"selector":{let t=document.getElementById(this.selector??"");t?.addEventListener("click",this._handleClick);break}case"speed":{let t=Number(s);t&&!isNaN(t)&&this.setSpeed(t);break}case"src":await this.load(s);break;case"subframe":this.setSubframe(""===s||!!s)}}connectedCallback(){super.connectedCallback();try{(async()=>{if(await this._render(),!this.shadow)throw Error("Missing Shadow element");this._container=this.shadow.querySelector(".animation"),await this.load(this.src),void 0!==document.hidden&&document.addEventListener("visibilitychange",this._onVisibilityChange),this._container&&(this._DOMRect=this._container.getBoundingClientRect()),this._addIntersectionObserver(),this.dispatchEvent(new CustomEvent(ts.Rendered))})()}catch(t){this._handleError(t)}}convert(t){throw Error(nt)}destroy(){this._lottieInstance?.destroy&&(this.playerState=a1.Destroyed,this._lottieInstance.destroy(),this._lottieInstance=null,this.dispatchEvent(new CustomEvent(ts.Destroyed)),this.remove(),document.removeEventListener("visibilitychange",this._onVisibilityChange))}disconnectedCallback(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0),document.removeEventListener("visibilitychange",this._onVisibilityChange),this.destroy()}getLottie(){return this._lottieInstance}getManifest(){return this._manifest}getMultiAnimationSettings(){return this._multiAnimationSettings}getSegment(){return this._segment}async load(t){try{if(!this.shadowRoot||!t)return;this.source=t;let{animations:e,isDotLottie:s,manifest:i}=await aI(t);if(!e?.every(a9))throw Error("Broken or corrupted file");let r=this.parentElement?.querySelector('script[type="application/ld+json"]');if(r){let t=JSON.parse(r.innerHTML);t.selector&&(this.selector=t.selector),t.segment&&this.setSegment(t.segment),t.multiAnimationSettings&&this.setMultiAnimationSettings(t.multiAnimationSettings)}this._isBounce=this.mode===te.Bounce,this._multiAnimationSettings.length>0&&this._multiAnimationSettings[this._currentAnimation]?.mode&&(this._isBounce=this._multiAnimationSettings[this._currentAnimation]?.mode===te.Bounce);let a=i?.animations[0];a&&(a.autoplay=!this.animateOnScroll&&!this.playOnVisible&&this.autoplay,a.loop=this.loop),this._isDotLottie=s,this._animations=e,this._manifest=i??{animations:[{autoplay:!this.animateOnScroll&&!this.playOnVisible&&this.autoplay,direction:this.direction,id:C(),loop:this.loop,mode:this.mode,speed:this.speed}]},this._clearPrevious(),this.playerState=a1.Stopped,!this.animateOnScroll&&(this.autoplay||this._multiAnimationSettings[this._currentAnimation]?.autoplay||this.playOnVisible)&&(this.playerState=a1.Playing),this._lottieInstance=this.loadAnimation({...this._getOptions(),animationData:e[this._currentAnimation]}),this._addEventListeners();let n=this._multiAnimationSettings[this._currentAnimation]?.speed??this.speed,o=this._multiAnimationSettings[this._currentAnimation]?.direction??this.direction;this._lottieInstance.setSpeed(n),this._lottieInstance.setDirection(o),this._lottieInstance.setSubframe(!!this.subframe),(this.autoplay||this.animateOnScroll||this.playOnVisible)&&-1===this.direction&&this.seek("99%"),await this._renderControls()}catch(t){await this._handleError(t)}}loadAnimation(t){throw Error(nt)}next(){this._currentAnimation++,this._switchInstance()}pause(){if(!this._lottieInstance)return;this._playerState.prev=this.playerState;let t=!1;try{this._lottieInstance.pause(),this.dispatchEvent(new CustomEvent(ts.Pause))}catch(e){t=!0,console.error(e)}finally{this.playerState=t?a1.Error:a1.Paused}}play(){if(!this._lottieInstance)return;this._playerState.prev=this.playerState;let t=!1;try{this._lottieInstance.play(),this.dispatchEvent(new CustomEvent(ts.Play))}catch(e){t=!0,console.error(e)}finally{this.playerState=t?a1.Error:a1.Playing}}prev(){this._currentAnimation--,this._switchInstance(!0)}propertyChangedCallback(t,e,s){if(!this.shadow)return;let i=this.shadow.querySelector(".togglePlay"),r=this.shadow.querySelector(".stop"),a=this.shadow.querySelector(".prev"),n=this.shadow.querySelector(".next"),o=this.shadow.querySelector(".seeker"),h=this.shadow.querySelector("progress"),l=this.shadow.querySelector(".popover"),m=this.shadow.querySelector(".convert"),p=this.shadow.querySelector(".snapshot");i instanceof HTMLButtonElement&&r instanceof HTMLButtonElement&&n instanceof HTMLButtonElement&&a instanceof HTMLButtonElement&&o instanceof HTMLInputElement&&h instanceof HTMLProgressElement&&("playerState"===t&&(a3(i,s),r.dataset.active=(s===a1.Stopped).toString()),"_seeker"===t&&"number"==typeof s&&(o.value=s.toString(),o.ariaValueNow=s.toString(),h.value=s),"_animations"===t&&Array.isArray(s)&&this._currentAnimation+1<s.length&&(n.hidden=!1),"_currentAnimation"===t&&"number"==typeof s&&(n.hidden=s+1>=this._animations.length,a.hidden=!s),"_isSettingsOpen"===t&&"boolean"==typeof s&&l instanceof HTMLDivElement&&m instanceof HTMLButtonElement&&p instanceof HTMLButtonElement&&(l.hidden=!s,m.hidden=this.isLight,p.hidden=this.renderer!==tr.SVG))}async reload(){this._lottieInstance&&this.src&&(this._lottieInstance.destroy(),await this.load(this.src))}seek(t){if(!this._lottieInstance)return;let e=t.toString().match(/^(\d+)(%?)$/);if(!e)return;let s=Math.round("%"===e[2]?this._lottieInstance.totalFrames*Number(e[1])/100:Number(e[1]));if(this._seeker=s,this.playerState===a1.Playing||this.playerState===a1.Frozen&&this._playerState.prev===a1.Playing){this._lottieInstance.goToAndPlay(s,!0),this.playerState=a1.Playing;return}this._lottieInstance.goToAndStop(s,!0),this._lottieInstance.pause()}setCount(t){this.count=t}setDirection(t){this._lottieInstance&&this._lottieInstance.setDirection(t)}setLoop(t){this._lottieInstance&&this._lottieInstance.setLoop(t)}setMultiAnimationSettings(t){this._multiAnimationSettings=t}setSegment(t){this._segment=t}setSpeed(t=1){this._lottieInstance&&this._lottieInstance.setSpeed(t)}setSubframe(t){this._lottieInstance&&this._lottieInstance.setSubframe(t)}snapshot(t=!0,e="AM Lottie"){try{if(!this.shadowRoot)throw Error("Unknown error");let s=this.shadowRoot.querySelector(".animation svg");if(!s)throw Error("Could not retrieve animation from DOM");let i=s instanceof Node?new XMLSerializer().serializeToString(s):null;if(!i)throw Error("Could not serialize SVG element");return t&&M(i,{mimeType:"image/svg+xml",name:`${T(this.src||e)}-${((this._seeker??0)+1).toString().padStart(3,"0")}.svg`}),i}catch(t){return console.error(t),null}}stop(){if(this._lottieInstance){this._playerState.prev=this.playerState,this._playerState.count=0;try{this._lottieInstance.stop(),this.dispatchEvent(new CustomEvent(ts.Stop))}finally{this.playerState=a1.Stopped}}}toggleBoomerang(){let t=this._multiAnimationSettings[this._currentAnimation]??{};if(void 0!==t.mode){if(t.mode===te.Normal){t.mode=te.Bounce,this._isBounce=!0;return}t.mode=te.Normal,this._isBounce=!1;return}if(this.mode===te.Normal){this.mode=te.Bounce,this._isBounce=!0;return}this.mode=te.Normal,this._isBounce=!1}toggleLoop(){let t=!this.loop;this.loop=t,this.setLoop(t)}togglePlay(){if(!this._lottieInstance)return;let{currentFrame:t,playDirection:e,totalFrames:s}=this._lottieInstance;if(this.playerState===a1.Playing)return void this.pause();if(this.playerState!==a1.Completed)return void this.play();if(this.playerState=a1.Playing,this._isBounce){this.setDirection(-1*e),this._lottieInstance.goToAndPlay(t,!0);return}-1===e?this._lottieInstance.goToAndPlay(s,!0):this._lottieInstance.goToAndPlay(0,!0)}_freeze(){if(this._lottieInstance){this._playerState.prev=this.playerState;try{this._lottieInstance.pause(),this.dispatchEvent(new CustomEvent(ts.Freeze))}finally{this.playerState=a1.Frozen}}}_handleBlur(){setTimeout(()=>{this._toggleSettings(!1)},200)}_handleClick(){(this.playOnClick||this.selector)&&this.togglePlay()}_handleSeekChange({target:t}){!(!(t instanceof HTMLInputElement)||!this._lottieInstance||isNaN(Number(t.value)))&&this.seek(Math.round(Number(t.value)/100*this._lottieInstance.totalFrames))}_handleSettingsClick({target:t}){this._toggleSettings(),t instanceof HTMLElement&&t.focus()}async _showError(){if(this.playerState!==a1.Error)return;let t=this.shadow?.querySelector(".animation"),e=this.shadow?.querySelector("slot[name=controls]");if(e&&(e.innerHTML=""),!(t instanceof HTMLElement))return;let s=++this._errorLoadId,{errorScreen:i}=await (az=az??Promise.resolve().then(function(){return nr}));s===this._errorLoadId&&(t.innerHTML=i(this._errorMessage))}setOptions(t){throw Error("Method not implemented")}_addEventListeners(){this._toggleEventListeners("add")}_addIntersectionObserver(){if(this._container&&!this._intersectionObserver){if(!("IntersectionObserver"in window)){this._intersectionObserverFallback(),removeEventListener("scroll",this._intersectionObserverFallback,!0),addEventListener("scroll",this._intersectionObserverFallback,{capture:!0,passive:!0});return}this._intersectionObserver=new IntersectionObserver(t=>{let{length:e}=t;for(let s=0;s<e;s++){if(!t[s]?.isIntersecting||document.hidden){this.playerState===a1.Playing&&this._freeze(),this._playerState.visible=!1;continue}this.animateOnScroll||this.playOnVisible||this.playerState!==a1.Frozen||this.play(),this.playOnVisible&&(this.playerState!==a1.Completed||this.once?setTimeout(()=>{this.play()},this.delay):(this.playerState=a1.Playing,this._lottieInstance?.goToAndPlay(1===this.direction?0:this._lottieInstance.totalFrames))),!this._playerState.scrollY&&(t[s]?.boundingClientRect.y||0)>0&&(this._playerState.scrollY=scrollY),this._playerState.visible=!0}}),this._intersectionObserver.observe(this._container)}}_clearPrevious(){this._lottieInstance?.destroy();let t=this.shadow?.querySelector(".animation");t&&(t.innerHTML="")}_complete(){if(!this._lottieInstance)return;if(this._animations.length>1){if(this._multiAnimationSettings[this._currentAnimation+1]?.autoplay)return void this.next();if(this.loop&&this._currentAnimation===this._animations.length-1){this._currentAnimation=0,this._switchInstance();return}}let{currentFrame:t,totalFrames:e}=this._lottieInstance;this._seeker=Math.round(t/e*100),this.playerState=a1.Completed,this.dispatchEvent(new CustomEvent(ts.Complete,{detail:{frame:t,seeker:this._seeker}}))}_dataFailed(){this.playerState=a1.Error,this.dispatchEvent(new CustomEvent(ts.Error))}_dataReady(){this.dispatchEvent(new CustomEvent(ts.Load))}_DOMLoaded(){this._playerState.loaded=!0,this.dispatchEvent(new CustomEvent(ts.Ready))}_enterFrame(){if(!this._lottieInstance)return;let{currentFrame:t,totalFrames:e}=this._lottieInstance;this._seeker=Math.round(t/e*100),this.dispatchEvent(new CustomEvent(ts.Frame,{detail:{frame:t,seeker:this._seeker}}))}_getOptions(){if(!this._container)throw Error("Container not rendered");let t=this.preserveAspectRatio??(t=>{switch(t){case aQ.Contain:case aQ.ScaleDown:return ti.Contain;case aQ.Cover:return ti.Cover;case aQ.Fill:return ti.Initial;case aQ.None:return ti.None;default:return ti.Contain}})(this.objectfit),e=this._multiAnimationSettings.length>0?this._multiAnimationSettings[this._currentAnimation]:void 0,s=this._manifest?.animations[this._currentAnimation],i=!!this.loop;s?.loop!==void 0&&(i=!!s.loop),e?.loop!==void 0&&(i=!!e.loop);let r=!!this.autoplay;s?.autoplay!==void 0&&(r=!!s.autoplay),e?.autoplay!==void 0&&(r=!!e.autoplay),this.animateOnScroll&&(r=!1);let a=this._segment;return this._segment?.every(t=>t>0)&&(a=[this._segment[0]-1,this._segment[1]-1]),this._segment?.some(t=>t<0)&&(a=void 0),this.setOptions({container:this._container,hasAutoplay:r,hasLoop:i,initialSegment:a,preserveAspectRatio:t,rendererType:this.renderer})}async _handleError(t){this.playerState=a1.Error,this.quiet||(this._errorMessage=a6(t).message,await this._showError()),this.dispatchEvent(new CustomEvent(ts.Error)),console.error(t)}_handleScroll(){if(!this.animateOnScroll||!this._DOMRect||!this._lottieInstance)return;if(v)return void console.warn("DotLottie: Scroll animations might not work properly in a Server Side Rendering context. Try to wrap this in a client component.");if(!this._playerState.visible)return;this._playerState.scrollTimeout&&clearTimeout(this._playerState.scrollTimeout),this._playerState.scrollTimeout=setTimeout(()=>{this.playerState=a1.Paused},400);let{totalFrames:t}=this._lottieInstance,e=scrollY-this._playerState.scrollY;scrollY<=this._playerState.scrollY&&(e=this._playerState.scrollY-scrollY);let{bottom:s,height:i,top:r}=this._DOMRect,a=i-s;r>=innerHeight&&(a=i);let n=((t,e=0,s=100)=>{let i=e,r=s;if(i>r){let t=r;r=i,i=t}return Math.min(Math.max(t,i),r)})(e/(innerHeight+a)*(t-1),0,t);requestAnimationFrame(()=>{if(n>=t){this.playerState=a1.Paused;return}this.playerState=a1.Playing,this._lottieInstance?.goToAndStop(n,!0)})}_handleWindowBlur({type:t}){this.dontFreezeOnBlur||(this.playerState===a1.Playing&&"blur"===t&&this._freeze(),this.playerState===a1.Frozen&&"focus"===t&&this.play())}_intersectionObserverFallback(){if(!this._container)return;let{bottom:t,left:e,right:s,top:i}=this._container.getBoundingClientRect();this._playerState.visible=i>=0&&e>=0&&t<=innerHeight&&s<=innerWidth,(this.autoplay||this.playOnVisible||this.playerState===a1.Playing||this.playerState===a1.Frozen)&&(this._playerState.visible?this.play():this._freeze())}_loopComplete(){if(!this._lottieInstance)return;let{playDirection:t,totalFrames:e}=this._lottieInstance,s=this._segment?this._segment[0]:0,i=this._segment?this._segment[1]:e;if(this.count&&(this._isBounce?this._playerState.count+=.5:this._playerState.count+=1,this._playerState.count>=this.count)){this.setLoop(!1),this.playerState=a1.Completed,this.dispatchEvent(new CustomEvent(ts.Complete));return}return(this.dispatchEvent(new CustomEvent(ts.Loop)),this._isBounce)?(this._lottieInstance.goToAndStop(-1===t?s:.99*i,!0),this._lottieInstance.setDirection(-1*t),setTimeout(()=>{this.animateOnScroll||this._lottieInstance?.play()},this.intermission)):(this._lottieInstance.goToAndStop(-1===t?.99*i:s,!0),setTimeout(()=>{this.animateOnScroll||this._lottieInstance?.play()},this.intermission))}_mouseEnter(){if(!(!this.hover||!this._lottieInstance||"ontouchstart"in window)){if(this.mouseout===a0.Reverse&&this._lottieInstance.setDirection(1),this.playerState===a1.Completed){this._lottieInstance.goToAndPlay(0,!0),this.playerState=a1.Playing;return}this.playerState!==a1.Playing&&this.play()}}_mouseLeave(){if(!(!this.hover||!this._lottieInstance||"ontouchstart"in window))switch(this.mouseout){case a0.Void:break;case a0.Pause:this.pause();break;case a0.Reverse:this._lottieInstance.setDirection(-1),this.play();break;default:this.stop()}}_onVisibilityChange(){document.hidden&&this.playerState===a1.Playing?this._freeze():this.playerState===a1.Frozen&&this.play()}_removeEventListeners(){this._toggleEventListeners("remove")}_switchInstance(t=!1){if(this._animations[this._currentAnimation])try{if(this._lottieInstance&&this._lottieInstance.destroy(),this._lottieInstance=this.loadAnimation({...this._getOptions(),animationData:this._animations[this._currentAnimation]}),this._multiAnimationSettings[this._currentAnimation]?.mode&&(this._isBounce=this._multiAnimationSettings[this._currentAnimation]?.mode===te.Bounce),this._removeEventListeners(),this._addEventListeners(),this.dispatchEvent(new CustomEvent(t?ts.Previous:ts.Next)),this._multiAnimationSettings[this._currentAnimation]?.autoplay??this.autoplay){if(this.animateOnScroll){this._lottieInstance.goToAndStop(0,!0),this.playerState=a1.Paused;return}this._lottieInstance.goToAndPlay(0,!0),this.playerState=a1.Playing;return}this._lottieInstance.goToAndStop(0,!0),this.playerState=a1.Stopped}catch(t){this._errorMessage=a6(t).message,this.playerState=a1.Error,this.dispatchEvent(new CustomEvent(ts.Error))}}_toggleEventListeners(t){let e="add"===t?"addEventListener":"removeEventListener";if(this._lottieInstance&&(this._lottieInstance[e](ts.EnterFrame,this._enterFrame),this._lottieInstance[e](ts.Complete,this._complete),this._lottieInstance[e](ts.LoopComplete,this._loopComplete),this._lottieInstance[e](ts.DOMLoaded,this._DOMLoaded),this._lottieInstance[e](ts.DataReady,this._dataReady),this._lottieInstance[e](ts.DataFailed,this._dataFailed)),this.selector){let t=document.getElementById(this.selector);t?this.hover?(t[e]("mouseenter",this._mouseEnter),t[e]("mouseleave",this._mouseLeave)):t[e]("click",this._handleClick):this.selector=null}this._container&&!this.selector&&(this.hover&&(this._container[e]("mouseenter",this._mouseEnter),this._container[e]("mouseleave",this._mouseLeave)),this.playOnClick&&this._container[e]("click",this._handleClick)),window[e]("focus",this._handleWindowBlur,{capture:!1,passive:!0}),window[e]("blur",this._handleWindowBlur,{capture:!1,passive:!0}),this.animateOnScroll&&window[e]("scroll",this._handleScroll,{capture:!0,passive:!0})}_toggleSettings(t){if(void 0===t){this._isSettingsOpen=!this._isSettingsOpen;return}this._isSettingsOpen=t}}class ni extends ns{get renderer(){return tr.SVG}constructor(){super(),this.isLight=!0}loadAnimation(t){return iR(t)}setOptions({container:t,hasAutoplay:e,hasLoop:s,initialSegment:i,preserveAspectRatio:r}){return{autoplay:e,container:t,initialSegment:i,loop:s,renderer:tr.SVG,rendererSettings:{hideOnTransparent:!0,imagePreserveAspectRatio:r,preserveAspectRatio:r,progressiveLoad:!0}}}}globalThis.dotLottiePlayer=()=>new ni,v||customElements.define(a2,ni);var nr=Object.freeze({__proto__:null,errorScreen:function(t){return`<div class="error"><svg preserveAspectRatio="${ti.Cover}" xmlns="${y}" width="1920" height="1080" viewBox="0 0 1920 1080" style="white-space:preserve"><path fill="#fff" d="M0 0h1920v1080H0z"/><path fill="#3a6d8b" d="M1190.2 531 1007 212.4c-22-38.2-77.2-38-98.8.5L729.5 531.3c-21.3 37.9 6.1 84.6 49.5 84.6l361.9.3c43.7 0 71.1-47.3 49.3-85.2zM937.3 288.7c.2-7.5 3.3-23.9 23.2-23.9 16.3 0 23 16.1 23 23.5 0 55.3-10.7 197.2-12.2 214.5-.1 1-.9 1.7-1.9 1.7h-18.3c-1 0-1.8-.7-1.9-1.7-1.4-17.5-13.4-162.9-11.9-214.1zm24.2 283.8c-13.1 0-23.7-10.6-23.7-23.7s10.6-23.7 23.7-23.7 23.7 10.6 23.7 23.7-10.6 23.7-23.7 23.7zM722.1 644h112.6v34.4h-70.4V698h58.8v31.7h-58.8v22.6h72.4v36.2H722.1V644zm162 57.1h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5h36.4v15.6zm78.9 0h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5H963v15.6zm39.5 36.2c0-31.3 22.2-54.8 56.6-54.8 34.4 0 56.2 23.5 56.2 54.8s-21.8 54.6-56.2 54.6c-34.4-.1-56.6-23.3-56.6-54.6zm74 0c0-17.4-6.1-29.1-17.8-29.1-11.7 0-17.4 11.7-17.4 29.1 0 17.4 5.7 29.1 17.4 29.1s17.8-11.8 17.8-29.1zm83.1-36.2h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5h36.4v15.6z"/><path fill="none" d="M718.9 807.7h645v285.4h-645z"/><text fill="#3a6d8b" style="text-align:center;position:absolute;left:100%;font-size:47px;font-family:system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',sans-serif" x="50%" y="848.017" text-anchor="middle">${t}</text></svg></div>`}});t.DotLottiePlayerBase=ns,t.MouseOut=a0,t.PlayMode=te,t.PlayerEvent=ts,t.PlayerState=a1,t.RendererType=tr,t.default=ni,t.tagName=a2,Object.defineProperty(t,"__esModule",{value:!0})}(this["@aarsteinmedia/dotlottie-player"]=this["@aarsteinmedia/dotlottie-player"]||{});