(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[3785],{633785(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{"default":()=>u});var e=__webpack_require__(303280);__webpack_require__.n(e);var t=__webpack_require__(860012);var r=__webpack_require__(913965);__webpack_require__.n(r);var a=__webpack_require__(126528);var n=__webpack_require__(92288);var i=__webpack_require__(273573);var l=__webpack_require__(592492);var o=__webpack_require__(811077);function u(u){let d=(0,e.c)(51);let{setIsAnimationComplete:f,isAnimationComplete:k,skipTransition:v}=u;let _=k===undefined?!1:k;let h=v===undefined?!1:v;let p=(0,i.D)();let{isWasmReady:w,error:S,setIsAnimationCompleted:A}=(0,o.db)();let{buffer:M,error:b,loading:g}=(0,o.sW)("./images/riv_animations/metamask_wordmark.riv");let y=(0,t.useRef)(null);let R=(0,t.useRef)(p);let T;d[0]===Symbol.for("react.memo_cache_sentinel")?(T={},d[0]=T):T=d[0];let E=(0,t.useRef)(T);let W;let C;d[1]!==b||d[2]!==f||d[3]!==S?(W=()=>{S&&(console.error("[Rive - MetamaskWordMarkAnimation] Failed to load WASM:",S),f(!0)),b&&(console.error("[Rive - MetamaskWordMarkAnimation] Failed to load buffer:",b),f(!0))},C=[S,b,f],d[1]=b,d[2]=f,d[3]=S,d[4]=W,d[5]=C):(W=d[4],C=d[5]),(0,t.useEffect)(W,C);let F;d[6]!==M?(F={buffer:M},d[6]=M,d[7]=F):F=d[7];let{riveFile:N,status:B}=(0,r.useRiveFile)(F);let D=N??undefined;let L=N?"WordmarkBuildUp":undefined;let U;d[8]===Symbol.for("react.memo_cache_sentinel")?(U=new r.Layout({fit:r.Fit.Contain,alignment:r.Alignment.Center}),d[8]=U):U=d[8];let $;d[9]!==_||d[10]!==f?($=e=>{e.data&&Array.isArray(e.data)&&(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{!_&&f(!0)},1e3))},d[9]=_,d[10]=f,d[11]=$):$=d[11];let G;d[12]!==$||d[13]!==D||d[14]!==L?(G={riveFile:D,stateMachines:L,autoplay:!1,layout:U,onStateChange:$},d[12]=$,d[13]=D,d[14]=L,d[15]=G):G=d[15];let{rive:H,RiveComponent:I}=(0,r.useRive)(G);let[j,q]=(0,t.useState)(!1);let x;d[16]!==H?(x=()=>{if(!H)return!1;let e=H.stateMachineInputs("WordmarkBuildUp");return!e?!1:(E.current={dark:e.find(m),still:e.find(s),start:e.find(c)},!0)},d[16]=H,d[17]=x):x=d[17];let z=x;let J;let K;d[18]!==M||d[19]!==g||d[20]!==z||d[21]!==j||d[22]!==w||d[23]!==H||d[24]!==A||d[25]!==h||d[26]!==p?(J=()=>{if(H&&w&&!g&&M&&!j&&z()){let{dark:e,still:t,start:r}=E.current;e&&(e.value=p===l.S.dark),R.current=p,h?t?.fire():r?.fire(),H.play(),q(!0)}return()=>{y.current&&(clearTimeout(y.current),A("MetamaskWordMarkAnimation",!0))}},K=[H,w,h,g,M,j,p,z,A],d[18]=M,d[19]=g,d[20]=z,d[21]=j,d[22]=w,d[23]=H,d[24]=A,d[25]=h,d[26]=p,d[27]=J,d[28]=K):(J=d[27],K=d[28]),(0,t.useEffect)(J,K);let O;let P;d[29]!==j||d[30]!==H||d[31]!==p?(O=()=>{if(!H||!j||R.current===p)return;let{dark:e,still:t}=E.current;e&&(e.value=p===l.S.dark,t?.fire()),R.current=p},P=[H,p,j],d[29]=j,d[30]=H,d[31]=p,d[32]=O,d[33]=P):(O=d[32],P=d[33]),(0,t.useEffect)(O,P);let Q=!w||g||!M||B==="loading";let V=B==="failed";let X;let Y;if(d[34]!==V||d[35]!==_||d[36]!==f?(X=()=>{V&&!_&&f(!0)},Y=[V,_,f],d[34]=V,d[35]=_,d[36]=f,d[37]=X,d[38]=Y):(X=d[37],Y=d[38]),(0,t.useEffect)(X,Y),Q||V){let e;d[39]!==V?(e=(0,n.A)("riv-animation__wordmark-container",{"riv-animation__wordmark-container--complete":V}),d[39]=V,d[40]=e):e=d[40];let r;return d[41]!==e?(r=t.createElement(a.a,{className:e}),d[41]=e,d[42]=r):r=d[42],r}let Z=_&&!h;let ee;d[43]!==h||d[44]!==Z?(ee=(0,n.A)("riv-animation__wordmark-container",{"riv-animation__wordmark-container--complete":Z,"riv-animation__wordmark-container--skip-transition":h}),d[43]=h,d[44]=Z,d[45]=ee):ee=d[45];let et;d[46]!==I?(et=t.createElement(I,{className:"riv-animation__canvas"}),d[46]=I,d[47]=et):et=d[47];let er;return d[48]!==ee||d[49]!==et?(er=t.createElement(a.a,{className:ee},et),d[48]=ee,d[49]=et,d[50]=er):er=d[50],er}function c(e){return e.name==="Start"}function s(e){return e.name==="Still"}function m(e){return e.name==="Dark"}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);