reacthub-pixitweenjs 0.2.107-alpha.94 → 0.2.107-alpha.95
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.
- package/dist/index.es.js +2 -15
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -17955,23 +17955,10 @@ const d2 = k.forwardRef((t, e) => {
|
|
|
17955
17955
|
return Pe(ye.COMPLETE, () => {
|
|
17956
17956
|
}), k.useEffect(() => {
|
|
17957
17957
|
const v = N.context(() => {
|
|
17958
|
-
n.current && f.current && (u.current && (u.current.kill(), f.current.remove(u.current)), u.current = N.to(n.current, {
|
|
17958
|
+
n.current && f.current && (u.current && (u.current.kill(), f.current.remove(u.current)), console.log("startTween 001", u.current), console.log("props", e, r, i), u.current = N.to(n.current, {
|
|
17959
17959
|
alpha: 1,
|
|
17960
17960
|
duration: 0.1
|
|
17961
|
-
}), o.current && (o.current.kill(), f.current.remove(o.current)), o.current = N.
|
|
17962
|
-
s,
|
|
17963
|
-
{
|
|
17964
|
-
pixi: {
|
|
17965
|
-
alpha: e < 0.2 ? 1 : 0
|
|
17966
|
-
}
|
|
17967
|
-
},
|
|
17968
|
-
{
|
|
17969
|
-
pixi: {
|
|
17970
|
-
alpha: 1,
|
|
17971
|
-
duration: 0.1
|
|
17972
|
-
}
|
|
17973
|
-
}
|
|
17974
|
-
).to(s.current, {
|
|
17961
|
+
}), o.current && (o.current.kill(), f.current.remove(o.current)), o.current = N.to(s.current, {
|
|
17975
17962
|
alpha: 1,
|
|
17976
17963
|
duration: Number(r) - Number(e),
|
|
17977
17964
|
onStart: () => {
|
package/dist/index.umd.js
CHANGED
|
@@ -1987,4 +1987,4 @@ void main() {
|
|
|
1987
1987
|
* goldfirestudios.com
|
|
1988
1988
|
*
|
|
1989
1989
|
* MIT License
|
|
1990
|
-
*/(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(r){var i=this;if(!i.ctx||!i.ctx.listener)return i;for(var n=i._howls.length-1;n>=0;n--)i._howls[n].stereo(r);return i},HowlerGlobal.prototype.pos=function(r,i,n){var s=this;if(!s.ctx||!s.ctx.listener)return s;if(i=typeof i!="number"?s._pos[1]:i,n=typeof n!="number"?s._pos[2]:n,typeof r=="number")s._pos=[r,i,n],typeof s.ctx.listener.positionX<"u"?(s.ctx.listener.positionX.setTargetAtTime(s._pos[0],Howler.ctx.currentTime,.1),s.ctx.listener.positionY.setTargetAtTime(s._pos[1],Howler.ctx.currentTime,.1),s.ctx.listener.positionZ.setTargetAtTime(s._pos[2],Howler.ctx.currentTime,.1)):s.ctx.listener.setPosition(s._pos[0],s._pos[1],s._pos[2]);else return s._pos;return s},HowlerGlobal.prototype.orientation=function(r,i,n,s,a,o){var u=this;if(!u.ctx||!u.ctx.listener)return u;var h=u._orientation;if(i=typeof i!="number"?h[1]:i,n=typeof n!="number"?h[2]:n,s=typeof s!="number"?h[3]:s,a=typeof a!="number"?h[4]:a,o=typeof o!="number"?h[5]:o,typeof r=="number")u._orientation=[r,i,n,s,a,o],typeof u.ctx.listener.forwardX<"u"?(u.ctx.listener.forwardX.setTargetAtTime(r,Howler.ctx.currentTime,.1),u.ctx.listener.forwardY.setTargetAtTime(i,Howler.ctx.currentTime,.1),u.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),u.ctx.listener.upX.setTargetAtTime(s,Howler.ctx.currentTime,.1),u.ctx.listener.upY.setTargetAtTime(a,Howler.ctx.currentTime,.1),u.ctx.listener.upZ.setTargetAtTime(o,Howler.ctx.currentTime,.1)):u.ctx.listener.setOrientation(r,i,n,s,a,o);else return h;return u},Howl.prototype.init=function(r){return function(i){var n=this;return n._orientation=i.orientation||[1,0,0],n._stereo=i.stereo||null,n._pos=i.pos||null,n._pannerAttr={coneInnerAngle:typeof i.coneInnerAngle<"u"?i.coneInnerAngle:360,coneOuterAngle:typeof i.coneOuterAngle<"u"?i.coneOuterAngle:360,coneOuterGain:typeof i.coneOuterGain<"u"?i.coneOuterGain:0,distanceModel:typeof i.distanceModel<"u"?i.distanceModel:"inverse",maxDistance:typeof i.maxDistance<"u"?i.maxDistance:1e4,panningModel:typeof i.panningModel<"u"?i.panningModel:"HRTF",refDistance:typeof i.refDistance<"u"?i.refDistance:1,rolloffFactor:typeof i.rolloffFactor<"u"?i.rolloffFactor:1},n._onstereo=i.onstereo?[{fn:i.onstereo}]:[],n._onpos=i.onpos?[{fn:i.onpos}]:[],n._onorientation=i.onorientation?[{fn:i.onorientation}]:[],r.call(this,i)}}(Howl.prototype.init),Howl.prototype.stereo=function(r,i){var n=this;if(!n._webAudio)return n;if(n._state!=="loaded")return n._queue.push({event:"stereo",action:function(){n.stereo(r,i)}}),n;var s=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof i>"u")if(typeof r=="number")n._stereo=r,n._pos=[r,0,0];else return n._stereo;for(var a=n._getSoundIds(i),o=0;o<a.length;o++){var u=n._soundById(a[o]);if(u)if(typeof r=="number")u._stereo=r,u._pos=[r,0,0],u._node&&(u._pannerAttr.panningModel="equalpower",(!u._panner||!u._panner.pan)&&e(u,s),s==="spatial"?typeof u._panner.positionX<"u"?(u._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),u._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),u._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):u._panner.setPosition(r,0,0):u._panner.pan.setValueAtTime(r,Howler.ctx.currentTime)),n._emit("stereo",u._id);else return u._stereo}return n},Howl.prototype.pos=function(r,i,n,s){var a=this;if(!a._webAudio)return a;if(a._state!=="loaded")return a._queue.push({event:"pos",action:function(){a.pos(r,i,n,s)}}),a;if(i=typeof i!="number"?0:i,n=typeof n!="number"?-.5:n,typeof s>"u")if(typeof r=="number")a._pos=[r,i,n];else return a._pos;for(var o=a._getSoundIds(s),u=0;u<o.length;u++){var h=a._soundById(o[u]);if(h)if(typeof r=="number")h._pos=[r,i,n],h._node&&((!h._panner||h._panner.pan)&&e(h,"spatial"),typeof h._panner.positionX<"u"?(h._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),h._panner.positionY.setValueAtTime(i,Howler.ctx.currentTime),h._panner.positionZ.setValueAtTime(n,Howler.ctx.currentTime)):h._panner.setPosition(r,i,n)),a._emit("pos",h._id);else return h._pos}return a},Howl.prototype.orientation=function(r,i,n,s){var a=this;if(!a._webAudio)return a;if(a._state!=="loaded")return a._queue.push({event:"orientation",action:function(){a.orientation(r,i,n,s)}}),a;if(i=typeof i!="number"?a._orientation[1]:i,n=typeof n!="number"?a._orientation[2]:n,typeof s>"u")if(typeof r=="number")a._orientation=[r,i,n];else return a._orientation;for(var o=a._getSoundIds(s),u=0;u<o.length;u++){var h=a._soundById(o[u]);if(h)if(typeof r=="number")h._orientation=[r,i,n],h._node&&(h._panner||(h._pos||(h._pos=a._pos||[0,0,-.5]),e(h,"spatial")),typeof h._panner.orientationX<"u"?(h._panner.orientationX.setValueAtTime(r,Howler.ctx.currentTime),h._panner.orientationY.setValueAtTime(i,Howler.ctx.currentTime),h._panner.orientationZ.setValueAtTime(n,Howler.ctx.currentTime)):h._panner.setOrientation(r,i,n)),a._emit("orientation",h._id);else return h._orientation}return a},Howl.prototype.pannerAttr=function(){var r=this,i=arguments,n,s,a;if(!r._webAudio)return r;if(i.length===0)return r._pannerAttr;if(i.length===1)if(typeof i[0]=="object")n=i[0],typeof s>"u"&&(n.pannerAttr||(n.pannerAttr={coneInnerAngle:n.coneInnerAngle,coneOuterAngle:n.coneOuterAngle,coneOuterGain:n.coneOuterGain,distanceModel:n.distanceModel,maxDistance:n.maxDistance,refDistance:n.refDistance,rolloffFactor:n.rolloffFactor,panningModel:n.panningModel}),r._pannerAttr={coneInnerAngle:typeof n.pannerAttr.coneInnerAngle<"u"?n.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:typeof n.pannerAttr.coneOuterAngle<"u"?n.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:typeof n.pannerAttr.coneOuterGain<"u"?n.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:typeof n.pannerAttr.distanceModel<"u"?n.pannerAttr.distanceModel:r._distanceModel,maxDistance:typeof n.pannerAttr.maxDistance<"u"?n.pannerAttr.maxDistance:r._maxDistance,refDistance:typeof n.pannerAttr.refDistance<"u"?n.pannerAttr.refDistance:r._refDistance,rolloffFactor:typeof n.pannerAttr.rolloffFactor<"u"?n.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:typeof n.pannerAttr.panningModel<"u"?n.pannerAttr.panningModel:r._panningModel});else return a=r._soundById(parseInt(i[0],10)),a?a._pannerAttr:r._pannerAttr;else i.length===2&&(n=i[0],s=parseInt(i[1],10));for(var o=r._getSoundIds(s),u=0;u<o.length;u++)if(a=r._soundById(o[u]),a){var h=a._pannerAttr;h={coneInnerAngle:typeof n.coneInnerAngle<"u"?n.coneInnerAngle:h.coneInnerAngle,coneOuterAngle:typeof n.coneOuterAngle<"u"?n.coneOuterAngle:h.coneOuterAngle,coneOuterGain:typeof n.coneOuterGain<"u"?n.coneOuterGain:h.coneOuterGain,distanceModel:typeof n.distanceModel<"u"?n.distanceModel:h.distanceModel,maxDistance:typeof n.maxDistance<"u"?n.maxDistance:h.maxDistance,refDistance:typeof n.refDistance<"u"?n.refDistance:h.refDistance,rolloffFactor:typeof n.rolloffFactor<"u"?n.rolloffFactor:h.rolloffFactor,panningModel:typeof n.panningModel<"u"?n.panningModel:h.panningModel};var f=a._panner;f?(f.coneInnerAngle=h.coneInnerAngle,f.coneOuterAngle=h.coneOuterAngle,f.coneOuterGain=h.coneOuterGain,f.distanceModel=h.distanceModel,f.maxDistance=h.maxDistance,f.refDistance=h.refDistance,f.rolloffFactor=h.rolloffFactor,f.panningModel=h.panningModel):(a._pos||(a._pos=r._pos||[0,0,-.5]),e(a,"spatial"))}return r},Sound.prototype.init=function(r){return function(){var i=this,n=i._parent;i._orientation=n._orientation,i._stereo=n._stereo,i._pos=n._pos,i._pannerAttr=n._pannerAttr,r.call(this),i._stereo?n.stereo(i._stereo):i._pos&&n.pos(i._pos[0],i._pos[1],i._pos[2],i._id)}}(Sound.prototype.init),Sound.prototype.reset=function(r){return function(){var i=this,n=i._parent;return i._orientation=n._orientation,i._stereo=n._stereo,i._pos=n._pos,i._pannerAttr=n._pannerAttr,i._stereo?n.stereo(i._stereo):i._pos?n.pos(i._pos[0],i._pos[1],i._pos[2],i._id):i._panner&&(i._panner.disconnect(0),i._panner=void 0,n._refreshBuffer(i)),r.call(this)}}(Sound.prototype.reset);var e=function(r,i){i=i||"spatial",i==="spatial"?(r._panner=Howler.ctx.createPanner(),r._panner.coneInnerAngle=r._pannerAttr.coneInnerAngle,r._panner.coneOuterAngle=r._pannerAttr.coneOuterAngle,r._panner.coneOuterGain=r._pannerAttr.coneOuterGain,r._panner.distanceModel=r._pannerAttr.distanceModel,r._panner.maxDistance=r._pannerAttr.maxDistance,r._panner.refDistance=r._pannerAttr.refDistance,r._panner.rolloffFactor=r._pannerAttr.rolloffFactor,r._panner.panningModel=r._pannerAttr.panningModel,typeof r._panner.positionX<"u"?(r._panner.positionX.setValueAtTime(r._pos[0],Howler.ctx.currentTime),r._panner.positionY.setValueAtTime(r._pos[1],Howler.ctx.currentTime),r._panner.positionZ.setValueAtTime(r._pos[2],Howler.ctx.currentTime)):r._panner.setPosition(r._pos[0],r._pos[1],r._pos[2]),typeof r._panner.orientationX<"u"?(r._panner.orientationX.setValueAtTime(r._orientation[0],Howler.ctx.currentTime),r._panner.orientationY.setValueAtTime(r._orientation[1],Howler.ctx.currentTime),r._panner.orientationZ.setValueAtTime(r._orientation[2],Howler.ctx.currentTime)):r._panner.setOrientation(r._orientation[0],r._orientation[1],r._orientation[2])):(r._panner=Howler.ctx.createStereoPanner(),r._panner.pan.setValueAtTime(r._stereo,Howler.ctx.currentTime)),r._panner.connect(r._node),r._paused||r._parent.pause(r._id,!0).play(r._id,!0)}})()})(hh);const Xw=t=>{const e={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=L.useState(!1),i=P.useRef(null),n=P.useRef(e),s=P.useRef(null),a=L.useRef(null),{tl:o,dragModeRef:u}=P.useContext(Et),{uniqueId:h,src:f,startAt:l,endAt:c,mute:d,speed:p,audioStartAt:m,audioEndAt:v,visible:g}=t;Ee(ye.PAUSE,()=>{var T;i.current&&a.current&&((T=a.current)==null||T.pause(),n.current.isPlaying=!1)}),Ee(ye.COMPLETE,()=>{m>0&&a.current&&a.current.seek(m)}),Ee(ye.SCRUBBER_CLICKED,()=>{var T;i.current&&a.current&&((T=a.current)==null||T.pause(),n.current.isPlaying=!1)}),L.useEffect(()=>{a.current&&(u.current?(a.current.pause(),n.current.isPlaying=!1,n.current.isDragging=!0):n.current.isDragging=!1)},[u]);const y=(T,w)=>{o.current&&o.current.isActive()&&s.current&&s.current.isActive()&&!u.current&&a.current&&(console.log("gsap on start 0020",h,T,w),a.current.play(),n.current.isPlaying=!0)},_=()=>{var T;i.current&&((T=a.current)==null||T.stop(),n.current.isPlaying=!1,n.current.completed=!0)},x=T=>{var S,A;const w=T+((S=s.current)==null?void 0:S.time());a.current&&u.current?(a.current.seek(w),a.current.pause(),n.current.isPlaying=!1):i.current&&!n.current.isPlaying&&((A=o.current)!=null&&A.isActive())&&a.current&&(a.current.seek(w),a.current.play(),n.current.isPlaying=!0)},b=()=>{};return P.useEffect(()=>{let T=k.context(()=>{});if(i.current&&o.current){const w={duration:Number(v)-Number(m),onStart:y,onComplete:_,onStartParams:[m,v],onCompleteParams:[],onInterrupt:b,onUpdate:x,onUpdateParams:[m,v]};T=k.context(()=>{s.current=k.from(i.current,w,m),o.current.to(i.current,{alpha:1,duration:.01},l).to(i.current,{alpha:0,duration:.1},Number(c)),o.current.add(s.current,l)})}return()=>{s.current&&(s.current.kill(),k.killTweensOf(s.current)),T.revert()}},[l,c,m,v]),L.useEffect(()=>{i.current&&r(!0)},[]),L.useEffect(()=>(dr(f)||(a.current=new hh.Howl({src:[f],autoplay:!1,loop:!1,rate:p||1,volume:!d&&g?1:0,onload:()=>{console.log("loaded audio sprite"+h),n.current.loaded=!0,a.current&&(m>0&&a.current.seek(m),a.current.volume(!d&&g?1:0),a.current.rate(p||1),a.current.pause(),n.current.isPlaying=!1,n.current.completed=!1)},onend:()=>{console.log("end of playing audio sprite"+h),n.current.isPlaying=!1,n.current.completed=!0},onplay:()=>{console.log("play of playing audio sprite"+h),n.current.isPlaying=!0},onpause:()=>{console.log("pause of playing audio sprite"+h),n.current.isPlaying=!1},onstop:()=>{console.log("stop of playing audio sprite"+h),n.current.isPlaying=!1}})),()=>{a.current&&a.current.unload()}),[h,f,l,c,m,v,d,g,p]),L.useEffect(()=>{a.current&&(console.log("running updateEffect 2002",h,v),a.current.volume(!d&&g?1:0),a.current.rate(p||1),n.current.isPlaying=!0)},[d,g,p]),K.jsx(te.Container,{ref:i})};function Ww(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var fh=Ww,qw=ho,Yw=as,Kw=1,Zw=2;function Qw(t,e,r,i){var n=r.length,s=n,a=!i;if(t==null)return!s;for(t=Object(t);n--;){var o=r[n];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<s;){o=r[n];var u=o[0],h=t[u],f=o[1];if(a&&o[2]){if(h===void 0&&!(u in t))return!1}else{var l=new qw;if(i)var c=i(h,f,u,t,e,l);if(!(c===void 0?Yw(f,h,Kw|Zw,i,l):c))return!1}}return!0}var Jw=Qw,eS=Hr;function tS(t){return t===t&&!eS(t)}var dh=tS,rS=dh,iS=Jn;function nS(t){for(var e=iS(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,rS(n)]}return e}var sS=nS;function aS(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var ph=aS,oS=Jw,lS=sS,uS=ph;function cS(t){var e=lS(t);return e.length==1&&e[0][2]?uS(e[0][0],e[0][1]):function(r){return r===t||oS(r,t,e)}}var hS=cS,fS=jr,dS=Vr,pS="[object Symbol]";function mS(t){return typeof t=="symbol"||dS(t)&&fS(t)==pS}var Bn=mS,gS=ft,vS=Bn,_S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yS=/^\w*$/;function xS(t,e){if(gS(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||vS(t)?!0:yS.test(t)||!_S.test(t)||e!=null&&t in Object(e)}var Va=xS,mh=Wn,bS="Expected a function";function Xa(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(bS);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=t.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(Xa.Cache||mh),r}Xa.Cache=mh;var TS=Xa,wS=TS,SS=500;function AS(t){var e=wS(t,function(i){return r.size===SS&&r.clear(),i}),r=e.cache;return e}var ES=AS,CS=ES,IS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,RS=/\\(\\)?/g,PS=CS(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(IS,function(r,i,n,s){e.push(n?s.replace(RS,"$1"):i||r)}),e}),MS=PS,gh=Ai,OS=fh,FS=ft,NS=Bn,kS=1/0,vh=gh?gh.prototype:void 0,_h=vh?vh.toString:void 0;function yh(t){if(typeof t=="string")return t;if(FS(t))return OS(t,yh)+"";if(NS(t))return _h?_h.call(t):"";var e=t+"";return e=="0"&&1/t==-kS?"-0":e}var LS=yh,DS=LS;function BS(t){return t==null?"":DS(t)}var US=BS,$S=ft,GS=Va,zS=MS,jS=US;function HS(t,e){return $S(t)?t:GS(t,e)?[t]:zS(jS(t))}var xh=HS,VS=Bn,XS=1/0;function WS(t){if(typeof t=="string"||VS(t))return t;var e=t+"";return e=="0"&&1/t==-XS?"-0":e}var Un=WS,qS=xh,YS=Un;function KS(t,e){e=qS(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[YS(e[r++])];return r&&r==i?t:void 0}var bh=KS,ZS=bh;function QS(t,e,r){var i=t==null?void 0:ZS(t,e);return i===void 0?r:i}var JS=QS;function eA(t,e){return t!=null&&e in Object(t)}var tA=eA,rA=xh,iA=Yn,nA=ft,sA=xo,aA=Zn,oA=Un;function lA(t,e,r){e=rA(e,t);for(var i=-1,n=e.length,s=!1;++i<n;){var a=oA(e[i]);if(!(s=t!=null&&r(t,a)))break;t=t[a]}return s||++i!=n?s:(n=t==null?0:t.length,!!n&&aA(n)&&sA(a,n)&&(nA(t)||iA(t)))}var uA=lA,cA=tA,hA=uA;function fA(t,e){return t!=null&&hA(t,e,cA)}var dA=fA,pA=as,mA=JS,gA=dA,vA=Va,_A=dh,yA=ph,xA=Un,bA=1,TA=2;function wA(t,e){return vA(t)&&_A(e)?yA(xA(t),e):function(r){var i=mA(r,t);return i===void 0&&i===e?gA(r,t):pA(e,i,bA|TA)}}var SA=wA;function AA(t){return t}var EA=AA;function CA(t){return function(e){return e==null?void 0:e[t]}}var IA=CA,RA=bh;function PA(t){return function(e){return RA(e,t)}}var MA=PA,OA=IA,FA=MA,NA=Va,kA=Un;function LA(t){return NA(t)?OA(kA(t)):FA(t)}var DA=LA,BA=hS,UA=SA,$A=EA,GA=ft,zA=DA;function jA(t){return typeof t=="function"?t:t==null?$A:typeof t=="object"?GA(t)?UA(t[0],t[1]):BA(t):zA(t)}var HA=jA;function VA(t){return function(e,r,i){for(var n=-1,s=Object(e),a=i(e),o=a.length;o--;){var u=a[t?o:++n];if(r(s[u],u,s)===!1)break}return e}}var XA=VA,WA=XA,qA=WA(),YA=qA,KA=YA,ZA=Jn;function QA(t,e){return t&&KA(t,e,ZA)}var JA=QA,eE=Mi;function tE(t,e){return function(r,i){if(r==null)return r;if(!eE(r))return t(r,i);for(var n=r.length,s=e?n:-1,a=Object(r);(e?s--:++s<n)&&i(a[s],s,a)!==!1;);return r}}var rE=tE,iE=JA,nE=rE,sE=nE(iE),aE=sE,oE=aE,lE=Mi;function uE(t,e){var r=-1,i=lE(t)?Array(t.length):[];return oE(t,function(n,s,a){i[++r]=e(n,s,a)}),i}var cE=uE,hE=fh,fE=HA,dE=cE,pE=ft;function mE(t,e){var r=pE(t)?hE:dE;return r(t,fE(e))}var gE=mE;const vE=Bt(gE);var sr={},Th={},St={};Object.defineProperty(St,"__esModule",{value:!0}),St.loop=St.conditional=St.parse=void 0;var _E=function t(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:i;if(Array.isArray(r))r.forEach(function(a){return t(e,a,i,n)});else if(typeof r=="function")r(e,i,n,t);else{var s=Object.keys(r)[0];Array.isArray(r[s])?(n[s]={},t(e,r[s],i,n[s])):n[s]=r[s](e,i,n,t)}return i};St.parse=_E;var yE=function(e,r){return function(i,n,s,a){r(i,n,s)&&a(i,e,n,s)}};St.conditional=yE;var xE=function(e,r){return function(i,n,s,a){for(var o=[],u=i.pos;r(i,n,s);){var h={};if(a(i,e,n,h),i.pos===u)break;u=i.pos,o.push(h)}return o}};St.loop=xE;var Se={};Object.defineProperty(Se,"__esModule",{value:!0}),Se.readBits=Se.readArray=Se.readUnsigned=Se.readString=Se.peekBytes=Se.readBytes=Se.peekByte=Se.readByte=Se.buildStream=void 0;var bE=function(e){return{data:e,pos:0}};Se.buildStream=bE;var wh=function(){return function(e){return e.data[e.pos++]}};Se.readByte=wh;var TE=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+e]}};Se.peekByte=TE;var $n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};Se.readBytes=$n;var wE=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};Se.peekBytes=wE;var SE=function(e){return function(r){return Array.from($n(e)(r)).map(function(i){return String.fromCharCode(i)}).join("")}};Se.readString=SE;var AE=function(e){return function(r){var i=$n(2)(r);return e?(i[1]<<8)+i[0]:(i[0]<<8)+i[1]}};Se.readUnsigned=AE;var EE=function(e,r){return function(i,n,s){for(var a=typeof r=="function"?r(i,n,s):r,o=$n(e),u=new Array(a),h=0;h<a;h++)u[h]=o(i);return u}};Se.readArray=EE;var CE=function(e,r,i){for(var n=0,s=0;s<i;s++)n+=e[r+s]&&Math.pow(2,i-s-1);return n},IE=function(e){return function(r){for(var i=wh()(r),n=new Array(8),s=0;s<8;s++)n[7-s]=!!(i&1<<s);return Object.keys(e).reduce(function(a,o){var u=e[o];return u.length?a[o]=CE(n,u.index,u.length):a[o]=n[u.index],a},{})}};Se.readBits=IE,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=St,r=Se,i={blocks:function(c){for(var d=0,p=[],m=c.data.length,v=0,g=(0,r.readByte)()(c);g!==d&&g;g=(0,r.readByte)()(c)){if(c.pos+g>=m){var y=m-c.pos;p.push((0,r.readBytes)(y)(c)),v+=y;break}p.push((0,r.readBytes)(g)(c)),v+=g}for(var _=new Uint8Array(v),x=0,b=0;b<p.length;b++)_.set(p[b],x),x+=p[b].length;return _}},n=(0,e.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===249}),s=(0,e.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,e.conditional)({lct:(0,r.readArray)(3,function(l,c,d){return Math.pow(2,d.descriptor.lct.size+1)})},function(l,c,d){return d.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},i]}]},function(l){return(0,r.peekByte)()(l)===44}),a=(0,e.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,d,p){return(0,r.readBytes)(p.text.blockSize)(c)}},i]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===1}),o=(0,e.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(c,d,p){return(0,r.readString)(p.blockSize)(c)}},i]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===255}),u=(0,e.conditional)({comment:[{codes:(0,r.readBytes)(2)},i]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===254}),h=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,e.conditional)({gct:(0,r.readArray)(3,function(l,c){return Math.pow(2,c.lsd.gct.size+1)})},function(l,c){return c.lsd.gct.exists}),{frames:(0,e.loop)([n,o,u,s,a],function(l){var c=(0,r.peekByte)()(l);return c===33||c===44})}],f=h;t.default=f}(Th);var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.deinterlace=void 0;var RE=function(e,r){for(var i=new Array(e.length),n=e.length/r,s=function(c,d){var p=e.slice(d*r,(d+1)*r);i.splice.apply(i,[c*r,r].concat(p))},a=[0,4,2,1],o=[8,8,4,2],u=0,h=0;h<4;h++)for(var f=a[h];f<n;f+=o[h])s(f,u),u++;return i};Gn.deinterlace=RE;var zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.lzw=void 0;var PE=function(e,r,i){var n=4096,s=-1,a=i,o,u,h,f,l,c,d,T,p,m,b,v,w,S,C,A,g=new Array(i),y=new Array(n),_=new Array(n),x=new Array(n+1);for(v=e,u=1<<v,l=u+1,o=u+2,d=s,f=v+1,h=(1<<f)-1,p=0;p<u;p++)y[p]=0,_[p]=p;var b,T,w,S,A,C;for(b=T=w=S=A=C=0,m=0;m<a;){if(S===0){if(T<f){b+=r[C]<<T,T+=8,C++;continue}if(p=b&h,b>>=f,T-=f,p>o||p==l)break;if(p==u){f=v+1,h=(1<<f)-1,o=u+2,d=s;continue}if(d==s){x[S++]=_[p],d=p,w=p;continue}for(c=p,p==o&&(x[S++]=w,p=d);p>u;)x[S++]=_[p],p=y[p];w=_[p]&255,x[S++]=w,o<n&&(y[o]=d,_[o]=w,o++,!(o&h)&&o<n&&(f++,h+=o)),d=c}S--,g[A++]=x[S],m++}for(m=A;m<a;m++)g[m]=0;return g};zn.lzw=PE,Object.defineProperty(sr,"__esModule",{value:!0}),sr.decompressFrames=sr.decompressFrame=sr.parseGIF=void 0;var ME=LE(Th),OE=St,FE=Se,NE=Gn,kE=zn;function LE(t){return t&&t.__esModule?t:{default:t}}var DE=function(e){var r=new Uint8Array(e);return(0,OE.parse)((0,FE.buildStream)(r),ME.default)};sr.parseGIF=DE;var BE=function(e){for(var r=e.pixels.length,i=new Uint8ClampedArray(r*4),n=0;n<r;n++){var s=n*4,a=e.pixels[n],o=e.colorTable[a]||[0,0,0];i[s]=o[0],i[s+1]=o[1],i[s+2]=o[2],i[s+3]=a!==e.transparentIndex?255:0}return i},Sh=function(e,r,i){if(!e.image){console.warn("gif frame does not have associated image.");return}var n=e.image,s=n.descriptor.width*n.descriptor.height,a=(0,kE.lzw)(n.data.minCodeSize,n.data.blocks,s);n.descriptor.lct.interlaced&&(a=(0,NE.deinterlace)(a,n.descriptor.width));var o={pixels:a,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?o.colorTable=n.lct:o.colorTable=r,e.gce&&(o.delay=(e.gce.delay||10)*10,o.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(o.transparentIndex=e.gce.transparentColorIndex)),i&&(o.patch=BE(o)),o};sr.decompressFrame=Sh;var UE=function(e,r){return e.frames.filter(function(i){return i.image}).map(function(i){return Sh(i,e.gct,r)})};sr.decompressFrames=UE;const Ah=(t,e={})=>{typeof e=="function"&&(e=e(t));const r=e.loaded&&t.loaded!==e.loaded,{playing:i,...n}=e,s={...t,...n};return r&&Object.assign(s,{playing:s.autoPlay&&s.loaded}),(e.delays!=null||e.frames!=null)&&Object.assign(s,{length:s.frames.length}),(e.index!=null||e.frames!=null)&&Object.assign(s,{index:s.length===0?0:(s.length+s.index)%s.length}),e.playing!=null&&Object.assign(s,s.loaded?{playing:i}:{autoPlay:i}),s},$E=t=>Ah({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},t),GE=t=>P.useReducer(Ah,t,$E);var zE='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function jE(t){const e=new Blob([zE],{type:"application/javascript"}),r=URL.createObjectURL(e),i=new Worker(r,t);return URL.revokeObjectURL(r),i}const HE=t=>({...t,frames:t.frames.map(e=>{const r=new ImageData(t.width,t.height);return r.data.set(new Uint8ClampedArray(e)),r})}),VE=(t,e)=>{const r={};return()=>(r.instance||(r.instance=t()),P.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(e&&e(r.instance),delete r.instance,delete r.timeout)})}),[r,e]),r.instance)},XE=t=>{const e=P.useRef(t);return P.useEffect(()=>{e.current=t},[t]),e},WE=t=>{const e=XE(t);return P.useCallback(r=>e.current&&e.current(r),[])},qE=VE(()=>new jE,t=>t.terminate()),YE=(t,e)=>{const r=WE(e),i=qE();P.useEffect(()=>{if(typeof t=="string"){const n=s=>{const a=s.data||s;if(a.src===t){const o=a.error?a:HE(a);r(o)}};return i.addEventListener("message",n),i.postMessage({src:t,type:"parse"}),()=>{i.postMessage({src:t,type:"cancel"}),i.removeEventListener("message",n)}}},[i,t])},KE=({isPlaying:t,forwardRef:e,...r})=>{const i=L.useRef(null);return L.useImperativeHandle(e,()=>i.current,[i]),L.useEffect(()=>{if(i.current===null)return;const n=i.current;n[t?"gotoAndPlay":"gotoAndStop"](n.currentFrame)},[t]),K.jsx(te.AnimatedSprite,{ref:i,...r,isPlaying:t})},Eh=L.memo(KE),ZE={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0,currentFrame:0},QE=L.forwardRef((t,e)=>{const[r,i]=L.useState(0),[n,s]=L.useState([]),[,a]=P.useState(!1),o=P.useRef(null),u=P.useRef(null),h=P.useRef(ZE),f=P.useRef(),[l,c]=GE({autoPlay:!1}),{tl:d}=P.useContext(Et),{src:p,uniqueId:m,startAt:v,endAt:g,frameStartAt:y,frameEndAt:_,loop:x,visible:b,disabled:T,transformation:{width:w=0,height:S=0,x:A,y:C,colorCorrection:O={}},pointerdown:z}=t,{frames:I,delays:E}=l;YE(p,c);const{temperatureFilter:B,sharpnessFilter:U,hueFilter:R,blurFilter:$,adjustmentFilter:X,vignetteFilter:M,noiseFilter:F}=rr(O),{blurRadius:H=0,vignette:V=0,noise:W=0}=O,ne=.1;L.useEffect(()=>{if(!dr(I)){const G=vE(I,Y=>{const{data:me,width:De,height:Be}=Y,ct=new Uint8Array(me);return Ge.Texture.fromBuffer(ct,De,Be)}).map((Y,me)=>({texture:Y,time:E[me]}));s(G);let q=0;E.forEach(Y=>{q+=Y}),i(q/1e3),h.current.totalDuration=q,h.current.totalFrames=I.length}},[m,I,E]);const oe=()=>{o.current&&(o.current.stop(),h.current.isPlaying=!1)},ce=()=>{if(o.current&&f.current){const de=f.current.time();let G=de===0?0:de/ne;G=isNaN(G)?0:G;const q=h.current.totalFrames;G=G>q?q:G,G=Math.round(G),G>=q?(o.current.gotoAndStop(0),h.current.isPlaying=!1):(o.current.currentFrame=G,h.current.isPlaying=!0)}},ve=()=>{a(!0)};return P.useEffect(()=>{let de=k.context(()=>{});if(u.current&&d.current&&r>0){const G={duration:Number(r),onInterrupt:oe,onUpdate:ce,onUpdateParams:[y,_]},q=Number(g)-Number(v),Y=Math.max(0,Math.floor(q/r)-1);f.current&&f.current.kill(),de=k.context(()=>{f.current=k.timeline({repeat:x?Y:0,repeatDelay:0}).from(u.current,G,y),d.current.add(f.current,v)})}return()=>{f.current&&(f.current.kill(),k.killTweensOf(f.current)),de.revert()}},[p,m,v,g,y,_,r,x]),K.jsx(Gt,{...t,ref:e,ignoreTlForVideo:!0,isGif:!0,children:K.jsx(te.Container,{ref:u,children:!dr(n)&&K.jsx(Eh,{x:A,y:C,width:w,height:S,animationSpeed:1,alpha:b?1:0,loop:x,textures:n,onComplete:ve,anchor:.5,forwardRef:o,...!T&&b&&{interactive:!0,pointerdown:z},filters:[B,U,R,X,...H>0?[$]:[],...V>0?[M]:[],...W>0?[F]:[]]})})})}),JE=L.forwardRef((t,e)=>{const i=P.useRef(null),n=P.useRef(0),s=P.useRef(null),a=P.useRef(null),o=P.useRef(16),u=P.useRef(null),{visible:h,text:f,disabled:l,transformation:c,pointerdown:d,onDobuleClick:p}=t,{x:m,y:v,fontFamily:g="Arial",fontWeight:y="normal",fontStyle:_="normal",fontSize:x=16,fontVariant:b="normal",fill:T="black",stroke:w,strokeThickness:S=0,blurRadius:A=0,blurEnabled:C=!1,dropShadowColor:O=null,dropShadow:z=!1,dropShadowBlur:I=0,wordWrapWidth:E=5e7,leading:B=0,letterSpacing:U,colorCorrection:R={}}=c,{temperatureFilter:$,sharpnessFilter:X,hueFilter:M,blurFilter:F,adjustmentFilter:H}=rr(R),{blurRadius:V=0}=R;L.useEffect(()=>{o.current=Number(x)},[x]);const W=["italic","oblique"].includes(_)?_:void 0,ne=["small-caps"].includes(b),oe=["bold","bolder","lighter","100","200","300"].includes(y)?y:void 0,ce=Number(U)>0?U:void 0,ve=L.useMemo(()=>new Ge.TextStyle({fontFamily:g,fontSize:x,fill:T||"white",...w&&S>0&&{stroke:w,strokeThickness:S},...W&&{fontStyle:W},...ne&&{fontVariant:ne},...oe&&{fontWeight:oe},...ce&&{letterSpacing:ce},...C&&{dropShadow:!0,dropShadowBlur:Number(A),dropShadowColor:(O==null?void 0:O.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...z&&{dropShadow:!0,dropShadowBlur:Number(I),dropShadowColor:(O==null?void 0:O.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:E||500,leading:B||0}),[C,A,T,g,x,_,B,W,oe,ne,ce,O,w,S,E,z,I]);L.useEffect(()=>{u.current={...c}},[c]);const de=()=>{const q=new Date().getTime();q-n.current<300&&p?p():d&&d(),n.current=q},G=()=>{!l&&p&&p()};return K.jsx(Gt,{...t,ref:e,isText:!0,onDoubleClick:G,children:K.jsx(te.Container,{ref:i,children:K.jsx(te.Container,{alpha:1,ref:a,children:K.jsx(te.Text,{style:ve,x:m,y:v,anchor:.5,text:f,alpha:h?1:0,...h&&!l&&{interactive:!0,buttonMode:!0,pointerdown:de},ref:s,filters:[$,X,M,H,...V>0?[F]:[]]})})})})});var eC=ht,tC=function(){return eC.Date.now()},rC=tC,iC=/\s/;function nC(t){for(var e=t.length;e--&&iC.test(t.charAt(e)););return e}var sC=nC,aC=sC,oC=/^\s+/;function lC(t){return t&&t.slice(0,aC(t)+1).replace(oC,"")}var uC=lC,cC=uC,Ch=Hr,hC=Bn,Ih=0/0,fC=/^[-+]0x[0-9a-f]+$/i,dC=/^0b[01]+$/i,pC=/^0o[0-7]+$/i,mC=parseInt;function gC(t){if(typeof t=="number")return t;if(hC(t))return Ih;if(Ch(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ch(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cC(t);var r=dC.test(t);return r||pC.test(t)?mC(t.slice(2),r?2:8):fC.test(t)?Ih:+t}var vC=gC,_C=Hr,Wa=rC,Rh=vC,yC="Expected a function",xC=Math.max,bC=Math.min;function TC(t,e,r){var i,n,s,a,o,u,h=0,f=!1,l=!1,c=!0;if(typeof t!="function")throw new TypeError(yC);e=Rh(e)||0,_C(r)&&(f=!!r.leading,l="maxWait"in r,s=l?xC(Rh(r.maxWait)||0,e):s,c="trailing"in r?!!r.trailing:c);function d(T){var w=i,S=n;return i=n=void 0,h=T,a=t.apply(S,w),a}function p(T){return h=T,o=setTimeout(g,e),f?d(T):a}function m(T){var w=T-u,S=T-h,A=e-w;return l?bC(A,s-S):A}function v(T){var w=T-u,S=T-h;return u===void 0||w>=e||w<0||l&&S>=s}function g(){var T=Wa();if(v(T))return y(T);o=setTimeout(g,m(T))}function y(T){return o=void 0,c&&i?d(T):(i=n=void 0,a)}function _(){o!==void 0&&clearTimeout(o),h=0,i=u=n=o=void 0}function x(){return o===void 0?a:y(Wa())}function b(){var T=Wa(),w=v(T);if(i=arguments,n=this,u=T,w){if(o===void 0)return p(u);if(l)return clearTimeout(o),o=setTimeout(g,e),d(u)}return o===void 0&&(o=setTimeout(g,e)),a}return b.cancel=_,b.flush=x,b}var wC=TC;const jn=Bt(wC),qa=(t,e,r,i)=>{const n=P.useCallback(jn(t,i),[t,i]),s=P.useCallback(jn(e,i),[e,i]),a=P.useCallback(jn(r,i),[r,i]),o=P.useCallback(()=>{n()},[n]),u=P.useCallback(()=>{s()},[s]),h=P.useCallback(()=>{a()},[a]);return{onPointerOver:o,onPointerDown:u,onPointerOut:h}},SC={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Ph=L.forwardRef((t,e)=>{const[r,i]=L.useState(0),[n,s]=L.useState(),a=P.useRef(null),o=P.useRef(null),u=P.useRef(null),h=P.useRef(SC),f=P.useRef(),{uniqueId:l,mute:c=!1,src:d,startAt:p,endAt:m,frameStartAt:v,frameEndAt:g,visible:y,disabled:_,transformation:{x,y:b,width:T,height:w,animation:S,colorCorrection:A={}},pointerdown:C=()=>{},pointerout:O=()=>{},pointerover:z=()=>{},fps:I=0}=t,{tl:E,dragModeRef:B,isRemotion:U}=P.useContext(Et),{onPointerDown:R,onPointerOut:$,onPointerOver:X}=qa(z,C,O,1),{blurRadius:M=0,vignette:F=0,noise:H=0}=A,{temperatureFilter:V,sharpnessFilter:W,hueFilter:ne,blurFilter:oe,adjustmentFilter:ce,vignetteFilter:ve,noiseFilter:de}=rr(A),G=d||"",q=L.useMemo(()=>{const Q=document.createElement("video");return Q.src=d,Q.crossOrigin="Anonymus",Q.autoplay=!1,Q.currentTime=v===0?.001:v,Q},[d,v]);Ee(ye.PAUSE,()=>{u.current&&(u.current.pause(),h.current.isPlaying=!1)}),Ee(ye.SCRUBBER_CLICKED,()=>{u.current&&(u.current.pause(),h.current.isPlaying=!1)}),Ee(ye.REVERSE_MODE_END,()=>{u.current&&(u.current.pause(),h.current.isPlaying=!1)});const Y=L.useCallback(jn(()=>{if(u.current){const Q=u.current;Q.currentTime>0&&!Q.paused&&!Q.ended&&Q.readyState>Q.HAVE_CURRENT_DATA&&u.current.pause(),h.current.isPlaying=!1}},400),[u]);L.useEffect(()=>{u.current&&!U?(B.current?(Y(),h.current.isPlaying=!1,h.current.isDragging=!0):h.current.isDragging=!1,u.current.muted=c):h.current.isDragging=!1,h.current.isMuted=c},[c,B,Y,u]);const me=Q=>{if(u.current){if(u.current.currentTime=Number(Q),!B.current){const he=u.current,Oe=he.currentTime>0&&!he.paused&&!he.ended&&he.readyState>he.HAVE_CURRENT_DATA;E.current&&E.current.isActive()&&f.current&&f.current.isActive()&&(Oe||u.current.play(),h.current.isPlaying=!0,i($r=>$r+1))}h.current.progress=0}},De=()=>{if(u.current){const Q=u.current;Q.currentTime>0&&!Q.paused&&!Q.ended&&Q.readyState>Q.HAVE_CURRENT_DATA&&u.current.pause(),h.current.isPlaying=!1,f.current&&(h.current.progress=f.current.progress())}},Be=()=>{},ct=()=>{var Q,he;if(f.current&&(h.current.progress=f.current.progress()),u.current&&f.current){const Oe=v+((Q=f==null?void 0:f.current)==null?void 0:Q.time()),$r=Math.abs(u.current.currentTime-Oe),Dt=u.current,Gr=Dt.currentTime>0&&!Dt.paused&&!Dt.ended&&Dt.readyState>Dt.HAVE_CURRENT_DATA;B.current?(u.current.currentTime=Oe,setTimeout(()=>{u.current&&u.current.play().then(()=>{h.current.isPlaying=!1,u.current&&u.current.pause()})},100),h.current.isPlaying=!1):(Gr!==h.current.isPlaying||!Gr)&&h.current.progress>.01&&h.current.progress<.99?(he=E.current)!=null&&he.isActive()&&f.current&&f.current.isActive()&&(Gr||u.current.play(),h.current.isPlaying=!0):$r>.3&&h.current.progress>.01&&h.current.progress<.99&&(u.current.currentTime=Oe)}};return P.useEffect(()=>{let Q=k.context(()=>{});if(o.current&&E.current){const he={duration:Number(g)-Number(v),onStart:me,onComplete:De,onStartParams:[v,g],onCompleteParams:[],onInterrupt:Be,onUpdate:ct,onUpdateParams:[v,g],onPause:()=>{console.log("onPause video sprite pause",l)},onResume:()=>{console.log("onResume video sprite resume",l)},onReverseComplete:()=>{console.log("onReverseComplete video sprite reverse complete",l)},onKill:()=>{console.log("onKill video sprite kill",l)}};Q=k.context(()=>{f.current=k.from(o.current,he,v),E.current.add(f.current,p)})}return()=>{f.current&&(f.current.kill(),k.killTweensOf(f.current)),Q.revert()}},[S,p,m,v,g]),L.useEffect(()=>{u.current&&(u.current.muted=c,h.current.isMuted=c);const Q=setTimeout(()=>{u.current&&(u.current.muted=c,h.current.isMuted=c)},1500);return()=>{clearTimeout(Q)}},[c]),L.useEffect(()=>{const Q=Math.round((Number(v)+Number.EPSILON)*100)/100,he=function(){u.current&&(u.current.currentTime=Q,u.current.muted=c)},Oe=function(){if(u.current){const At=u.current;At.currentTime>0&&!At.paused&&!At.ended&&At.readyState>At.HAVE_CURRENT_DATA&&u.current.pause()}h.current.isWaiting=!1,h.current.isStalled=!1},$r=function(){u.current&&u.current.pause(),h.current.isWaiting=!0,h.current.isStalled=!1},Dt=function(){h.current.isWaiting=!1,h.current.isStalled=!1},Gr=function(){h.current.isWaiting=!1,h.current.isStalled=!0},RC=Math.round((Number(v)+Number.EPSILON)*100)/100,PC=Math.round((Number(g)+Number.EPSILON)*100)/100,MC=`${G}#t=${RC},${PC}`;return Ge.Texture.fromLoader(q,MC,l,{pixiIdPrefix:l,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:I?Math.max(120,Number(I)):30}}).then(At=>{At&&(s(At),u.current=At.baseTexture.resource.source,u.current.id=l,u.current.addEventListener("loadedmetadata",he),u.current.addEventListener("ended",Oe),u.current.addEventListener("loadstart",$r),u.current.addEventListener("canplaythrough",Dt),u.current.addEventListener("stalled",Gr))}),()=>{u.current&&(u.current.pause(),u.current.removeEventListener("loadedmetadata",he),u.current.removeEventListener("ended",Oe),u.current.removeEventListener("loadstart",$r),u.current.removeEventListener("canplaythrough",Dt),u.current.removeEventListener("stalled",Gr))}},[G,l,v,g,q]),L.useEffect(()=>{const Q=setTimeout(()=>{n&&f.current&&E.current&&f.current.progress()<.1&&u.current&&!f.current.isActive()&&!U&&u.current.play().then(()=>{h.current.isPlaying=!1,u.current&&u.current.pause()})},30);return()=>{clearTimeout(Q)}},[n]),L.useEffect(()=>{E.current&&!E.current.isActive()&&!U&&(h.current.isPlaying=!1,u.current&&u.current.pause());const Q=setTimeout(()=>{if(n&&E.current&&r>0&&!U){E.current.isActive()||(h.current.isPlaying=!1,u.current&&u.current.pause());const he=u.current;he&&E.current.isActive()&&f.current&&f.current.isActive()&&(he.currentTime>0&&!he.paused&&!he.ended&&he.readyState>he.HAVE_CURRENT_DATA||u.current.play(),h.current.isPlaying=!0)}},10);return()=>{clearTimeout(Q)}},[r,n]),K.jsx(Gt,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:R,pointerover:X,pointerout:$,children:K.jsx(te.Container,{ref:o,children:n&&K.jsx(te.Sprite,{texture:n,width:T,height:w,anchor:.5,x,y:b,ref:a,alpha:y?1:0,...!_&&y&&{interactive:!0,pointerdown:C},filters:[V,W,ne,ce,...M>0?[oe]:[],...F>0?[ve]:[],...H>0?[de]:[]]})})})});Ph.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const AC=L.forwardRef((t,e)=>{const[r,i]=L.useState(),n=P.useRef(null),s=P.useRef(null),{visible:a,disabled:o,transformation:{x:u,y:h,width:f,height:l,colorCorrection:c={}},pointerdown:d=()=>{},pointerout:p=()=>{},pointerover:m=()=>{},canvasImageRef:v}=t,g=v&&(v==null?void 0:v.getCanvas()),y=te.useApp(),{onPointerDown:_,onPointerOut:x,onPointerOver:b}=qa(m,d,p,1),{blurRadius:T=0,vignette:w=0,noise:S=0}=c,{temperatureFilter:A,sharpnessFilter:C,hueFilter:O,blurFilter:z,adjustmentFilter:I,vignetteFilter:E,noiseFilter:B}=rr(c);return te.useTick(()=>{if(n.current&&n.current.texture){const U=n.current.texture.baseTexture;U&&U.update(),s.current&&y.renderer.render(s.current)}}),L.useEffect(()=>{if(!dr(g)){const U=Ge.Texture.from(g);i(U)}},[g]),K.jsx(Gt,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:_,pointerover:b,pointerout:x,children:K.jsx(te.Container,{ref:s,children:r&&K.jsx(te.Sprite,{texture:r,width:f,height:l,anchor:.5,x:u,y:h,ref:n,alpha:a?1:0,...!o&&a&&{interactive:!0,pointerdown:d},filters:[A,C,O,I,...T>0?[z]:[],...w>0?[E]:[],...S>0?[B]:[]]})})})}),EC=t=>{const{startAt:e,endAt:r,uniqueId:i}=t,n=P.useRef(null),s=P.useRef(null),a=P.useRef(null),o=P.useRef(null),u=P.useRef(null),h=P.useRef(!1),{tl:f,totalDuration:l=0,reverseModeRef:c}=P.useContext(Et),d=e<.2?"static":"none",p=P.useRef(1);Ee(ye.COMPLETE,()=>{n.current&&(n.current.eventMode=d)}),Ee(ye.REVERSE_MODE_END,()=>{if(f.current){const v=f.current.time();v>e&&v<r?(s.current&&(s.current.alpha=1),n.current&&(n.current.alpha=1,n.current.eventMode="static")):(s.current&&(s.current.alpha=0),n.current&&(n.current.alpha=0,n.current.eventMode="none"))}});const m=()=>{if(c.current&&o.current&&f.current){h.current=!0;const v=f.current.time();v>e&&v<r?(s.current&&(s.current.alpha=1),n.current&&(n.current.alpha=1)):(s.current&&(s.current.alpha=0),n.current&&(n.current.alpha=0))}};return Ee(ye.COMPLETE,()=>{}),L.useEffect(()=>{const v=k.context(()=>{n.current&&f.current&&(u.current&&(u.current.kill(),f.current.remove(u.current)),u.current=k.to(n.current,{alpha:1,duration:.1}),o.current&&(o.current.kill(),f.current.remove(o.current)),o.current=k.timeline().fromTo(s,{pixi:{alpha:e<.2?1:0}},{pixi:{alpha:1,duration:.1}}).to(s.current,{alpha:1,duration:Number(r)-Number(e),onStart:()=>{n.current&&(n.current.alpha=1,n.current.eventMode="static",p.current=1)},onUpdate:m,onComplete:()=>{n.current&&(n.current.alpha=0,n.current.eventMode="none",p.current=0)}}),f.current.add([u.current,o.current],e))});return()=>{o.current&&(f.current.remove(o.current),o.current.progress(0).kill()),u.current&&(f.current.remove(u.current),u.current.progress(0).kill()),v.revert()}},[e,r,l,i]),K.jsx(te.Container,{ref:n,alpha:e<.2?1:0,eventMode:e<.2?"static":"none",children:K.jsx(te.Container,{ref:a,children:K.jsx(te.Container,{ref:s,alpha:1,children:t.children})})})},CC=t=>{const{startAt:e,endAt:r}=t,{setTotalDuration:i}=P.useContext(Et);return L.useEffect(()=>{i&&i(Number(r)+.2)},[e,r]),t.children},IC=L.forwardRef((t,e)=>{const[r,i]=L.useState(),n=P.useRef(null),s=P.useRef(null),{visible:a,disabled:o,transformation:{x:u,y:h,width:f,height:l,colorCorrection:c={}},pointerdown:d=()=>{},pointerout:p=()=>{},pointerover:m=()=>{},canvasImageRef:v}=t,g=v&&(v==null?void 0:v.getCanvas()),y=te.useApp(),{onPointerDown:_,onPointerOut:x,onPointerOver:b}=qa(m,d,p,1),{blurRadius:T=0,vignette:w=0,noise:S=0}=c,{temperatureFilter:A,sharpnessFilter:C,hueFilter:O,blurFilter:z,adjustmentFilter:I,vignetteFilter:E,noiseFilter:B}=rr(c);return te.useTick(()=>{if(n.current&&n.current.texture){const U=n.current.texture.baseTexture;U&&U.update(),s.current&&y.renderer.render(s.current)}}),L.useEffect(()=>{if(!dr(g)){const U=Ge.Texture.from(g);i(U)}},[g]),K.jsx(Gt,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:_,pointerover:b,pointerout:x,children:K.jsx(te.Container,{ref:s,children:r&&K.jsx(te.Sprite,{texture:r,width:f,height:l,anchor:.5,x:u,y:h,ref:n,alpha:a?1:0,...!o&&a&&{interactive:!0,pointerdown:d},filters:[A,C,O,I,...T>0?[z]:[],...w>0?[E]:[],...S>0?[B]:[]]})})})});var Mh=(t=>(t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t))(Mh||{});le.Animations=hs,le.BlendModes=Mh,le.Events=ye,le.GsapPixieContext=Et,le.GsapPixieContextProvider=Hh,le.PixiAnimatedSprite=Eh,le.PixiAudioSprite=Xw,le.PixiGifSprite=QE,le.PixiImageSprite=jc,le.PixiRemotionSprite=IC,le.PixiSequence=EC,le.PixiSequenceWrapper=CC,le.PixiSvgPathSprite=Vw,le.PixiTextSprite=JE,le.PixiVideoCanvasSyncSprite=AC,le.PixiVideoSprite=Ph,le.emitCustomEvent=ar,le.newCustomEventEmitter=jh,le.useCustomEventListener=Ee,le.useGsapEffect=ol,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|
|
1990
|
+
*/(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(r){var i=this;if(!i.ctx||!i.ctx.listener)return i;for(var n=i._howls.length-1;n>=0;n--)i._howls[n].stereo(r);return i},HowlerGlobal.prototype.pos=function(r,i,n){var s=this;if(!s.ctx||!s.ctx.listener)return s;if(i=typeof i!="number"?s._pos[1]:i,n=typeof n!="number"?s._pos[2]:n,typeof r=="number")s._pos=[r,i,n],typeof s.ctx.listener.positionX<"u"?(s.ctx.listener.positionX.setTargetAtTime(s._pos[0],Howler.ctx.currentTime,.1),s.ctx.listener.positionY.setTargetAtTime(s._pos[1],Howler.ctx.currentTime,.1),s.ctx.listener.positionZ.setTargetAtTime(s._pos[2],Howler.ctx.currentTime,.1)):s.ctx.listener.setPosition(s._pos[0],s._pos[1],s._pos[2]);else return s._pos;return s},HowlerGlobal.prototype.orientation=function(r,i,n,s,a,o){var u=this;if(!u.ctx||!u.ctx.listener)return u;var h=u._orientation;if(i=typeof i!="number"?h[1]:i,n=typeof n!="number"?h[2]:n,s=typeof s!="number"?h[3]:s,a=typeof a!="number"?h[4]:a,o=typeof o!="number"?h[5]:o,typeof r=="number")u._orientation=[r,i,n,s,a,o],typeof u.ctx.listener.forwardX<"u"?(u.ctx.listener.forwardX.setTargetAtTime(r,Howler.ctx.currentTime,.1),u.ctx.listener.forwardY.setTargetAtTime(i,Howler.ctx.currentTime,.1),u.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),u.ctx.listener.upX.setTargetAtTime(s,Howler.ctx.currentTime,.1),u.ctx.listener.upY.setTargetAtTime(a,Howler.ctx.currentTime,.1),u.ctx.listener.upZ.setTargetAtTime(o,Howler.ctx.currentTime,.1)):u.ctx.listener.setOrientation(r,i,n,s,a,o);else return h;return u},Howl.prototype.init=function(r){return function(i){var n=this;return n._orientation=i.orientation||[1,0,0],n._stereo=i.stereo||null,n._pos=i.pos||null,n._pannerAttr={coneInnerAngle:typeof i.coneInnerAngle<"u"?i.coneInnerAngle:360,coneOuterAngle:typeof i.coneOuterAngle<"u"?i.coneOuterAngle:360,coneOuterGain:typeof i.coneOuterGain<"u"?i.coneOuterGain:0,distanceModel:typeof i.distanceModel<"u"?i.distanceModel:"inverse",maxDistance:typeof i.maxDistance<"u"?i.maxDistance:1e4,panningModel:typeof i.panningModel<"u"?i.panningModel:"HRTF",refDistance:typeof i.refDistance<"u"?i.refDistance:1,rolloffFactor:typeof i.rolloffFactor<"u"?i.rolloffFactor:1},n._onstereo=i.onstereo?[{fn:i.onstereo}]:[],n._onpos=i.onpos?[{fn:i.onpos}]:[],n._onorientation=i.onorientation?[{fn:i.onorientation}]:[],r.call(this,i)}}(Howl.prototype.init),Howl.prototype.stereo=function(r,i){var n=this;if(!n._webAudio)return n;if(n._state!=="loaded")return n._queue.push({event:"stereo",action:function(){n.stereo(r,i)}}),n;var s=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof i>"u")if(typeof r=="number")n._stereo=r,n._pos=[r,0,0];else return n._stereo;for(var a=n._getSoundIds(i),o=0;o<a.length;o++){var u=n._soundById(a[o]);if(u)if(typeof r=="number")u._stereo=r,u._pos=[r,0,0],u._node&&(u._pannerAttr.panningModel="equalpower",(!u._panner||!u._panner.pan)&&e(u,s),s==="spatial"?typeof u._panner.positionX<"u"?(u._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),u._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),u._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):u._panner.setPosition(r,0,0):u._panner.pan.setValueAtTime(r,Howler.ctx.currentTime)),n._emit("stereo",u._id);else return u._stereo}return n},Howl.prototype.pos=function(r,i,n,s){var a=this;if(!a._webAudio)return a;if(a._state!=="loaded")return a._queue.push({event:"pos",action:function(){a.pos(r,i,n,s)}}),a;if(i=typeof i!="number"?0:i,n=typeof n!="number"?-.5:n,typeof s>"u")if(typeof r=="number")a._pos=[r,i,n];else return a._pos;for(var o=a._getSoundIds(s),u=0;u<o.length;u++){var h=a._soundById(o[u]);if(h)if(typeof r=="number")h._pos=[r,i,n],h._node&&((!h._panner||h._panner.pan)&&e(h,"spatial"),typeof h._panner.positionX<"u"?(h._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),h._panner.positionY.setValueAtTime(i,Howler.ctx.currentTime),h._panner.positionZ.setValueAtTime(n,Howler.ctx.currentTime)):h._panner.setPosition(r,i,n)),a._emit("pos",h._id);else return h._pos}return a},Howl.prototype.orientation=function(r,i,n,s){var a=this;if(!a._webAudio)return a;if(a._state!=="loaded")return a._queue.push({event:"orientation",action:function(){a.orientation(r,i,n,s)}}),a;if(i=typeof i!="number"?a._orientation[1]:i,n=typeof n!="number"?a._orientation[2]:n,typeof s>"u")if(typeof r=="number")a._orientation=[r,i,n];else return a._orientation;for(var o=a._getSoundIds(s),u=0;u<o.length;u++){var h=a._soundById(o[u]);if(h)if(typeof r=="number")h._orientation=[r,i,n],h._node&&(h._panner||(h._pos||(h._pos=a._pos||[0,0,-.5]),e(h,"spatial")),typeof h._panner.orientationX<"u"?(h._panner.orientationX.setValueAtTime(r,Howler.ctx.currentTime),h._panner.orientationY.setValueAtTime(i,Howler.ctx.currentTime),h._panner.orientationZ.setValueAtTime(n,Howler.ctx.currentTime)):h._panner.setOrientation(r,i,n)),a._emit("orientation",h._id);else return h._orientation}return a},Howl.prototype.pannerAttr=function(){var r=this,i=arguments,n,s,a;if(!r._webAudio)return r;if(i.length===0)return r._pannerAttr;if(i.length===1)if(typeof i[0]=="object")n=i[0],typeof s>"u"&&(n.pannerAttr||(n.pannerAttr={coneInnerAngle:n.coneInnerAngle,coneOuterAngle:n.coneOuterAngle,coneOuterGain:n.coneOuterGain,distanceModel:n.distanceModel,maxDistance:n.maxDistance,refDistance:n.refDistance,rolloffFactor:n.rolloffFactor,panningModel:n.panningModel}),r._pannerAttr={coneInnerAngle:typeof n.pannerAttr.coneInnerAngle<"u"?n.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:typeof n.pannerAttr.coneOuterAngle<"u"?n.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:typeof n.pannerAttr.coneOuterGain<"u"?n.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:typeof n.pannerAttr.distanceModel<"u"?n.pannerAttr.distanceModel:r._distanceModel,maxDistance:typeof n.pannerAttr.maxDistance<"u"?n.pannerAttr.maxDistance:r._maxDistance,refDistance:typeof n.pannerAttr.refDistance<"u"?n.pannerAttr.refDistance:r._refDistance,rolloffFactor:typeof n.pannerAttr.rolloffFactor<"u"?n.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:typeof n.pannerAttr.panningModel<"u"?n.pannerAttr.panningModel:r._panningModel});else return a=r._soundById(parseInt(i[0],10)),a?a._pannerAttr:r._pannerAttr;else i.length===2&&(n=i[0],s=parseInt(i[1],10));for(var o=r._getSoundIds(s),u=0;u<o.length;u++)if(a=r._soundById(o[u]),a){var h=a._pannerAttr;h={coneInnerAngle:typeof n.coneInnerAngle<"u"?n.coneInnerAngle:h.coneInnerAngle,coneOuterAngle:typeof n.coneOuterAngle<"u"?n.coneOuterAngle:h.coneOuterAngle,coneOuterGain:typeof n.coneOuterGain<"u"?n.coneOuterGain:h.coneOuterGain,distanceModel:typeof n.distanceModel<"u"?n.distanceModel:h.distanceModel,maxDistance:typeof n.maxDistance<"u"?n.maxDistance:h.maxDistance,refDistance:typeof n.refDistance<"u"?n.refDistance:h.refDistance,rolloffFactor:typeof n.rolloffFactor<"u"?n.rolloffFactor:h.rolloffFactor,panningModel:typeof n.panningModel<"u"?n.panningModel:h.panningModel};var f=a._panner;f?(f.coneInnerAngle=h.coneInnerAngle,f.coneOuterAngle=h.coneOuterAngle,f.coneOuterGain=h.coneOuterGain,f.distanceModel=h.distanceModel,f.maxDistance=h.maxDistance,f.refDistance=h.refDistance,f.rolloffFactor=h.rolloffFactor,f.panningModel=h.panningModel):(a._pos||(a._pos=r._pos||[0,0,-.5]),e(a,"spatial"))}return r},Sound.prototype.init=function(r){return function(){var i=this,n=i._parent;i._orientation=n._orientation,i._stereo=n._stereo,i._pos=n._pos,i._pannerAttr=n._pannerAttr,r.call(this),i._stereo?n.stereo(i._stereo):i._pos&&n.pos(i._pos[0],i._pos[1],i._pos[2],i._id)}}(Sound.prototype.init),Sound.prototype.reset=function(r){return function(){var i=this,n=i._parent;return i._orientation=n._orientation,i._stereo=n._stereo,i._pos=n._pos,i._pannerAttr=n._pannerAttr,i._stereo?n.stereo(i._stereo):i._pos?n.pos(i._pos[0],i._pos[1],i._pos[2],i._id):i._panner&&(i._panner.disconnect(0),i._panner=void 0,n._refreshBuffer(i)),r.call(this)}}(Sound.prototype.reset);var e=function(r,i){i=i||"spatial",i==="spatial"?(r._panner=Howler.ctx.createPanner(),r._panner.coneInnerAngle=r._pannerAttr.coneInnerAngle,r._panner.coneOuterAngle=r._pannerAttr.coneOuterAngle,r._panner.coneOuterGain=r._pannerAttr.coneOuterGain,r._panner.distanceModel=r._pannerAttr.distanceModel,r._panner.maxDistance=r._pannerAttr.maxDistance,r._panner.refDistance=r._pannerAttr.refDistance,r._panner.rolloffFactor=r._pannerAttr.rolloffFactor,r._panner.panningModel=r._pannerAttr.panningModel,typeof r._panner.positionX<"u"?(r._panner.positionX.setValueAtTime(r._pos[0],Howler.ctx.currentTime),r._panner.positionY.setValueAtTime(r._pos[1],Howler.ctx.currentTime),r._panner.positionZ.setValueAtTime(r._pos[2],Howler.ctx.currentTime)):r._panner.setPosition(r._pos[0],r._pos[1],r._pos[2]),typeof r._panner.orientationX<"u"?(r._panner.orientationX.setValueAtTime(r._orientation[0],Howler.ctx.currentTime),r._panner.orientationY.setValueAtTime(r._orientation[1],Howler.ctx.currentTime),r._panner.orientationZ.setValueAtTime(r._orientation[2],Howler.ctx.currentTime)):r._panner.setOrientation(r._orientation[0],r._orientation[1],r._orientation[2])):(r._panner=Howler.ctx.createStereoPanner(),r._panner.pan.setValueAtTime(r._stereo,Howler.ctx.currentTime)),r._panner.connect(r._node),r._paused||r._parent.pause(r._id,!0).play(r._id,!0)}})()})(hh);const Xw=t=>{const e={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=L.useState(!1),i=P.useRef(null),n=P.useRef(e),s=P.useRef(null),a=L.useRef(null),{tl:o,dragModeRef:u}=P.useContext(Et),{uniqueId:h,src:f,startAt:l,endAt:c,mute:d,speed:p,audioStartAt:m,audioEndAt:v,visible:g}=t;Ee(ye.PAUSE,()=>{var T;i.current&&a.current&&((T=a.current)==null||T.pause(),n.current.isPlaying=!1)}),Ee(ye.COMPLETE,()=>{m>0&&a.current&&a.current.seek(m)}),Ee(ye.SCRUBBER_CLICKED,()=>{var T;i.current&&a.current&&((T=a.current)==null||T.pause(),n.current.isPlaying=!1)}),L.useEffect(()=>{a.current&&(u.current?(a.current.pause(),n.current.isPlaying=!1,n.current.isDragging=!0):n.current.isDragging=!1)},[u]);const y=(T,w)=>{o.current&&o.current.isActive()&&s.current&&s.current.isActive()&&!u.current&&a.current&&(console.log("gsap on start 0020",h,T,w),a.current.play(),n.current.isPlaying=!0)},_=()=>{var T;i.current&&((T=a.current)==null||T.stop(),n.current.isPlaying=!1,n.current.completed=!0)},x=T=>{var S,A;const w=T+((S=s.current)==null?void 0:S.time());a.current&&u.current?(a.current.seek(w),a.current.pause(),n.current.isPlaying=!1):i.current&&!n.current.isPlaying&&((A=o.current)!=null&&A.isActive())&&a.current&&(a.current.seek(w),a.current.play(),n.current.isPlaying=!0)},b=()=>{};return P.useEffect(()=>{let T=k.context(()=>{});if(i.current&&o.current){const w={duration:Number(v)-Number(m),onStart:y,onComplete:_,onStartParams:[m,v],onCompleteParams:[],onInterrupt:b,onUpdate:x,onUpdateParams:[m,v]};T=k.context(()=>{s.current=k.from(i.current,w,m),o.current.to(i.current,{alpha:1,duration:.01},l).to(i.current,{alpha:0,duration:.1},Number(c)),o.current.add(s.current,l)})}return()=>{s.current&&(s.current.kill(),k.killTweensOf(s.current)),T.revert()}},[l,c,m,v]),L.useEffect(()=>{i.current&&r(!0)},[]),L.useEffect(()=>(dr(f)||(a.current=new hh.Howl({src:[f],autoplay:!1,loop:!1,rate:p||1,volume:!d&&g?1:0,onload:()=>{console.log("loaded audio sprite"+h),n.current.loaded=!0,a.current&&(m>0&&a.current.seek(m),a.current.volume(!d&&g?1:0),a.current.rate(p||1),a.current.pause(),n.current.isPlaying=!1,n.current.completed=!1)},onend:()=>{console.log("end of playing audio sprite"+h),n.current.isPlaying=!1,n.current.completed=!0},onplay:()=>{console.log("play of playing audio sprite"+h),n.current.isPlaying=!0},onpause:()=>{console.log("pause of playing audio sprite"+h),n.current.isPlaying=!1},onstop:()=>{console.log("stop of playing audio sprite"+h),n.current.isPlaying=!1}})),()=>{a.current&&a.current.unload()}),[h,f,l,c,m,v,d,g,p]),L.useEffect(()=>{a.current&&(console.log("running updateEffect 2002",h,v),a.current.volume(!d&&g?1:0),a.current.rate(p||1),n.current.isPlaying=!0)},[d,g,p]),K.jsx(te.Container,{ref:i})};function Ww(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var fh=Ww,qw=ho,Yw=as,Kw=1,Zw=2;function Qw(t,e,r,i){var n=r.length,s=n,a=!i;if(t==null)return!s;for(t=Object(t);n--;){var o=r[n];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<s;){o=r[n];var u=o[0],h=t[u],f=o[1];if(a&&o[2]){if(h===void 0&&!(u in t))return!1}else{var l=new qw;if(i)var c=i(h,f,u,t,e,l);if(!(c===void 0?Yw(f,h,Kw|Zw,i,l):c))return!1}}return!0}var Jw=Qw,eS=Hr;function tS(t){return t===t&&!eS(t)}var dh=tS,rS=dh,iS=Jn;function nS(t){for(var e=iS(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,rS(n)]}return e}var sS=nS;function aS(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var ph=aS,oS=Jw,lS=sS,uS=ph;function cS(t){var e=lS(t);return e.length==1&&e[0][2]?uS(e[0][0],e[0][1]):function(r){return r===t||oS(r,t,e)}}var hS=cS,fS=jr,dS=Vr,pS="[object Symbol]";function mS(t){return typeof t=="symbol"||dS(t)&&fS(t)==pS}var Bn=mS,gS=ft,vS=Bn,_S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yS=/^\w*$/;function xS(t,e){if(gS(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||vS(t)?!0:yS.test(t)||!_S.test(t)||e!=null&&t in Object(e)}var Va=xS,mh=Wn,bS="Expected a function";function Xa(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(bS);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=t.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(Xa.Cache||mh),r}Xa.Cache=mh;var TS=Xa,wS=TS,SS=500;function AS(t){var e=wS(t,function(i){return r.size===SS&&r.clear(),i}),r=e.cache;return e}var ES=AS,CS=ES,IS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,RS=/\\(\\)?/g,PS=CS(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(IS,function(r,i,n,s){e.push(n?s.replace(RS,"$1"):i||r)}),e}),MS=PS,gh=Ai,OS=fh,FS=ft,NS=Bn,kS=1/0,vh=gh?gh.prototype:void 0,_h=vh?vh.toString:void 0;function yh(t){if(typeof t=="string")return t;if(FS(t))return OS(t,yh)+"";if(NS(t))return _h?_h.call(t):"";var e=t+"";return e=="0"&&1/t==-kS?"-0":e}var LS=yh,DS=LS;function BS(t){return t==null?"":DS(t)}var US=BS,$S=ft,GS=Va,zS=MS,jS=US;function HS(t,e){return $S(t)?t:GS(t,e)?[t]:zS(jS(t))}var xh=HS,VS=Bn,XS=1/0;function WS(t){if(typeof t=="string"||VS(t))return t;var e=t+"";return e=="0"&&1/t==-XS?"-0":e}var Un=WS,qS=xh,YS=Un;function KS(t,e){e=qS(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[YS(e[r++])];return r&&r==i?t:void 0}var bh=KS,ZS=bh;function QS(t,e,r){var i=t==null?void 0:ZS(t,e);return i===void 0?r:i}var JS=QS;function eA(t,e){return t!=null&&e in Object(t)}var tA=eA,rA=xh,iA=Yn,nA=ft,sA=xo,aA=Zn,oA=Un;function lA(t,e,r){e=rA(e,t);for(var i=-1,n=e.length,s=!1;++i<n;){var a=oA(e[i]);if(!(s=t!=null&&r(t,a)))break;t=t[a]}return s||++i!=n?s:(n=t==null?0:t.length,!!n&&aA(n)&&sA(a,n)&&(nA(t)||iA(t)))}var uA=lA,cA=tA,hA=uA;function fA(t,e){return t!=null&&hA(t,e,cA)}var dA=fA,pA=as,mA=JS,gA=dA,vA=Va,_A=dh,yA=ph,xA=Un,bA=1,TA=2;function wA(t,e){return vA(t)&&_A(e)?yA(xA(t),e):function(r){var i=mA(r,t);return i===void 0&&i===e?gA(r,t):pA(e,i,bA|TA)}}var SA=wA;function AA(t){return t}var EA=AA;function CA(t){return function(e){return e==null?void 0:e[t]}}var IA=CA,RA=bh;function PA(t){return function(e){return RA(e,t)}}var MA=PA,OA=IA,FA=MA,NA=Va,kA=Un;function LA(t){return NA(t)?OA(kA(t)):FA(t)}var DA=LA,BA=hS,UA=SA,$A=EA,GA=ft,zA=DA;function jA(t){return typeof t=="function"?t:t==null?$A:typeof t=="object"?GA(t)?UA(t[0],t[1]):BA(t):zA(t)}var HA=jA;function VA(t){return function(e,r,i){for(var n=-1,s=Object(e),a=i(e),o=a.length;o--;){var u=a[t?o:++n];if(r(s[u],u,s)===!1)break}return e}}var XA=VA,WA=XA,qA=WA(),YA=qA,KA=YA,ZA=Jn;function QA(t,e){return t&&KA(t,e,ZA)}var JA=QA,eE=Mi;function tE(t,e){return function(r,i){if(r==null)return r;if(!eE(r))return t(r,i);for(var n=r.length,s=e?n:-1,a=Object(r);(e?s--:++s<n)&&i(a[s],s,a)!==!1;);return r}}var rE=tE,iE=JA,nE=rE,sE=nE(iE),aE=sE,oE=aE,lE=Mi;function uE(t,e){var r=-1,i=lE(t)?Array(t.length):[];return oE(t,function(n,s,a){i[++r]=e(n,s,a)}),i}var cE=uE,hE=fh,fE=HA,dE=cE,pE=ft;function mE(t,e){var r=pE(t)?hE:dE;return r(t,fE(e))}var gE=mE;const vE=Bt(gE);var sr={},Th={},St={};Object.defineProperty(St,"__esModule",{value:!0}),St.loop=St.conditional=St.parse=void 0;var _E=function t(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:i;if(Array.isArray(r))r.forEach(function(a){return t(e,a,i,n)});else if(typeof r=="function")r(e,i,n,t);else{var s=Object.keys(r)[0];Array.isArray(r[s])?(n[s]={},t(e,r[s],i,n[s])):n[s]=r[s](e,i,n,t)}return i};St.parse=_E;var yE=function(e,r){return function(i,n,s,a){r(i,n,s)&&a(i,e,n,s)}};St.conditional=yE;var xE=function(e,r){return function(i,n,s,a){for(var o=[],u=i.pos;r(i,n,s);){var h={};if(a(i,e,n,h),i.pos===u)break;u=i.pos,o.push(h)}return o}};St.loop=xE;var Se={};Object.defineProperty(Se,"__esModule",{value:!0}),Se.readBits=Se.readArray=Se.readUnsigned=Se.readString=Se.peekBytes=Se.readBytes=Se.peekByte=Se.readByte=Se.buildStream=void 0;var bE=function(e){return{data:e,pos:0}};Se.buildStream=bE;var wh=function(){return function(e){return e.data[e.pos++]}};Se.readByte=wh;var TE=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+e]}};Se.peekByte=TE;var $n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};Se.readBytes=$n;var wE=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};Se.peekBytes=wE;var SE=function(e){return function(r){return Array.from($n(e)(r)).map(function(i){return String.fromCharCode(i)}).join("")}};Se.readString=SE;var AE=function(e){return function(r){var i=$n(2)(r);return e?(i[1]<<8)+i[0]:(i[0]<<8)+i[1]}};Se.readUnsigned=AE;var EE=function(e,r){return function(i,n,s){for(var a=typeof r=="function"?r(i,n,s):r,o=$n(e),u=new Array(a),h=0;h<a;h++)u[h]=o(i);return u}};Se.readArray=EE;var CE=function(e,r,i){for(var n=0,s=0;s<i;s++)n+=e[r+s]&&Math.pow(2,i-s-1);return n},IE=function(e){return function(r){for(var i=wh()(r),n=new Array(8),s=0;s<8;s++)n[7-s]=!!(i&1<<s);return Object.keys(e).reduce(function(a,o){var u=e[o];return u.length?a[o]=CE(n,u.index,u.length):a[o]=n[u.index],a},{})}};Se.readBits=IE,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=St,r=Se,i={blocks:function(c){for(var d=0,p=[],m=c.data.length,v=0,g=(0,r.readByte)()(c);g!==d&&g;g=(0,r.readByte)()(c)){if(c.pos+g>=m){var y=m-c.pos;p.push((0,r.readBytes)(y)(c)),v+=y;break}p.push((0,r.readBytes)(g)(c)),v+=g}for(var _=new Uint8Array(v),x=0,b=0;b<p.length;b++)_.set(p[b],x),x+=p[b].length;return _}},n=(0,e.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===249}),s=(0,e.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,e.conditional)({lct:(0,r.readArray)(3,function(l,c,d){return Math.pow(2,d.descriptor.lct.size+1)})},function(l,c,d){return d.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},i]}]},function(l){return(0,r.peekByte)()(l)===44}),a=(0,e.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,d,p){return(0,r.readBytes)(p.text.blockSize)(c)}},i]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===1}),o=(0,e.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(c,d,p){return(0,r.readString)(p.blockSize)(c)}},i]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===255}),u=(0,e.conditional)({comment:[{codes:(0,r.readBytes)(2)},i]},function(l){var c=(0,r.peekBytes)(2)(l);return c[0]===33&&c[1]===254}),h=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,e.conditional)({gct:(0,r.readArray)(3,function(l,c){return Math.pow(2,c.lsd.gct.size+1)})},function(l,c){return c.lsd.gct.exists}),{frames:(0,e.loop)([n,o,u,s,a],function(l){var c=(0,r.peekByte)()(l);return c===33||c===44})}],f=h;t.default=f}(Th);var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.deinterlace=void 0;var RE=function(e,r){for(var i=new Array(e.length),n=e.length/r,s=function(c,d){var p=e.slice(d*r,(d+1)*r);i.splice.apply(i,[c*r,r].concat(p))},a=[0,4,2,1],o=[8,8,4,2],u=0,h=0;h<4;h++)for(var f=a[h];f<n;f+=o[h])s(f,u),u++;return i};Gn.deinterlace=RE;var zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.lzw=void 0;var PE=function(e,r,i){var n=4096,s=-1,a=i,o,u,h,f,l,c,d,T,p,m,b,v,w,S,C,A,g=new Array(i),y=new Array(n),_=new Array(n),x=new Array(n+1);for(v=e,u=1<<v,l=u+1,o=u+2,d=s,f=v+1,h=(1<<f)-1,p=0;p<u;p++)y[p]=0,_[p]=p;var b,T,w,S,A,C;for(b=T=w=S=A=C=0,m=0;m<a;){if(S===0){if(T<f){b+=r[C]<<T,T+=8,C++;continue}if(p=b&h,b>>=f,T-=f,p>o||p==l)break;if(p==u){f=v+1,h=(1<<f)-1,o=u+2,d=s;continue}if(d==s){x[S++]=_[p],d=p,w=p;continue}for(c=p,p==o&&(x[S++]=w,p=d);p>u;)x[S++]=_[p],p=y[p];w=_[p]&255,x[S++]=w,o<n&&(y[o]=d,_[o]=w,o++,!(o&h)&&o<n&&(f++,h+=o)),d=c}S--,g[A++]=x[S],m++}for(m=A;m<a;m++)g[m]=0;return g};zn.lzw=PE,Object.defineProperty(sr,"__esModule",{value:!0}),sr.decompressFrames=sr.decompressFrame=sr.parseGIF=void 0;var ME=LE(Th),OE=St,FE=Se,NE=Gn,kE=zn;function LE(t){return t&&t.__esModule?t:{default:t}}var DE=function(e){var r=new Uint8Array(e);return(0,OE.parse)((0,FE.buildStream)(r),ME.default)};sr.parseGIF=DE;var BE=function(e){for(var r=e.pixels.length,i=new Uint8ClampedArray(r*4),n=0;n<r;n++){var s=n*4,a=e.pixels[n],o=e.colorTable[a]||[0,0,0];i[s]=o[0],i[s+1]=o[1],i[s+2]=o[2],i[s+3]=a!==e.transparentIndex?255:0}return i},Sh=function(e,r,i){if(!e.image){console.warn("gif frame does not have associated image.");return}var n=e.image,s=n.descriptor.width*n.descriptor.height,a=(0,kE.lzw)(n.data.minCodeSize,n.data.blocks,s);n.descriptor.lct.interlaced&&(a=(0,NE.deinterlace)(a,n.descriptor.width));var o={pixels:a,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?o.colorTable=n.lct:o.colorTable=r,e.gce&&(o.delay=(e.gce.delay||10)*10,o.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(o.transparentIndex=e.gce.transparentColorIndex)),i&&(o.patch=BE(o)),o};sr.decompressFrame=Sh;var UE=function(e,r){return e.frames.filter(function(i){return i.image}).map(function(i){return Sh(i,e.gct,r)})};sr.decompressFrames=UE;const Ah=(t,e={})=>{typeof e=="function"&&(e=e(t));const r=e.loaded&&t.loaded!==e.loaded,{playing:i,...n}=e,s={...t,...n};return r&&Object.assign(s,{playing:s.autoPlay&&s.loaded}),(e.delays!=null||e.frames!=null)&&Object.assign(s,{length:s.frames.length}),(e.index!=null||e.frames!=null)&&Object.assign(s,{index:s.length===0?0:(s.length+s.index)%s.length}),e.playing!=null&&Object.assign(s,s.loaded?{playing:i}:{autoPlay:i}),s},$E=t=>Ah({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},t),GE=t=>P.useReducer(Ah,t,$E);var zE='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function jE(t){const e=new Blob([zE],{type:"application/javascript"}),r=URL.createObjectURL(e),i=new Worker(r,t);return URL.revokeObjectURL(r),i}const HE=t=>({...t,frames:t.frames.map(e=>{const r=new ImageData(t.width,t.height);return r.data.set(new Uint8ClampedArray(e)),r})}),VE=(t,e)=>{const r={};return()=>(r.instance||(r.instance=t()),P.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(e&&e(r.instance),delete r.instance,delete r.timeout)})}),[r,e]),r.instance)},XE=t=>{const e=P.useRef(t);return P.useEffect(()=>{e.current=t},[t]),e},WE=t=>{const e=XE(t);return P.useCallback(r=>e.current&&e.current(r),[])},qE=VE(()=>new jE,t=>t.terminate()),YE=(t,e)=>{const r=WE(e),i=qE();P.useEffect(()=>{if(typeof t=="string"){const n=s=>{const a=s.data||s;if(a.src===t){const o=a.error?a:HE(a);r(o)}};return i.addEventListener("message",n),i.postMessage({src:t,type:"parse"}),()=>{i.postMessage({src:t,type:"cancel"}),i.removeEventListener("message",n)}}},[i,t])},KE=({isPlaying:t,forwardRef:e,...r})=>{const i=L.useRef(null);return L.useImperativeHandle(e,()=>i.current,[i]),L.useEffect(()=>{if(i.current===null)return;const n=i.current;n[t?"gotoAndPlay":"gotoAndStop"](n.currentFrame)},[t]),K.jsx(te.AnimatedSprite,{ref:i,...r,isPlaying:t})},Eh=L.memo(KE),ZE={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0,currentFrame:0},QE=L.forwardRef((t,e)=>{const[r,i]=L.useState(0),[n,s]=L.useState([]),[,a]=P.useState(!1),o=P.useRef(null),u=P.useRef(null),h=P.useRef(ZE),f=P.useRef(),[l,c]=GE({autoPlay:!1}),{tl:d}=P.useContext(Et),{src:p,uniqueId:m,startAt:v,endAt:g,frameStartAt:y,frameEndAt:_,loop:x,visible:b,disabled:T,transformation:{width:w=0,height:S=0,x:A,y:C,colorCorrection:O={}},pointerdown:z}=t,{frames:I,delays:E}=l;YE(p,c);const{temperatureFilter:B,sharpnessFilter:U,hueFilter:R,blurFilter:$,adjustmentFilter:X,vignetteFilter:M,noiseFilter:F}=rr(O),{blurRadius:H=0,vignette:V=0,noise:W=0}=O,ne=.1;L.useEffect(()=>{if(!dr(I)){const G=vE(I,Y=>{const{data:me,width:De,height:Be}=Y,ct=new Uint8Array(me);return Ge.Texture.fromBuffer(ct,De,Be)}).map((Y,me)=>({texture:Y,time:E[me]}));s(G);let q=0;E.forEach(Y=>{q+=Y}),i(q/1e3),h.current.totalDuration=q,h.current.totalFrames=I.length}},[m,I,E]);const oe=()=>{o.current&&(o.current.stop(),h.current.isPlaying=!1)},ce=()=>{if(o.current&&f.current){const de=f.current.time();let G=de===0?0:de/ne;G=isNaN(G)?0:G;const q=h.current.totalFrames;G=G>q?q:G,G=Math.round(G),G>=q?(o.current.gotoAndStop(0),h.current.isPlaying=!1):(o.current.currentFrame=G,h.current.isPlaying=!0)}},ve=()=>{a(!0)};return P.useEffect(()=>{let de=k.context(()=>{});if(u.current&&d.current&&r>0){const G={duration:Number(r),onInterrupt:oe,onUpdate:ce,onUpdateParams:[y,_]},q=Number(g)-Number(v),Y=Math.max(0,Math.floor(q/r)-1);f.current&&f.current.kill(),de=k.context(()=>{f.current=k.timeline({repeat:x?Y:0,repeatDelay:0}).from(u.current,G,y),d.current.add(f.current,v)})}return()=>{f.current&&(f.current.kill(),k.killTweensOf(f.current)),de.revert()}},[p,m,v,g,y,_,r,x]),K.jsx(Gt,{...t,ref:e,ignoreTlForVideo:!0,isGif:!0,children:K.jsx(te.Container,{ref:u,children:!dr(n)&&K.jsx(Eh,{x:A,y:C,width:w,height:S,animationSpeed:1,alpha:b?1:0,loop:x,textures:n,onComplete:ve,anchor:.5,forwardRef:o,...!T&&b&&{interactive:!0,pointerdown:z},filters:[B,U,R,X,...H>0?[$]:[],...V>0?[M]:[],...W>0?[F]:[]]})})})}),JE=L.forwardRef((t,e)=>{const i=P.useRef(null),n=P.useRef(0),s=P.useRef(null),a=P.useRef(null),o=P.useRef(16),u=P.useRef(null),{visible:h,text:f,disabled:l,transformation:c,pointerdown:d,onDobuleClick:p}=t,{x:m,y:v,fontFamily:g="Arial",fontWeight:y="normal",fontStyle:_="normal",fontSize:x=16,fontVariant:b="normal",fill:T="black",stroke:w,strokeThickness:S=0,blurRadius:A=0,blurEnabled:C=!1,dropShadowColor:O=null,dropShadow:z=!1,dropShadowBlur:I=0,wordWrapWidth:E=5e7,leading:B=0,letterSpacing:U,colorCorrection:R={}}=c,{temperatureFilter:$,sharpnessFilter:X,hueFilter:M,blurFilter:F,adjustmentFilter:H}=rr(R),{blurRadius:V=0}=R;L.useEffect(()=>{o.current=Number(x)},[x]);const W=["italic","oblique"].includes(_)?_:void 0,ne=["small-caps"].includes(b),oe=["bold","bolder","lighter","100","200","300"].includes(y)?y:void 0,ce=Number(U)>0?U:void 0,ve=L.useMemo(()=>new Ge.TextStyle({fontFamily:g,fontSize:x,fill:T||"white",...w&&S>0&&{stroke:w,strokeThickness:S},...W&&{fontStyle:W},...ne&&{fontVariant:ne},...oe&&{fontWeight:oe},...ce&&{letterSpacing:ce},...C&&{dropShadow:!0,dropShadowBlur:Number(A),dropShadowColor:(O==null?void 0:O.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...z&&{dropShadow:!0,dropShadowBlur:Number(I),dropShadowColor:(O==null?void 0:O.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:E||500,leading:B||0}),[C,A,T,g,x,_,B,W,oe,ne,ce,O,w,S,E,z,I]);L.useEffect(()=>{u.current={...c}},[c]);const de=()=>{const q=new Date().getTime();q-n.current<300&&p?p():d&&d(),n.current=q},G=()=>{!l&&p&&p()};return K.jsx(Gt,{...t,ref:e,isText:!0,onDoubleClick:G,children:K.jsx(te.Container,{ref:i,children:K.jsx(te.Container,{alpha:1,ref:a,children:K.jsx(te.Text,{style:ve,x:m,y:v,anchor:.5,text:f,alpha:h?1:0,...h&&!l&&{interactive:!0,buttonMode:!0,pointerdown:de},ref:s,filters:[$,X,M,H,...V>0?[F]:[]]})})})})});var eC=ht,tC=function(){return eC.Date.now()},rC=tC,iC=/\s/;function nC(t){for(var e=t.length;e--&&iC.test(t.charAt(e)););return e}var sC=nC,aC=sC,oC=/^\s+/;function lC(t){return t&&t.slice(0,aC(t)+1).replace(oC,"")}var uC=lC,cC=uC,Ch=Hr,hC=Bn,Ih=0/0,fC=/^[-+]0x[0-9a-f]+$/i,dC=/^0b[01]+$/i,pC=/^0o[0-7]+$/i,mC=parseInt;function gC(t){if(typeof t=="number")return t;if(hC(t))return Ih;if(Ch(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ch(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cC(t);var r=dC.test(t);return r||pC.test(t)?mC(t.slice(2),r?2:8):fC.test(t)?Ih:+t}var vC=gC,_C=Hr,Wa=rC,Rh=vC,yC="Expected a function",xC=Math.max,bC=Math.min;function TC(t,e,r){var i,n,s,a,o,u,h=0,f=!1,l=!1,c=!0;if(typeof t!="function")throw new TypeError(yC);e=Rh(e)||0,_C(r)&&(f=!!r.leading,l="maxWait"in r,s=l?xC(Rh(r.maxWait)||0,e):s,c="trailing"in r?!!r.trailing:c);function d(T){var w=i,S=n;return i=n=void 0,h=T,a=t.apply(S,w),a}function p(T){return h=T,o=setTimeout(g,e),f?d(T):a}function m(T){var w=T-u,S=T-h,A=e-w;return l?bC(A,s-S):A}function v(T){var w=T-u,S=T-h;return u===void 0||w>=e||w<0||l&&S>=s}function g(){var T=Wa();if(v(T))return y(T);o=setTimeout(g,m(T))}function y(T){return o=void 0,c&&i?d(T):(i=n=void 0,a)}function _(){o!==void 0&&clearTimeout(o),h=0,i=u=n=o=void 0}function x(){return o===void 0?a:y(Wa())}function b(){var T=Wa(),w=v(T);if(i=arguments,n=this,u=T,w){if(o===void 0)return p(u);if(l)return clearTimeout(o),o=setTimeout(g,e),d(u)}return o===void 0&&(o=setTimeout(g,e)),a}return b.cancel=_,b.flush=x,b}var wC=TC;const jn=Bt(wC),qa=(t,e,r,i)=>{const n=P.useCallback(jn(t,i),[t,i]),s=P.useCallback(jn(e,i),[e,i]),a=P.useCallback(jn(r,i),[r,i]),o=P.useCallback(()=>{n()},[n]),u=P.useCallback(()=>{s()},[s]),h=P.useCallback(()=>{a()},[a]);return{onPointerOver:o,onPointerDown:u,onPointerOut:h}},SC={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Ph=L.forwardRef((t,e)=>{const[r,i]=L.useState(0),[n,s]=L.useState(),a=P.useRef(null),o=P.useRef(null),u=P.useRef(null),h=P.useRef(SC),f=P.useRef(),{uniqueId:l,mute:c=!1,src:d,startAt:p,endAt:m,frameStartAt:v,frameEndAt:g,visible:y,disabled:_,transformation:{x,y:b,width:T,height:w,animation:S,colorCorrection:A={}},pointerdown:C=()=>{},pointerout:O=()=>{},pointerover:z=()=>{},fps:I=0}=t,{tl:E,dragModeRef:B,isRemotion:U}=P.useContext(Et),{onPointerDown:R,onPointerOut:$,onPointerOver:X}=qa(z,C,O,1),{blurRadius:M=0,vignette:F=0,noise:H=0}=A,{temperatureFilter:V,sharpnessFilter:W,hueFilter:ne,blurFilter:oe,adjustmentFilter:ce,vignetteFilter:ve,noiseFilter:de}=rr(A),G=d||"",q=L.useMemo(()=>{const Q=document.createElement("video");return Q.src=d,Q.crossOrigin="Anonymus",Q.autoplay=!1,Q.currentTime=v===0?.001:v,Q},[d,v]);Ee(ye.PAUSE,()=>{u.current&&(u.current.pause(),h.current.isPlaying=!1)}),Ee(ye.SCRUBBER_CLICKED,()=>{u.current&&(u.current.pause(),h.current.isPlaying=!1)}),Ee(ye.REVERSE_MODE_END,()=>{u.current&&(u.current.pause(),h.current.isPlaying=!1)});const Y=L.useCallback(jn(()=>{if(u.current){const Q=u.current;Q.currentTime>0&&!Q.paused&&!Q.ended&&Q.readyState>Q.HAVE_CURRENT_DATA&&u.current.pause(),h.current.isPlaying=!1}},400),[u]);L.useEffect(()=>{u.current&&!U?(B.current?(Y(),h.current.isPlaying=!1,h.current.isDragging=!0):h.current.isDragging=!1,u.current.muted=c):h.current.isDragging=!1,h.current.isMuted=c},[c,B,Y,u]);const me=Q=>{if(u.current){if(u.current.currentTime=Number(Q),!B.current){const he=u.current,Oe=he.currentTime>0&&!he.paused&&!he.ended&&he.readyState>he.HAVE_CURRENT_DATA;E.current&&E.current.isActive()&&f.current&&f.current.isActive()&&(Oe||u.current.play(),h.current.isPlaying=!0,i($r=>$r+1))}h.current.progress=0}},De=()=>{if(u.current){const Q=u.current;Q.currentTime>0&&!Q.paused&&!Q.ended&&Q.readyState>Q.HAVE_CURRENT_DATA&&u.current.pause(),h.current.isPlaying=!1,f.current&&(h.current.progress=f.current.progress())}},Be=()=>{},ct=()=>{var Q,he;if(f.current&&(h.current.progress=f.current.progress()),u.current&&f.current){const Oe=v+((Q=f==null?void 0:f.current)==null?void 0:Q.time()),$r=Math.abs(u.current.currentTime-Oe),Dt=u.current,Gr=Dt.currentTime>0&&!Dt.paused&&!Dt.ended&&Dt.readyState>Dt.HAVE_CURRENT_DATA;B.current?(u.current.currentTime=Oe,setTimeout(()=>{u.current&&u.current.play().then(()=>{h.current.isPlaying=!1,u.current&&u.current.pause()})},100),h.current.isPlaying=!1):(Gr!==h.current.isPlaying||!Gr)&&h.current.progress>.01&&h.current.progress<.99?(he=E.current)!=null&&he.isActive()&&f.current&&f.current.isActive()&&(Gr||u.current.play(),h.current.isPlaying=!0):$r>.3&&h.current.progress>.01&&h.current.progress<.99&&(u.current.currentTime=Oe)}};return P.useEffect(()=>{let Q=k.context(()=>{});if(o.current&&E.current){const he={duration:Number(g)-Number(v),onStart:me,onComplete:De,onStartParams:[v,g],onCompleteParams:[],onInterrupt:Be,onUpdate:ct,onUpdateParams:[v,g],onPause:()=>{console.log("onPause video sprite pause",l)},onResume:()=>{console.log("onResume video sprite resume",l)},onReverseComplete:()=>{console.log("onReverseComplete video sprite reverse complete",l)},onKill:()=>{console.log("onKill video sprite kill",l)}};Q=k.context(()=>{f.current=k.from(o.current,he,v),E.current.add(f.current,p)})}return()=>{f.current&&(f.current.kill(),k.killTweensOf(f.current)),Q.revert()}},[S,p,m,v,g]),L.useEffect(()=>{u.current&&(u.current.muted=c,h.current.isMuted=c);const Q=setTimeout(()=>{u.current&&(u.current.muted=c,h.current.isMuted=c)},1500);return()=>{clearTimeout(Q)}},[c]),L.useEffect(()=>{const Q=Math.round((Number(v)+Number.EPSILON)*100)/100,he=function(){u.current&&(u.current.currentTime=Q,u.current.muted=c)},Oe=function(){if(u.current){const At=u.current;At.currentTime>0&&!At.paused&&!At.ended&&At.readyState>At.HAVE_CURRENT_DATA&&u.current.pause()}h.current.isWaiting=!1,h.current.isStalled=!1},$r=function(){u.current&&u.current.pause(),h.current.isWaiting=!0,h.current.isStalled=!1},Dt=function(){h.current.isWaiting=!1,h.current.isStalled=!1},Gr=function(){h.current.isWaiting=!1,h.current.isStalled=!0},RC=Math.round((Number(v)+Number.EPSILON)*100)/100,PC=Math.round((Number(g)+Number.EPSILON)*100)/100,MC=`${G}#t=${RC},${PC}`;return Ge.Texture.fromLoader(q,MC,l,{pixiIdPrefix:l,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:I?Math.max(120,Number(I)):30}}).then(At=>{At&&(s(At),u.current=At.baseTexture.resource.source,u.current.id=l,u.current.addEventListener("loadedmetadata",he),u.current.addEventListener("ended",Oe),u.current.addEventListener("loadstart",$r),u.current.addEventListener("canplaythrough",Dt),u.current.addEventListener("stalled",Gr))}),()=>{u.current&&(u.current.pause(),u.current.removeEventListener("loadedmetadata",he),u.current.removeEventListener("ended",Oe),u.current.removeEventListener("loadstart",$r),u.current.removeEventListener("canplaythrough",Dt),u.current.removeEventListener("stalled",Gr))}},[G,l,v,g,q]),L.useEffect(()=>{const Q=setTimeout(()=>{n&&f.current&&E.current&&f.current.progress()<.1&&u.current&&!f.current.isActive()&&!U&&u.current.play().then(()=>{h.current.isPlaying=!1,u.current&&u.current.pause()})},30);return()=>{clearTimeout(Q)}},[n]),L.useEffect(()=>{E.current&&!E.current.isActive()&&!U&&(h.current.isPlaying=!1,u.current&&u.current.pause());const Q=setTimeout(()=>{if(n&&E.current&&r>0&&!U){E.current.isActive()||(h.current.isPlaying=!1,u.current&&u.current.pause());const he=u.current;he&&E.current.isActive()&&f.current&&f.current.isActive()&&(he.currentTime>0&&!he.paused&&!he.ended&&he.readyState>he.HAVE_CURRENT_DATA||u.current.play(),h.current.isPlaying=!0)}},10);return()=>{clearTimeout(Q)}},[r,n]),K.jsx(Gt,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:R,pointerover:X,pointerout:$,children:K.jsx(te.Container,{ref:o,children:n&&K.jsx(te.Sprite,{texture:n,width:T,height:w,anchor:.5,x,y:b,ref:a,alpha:y?1:0,...!_&&y&&{interactive:!0,pointerdown:C},filters:[V,W,ne,ce,...M>0?[oe]:[],...F>0?[ve]:[],...H>0?[de]:[]]})})})});Ph.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const AC=L.forwardRef((t,e)=>{const[r,i]=L.useState(),n=P.useRef(null),s=P.useRef(null),{visible:a,disabled:o,transformation:{x:u,y:h,width:f,height:l,colorCorrection:c={}},pointerdown:d=()=>{},pointerout:p=()=>{},pointerover:m=()=>{},canvasImageRef:v}=t,g=v&&(v==null?void 0:v.getCanvas()),y=te.useApp(),{onPointerDown:_,onPointerOut:x,onPointerOver:b}=qa(m,d,p,1),{blurRadius:T=0,vignette:w=0,noise:S=0}=c,{temperatureFilter:A,sharpnessFilter:C,hueFilter:O,blurFilter:z,adjustmentFilter:I,vignetteFilter:E,noiseFilter:B}=rr(c);return te.useTick(()=>{if(n.current&&n.current.texture){const U=n.current.texture.baseTexture;U&&U.update(),s.current&&y.renderer.render(s.current)}}),L.useEffect(()=>{if(!dr(g)){const U=Ge.Texture.from(g);i(U)}},[g]),K.jsx(Gt,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:_,pointerover:b,pointerout:x,children:K.jsx(te.Container,{ref:s,children:r&&K.jsx(te.Sprite,{texture:r,width:f,height:l,anchor:.5,x:u,y:h,ref:n,alpha:a?1:0,...!o&&a&&{interactive:!0,pointerdown:d},filters:[A,C,O,I,...T>0?[z]:[],...w>0?[E]:[],...S>0?[B]:[]]})})})}),EC=t=>{const{startAt:e,endAt:r,uniqueId:i}=t,n=P.useRef(null),s=P.useRef(null),a=P.useRef(null),o=P.useRef(null),u=P.useRef(null),h=P.useRef(!1),{tl:f,totalDuration:l=0,reverseModeRef:c}=P.useContext(Et),d=e<.2?"static":"none",p=P.useRef(1);Ee(ye.COMPLETE,()=>{n.current&&(n.current.eventMode=d)}),Ee(ye.REVERSE_MODE_END,()=>{if(f.current){const v=f.current.time();v>e&&v<r?(s.current&&(s.current.alpha=1),n.current&&(n.current.alpha=1,n.current.eventMode="static")):(s.current&&(s.current.alpha=0),n.current&&(n.current.alpha=0,n.current.eventMode="none"))}});const m=()=>{if(c.current&&o.current&&f.current){h.current=!0;const v=f.current.time();v>e&&v<r?(s.current&&(s.current.alpha=1),n.current&&(n.current.alpha=1)):(s.current&&(s.current.alpha=0),n.current&&(n.current.alpha=0))}};return Ee(ye.COMPLETE,()=>{}),L.useEffect(()=>{const v=k.context(()=>{n.current&&f.current&&(u.current&&(u.current.kill(),f.current.remove(u.current)),console.log("startTween 001",u.current),console.log("props",e,r,i),u.current=k.to(n.current,{alpha:1,duration:.1}),o.current&&(o.current.kill(),f.current.remove(o.current)),o.current=k.to(s.current,{alpha:1,duration:Number(r)-Number(e),onStart:()=>{n.current&&(n.current.alpha=1,n.current.eventMode="static",p.current=1)},onUpdate:m,onComplete:()=>{n.current&&(n.current.alpha=0,n.current.eventMode="none",p.current=0)}}),f.current.add([u.current,o.current],e))});return()=>{o.current&&(f.current.remove(o.current),o.current.progress(0).kill()),u.current&&(f.current.remove(u.current),u.current.progress(0).kill()),v.revert()}},[e,r,l,i]),K.jsx(te.Container,{ref:n,alpha:e<.2?1:0,eventMode:e<.2?"static":"none",children:K.jsx(te.Container,{ref:a,children:K.jsx(te.Container,{ref:s,alpha:1,children:t.children})})})},CC=t=>{const{startAt:e,endAt:r}=t,{setTotalDuration:i}=P.useContext(Et);return L.useEffect(()=>{i&&i(Number(r)+.2)},[e,r]),t.children},IC=L.forwardRef((t,e)=>{const[r,i]=L.useState(),n=P.useRef(null),s=P.useRef(null),{visible:a,disabled:o,transformation:{x:u,y:h,width:f,height:l,colorCorrection:c={}},pointerdown:d=()=>{},pointerout:p=()=>{},pointerover:m=()=>{},canvasImageRef:v}=t,g=v&&(v==null?void 0:v.getCanvas()),y=te.useApp(),{onPointerDown:_,onPointerOut:x,onPointerOver:b}=qa(m,d,p,1),{blurRadius:T=0,vignette:w=0,noise:S=0}=c,{temperatureFilter:A,sharpnessFilter:C,hueFilter:O,blurFilter:z,adjustmentFilter:I,vignetteFilter:E,noiseFilter:B}=rr(c);return te.useTick(()=>{if(n.current&&n.current.texture){const U=n.current.texture.baseTexture;U&&U.update(),s.current&&y.renderer.render(s.current)}}),L.useEffect(()=>{if(!dr(g)){const U=Ge.Texture.from(g);i(U)}},[g]),K.jsx(Gt,{...t,ref:e,ignoreTlForVideo:!0,pointerdown:_,pointerover:b,pointerout:x,children:K.jsx(te.Container,{ref:s,children:r&&K.jsx(te.Sprite,{texture:r,width:f,height:l,anchor:.5,x:u,y:h,ref:n,alpha:a?1:0,...!o&&a&&{interactive:!0,pointerdown:d},filters:[A,C,O,I,...T>0?[z]:[],...w>0?[E]:[],...S>0?[B]:[]]})})})});var Mh=(t=>(t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t))(Mh||{});le.Animations=hs,le.BlendModes=Mh,le.Events=ye,le.GsapPixieContext=Et,le.GsapPixieContextProvider=Hh,le.PixiAnimatedSprite=Eh,le.PixiAudioSprite=Xw,le.PixiGifSprite=QE,le.PixiImageSprite=jc,le.PixiRemotionSprite=IC,le.PixiSequence=EC,le.PixiSequenceWrapper=CC,le.PixiSvgPathSprite=Vw,le.PixiTextSprite=JE,le.PixiVideoCanvasSyncSprite=AC,le.PixiVideoSprite=Ph,le.emitCustomEvent=ar,le.newCustomEventEmitter=jh,le.useCustomEventListener=Ee,le.useGsapEffect=ol,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reacthub-pixitweenjs",
|
|
3
|
-
"version": "0.2.107-alpha.
|
|
3
|
+
"version": "0.2.107-alpha.95",
|
|
4
4
|
"description": "reacthub-pixitweenjs is a library that provides a powerful combination of React, PixiJS, GSAP, and image manipulation capabilities in a timeline sequence. With this library, you can easily create stunning animations and interactive graphics for your React applications",
|
|
5
5
|
"author": "khanzzirfan <reacthub.ai@gmail.com>",
|
|
6
6
|
"main": "dist/index.es.js",
|