import{b as Qn,c as ha,d as er,e as pa,f as ma,g as va,h as ga,i as ya,j as ba,u as tr,w as Ie,z as wa}from"./chunk-ZJWICOWP.mjs";import{a as ca,b as bn,f as Gn,i as qn,m as la,o as Kn,s as fa,t as dt,u as da,v as Jn,x as ht,y as Zn}from"./chunk-BPX63HPK.mjs";import{a as wi,b as je,c as L,d as ze}from"./chunk-OIST4OYN.mjs";var Vt=u=>u;var wn={ms:u=>u*1e3,s:u=>u/1e3};function nr(u,w){return w?u*(1e3/w):0}var _a=(u,w,T)=>(((1-3*T+3*w)*u+(3*T-6*w))*u+3*w)*u,_i=1e-7,Ti=12;function Ei(u,w,T,E,A){let R,I,X=0;do I=w+(T-w)/2,R=_a(I,E,A)-u,R>0?T=I:w=I;while(Math.abs(R)>_i&&++XEi(R,0,1,u,T);return R=>R===0||R===1?R:_a(A(R),w,E)}var xo={ease:Ht(.25,.1,.25,1),"ease-in":Ht(.42,0,1,1),"ease-in-out":Ht(.42,0,.58,1),"ease-out":Ht(0,0,.58,1)};function Ta(u,w){var T={};for(var E in u)Object.prototype.hasOwnProperty.call(u,E)&&w.indexOf(E)<0&&(T[E]=u[E]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function"){var A=0;for(E=Object.getOwnPropertySymbols(u);Aw/(2*Math.sqrt(u*T));function Oi(u,w,T){return u=w||u>w&&T<=w}var ar=({stiffness:u=Lt.stiffness,damping:w=Lt.damping,mass:T=Lt.mass,from:E=0,to:A=1,velocity:R=0,restSpeed:I=2,restDistance:X=.5}={})=>{R=R?wn.s(R):0;let N={done:!1,hasReachedTarget:!1,current:E,target:A},D=A-E,M=Math.sqrt(u/T)/1e3,k=Pi(u,w,T),q;if(k<1){let f=M*Math.sqrt(1-k*k);q=H=>A-Math.exp(-k*M*H)*((k*M*D-R)/f*Math.sin(f*H)+D*Math.cos(f*H))}else q=f=>A-Math.exp(-M*f)*(D+(M*D-R)*f);return f=>{N.current=q(f);let H=f===0?R:_n(q,f,N.current),ce=Math.abs(H)<=I,ee=Math.abs(A-N.current)<=X;return N.done=ce&&ee,N.hasReachedTarget=Oi(E,A,N.current),N}},Ea=({from:u=0,velocity:w=0,power:T=.8,decay:E=.325,bounceDamping:A,bounceStiffness:R,changeTarget:I,min:X,max:N,restDistance:D=.5,restSpeed:M})=>{E=wn.ms(E);let k={hasReachedTarget:!1,done:!1,current:u,target:u},q=K=>X!==void 0&&KN,f=K=>X===void 0?N:N===void 0||Math.abs(X-K)-H*Math.exp(-K/E),fe=K=>ee+_e(K),V=K=>{let pe=_e(K),me=fe(K);k.done=Math.abs(pe)<=D,k.current=k.done?ee:me},le,Ae,re=K=>{q(k.current)&&(le=K,Ae=ar({from:k.current,to:f(k.current),velocity:_n(fe,K,k.current),damping:A,stiffness:R,restDistance:D,restSpeed:M}))};return re(0),K=>{let pe=!1;return!Ae&&le===void 0&&(pe=!0,V(K),re(K)),le!==void 0&&K>le?(k.hasReachedTarget=!0,Ae(K-le)):(k.hasReachedTarget=!1,!pe&&V(K),k)}},rr=10,Li=1e4;function Aa(u){let w,T=rr,E=u(0),A=[E.current];for(;!E.done&&T",initialValue:"0deg",toDefaultUnit:u=>u+"deg"},ki={translate:{syntax:"",initialValue:"0px",toDefaultUnit:u=>u+"px"},rotate:Ra,scale:{syntax:"",initialValue:1,toDefaultUnit:Vt},skew:Ra},Fi=new Map,Di=u=>`--motion-${u}`,Pa=["x","y","z"];Ii.forEach(u=>{ji.forEach(w=>{Pa.push(u+w),Fi.set(Di(u+w),ki[u])})});var is=new Set(Pa);var Ca=u=>document.createElement("div").animate(u,{duration:.001}),xa={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ca({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Ca({opacity:[0,1]}).finished},ir={},Bi={};for(let u in xa)Bi[u]=()=>(ir[u]===void 0&&(ir[u]=xa[u]()),ir[u]);function Oa(u,w){var T;return typeof u=="string"?w?((T=w[u])!==null&&T!==void 0||(w[u]=document.querySelectorAll(u)),u=w[u]):u=document.querySelectorAll(u):u instanceof Element&&(u=[u]),Array.from(u||[])}function La(u){let w=new WeakMap;return(T={})=>{let E=new Map,A=(I=0,X=100,N=0,D=!1)=>{let M=`${I}-${X}-${N}-${D}`;return E.has(M)||E.set(M,u(Object.assign({from:I,to:X,velocity:N,restSpeed:D?.05:2,restDistance:D?.01:.5},T))),E.get(M)},R=I=>(w.has(I)||w.set(I,Aa(I)),w.get(I));return{createAnimation:(I,X,N,D,M)=>{var k,q;let f,H=I.length;if(N&&H<=2&&I.every(Wi)){let ee=I[H-1],_e=H===1?null:I[0],fe=0,V=0,le=M?.generator;if(le){let{animation:K,generatorStartTime:pe}=M,me=K?.startTime||pe||0,Te=K?.currentTime||performance.now()-me,Me=le(Te).current;V=(k=_e)!==null&&k!==void 0?k:Me,(H===1||H===2&&I[0]===null)&&(fe=_n(Ce=>le(Ce).current,Te,Me))}else V=(q=_e)!==null&&q!==void 0?q:parseFloat(X());let Ae=A(V,ee,fe,D?.includes("scale")),re=R(Ae);f=Object.assign(Object.assign({},re),{easing:"linear"}),M&&(M.generator=Ae,M.generatorStartTime=performance.now())}else f={easing:"ease",duration:R(A(0,100)).overshootDuration};return f}}}}var Wi=u=>typeof u!="string",os=La(ar),ss=La(Ea),Ui={any:0,all:1};function $i(u,w,{root:T,margin:E,amount:A="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};let R=Oa(u),I=new WeakMap,X=D=>{D.forEach(M=>{let k=I.get(M.target);if(M.isIntersecting!==!!k)if(M.isIntersecting){let q=w(M);typeof q=="function"?I.set(M.target,q):N.unobserve(M.target)}else k&&(k(M),I.delete(M.target))})},N=new IntersectionObserver(X,{root:T,rootMargin:E,threshold:typeof A=="number"?A:Ui[A]});return R.forEach(D=>N.observe(D)),()=>N.disconnect()}var Tn=new WeakMap,wt;function zi(u,w){if(w){let{inlineSize:T,blockSize:E}=w[0];return{width:T,height:E}}return u instanceof SVGElement&&"getBBox"in u?u.getBBox():{width:u.offsetWidth,height:u.offsetHeight}}function Ni({target:u,contentRect:w,borderBoxSize:T}){var E;(E=Tn.get(u))===null||E===void 0||E.forEach(A=>{A({target:u,contentSize:w,get size(){return zi(u,T)}})})}function Vi(u){u.forEach(Ni)}function Hi(){typeof ResizeObserver<"u"&&(wt=new ResizeObserver(Vi))}function Yi(u,w){wt||Hi();let T=Oa(u);return T.forEach(E=>{let A=Tn.get(E);A||(A=new Set,Tn.set(E,A)),A.add(w),wt?.observe(E)}),()=>{T.forEach(E=>{let A=Tn.get(E);A?.delete(w),A?.size||wt?.unobserve(E)})}}var En=new Set,Yt;function Xi(){Yt=()=>{let u={width:L.innerWidth,height:L.innerHeight},w={target:L,size:u,contentSize:u};En.forEach(T=>T(w))},L.addEventListener("resize",Yt)}function Gi(u){return En.add(u),Yt||Xi(),()=>{En.delete(u),!En.size&&Yt&&(Yt=void 0)}}function ja(u,w){return typeof u=="function"?Gi(u):Yi(u,w)}function or(u,w,T){u.dispatchEvent(new CustomEvent(w,{detail:{originalEvent:T}}))}function Sa(u,w,T){u.dispatchEvent(new CustomEvent(w,{detail:{originalEntry:T}}))}var qi={isActive:u=>!!u.inView,subscribe:(u,{enable:w,disable:T},{inViewOptions:E={}})=>{let{once:A}=E,R=Ta(E,["once"]);return $i(u,I=>{if(w(),Sa(u,"viewenter",I),!A)return X=>{T(),Sa(u,"viewleave",X)}},R)}},Ma=(u,w,T)=>E=>{(!E.pointerType||E.pointerType==="mouse")&&(T(),or(u,w,E))},Ki={isActive:u=>!!u.hover,subscribe:(u,{enable:w,disable:T})=>{let E=Ma(u,"hoverstart",w),A=Ma(u,"hoverend",T);return u.addEventListener("pointerenter",E),u.addEventListener("pointerleave",A),()=>{u.removeEventListener("pointerenter",E),u.removeEventListener("pointerleave",A)}}},Ji={isActive:u=>!!u.press,subscribe:(u,{enable:w,disable:T})=>{let E=R=>{T(),or(u,"pressend",R),L.removeEventListener("pointerup",E)},A=R=>{w(),or(u,"pressstart",R),L.addEventListener("pointerup",E)};return u.addEventListener("pointerdown",A),()=>{u.removeEventListener("pointerdown",A),L.removeEventListener("pointerup",E)}}},Zi={inView:qi,hover:Ki,press:Ji},us=["initial","animate",...Object.keys(Zi),"exit"];var Qi=100,eo={left:u=>`translateX(-${u}px)`,right:u=>`translateX(${u}px)`,top:u=>`translateY(-${u}px)`,bottom:u=>`translateY(${u}px)`},sr=typeof Animation<"u"&&typeof Animation.prototype.updatePlaybackRate=="function";function ur(u){let{slots:w,gap:T,padding:E,paddingPerSide:A,paddingTop:R,paddingRight:I,paddingBottom:X,paddingLeft:N,speed:D,hoverFactor:M,direction:k,alignment:q,sizingOptions:f,fadeOptions:H,style:ce}=u,{fadeContent:ee,overflow:_e,fadeWidth:fe,fadeInset:V,fadeAlpha:le}=H,{widthType:Ae,heightType:re}=f,K=A?`${R}px ${I}px ${X}px ${N}px`:`${E}px`,pe=tr.current()===tr.canvas,me=bn.count(w),Te=me>0;k===!0&&(k="left");let Me=k==="left"||k==="right",Ce=pa(0),l=eo[k],i=ma(Ce,l),c=dt(null),g=fa(()=>[qn(),qn()],[]),[v,C]=da({parent:null,children:null}),b=[],_=[],W=0,B=0;pe&&(W=me?Math.floor(10/me):0,B=1),!pe&&Te&&v.parent&&(W=Math.round(v.parent/v.children*2)+1,W=Math.min(W,Qi),B=1);let Y=la(()=>{if(Te&&c.current){let Re=Me?c.current.offsetWidth:c.current.offsetHeight,ve=g[0].current?Me?g[0].current.offsetLeft:g[0].current.offsetTop:0,G=(g[1].current?Me?g[1].current.offsetLeft+g[1].current.offsetWidth:g[1].current.offsetTop+g[1].current.offsetHeight:0)-ve+T;C({parent:Re,children:G})}},[]),ye=pe?{contentVisibility:"auto"}:{};if(Te){if(!pe){let Re=dt(!0);Kn(()=>(Qn.read(Y),ja(c.current,({contentSize:ve})=>{!Re.current&&(ve.width||ve.height)&&Qn.read(Y),Re.current=!1})),[])}b=bn.map(w,(Re,ve)=>{var Ye,G,ge,at;let Xe;ve===0&&(Xe=g[0]),ve===w.length-1&&(Xe=g[1]);let it={width:Ae?(Ye=Re.props)===null||Ye===void 0?void 0:Ye.width:"100%",height:re?(G=Re.props)===null||G===void 0?void 0:G.height:"100%"};return ht(er,{inherit:"id",children:ht("li",{ref:Xe,style:it,children:Gn(Re,{style:{...(ge=Re.props)===null||ge===void 0?void 0:ge.style,...it,flexShrink:0,...ye},layoutId:Re.props.layoutId?Re.props.layoutId+"-original-"+ve:void 0},(at=Re.props)===null||at===void 0?void 0:at.children)})})})}if(!pe)for(let Re=0;Re{var G,ge,at,Xe,it,Ge;let Sn={width:Ae?(G=ve.props)===null||G===void 0?void 0:G.width:"100%",height:re?(ge=ve.props)===null||ge===void 0?void 0:ge.height:"100%"};return ht(er,{inherit:"id",children:ht("li",{style:Sn,"aria-hidden":!0,children:Gn(ve,{key:Re+" "+Ye,style:{...(at=ve.props)===null||at===void 0?void 0:at.style,width:Ae?(Xe=ve.props)===null||Xe===void 0?void 0:Xe.width:"100%",height:re?(it=ve.props)===null||it===void 0?void 0:it.height:"100%",flexShrink:0,...ye},layoutId:ve.props.layoutId?ve.props.layoutId+"-dupe-"+Re:void 0},(Ge=ve.props)===null||Ge===void 0?void 0:Ge.children)},Re+"li"+Ye)},Re+"lg"+Ye)})];let he=v.children+v.children*Math.round(v.parent/v.children),be=dt(null),Pe=dt(null),Oe=dt(0),Ze=dt(!1),_t=ga(),We=dt(null),Ue=dt(null);if(!pe){let Re=ba(c);sr?Kn(()=>{if(!(_t||!he||!D))return Ue.current=We.current.animate({transform:[l(0),l(he)]},{duration:Math.abs(he)/D*1e3,iterations:1/0,easing:"linear"}),()=>Ue.current.cancel()},[M,he,D]):va(ve=>{if(!he||_t||sr)return;be.current===null&&(be.current=ve),ve=ve-be.current;let G=(Pe.current===null?0:ve-Pe.current)*(D/1e3);Ze.current&&(G*=M),Oe.current+=G,Oe.current=ya(0,he,Oe.current),Pe.current=ve,Re&&Ce.set(Oe.current)})}let He=Me?"to right":"to bottom",Be=fe/2,mt=100-fe/2,De=io(V,0,Be),Gt=100-V,Ct=`linear-gradient(${He}, rgba(0, 0, 0, ${le}) ${De}%, rgba(0, 0, 0, 1) ${Be}%, rgba(0, 0, 0, 1) ${mt}%, rgba(0, 0, 0, ${le}) ${Gt}%)`;return Te?ht("section",{style:{...Ia,opacity:B,WebkitMaskImage:ee?Ct:void 0,MozMaskImage:ee?Ct:void 0,maskImage:ee?Ct:void 0,overflow:_e?"visible":"hidden",padding:K},ref:c,children:Zn(ha.ul,{ref:We,style:{...Ia,gap:T,top:k==="bottom"&&ka(he)?-he:void 0,left:k==="right"&&ka(he)?-he:void 0,placeItems:q,position:"relative",flexDirection:Me?"row":"column",...ce,transform:sr?void 0:i,willChange:pe?"auto":"transform"},onMouseEnter:()=>{Ze.current=!0,Ue.current&&(Ue.current.playbackRate=M)},onMouseLeave:()=>{Ze.current=!1,Ue.current&&(Ue.current.playbackRate=1)},children:[b,_]})}):Zn("section",{style:to,children:[ht("div",{style:no,children:"\u2728"}),ht("p",{style:ro,children:"Connect to Content"}),ht("p",{style:ao,children:"Add layers or components to infinitely loop on your page."})]})}ur.defaultProps={gap:10,padding:10,sizingOptions:{widthType:!0,heightType:!0},fadeOptions:{fadeContent:!0,overflow:!1,fadeWidth:25,fadeAlpha:0,fadeInset:0},direction:!0};wa(ur,{slots:{type:Ie.Array,title:"Children",control:{type:Ie.ComponentInstance}},speed:{type:Ie.Number,title:"Speed",min:0,max:1e3,defaultValue:100,unit:"%",displayStepper:!0,step:5},direction:{type:Ie.Enum,title:"Direction",options:["left","right","top","bottom"],optionIcons:["direction-left","direction-right","direction-up","direction-down"],optionTitles:["Left","Right","Top","Bottom"],defaultValue:"left",displaySegmentedControl:!0},alignment:{type:Ie.Enum,title:"Align",options:["flex-start","center","flex-end"],optionIcons:{direction:{right:["align-top","align-middle","align-bottom"],left:["align-top","align-middle","align-bottom"],top:["align-left","align-center","align-right"],bottom:["align-left","align-center","align-right"]}},defaultValue:"center",displaySegmentedControl:!0},gap:{type:Ie.Number,title:"Gap"},padding:{title:"Padding",type:Ie.FusedNumber,toggleKey:"paddingPerSide",toggleTitles:["Padding","Padding per side"],valueKeys:["paddingTop","paddingRight","paddingBottom","paddingLeft"],valueLabels:["T","R","B","L"],min:0},sizingOptions:{type:Ie.Object,title:"Sizing",controls:{widthType:{type:Ie.Boolean,title:"Width",enabledTitle:"Auto",disabledTitle:"Stretch",defaultValue:!0},heightType:{type:Ie.Boolean,title:"Height",enabledTitle:"Auto",disabledTitle:"Stretch",defaultValue:!0}}},fadeOptions:{type:Ie.Object,title:"Clipping",controls:{fadeContent:{type:Ie.Boolean,title:"Fade",defaultValue:!0},overflow:{type:Ie.Boolean,title:"Overflow",enabledTitle:"Show",disabledTitle:"Hide",defaultValue:!1,hidden(u){return u.fadeContent===!0}},fadeWidth:{type:Ie.Number,title:"Width",defaultValue:25,min:0,max:100,unit:"%",hidden(u){return u.fadeContent===!1}},fadeInset:{type:Ie.Number,title:"Inset",defaultValue:0,min:0,max:100,unit:"%",hidden(u){return u.fadeContent===!1}},fadeAlpha:{type:Ie.Number,title:"Opacity",defaultValue:0,min:0,max:1,step:.05,hidden(u){return u.fadeContent===!1}}}},hoverFactor:{type:Ie.Number,title:"Hover",min:0,max:1,unit:"x",defaultValue:1,step:.1,displayStepper:!0,description:"Slows down the speed while you are hovering."}});var Ia={display:"flex",width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",placeItems:"center",margin:0,padding:0,listStyleType:"none",textIndent:"none"},to={display:"flex",width:"100%",height:"100%",placeContent:"center",placeItems:"center",flexDirection:"column",color:"#96F",background:"rgba(136, 85, 255, 0.1)",fontSize:11,overflow:"hidden",padding:"20px 20px 30px 20px"},no={fontSize:32,marginBottom:10},ro={margin:0,marginBottom:10,fontWeight:600,textAlign:"center"},ao={margin:0,opacity:.7,maxWidth:150,lineHeight:1.5,textAlign:"center"},io=(u,w,T)=>Math.min(Math.max(u,w),T),ka=u=>typeof u=="number"&&!isNaN(u);var Rn={};wi(Rn,{__esModule:()=>so,default:()=>cr,rive:()=>oo});var n=typeof globalThis<"u"?globalThis:typeof self<"u"?self:ze,An={};(function(w,T){An=T()})(0,()=>(()=>{var u=[,(A,R,I)=>{I.r(R),I.d(R,{default:()=>N});var X=(()=>{var D=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(M={}){var k,q,f=M;f.ready=new Promise((e,t)=>{k=e,q=t});function H(){function e(d){let m=a;r=t=0,a=new Map,m.forEach(y=>{try{y(d)}catch(p){console.error(p)}}),this.pb(),o&&o.Yb()}let t=0,r=0,a=new Map,o=null,s=null;(this||n).requestAnimationFrame=function(d){t||(t=requestAnimationFrame(e.bind(this||n)));let m=++r;return a.set(m,d),m},(this||n).cancelAnimationFrame=function(d){a.delete(d),t&&a.size==0&&(cancelAnimationFrame(t),t=0)},(this||n).Wb=function(d){s&&(document.body.remove(s),s=null),d||(s=document.createElement("div"),s.style.backgroundColor="black",s.style.position="fixed",s.style.right=0,s.style.top=0,s.style.color="white",s.style.padding="4px",s.innerHTML="RIVE FPS",d=function(m){s.innerHTML="RIVE FPS "+m.toFixed(1)},document.body.appendChild(s)),o=new function(){let m=0,y=0;(this||n).Yb=function(){var p=performance.now();y?(++m,p-=y,1e3>e,t.has(a)&&clearTimeout(t.get(a)),t.set(a,setTimeout(function(){t.delete(a),t.length==0?r=-1/0:a==r&&(r=Math.max(...t.keys()),console.assert(r{let a=f.ptrToFileAsset(r);return a.isImage?f.ptrToImageAsset(r):a.isFont?f.ptrToFontAsset(r):a},f.CustomFileAssetLoader=t.extend("CustomFileAssetLoader",{__construct:function({loadContents:r}){(this||n).__parent.__construct.call(this||n),(this||n).Hb=r},loadContents:function(r,a){return r=f.ptrToAsset(r),this.Hb(r,a)}}),f.CDNFileAssetLoader=t.extend("CDNFileAssetLoader",{__construct:function(){(this||n).__parent.__construct.call(this||n)},loadContents:function(r){let a=f.ptrToAsset(r);return r=a.cdnUuid,r===""?!1:(function(o,s){var d=new XMLHttpRequest;d.responseType="arraybuffer",d.onreadystatechange=function(){d.readyState==4&&d.status==200&&s(d)},d.open("GET",o,!0),d.send(null)}(a.cdnBaseUrl+"/"+r,o=>{a.decode(new Uint8Array(o.response))}),!0)}}),f.FallbackFileAssetLoader=t.extend("FallbackFileAssetLoader",{__construct:function(){(this||n).__parent.__construct.call(this||n),(this||n).lb=[]},addLoader:function(r){(this||n).lb.push(r)},loadContents:function(r,a){for(let o of(this||n).lb)if(o.loadContents(r,a))return!0;return!1}})};let _e="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),fe=new function(){function e(){if(!t){let Z=function(te,F,we){if(F=S.createShader(F),S.shaderSource(F,we),S.compileShader(F),we=S.getShaderInfoLog(F),0<(we||"").length)throw we;S.attachShader(te,F)};var h=document.createElement("canvas"),P={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let S;if(/iPhone|iPad|iPod/i.test(je.userAgent)){if(S=h.getContext("webgl",P),r=1,!S)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(S=h.getContext("webgl2",P))r=2;else{if(!(S=h.getContext("webgl",P)))return console.log("No WebGL support. Image mesh will not be drawn."),!1;r=1}if(S=new Proxy(S,{get(te,F){return te.isContextLost()?(y||(console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",F),y=!0),typeof te[F]=="function"?function(){}:void 0):typeof te[F]=="function"?function(...we){return te[F].apply(te,we)}:te[F]},set(te,F,we){if(!te.isContextLost())return te[F]=we,!0;y||(console.error("Cannot render the mesh because the GL Context was lost. Tried to set property "+F),y=!0)}}),a=Math.min(S.getParameter(S.MAX_RENDERBUFFER_SIZE),S.getParameter(S.MAX_TEXTURE_SIZE)),h=S.createProgram(),Z(h,S.VERTEX_SHADER,`attribute vec2 vertex; attribute vec2 uv; uniform vec4 mat; uniform vec2 translate; varying vec2 st; void main() { st = uv; gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1); }`),Z(h,S.FRAGMENT_SHADER,`precision highp float; uniform sampler2D image; varying vec2 st; void main() { gl_FragColor = texture2D(image, st); }`),S.bindAttribLocation(h,0,"vertex"),S.bindAttribLocation(h,1,"uv"),S.linkProgram(h),P=S.getProgramInfoLog(h),0<(P||"").trim().length)throw P;o=S.getUniformLocation(h,"mat"),s=S.getUniformLocation(h,"translate"),S.useProgram(h),S.bindBuffer(S.ARRAY_BUFFER,S.createBuffer()),S.enableVertexAttribArray(0),S.enableVertexAttribArray(1),S.bindBuffer(S.ELEMENT_ARRAY_BUFFER,S.createBuffer()),S.uniform1i(S.getUniformLocation(h,"image"),0),S.pixelStorei(S.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=S}return!0}let t=null,r=0,a=0,o=null,s=null,d=0,m=0,y=!1;e(),(this||n).nc=function(){return e(),a},(this||n).Qb=function(h){t.deleteTexture&&t.deleteTexture(h)},(this||n).Ob=function(h){if(!e())return null;let P=t.createTexture();return P?(t.bindTexture(t.TEXTURE_2D,P),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,h),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),r==2?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.generateMipmap(t.TEXTURE_2D)):t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),P):null};let p=new ce(8),O=new ce(8),j=new ce(10),$=new ce(10);(this||n).Vb=function(h,P,S,Z,te){if(e()){var F=p.push(h),we=O.push(P);if(t.canvas){t.canvas.width==F&&t.canvas.height==we||(t.canvas.width=F,t.canvas.height=we),t.viewport(0,we-P,h,P),t.disable(t.SCISSOR_TEST),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.SCISSOR_TEST),S.sort((ae,nt)=>nt.xb-ae.xb),F=j.push(Z),d!=F&&(t.bufferData(t.ARRAY_BUFFER,8*F,t.DYNAMIC_DRAW),d=F),F=0;for(var ke of S)t.bufferSubData(t.ARRAY_BUFFER,F,ke.Ua),F+=4*ke.Ua.length;console.assert(F==4*Z);for(var tt of S)t.bufferSubData(t.ARRAY_BUFFER,F,tt.Eb),F+=4*tt.Eb.length;console.assert(F==8*Z),F=$.push(te),m!=F&&(t.bufferData(t.ELEMENT_ARRAY_BUFFER,2*F,t.DYNAMIC_DRAW),m=F),ke=0;for(var Et of S)t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,ke,Et.indices),ke+=2*Et.indices.length;console.assert(ke==2*te),Et=0,tt=!0,F=ke=0;for(let ae of S){ae.image.Ka!=Et&&(t.bindTexture(t.TEXTURE_2D,ae.image.Ja||null),Et=ae.image.Ka),ae.tc?(t.scissor(ae.Za,we-ae.$a-ae.jb,ae.Ic,ae.jb),tt=!0):tt&&(t.scissor(0,we-P,h,P),tt=!1),S=2/h;let nt=-2/P;t.uniform4f(o,ae.ha[0]*S*ae.Ba,ae.ha[1]*nt*ae.Ca,ae.ha[2]*S*ae.Ba,ae.ha[3]*nt*ae.Ca),t.uniform2f(s,ae.ha[4]*S*ae.Ba+S*(ae.Za-ae.oc*ae.Ba)-1,ae.ha[5]*nt*ae.Ca+nt*(ae.$a-ae.pc*ae.Ca)+1),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,F),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,F+4*Z),t.drawElements(t.TRIANGLES,ae.indices.length,t.UNSIGNED_SHORT,ke),F+=4*ae.Ua.length,ke+=2*ae.indices.length}console.assert(F==4*Z),console.assert(ke==2*te)}}},(this||n).canvas=function(){return e()&&t.canvas}},V=f.onRuntimeInitialized;f.onRuntimeInitialized=function(){function e(x){switch(x){case p.srcOver:return"source-over";case p.screen:return"screen";case p.overlay:return"overlay";case p.darken:return"darken";case p.lighten:return"lighten";case p.colorDodge:return"color-dodge";case p.colorBurn:return"color-burn";case p.hardLight:return"hard-light";case p.softLight:return"soft-light";case p.difference:return"difference";case p.exclusion:return"exclusion";case p.multiply:return"multiply";case p.hue:return"hue";case p.saturation:return"saturation";case p.color:return"color";case p.luminosity:return"luminosity"}}function t(x){return"rgba("+((16711680&x)>>>16)+","+((65280&x)>>>8)+","+((255&x)>>>0)+","+((4278190080&x)>>>24)/255+")"}function r(){0x)throw"restore() called without matching save().";(this||n).T.splice(x),(this||n).J.push((this||n).C.restore.bind((this||n).C))},transform:function(x,z,ie,oe,Q,se){let ue=(this||n).T,de=ue.length-6;ue.splice(de,6,ue[de]*x+ue[de+2]*z,ue[de+1]*x+ue[de+3]*z,ue[de]*ie+ue[de+2]*oe,ue[de+1]*ie+ue[de+3]*oe,ue[de]*Q+ue[de+2]*se+ue[de+4],ue[de+1]*Q+ue[de+3]*se+ue[de+5]),(this||n).J.push((this||n).C.transform.bind((this||n).C,x,z,ie,oe,Q,se))},rotate:function(x){let z=Math.sin(x);x=Math.cos(x),this.transform(x,z,-z,x,0,0)},_drawPath:function(x,z){(this||n).J.push(z.draw.bind(z,(this||n).C,x.U,x.Wa===$?"evenodd":"nonzero"))},_drawRiveImage:function(x,z,ie){var oe=x.Gb;if(oe){var Q=(this||n).C,se=e(z);(this||n).J.push(function(){Q.globalCompositeOperation=se,Q.globalAlpha=ie,Q.drawImage(oe,0,0),Q.globalAlpha=1})}},_getMatrix:function(x){let z=(this||n).T,ie=z.length-6;for(let oe=0;6>oe;++oe)x[oe]=z[ie+oe]},_drawImageMesh:function(x,z,ie,oe,Q,se,ue,de,Ve,Se){var rt=(this||n).C.canvas.width,Le=(this||n).C.canvas.height;let aa=Ve-ue,ia=Se-de;ue=Math.max(ue,0),de=Math.max(de,0),Ve=Math.min(Ve,rt),Se=Math.min(Se,Le);let zt=Ve-ue,Nt=Se-de;if(console.assert(zt<=Math.min(aa,rt)),console.assert(Nt<=Math.min(ia,Le)),!(0>=zt||0>=Nt)){Ve=ztLe&&(Se*=Le/At,At=Le),Rt>Le&&(rt*=Le/Rt,Rt=Le),F||(F=new f.DynamicRectanizer(Le),F.reset(512,512)),Le=F.addRect(At,Rt),0>Le&&(r(),te.add(this||n),Le=F.addRect(At,Rt),console.assert(0<=Le));var oa=Le&65535,sa=Le>>16;we.push({ha:(this||n).T.slice((this||n).T.length-6),image:x,Za:oa,$a:sa,oc:ue,pc:de,Ic:At,jb:Rt,Ba:Se,Ca:rt,Ua:new Float32Array(oe),Eb:new Float32Array(Q),indices:new Uint16Array(se),tc:Ve,xb:x.Ka<<1|(Ve?1:0)}),ke+=oe.length,tt+=se.length;var Pt=(this||n).C,bi=e(z);(this||n).J.push(function(){Pt.save(),Pt.resetTransform(),Pt.globalCompositeOperation=bi,Pt.globalAlpha=ie;let ua=fe.canvas();ua&&Pt.drawImage(ua,oa,sa,At,Rt,ue,de,zt,Nt),Pt.restore()})}},_clipPath:function(x){(this||n).J.push((this||n).C.clip.bind((this||n).C,x.U,x.Wa===$?"evenodd":"nonzero"))},clear:function(){te.add(this||n),(this||n).J.push((this||n).C.clearRect.bind((this||n).C,0,0,(this||n).Va.width,(this||n).Va.height))},flush:function(){},translate:function(x,z){this.transform(1,0,0,1,x,z)}});f.makeRenderer=function(x){let z=new Et(x),ie=z.C;return new Proxy(z,{get(oe,Q){if(typeof oe[Q]=="function")return function(...se){return oe[Q].apply(oe,se)};if(typeof ie[Q]=="function"){if(-1<_e.indexOf(Q))throw Error("RiveException: Method call to '"+Q+"()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");return function(...se){z.J.push(ie[Q].bind(ie,...se))}}return oe[Q]},set(oe,Q,se){if(Q in ie)return ie[Q]=se,!0}})},f.decodeImage=function(x,z){new P({la:z}).decode(x)},f.renderFactory={makeRenderPaint:function(){return new Z},makeRenderPath:function(){return new S},makeRenderImage:function(){let x=nt;return new P({ya:()=>{x.total++},la:()=>{if(x.loaded++,x.loaded===x.total){let z=x.ready;z&&(z(),x.ready=null)}}})}};let ae=f.load,nt=null;f.load=function(x,z,ie=!0){let oe=new f.FallbackFileAssetLoader;return z!==void 0&&oe.addLoader(z),ie&&(z=new f.CDNFileAssetLoader,oe.addLoader(z)),new Promise(function(Q){let se=null;nt={total:0,loaded:0,ready:function(){Q(se)}},se=ae(x,oe),nt.total==0&&Q(se)})},a=new H,f.requestAnimationFrame=a.requestAnimationFrame.bind(a),f.cancelAnimationFrame=a.cancelAnimationFrame.bind(a),f.enableFPSCounter=a.Wb.bind(a),f.disableFPSCounter=a.Tb,a.pb=r,f.resolveAnimationFrame=r,f.cleanup=function(){F&&F.delete()}};var le,Ae,re=Object.assign({},f),K="./this.program",pe=typeof L=="object",me=typeof importScripts=="function",Te="";(pe||me)&&(me?Te=self.location.href:typeof document<"u"&&document.currentScript&&(Te=document.currentScript.src),D&&(Te=D),Te=Te.indexOf("blob:")!==0?Te.substr(0,Te.replace(/[?#].*/,"").lastIndexOf("/")+1):"",me&&(Ae=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),le=(e,t,r)=>{var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="arraybuffer",a.onload=()=>{a.status==200||a.status==0&&a.response?t(a.response):r()},a.onerror=r,a.send(null)});var Me=f.print||console.log.bind(console),Ce=f.printErr||console.error.bind(console);Object.assign(f,re),re=null,f.thisProgram&&(K=f.thisProgram);var l;f.wasmBinary&&(l=f.wasmBinary),f.noExitRuntime,typeof WebAssembly!="object"&&Be("no native wasm support detected");var i,c,g,v,C,b,_,W,B,Y,ye=!1;function he(){var e=i.buffer;f.HEAP8=g=new Int8Array(e),f.HEAP16=C=new Int16Array(e),f.HEAP32=_=new Int32Array(e),f.HEAPU8=v=new Uint8Array(e),f.HEAPU16=b=new Uint16Array(e),f.HEAPU32=W=new Uint32Array(e),f.HEAPF32=B=new Float32Array(e),f.HEAPF64=Y=new Float64Array(e)}var be,Pe=[],Oe=[],Ze=[];function _t(){var e=f.preRun.shift();Pe.unshift(e)}var We=0,Ue=null,He=null;function Be(e){throw f.onAbort&&f.onAbort(e),e="Aborted("+e+")",Ce(e),ye=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),q(e),e}function mt(e){return e.startsWith("data:application/octet-stream;base64,")}var De;if(De="canvas_advanced.wasm",!mt(De)){var Gt=De;De=f.locateFile?f.locateFile(Gt,Te):Te+Gt}function Ct(e){if(e==De&&l)return new Uint8Array(l);if(Ae)return Ae(e);throw"both async and sync fetching of the wasm failed"}function Re(e){if(!l&&(pe||me)){if(typeof fetch=="function"&&!e.startsWith("file://"))return fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>Ct(e));if(le)return new Promise((t,r)=>{le(e,a=>t(new Uint8Array(a)),r)})}return Promise.resolve().then(()=>Ct(e))}function ve(e,t,r){return Re(e).then(a=>WebAssembly.instantiate(a,t)).then(a=>a).then(r,a=>{Ce("failed to asynchronously prepare wasm: "+a),Be(a)})}function Ye(e,t){var r=De;return l||typeof WebAssembly.instantiateStreaming!="function"||mt(r)||r.startsWith("file://")||typeof fetch!="function"?ve(r,e,t):fetch(r,{credentials:"same-origin"}).then(a=>WebAssembly.instantiateStreaming(a,e).then(t,function(o){return Ce("wasm streaming compile failed: "+o),Ce("falling back to ArrayBuffer instantiation"),ve(r,e,t)}))}var G,ge,at={433268:(e,t,r,a,o)=>{if(typeof L>"u"||(L.AudioContext||L.webkitAudioContext)===void 0)return 0;if(typeof L.h>"u"){L.h={Aa:0},L.h.H={},L.h.H.za=e,L.h.H.capture=t,L.h.H.La=r,L.h.ga={},L.h.ga.stopped=a,L.h.ga.yb=o;let s=L.h;s.D=[],s.Gc=function(d){for(var m=0;m{Zr(m.qb)},y=>{console.error("Failed to resume audiocontext",y)})}s.Cb.map(function(y){document.removeEventListener(y,s.unlock,!0)})},s.Cb.map(function(d){document.addEventListener(d,s.unlock,!0)})}return L.h.Aa+=1,1},435446:()=>{typeof L.h<"u"&&(--L.h.Aa,L.h.Aa===0&&delete L.h)},435610:()=>je.mediaDevices!==void 0&&je.mediaDevices.getUserMedia!==void 0,435714:()=>{try{var e=new(L.AudioContext||L.webkitAudioContext),t=e.sampleRate;return e.close(),t}catch{return 0}},435885:(e,t,r,a,o,s)=>{if(typeof L.h>"u")return-1;var d={},m={};return e==L.h.H.za&&r!=0&&(m.sampleRate=r),d.I=new(L.AudioContext||L.webkitAudioContext)(m),d.I.suspend(),d.state=L.h.ga.stopped,r=0,e!=L.h.H.za&&(r=t),d.$=d.I.createScriptProcessor(a,r,t),d.$.onaudioprocess=function(y){if(d.ta!=null&&d.ta.length!=0||(d.ta=new Float32Array(B.buffer,o,a*t)),e==L.h.H.capture||e==L.h.H.La){for(var p=0;pL.h.sa(e).I.sampleRate,438835:e=>{e=L.h.sa(e),e.$!==void 0&&(e.$.onaudioprocess=function(){},e.$.disconnect(),e.$=void 0),e.Da!==void 0&&(e.Da.disconnect(),e.Da=void 0),e.I.close(),e.I=void 0,e.qb=void 0},439235:e=>{L.h.Db(e)},439285:e=>{e=L.h.sa(e),e.I.resume(),e.state=L.h.ga.yb},439424:e=>{e=L.h.sa(e),e.I.suspend(),e.state=L.h.ga.stopped}},Xe=e=>{for(;0{for(var r=0,a=e.length-1;0<=a;a--){var o=e[a];o==="."?e.splice(a,1):o===".."?(e.splice(a,1),r++):r&&(e.splice(a,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},Ge=e=>{var t=e.charAt(0)==="/",r=e.substr(-1)==="/";return(e=it(e.split("/").filter(a=>!!a),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},Sn=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],!e&&!t?".":(t&&(t=t.substr(0,t.length-1)),e+t)},lr=e=>{if(e==="/")return"/";e=Ge(e),e=e.replace(/\/$/,"");var t=e.lastIndexOf("/");return t===-1?e:e.substr(t+1)},Va=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return e=>crypto.getRandomValues(e);Be("initRandomDevice")},fr=e=>(fr=Va())(e);function qt(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){if(t=0<=r?arguments[r]:"/",typeof t!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t=t.charAt(0)==="/"}return e=it(e.split("/").filter(a=>!!a),!t).join("/"),(t?"/":"")+e||"."}var dr=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,vt=(e,t,r)=>{var a=t+r;for(r=t;e[r]&&!(r>=a);)++r;if(16o?a+=String.fromCharCode(o):(o-=65536,a+=String.fromCharCode(55296|o>>10,56320|o&1023))}}else a+=String.fromCharCode(o)}return a},Mn=[],hr=e=>{for(var t=0,r=0;r=a?t++:2047>=a?t+=2:55296<=a&&57343>=a?(t+=4,++r):t+=3}return t},pr=(e,t,r,a)=>{if(!(0=d){var m=e.charCodeAt(++s);d=65536+((d&1023)<<10)|m&1023}if(127>=d){if(r>=a)break;t[r++]=d}else{if(2047>=d){if(r+1>=a)break;t[r++]=192|d>>6}else{if(65535>=d){if(r+2>=a)break;t[r++]=224|d>>12}else{if(r+3>=a)break;t[r++]=240|d>>18,t[r++]=128|d>>12&63}t[r++]=128|d>>6&63}t[r++]=128|d&63}}return t[r]=0,r-o};function mr(e,t){var r=Array(hr(e)+1);return e=pr(e,r,0,r.length),t&&(r.length=e),r}var vr=[];function gr(e,t){vr[e]={input:[],F:[],W:t},In(e,Ha)}var Ha={open:function(e){var t=vr[e.node.ma];if(!t)throw new U(43);e.s=t,e.seekable=!1},close:function(e){e.s.W.ra(e.s)},ra:function(e){e.s.W.ra(e.s)},read:function(e,t,r,a){if(!e.s||!e.s.W.ib)throw new U(60);for(var o=0,s=0;s=t||(t=Math.max(t,r*(1048576>r?2:1.125)>>>0),r!=0&&(t=Math.max(t,256)),r=e.l,e.l=new Uint8Array(t),0=e.node.v)return 0;if(e=Math.min(e.node.v-o,a),8t)throw new U(28);return t},qa(e,t,r){yr(e.node,t+r),e.node.v=Math.max(e.node.v,t+r)},mb(e,t,r,a,o){if((e.node.mode&61440)!==32768)throw new U(43);if(e=e.node.l,o&2||e.buffer!==g.buffer){if((0{if(e=qt(e),!e)return{path:"",node:null};if(t=Object.assign({gb:!0,Ra:0},t),8!!d);for(var r=On,a="/",o=0;o{for(var t;;){if(e===e.parent)return e=e.V.nb,t?e[e.length-1]!=="/"?`${e}/${t}`:e+t:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}},Tr=(e,t)=>{for(var r=0,a=0;a>>0)%It.length},Zt=(e,t)=>{var r;if(r=(r=Qt(e,"x"))?r:e.j.ka?0:2)throw new U(r,e);for(r=It[Tr(e.id,t)];r;r=r.sc){var a=r.name;if(r.parent.id===e.id&&a===t)return r}return e.j.ka(e,t)},Er=(e,t,r,a)=>(e=new qr(e,t,r,a),t=Tr(e.parent.id,e.name),e.sc=It[t],It[t]=e),Ar=e=>{var t=["r","w","rw"][e&3];return e&512&&(t+="w"),t},Qt=(e,t)=>_r?0:!t.includes("r")||e.mode&292?t.includes("w")&&!(e.mode&146)||t.includes("x")&&!(e.mode&73)?2:0:2,Rr=(e,t)=>{try{return Zt(e,t),20}catch{}return Qt(e,"wx")},Ka=()=>{for(var e=0;4096>=e;e++)if(!Jt[e])return e;throw new U(33)},ot=e=>{if(e=Jt[e],!e)throw new U(8);return e},Cr=(e,t=-1)=>(jt||(jt=function(){(this||n).h={}},jt.prototype={},Object.defineProperties(jt.prototype,{object:{get(){return(this||n).node},set(r){(this||n).node=r}},flags:{get(){return(this||n).h.flags},set(r){(this||n).h.flags=r}},position:{get(){return(this||n).h.position},set(r){(this||n).h.position=r}}})),e=Object.assign(new jt,e),t==-1&&(t=Ka()),e.Z=t,Jt[t]=e),Ja={open:e=>{e.m=wr[e.node.ma].m,e.m.open&&e.m.open(e)},ba:()=>{throw new U(70)}},In=(e,t)=>{wr[e]={m:t}},xr=(e,t)=>{var r=t==="/",a=!t;if(r&&On)throw new U(10);if(!r&&!a){var o=gt(t,{gb:!1});if(t=o.path,o=o.node,o.xa)throw new U(10);if((o.mode&61440)!==16384)throw new U(54)}t={type:e,Qc:{},nb:t,qc:[]},e=e.V(t),e.V=t,t.root=e,r?On=e:o&&(o.xa=t,o.V&&o.V.qc.push(t))},qe=(e,t,r)=>{var a=gt(e,{parent:!0}).node;if(e=lr(e),!e||e==="."||e==="..")throw new U(28);var o=Rr(a,e);if(o)throw new U(o);if(!a.j.wa)throw new U(63);return a.j.wa(a,e,t,r)},en=(e,t,r)=>{typeof r>"u"&&(r=t,t=438),qe(e,t|8192,r)},kn=(e,t)=>{if(!qt(e))throw new U(44);var r=gt(t,{parent:!0}).node;if(!r)throw new U(44);t=lr(t);var a=Rr(r,t);if(a)throw new U(a);if(!r.j.Ea)throw new U(63);r.j.Ea(r,t,e)},Za=e=>{if(e=gt(e).node,!e)throw new U(44);if(!e.j.na)throw new U(28);return qt(jn(e.parent),e.j.na(e))},tn=(e,t,r)=>{if(e==="")throw new U(44);if(typeof t=="string"){var a={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(typeof a>"u")throw Error(`Unknown file open mode: ${t}`);t=a}if(r=t&64?(typeof r>"u"?438:r)&4095|32768:0,typeof e=="object")var o=e;else{e=Ge(e);try{o=gt(e,{Ma:!(t&131072)}).node}catch{}}if(a=!1,t&64)if(o){if(t&128)throw new U(20)}else o=qe(e,r,0),a=!0;if(!o)throw new U(44);if((o.mode&61440)===8192&&(t&=-513),t&65536&&(o.mode&61440)!==16384)throw new U(54);if(!a&&(r=o?(o.mode&61440)===40960?32:(o.mode&61440)===16384&&(Ar(t)!=="r"||t&512)?31:Qt(o,Ar(t)):44))throw new U(r);if(t&512&&!a){if(r=o,r=typeof r=="string"?gt(r,{Ma:!0}).node:r,!r.j.R)throw new U(63);if((r.mode&61440)===16384)throw new U(31);if((r.mode&61440)!==32768)throw new U(28);if(a=Qt(r,"w"))throw new U(a);r.j.R(r,{size:0,timestamp:Date.now()})}return t&=-131713,o=Cr({node:o,path:jn(o),flags:t,seekable:!0,position:0,m:o.m,Hc:[],error:!1}),o.m.open&&o.m.open(o),!f.logReadFiles||t&1||(Kt||(Kt={}),e in Kt||(Kt[e]=1)),o},Sr=(e,t,r)=>{if(e.Z===null)throw new U(8);if(!e.seekable||!e.m.ba)throw new U(70);if(r!=0&&r!=1&&r!=2)throw new U(28);e.position=e.m.ba(e,t,r),e.Hc=[]},Mr=()=>{U||(U=function(e,t){(this||n).name="ErrnoError",(this||n).node=t,(this||n).xc=function(r){(this||n).Y=r},this.xc(e),(this||n).message="FS error"},U.prototype=Error(),U.prototype.constructor=U,[44].forEach(e=>{Ln[e]=new U(e),Ln[e].stack=""}))},kt=(e,t,r)=>{e=Ge("/dev/"+e);var a=Ga(!!t,!!r);Pn||(Pn=64);var o=Pn++<<8|0;In(o,{open:s=>{s.seekable=!1},close:()=>{r&&r.buffer&&r.buffer.length&&r(10)},read:(s,d,m,y)=>{for(var p=0,O=0;O{for(var p=0;p>2]}function Pr(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e}function nn(e,t){return e=Pr(e),{[e]:function(){return t.apply(this||n,arguments)}}[e]}function Or(){(this||n).M=[void 0],(this||n).hb=[]}var Ne=new Or,xt=void 0;function J(e){throw new xt(e)}var Ke=e=>(e||J("Cannot use deleted val. handle = "+e),Ne.get(e).value),Qe=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Ne.qa({ub:1,value:e})}};function Lr(e){var t=Error,r=nn(e,function(a){(this||n).name=e,(this||n).message=a,a=Error(a).stack,a!==void 0&&((this||n).stack=this.toString()+` `+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return(this||n).message===void 0?(this||n).name:`${(this||n).name}: ${(this||n).message}`},r}var jr=void 0,Ir=void 0;function xe(e){for(var t="";v[e];)t+=Ir[v[e++]];return t}var Dt=[];function Fn(){for(;Dt.length;){var e=Dt.pop();e.g.fa=!1,e.delete()}}var Bt=void 0,ut={};function Dn(e,t){for(t===void 0&&J("ptr should not be undefined");e.A;)t=e.oa(t),e=e.A;return t}var Tt={};function kr(e){e=na(e);var t=xe(e);return ft(e),t}function Wt(e,t){var r=Tt[e];return r===void 0&&J(t+" has unknown type "+kr(e)),r}function rn(){}var Bn=!1;function Fr(e){--e.count.value,e.count.value===0&&(e.G?e.L.X(e.G):e.u.i.X(e.o))}function Dr(e,t,r){return t===r?e:r.A===void 0?null:(e=Dr(e,t,r.A),e===null?null:r.Ub(e))}var Br={};function Qa(e,t){return t=Dn(e,t),ut[t]}var Wr=void 0;function an(e){throw new Wr(e)}function on(e,t){return t.u&&t.o||an("makeClassHandle requires ptr and ptrType"),!!t.L!=!!t.G&&an("Both smartPtrType and smartPtr must be specified"),t.count={value:1},St(Object.create(e,{g:{value:t}}))}function St(e){return typeof FinalizationRegistry>"u"?(St=t=>t,e):(Bn=new FinalizationRegistry(t=>{Fr(t.g)}),St=t=>{var r=t.g;return r.G&&Bn.register(t,{g:r},t),t},rn=t=>{Bn.unregister(t)},St(e))}var sn={};function Ut(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function $t(e){return this.fromWireType(_[e>>2])}var Mt={},un={};function $e(e,t,r){function a(m){m=r(m),m.length!==e.length&&an("Mismatched type converter count");for(var y=0;y{Tt.hasOwnProperty(m)?o[y]=Tt[m]:(s.push(m),Mt.hasOwnProperty(m)||(Mt[m]=[]),Mt[m].push(()=>{o[y]=Tt[m],++d,d===s.length&&a(o)}))}),s.length===0&&a(o)}function cn(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${e}`)}}function ei(e,t,r={}){var a=t.name;if(e||J(`type "${a}" must have a positive integer typeid pointer`),Tt.hasOwnProperty(e)){if(r.fc)return;J(`Cannot register type '${a}' twice`)}Tt[e]=t,delete un[e],Mt.hasOwnProperty(e)&&(t=Mt[e],delete Mt[e],t.forEach(o=>o()))}function et(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");ei(e,t,r)}function Wn(e){J(e.g.u.i.name+" instance already deleted")}function bt(){}function Un(e,t,r){if(e[t].B===void 0){var a=e[t];e[t]=function(){return e[t].B.hasOwnProperty(arguments.length)||J(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].B})!`),e[t].B[arguments.length].apply(this||n,arguments)},e[t].B=[],e[t].B[a.ea]=a}}function $n(e,t,r){f.hasOwnProperty(e)?((r===void 0||f[e].B!==void 0&&f[e].B[r]!==void 0)&&J(`Cannot register public name '${e}' twice`),Un(f,e,e),f.hasOwnProperty(r)&&J(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),f[e].B[r]=t):(f[e]=t,r!==void 0&&(f[e].Pc=r))}function ti(e,t,r,a,o,s,d,m){(this||n).name=e,(this||n).constructor=t,(this||n).O=r,(this||n).X=a,(this||n).A=o,(this||n).Zb=s,(this||n).oa=d,(this||n).Ub=m,(this||n).rb=[]}function ln(e,t,r){for(;t!==r;)t.oa||J(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.oa(e),t=t.A;return e}function ni(e,t){return t===null?((this||n).Oa&&J(`null is not a valid ${(this||n).name}`),0):(t.g||J(`Cannot pass "${Nn(t)}" as a ${(this||n).name}`),t.g.o||J(`Cannot pass deleted object as a pointer of type ${(this||n).name}`),ln(t.g.o,t.g.u.i,(this||n).i))}function ri(e,t){if(t===null){if((this||n).Oa&&J(`null is not a valid ${(this||n).name}`),(this||n).va){var r=this.Qa();return e!==null&&e.push((this||n).X,r),r}return 0}if(t.g||J(`Cannot pass "${Nn(t)}" as a ${(this||n).name}`),t.g.o||J(`Cannot pass deleted object as a pointer of type ${(this||n).name}`),!(this||n).ua&&t.g.u.ua&&J(`Cannot convert argument of type ${t.g.L?t.g.L.name:t.g.u.name} to parameter type ${(this||n).name}`),r=ln(t.g.o,t.g.u.i,(this||n).i),(this||n).va)switch(t.g.G===void 0&&J("Passing raw pointer to smart pointer is illegal"),(this||n).Bc){case 0:t.g.L===(this||n)?r=t.g.G:J(`Cannot convert argument of type ${t.g.L?t.g.L.name:t.g.u.name} to parameter type ${(this||n).name}`);break;case 1:r=t.g.G;break;case 2:if(t.g.L===(this||n))r=t.g.G;else{var a=t.clone();r=this.wc(r,Qe(function(){a.delete()})),e!==null&&e.push((this||n).X,r)}break;default:J("Unsupporting sharing policy")}return r}function ai(e,t){return t===null?((this||n).Oa&&J(`null is not a valid ${(this||n).name}`),0):(t.g||J(`Cannot pass "${Nn(t)}" as a ${(this||n).name}`),t.g.o||J(`Cannot pass deleted object as a pointer of type ${(this||n).name}`),t.g.u.ua&&J(`Cannot convert argument of type ${t.g.u.name} to parameter type ${(this||n).name}`),ln(t.g.o,t.g.u.i,(this||n).i))}function ct(e,t,r,a){(this||n).name=e,(this||n).i=t,(this||n).Oa=r,(this||n).ua=a,(this||n).va=!1,(this||n).X=(this||n).wc=(this||n).Qa=(this||n).sb=(this||n).Bc=(this||n).vc=void 0,t.A!==void 0?(this||n).toWireType=ri:((this||n).toWireType=a?ni:ai,(this||n).K=null)}function Ur(e,t,r){f.hasOwnProperty(e)||an("Replacing nonexistant public symbol"),f[e].B!==void 0&&r!==void 0?f[e].B[r]=t:(f[e]=t,f[e].ea=r)}var fn=[],$r=e=>{var t=fn[e];return t||(e>=fn.length&&(fn.length=e+1),fn[e]=t=be.get(e)),t},ii=(e,t)=>{var r=[];return function(){if(r.length=0,Object.assign(r,arguments),e.includes("j")){var a=f["dynCall_"+e];a=r&&r.length?a.apply(null,[t].concat(r)):a.call(null,t)}else a=$r(t).apply(null,r);return a}};function Fe(e,t){e=xe(e);var r=e.includes("j")?ii(e,t):$r(t);return typeof r!="function"&&J(`unknown function pointer with signature ${e}: ${t}`),r}var zr=void 0;function lt(e,t){function r(s){o[s]||Tt[s]||(un[s]?un[s].forEach(r):(a.push(s),o[s]=!0))}var a=[],o={};throw t.forEach(r),new zr(`${e}: `+a.map(kr).join([", "]))}function dn(e,t,r,a,o){var s=t.length;2>s&&J("argTypes array size mismatch! Must at least get return value and 'this' types!");var d=t[1]!==null&&r!==null,m=!1;for(r=1;r>2]);return r}function Nr(e,t,r){return e instanceof Object||J(`${r} with invalid "this": ${e}`),e instanceof t.i.constructor||J(`${r} incompatible with "this" of type ${e.constructor.name}`),e.g.o||J(`cannot call emscripten binding method ${r} on deleted object`),ln(e.g.o,e.g.u.i,t.i)}function zn(e){e>=Ne.h&&--Ne.get(e).ub===0&&Ne.ec(e)}function oi(e,t,r){switch(t){case 0:return function(a){return this.fromWireType((r?g:v)[a])};case 1:return function(a){return this.fromWireType((r?C:b)[a>>1])};case 2:return function(a){return this.fromWireType((r?_:W)[a>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function Nn(e){if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e}function si(e,t){switch(t){case 2:return function(r){return this.fromWireType(B[r>>2])};case 3:return function(r){return this.fromWireType(Y[r>>3])};default:throw new TypeError("Unknown float type: "+e)}}function ui(e,t,r){switch(t){case 0:return r?function(a){return g[a]}:function(a){return v[a]};case 1:return r?function(a){return C[a>>1]}:function(a){return b[a>>1]};case 2:return r?function(a){return _[a>>2]}:function(a){return W[a>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var Vr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ci=(e,t)=>{for(var r=e>>1,a=r+t/2;!(r>=a)&&b[r];)++r;if(r<<=1,32=t/2);++a){var o=C[e+2*a>>1];if(o==0)break;r+=String.fromCharCode(o)}return r},li=(e,t,r)=>{if(r===void 0&&(r=2147483647),2>r)return 0;r-=2;var a=t;r=r<2*e.length?r/2:e.length;for(var o=0;o>1]=e.charCodeAt(o),t+=2;return C[t>>1]=0,t-a},fi=e=>2*e.length,di=(e,t)=>{for(var r=0,a="";!(r>=t/4);){var o=_[e+4*r>>2];if(o==0)break;++r,65536<=o?(o-=65536,a+=String.fromCharCode(55296|o>>10,56320|o&1023)):a+=String.fromCharCode(o)}return a},hi=(e,t,r)=>{if(r===void 0&&(r=2147483647),4>r)return 0;var a=t;r=a+r-4;for(var o=0;o=s){var d=e.charCodeAt(++o);s=65536+((s&1023)<<10)|d&1023}if(_[t>>2]=s,t+=4,t+4>r)break}return _[t>>2]=0,t-a},pi=e=>{for(var t=0,r=0;r=a&&++r,t+=4}return t},mi={};function pn(e){var t=mi[e];return t===void 0?xe(e):t}var mn=[];function vi(e){var t=mn.length;return mn.push(e),t}function gi(e,t){for(var r=Array(e),a=0;a>2],"parameter "+a);return r}var Vn,Hr=[],Hn=[],Yn={},Yr=()=>{if(!Vn){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof je=="object"&&je.languages&&je.languages[0]||"C").replace("-","_")+".UTF-8",_:K||"./this.program"};for(e in Yn)Yn[e]===void 0?delete t[e]:t[e]=Yn[e];var r=[];for(e in t)r.push(`${e}=${t[e]}`);Vn=r}return Vn},vn=e=>e%4===0&&(e%100!==0||e%400===0),Xr=[31,29,31,30,31,30,31,31,30,31,30,31],Gr=[31,28,31,30,31,30,31,31,30,31,30,31],yi=(e,t,r,a)=>{function o(h,P,S){for(h=typeof h=="number"?h.toString():h||"";h.lengthte?-1:0Z-h.getDate())){h.setDate(h.getDate()+P);break}P-=Z-h.getDate()+1,h.setDate(1),11>S?h.setMonth(S+1):(h.setMonth(0),h.setFullYear(h.getFullYear()+1))}return S=new Date(h.getFullYear()+1,0,4),P=m(new Date(h.getFullYear(),0,4)),S=m(S),0>=d(P,h)?0>=d(S,h)?h.getFullYear()+1:h.getFullYear():h.getFullYear()-1}var p=_[a+40>>2];a={Ec:_[a>>2],Dc:_[a+4>>2],Fa:_[a+8>>2],Ta:_[a+12>>2],Ga:_[a+16>>2],da:_[a+20>>2],S:_[a+24>>2],ca:_[a+28>>2],Rc:_[a+32>>2],Cc:_[a+36>>2],Fc:p&&p?vt(v,p):""},r=r?vt(v,r):"",p={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var O in p)r=r.replace(new RegExp(O,"g"),p[O]);var j="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),$="January February March April May June July August September October November December".split(" ");p={"%a":h=>j[h.S].substring(0,3),"%A":h=>j[h.S],"%b":h=>$[h.Ga].substring(0,3),"%B":h=>$[h.Ga],"%C":h=>s((h.da+1900)/100|0,2),"%d":h=>s(h.Ta,2),"%e":h=>o(h.Ta,2," "),"%g":h=>y(h).toString().substring(2),"%G":h=>y(h),"%H":h=>s(h.Fa,2),"%I":h=>(h=h.Fa,h==0?h=12:12{for(var P=0,S=0;S<=h.Ga-1;P+=(vn(h.da+1900)?Xr:Gr)[S++]);return s(h.Ta+P,3)},"%m":h=>s(h.Ga+1,2),"%M":h=>s(h.Dc,2),"%n":()=>` `,"%p":h=>0<=h.Fa&&12>h.Fa?"AM":"PM","%S":h=>s(h.Ec,2),"%t":()=>" ","%u":h=>h.S||7,"%U":h=>s(Math.floor((h.ca+7-h.S)/7),2),"%V":h=>{var P=Math.floor((h.ca+7-(h.S+6)%7)/7);if(2>=(h.S+371-h.ca-2)%7&&P++,P)P==53&&(S=(h.S+371-h.ca)%7,S==4||S==3&&vn(h.da)||(P=1));else{P=52;var S=(h.S+7-h.ca-1)%7;(S==4||S==5&&vn(h.da%400-1))&&P++}return s(P,2)},"%w":h=>h.S,"%W":h=>s(Math.floor((h.ca+7-(h.S+6)%7)/7),2),"%y":h=>(h.da+1900).toString().substring(2),"%Y":h=>h.da+1900,"%z":h=>{h=h.Cc;var P=0<=h;return h=Math.abs(h)/60,(P?"+":"-")+("0000"+(h/60*100+h%60)).slice(-4)},"%Z":h=>h.Fc,"%%":()=>"%"},r=r.replace(/%%/g,"\0\0");for(O in p)r.includes(O)&&(r=r.replace(new RegExp(O,"g"),p[O](a)));return r=r.replace(/\0\0/g,"%"),O=mr(r,!1),O.length>t?0:(g.set(O,e),O.length-1)};function qr(e,t,r,a){e||(e=this||n),(this||n).parent=e,(this||n).V=e.V,(this||n).xa=null,(this||n).id=qa++,(this||n).name=t,(this||n).mode=r,(this||n).j={},(this||n).m={},(this||n).ma=a}Object.defineProperties(qr.prototype,{read:{get:function(){return((this||n).mode&365)===365},set:function(e){e?(this||n).mode|=365:(this||n).mode&=-366}},write:{get:function(){return((this||n).mode&146)===146},set:function(e){e?(this||n).mode|=146:(this||n).mode&=-147}}}),Mr(),It=Array(4096),xr(ne,"/"),qe("/tmp",16895,0),qe("/home",16895,0),qe("/home/web_user",16895,0),(()=>{qe("/dev",16895,0),In(259,{read:()=>0,write:(a,o,s,d)=>d}),en("/dev/null",259),gr(1280,Ya),gr(1536,Xa),en("/dev/tty",1280),en("/dev/tty1",1536);var e=new Uint8Array(1024),t=0,r=()=>(t===0&&(t=fr(e).byteLength),e[--t]);kt("random",r),kt("urandom",r),qe("/dev/shm",16895,0),qe("/dev/shm/tmp",16895,0)})(),(()=>{qe("/proc",16895,0);var e=qe("/proc/self",16895,0);qe("/proc/self/fd",16895,0),xr({V:()=>{var t=Er(e,"fd",16895,73);return t.j={ka:(r,a)=>{var o=ot(+a);return r={parent:null,V:{nb:"fake"},j:{na:()=>o.path}},r.parent=r}},t}},"/proc/self/fd")})(),Object.assign(Or.prototype,{get(e){return(this||n).M[e]},has(e){return(this||n).M[e]!==void 0},qa(e){var t=(this||n).hb.pop()||(this||n).M.length;return(this||n).M[t]=e,t},ec(e){(this||n).M[e]=void 0,(this||n).hb.push(e)}}),xt=f.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Ne.M.push({value:void 0},{value:null},{value:!0},{value:!1}),Ne.h=Ne.M.length,f.count_emval_handles=function(){for(var e=0,t=Ne.h;tgn;++gn)Kr[gn]=String.fromCharCode(gn);Ir=Kr,f.getInheritedInstanceCount=function(){return Object.keys(ut).length},f.getLiveInheritedInstances=function(){var e,t=[];for(e in ut)ut.hasOwnProperty(e)&&t.push(ut[e]);return t},f.flushPendingDeletes=Fn,f.setDelayFunction=function(e){Bt=e,Dt.length&&Bt&&Bt(Fn)},Wr=f.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},bt.prototype.isAliasOf=function(e){if(!((this||n)instanceof bt&&e instanceof bt))return!1;var t=(this||n).g.u.i,r=(this||n).g.o,a=e.g.u.i;for(e=e.g.o;t.A;)r=t.oa(r),t=t.A;for(;a.A;)e=a.oa(e),a=a.A;return t===a&&r===e},bt.prototype.clone=function(){if((this||n).g.o||Wn(this||n),(this||n).g.ia)return(this||n).g.count.value+=1,this||n;var e=St,t=Object,r=t.create,a=Object.getPrototypeOf(this||n),o=(this||n).g;return e=e(r.call(t,a,{g:{value:{count:o.count,fa:o.fa,ia:o.ia,o:o.o,u:o.u,G:o.G,L:o.L}}})),e.g.count.value+=1,e.g.fa=!1,e},bt.prototype.delete=function(){(this||n).g.o||Wn(this||n),(this||n).g.fa&&!(this||n).g.ia&&J("Object already scheduled for deletion"),rn(this||n),Fr((this||n).g),(this||n).g.ia||((this||n).g.G=void 0,(this||n).g.o=void 0)},bt.prototype.isDeleted=function(){return!(this||n).g.o},bt.prototype.deleteLater=function(){return(this||n).g.o||Wn(this||n),(this||n).g.fa&&!(this||n).g.ia&&J("Object already scheduled for deletion"),Dt.push(this||n),Dt.length===1&&Bt&&Bt(Fn),(this||n).g.fa=!0,this||n},ct.prototype.$b=function(e){return(this||n).sb&&(e=this.sb(e)),e},ct.prototype.bb=function(e){(this||n).X&&this.X(e)},ct.prototype.argPackAdvance=8,ct.prototype.readValueFromPointer=$t,ct.prototype.deleteObject=function(e){e!==null&&e.delete()},ct.prototype.fromWireType=function(e){function t(){return(this||n).va?on((this||n).i.O,{u:(this||n).vc,o:r,L:this||n,G:e}):on((this||n).i.O,{u:this||n,o:e})}var r=this.$b(e);if(!r)return this.bb(e),null;var a=Qa((this||n).i,r);if(a!==void 0)return a.g.count.value===0?(a.g.o=r,a.g.G=e,a.clone()):(a=a.clone(),this.bb(e),a);if(a=(this||n).i.Zb(r),a=Br[a],!a)return t.call(this||n);a=(this||n).ua?a.Nb:a.pointerType;var o=Dr(r,(this||n).i,a.i);return o===null?t.call(this||n):(this||n).va?on(a.i.O,{u:a,o,L:this||n,G:e}):on(a.i.O,{u:a,o})},zr=f.UnboundTypeError=Lr("UnboundTypeError");var Jr={__syscall_fcntl64:function(e,t,r){Ft=r;try{var a=ot(e);switch(t){case 0:var o=st();return 0>o?-28:Cr(a,o).Z;case 1:case 2:return 0;case 3:return a.flags;case 4:return o=st(),a.flags|=o,0;case 5:return o=st(),C[o+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return _[ta()>>2]=28,-1;default:return-28}}catch(s){if(typeof yt>"u"||s.name!=="ErrnoError")throw s;return-s.Y}},__syscall_fstat64:function(e,t){try{e:{var r=ot(e).path;try{var a=gt(r,{Ma:!0}).node;if(!a)throw new U(44);if(!a.j.N)throw new U(63);var o=a.j.N(a)}catch(p){if(p&&p.node&&Ge(r)!==Ge(jn(p.node))){var s=-54;break e}throw p}_[t>>2]=o.Sb,_[t+4>>2]=o.mode,W[t+8>>2]=o.uc,_[t+12>>2]=o.uid,_[t+16>>2]=o.dc,_[t+20>>2]=o.ma,ge=[o.size>>>0,(G=o.size,1<=+Math.abs(G)?0>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],_[t+24>>2]=ge[0],_[t+28>>2]=ge[1],_[t+32>>2]=4096,_[t+36>>2]=o.Mb;var d=o.Kb.getTime(),m=o.rc.getTime(),y=o.Pb.getTime();ge=[Math.floor(d/1e3)>>>0,(G=Math.floor(d/1e3),1<=+Math.abs(G)?0>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],_[t+40>>2]=ge[0],_[t+44>>2]=ge[1],W[t+48>>2]=d%1e3*1e3,ge=[Math.floor(m/1e3)>>>0,(G=Math.floor(m/1e3),1<=+Math.abs(G)?0>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],_[t+56>>2]=ge[0],_[t+60>>2]=ge[1],W[t+64>>2]=m%1e3*1e3,ge=[Math.floor(y/1e3)>>>0,(G=Math.floor(y/1e3),1<=+Math.abs(G)?0>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],_[t+72>>2]=ge[0],_[t+76>>2]=ge[1],W[t+80>>2]=y%1e3*1e3,ge=[o.kb>>>0,(G=o.kb,1<=+Math.abs(G)?0>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],_[t+88>>2]=ge[0],_[t+92>>2]=ge[1],s=0}return s}catch(p){if(typeof yt>"u"||p.name!=="ErrnoError")throw p;return-p.Y}},__syscall_ioctl:function(e,t,r){Ft=r;try{var a=ot(e);switch(t){case 21509:return a.s?0:-59;case 21505:if(!a.s)return-59;if(a.s.W.ic){t=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var o=st();_[o>>2]=25856,_[o+4>>2]=5,_[o+8>>2]=191,_[o+12>>2]=35387;for(var s=0;32>s;s++)g[o+s+17>>0]=t[s]||0}return 0;case 21510:case 21511:case 21512:return a.s?0:-59;case 21506:case 21507:case 21508:if(!a.s)return-59;if(a.s.W.jc)for(o=st(),t=[],s=0;32>s;s++)t.push(g[o+s+17>>0]);return 0;case 21519:return a.s?(o=st(),_[o>>2]=0):-59;case 21520:return a.s?-28:-59;case 21531:if(o=st(),!a.m.hc)throw new U(59);return a.m.hc(a,t,o);case 21523:return a.s?(a.s.W.kc&&(s=[24,80],o=st(),C[o>>1]=s[0],C[o+2>>1]=s[1]),0):-59;case 21524:return a.s?0:-59;case 21515:return a.s?0:-59;default:return-28}}catch(d){if(typeof yt>"u"||d.name!=="ErrnoError")throw d;return-d.Y}},__syscall_openat:function(e,t,r,a){Ft=a;try{t=t?vt(v,t):"";var o=t;if(o.charAt(0)==="/")t=o;else{var s=e===-100?"/":ot(e).path;if(o.length==0)throw new U(44);t=Ge(s+"/"+o)}var d=a?st():0;return tn(t,r,d).Z}catch(m){if(typeof yt>"u"||m.name!=="ErrnoError")throw m;return-m.Y}},_embind_create_inheriting_constructor:function(e,t,r){e=xe(e),t=Wt(t,"wrapper"),r=Ke(r);var a=[].slice,o=t.i,s=o.O,d=o.A.O,m=o.A.constructor;e=nn(e,function(){o.A.rb.forEach(function(p){if((this||n)[p]===d[p])throw new jr(`Pure virtual function ${p} must be implemented in JavaScript`)}.bind(this||n)),Object.defineProperty(this||n,"__parent",{value:s}),(this||n).__construct.apply(this||n,a.call(arguments))}),s.__construct=function(){(this||n)===s&&J("Pass correct 'this' to __construct");var p=m.implement.apply(void 0,[this||n].concat(a.call(arguments)));rn(p);var O=p.g;p.notifyOnDestruction(),O.ia=!0,Object.defineProperties(this||n,{g:{value:O}}),St(this||n),p=O.o,p=Dn(o,p),ut.hasOwnProperty(p)?J(`Tried to register registered instance: ${p}`):ut[p]=this||n},s.__destruct=function(){(this||n)===s&&J("Pass correct 'this' to __destruct"),rn(this||n);var p=(this||n).g.o;p=Dn(o,p),ut.hasOwnProperty(p)?delete ut[p]:J(`Tried to unregister unregistered instance: ${p}`)},e.prototype=Object.create(s);for(var y in r)e.prototype[y]=r[y];return Qe(e)},_embind_finalize_value_object:function(e){var t=sn[e];delete sn[e];var r=t.Qa,a=t.X,o=t.fb,s=o.map(d=>d.cc).concat(o.map(d=>d.zc));$e([e],s,d=>{var m={};return o.forEach((y,p)=>{var O=d[p],j=y.ac,$=y.bc,h=d[p+o.length],P=y.yc,S=y.Ac;m[y.Xb]={read:Z=>O.fromWireType(j($,Z)),write:(Z,te)=>{var F=[];P(S,Z,h.toWireType(F,te)),Ut(F)}}}),[{name:t.name,fromWireType:function(y){var p,O={};for(p in m)O[p]=m[p].read(y);return a(y),O},toWireType:function(y,p){for(var O in m)if(!(O in p))throw new TypeError(`Missing field: "${O}"`);var j=r();for(O in m)m[O].write(j,p[O]);return y!==null&&y.push(a,j),j},argPackAdvance:8,readValueFromPointer:$t,K:a}]})},_embind_register_bigint:function(){},_embind_register_bool:function(e,t,r,a,o){var s=cn(r);t=xe(t),et(e,{name:t,fromWireType:function(d){return!!d},toWireType:function(d,m){return m?a:o},argPackAdvance:8,readValueFromPointer:function(d){if(r===1)var m=g;else if(r===2)m=C;else{if(r!==4)throw new TypeError("Unknown boolean type size: "+t);m=_}return this.fromWireType(m[d>>s])},K:null})},_embind_register_class:function(e,t,r,a,o,s,d,m,y,p,O,j,$){O=xe(O),s=Fe(o,s),m&&(m=Fe(d,m)),p&&(p=Fe(y,p)),$=Fe(j,$);var h=Pr(O);$n(h,function(){lt(`Cannot construct ${O} due to unbound types`,[a])}),$e([e,t,r],a?[a]:[],function(P){if(P=P[0],a)var S=P.i,Z=S.O;else Z=bt.prototype;P=nn(h,function(){if(Object.getPrototypeOf(this||n)!==te)throw new xt("Use 'new' to construct "+O);if(F.aa===void 0)throw new xt(O+" has no accessible constructor");var ke=F.aa[arguments.length];if(ke===void 0)throw new xt(`Tried to invoke ctor of ${O} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(F.aa).toString()}) parameters instead!`);return ke.apply(this||n,arguments)});var te=Object.create(Z,{constructor:{value:P}});P.prototype=te;var F=new ti(O,P,te,$,S,s,m,p);F.A&&(F.A.pa===void 0&&(F.A.pa=[]),F.A.pa.push(F)),S=new ct(O,F,!0,!1),Z=new ct(O+"*",F,!1,!1);var we=new ct(O+" const*",F,!1,!0);return Br[e]={pointerType:Z,Nb:we},Ur(h,P),[S,Z,we]})},_embind_register_class_class_function:function(e,t,r,a,o,s,d){var m=hn(r,a);t=xe(t),s=Fe(o,s),$e([],[e],function(y){function p(){lt(`Cannot call ${O} due to unbound types`,m)}y=y[0];var O=`${y.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var j=y.i.constructor;return j[t]===void 0?(p.ea=r-1,j[t]=p):(Un(j,t,O),j[t].B[r-1]=p),$e([],m,function($){if($=dn(O,[$[0],null].concat($.slice(1)),null,s,d),j[t].B===void 0?($.ea=r-1,j[t]=$):j[t].B[r-1]=$,y.i.pa)for(let h of y.i.pa)h.constructor.hasOwnProperty(t)||(h.constructor[t]=$);return[]}),[]})},_embind_register_class_class_property:function(e,t,r,a,o,s,d,m){t=xe(t),s=Fe(o,s),$e([],[e],function(y){y=y[0];var p=`${y.name}.${t}`,O={get(){lt(`Cannot access ${p} due to unbound types`,[r])},enumerable:!0,configurable:!0};return O.set=m?()=>{lt(`Cannot access ${p} due to unbound types`,[r])}:()=>{J(`${p} is a read-only property`)},Object.defineProperty(y.i.constructor,t,O),$e([],[r],function(j){j=j[0];var $={get(){return j.fromWireType(s(a))},enumerable:!0};return m&&(m=Fe(d,m),$.set=h=>{var P=[];m(a,j.toWireType(P,h)),Ut(P)}),Object.defineProperty(y.i.constructor,t,$),[]}),[]})},_embind_register_class_constructor:function(e,t,r,a,o,s){var d=hn(t,r);o=Fe(a,o),$e([],[e],function(m){m=m[0];var y=`constructor ${m.name}`;if(m.i.aa===void 0&&(m.i.aa=[]),m.i.aa[t-1]!==void 0)throw new xt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${m.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return m.i.aa[t-1]=()=>{lt(`Cannot construct ${m.name} due to unbound types`,d)},$e([],d,function(p){return p.splice(1,0,null),m.i.aa[t-1]=dn(y,p,null,o,s),[]}),[]})},_embind_register_class_function:function(e,t,r,a,o,s,d,m){var y=hn(r,a);t=xe(t),s=Fe(o,s),$e([],[e],function(p){function O(){lt(`Cannot call ${j} due to unbound types`,y)}p=p[0];var j=`${p.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),m&&p.i.rb.push(t);var $=p.i.O,h=$[t];return h===void 0||h.B===void 0&&h.className!==p.name&&h.ea===r-2?(O.ea=r-2,O.className=p.name,$[t]=O):(Un($,t,j),$[t].B[r-2]=O),$e([],y,function(P){return P=dn(j,P,p,s,d),$[t].B===void 0?(P.ea=r-2,$[t]=P):$[t].B[r-2]=P,[]}),[]})},_embind_register_class_property:function(e,t,r,a,o,s,d,m,y,p){t=xe(t),o=Fe(a,o),$e([],[e],function(O){O=O[0];var j=`${O.name}.${t}`,$={get(){lt(`Cannot access ${j} due to unbound types`,[r,d])},enumerable:!0,configurable:!0};return $.set=y?()=>{lt(`Cannot access ${j} due to unbound types`,[r,d])}:()=>{J(j+" is a read-only property")},Object.defineProperty(O.i.O,t,$),$e([],y?[r,d]:[r],function(h){var P=h[0],S={get(){var te=Nr(this||n,O,j+" getter");return P.fromWireType(o(s,te))},enumerable:!0};if(y){y=Fe(m,y);var Z=h[1];S.set=function(te){var F=Nr(this||n,O,j+" setter"),we=[];y(p,F,Z.toWireType(we,te)),Ut(we)}}return Object.defineProperty(O.i.O,t,S),[]}),[]})},_embind_register_emval:function(e,t){t=xe(t),et(e,{name:t,fromWireType:function(r){var a=Ke(r);return zn(r),a},toWireType:function(r,a){return Qe(a)},argPackAdvance:8,readValueFromPointer:$t,K:null})},_embind_register_enum:function(e,t,r,a){function o(){}r=cn(r),t=xe(t),o.values={},et(e,{name:t,constructor:o,fromWireType:function(s){return(this||n).constructor.values[s]},toWireType:function(s,d){return d.value},argPackAdvance:8,readValueFromPointer:oi(t,r,a),K:null}),$n(t,o)},_embind_register_enum_value:function(e,t,r){var a=Wt(e,"enum");t=xe(t),e=a.constructor,a=Object.create(a.constructor.prototype,{value:{value:r},constructor:{value:nn(`${a.name}_${t}`,function(){})}}),e.values[r]=a,e[t]=a},_embind_register_float:function(e,t,r){r=cn(r),t=xe(t),et(e,{name:t,fromWireType:function(a){return a},toWireType:function(a,o){return o},argPackAdvance:8,readValueFromPointer:si(t,r),K:null})},_embind_register_function:function(e,t,r,a,o,s){var d=hn(t,r);e=xe(e),o=Fe(a,o),$n(e,function(){lt(`Cannot call ${e} due to unbound types`,d)},t-1),$e([],d,function(m){return Ur(e,dn(e,[m[0],null].concat(m.slice(1)),null,o,s),t-1),[]})},_embind_register_integer:function(e,t,r,a,o){t=xe(t),o===-1&&(o=4294967295),o=cn(r);var s=m=>m;if(a===0){var d=32-8*r;s=m=>m<>>d}r=t.includes("unsigned")?function(m,y){return y>>>0}:function(m,y){return y},et(e,{name:t,fromWireType:s,toWireType:r,argPackAdvance:8,readValueFromPointer:ui(t,o,a!==0),K:null})},_embind_register_memory_view:function(e,t,r){function a(s){s>>=2;var d=W;return new o(d.buffer,d[s+1],d[s])}var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];r=xe(r),et(e,{name:r,fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{fc:!0})},_embind_register_std_string:function(e,t){t=xe(t);var r=t==="std::string";et(e,{name:t,fromWireType:function(a){var o=W[a>>2],s=a+4;if(r)for(var d=s,m=0;m<=o;++m){var y=s+m;if(m==o||v[y]==0){if(d=d?vt(v,d,y-d):"",p===void 0)var p=d;else p+=String.fromCharCode(0),p+=d;d=y+1}}else{for(p=Array(o),m=0;m>2]=d,r&&s)pr(o,v,y,d+1);else if(s)for(s=0;sb,m=1;else t===4&&(a=di,o=hi,s=pi,d=()=>W,m=2);et(e,{name:r,fromWireType:function(y){for(var p,O=W[y>>2],j=d(),$=y+4,h=0;h<=O;++h){var P=y+4+h*t;h!=O&&j[P>>m]!=0||($=a($,P-$),p===void 0?p=$:(p+=String.fromCharCode(0),p+=$),$=P+t)}return ft(y),p},toWireType:function(y,p){typeof p!="string"&&J(`Cannot pass non-string to C++ string type ${r}`);var O=s(p),j=Xn(4+O+t);return W[j>>2]=O>>m,o(p,j+4,O+t),y!==null&&y.push(ft,j),j},argPackAdvance:8,readValueFromPointer:$t,K:function(y){ft(y)}})},_embind_register_value_object:function(e,t,r,a,o,s){sn[e]={name:xe(t),Qa:Fe(r,a),X:Fe(o,s),fb:[]}},_embind_register_value_object_field:function(e,t,r,a,o,s,d,m,y,p){sn[e].fb.push({Xb:xe(t),cc:r,ac:Fe(a,o),bc:s,zc:d,yc:Fe(m,y),Ac:p})},_embind_register_void:function(e,t){t=xe(t),et(e,{mc:!0,name:t,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},_emval_as:function(e,t,r){e=Ke(e),t=Wt(t,"emval::as");var a=[],o=Qe(a);return W[r>>2]=o,t.toWireType(a,e)},_emval_call_method:function(e,t,r,a,o){e=mn[e],t=Ke(t),r=pn(r);var s=[];return W[a>>2]=Qe(s),e(t,r,s,o)},_emval_call_void_method:function(e,t,r,a){e=mn[e],t=Ke(t),r=pn(r),e(t,r,null,a)},_emval_decref:zn,_emval_get_method_caller:function(e,t){var r=gi(e,t),a=r[0];t=a.name+"_$"+r.slice(1).map(function(d){return d.name}).join("_")+"$";var o=Hr[t];if(o!==void 0)return o;var s=Array(e-1);return o=vi((d,m,y,p)=>{for(var O=0,j=0;j{Be("")},emscripten_asm_const_int:(e,t,r)=>{Hn.length=0;var a;for(r>>=2;a=v[t++];)r+=a!=105&r,Hn.push(a==105?_[r]:Y[r++>>1]),++r;return at[e].apply(null,Hn)},emscripten_memcpy_big:(e,t,r)=>v.copyWithin(e,t,t+r),emscripten_resize_heap:e=>{var t=v.length;if(e>>>=0,2147483648=r;r*=2){var a=t*(1+.2/r);a=Math.min(a,e+100663296);var o=Math;a=Math.max(e,a);e:{o=o.min.call(o,2147483648,a+(65536-a%65536)%65536)-i.buffer.byteLength+65535>>>16;try{i.grow(o),he();var s=1;break e}catch{}s=void 0}if(s)return!0}return!1},environ_get:(e,t)=>{var r=0;return Yr().forEach(function(a,o){var s=t+r;for(o=W[e+4*o>>2]=s,s=0;s>0]=a.charCodeAt(s);g[o>>0]=0,r+=a.length+1}),0},environ_sizes_get:(e,t)=>{var r=Yr();W[e>>2]=r.length;var a=0;return r.forEach(function(o){a+=o.length+1}),W[t>>2]=a,0},fd_close:function(e){try{var t=ot(e);if(t.Z===null)throw new U(8);t.Na&&(t.Na=null);try{t.m.close&&t.m.close(t)}catch(r){throw r}finally{Jt[t.Z]=null}return t.Z=null,0}catch(r){if(typeof yt>"u"||r.name!=="ErrnoError")throw r;return r.Y}},fd_read:function(e,t,r,a){try{e:{var o=ot(e);e=t;for(var s,d=t=0;d>2],y=W[e+4>>2];e+=8;var p=o,O=m,j=y,$=s,h=g;if(0>j||0>$)throw new U(28);if(p.Z===null)throw new U(8);if((p.flags&2097155)===1)throw new U(8);if((p.node.mode&61440)===16384)throw new U(31);if(!p.m.read)throw new U(28);var P=typeof $<"u";if(P){if(!p.seekable)throw new U(70)}else $=p.position;var S=p.m.read(p,h,O,j,$);P||(p.position+=S);var Z=S;if(0>Z){var te=-1;break e}if(t+=Z,Z>2]=te,0}catch(F){if(typeof yt>"u"||F.name!=="ErrnoError")throw F;return F.Y}},fd_seek:function(e,t,r,a,o){t=r+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*r:NaN;try{if(isNaN(t))return 61;var s=ot(e);return Sr(s,t,a),ge=[s.position>>>0,(G=s.position,1<=+Math.abs(G)?0>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],_[o>>2]=ge[0],_[o+4>>2]=ge[1],s.Na&&t===0&&a===0&&(s.Na=null),0}catch(d){if(typeof yt>"u"||d.name!=="ErrnoError")throw d;return d.Y}},fd_write:function(e,t,r,a){try{e:{var o=ot(e);e=t;for(var s,d=t=0;d>2],y=W[e+4>>2];e+=8;var p=o,O=m,j=y,$=s,h=g;if(0>j||0>$)throw new U(28);if(p.Z===null)throw new U(8);if(!(p.flags&2097155))throw new U(8);if((p.node.mode&61440)===16384)throw new U(31);if(!p.m.write)throw new U(28);p.seekable&&p.flags&1024&&Sr(p,0,2);var P=typeof $<"u";if(P){if(!p.seekable)throw new U(70)}else $=p.position;var S=p.m.write(p,h,O,j,$,void 0);P||(p.position+=S);var Z=S;if(0>Z){var te=-1;break e}t+=Z,typeof s<"u"&&(s+=Z)}te=t}return W[a>>2]=te,0}catch(F){if(typeof yt>"u"||F.name!=="ErrnoError")throw F;return F.Y}},strftime_l:(e,t,r,a)=>yi(e,t,r,a)};(function(){function e(r){if(c=r=r.exports,i=c.memory,he(),be=c.__indirect_function_table,Oe.unshift(c.__wasm_call_ctors),We--,f.monitorRunDependencies&&f.monitorRunDependencies(We),We==0&&(Ue!==null&&(clearInterval(Ue),Ue=null),He)){var a=He;He=null,a()}return r}var t={env:Jr,wasi_snapshot_preview1:Jr};if(We++,f.monitorRunDependencies&&f.monitorRunDependencies(We),f.instantiateWasm)try{return f.instantiateWasm(t,e)}catch(r){Ce("Module.instantiateWasm callback failed with error: "+r),q(r)}return Ye(t,function(r){e(r.instance)}).catch(q),{}})();var ft=e=>(ft=c.free)(e),Xn=e=>(Xn=c.malloc)(e),Zr=f._ma_device__on_notification_unlocked=e=>(Zr=f._ma_device__on_notification_unlocked=c.ma_device__on_notification_unlocked)(e);f._ma_malloc_emscripten=(e,t)=>(f._ma_malloc_emscripten=c.ma_malloc_emscripten)(e,t),f._ma_free_emscripten=(e,t)=>(f._ma_free_emscripten=c.ma_free_emscripten)(e,t);var Qr=f._ma_device_process_pcm_frames_capture__webaudio=(e,t,r)=>(Qr=f._ma_device_process_pcm_frames_capture__webaudio=c.ma_device_process_pcm_frames_capture__webaudio)(e,t,r),ea=f._ma_device_process_pcm_frames_playback__webaudio=(e,t,r)=>(ea=f._ma_device_process_pcm_frames_playback__webaudio=c.ma_device_process_pcm_frames_playback__webaudio)(e,t,r),ta=()=>(ta=c.__errno_location)(),na=e=>(na=c.__getTypeName)(e);f.__embind_initialize_bindings=()=>(f.__embind_initialize_bindings=c._embind_initialize_bindings)(),f.dynCall_iiji=(e,t,r,a,o)=>(f.dynCall_iiji=c.dynCall_iiji)(e,t,r,a,o),f.dynCall_iiiji=(e,t,r,a,o,s)=>(f.dynCall_iiiji=c.dynCall_iiiji)(e,t,r,a,o,s),f.dynCall_jiji=(e,t,r,a,o)=>(f.dynCall_jiji=c.dynCall_jiji)(e,t,r,a,o),f.dynCall_iij=(e,t,r,a)=>(f.dynCall_iij=c.dynCall_iij)(e,t,r,a),f.dynCall_jii=(e,t,r)=>(f.dynCall_jii=c.dynCall_jii)(e,t,r),f.dynCall_viijii=(e,t,r,a,o,s,d)=>(f.dynCall_viijii=c.dynCall_viijii)(e,t,r,a,o,s,d),f.dynCall_iiiiij=(e,t,r,a,o,s,d)=>(f.dynCall_iiiiij=c.dynCall_iiiiij)(e,t,r,a,o,s,d),f.dynCall_iiiiijj=(e,t,r,a,o,s,d,m,y)=>(f.dynCall_iiiiijj=c.dynCall_iiiiijj)(e,t,r,a,o,s,d,m,y),f.dynCall_iiiiiijj=(e,t,r,a,o,s,d,m,y,p)=>(f.dynCall_iiiiiijj=c.dynCall_iiiiiijj)(e,t,r,a,o,s,d,m,y,p);var yn;He=function e(){yn||ra(),yn||(He=e)};function ra(){function e(){if(!yn&&(yn=!0,f.calledRun=!0,!ye)){if(f.noFSInit||br||(br=!0,Mr(),f.stdin=f.stdin,f.stdout=f.stdout,f.stderr=f.stderr,f.stdin?kt("stdin",f.stdin):kn("/dev/tty","/dev/stdin"),f.stdout?kt("stdout",null,f.stdout):kn("/dev/tty","/dev/stdout"),f.stderr?kt("stderr",null,f.stderr):kn("/dev/tty1","/dev/stderr"),tn("/dev/stdin",0),tn("/dev/stdout",1),tn("/dev/stderr",1)),_r=!1,Xe(Oe),k(f),f.onRuntimeInitialized&&f.onRuntimeInitialized(),f.postRun)for(typeof f.postRun=="function"&&(f.postRun=[f.postRun]);f.postRun.length;){var t=f.postRun.shift();Ze.unshift(t)}Xe(Ze)}}if(!(0{A.exports=JSON.parse(`{"name":"@rive-app/canvas","version":"2.13.2","description":"Rive's canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso (https://rive.app)","Maxwell Talbot (https://rive.app)","Arthur Vivian (https://rive.app)","Umberto Sonnino (https://rive.app)","Matthew Sullivan (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)},(A,R,I)=>{I.r(R),I.d(R,{BLANK_URL:()=>N.BLANK_URL,registerTouchInteractions:()=>X.registerTouchInteractions,sanitizeUrl:()=>N.sanitizeUrl});var X=I(4),N=I(5)},(A,R,I)=>{I.r(R),I.d(R,{registerTouchInteractions:()=>D});var X=void 0,N=function(M,k){var q,f;return["touchstart","touchmove"].indexOf(M.type)>-1&&(!((q=M.touches)===null||q===void 0)&&q.length)?(k||M.preventDefault(),{clientX:M.touches[0].clientX,clientY:M.touches[0].clientY}):M.type==="touchend"&&(!((f=M.changedTouches)===null||f===void 0)&&f.length)?{clientX:M.changedTouches[0].clientX,clientY:M.changedTouches[0].clientY}:{clientX:M.clientX,clientY:M.clientY}},D=function(M){var k=M.canvas,q=M.artboard,f=M.stateMachines,H=f===void 0?[]:f,ce=M.renderer,ee=M.rive,_e=M.fit,fe=M.alignment,V=M.isTouchScrollEnabled,le=V!==void 0&&V;if(!k||!H.length||!ce||!ee||!q||typeof L>"u")return null;var Ae=function(K){var pe=K.currentTarget.getBoundingClientRect(),me=N(K,le),Te=me.clientX,Me=me.clientY;if(Te||Me){var Ce=Te-pe.left,l=Me-pe.top,i=ee.computeAlignment(_e,fe,{minX:0,minY:0,maxX:pe.width,maxY:pe.height},q.bounds),c=new ee.Mat2D;i.invert(c);var g=new ee.Vec2D(Ce,l),v=ee.mapXY(c,g),C=v.x(),b=v.y();switch(v.delete(),c.delete(),g.delete(),i.delete(),K.type){case"mouseout":for(var _=0,W=H;_{I.r(R),I.d(R,{BLANK_URL:()=>f,sanitizeUrl:()=>ee});var X=/^([^\w]*)(javascript|data|vbscript)/im,N=/&#(\w+)(^\w|;)?/g,D=/&(newline|tab);/gi,M=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,k=/^.+(:|:)/gim,q=[".","/"],f="about:blank";function H(_e){return q.indexOf(_e[0])>-1}function ce(_e){var fe=_e.replace(M,"");return fe.replace(N,function(V,le){return String.fromCharCode(le)})}function ee(_e){if(!_e)return f;var fe=ce(_e).replace(D,"").replace(M,"").trim();if(!fe)return f;if(H(fe))return fe;var V=fe.match(k);if(!V)return fe;var le=V[0];return X.test(le)?f:fe}}],w={};function T(A){var R=w[A];if(R!==void 0)return R.exports;var I=w[A]={exports:{}};return u[A](I,I.exports,T),I.exports}T.d=(A,R)=>{for(var I in R)T.o(R,I)&&!T.o(A,I)&&Object.defineProperty(A,I,{enumerable:!0,get:R[I]})},T.o=(A,R)=>Object.prototype.hasOwnProperty.call(A,R),T.r=A=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})};var E={};return(()=>{T.r(E),T.d(E,{Alignment:()=>M,EventType:()=>V,Fit:()=>D,Layout:()=>k,LoopType:()=>le,Rive:()=>K,RiveEventType:()=>ee,RuntimeLoader:()=>q,StateMachineInput:()=>ce,StateMachineInputType:()=>H,Testing:()=>Te,decodeFont:()=>Ce,decodeImage:()=>Me});var A=T(1),R=T(2),I=T(3),X=function(l,i,c,g){function v(C){return C instanceof c?C:new c(function(b){b(C)})}return new(c||(c=Promise))(function(C,b){function _(Y){try{B(g.next(Y))}catch(ye){b(ye)}}function W(Y){try{B(g.throw(Y))}catch(ye){b(ye)}}function B(Y){Y.done?C(Y.value):v(Y.value).then(_,W)}B((g=g.apply(l,i||[])).next())})},N=function(l,i){var c,g,v,C,b={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]};return C={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this||n}),C;function _(B){return function(Y){return W([B,Y])}}function W(B){if(c)throw new TypeError("Generator is already executing.");for(;C&&(C=0,B[0]&&(b=0)),b;)try{if(c=1,g&&(v=B[0]&2?g.return:B[0]?g.throw||((v=g.return)&&v.call(g),0):g.next)&&!(v=v.call(g,B[1])).done)return v;switch(g=0,v&&(B=[B[0]&2,v.value]),B[0]){case 0:case 1:v=B;break;case 4:return b.label++,{value:B[1],done:!1};case 5:b.label++,g=B[1],B=[0];continue;case 7:B=b.ops.pop(),b.trys.pop();continue;default:if(v=b.trys,!(v=v.length>0&&v[v.length-1])&&(B[0]===6||B[0]===2)){b=0;continue}if(B[0]===3&&(!v||B[1]>v[0]&&B[1]0;)(c=l.callBackQueue.shift())===null||c===void 0||c(l.runtime)}).catch(function(){var i="https://cdn.jsdelivr.net/npm/".concat(R.name,"@").concat(R.version,"/rive.wasm");l.wasmURL.toLowerCase()!==i?(console.warn("Failed to load WASM from ".concat(l.wasmURL,", trying jsdelivr as a backup")),l.setWasmUrl(i),l.loadRuntime()):console.error("Could not load Rive WASM file from unpkg or jsdelivr, network connection may be down, or you may need to call set a new WASM source via RuntimeLoader.setWasmUrl() and call RuntimeLoader.loadRuntime() again")})},l.getInstance=function(i){l.isLoading||(l.isLoading=!0,l.loadRuntime()),l.runtime?i(l.runtime):l.callBackQueue.push(i)},l.awaitInstance=function(){return new Promise(function(i){return l.getInstance(function(c){return i(c)})})},l.setWasmUrl=function(i){l.wasmURL=i},l.isLoading=!1,l.callBackQueue=[],l.wasmURL="https://unpkg.com/".concat(R.name,"@").concat(R.version,"/rive.wasm"),l}(),f=function(){function l(i,c,g,v){(this||n).animation=i,(this||n).artboard=c,(this||n).playing=v,(this||n).loopCount=0,(this||n).scrubTo=null,(this||n).instance=new g.LinearAnimationInstance(i,c)}return Object.defineProperty(l.prototype,"name",{get:function(){return(this||n).animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"time",{get:function(){return(this||n).instance.time},set:function(i){(this||n).instance.time=i},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"loopValue",{get:function(){return(this||n).animation.loopValue},enumerable:!1,configurable:!0}),l.prototype.advance=function(i){(this||n).scrubTo===null?(this||n).instance.advance(i):((this||n).instance.time=0,(this||n).instance.advance((this||n).scrubTo),(this||n).scrubTo=null)},l.prototype.apply=function(i){(this||n).instance.apply(i)},Object.defineProperty(l.prototype,"needsScrub",{get:function(){return(this||n).scrubTo!==null},enumerable:!1,configurable:!0}),l.prototype.cleanup=function(){(this||n).instance.delete()},l}(),H;(function(l){l[l.Number=56]="Number",l[l.Trigger=58]="Trigger",l[l.Boolean=59]="Boolean"})(H||(H={}));var ce=function(){function l(i,c){(this||n).type=i,(this||n).runtimeInput=c}return Object.defineProperty(l.prototype,"name",{get:function(){return(this||n).runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"value",{get:function(){return(this||n).runtimeInput.value},set:function(i){(this||n).runtimeInput.value=i},enumerable:!1,configurable:!0}),l.prototype.fire=function(){(this||n).type===H.Trigger&&(this||n).runtimeInput.fire()},l}(),ee;(function(l){l[l.General=128]="General",l[l.OpenUrl=131]="OpenUrl"})(ee||(ee={}));var _e=function(){function l(i,c,g,v){(this||n).stateMachine=i,(this||n).playing=g,(this||n).artboard=v,(this||n).inputs=[],(this||n).instance=new c.StateMachineInstance(i,v),this.initInputs(c)}return Object.defineProperty(l.prototype,"name",{get:function(){return(this||n).stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"statesChanged",{get:function(){for(var i=[],c=0;c<(this||n).instance.stateChangedCount();c++)i.push((this||n).instance.stateChangedNameByIndex(c));return i},enumerable:!1,configurable:!0}),l.prototype.advance=function(i){(this||n).instance.advance(i)},l.prototype.reportedEventCount=function(){return(this||n).instance.reportedEventCount()},l.prototype.reportedEventAt=function(i){return(this||n).instance.reportedEventAt(i)},l.prototype.initInputs=function(i){for(var c=0;c<(this||n).instance.inputCount();c++){var g=(this||n).instance.input(c);(this||n).inputs.push(this.mapRuntimeInput(g,i))}},l.prototype.mapRuntimeInput=function(i,c){return i.type===c.SMIInput.bool?new ce(H.Boolean,i.asBool()):i.type===c.SMIInput.number?new ce(H.Number,i.asNumber()):i.type===c.SMIInput.trigger?new ce(H.Trigger,i.asTrigger()):void 0},l.prototype.cleanup=function(){(this||n).instance.delete()},l}(),fe=function(){function l(i,c,g,v,C){v===void 0&&(v=[]),C===void 0&&(C=[]),(this||n).runtime=i,(this||n).artboard=c,(this||n).eventManager=g,(this||n).animations=v,(this||n).stateMachines=C}return l.prototype.add=function(i,c,g){if(g===void 0&&(g=!0),i=me(i),i.length===0)(this||n).animations.forEach(function(be){return be.playing=c}),(this||n).stateMachines.forEach(function(be){return be.playing=c});else for(var v=(this||n).animations.map(function(be){return be.name}),C=(this||n).stateMachines.map(function(be){return be.name}),b=0;b=0||W>=0)_>=0?(this||n).animations[_].playing=c:(this||n).stateMachines[W].playing=c;else{var B=(this||n).artboard.animationByName(i[b]);if(B){var Y=new f(B,(this||n).artboard,(this||n).runtime,c);Y.advance(0),Y.apply(1),(this||n).animations.push(Y)}else{var ye=(this||n).artboard.stateMachineByName(i[b]);if(ye){var he=new _e(ye,(this||n).runtime,c,(this||n).artboard);(this||n).stateMachines.push(he)}}}}return g&&(c?(this||n).eventManager.fire({type:V.Play,data:(this||n).playing}):(this||n).eventManager.fire({type:V.Pause,data:(this||n).paused})),c?(this||n).playing:(this||n).paused},l.prototype.initLinearAnimations=function(i,c){for(var g=(this||n).animations.map(function(W){return W.name}),v=0;v=0)(this||n).animations[C].playing=c;else{var b=(this||n).artboard.animationByName(i[v]);if(b){var _=new f(b,(this||n).artboard,(this||n).runtime,c);_.advance(0),_.apply(1),(this||n).animations.push(_)}}}},l.prototype.initStateMachines=function(i,c){for(var g=(this||n).stateMachines.map(function(W){return W.name}),v=0;v=0)(this||n).stateMachines[C].playing=c;else{var b=(this||n).artboard.stateMachineByName(i[v]);if(b){var _=new _e(b,(this||n).runtime,c,(this||n).artboard);(this||n).stateMachines.push(_)}else this.initLinearAnimations([i[v]],c)}}},l.prototype.play=function(i){return this.add(i,!0)},l.prototype.pause=function(i){return this.add(i,!1)},l.prototype.scrub=function(i,c){var g=(this||n).animations.filter(function(v){return i.includes(v.name)});return g.forEach(function(v){return v.scrubTo=c}),g.map(function(v){return v.name})},Object.defineProperty(l.prototype,"playing",{get:function(){return(this||n).animations.filter(function(i){return i.playing}).map(function(i){return i.name}).concat((this||n).stateMachines.filter(function(i){return i.playing}).map(function(i){return i.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"paused",{get:function(){return(this||n).animations.filter(function(i){return!i.playing}).map(function(i){return i.name}).concat((this||n).stateMachines.filter(function(i){return!i.playing}).map(function(i){return i.name}))},enumerable:!1,configurable:!0}),l.prototype.stop=function(i){var c=this||n;i=me(i);var g=[];if(i.length===0)g=(this||n).animations.map(function(b){return b.name}).concat((this||n).stateMachines.map(function(b){return b.name})),(this||n).animations.forEach(function(b){return b.cleanup()}),(this||n).stateMachines.forEach(function(b){return b.cleanup()}),(this||n).animations.splice(0,(this||n).animations.length),(this||n).stateMachines.splice(0,(this||n).stateMachines.length);else{var v=(this||n).animations.filter(function(b){return i.includes(b.name)});v.forEach(function(b){b.cleanup(),c.animations.splice(c.animations.indexOf(b),1)});var C=(this||n).stateMachines.filter(function(b){return i.includes(b.name)});C.forEach(function(b){b.cleanup(),c.stateMachines.splice(c.stateMachines.indexOf(b),1)}),g=v.map(function(b){return b.name}).concat(C.map(function(b){return b.name}))}return(this||n).eventManager.fire({type:V.Stop,data:g}),g},Object.defineProperty(l.prototype,"isPlaying",{get:function(){return(this||n).animations.reduce(function(i,c){return i||c.playing},!1)||(this||n).stateMachines.reduce(function(i,c){return i||c.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isPaused",{get:function(){return!(this||n).isPlaying&&((this||n).animations.length>0||(this||n).stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isStopped",{get:function(){return(this||n).animations.length===0&&(this||n).stateMachines.length===0},enumerable:!1,configurable:!0}),l.prototype.atLeastOne=function(i,c){c===void 0&&(c=!0);var g;return(this||n).animations.length===0&&(this||n).stateMachines.length===0&&((this||n).artboard.animationCount()>0?this.add([g=(this||n).artboard.animationByIndex(0).name],i,c):(this||n).artboard.stateMachineCount()>0&&this.add([g=(this||n).artboard.stateMachineByIndex(0).name],i,c)),g},l.prototype.handleLooping=function(){for(var i=0,c=(this||n).animations.filter(function(v){return v.playing});i1&&((this||n).eventManager.fire({type:V.Loop,data:{animation:g.name,type:le.PingPong}}),g.loopCount=0)}},l.prototype.handleStateChanges=function(){for(var i=[],c=0,g=(this||n).stateMachines.filter(function(C){return C.playing});c0&&(this||n).eventManager.fire({type:V.StateChange,data:i})},l.prototype.handleAdvancing=function(i){(this||n).eventManager.fire({type:V.Advance,data:i})},l}(),V;(function(l){l.Load="load",l.LoadError="loaderror",l.Play="play",l.Pause="pause",l.Stop="stop",l.Loop="loop",l.Draw="draw",l.Advance="advance",l.StateChange="statechange",l.RiveEvent="riveevent"})(V||(V={}));var le;(function(l){l.OneShot="oneshot",l.Loop="loop",l.PingPong="pingpong"})(le||(le={}));var Ae=function(){function l(i){i===void 0&&(i=[]),(this||n).listeners=i}return l.prototype.getListeners=function(i){return(this||n).listeners.filter(function(c){return c.type===i})},l.prototype.add=function(i){(this||n).listeners.includes(i)||(this||n).listeners.push(i)},l.prototype.remove=function(i){for(var c=0;c<(this||n).listeners.length;c++){var g=(this||n).listeners[c];if(g.type===i.type&&g.callback===i.callback){(this||n).listeners.splice(c,1);break}}},l.prototype.removeAll=function(i){var c=this||n;i?(this||n).listeners.filter(function(g){return g.type===i}).forEach(function(g){return c.remove(g)}):(this||n).listeners.splice(0,(this||n).listeners.length)},l.prototype.fire=function(i){var c=this.getListeners(i.type);c.forEach(function(g){return g.callback(i)})},l}(),re=function(){function l(i){(this||n).eventManager=i,(this||n).queue=[]}return l.prototype.add=function(i){(this||n).queue.push(i)},l.prototype.process=function(){for(;(this||n).queue.length>0;){var i=(this||n).queue.shift();i?.action&&i.action(),i?.event&&(this||n).eventManager.fire(i.event)}},l}(),K=function(){function l(i){var c;(this||n).loaded=!1,(this||n).readyForPlaying=!1,(this||n).artboard=null,(this||n).eventCleanup=null,(this||n).shouldDisableRiveListeners=!1,(this||n).automaticallyHandleEvents=!1,(this||n).enableRiveAssetCDN=!0,(this||n).durations=[],(this||n).frameTimes=[],(this||n).frameCount=0,(this||n).isTouchScrollEnabled=!1,(this||n).renderSecondTimer=0,(this||n).canvas=i.canvas,(this||n).src=i.src,(this||n).buffer=i.buffer,(this||n).layout=(c=i.layout)!==null&&c!==void 0?c:new k,(this||n).shouldDisableRiveListeners=!!i.shouldDisableRiveListeners,(this||n).isTouchScrollEnabled=!!i.isTouchScrollEnabled,(this||n).automaticallyHandleEvents=!!i.automaticallyHandleEvents,(this||n).enableRiveAssetCDN=i.enableRiveAssetCDN===void 0||i.enableRiveAssetCDN,(this||n).eventManager=new Ae,i.onLoad&&this.on(V.Load,i.onLoad),i.onLoadError&&this.on(V.LoadError,i.onLoadError),i.onPlay&&this.on(V.Play,i.onPlay),i.onPause&&this.on(V.Pause,i.onPause),i.onStop&&this.on(V.Stop,i.onStop),i.onLoop&&this.on(V.Loop,i.onLoop),i.onStateChange&&this.on(V.StateChange,i.onStateChange),i.onAdvance&&this.on(V.Advance,i.onAdvance),i.onload&&!i.onLoad&&this.on(V.Load,i.onload),i.onloaderror&&!i.onLoadError&&this.on(V.LoadError,i.onloaderror),i.onplay&&!i.onPlay&&this.on(V.Play,i.onplay),i.onpause&&!i.onPause&&this.on(V.Pause,i.onpause),i.onstop&&!i.onStop&&this.on(V.Stop,i.onstop),i.onloop&&!i.onLoop&&this.on(V.Loop,i.onloop),i.onstatechange&&!i.onStateChange&&this.on(V.StateChange,i.onstatechange),i.assetLoader&&((this||n).assetLoader=i.assetLoader),(this||n).taskQueue=new re((this||n).eventManager),this.init({src:(this||n).src,buffer:(this||n).buffer,autoplay:i.autoplay,animations:i.animations,stateMachines:i.stateMachines,artboard:i.artboard,useOffscreenRenderer:i.useOffscreenRenderer})}return l.new=function(i){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new l(i)},l.prototype.init=function(i){var c=this||n,g=i.src,v=i.buffer,C=i.animations,b=i.stateMachines,_=i.artboard,W=i.autoplay,B=W!==void 0&&W,Y=i.useOffscreenRenderer,ye=Y!==void 0&&Y;if((this||n).src=g,(this||n).buffer=v,!(this||n).src&&!(this||n).buffer)throw new Error(l.missingErrorMessage);var he=me(C),be=me(b);(this||n).loaded=!1,(this||n).readyForPlaying=!1,q.awaitInstance().then(function(Pe){c.runtime=Pe,c.renderer=c.runtime.makeRenderer(c.canvas,ye),c.canvas.width||c.canvas.height||c.resizeDrawingSurfaceToCanvas(),c.initData(_,he,be,B).then(function(){return c.setupRiveListeners()}).catch(function(Oe){console.error(Oe)})}).catch(function(Pe){console.error(Pe)})},l.prototype.setupRiveListeners=function(i){var c=this||n;if(!(this||n).shouldDisableRiveListeners){var g=((this||n).animator.stateMachines||[]).filter(function(C){return C.playing&&c.runtime.hasListeners(C.instance)}).map(function(C){return C.instance}),v=(this||n).isTouchScrollEnabled;i&&"isTouchScrollEnabled"in i&&(v=i.isTouchScrollEnabled),(this||n).eventCleanup=(0,I.registerTouchInteractions)({canvas:(this||n).canvas,artboard:(this||n).artboard,stateMachines:g,renderer:(this||n).renderer,rive:(this||n).runtime,fit:(this||n)._layout.runtimeFit((this||n).runtime),alignment:(this||n)._layout.runtimeAlignment((this||n).runtime),isTouchScrollEnabled:v})}},l.prototype.removeRiveListeners=function(){(this||n).eventCleanup&&this.eventCleanup()},l.prototype.initData=function(i,c,g,v){var C;return X(this||n,void 0,void 0,function(){var b,_,W,B;return N(this||n,function(Y){switch(Y.label){case 0:return(this||n).src?(b=this||n,[4,pe((this||n).src)]):[3,2];case 1:b.buffer=Y.sent(),Y.label=2;case 2:return(this||n).assetLoader&&(_=new(this||n).runtime.CustomFileAssetLoader({loadContents:(this||n).assetLoader})),W=this||n,[4,(this||n).runtime.load(new Uint8Array((this||n).buffer),_,(this||n).enableRiveAssetCDN)];case 3:return W.file=Y.sent(),(this||n).file?(this.initArtboard(i,c,g,v),(this||n).loaded=!0,(this||n).eventManager.fire({type:V.Load,data:(C=(this||n).src)!==null&&C!==void 0?C:"buffer"}),(this||n).readyForPlaying=!0,(this||n).taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(B="Problem loading file; may be corrupt!",console.warn(B),(this||n).eventManager.fire({type:V.LoadError,data:B}),[2,Promise.reject(B)])}})})},l.prototype.initArtboard=function(i,c,g,v){var C=i?(this||n).file.artboardByName(i):(this||n).file.defaultArtboard();if(C){if((this||n).artboard=C,(this||n).artboard.animationCount()<1)throw _="Artboard has no animations",(this||n).eventManager.fire({type:V.LoadError,data:_}),_;(this||n).animator=new fe((this||n).runtime,(this||n).artboard,(this||n).eventManager);var b;c.length>0||g.length>0?(b=c.concat(g),(this||n).animator.initLinearAnimations(c,v),(this||n).animator.initStateMachines(g,v)):b=[(this||n).animator.atLeastOne(v,!1)],(this||n).taskQueue.add({event:{type:v?V.Play:V.Pause,data:b}})}else{var _="Invalid artboard name or no default artboard";console.warn(_),(this||n).eventManager.fire({type:V.LoadError,data:_})}},l.prototype.drawFrame=function(){this.startRendering()},l.prototype.draw=function(i,c){var g=performance.now();(this||n).frameRequestId=null,(this||n).lastRenderTime||((this||n).lastRenderTime=i),(this||n).renderSecondTimer+=i-(this||n).lastRenderTime,(this||n).renderSecondTimer>5e3&&((this||n).renderSecondTimer=0,c?.());var v=(i-(this||n).lastRenderTime)/1e3;(this||n).lastRenderTime=i;for(var C=(this||n).animator.animations.filter(function(De){return De.playing||De.needsScrub}).sort(function(De){return De.needsScrub?-1:1}),b=0,_=C;b<_.length;b++){var W=_[b];W.advance(v),W.instance.didLoop&&(W.loopCount+=1),W.apply(1)}for(var B=(this||n).animator.stateMachines.filter(function(De){return De.playing}),Y=0,ye=B;Y