1import{n as e,t}from"./chunks/rolldown-runtime.Dz1u4gWK.js";import{J as n,K as r,Q as i,Rt as a,Ut as o,Wt as s,Y as c,Z as l,et as u,ft as d,ht as f,it as p,nt as m,o as h,pt as g,qt as _,st as v,tt as y,yt as b}from"./chunks/framework.D4uVKm_y.js";import{l as x,n as S}from"./chunks/theme.DEY1Z9if.js";var C={class:`bg-primary`,"data-theme":`dark`},w={class:`wrapper`},T={class:`relative w-full`},E=[`src`],D={class:`relative z-10 w-full sm:w-2xl flex flex-col justify-start items-center gap-5 px-5 sm:px-0 py-10 md:py-30 mx-auto`},O={class:`text-center text-white text-balance drop-shadow-sm/70`},k={class:`text-white max-w-md text-balance text-center drop-shadow-sm/70`},A=[`href`],j=p({__name:`Footer`,props:{heading:{default:`Get Started`},subheading:{default:`Prepare for a development environment that can finally keep pace with the speed of your mind.`},buttonText:{default:`Get Started`},buttonLink:{default:`/guide/`}},setup(e){let{footerBg:t}=v(x);return(n,r)=>(f(),i(`footer`,C,[c(`section`,w,[c(`div`,T,[c(`img`,{src:o(t),alt:`Footer background`,inert:``,loading:`lazy`,class:`absolute inset-0 w-full h-full object-cover z-0`},null,8,E),c(`div`,D,[c(`h2`,O,_(e.heading),1),c(`p`,k,_(e.subheading),1),c(`a`,{href:e.buttonLink,class:`button button--white mt-5`},_(e.buttonText),9,A)])])]),m(S)]))}}),ee={class:`wrapper border-t px-5 sm:px-10 py-14 sm:py-28 flex flex-col justify-center gap-3 text-center items-center`},te={class:`text-white max-w-2xl text-balance text-center`},ne={key:0,class:`max-w-md text-white/70 text-balance sm:text-pretty`},re=p({__name:`HeadingSection`,props:{heading:{},subheading:{}},setup(e){return(t,n)=>(f(),i(`section`,ee,[c(`h2`,te,_(e.heading),1),e.subheading?(f(),i(`p`,ne,_(e.subheading),1)):l(``,!0)]))}}),ie={class:`wrapper wrapper--ticks border-t py-14 sm:py-30 px-10`},ae={class:`flex flex-col md:flex-row justify-between items-center gap-8 md:gap-20 text-center md:text-left md:pl-15`},M={class:`flex flex-col gap-3`},N={class:`text-white max-w-xl text-balance`},P={class:`max-w-lg text-white/70 text-balance`},F=[`href`],oe={class:`py-5 px-5 sm:px-10 border-b border-nickel`},se={class:`text-white/70 text-xs font-mono uppercase tracking-wide`},ce={key:0,class:`backers-grid px-5 sm:px-10 py-6`},le=[`href`],ue=[`src`,`alt`],de={class:`backer-tooltip`},fe=[`href`],pe=[`src`,`alt`],I={class:`spsr-name ml-5`},me={key:0,class:`grid grid-cols-1 lg:grid-cols-2 border-t border-nickel`},L={class:`border-b lg:border-b-0 lg:border-r border-nickel`},R={class:`py-5 px-5 sm:px-10 border-b border-nickel`},z={class:`text-white/70 text-xs font-mono uppercase tracking-wide`},B={class:`flex flex-col`},he=[`href`],ge=[`src`,`alt`],_e={class:`spsr-name ml-5`},V={class:`py-5 px-5 sm:px-10 border-b border-nickel`},ve={class:`text-white/70 text-xs font-mono uppercase tracking-wide`},ye={key:0,class:`backers-grid px-5 sm:px-10 py-6`},H=[`href`],U=[`src`,`alt`],be={class:`backer-tooltip`},W=[`href`],xe=[`src`,`alt`],Se={class:`spsr-name ml-5`},Ce=h(p({__name:`Sponsors`,props:{sponsors:{},heading:{default:`Free & open source`},description:{default:`Vite is MIT Licensed and will always be free and open source. This is made possible by our contributors and these companies:`},sponsorLink:{default:`https://github.com/sponsors/vitejs`},sponsorLinkText:{default:`Become a Sponsor`},sideBySideTiers:{},logoStyle:{}},setup(e){let t=e,a={big:{columns:3,padding:`py-16`,logoSize:`h-13 w-[220px]`},medium:{columns:5,padding:`py-7`,logoSize:`h-8 w-[120px]`},small:{columns:7,padding:`py-5`,logoSize:`h-6 w-[100px]`},avatar:{columns:15,padding:`py-3`,logoSize:`w-10 h-10`,avatarMode:!0}},o={1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-2 sm:grid-cols-3 lg:grid-cols-4`,5:`grid-cols-2 sm:grid-cols-3 lg:grid-cols-5`,6:`grid-cols-2 sm:grid-cols-3 lg:grid-cols-6`,7:`grid-cols-2 sm:grid-cols-4 lg:grid-cols-7`},u=(e,t)=>Math.min(a[e].columns,t),d=(e,t)=>o[u(e,t)]||`grid-cols-1`,p=(e,t)=>{let n=u(t,e),r=e%n;return r===0?0:n-r},m=(e,t=30)=>Math.max(0,Math.max(e,t)-e),h=n(()=>
1{if(!t.sponsors||!t.sideBySideTiers)return null;let[e,n]=t.sideBySideTiers,r=t.sponsors.find(t=>t.tier.toLowerCase()===e.toLowerCase()),i=t.sponsors.find(e=>e.tier.toLowerCase()===n.toLowerCase());return!r||!i?null:{left:r,right:i}}),g=n(()=>{if(!t.sponsors)return[];if(!t.sideBySideTiers)return t.sponsors;let e=t.sideBySideTiers.map(e=>e.toLowerCase());return t.sponsors.filter(t=>!e.includes(t.tier.toLowerCase()))});return(t,n)=>(f(),i(r,null,[c(`div`,ie,[c(`div`,ae,[c(`div`,M,[c(`h3`,N,_(e.heading),1),c(`p`,P,_(e.description),1),c(`a`,{href:e.sponsorLink,target:`_blank`,class:`button w-fit mt-8 mx-auto md:mx-0`},_(e.sponsorLinkText),9,F)]),n[0]||=c(`a`,{class:`flex gap-8 md:gap-12 items-start justify-center md:justify-start md:pr-25`,href:`https://voidzero.dev`,target:`_blank`},[c(`img`,{src:`/assets/vite-by-voidzero.D7bblMgo.png`,alt:`Brought to you by VoidZero`,class:`h-44 max-w-full object-contain mt-10 md:mt-0`})],-1)])]),e.sponsors&&e.sponsors.length>0?(f(),i(`div`,{key:0,class:s([`wrapper`,{"spsr-style-oc":e.logoStyle===`opencollective`}])},[(f(!0),i(r,null,b(g.value,(e,t)=>(f(),i(`div`,{key:t,class:`border-t border-nickel`},[c(`div`,oe,[c(`span`,se,_(e.tier),1)]),a[e.size].avatarMode?(f(),i(`div`,ce,[(f(!0),i(r,null,b(e.items,(e,t)=>(f(),i(`a`,{key:t,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`backer-avatar group relative`},[c(`img`,{src:e.img,alt:e.name,class:`w-10 h-10 rounded object-cover border border-nickel transition-all group-hover:border-white/50 group-hover:scale-110`},null,8,ue),c(`span`,de,_(e.name),1)],8,le))),128)),(f(!0),i(r,null,b(m(e.items.length),e=>(f(),i(`div`,{key:`empty-${e}`,class:`backer-avatar-placeholder`,"aria-hidden":`true`},[...n[1]||=[c(`div`,{class:`w-10 h-10 rounded border border-nickel/30`},null,-1)]]))),128))])):(f(),i(`div`,{key:1,class:s([`grid *:border-r *:border-b *:border-nickel`,d(e.size,e.items.length)])},[(f(!0),i(r,null,b(e.items,(t,n)=>(f(),i(`a`,{key:n,href:t.url,target:`_blank`,rel:`noopener noreferrer`,class:s([`spsr-link flex items-center justify-center px-8 transition-opacity opacity-85 hover:opacity-100`,a[e.size].padding])},[c(`img`,{src:t.img,alt:t.name,class:s([`spsr-logo object-contain`,a[e.size].logoSize])},null,10,pe),c(`span`,I,_(t.name),1)],10,fe))),128)),(f(!0),i(r,null,b(p(e.items.length,e.size),t=>(f(),i(`div`,{key:`empty-${t}`,class:s([`spsr-link flex items-center justify-center px-8`,a[e.size].padding]),"aria-hidden":`true`},null,2))),128))],2))]))),128)),h.value?(f(),i(`div`,me,[c(`div`,L,[c(`div`,R,[c(`span`,z,_(h.value.left.tier),1)]),c(`div`,B,[(f(!0),i(r,null,b(h.value.left.items,(e,t)=>(f(),i(`a`,{key:t,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`spsr-link flex items-center justify-center px-8 py-12 transition-opacity opacity-85 hover:opacity-100 border-b border-nickel last:border-b-0`},[c(`img`,{src:e.img,alt:e.name,class:s([`spsr-logo object-contain`,a[h.value.left.size].logoSize])},null,10,ge),c(`span`,_e,_(e.name),1)],8,he))),128))])]),c(`div`,null,[c(`div`,V,[c(`span`,ve,_(h.value.right.tier),1)]),a[h.value.right.size].avatarMode?(f(),i(`div`,ye,[(f(!0),i(r,null,b(h.value.right.items,(e,t)=>(f(),i(`a`,{key:t,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`backer-avatar group relative`},[c(`img`,{src:e.img,alt:e.name,class:`w-10 h-10 rounded object-cover border border-nickel transition-all group-hover:border-white/50 group-hover:scale-110`},null,8,U),c(`span`,be,_(e.name),1)],8,H))),128)),(f(!0),i(r,null,b(m(h.value.right.items.length),e=>(f(),i(`div`,{key:`empty-${e}`,class:`backer-avatar-placeholder`,"aria-hidden":`true`},[...n[2]||=[c(`div`,{class:`w-10 h-10 rounded border border-nickel/30`},null,-1)]]))),128))])):(f(),i(`div`,{key:1,class:s([`grid *:border-r *:border-b *:border-nickel`,d(h.value.right.size,h.value.right.items.length)])},[(f(!0),i(r,null,b(h.value.right.items,(e,t)=>(f(),i(`a`,{key:t,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:s([`spsr-link flex items-center justify-center px-8 transition-opacity opacity-85 hover:opacity-100`,a[h.value.right.size].padding])},[c(`img`,{src:e.img,alt:e.name,class:s([`spsr-logo object-contain`,a[h.value.right.size].logoSize])},null,10,xe),c(`span`,Se,_(e.name),1)],10,W))),128))],2))])])):l(``,!0)],2)):l(``,!0)],64))}}),[[`__scopeId`,`data-v-0985f1dc`]]),we={},Te={class:`wrapper wrapper--ticks border-t h-16 sm:h-30`};function Ee(e,t){return f(),i(`section`,Te)}var De=h(we,[[`render`,Ee]]),Oe=[{tier:`Special`,size:`big`,items:[{name:`Vercel`,url:`https://vercel.com`,img:`/vercel.svg`},{name:`Chromatic`,url:`https://www.chromatic.com/?utm_source=vitest&utm_medium=sponsorship&utm_campaign=vitestSponsorship`,img:`/chromatic.svg`},{name:`Zammad`,url:`https://zammad.com`,img:`/zammad.svg`}]},{tier:`Platinum Sponsors`,size:`big`,items:[{name:`Bolt`,url:`https://bolt.new`,img:`/bolt.svg`},{name:`Latitude`,url:`https://latitude.so/`,img:`/latitude.svg`}]},{tier:`Gold`,size:`medium`,items:[{name:`vital`,url:`https://vital.io/`,img:`/vital.svg`},{name:`Mailmeteor`,url:`https://mailmeteor.com/`,img:`/mailmeteor.svg`},{name:`Liminity`,url:`https://www.liminity.se/`,img:`/liminity.svg`},{name:`Kraken Tech`,url:`https://kraken.tech/`,img:`/kraken.svg`},{name:`Aerius Ventilation`,url:`https://aerius.se/`,img:`/aerius.png`},{name:`TestMu AI`,url:`https://www.testmuai.com/?utm_medium=sponsor&utm_source=vitest-dev`,img:`/testmuai.svg`}]}
1],ke=`/assets/640_x_300_esm.Cao-FgVD.riv`,G=`/assets/650_x_300_vite_powered.RYhwFQ4A.riv`,Ae=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.rive=r():n.rive=r()})(e,()=>(()=>{var e=[,((e,t,n)=>{n.r(t),n.d(t,{default:()=>r});let r=(()=>{var e=typeof document<`u`?document.currentScript?.src:void 0;return(function(t={}){var n,r=t,i,a,o=new Promise((e,t)=>{i=e,a=t}),s=typeof window==`object`,c=typeof importScripts==`function`;function l(){function e(e){let a=r;n=t=0,r=new Map,a.forEach(t=>{try{t(e)}catch(e){console.error(e)}}),this.ua(),i&&i.Oa()}let t=0,n=0,r=new Map,i=null,a=null;this.requestAnimationFrame=function(i){t||=requestAnimationFrame(e.bind(this));let a=++n;return r.set(a,i),a},this.cancelAnimationFrame=function(e){r.delete(e),t&&r.size==0&&(cancelAnimationFrame(t),t=0)},this.Ma=function(e){a&&=(document.body.remove(a),null),e||(a=document.createElement(`div`),a.style.backgroundColor=`black`,a.style.position=`fixed`,a.style.right=0,a.style.top=0,a.style.color=`white`,a.style.padding=`4px`,a.innerHTML=`RIVE FPS`,e=function(e){a.innerHTML=`RIVE FPS `+e.toFixed(1)},document.body.appendChild(a)),i=new function(){let t=0,n=0;this.Oa=function(){var r=performance.now();n?(++t,r-=n,1e3<r&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.Ja=function(){a&&=(document.body.remove(a),null),i=null},this.ua=function(){}}function u(e){console.assert(!0);let t=new Map,n=-1/0;this.push=function(r){return r=r+((1<<e)-1)>>e,t.has(r)&&clearTimeout(t.get(r)),t.set(r,setTimeout(function(){t.delete(r),t.length==0?n=-1/0:r==n&&(n=Math.max(...t.keys()),console.assert(n<r))},1e3)),n=Math.max(r,n),n<<e}}let d=r.onRuntimeInitialized;r.onRuntimeInitialized=function(){d&&d();let e=r.decodeAudio;r.decodeAudio=function(t,n){t=e(t),n(t)};let t=r.decodeFont;r.decodeFont=function(e,n){e=t(e),n(e)};let n=r.FileAssetLoader;r.ptrToAsset=e=>{let t=r.ptrToFileAsset(e);return t.isImage?r.ptrToImageAsset(e):t.isFont?r.ptrToFontAsset(e):t.isAudio?r.ptrToAudioAsset(e):t},r.CustomFileAssetLoader=n.extend(`CustomFileAssetLoader`,{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Da=e},loadContents:function(e,t){return e=r.ptrToAsset(e),this.Da(e,t)}}),r.CDNFileAssetLoader=n.extend(`CDNFileAssetLoader`,{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(e){let t=r.ptrToAsset(e);return e=t.cdnUuid,e===``?!1:((function(e,t){var n=new XMLHttpRequest;n.responseType=`arraybuffer`,n.onreadystatechange=function(){n.readyState==4&&n.status==200&&t(n)},n.open(`GET`,e,!0),n.send(null)})(t.cdnBaseUrl+`/`+e,e=>{t.decode(new Uint8Array(e.response))}),!0)}}),r.FallbackFileAssetLoader=n.extend(`FallbackFileAssetLoader`,{__construct:function(){this.__parent.__construct.call(this),this.ta=[]},addLoader:function(e){this.ta.push(e)},loadContents:function(e,t){for(let n of this.ta)if(n.loadContents(e,t))return!0;return!1}});let i=r.computeAlignment;r.computeAlignment=function(e,t,n,r,a=1){return i.call(this,e,t,n,r,a)}};let f=`createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText`.split(` `),p=new function(){function e(){if(!t){var e=document.createElement(`canvas`),o={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:`high-performance`,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let s;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(s=e.getContext(`webgl`,o),n=1,!s)return console.log(`No WebGL support. Image mesh will not be drawn.`),!1}else if(s=e.getContext(`webgl2`,o))n=2;else if(s=e.getContext(`webgl`,o))n=1;else return console.log(`No WebGL support. Image mesh will not be drawn.`),!1;s=new Proxy(s,{get(e,t){if(e.isContextLost()){if(c||=(console.error(`Cannot render the mesh because the GL Context was lost. Tried to invoke `,t),!0),typeof e[t]==`function`)return function(){}}else return typeof e[t]==`function`?function(...n){return e[t].apply(e,n)}:e[t]},set(e,t,n){if(e.isContextLost())c||=(console.error(`Cannot render the mesh because the GL Context was lost. Tried to set property `+t),!0);else return e[t]=n,!0}}),r=Math.min(s.getParameter(s.MAX_RENDERBUFFER_SIZE),s.getParameter(s.MAX_TEXTURE_SIZE));function l(e,t,n){if(t=s.createShader(t),s.shaderSource(t,n),s.compileShader(t),n=s.getShaderInfoLog(t),0<(n||``).length)throw n;s.attachShader(e,t)}if(e=s.createProgram(),l(e,s.VERTEX_SHADER,`attribute vec2 vertex; 2 attribute vec2 uv; 3 uniform vec4 mat; 4 uniform vec2 translate; 5 varying vec2 st; 6 void main() { 7 st = uv; 8 gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1); 9 }`),l(e,s.FRAGMENT_SHADER,`precision highp float; 10 uniform sampler2D image; 11 varying vec2 st; 12 void main() { 13 gl_FragColor = texture2D(image, st); 14 }`),s.bindAttribLocation(e,0,`vertex`),s.bindAttribLocation(e,1,`uv`),s.linkProgram(e),o=s.getProgramInfoLog(e),0<(o||``).trim().length)throw o;i=s.getUniformLocation(e,`mat`),a=s.getUniformLocation(e,`translate`),s.useProgram(e),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(e,`image`),0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=s}return!0}let t=null,n=0,r=0,i=null,a=null,o=0,s=0,c=!1;e(),this.Wa=function(){return e(),r},this.Ia=function(e){t.deleteTexture&&t.deleteTexture(e)},this.Ha=function(r){if(!e())return null;let i=t.createTexture();return i?(t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r),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),n==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),i):null};let l=new u(8),d=new u(8),f=new u(10),p=new u(10);this.La=function(n,r,c,u,m){if(e()){var h=l.push(n),g=d.push(r);if(t.canvas){(t.canvas.width!=h||t.canvas.height!=g)&&(t.canvas.width=h,t.canvas.height=g),t.viewport(0,g-r,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.SCISSOR_TEST),c.sort((e,t)=>
14t.xa-e.xa),h=f.push(u),o!=h&&(t.bufferData(t.ARRAY_BUFFER,8*h,t.DYNAMIC_DRAW),o=h),h=0;for(var _ of c)t.bufferSubData(t.ARRAY_BUFFER,h,_.ha),h+=4*_.ha.length;console.assert(h==4*u);for(var v of c)t.bufferSubData(t.ARRAY_BUFFER,h,v.Aa),h+=4*v.Aa.length;console.assert(h==8*u),h=p.push(m),s!=h&&(t.bufferData(t.ELEMENT_ARRAY_BUFFER,2*h,t.DYNAMIC_DRAW),s=h),_=0;for(var y of c)t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,_,y.indices),_+=2*y.indices.length;console.assert(_==2*m),y=0,v=!0,h=_=0;for(let e of c){e.image.ca!=y&&(t.bindTexture(t.TEXTURE_2D,e.image.ba||null),y=e.image.ca),e.Za?(t.scissor(e.ma,g-e.na-e.sa,e.kb,e.sa),v=!0):v&&=(t.scissor(0,g-r,n,r),!1),c=2/n;let o=-2/r;t.uniform4f(i,e.M[0]*c*e.W,e.M[1]*o*e.X,e.M[2]*c*e.W,e.M[3]*o*e.X),t.uniform2f(a,e.M[4]*c*e.W+c*(e.ma-e.Xa*e.W)-1,e.M[5]*o*e.X+o*(e.na-e.Ya*e.X)+1),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,h),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,h+4*u),t.drawElements(t.TRIANGLES,e.indices.length,t.UNSIGNED_SHORT,_),h+=4*e.ha.length,_+=2*e.indices.length}console.assert(h==4*u),console.assert(_==2*m)}}},this.canvas=function(){return e()&&t.canvas}},m=r.onRuntimeInitialized;r.onRuntimeInitialized=function(){function e(e){switch(e){case d.srcOver:return`source-over`;case d.screen:return`screen`;case d.overlay:return`overlay`;case d.darken:return`darken`;case d.lighten:return`lighten`;case d.colorDodge:return`color-dodge`;case d.colorBurn:return`color-burn`;case d.hardLight:return`hard-light`;case d.softLight:return`soft-light`;case d.difference:return`difference`;case d.exclusion:return`exclusion`;case d.multiply:return`multiply`;case d.hue:return`hue`;case d.saturation:return`saturation`;case d.color:return`color`;case d.luminosity:return`luminosity`}}function t(e){return`rgba(`+((16711680&e)>>>16)+`,`+((65280&e)>>>8)+`,`+((255&e)>>>0)+`,`+((4278190080&e)>>>24)/255+`)`}function n(){0<w.length&&(p.La(C.drawWidth(),C.drawHeight(),w,T,E),w=[],E=T=0,C.reset(512,512));for(let e of S){for(let t of e.u)t();e.u=[]}S.clear()}m&&m();var i=r.RenderPaintStyle;let a=r.RenderPath,o=r.RenderPaint,s=r.Renderer,c=r.StrokeCap,u=r.StrokeJoin,d=r.BlendMode,h=i.fill,g=i.stroke,_=r.FillRule.evenOdd,v=1;var y=r.RenderImage.extend(`CanvasRenderImage`,{__construct:function({P:e,V:t}={}){this.__parent.__construct.call(this),this.ca=v,v=v+1&2147483647||1,this.P=e,this.V=t},__destruct:function(){this.ba&&(p.Ia(this.ba),URL.revokeObjectURL(this.ka)),this.__parent.__destruct.call(this)},decode:function(e){var t=this;t.V&&t.V(t);var n=new Image;t.ka=URL.createObjectURL(new Blob([e],{type:`image/png`})),n.onload=function(){t.Ca=n,t.ba=p.Ha(n),t.size(n.width,n.height),t.P&&t.P(t)},n.src=t.ka}}),b=a.extend(`CanvasRenderPath`,{__construct:function(){this.__parent.__construct.call(this),this.G=new Path2D},rewind:function(){this.G=new Path2D},addPath:function(e,t,n,r,i,a,o){var s=this.G,c=s.addPath;e=e.G;let l=new DOMMatrix;l.a=t,l.b=n,l.c=r,l.d=i,l.e=a,l.f=o,c.call(s,e,l)},fillRule:function(e){this.ja=e},moveTo:function(e,t){this.G.moveTo(e,t)},lineTo:function(e,t){this.G.lineTo(e,t)},cubicTo:function(e,t,n,r,i,a){this.G.bezierCurveTo(e,t,n,r,i,a)},close:function(){this.G.closePath()}}),x=o.extend(`CanvasRenderPaint`,{color:function(e){this.la=t(e)},thickness:function(e){this.Fa=e},join:function(e){switch(e){case u.miter:this.aa=`miter`;break;case u.round:this.aa=`round`;break;case u.bevel:this.aa=`bevel`}},cap:function(e){switch(e){case c.butt:this.$=`butt`;break;case c.round:this.$=`round`;break;case c.square:this.$=`square`}},style:function(e){this.Ea=e},blendMode:function(t){this.Ba=e(t)},clearGradient:function(){this.O=null},linearGradient:function(e,t,n,r){this.O={ya:e,za:t,pa:n,qa:r,fa:[]}},radialGradient:function(e,t,n,r){this.O={ya:e,za:t,pa:n,qa:r,fa:[],Va:!0}},addStop:function(e,t){this.O.fa.push({color:e,stop:t})},completeGradient:function(){},draw:function(e,n,r){let i=this.Ea;var a=this.la,o=this.O;if(e.globalCompositeOperation=this.Ba,o!=null){a=o.ya;var s=o.za;let n=o.pa;var c=o.qa;let r=o.fa;o.Va?(o=n-a,c-=s,a=e.createRadialGradient(a,s,0,a,s,Math.sqrt(o*o+c*c))):a=e.createLinearGradient(a,s,n,c);for(let e=0,n=r.length;e<n;e++)s=r[e],a.addColorStop(s.stop,t(s.color));this.la=a,this.O=null}switch(i){case g:e.strokeStyle=a,e.lineWidth=this.Fa,e.lineCap=this.$,e.lineJoin=this.aa,e.stroke(n);break;case h:e.fillStyle=a,e.fill(n,r)}}});let S=new Set,C=null,w=[],T=0,E=0;var D=r.CanvasRenderer=s.extend(`Renderer`,{__construct:function(e){this.__parent.__construct.call(this),this.F=[1,0,0,1,0,0],this.m=e.getContext(`2d`),this.ia=e,this.u=[]},save:function(){this.F.push(...this.F.slice(this.F.length-6)),this.u.push(this.m.save.bind(this.m))},restore:function(){let e=this.F.length-6;if(6>
14e)throw`restore() called without matching save().`;this.F.splice(e),this.u.push(this.m.restore.bind(this.m))},transform:function(e,t,n,r,i,a){let o=this.F,s=o.length-6;o.splice(s,6,o[s]*e+o[s+2]*t,o[s+1]*e+o[s+3]*t,o[s]*n+o[s+2]*r,o[s+1]*n+o[s+3]*r,o[s]*i+o[s+2]*a+o[s+4],o[s+1]*i+o[s+3]*a+o[s+5]),this.u.push(this.m.transform.bind(this.m,e,t,n,r,i,a))},rotate:function(e){let t=Math.sin(e);e=Math.cos(e),this.transform(e,t,-t,e,0,0)},_drawPath:function(e,t){this.u.push(t.draw.bind(t,this.m,e.G,e.ja===_?`evenodd`:`nonzero`))},_drawRiveImage:function(t,n,r,i){var a=t.Ca;if(a){var o=this.m,s=e(r);this.u.push(function(){o.globalCompositeOperation=s,o.globalAlpha=i,o.drawImage(a,0,0),o.globalAlpha=1})}},_getMatrix:function(e){let t=this.F,n=t.length-6;for(let r=0;6>r;++r)e[r]=t[n+r]},_drawImageMesh:function(t,i,a,o,s,c,l,u,d,f,m){i=this.m.canvas.width;var h=this.m.canvas.height;let g=f-u,_=m-d;u=Math.max(u,0),d=Math.max(d,0),f=Math.min(f,i),m=Math.min(m,h);let v=f-u,y=m-d;if(console.assert(v<=Math.min(g,i)),console.assert(y<=Math.min(_,h)),!(0>=v||0>=y)){f=v<g||y<_,i=m=1;var b=Math.ceil(v*m),x=Math.ceil(y*i);h=p.Wa(),b>h&&(m*=h/b,b=h),x>h&&(i*=h/x,x=h),C||(C=new r.DynamicRectanizer(h),C.reset(512,512)),h=C.addRect(b,x),0>h&&(n(),S.add(this),h=C.addRect(b,x),console.assert(0<=h));var D=h&65535,O=h>>16;w.push({M:this.F.slice(this.F.length-6),image:t,ma:D,na:O,Xa:u,Ya:d,kb:b,sa:x,W:m,X:i,ha:new Float32Array(s),Aa:new Float32Array(c),indices:new Uint16Array(l),Za:f,xa:t.ca<<1|!!f}),T+=s.length,E+=l.length;var k=this.m,A=e(a);this.u.push(function(){k.save(),k.resetTransform(),k.globalCompositeOperation=A,k.globalAlpha=o;let e=p.canvas();e&&k.drawImage(e,D,O,b,x,u,d,v,y),k.restore()})}},_clipPath:function(e){this.u.push(this.m.clip.bind(this.m,e.G,e.ja===_?`evenodd`:`nonzero`))},clear:function(){S.add(this),this.u.push(this.m.clearRect.bind(this.m,0,0,this.ia.width,this.ia.height))},flush:function(){},translate:function(e,t){this.transform(1,0,0,1,e,t)}});r.makeRenderer=function(e){let t=new D(e),n=t.m;return new Proxy(t,{get(e,r){if(typeof e[r]==`function`)return function(...t){return e[r].apply(e,t)};if(typeof n[r]==`function`){if(-1<f.indexOf(r))throw Error(`RiveException: Method call to '`+r+`()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.`);return function(...e){t.u.push(n[r].bind(n,...e))}}return e[r]},set(e,r,i){if(r in n)return t.u.push(()=>{n[r]=i}),!0}})},r.decodeImage=function(e,t){new y({P:t}).decode(e)},r.renderFactory={makeRenderPaint:function(){return new x},makeRenderPath:function(){return new b},makeRenderImage:function(){let e=k;return new y({V:()=>{e.total++},P:()=>{if(e.loaded++,e.loaded===e.total){let t=e.ready;t&&(t(),e.ready=null)}}})}};let O=r.load,k=null;r.load=function(e,t,n=!0){let i=new r.FallbackFileAssetLoader;return t!==void 0&&i.addLoader(t),n&&(t=new r.CDNFileAssetLoader,i.addLoader(t)),new Promise(function(t){let n=null;k={total:0,loaded:0,ready:function(){t(n)}},n=O(e,i),k.total==0&&t(n)})};let A=r.RendererWrapper.prototype.align;r.RendererWrapper.prototype.align=function(e,t,n,r,i=1){A.call(this,e,t,n,r,i)},i=new l,r.requestAnimationFrame=i.requestAnimationFrame.bind(i),r.cancelAnimationFrame=i.cancelAnimationFrame.bind(i),r.enableFPSCounter=i.Ma.bind(i),r.disableFPSCounter=i.Ja,i.ua=n,r.resolveAnimationFrame=n,r.cleanup=function(){C&&C.delete()}};var h=Object.assign({},r),g=`./this.program`,_=``,v,y;(s||c)&&(c?_=self.location.href:typeof document<`u`&&document.currentScript&&(_=document.currentScript.src),e&&(_=e),_=_.startsWith(`blob:`)?``:_.substr(0,_.replace(/[?#].*/,``).lastIndexOf(`/`)+1),c&&(y=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),v=(e,t,n)=>{if(se(e)){var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n()},r.onerror=n,r.send(null)}else fetch(e,{credentials:`same-origin`}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+` : `+e.url))).then(t,n)});var b=r.print||console.log.bind(console),x=r.printErr||console.error.bind(console);Object.assign(r,h),h=null,r.thisProgram&&(g=r.thisProgram);var S;r.wasmBinary&&(S=r.wasmBinary);var C,w=!1,T,E,D,O,k,A,j,ee;function te(){var e=C.buffer;r.HEAP8=T=new Int8Array(e),r.HEAP16=D=new Int16Array(e),r.HEAPU8=E=new Uint8Array(e),r.HEAPU16=O=ne
14w Uint16Array(e),r.HEAP32=k=new Int32Array(e),r.HEAPU32=A=new Uint32Array(e),r.HEAPF32=j=new Float32Array(e),r.HEAPF64=ee=new Float64Array(e)}var ne=[],re=[],ie=[];function ae(){var e=r.preRun.shift();ne.unshift(e)}var M=0,N=null,P=null;function F(e){throw r.onAbort?.(e),e=`Aborted(`+e+`)`,x(e),w=!0,e=new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`),a(e),e}var oe=e=>e.startsWith(`data:application/octet-stream;base64,`),se=e=>e.startsWith(`file://`),ce;function le(e){if(e==ce&&S)return new Uint8Array(S);if(y)return y(e);throw`both async and sync fetching of the wasm failed`}function ue(e){return S?Promise.resolve().then(()=>le(e)):new Promise((t,n)=>{v(e,e=>t(new Uint8Array(e)),()=>{try{t(le(e))}catch(e){n(e)}})})}function de(e,t,n){return ue(e).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{x(`failed to asynchronously prepare wasm: ${e}`),F(e)})}function fe(e,t){var n=ce;return S||typeof WebAssembly.instantiateStreaming!=`function`||oe(n)||se(n)||typeof fetch!=`function`?de(n,e,t):fetch(n,{credentials:`same-origin`}).then(r=>WebAssembly.instantiateStreaming(r,e).then(t,function(r){return x(`wasm streaming compile failed: ${r}`),x(`falling back to ArrayBuffer instantiation`),de(n,e,t)}))}var pe=e=>{for(;0<e.length;)e.shift()(r)},I=(e,t)=>Object.defineProperty(t,`name`,{value:e}),me=[],L=[],R,z=e=>{if(!e)throw new R(`Cannot use deleted val. handle = `+e);return L[e]},B=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=me.pop()||L.length;return L[t]=e,L[t+1]=1,t}},he=e=>{var t=Error,n=I(e,function(t){this.name=e,this.message=t,t=Error(t).stack,t!==void 0&&(this.stack=this.toString()+` 15`+t.replace(/^Error(:[^\n]*)?\n/,``))});return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},ge,_e,V=e=>{for(var t=``;E[e];)t+=_e[E[e++]];return t},ve=[],ye=()=>{for(;ve.length;){var e=ve.pop();e.g.L=!1,e.delete()}},H,U={},be=(e,t)=>{if(t===void 0)throw new R(`ptr should not be undefined`);for(;e.o;)t=e.R(t),e=e.o;return t},W={},xe=e=>{e=Bt(e);var t=V(e);return $(e),t},Se=(e,t)=>{var n=W[e];if(n===void 0)throw e=`${t} has unknown type ${xe(e)}`,new R(e);return n},Ce=()=>{},we=!1,Te=(e,t,n)=>t===n?e:n.o===void 0?null:(e=Te(e,t,n.o),e===null?null:n.Ka(e)),Ee={},De=(e,t)=>(t=be(e,t),U[t]),Oe,ke=(e,t)=>{if(!t.j||!t.i)throw new Oe(`makeClassHandle requires ptr and ptrType`);if(!!t.v!=!!t.s)throw new Oe(`Both smartPtrType and smartPtr must be specified`);return t.count={value:1},G(Object.create(e,{g:{value:t,writable:!0}}))},G=e=>typeof FinalizationRegistry>`u`?(G=e=>e,e):(we=new FinalizationRegistry(e=>{e=e.g,--e.count.value,e.count.value===0&&(e.s?e.v.C(e.s):e.j.h.C(e.i))}),G=e=>{var t=e.g;return t.s&&we.register(e,{g:t},e),e},Ce=e=>{we.unregister(e)},G(e)),Ae={},je=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function K(e){return this.fromWireType(A[e>>2])}var q={},Me={},J=(e,t,n)=>{function r(t){if(t=n(t),t.length!==e.length)throw new Oe(`Mismatched type converter count`);for(var r=0;r<e.length;++r)Y(e[r],t[r])}e.forEach(function(e){Me[e]=t});var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{W.hasOwnProperty(e)?i[t]=W[e]:(a.push(e),q.hasOwnProperty(e)||(q[e]=[]),q[e].push(()=>{i[t]=W[e],++o,o===a.length&&r(i)}))}),a.length===0&&r(i)};function Ne(e,t,n={}){var r=t.name;if(!e)throw new R(`type "${r}" must have a positive integer typeid pointer`);if(W.hasOwnProperty(e)){if(n.Ua)return;throw new R(`Cannot register type '${r}' twice`)}W[e]=t,delete Me[e],q.hasOwnProperty(e)&&(t=q[e],delete q[e],t.forEach(e=>e()))}function Y(e,t,n={}){if(!(`argPackAdvance`in t))throw TypeError(`registerType registeredInstance requires argPackAdvance`);return Ne(e,t,n)}var Pe=e=>{throw new R(e.g.j.h.name+` instance already deleted`)};function Fe(){}var Ie=(e,t,n)=>{if(e[t].l===void 0){var r=e[t];e[t]=function(...r){if(!e[t].l.hasOwnProperty(r.length))throw new R(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].l})!`);return e[t].l[r.length].apply(this,r)},e[t].l=[],e[t].l[r.K]=r}},Le=(e,t,n)=>{if(r.hasOwnProperty(e)){if(n===void 0||r[e].l!==void 0&&r[e].l[n]!==void 0)throw new R(`Cannot register public name '${e}' twice`);if(Ie(r,e,e),r.hasOwnProperty(n))throw new R(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`);r[e].l[n]=t}else r[e]=t,n!==void 0&&(r[e].mb=n)},Re=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 ze(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.B=n,this.C=r,this.o=i,this.Pa=a,this.R=o,this.Ka=s,this.va=[]}var Be=(e,t,n)=>{for(;t!==n;
15){if(!t.R)throw new R(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.R(e),t=t.o}return e};function Ve(e,t){if(t===null){if(this.da)throw new R(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new R(`Cannot pass "${ot(t)}" as a ${this.name}`);if(!t.g.i)throw new R(`Cannot pass deleted object as a pointer of type ${this.name}`);return Be(t.g.i,t.g.j.h,this.h)}function He(e,t){if(t===null){if(this.da)throw new R(`null is not a valid ${this.name}`);if(this.U){var n=this.ea();return e!==null&&e.push(this.C,n),n}return 0}if(!t||!t.g)throw new R(`Cannot pass "${ot(t)}" as a ${this.name}`);if(!t.g.i)throw new R(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.T&&t.g.j.T)throw new R(`Cannot convert argument of type ${t.g.v?t.g.v.name:t.g.j.name} to parameter type ${this.name}`);if(n=Be(t.g.i,t.g.j.h,this.h),this.U){if(t.g.s===void 0)throw new R(`Passing raw pointer to smart pointer is illegal`);switch(this.fb){case 0:if(t.g.v===this)n=t.g.s;else throw new R(`Cannot convert argument of type ${t.g.v?t.g.v.name:t.g.j.name} to parameter type ${this.name}`);break;case 1:n=t.g.s;break;case 2:if(t.g.v===this)n=t.g.s;else{var r=t.clone();n=this.ab(n,B(()=>r.delete())),e!==null&&e.push(this.C,n)}break;default:throw new R(`Unsupporting sharing policy`)}}return n}function Ue(e,t){if(t===null){if(this.da)throw new R(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new R(`Cannot pass "${ot(t)}" as a ${this.name}`);if(!t.g.i)throw new R(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.g.j.T)throw new R(`Cannot convert argument of type ${t.g.j.name} to parameter type ${this.name}`);return Be(t.g.i,t.g.j.h,this.h)}function We(e,t,n,r,i,a,o,s,c,l,u){this.name=e,this.h=t,this.da=n,this.T=r,this.U=i,this.$a=a,this.fb=o,this.wa=s,this.ea=c,this.ab=l,this.C=u,i||t.o!==void 0?this.toWireType=He:(this.toWireType=r?Ve:Ue,this.A=null)}var Ge=(e,t,n)=>{if(!r.hasOwnProperty(e))throw new Oe(`Replacing nonexistent public symbol`);r[e].l!==void 0&&n!==void 0?r[e].l[n]=t:(r[e]=t,r[e].K=n)},Ke=[],qe,Je=e=>{var t=Ke[e];return t||(e>=Ke.length&&(Ke.length=e+1),Ke[e]=t=qe.get(e)),t},Ye=(e,t,n=[])=>(e.includes(`j`)?(e=e.replace(/p/g,`i`),t=(0,r[`dynCall_`+e])(t,...n)):t=Je(t)(...n),t),Xe=(e,t)=>(...n)=>Ye(e,t,n),X=(e,t)=>{e=V(e);var n=e.includes(`j`)?Xe(e,t):Je(t);if(typeof n!=`function`)throw new R(`unknown function pointer with signature ${e}: ${t}`);return n},Ze,Z=(e,t)=>{function n(e){i[e]||W[e]||(Me[e]?Me[e].forEach(n):(r.push(e),i[e]=!0))}var r=[],i={};throw t.forEach(n),new Ze(`${e}: `+r.map(xe).join([`, `]))};function Qe(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].A===void 0)return!0;return!1}function $e(e,t,n,r,i){var a=t.length;if(2>a)throw new R(`argTypes array size mismatch! Must at least get return value and 'this' types!`);var o=t[1]!==null&&n!==null,s=Qe(t),c=t[0].name!==`void`,l=a-2,u=Array(l),d=[],f=[];return I(e,function(...n){if(n.length!==l)throw new R(`function ${e} called with ${n.length} arguments, expected ${l}`);if(f.length=0,d.length=o?2:1,d[0]=i,o){var a=t[1].toWireType(f,this);d[1]=a}for(var p=0;p<l;++p)u[p]=t[p+2].toWireType(f,n[p]),d.push(u[p]);if(n=r(...d),s)je(f);else for(p=o?1:2;p<t.length;p++){var m=p===1?a:u[p-2];t[p].A!==null&&t[p].A(m)}return a=c?t[0].fromWireType(n):void 0,a})}var et=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(A[t+4*r>>2]);return n},tt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.substr(0,t)},nt=(e,t,n)=>{if(!(e instanceof Object))throw new R(`${n} with invalid "this": ${e}`);if(!(e instanceof t.h.constructor))throw new R(`${n} incompatible with "this" of type ${e.constructor.name}`);if(!e.g.i)throw new R(`cannot call emscripten binding method ${n} on deleted object`);return Be(e.g.i,e.g.j.h,t.h)},rt=e=>{9<e&&--L[e+1]===0&&(L[e]=void 0,me.push(e))},it={name:`emscripten::val`,fromWireType:e=>{var t=z(e);return rt(e),t},toWireType:(e,t)=>B(t),argPackAdvance:8,readValueFromPointer:K,A:null},at=(e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(T[e])}:function(e){return this.fromWireType(E[e])};case 2:return n?function(e){return this.fromWireType(D[e>>1])}:function(e){return this.fromWireType(O[e>>1])};case 4:return n?function(e){return this.fromWireType(k[e>>
152])}:function(e){return this.fromWireType(A[e>>2])};default:throw TypeError(`invalid integer width (${t}): ${e}`)}},ot=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e},st=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(j[e>>2])};case 8:return function(e){return this.fromWireType(ee[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},ct=(e,t,n)=>{switch(t){case 1:return n?e=>T[e]:e=>E[e];case 2:return n?e=>D[e>>1]:e=>O[e>>1];case 4:return n?e=>k[e>>2]:e=>A[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},lt=(e,t,n,r)=>{if(0<r){r=n+r-1;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a){var o=e.charCodeAt(++i);a=65536+((a&1023)<<10)|o&1023}if(127>=a){if(n>=r)break;t[n++]=a}else{if(2047>=a){if(n+1>=r)break;t[n++]=192|a>>6}else{if(65535>=a){if(n+2>=r)break;t[n++]=224|a>>12}else{if(n+3>=r)break;t[n++]=240|a>>18,t[n++]=128|a>>12&63}t[n++]=128|a>>6&63}t[n++]=128|a&63}}t[n]=0}},ut=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},dt=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0,ft=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&dt)return dt.decode(e.subarray(t,n));for(r=``;t<n;){var i=e[t++];if(i&128){var a=e[t++]&63;if((i&224)==192)r+=String.fromCharCode((i&31)<<6|a);else{var o=e[t++]&63;i=(i&240)==224?(i&15)<<12|a<<6|o:(i&7)<<18|a<<12|o<<6|e[t++]&63,65536>i?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}}else r+=String.fromCharCode(i)}return r},pt=typeof TextDecoder<`u`?new TextDecoder(`utf-16le`):void 0,mt=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&O[n];)++n;if(n<<=1,32<n-e&&pt)return pt.decode(E.subarray(e,n));for(n=``,r=0;!(r>=t/2);++r){var i=D[e+2*r>>1];if(i==0)break;n+=String.fromCharCode(i)}return n},ht=(e,t,n)=>{if(n??=2147483647,2>n)return 0;n-=2;var r=t;n=n<2*e.length?n/2:e.length;for(var i=0;i<n;++i)D[t>>1]=e.charCodeAt(i),t+=2;return D[t>>1]=0,t-r},gt=e=>2*e.length,_t=(e,t)=>{for(var n=0,r=``;!(n>=t/4);){var i=k[e+4*n>>2];if(i==0)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023)):r+=String.fromCharCode(i)}return r},vt=(e,t,n)=>{if(n??=2147483647,4>n)return 0;var r=t;n=r+n-4;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a){var o=e.charCodeAt(++i);a=65536+((a&1023)<<10)|o&1023}if(k[t>>2]=a,t+=4,t+4>n)break}return k[t>>2]=0,t-r},yt=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);55296<=r&&57343>=r&&++n,t+=4}return t},bt=(e,t,n)=>{var r=[];return e=e.toWireType(r,n),r.length&&(A[t>>2]=B(r)),e},xt={},St=e=>{var t=xt[e];return t===void 0?V(e):t},Ct=[],wt=e=>{var t=Ct.length;return Ct.push(e),t},Tt=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=Se(A[t+4*r>>2],`parameter `+r);return n},Et=Reflect.construct,Dt={},Ot=()=>{if(!kt){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(typeof navigator==`object`&&navigator.languages&&navigator.languages[0]||`C`).replace(`-`,`_`)+`.UTF-8`,_:g||`./this.program`},t;for(t in Dt)Dt[t]===void 0?delete e[t]:e[t]=Dt[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);kt=n}return kt},kt,At=[null,[],[]],jt=e=>e%4==0&&(e%100!=0||e%400==0),Mt=[31,29,31,30,31,30,31,31,30,31,30,31],Nt=[31,28,31,30,31,30,31,31,30,31,30,31];function Pt(e){var t=Array(ut(e)+1);return lt(e,t,0,t.length),t}var Ft=(e,t,n,r)=>{function i(e,t,n){for(e=typeof e==`number`?e.toString():e||``;e.length<t;)e=n[0]+e;return e}function a(e,t){return i(e,t,`0`)}function o(e,t){function n(e){return 0>e?-1:+(0<e)}var r;return(r=n(e.getFullYear()-t.getFullYear()))===0&&(r=n(e.getMonth()-t.getMonth()))===0&&(r=n(e.getDate()-t.getDate())),r}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function c(e){var t=e.I;for(e=new Date(new Date(e.J+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(jt(e.getFullYear())?Mt:Nt)[n];if(t>r-e.getDate())t-=r-e.getDate()+1,e.setDate(1),11>n?e.setMonth(n+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1));else{e.setDate(e.getDate()+t);break}}return n=new Date(e.getFullYear()+1,0,4),t=s(new Date(e.getFullYear(),0,4)),n=s(n),0>=o(t,e)?0>=o(n,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var l=A[r+40>>2];for(var u in r={ib:k[r>>2],hb:k[r+4>>2],Y:k[r+8>>2],ga:k[r+12>>2],Z:k[r+16>>2],J:k[r+20>>2],D:k[r+24>>2],I:k[r+28>>2],nb:k[r+32>>2],gb:k[r+36>>2],jb:l&&l?ft(E,l):``},n=n?ft(E,n):``,l={"%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`},l)n=n.replace(new RegExp(u,`g`),l[u]);var d=`Sunday Monday Tuesday Wednesday Thursday Friday Saturday`.split(` `),f=`January February March April May June July August September October November December`.split(` `);for(u in l={"%a":e=>d[e.D].substring(0,3),"%A":e=>d[e.D],"%b":e=>f[e.Z].substring(0,3),"%B":e=>f[e.Z],"%C":e=>a((e.J+1900)/100|0,2),"%d":e=>a(e.ga,2),"%e":e=>i(e.ga,2,` `),"%g":e=>c(e).toString().substring(2),"%G":c,"%H":e=>a(e.Y,2),"%I":e=>(e=e.Y,e==0?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.Z-1;t+=(jt(e.J+1900)?Mt:Nt)[n++]);return a(e.ga+t,3)},"%m":e=>a(e.Z+1,2),"%M":e=>a(e.hb,2),"%n":()=>` 16`,"%p":e=>0<=e.Y&&12>e.Y?`AM`:`PM`,"%S":e=>a(e.ib,2),"%t":()=>` `,"%u":e=>e.D||7,"%U":e=>a(Math.floor((e.I+7-e.D)/7),2),"%V":e=>{var t=Math.floor((e.I+7-(e.D+6)%7)/7);if(2>=(e.D+371-e.I-2)%7&&t++,t)t==53&&(n=(e.D+371-e.I)%7,n==4||n==3&&jt(e.J)||(t=1));else{t=52;var n=(e.D+7-e.I-1)%7;(n==4||n==5&&jt(e.J%400-1))&&t++}return a(t,2)},"%w":e=>e.D,"%W":e=>a(Math.floor((e.I+7-(e.D+6)%7)/7),2),"%y":e=>(e.J+1900).toString().substring(2),"%Y":e=>e.J+1900,"%z":e=>{e=e.gb;var t=0<=e;return e=Math.abs(e)/60,(t?`+`:`-`)+String(`0000`+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.jb,"%%":()=>`%`},n=n.replace(/%%/g,`\0\0`),l)n.includes(u)&&(n=n.replace(new RegExp(u,`g`),l[u](r)));return n=n.replace(/\0\0/g,`%`),u=Pt(n),u.length>t?0:(T.set(u,e),u.length-1)};
16R=r.BindingError=class extends Error{constructor(e){super(e),this.name=`BindingError`}},L.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=()=>L.length/2-5-me.length,ge=r.PureVirtualError=he(`PureVirtualError`);for(var It=Array(256),Lt=0;256>Lt;++Lt)It[Lt]=String.fromCharCode(Lt);_e=It,r.getInheritedInstanceCount=()=>Object.keys(U).length,r.getLiveInheritedInstances=()=>{var e=[],t;for(t in U)U.hasOwnProperty(t)&&e.push(U[t]);return e},r.flushPendingDeletes=ye,r.setDelayFunction=e=>{H=e,ve.length&&H&&H(ye)},Oe=r.InternalError=class extends Error{constructor(e){super(e),this.name=`InternalError`}},Object.assign(Fe.prototype,{isAliasOf:function(e){if(!(this instanceof Fe&&e instanceof Fe))return!1;var t=this.g.j.h,n=this.g.i;e.g=e.g;var r=e.g.j.h;for(e=e.g.i;t.o;)n=t.R(n),t=t.o;for(;r.o;)e=r.R(e),r=r.o;return t===r&&n===e},clone:function(){if(this.g.i||Pe(this),this.g.N)return this.g.count.value+=1,this;var e=G,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.g;return e=e(n.call(t,r,{g:{value:{count:i.count,L:i.L,N:i.N,i:i.i,j:i.j,s:i.s,v:i.v}}})),e.g.count.value+=1,e.g.L=!1,e},delete(){if(this.g.i||Pe(this),this.g.L&&!this.g.N)throw new R(`Object already scheduled for deletion`);Ce(this);var e=this.g;--e.count.value,e.count.value===0&&(e.s?e.v.C(e.s):e.j.h.C(e.i)),this.g.N||(this.g.s=void 0,this.g.i=void 0)},isDeleted:function(){return!this.g.i},deleteLater:function(){if(this.g.i||Pe(this),this.g.L&&!this.g.N)throw new R(`Object already scheduled for deletion`);return ve.push(this),ve.length===1&&H&&H(ye),this.g.L=!0,this}}),Object.assign(We.prototype,{Qa(e){return this.wa&&(e=this.wa(e)),e},oa(e){this.C?.(e)},argPackAdvance:8,readValueFromPointer:K,fromWireType:function(e){function t(){return this.U?ke(this.h.B,{j:this.$a,i:n,v:this,s:e}):ke(this.h.B,{j:this,i:e})}var n=this.Qa(e);if(!n)return this.oa(e),null;var r=De(this.h,n);if(r!==void 0)return r.g.count.value===0?(r.g.i=n,r.g.s=e,r.clone()):(r=r.clone(),this.oa(e),r);if(r=this.h.Pa(n),r=Ee[r],!r)return t.call(this);r=this.T?r.Ga:r.pointerType;var i=Te(n,this.h,r.h);return i===null?t.call(this):this.U?ke(r.h.B,{j:r,i,v:this,s:e}):ke(r.h.B,{j:r,i})}}),Ze=r.UnboundTypeError=he(`UnboundTypeError`);var Rt={_abort_js:()=>{F(``)},_embind_create_inheriting_constructor:(e,t,n)=>{e=V(e),t=Se(t,`wrapper`),n=z(n);var r=t.h,i=r.B,a=r.o.B,o=r.o.constructor;return e=I(e,function(...e){r.o.va.forEach(function(e){if(this[e]===a[e])throw new ge(`Pure virtual function ${e} must be implemented in JavaScript`)}.bind(this)),Object.defineProperty(this,`__parent`,{value:i}),this.__construct(...e)}),i.__construct=function(...e){if(this===i)throw new R(`Pass correct 'this' to __construct`);e=o.implement(this,...e),Ce(e);var t=e.g;if(e.notifyOnDestruction(),t.N=!0,Object.defineProperties(this,{g:{value:t}}),G(this),e=t.i,e=be(r,e),U.hasOwnProperty(e))throw new R(`Tried to register registered instance: ${e}`);U[e]=this},i.__destruct=function(){if(this===i)throw new R(`Pass correct 'this' to __destruct`);Ce(this);var e=this.g.i;if(e=be(r,e),U.hasOwnProperty(e))delete U[e];else throw new R(`Tried to unregister unregistered instance: ${e}`)},e.prototype=Object.create(i),Object.assign(e.prototype,n),B(e)},_embind_finalize_value_object:e=>{var t=Ae[e];delete Ae[e];var n=t.ea,r=t.C,i=t.ra,a=i.map(e=>e.Ta).concat(i.map(e=>e.cb));J([e],a,e=>{var a={};return i.forEach((t,n)=>{var r=e[n],o=t.Ra,s=t.Sa,c=e[n+i.length],l=t.bb,u=t.eb;a[t.Na]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];l(u,e,c.toWireType(n,t)),je(n)}}}),[{name:t.name,fromWireType:e=>{var t={},n;for(n in a)t[n]=a[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var i in a)if(!(i in t))throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return e!==null&&e.push(r,o),o},argPackAdvance:8,readValueFromPointer:K,A:r}]})},_embind_register_bigint:()=>{},_embind_register_bool:(e,t,n,r)=>{t=V(t),Y(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(E[e])},A:null})},_embind_register_class:(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=V(u),a=X(i,a),s&&=X(o,s),l&&=X(c,l),f=X(d,f);var p=Re(u);Le(p,function(){Z(`Cannot construct ${u} due to unbound types`,[r])}),J([e,t,n],r?[r]:[],t=>{if(t=t[0],r)var n=t.h,i=n.B;else i=Fe.prototype;t=I(u,function(...e){if(Object.getPrototypeOf(this)!==o)throw new R(`Use 'new' to construct `+u);if(c.H===void 0)throw new R(u+` has no accessible constructor`);var t=c.H[e.length];if(t===void 0)throw new R(`Tried to invoke ctor of ${u}
16 with invalid number of parameters (${e.length}) - expected (${Object.keys(c.H).toString()}) parameters instead!`);return t.apply(this,e)});var o=Object.create(i,{constructor:{value:t}});t.prototype=o;var c=new ze(u,t,o,f,n,a,s,l);if(c.o){var d;(d=c.o).S??(d.S=[]),c.o.S.push(c)}return n=new We(u,c,!0,!1,!1),d=new We(u+`*`,c,!1,!1,!1),i=new We(u+` const*`,c,!1,!0,!1),Ee[e]={pointerType:d,Ga:i},Ge(p,t),[n,d,i]})},_embind_register_class_class_function:(e,t,n,r,i,a,o)=>{var s=et(n,r);t=V(t),t=tt(t),a=X(i,a),J([],[e],e=>{function r(){Z(`Cannot call ${i} due to unbound types`,s)}e=e[0];var i=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]);var c=e.h.constructor;return c[t]===void 0?(r.K=n-1,c[t]=r):(Ie(c,t,i),c[t].l[n-1]=r),J([],s,r=>{if(r=$e(i,[r[0],null].concat(r.slice(1)),null,a,o),c[t].l===void 0?(r.K=n-1,c[t]=r):c[t].l[n-1]=r,e.h.S)for(let n of e.h.S)n.constructor.hasOwnProperty(t)||(n.constructor[t]=r);return[]}),[]})},_embind_register_class_class_property:(e,t,n,r,i,a,o,s)=>{t=V(t),a=X(i,a),J([],[e],e=>{e=e[0];var i=`${e.name}.${t}`,c={get(){Z(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return c.set=s?()=>{Z(`Cannot access ${i} due to unbound types`,[n])}:()=>{throw new R(`${i} is a read-only property`)},Object.defineProperty(e.h.constructor,t,c),J([],[n],n=>{n=n[0];var i={get(){return n.fromWireType(a(r))},enumerable:!0};return s&&(s=X(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),je(t)}),Object.defineProperty(e.h.constructor,t,i),[]}),[]})},_embind_register_class_constructor:(e,t,n,r,i,a)=>{var o=et(t,n);i=X(r,i),J([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(e.h.H===void 0&&(e.h.H=[]),e.h.H[t-1]!==void 0)throw new R(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.h.H[t-1]=()=>{Z(`Cannot construct ${e.name} due to unbound types`,o)},J([],o,r=>(r.splice(1,0,null),e.h.H[t-1]=$e(n,r,null,i,a),[])),[]})},_embind_register_class_function:(e,t,n,r,i,a,o,s)=>{var c=et(n,r);t=V(t),t=tt(t),a=X(i,a),J([],[e],e=>{function r(){Z(`Cannot call ${i} due to unbound types`,c)}e=e[0];var i=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]),s&&e.h.va.push(t);var l=e.h.B,u=l[t];return u===void 0||u.l===void 0&&u.className!==e.name&&u.K===n-2?(r.K=n-2,r.className=e.name,l[t]=r):(Ie(l,t,i),l[t].l[n-2]=r),J([],c,r=>(r=$e(i,r,e,a,o),l[t].l===void 0?(r.K=n-2,l[t]=r):l[t].l[n-2]=r,[])),[]})},_embind_register_class_property:(e,t,n,r,i,a,o,s,c,l)=>{t=V(t),i=X(r,i),J([],[e],e=>{e=e[0];var r=`${e.name}.${t}`,u={get(){Z(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return u.set=c?()=>Z(`Cannot access ${r} due to unbound types`,[n,o]):()=>{throw new R(r+` is a read-only property`)},Object.defineProperty(e.h.B,t,u),J([],c?[n,o]:[n],n=>{var o=n[0],u={get(){var t=nt(this,e,r+` getter`);return o.fromWireType(i(a,t))},enumerable:!0};if(c){c=X(s,c);var d=n[1];u.set=function(t){var n=nt(this,e,r+` setter`),i=[];c(l,n,d.toWireType(i,t)),je(i)}}return Object.defineProperty(e.h.B,t,u),[]}),[]})},_embind_register_emval:e=>Y(e,it),_embind_register_enum:(e,t,n,r)=>{function i(){}t=V(t),i.values={},Y(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,argPackAdvance:8,readValueFromPointer:at(t,n,r),A:null}),Le(t,i)},_embind_register_enum_value:(e,t,n)=>{var r=Se(e,`enum`);t=V(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:I(`${r.name}_${t}`,function(){})}}),e.values[n]=r,e[t]=r},_embind_register_float:(e,t,n)=>{t=V(t),Y(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:st(t,n),A:null})},_embind_register_function:(e,t,n,r,i,a)=>{var o=et(t,n);e=V(e),e=tt(e),i=X(r,i),Le(e,function(){Z(`Cannot call ${e} due to unbound types`,o)},t-1),J([],o,n=>(Ge(e,$e(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]))},_embind_register_integer:(e,t,n,r,i)=>{if(t=V(t),i===-1&&(i=4294967295),i=e=>e,r===0){var a=32-8*n;i=e=>e<<a>>>a}var o=t.includes(`unsigned`)?function(e,t){return t>>>0}:function(e,t){return t};Y(e,{name:t,fromWireType:i,toWireType:o,argPackAdvance:8,readValueFromPointer:ct(t,n,r!==0),A:null})},_embind_register_memory_view:(e,t,n)=>{function r(e){return new i(T.buffer,A[e+4>>2],A[e>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array
16][t];n=V(n),Y(e,{name:n,fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Ua:!0})},_embind_register_std_string:(e,t)=>{t=V(t);var n=t===`std::string`;Y(e,{name:t,fromWireType:function(e){var t=A[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||E[o]==0){if(i=i?ft(E,i,o-i):``,s===void 0)var s=i;else s+=`\0`,s+=i;i=o+1}}else{for(s=Array(t),a=0;a<t;++a)s[a]=String.fromCharCode(E[r+a]);s=s.join(``)}return $(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r=typeof t==`string`;if(!(r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array))throw new R(`Cannot pass non-string to std::string`);var i=n&&r?ut(t):t.length,a=zt(4+i+1),o=a+4;if(A[a>>2]=i,n&&r)lt(t,E,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);if(255<s)throw $(o),new R(`String has UTF-16 code units that do not fit in 8 bits`);E[o+r]=s}else for(r=0;r<i;++r)E[o+r]=t[r];return e!==null&&e.push($,a),a},argPackAdvance:8,readValueFromPointer:K,A(e){$(e)}})},_embind_register_std_wstring:(e,t,n)=>{if(n=V(n),t===2)var r=mt,i=ht,a=gt,o=e=>O[e>>1];else t===4&&(r=_t,i=vt,a=yt,o=e=>A[e>>2]);Y(e,{name:n,fromWireType:e=>{for(var n=A[e>>2],i,a=e+4,s=0;s<=n;++s){var c=e+4+s*t;(s==n||o(c)==0)&&(a=r(a,c-a),i===void 0?i=a:(i+=`\0`,i+=a),a=c+t)}return $(e),i},toWireType:(e,r)=>{if(typeof r!=`string`)throw new R(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=zt(4+o+t);return A[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push($,s),s},argPackAdvance:8,readValueFromPointer:K,A(e){$(e)}})},_embind_register_value_object:(e,t,n,r,i,a)=>{Ae[e]={name:V(t),ea:X(n,r),C:X(i,a),ra:[]}},_embind_register_value_object_field:(e,t,n,r,i,a,o,s,c,l)=>{Ae[e].ra.push({Na:V(t),Ta:n,Ra:X(r,i),Sa:a,cb:o,bb:X(s,c),eb:l})},_embind_register_void:(e,t)=>{t=V(t),Y(e,{lb:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:(e,t,n)=>E.copyWithin(e,t,t+n),_emval_as:(e,t,n)=>(e=z(e),t=Se(t,`emval::as`),bt(t,n,e)),_emval_call_method:(e,t,n,r,i)=>(e=Ct[e],t=z(t),n=St(n),e(t,t[n],r,i)),_emval_decref:rt,_emval_get_method_caller:(e,t,n)=>{var r=Tt(e,t),i=r.shift();e--;var a=Array(e);return t=`methodCaller<(${r.map(e=>e.name).join(`, `)}) => ${i.name}>`,wt(I(t,(t,o,s,c)=>{for(var l=0,u=0;u<e;++u)a[u]=r[u].readValueFromPointer(c+l),l+=r[u].argPackAdvance;return t=n===1?Et(o,a):o.apply(t,a),bt(i,s,t)}))},_emval_get_module_property:e=>(e=St(e),B(r[e])),_emval_get_property:(e,t)=>(e=z(e),t=z(t),B(e[t])),_emval_incref:e=>{9<e&&(L[e+1]+=1)},_emval_new_array:()=>B([]),_emval_new_cstring:e=>B(St(e)),_emval_new_object:()=>B({}),_emval_run_destructors:e=>{je(z(e)),rt(e)},_emval_set_property:(e,t,n)=>{e=z(e),t=z(t),n=z(n),e[t]=n},_emval_take_value:(e,t)=>(e=Se(e,`_emval_take_value`),e=e.readValueFromPointer(t),B(e)),emscripten_date_now:()=>Date.now(),emscripten_get_now:()=>performance.now(),emscripten_resize_heap:e=>{var t=E.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);var i=Math;r=Math.max(e,r);a:{i=(i.min.call(i,2147483648,r+(65536-r%65536)%65536)-C.buffer.byteLength+65535)/65536;try{C.grow(i),te();var a=1;break a}catch{}a=void 0}if(a)return!0}return!1},environ_get:(e,t)=>{var n=0;return Ot().forEach((r,i)=>{var a=t+n;for(i=A[e+4*i>>2]=a,a=0;a<r.length;++a)T[i++]=r.charCodeAt(a);T[i]=0,n+=r.length+1}),0},environ_sizes_get:(e,t)=>{var n=Ot();A[e>>2]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),A[t>>2]=r,0},fd_close:()=>52,fd_seek:function(){return 70},fd_write:(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=A[t>>2],s=A[t+4>>2];t+=8;for(var c=0;c<s;c++){var l=E[o+c],u=At[e];l===0||l===10?((e===1?b:x)(ft(u,0)),u.length=0):u.push(l)}i+=s}return A[r>>2]=i,0},strftime_l:(e,t,n,r)=>Ft(e,t,n,r)},Q=function(){function e(e){return Q=e.exports,C=Q.memory,te(),qe=Q.__indirect_function_table,re.unshift(Q.__wasm_call_ctors),M--,r.monitorRunDependencies?.(M),M==0&&(N!==null&&(clearInterval(N),N=null),P&&(e=P,P=null,e())),Q}var t={env:Rt,wasi_snapshot_preview1:Rt};if(M++,r.monitorRunDependencies?.(M),r.instantiateWasm)try{return r.instantiateWasm(t,e)}catch(e){x(`Module.instantiateWasm callback failed with error: ${e}`),a(e)}return ce||=oe(`canvas_advanced.wasm`)?`canvas_advanced.wasm`:r.locateFile?r.locateFile(`canvas_advanced.wasm`,_):_+`canvas_advanced.wasm`,fe(t,function(t){e(t.instance)}).catch(a),{}}(),$=e=>($=Q.free)(e),zt=e=>(zt=Q.malloc)(e),Bt=e=>(Bt=Q.__getTypeName)(e);r.dynCall_jiji=(e,t,n,i,a)=>(r.dynCall_jiji=Q.dynCall_jiji)(e,t,n,i,a),r.dynCall_viijii=(e,t,n,i,a,o,s)=>(r.dynCall_viijii=Q.dynCall_viijii)(e,t,n,i,a,o,s),r.dynCall_iiiiij=(e,t,n,i,a,o,s)=>(r.dynCall_iiiiij=Q.dynCall_iiiiij)(e,t,n,i,a,o,s),r.dynCall_iiiiijj=(e,t,n,i,a,o,s,c,l)=>(r.dynCall_iiiiijj=Q.dynCall_iiiiijj)(e,t,n,i,a,o,s,c,l),r.dynCall_iiiiiijj=(e,t,n,i,a,o,s,c,l,u)=>(r.dynCall_iiiiiijj=Q.dynCall_iiiiiijj)(e,t,n,i,a,o,s,c,l,u);var Vt;P=function e(){Vt||Ht(),Vt||(P=e)};function Ht(){function e(){if(!Vt&&(Vt=!0,r.calledRun=!0,!w)){if
16(pe(re),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),r.postRun)for(typeof r.postRun==`function`&&(r.postRun=[r.postRun]);r.postRun.length;){var e=r.postRun.shift();ie.unshift(e)}pe(ie)}}if(!(0<M)){if(r.preRun)for(typeof r.preRun==`function`&&(r.preRun=[r.preRun]);r.preRun.length;)ae();pe(ne),0<M||(r.setStatus?(r.setStatus(`Running...`),setTimeout(function(){setTimeout(function(){r.setStatus(``)},1),e()},1)):e())}}if(r.preInit)for(typeof r.preInit==`function`&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return Ht(),n=o,n})})()}),(e=>{e.exports=JSON.parse(`{"name":"@rive-app/canvas-lite","version":"2.33.3","description":"A lite version of 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 <[email protected]> (https://rive.app)","Maxwell Talbot <[email protected]> (https://rive.app)","Arthur Vivian <[email protected]> (https://rive.app)","Umberto Sonnino <[email protected]> (https://rive.app)","Matthew Sullivan <[email protected]> (mailto:[email protected])"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)}),((e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r.Animation});var r=n(4)}),((e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r});var r=function(){function e(e,t,n,r){this.animation=e,this.artboard=t,this.playing=r,this.loopCount=0,this.scrubTo=null,this.instance=new n.LinearAnimationInstance(e,t)}return Object.defineProperty(e.prototype,`name`,{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`time`,{get:function(){return this.instance.time},set:function(e){this.instance.time=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`loopValue`,{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`needsScrub`,{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.scrubTo===null?this.instance.advance(e):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},e.prototype.apply=function(e){this.instance.apply(e)},e.prototype.cleanup=function(){this.instance.delete()},e}()}),((e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>a.AudioAssetWrapper,AudioWrapper:()=>a.AudioWrapper,BLANK_URL:()=>i.BLANK_URL,CustomFileAssetLoaderWrapper:()=>a.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>a.FileAssetWrapper,FileFinalizer:()=>a.FileFinalizer,FontAssetWrapper:()=>a.FontAssetWrapper,FontWrapper:()=>a.FontWrapper,ImageAssetWrapper:()=>a.ImageAssetWrapper,ImageWrapper:()=>a.ImageWrapper,createFinalization:()=>a.createFinalization,finalizationRegistry:()=>a.finalizationRegistry,registerTouchInteractions:()=>r.registerTouchInteractions,sanitizeUrl:()=>i.sanitizeUrl});var r=n(6),i=n(7),a=n(8)}),((e,t,n)=>{n.r(t),n.d(t,{registerTouchInteractions:()=>a});var r=void 0,i=function(e,t,n){var r=[];if([`touchstart`,`touchmove`].indexOf(e.type)>-1&&e.changedTouches?.length){t||e.preventDefault();for(var i=0,a=n?e.changedTouches.length:1;i<a;){var o=e.changedTouches[i];r.push({clientX:o.clientX,clientY:o.clientY,identifier:o.identifier}),i++}}else if(e.type===`touchend`&&e.changedTouches?.length)for(var i=0,a=n?e.changedTouches.length:1;i<a;){var o=e.changedTouches[i];r.push({clientX:o.clientX,clientY:o.clientY,identifier:o.identifier}),i++}else r.push({clientX:e.clientX,clientY:e.clientY,identifier:0});return r},a=function(e){var t=e.canvas,n=e.artboard,a=e.stateMachines,o=a===void 0?[]:a,s=e.renderer,c=e.rive,l=e.fit,u=e.alignment,d=e.isTouchScrollEnabled,f=d===void 0?!1:d,p=e.dispatchPointerExit,m=p===void 0?!0:p,h=e.enableMultiTouch,g=h===void 0?!1:h,_=e.layoutScaleFactor,v=_===void 0?1:_;if(!t||!o.length||!s||!c||!n||typeof window>`u`)return null;var y=null,b=!1,x=function(e){if(b&&e instanceof MouseEvent){e.type==`mouseup`&&(b=!1);return}b=f&&e.type===`touchend`&&y===`touchstart`,y=e.type;var t=e.currentTarget.getBoundingClientRect(),r=i(e,f,g),a=c.computeAlignment(l,u,{minX:0,minY:0,maxX:t.width,maxY:t.height},n.bounds,v),s=new c.Mat2D;switch(a.invert(s),r.forEach(function(e){var n=e.clientX,r=e.clientY;if(!(!n&&!r)){var i=n-t.left,a=r-t.top,o=new c.Vec2D(i,a),l=c.mapXY(s,o),u=l.x(),d=l.y();e.transformedX=u,e.transformedY=d,l.delete(),o.delete()}}),s.delete(),a.delete(),e.type){case`mouseout`:for(var d=function(e){m?r.forEach(function(t){e.pointerExit(t.transformedX,t.transformedY,t.identifier)}):r.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},p=0,h=o;p<h.length;p++){var _=h[p];d(_)}break;case`touchmove`:case`mouseover`:case`mousemove`:for(var x=function(e){r.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},S=0,C=o;S<C.length;S++){var _=C[S];x(_)}break;case`touchstart`:case`mousedown`:for(var w=function(e){r.forEach(function(t){e.pointerDown(t.transformedX,t.transformedY,t.identifier)})},T=0,E=o;T<E.length;T++){var _=E[T];w(_)}break;case`touchend`:for(var D=function(e){r.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier),e.pointerExit(t.transformedX,t.transformedY,t.identifier)})},O=0,k=o;O<k.length;O++){var _=k[O];D(_)}break;case`mouseup`:for(var A=function(e){r.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier)})},j=0,ee=o;j<ee.length;j++){var _=ee[j];A(_)}break;default:}}.bind(r);return t.addEventListener(`mouseover`,x),t.addEventListener(`mouseout`,x),t.addEventListener(`mousemove`,x),t.addEventListener(`mousedown`,x),t.addEventListener(`mouseup`,x),t.addEventListener(`touchmove`,x,{passive:f}),t.addEventListener(`touchstart`,x,{passive:f}),t.addEventListener(`touchend`,x),function(){t.removeEventListener(`mouseover`,x),t.removeEventListener(`mouseout`,x),t.removeEventListener(`mousemove`,x),t.removeEventListener(`mousedown`,x),t.removeEventListener(`mouseup`,x),t.removeEventListener(`touchmove`,x),t.removeEventListener(`touchstart`,x),t.removeEventListener(`touchend`,x)}}}),((e,t,n)=>{n.r(t),n.d(t,{BLANK_URL:()=>l,sanitizeUrl:()=>f});var r=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,a=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|:)/gim,c=[`.`,`/`],l=`about:blank`;function u(e){return c.indexOf(e[0])>-1}function d(e){return e.replace(o,``).replace(i,function(e,t){return String.fromCharCode(t)})}function f(e){if(!e)return l;var t=d(e).replace(a,``).replace(o,``).trim();if(!t)return l;if(u(t))return t;var n=t.match(s);if(!n)return t;var i=n[0];return r.test(i)?l:t}}),((e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>p,AudioWrapper:()=>c,CustomFileAssetLoaderWrapper:()=>u,FileAssetWrapper:()=>d,FileFinalizer:()=>i,FontAssetWrapper:()=>m,FontWrapper:()=>l,ImageAssetWrapper:()=>f,ImageWrapper:()=>s,createFinalization:()=>_,finalizationRegistry:()=>g});var r=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
16t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=function(){function e(e){this.selfUnref=!1,this._file=e}return e.prototype.unref=function(){this._file&&this._file.unref()},e}(),a=function(){function e(e){this._finalizableObject=e}return e.prototype.unref=function(){this._finalizableObject.unref()},e}(),o=function(){function e(){this.selfUnref=!1}return e.prototype.unref=function(){},e}(),s=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeImage=t,n}return Object.defineProperty(t.prototype,`nativeImage`,{get:function(){return this._nativeImage},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeImage.unref()},t}(o),c=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeAudio=t,n}return Object.defineProperty(t.prototype,`nativeAudio`,{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeAudio.unref()},t}(o),l=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeFont=t,n}return Object.defineProperty(t.prototype,`nativeFont`,{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeFont.unref()},t}(o),u=function(){function e(e,t){this._assetLoaderCallback=t,this.assetLoader=new e.CustomFileAssetLoader({loadContents:this.loadContents.bind(this)})}return e.prototype.loadContents=function(e,t){var n;return e.isImage?n=new f(e):e.isAudio?n=new p(e):e.isFont&&(n=new m(e)),this._assetLoaderCallback(n,t)},e}(),d=function(){function e(e){this._nativeFileAsset=e}return e.prototype.decode=function(e){this._nativeFileAsset.decode(e)},Object.defineProperty(e.prototype,`name`,{get:function(){return this._nativeFileAsset.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`fileExtension`,{get:function(){return this._nativeFileAsset.fileExtension},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`uniqueFilename`,{get:function(){return this._nativeFileAsset.uniqueFilename},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`isAudio`,{get:function(){return this._nativeFileAsset.isAudio},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`isImage`,{get:function(){return this._nativeFileAsset.isImage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`isFont`,{get:function(){return this._nativeFileAsset.isFont},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`cdnUuid`,{get:function(){return this._nativeFileAsset.cdnUuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`nativeFileAsset`,{get:function(){return this._nativeFileAsset},enumerable:!1,configurable:!0}),e}(),f=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setRenderImage=function(e){this._nativeFileAsset.setRenderImage(e.nativeImage)},t}(d),p=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setAudioSource=function(e){this._nativeFileAsset.setAudioSource(e.nativeAudio)},t}(d),m=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setFont=function(e){this._nativeFileAsset.setFont(e.nativeFont)},t}(d),h=function(){function e(e){}return e.prototype.register=function(e){e.selfUnref=!0},e.prototype.unregister=function(e){},e}(),g=new(typeof FinalizationRegistry<`u`?FinalizationRegistry:h)(function(e){e?.unref()}),_=function(e,t){var n=new a(t);g.register(e,n)}})],t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{Alignment:()=>m,DataEnum:()=>M,DrawOptimizationOptions:()=>h,EventType:()=>E,Fit:()=>p,Layout:()=>g,LoopType:()=>D,Rive:()=>ie,RiveEventType:()=>b,RiveFile:()=>re,RuntimeLoader:()=>
16_,StateMachineInput:()=>y,StateMachineInputType:()=>v,Testing:()=>R,ViewModel:()=>ae,ViewModelInstance:()=>P,ViewModelInstanceArtboard:()=>I,ViewModelInstanceAssetImage:()=>pe,ViewModelInstanceBoolean:()=>ce,ViewModelInstanceColor:()=>fe,ViewModelInstanceEnum:()=>ue,ViewModelInstanceList:()=>de,ViewModelInstanceNumber:()=>se,ViewModelInstanceString:()=>oe,ViewModelInstanceTrigger:()=>le,ViewModelInstanceValue:()=>F,decodeAudio:()=>z,decodeFont:()=>he,decodeImage:()=>B});var e=n(1),t=n(2),i=n(3),a=n(5),o=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)},c=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},l=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},u=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},d=function(e){o(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return t}(Error),f=function(e){return e&&e.isHandledError?e.message:`Problem loading file; may be corrupt!`},p;(function(e){e.Cover=`cover`,e.Contain=`contain`,e.Fill=`fill`,e.FitWidth=`fitWidth`,e.FitHeight=`fitHeight`,e.None=`none`,e.ScaleDown=`scaleDown`,e.Layout=`layout`})(p||={});var m;(function(e){e.Center=`center`,e.TopLeft=`topLeft`,e.TopCenter=`topCenter`,e.TopRight=`topRight`,e.CenterLeft=`centerLeft`,e.CenterRight=`centerRight`,e.BottomLeft=`bottomLeft`,e.BottomCenter=`bottomCenter`,e.BottomRight=`bottomRight`})(m||={});var h;(function(e){e.AlwaysDraw=`alwaysDraw`,e.DrawOnChanged=`drawOnChanged`})(h||={});var g=function(){function e(e){this.fit=e?.fit??p.Contain,this.alignment=e?.alignment??m.Center,this.layoutScaleFactor=e?.layoutScaleFactor??1,this.minX=e?.minX??0,this.minY=e?.minY??0,this.maxX=e?.maxX??0,this.maxY=e?.maxY??0}return e.new=function(t){var n=t.fit,r=t.alignment,i=t.minX,a=t.minY,o=t.maxX,s=t.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new e({fit:n,alignment:r,minX:i,minY:a,maxX:o,maxY:s})},e.prototype.copyWith=function(t){var n=t.fit,r=t.alignment,i=t.layoutScaleFactor,a=t.minX,o=t.minY,s=t.maxX,c=t.maxY;return new e({fit:n??this.fit,alignment:r??this.alignment,layoutScaleFactor:i??this.layoutScaleFactor,minX:a??this.minX,minY:o??this.minY,maxX:s??this.maxX,maxY:c??this.maxY})},e.prototype.runtimeFit=function(e){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var t=this.fit===p.Cover?e.Fit.cover:this.fit===p.Contain?e.Fit.contain:this.fit===p.Fill?e.Fit.fill:this.fit===p.FitWidth?e.Fit.fitWidth:this.fit===p.FitHeight?e.Fit.fitHeight:this.fit===p.ScaleDown?e.Fit.scaleDown:this.fit===p.Layout?e.Fit.layout:e.Fit.none;return this.cachedRuntimeFit=t,t},e.prototype.runtimeAlignment=function(e){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var t=this.alignment===m.TopLeft?e.Alignment.topLeft:this.alignment===m.TopCenter?e.Alignment.topCenter:this.alignment===m.TopRight?e.Alignment.topRight:this.alignment===m.CenterLeft?e.Alignment.centerLeft:this.alignment===m.CenterRight?e.Alignment.centerRight:this.alignment===m.BottomLeft?e.Alignment.bottomLeft:this.alignment===m.BottomCenter?e.Alignment.bottomCenter:this.alignment===m.BottomRight?e.Alignment.bottomRight:e.Alignment.center;return this.cachedRuntimeAlignment=t,t},e}(),_=function(){function n(){}return n.loadRuntime=function(){e.default({locateFile:function(){return n.wasmURL}}).then(function(e){var t;for(n.runtime=e;n.callBackQueue.length>0;)(t=n.callBackQueue.shift())==null||t(n.runtime)}).catch(function(e){var r={message:e?.message||`Unknown error`,type:e?.name||`Error`,wasmError:e instanceof WebAssembly.CompileError||e instanceof WebAssembly.RuntimeError,originalError:e};
16console.debug(`Rive WASM load error details:`,r);var i=`https://cdn.jsdelivr.net/npm/${t.name}@${t.version}/rive_fallback.wasm`;if(n.wasmURL.toLowerCase()!==i)console.warn(`Failed to load WASM from ${n.wasmURL} (${r.message}), trying jsdelivr as a backup`),n.setWasmUrl(i),n.loadRuntime();else{var a=[`Could not load Rive WASM file from ${n.wasmURL} or ${i}.`,`Possible reasons:`,`- Network connection is down`,`- WebAssembly is not supported in this environment`,`- The WASM file is corrupted or incompatible`,` 17Error details:`,`- Type: ${r.type}`,`- Message: ${r.message}`,`- WebAssembly-specific error: ${r.wasmError}`,` 18To resolve, you may need to:`,`1. Check your network connection`,`2. Set a new WASM source via RuntimeLoader.setWasmUrl()`,`3. Call RuntimeLoader.loadRuntime() again`].join(` 19`);console.error(a)}})},n.getInstance=function(e){n.isLoading||(n.isLoading=!0,n.loadRuntime()),n.runtime?e(n.runtime):n.callBackQueue.push(e)},n.awaitInstance=function(){return new Promise(function(e){return n.getInstance(function(t){return e(t)})})},n.setWasmUrl=function(e){n.wasmURL=e},n.getWasmUrl=function(){return n.wasmURL},n.isLoading=!1,n.callBackQueue=[],n.wasmURL=`https://unpkg.com/${t.name}@${t.version}/rive.wasm`,n}(),v;(function(e){e[e.Number=56]=`Number`,e[e.Trigger=58]=`Trigger`,e[e.Boolean=59]=`Boolean`})(v||={});var y=function(){function e(e,t){this.type=e,this.runtimeInput=t}return Object.defineProperty(e.prototype,`name`,{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`value`,{get:function(){return this.runtimeInput.value},set:function(e){this.runtimeInput.value=e},enumerable:!1,configurable:!0}),e.prototype.fire=function(){this.type===v.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}(),b;(function(e){e[e.General=128]=`General`,e[e.OpenUrl=131]=`OpenUrl`})(b||={});var x=function(){function e(e){this.isBindableArtboard=!1,this.isBindableArtboard=e}return e}(),S=function(e){o(t,e);function t(t,n){var r=e.call(this,!1)||this;return r.nativeArtboard=t,r.file=n,r}return t}(x),C=function(e){o(t,e);function t(t){var n=e.call(this,!0)||this;return n.selfUnref=!1,n.nativeArtboard=t,n}return t.prototype.destroy=function(){this.selfUnref&&this.nativeArtboard.unref()},t}(x),w=function(){function e(e,t,n,r){this.stateMachine=e,this.playing=n,this.artboard=r,this.inputs=[],this.instance=new t.StateMachineInstance(e,r),this.initInputs(t)}return Object.defineProperty(e.prototype,`name`,{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`statesChanged`,{get:function(){for(var e=[],t=0;t<this.instance.stateChangedCount();t++)e.push(this.instance.stateChangedNameByIndex(t));return e},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.instance.advance(e)},e.prototype.advanceAndApply=function(e){this.instance.advanceAndApply(e)},e.prototype.reportedEventCount=function(){return this.instance.reportedEventCount()},e.prototype.reportedEventAt=function(e){return this.instance.reportedEventAt(e)},e.prototype.initInputs=function(e){for(var t=0;t<this.instance.inputCount();t++){var n=this.instance.input(t);this.inputs.push(this.mapRuntimeInput(n,e))}},e.prototype.mapRuntimeInput=function(e,t){if(e.type===t.SMIInput.bool)return new y(v.Boolean,e.asBool());if(e.type===t.SMIInput.number)return new y(v.Number,e.asNumber());if(e.type===t.SMIInput.trigger)return new y(v.Trigger,e.asTrigger())},e.prototype.cleanup=function(){this.inputs.forEach(function(e){e.delete()}),this.inputs.length=0,this.instance.delete()},e.prototype.bindViewModelInstance=function(e){e.runtimeInstance!=null&&this.instance.bindViewModelInstance(e.runtimeInstance)},e}(),T=function(){function e(e,t,n,r,i){r===void 0&&(r=[]),i===void 0&&(i=[]),this.runtime=e,this.artboard=t,this.eventManager=n,this.animations=r,this.stateMachines=i}return e.prototype.add=function(e,t,n){if(n===void 0&&(n=!0),e=L(e),e.length===0)this.animations.forEach(function(e){return e.playing=t}),this.stateMachines.forEach(function(e){return e.playing=t});else for(var r=this.animations.map(function(e){return e.name}),a=this.stateMachines.map(function(e){return e.name}),o=0;o<e.length;o++){var s=r.indexOf(e[o]),c=a.indexOf(e[o]);if(s>
19=0||c>=0)s>=0?this.animations[s].playing=t:this.stateMachines[c].playing=t;else{var l=this.artboard.animationByName(e[o]);if(l){var u=new i.Animation(l,this.artboard,this.runtime,t);u.advance(0),u.apply(1),this.animations.push(u)}else{var d=this.artboard.stateMachineByName(e[o]);if(d){var f=new w(d,this.runtime,t,this.artboard);this.stateMachines.push(f)}}}}return n&&(t?this.eventManager.fire({type:E.Play,data:this.playing}):this.eventManager.fire({type:E.Pause,data:this.paused})),t?this.playing:this.paused},e.prototype.initLinearAnimations=function(e,t){for(var n=this.animations.map(function(e){return e.name}),r=0;r<e.length;r++){var a=n.indexOf(e[r]);if(a>=0)this.animations[a].playing=t;else{var o=this.artboard.animationByName(e[r]);if(o){var s=new i.Animation(o,this.artboard,this.runtime,t);s.advance(0),s.apply(1),this.animations.push(s)}else console.error(`Animation with name ${e[r]} not found.`)}}},e.prototype.initStateMachines=function(e,t){for(var n=this.stateMachines.map(function(e){return e.name}),r=0;r<e.length;r++){var i=n.indexOf(e[r]);if(i>=0)this.stateMachines[i].playing=t;else{var a=this.artboard.stateMachineByName(e[r]);if(a){var o=new w(a,this.runtime,t,this.artboard);this.stateMachines.push(o)}else console.warn(`State Machine with name ${e[r]} not found.`),this.initLinearAnimations([e[r]],t)}}},e.prototype.play=function(e){return this.add(e,!0)},e.prototype.advanceIfPaused=function(){this.stateMachines.forEach(function(e){e.playing||e.advanceAndApply(0)})},e.prototype.pause=function(e){return this.add(e,!1)},e.prototype.scrub=function(e,t){var n=this.animations.filter(function(t){return e.includes(t.name)});return n.forEach(function(e){return e.scrubTo=t}),n.map(function(e){return e.name})},Object.defineProperty(e.prototype,`playing`,{get:function(){return this.animations.filter(function(e){return e.playing}).map(function(e){return e.name}).concat(this.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`paused`,{get:function(){return this.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}).concat(this.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}))},enumerable:!1,configurable:!0}),e.prototype.stop=function(e){var t=this;e=L(e);var n=[];if(e.length===0)n=this.animations.map(function(e){return e.name}).concat(this.stateMachines.map(function(e){return e.name})),this.animations.forEach(function(e){return e.cleanup()}),this.stateMachines.forEach(function(e){return e.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var r=this.animations.filter(function(t){return e.includes(t.name)});r.forEach(function(e){e.cleanup(),t.animations.splice(t.animations.indexOf(e),1)});var i=this.stateMachines.filter(function(t){return e.includes(t.name)});i.forEach(function(e){e.cleanup(),t.stateMachines.splice(t.stateMachines.indexOf(e),1)}),n=r.map(function(e){return e.name}).concat(i.map(function(e){return e.name}))}return this.eventManager.fire({type:E.Stop,data:n}),n},Object.defineProperty(e.prototype,`isPlaying`,{get:function(){return this.animations.reduce(function(e,t){return e||t.playing},!1)||this.stateMachines.reduce(function(e,t){return e||t.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`isPaused`,{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`isStopped`,{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),e.prototype.atLeastOne=function(e,t){t===void 0&&(t=!0);var n;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([n=this.artboard.animationByIndex(0).name],e,t):this.artboard.stateMachineCount()>0&&this.add([n=this.artboard.stateMachineByIndex(0).name],e,t)),n},e.prototype.handleLooping=function(){for(var e=0,t=this.animations.filter(function(e){return e.playing});e<t.length;e++){var n=t[e];n.loopValue===0&&n.loopCount?(n.loopCount=0,this.stop(n.name)):n.loopValue===1&&n.loopCount?(this.eventManager.fire({type:E.Loop,data:{animation:n.name,type:D.Loop}}),n.loopCount=0):n.loopValue===2&&n.loopCount>1&&(this.eventManager.fire({type:E.Loop,data:{animation:n.name,type:D.PingPong}}),n.loopCount=0)}},e.prototype.handleStateChanges=function(){for(var e=[],t=0,n=this.stateMachines.filter(function(e){return e.playing});t<n.length;t++){var r=n[t];e.push.apply(e,r.statesChanged)}e.length>0&&this.eventManager.fire({type:E.StateChange,data:e})},e.prototype.handleAdvancing=function(e){this.eventManager.fire({type:E.Advance,data:e})},e}(),E;(function(e){e.Load=`load`,e.LoadError=`loaderror`,e.Play=`play`,e.Pause=`pause`,e.Stop=`stop`,e.Loop=`loop`,e.Draw=`draw`,e.Advance=`advance`,e.StateChange=`statechange`,e.RiveEvent=`riveevent`,e.AudioStatusChange=`audiostatuschange`})(E||={});var D;
19(function(e){e.OneShot=`oneshot`,e.Loop=`loop`,e.PingPong=`pingpong`})(D||={});var O=function(){function e(e){e===void 0&&(e=[]),this.listeners=e}return e.prototype.getListeners=function(e){return this.listeners.filter(function(t){return t.type===e})},e.prototype.add=function(e){this.listeners.includes(e)||this.listeners.push(e)},e.prototype.remove=function(e){for(var t=0;t<this.listeners.length;t++){var n=this.listeners[t];if(n.type===e.type&&n.callback===e.callback){this.listeners.splice(t,1);break}}},e.prototype.removeAll=function(e){var t=this;e?this.listeners.filter(function(t){return t.type===e}).forEach(function(e){return t.remove(e)}):this.listeners.splice(0,this.listeners.length)},e.prototype.fire=function(e){this.getListeners(e.type).forEach(function(t){return t.callback(e)})},e}(),k=function(){function e(e){this.eventManager=e,this.queue=[]}return e.prototype.add=function(e){this.queue.push(e)},e.prototype.process=function(){for(;this.queue.length>0;){var e=this.queue.shift();e?.action&&e.action(),e?.event&&this.eventManager.fire(e.event)}},e}(),A;(function(e){e[e.AVAILABLE=0]=`AVAILABLE`,e[e.UNAVAILABLE=1]=`UNAVAILABLE`})(A||={});var j=new(function(e){o(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=A.UNAVAILABLE,t}return t.prototype.delay=function(e){return c(this,void 0,void 0,function(){return l(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})},t.prototype.timeout=function(){return c(this,void 0,void 0,function(){return l(this,function(e){return[2,new Promise(function(e,t){return setTimeout(t,50)})]})})},t.prototype.reportToListeners=function(){this.fire({type:E.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){return this._enabled||(this._enabled=!0,this._status=A.AVAILABLE,this.reportToListeners()),[2]})})},t.prototype.testAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:if(!(this._status===A.UNAVAILABLE&&this._audioContext!==null))return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return e.sent(),this.enableAudio(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}})})},t.prototype._establishAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this._started?[3,5]:(this._started=!0,typeof window>`u`?(this.enableAudio(),[3,5]):[3,1]);case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:return this._status===A.UNAVAILABLE?[4,this.testAudio()]:[3,5];case 3:return e.sent(),[4,this.delay(1e3)];case 4:return e.sent(),[3,2];case 5:return[2]}})})},t.prototype.listenForUserAction=function(){var e=this;document.addEventListener(`pointerdown`,function(){return c(e,void 0,void 0,function(){return l(this,function(e){return this.enableAudio(),[2]})})},{once:!0})},t.prototype.establishAudio=function(){return c(this,void 0,void 0,function(){return l(this,function(e){return this._establishAudio(),[2]})})},Object.defineProperty(t.prototype,`systemVolume`,{get:function(){return this._status===A.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`status`,{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(O)),ee=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),te=globalThis.ResizeObserver||ee,ne=new(function(){function e(){var e=this;this._elementsMap=new Map,this._onObservedEntry=function(t){var n=e._elementsMap.get(t.target);n===null?e._resizeObserver.unobserve(t.target):n.onResize(t.target.clientWidth==0||t.target.clientHeight==0)},this._onObserved=function(t){t.forEach(e._onObservedEntry)},this._resizeObserver=new te(this._onObserved)}return e.prototype.add=function(e,t){var n={onResize:t,element:e};return this._elementsMap.set(e,n),this._resizeObserver.observe(e),n},e.prototype.remove=function(e){this._resizeObserver.unobserve(e.element),this._elementsMap.delete(e.element)},e}()),re=function(){function e(e){this.enableRiveAssetCDN=!0,this.referenceCount=0,this.destroyed=!1,this.selfUnref=!1,this.bindableArtboards=[],this.src=e.src,this.buffer=e.buffer,e.assetLoader&&(this.assetLoader=e.assetLoader),this.enableRiveAssetCDN=typeof e.enableRiveAssetCDN==`boolean`?e.enableRiveAssetCDN:!0,this.eventManager=new O,e.onLoad&&this.on(E.Load,e.onLoad),e.onLoadError&&this.on(E.LoadError,e.onLoadError)}return e.prototype.releaseFile=function(){var e;this.selfUnref&&((e=this.file)==null||e.unref()),this.file=null},e.prototype.releaseBindableArtboards=function(){this.bindableArtboards.forEach(function(e){return e.destroy()})},e.prototype.initData=function(){return c(this,void 0,void 0,function(){var t,n,r,i,o;return l(this,function(s){switch(s.label){case 0:return this.src?(t=this,[4,me(this.src)]):[3,2];case 1:t.buffer=s.sent(),s.label=2;case 2:return this.destroyed?[2]:(this.assetLoader&&(r=new a.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),n=r.assetLoader),i=this,[4,this.runtime.load(new Uint8Array(this.buffer),n,this.enableRiveAssetCDN)]);case 3:return i.file=s.sent(),o=new a.FileFinalizer(this.file),a.finalizationRegistry.register(this,o),this.destroyed?(this.releaseFile(),[2]):(this.file===null?this.fireLoadError(e.fileLoadErrorMessage):this.eventManager.fire({type:E.Load,data:this}),[2])}})})},e.prototype.init=function(){return c(this,void 0,void 0,function(){var t,n;return l(this,function(r){switch(r.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(e.missingErrorMessage),[2];r.label=1;case 1:return r.trys.push([1,4,,5]),t=this,[4,_.awaitInstance()];case 2:return t.runtime=r.sent(),this.destroyed?[2]:[4,this.initData()];case 3:return r.sent(),[3,5];case 4:return n=r.sent(),this.fireLoadError(n instanceof Error?n.message:e.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:E.LoadError,data:e}),Error(e)},e.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},e.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},e.prototype.cleanup=function(){--this.referenceCount,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),this.releaseFile(),this.releaseBindableArtboards(),this.destroyed=!0)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.getInstance=function(){if(this.file!==null)return this.referenceCount+=1,this.file},e.prototype.destroyIfUnused=function(){this.referenceCount<=0&&this.cleanup()},e.prototype.createBindableArtboard=function(e){if(e!=null){var t=new C(e);return(0,a.createFinalization)(t,t.nativeArtboard),this.bindableArtboards.push(t),t}return null},e.prototype.getArtboard=function(e){var t=this.file.artboardByName(e);
19if(t!=null)return new S(t,this)},e.prototype.getBindableArtboard=function(e){var t=this.file.bindableArtboardByName(e);return this.createBindableArtboard(t)},e.prototype.getDefaultBindableArtboard=function(){var e=this.file.bindableArtboardDefault();return this.createBindableArtboard(e)},e.prototype.internalBindableArtboardFromArtboard=function(e){var t=this.file.internalBindableArtboardFromArtboard(e);return this.createBindableArtboard(t)},e.missingErrorMessage=`Rive source file or data buffer required`,e.fileLoadErrorMessage=`The file failed to load`,e}(),ie=function(){function e(e){var t=this;this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.dispatchPointerExit=!0,this.enableMultiTouch=!1,this.enableRiveAssetCDN=!0,this._volume=1,this._artboardWidth=void 0,this._artboardHeight=void 0,this._devicePixelRatioUsed=1,this._hasZeroSize=!1,this._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,this.drawOptimization=h.DrawOnChanged,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(e){var n=t._hasZeroSize!==e;t._hasZeroSize=e,e?(!t._layout.maxX||!t._layout.maxY)&&t.resizeToCanvas():n&&t.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=e.canvas,e.canvas.constructor===HTMLCanvasElement&&(this._observed=ne.add(this.canvas,this.onCanvasResize)),this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=e.layout??new g,this.shouldDisableRiveListeners=!!e.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!e.isTouchScrollEnabled,this.automaticallyHandleEvents=!!e.automaticallyHandleEvents,this.dispatchPointerExit=e.dispatchPointerExit===!1?e.dispatchPointerExit:this.dispatchPointerExit,this.enableMultiTouch=!!e.enableMultiTouch,this.drawOptimization=e.drawingOptions??this.drawOptimization,this.enableRiveAssetCDN=e.enableRiveAssetCDN===void 0?!0:e.enableRiveAssetCDN,this.eventManager=new O,e.onLoad&&this.on(E.Load,e.onLoad),e.onLoadError&&this.on(E.LoadError,e.onLoadError),e.onPlay&&this.on(E.Play,e.onPlay),e.onPause&&this.on(E.Pause,e.onPause),e.onStop&&this.on(E.Stop,e.onStop),e.onLoop&&this.on(E.Loop,e.onLoop),e.onStateChange&&this.on(E.StateChange,e.onStateChange),e.onAdvance&&this.on(E.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(E.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(E.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(E.Play,e.onplay),e.onpause&&!e.onPause&&this.on(E.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(E.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(E.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(E.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new k(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:e.autoplay,autoBind:e.autoBind,animations:e.animations,stateMachines:e.stateMachines,artboard:e.artboard,useOffscreenRenderer:e.useOffscreenRenderer})}return Object.defineProperty(e.prototype,`viewModelCount`,{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),e.new=function(t){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new e(t)},e.prototype.onSystemAudioChanged=function(){this.volume=this._volume},e.prototype.init=function(t){var n=this,r=t.src,i=t.buffer,a=t.riveFile,o=t.animations,s=t.stateMachines,c=t.artboard,l=t.autoplay,u=l===void 0?!1:l,f=t.useOffscreenRenderer,p=f===void 0?!1:f,m=t.autoBind,h=m===void 0?!1:m;if(!this.destroyed){if(this.src=r,this.buffer=i,this.riveFile=a,!this.src&&!this.buffer&&!this.riveFile)throw new d(e.missingErrorMessage);var g=L(o),v=L(s);this.loaded=!1,this.readyForPlaying=!1,_.awaitInstance().then(function(e){n.destroyed||(n.runtime=e,n.removeRiveListeners(),n.deleteRiveRenderer(),n.renderer=n.runtime.makeRenderer(n.canvas,p),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(c,g,v,u,h).then(function(e){if(e)return n.setupRiveListeners()}).catch(function(e){console.error(e)}))}).catch(function(e){console.error(e)})}},e.prototype.setupRiveListeners=function(e){var t=this;if(this.eventCleanup&&this.eventCleanup(),!this.shouldDisableRiveListeners){var n=(this.animator.stateMachines||[]).filter(function(e){return e.playing&&t.runtime.hasListeners(e.instance)}).map(function(e){return e.instance}),r=this.isTouchScrollEnabled,i=this.dispatchPointerExit,o=this.enableMultiTouch;e&&`isTouchScrollEnabled`in e&&(r=e.isTouchScrollEnabled),this.eventCleanup=(0,a.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:n,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:r,dispatchPointerExit:i,enableMultiTouch:o,layoutScaleFactor:this._layout.layoutScaleFactor})}},e.prototype.removeRiveListeners=function(){this.eventCleanup&&=(this.eventCleanup(),null)},e.prototype.initializeAudio=function(){var e=this;j.status==A.UNAVAILABLE&&this.artboard?.hasAudio&&this._audioEventListener===null&&(this._audioEventListener={type:E.AudioStatusChange,callback:function(){return e.onSystemAudioChanged()}},j.add(this._audioEventListener),j.establishAudio())},e.prototype.initArtboardSize=function(){this.artboard&&(this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height)},e.prototype.initData=function(e,t,n,r,i){return c(this,void 0,void 0,function(){var a,o,s;return l(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),this.riveFile==null?(a=new re({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=a,[4,a.init()]):[3,2];case 1:if(c.sent(),this.destroyed)return a.destroyIfUnused(),[2,!1];c.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,r,i),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:E.Load,data:this.src??`buffer`}),this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return o=c.sent(),s=f(o),console.warn(s),this.eventManager.fire({type:E.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}})})},e.prototype.initArtboard=function(e,t,n,r,i){if(this.file){var o=e?this.file.artboardByName(e):this.file.defaultArtboard();if(!o){var s=`Invalid artboard name or no default artboard`;console.warn(s),this.eventManager.fire({type:E.LoadError,data:s});return}this.artboard=o,o.volume=this._volume*j.systemVolume,this.animator=new T(this.runtime,this.artboard,this.eventManager);var c;if(t.length>0||n.length>0?(c=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):c=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?E.Play:E.Pause,data:c}}),i){var l=this.file.defaultArtboardViewModel(o);if(l!==null){var u=l.defaultInstance();if(u!==null){var d=new P(u,null);(0,a.createFinalization)(d,d.runtimeInstance),this.bindViewModelInstance(d)}}}}},e.prototype.drawFrame=function(){var e;(document==null?void 0:document.timeline)?.currentTime?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),(e=this.runtime)==null||e.resolveAnimationFrame()):this.scheduleRendering()},e.prototype.draw=function(e,t){var n;this.frameRequestId=null;var r=performance.now();this.lastRenderTime||=e,this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,t?.());var i=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e;for(var o=this.animator.animations.filter(function(e){return e.playing||e.needsScrub}).sort(function(e){return e.needsScrub?-1:1}),s=0,c=o;s<c.length;s++){var l=c[s];l.advance(i),l.instance.didLoop&&(l.loopCount+=1),l.apply(1)}for(var u=this.animator.stateMachines.filter(function(e){return e.playing}),d=0,f=u;d<f.length;d++){var p=f[d],m=p.reportedEventCount();if(m)for(var g=0;g<m;g++){var _=p.reportedEventAt(g);if(_)if(_.type===b.OpenUrl){if(this.eventManager.fire({type:E.RiveEvent,data:_}),this.automaticallyHandleEvents){var v=document.createElement(`a`),y=_,x=y.url,S=y.target,C=(0,a.sanitizeUrl)(x);x&&v.setAttribute(`href`,C),S&&v.setAttribute(`target`,S),C&&C!==a.BLANK_URL&&v.click()}}else this.eventManager.fire({type:E.RiveEvent,data:_})}p.advanceAndApply(i)}this.animator.stateMachines.length==0&&this.artboard.advance(i);var w=this.renderer;this._hasZeroSize||(this.drawOptimization==h.AlwaysDraw||this.artboard.didChange())&&(w.clear(),w.save(),this.alignRenderer(),this.artboard.draw(w),w.restore(
19),w.flush()),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(i),this.frameCount++;var T=performance.now();for(this.frameTimes.push(T),this.durations.push(T-r);this.frameTimes[0]<=T-1e3;)this.frameTimes.shift(),this.durations.shift();(n=this._viewModelInstance)==null||n.handleCallbacks(),this.animator.isPlaying?this.scheduleRendering():(this.animator.isPaused||this.animator.isStopped)&&(this.lastRenderTime=0)},e.prototype.alignRenderer=function(){var e=this,t=e.renderer,n=e.runtime,r=e._layout,i=e.artboard;t.align(r.runtimeFit(n),r.runtimeAlignment(n),{minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY},i.bounds,this._devicePixelRatioUsed*r.layoutScaleFactor)},Object.defineProperty(e.prototype,`fps`,{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`frameTime`,{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(e,t){return e+t},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),e.prototype.cleanup=function(){var e,t;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),this._observed!==null&&ne.remove(this._observed),this.removeRiveListeners(),this.file&&=((e=this.riveFile)==null||e.cleanup(),null),this.riveFile=null,this.deleteRiveRenderer(),this._audioEventListener!==null&&(j.remove(this._audioEventListener),this._audioEventListener=null),(t=this._viewModelInstance)==null||t.cleanup(),this._viewModelInstance=null,this._dataEnums=null},e.prototype.deleteRiveRenderer=function(){var e;(e=this.renderer)==null||e.delete(),this.renderer=null},e.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&=(this.artboard.delete(),null)},e.prototype.retrieveTextRun=function(e){if(!e){console.warn(`No text run name provided`);return}if(!this.artboard){console.warn(`Tried to access text run, but the Artboard is null`);return}var t=this.artboard.textRun(e);if(!t){console.warn(`Could not access a text run with name '${e}' in the '${this.artboard?.name}' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime.`);return}return t},e.prototype.getTextRunValue=function(e){var t=this.retrieveTextRun(e);return t?t.text:void 0},e.prototype.setTextRunValue=function(e,t){var n=this.retrieveTextRun(e);n&&(n.text=t)},e.prototype.play=function(e,t){var n=this;if(e=L(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return n.play(e,t)}});return}this.animator.play(e),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},e.prototype.pause=function(e){var t=this;if(e=L(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return t.pause(e)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(e)},e.prototype.scrub=function(e,t){var n=this;if(e=L(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return n.scrub(e,t)}});return}this.animator.scrub(e,t||0),this.drawFrame()},e.prototype.stop=function(e){var t=this;if(e=L(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return t.stop(e)}});return}this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup()},e.prototype.reset=function(e){var t=e?.artboard,n=L(e?.animations),r=L(e?.stateMachines),i=e?.autoplay??!1,a=e?.autoBind??!1;this.cleanupInstances(),this.initArtboard(t,n,r,i,a),this.taskQueue.process()},e.prototype.load=function(e){this.file=null,this.stop(),this.init(e)},Object.defineProperty(e.prototype,`layout`,{get:function(){return this._layout},set:function(e){this._layout=e,(!e.maxX||!e.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),e.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},e.prototype.resizeDrawingSurfaceToCanvas=function(e){if(this.canvas instanceof HTMLCanvasElement&&window){var t=this.canvas.getBoundingClientRect(),n=t.width,r=t.height,i=e||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=i,this.canvas.width=i*n,this.canvas.height=i*r,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===p.Layout){var a=this._layout.layoutScaleFactor;this.artboard.width=n/a,this.artboard.height=r/a}}},Object.defineProperty(e.prototype,`source`,{get:function(){return this.src}
19,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`activeArtboard`,{get:function(){return this.artboard?this.artboard.name:``},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`animationNames`,{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.animationCount();t++)e.push(this.artboard.animationByIndex(t).name);return e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`stateMachineNames`,{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.stateMachineCount();t++)e.push(this.artboard.stateMachineByIndex(t).name);return e},enumerable:!1,configurable:!0}),e.prototype.stateMachineInputs=function(e){if(this.loaded)return this.animator.stateMachines.find(function(t){return t.name===e})?.inputs},e.prototype.retrieveInputAtPath=function(e,t){if(!e){console.warn(`No input name provided for path '${t}'`);return}if(!this.artboard){console.warn(`Tried to access input: '${e}', at path: '${t}', but the Artboard is null`);return}var n=this.artboard.inputByPath(e,t);if(!n){console.warn(`Could not access an input with name: '${e}', at path:'${t}'`);return}return n},e.prototype.setBooleanStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===v.Boolean?r.asBool().value=t:console.warn(`Input with name: '${e}', at path:'${n}' is not a boolean`))},e.prototype.setNumberStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===v.Number?r.asNumber().value=t:console.warn(`Input with name: '${e}', at path:'${n}' is not a number`))},e.prototype.fireStateAtPath=function(e,t){var n=this.retrieveInputAtPath(e,t);n&&(n.type===v.Trigger?n.asTrigger().fire():console.warn(`Input with name: '${e}', at path:'${t}' is not a trigger`))},e.prototype.retrieveTextAtPath=function(e,t){if(!e){console.warn(`No text name provided for path '${t}'`);return}if(!t){console.warn(`No path provided for text '${e}'`);return}if(!this.artboard){console.warn(`Tried to access text: '${e}', at path: '${t}', but the Artboard is null`);return}var n=this.artboard.textByPath(e,t);if(!n){console.warn(`Could not access text with name: '${e}', at path:'${t}'`);return}return n},e.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);if(!n){console.warn(`Could not get text with name: '${e}', at path:'${t}'`);return}return n.text},e.prototype.setTextRunValueAtPath=function(e,t,n){var r=this.retrieveTextAtPath(e,n);if(!r){console.warn(`Could not set text with name: '${e}', at path:'${n}'`);return}r.text=t},Object.defineProperty(e.prototype,`playingStateMachineNames`,{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`playingAnimationNames`,{get:function(){return this.loaded?this.animator.animations.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`pausedAnimationNames`,{get:function(){return this.loaded?this.animator.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`pausedStateMachineNames`,{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`isPlaying`,{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`isPaused`,{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`isStopped`,{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`bounds`,{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},e.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},e.prototype.unsubscribe=function(e,t){console.warn("This function is deprecated: please use `off()` instead."),this.off(e,t)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.unsubscribeAll=function(e){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(e)},e.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},e.prototype.startRendering=function(){this.drawFrame()},e.prototype.scheduleRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this._boundDraw):this.frameRequestId=requestAnimationFrame(this._boundDraw))},e.prototype.enableFPSCounter=function(e){this.runtime.enableFPSCounter(e)},e.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(e.prototype,`contents`,{get:function(){if(this.loaded){for(var e={artboards:[]},t=0;t<this.file.artboardCount();t++){for(var n=this.file.artboardByIndex(t),r={name:n.name,animations:[],stateMachines:[]},i=0;i<n.animationCount();i++){var a=n.animationByIndex(i);r.animations.push(a.name)}for(var o=0;o<n.stateMachineCount();
19o++){for(var s=n.stateMachineByIndex(o),c=s.name,l=new this.runtime.StateMachineInstance(s,n),u=[],d=0;d<l.inputCount();d++){var f=l.input(d);u.push({name:f.name,type:f.type})}r.stateMachines.push({name:c,inputs:u})}e.artboards.push(r)}return e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`volume`,{get:function(){return this.artboard&&this.artboard.volume!==this._volume&&(this._volume=this.artboard.volume),this._volume},set:function(e){this._volume=e,this.artboard&&(this.artboard.volume=e*j.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`artboardWidth`,{get:function(){return this.artboard?this.artboard.width:this._artboardWidth??0},set:function(e){this._artboardWidth=e,this.artboard&&(this.artboard.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`artboardHeight`,{get:function(){return this.artboard?this.artboard.height:this._artboardHeight??0},set:function(e){this._artboardHeight=e,this.artboard&&(this.artboard.height=e)},enumerable:!1,configurable:!0}),e.prototype.resetArtboardSize=function(){this.artboard?(this.artboard.resetArtboardSize(),this._artboardWidth=this.artboard.width,this._artboardHeight=this.artboard.height):(this._artboardWidth=void 0,this._artboardHeight=void 0)},Object.defineProperty(e.prototype,`devicePixelRatioUsed`,{get:function(){return this._devicePixelRatioUsed},set:function(e){this._devicePixelRatioUsed=e},enumerable:!1,configurable:!0}),e.prototype.bindViewModelInstance=function(e){var t;this.artboard&&!this.destroyed&&e&&e.runtimeInstance&&(e.internalIncrementReferenceCount(),(t=this._viewModelInstance)==null||t.cleanup(),this._viewModelInstance=e,this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(t){return t.bindViewModelInstance(e)}):this.artboard.bindViewModelInstance(e.runtimeInstance))},Object.defineProperty(e.prototype,`viewModelInstance`,{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),e.prototype.viewModelByIndex=function(e){var t=this.file.viewModelByIndex(e);return t===null?null:new ae(t)},e.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return t===null?null:new ae(t)},e.prototype.enums=function(){if(this._dataEnums===null){var e=this.file.enums();this._dataEnums=e.map(function(e){return new M(e)})}return this._dataEnums},e.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new ae(e)}return null},e.prototype.getArtboard=function(e){return this.riveFile?.getArtboard(e)??null},e.prototype.getBindableArtboard=function(e){return this.riveFile?.getBindableArtboard(e)??null},e.prototype.getDefaultBindableArtboard=function(){return this.riveFile?.getDefaultBindableArtboard()??null},e.missingErrorMessage=`Rive source file or data buffer required`,e.cleanupErrorMessage=`Attempt to use file after calling cleanup.`,e}(),ae=function(){function e(e){this._viewModel=e}return Object.defineProperty(e.prototype,`instanceCount`,{get:function(){return this._viewModel.instanceCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`name`,{get:function(){return this._viewModel.name},enumerable:!1,configurable:!0}),e.prototype.instanceByIndex=function(e){var t=this._viewModel.instanceByIndex(e);if(t!==null){var n=new P(t,null);return(0,a.createFinalization)(n,t),n}return null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);if(t!==null){var n=new P(t,null);return(0,a.createFinalization)(n,t),n}return null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();if(e!==null){var t=new P(e,null);return(0,a.createFinalization)(t,e),t}return null},e.prototype.instance=function(){var e=this._viewModel.instance();if(e!==null){var t=new P(e,null);return(0,a.createFinalization)(t,e),t}return null},Object.defineProperty(e.prototype,`properties`,{get:function(){return this._viewModel.getProperties()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`instanceNames`,{get:function(){return this._viewModel.getInstanceNames()}
19,enumerable:!1,configurable:!0}),e}(),M=function(){function e(e){this._dataEnum=e}return Object.defineProperty(e.prototype,`name`,{get:function(){return this._dataEnum.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`values`,{get:function(){return this._dataEnum.values},enumerable:!1,configurable:!0}),e}(),N;(function(e){e.Number=`number`,e.String=`string`,e.Boolean=`boolean`,e.Color=`color`,e.Trigger=`trigger`,e.Enum=`enum`,e.List=`list`,e.Image=`image`,e.Artboard=`artboard`})(N||={});var P=function(){function e(e,t){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this.selfUnref=!1,this._runtimeInstance=e,t!==null&&this._parents.push(t)}return Object.defineProperty(e.prototype,`runtimeInstance`,{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`nativeInstance`,{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),e.prototype.handleCallbacks=function(){this._propertiesWithCallbacks.length!==0&&(this._propertiesWithCallbacks.forEach(function(e){e.handleCallbacks()}),this._propertiesWithCallbacks.forEach(function(e){e.clearChanges()})),this._children.forEach(function(e){return e.handleCallbacks()})},e.prototype.addParent=function(e){this._parents.includes(e)||(this._parents.push(e),(this._propertiesWithCallbacks.length>0||this._children.length>0)&&e.addToViewModelCallbacks(this))},e.prototype.removeParent=function(e){var t=this._parents.indexOf(e);t!==-1&&(this._parents[t].removeFromViewModelCallbacks(this),this._parents.splice(t,1))},e.prototype.addToPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)||(this._propertiesWithCallbacks.push(e),this._propertiesWithCallbacks.length>0&&this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(t){return t!==e}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.addToViewModelCallbacks=function(e){var t=this;this._children.includes(e)||(this._children.push(e),this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromViewModelCallbacks=function(e){var t=this;this._children.includes(e)&&(this._children=this._children.filter(function(t){return t!==e}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(e){e.clearCallbacks()})},e.prototype.propertyFromPath=function(e,t){var n=e.split(`/`);return this.propertyFromPathSegments(n,0,t)},e.prototype.viewModelFromPathSegments=function(e,t){var n=this.internalViewModelInstance(e[t]);return n===null?null:t==e.length-1?n:n.viewModelFromPathSegments(e,t++)},e.prototype.propertyFromPathSegments=function(e,t,n){if(t<e.length-1){var r=this.internalViewModelInstance(e[t]);return r===null?null:r.propertyFromPathSegments(e,t+1,n)}var i=null;switch(n){case N.Number:if(i=this._runtimeInstance?.number(e[t])??null,i!==null)return new se(i,this);break;case N.String:if(i=this._runtimeInstance?.string(e[t])??null,i!==null)return new oe(i,this);break;case N.Boolean:if(i=this._runtimeInstance?.boolean(e[t])??null,i!==null)return new ce(i,this);break;case N.Color:if(i=this._runtimeInstance?.color(e[t])??null,i!==null)return new fe(i,this);break;case N.Trigger:if(i=this._runtimeInstance?.trigger(e[t])??null,i!==null)return new le(i,this);break;case N.Enum:if(i=this._runtimeInstance?.enum(e[t])??null,i!==null)return new ue(i,this);break;case N.List:if(i=this._runtimeInstance?.list(e[t])??null,i!==null)return new de(i,this);break;case N.Image:if(i=this._runtimeInstance?.image(e[t])??null,i!==null)return new pe(i,this);break;case N.Artboard:if(i=this._runtimeInstance?.artboard(e[t])??null,i!==null)return new I(i,this);break}return null},e.prototype.internalViewModelInstance=function(t){if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var n=this._runtimeInstance?.viewModel(t);if(n!==null){var r=new e(n,this);return(0,a.createFinalization)(r,n),r.internalIncrementReferenceCount(),this._viewModelInstances.set(t,r),r}return null},e.prototype.number=function(e){return this.propertyFromPath(e,N.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,N.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,N.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,N.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,N.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,N.Enum)},e.prototype.list=function(e){return this.propertyFromPath(e,N.List)},e.prototype.image=function(e){return this.propertyFromPath(e,N.Image)},e.prototype.artboard=function(e){return this.propertyFromPath(e,N.Artboard)},e.prototype.viewModel=function(e){var t=e.split(`/`),n=t.length>1?this.viewModelFromPathSegments(t.slice(0,t.length-1),0):this;return n==null?null:n.internalViewModelInstance(t[t.length-1])},e.prototype.internalReplaceViewModel=function(e,t){if(t.runtimeInstance!==null){var n=this._runtimeInstance?.replaceViewModel(e,t.runtimeInstance)||!1;if(n){t.internalIncrementReferenceCount();var r=this.internalViewModelInstance(e);r!==null&&(r.removeParent(this),this._children.includes(r)&&(this._children=this._children.filter(function(e){return e!==r})),r.cleanup()),this._viewModelInstances.set(e,t),t.addParent(this)}return n}return!1},e.prototype.replaceViewModel=function(e,t){var n=e.split(`/`);return(n.length>1?this.viewModelFromPathSegments(n.slice(0,n.length-1),0):this)?.internalReplaceViewModel(n[n.length-1],t)??!1},e.prototype.incrementReferenceCount=function(){var e;this._referenceCount++,(e=this._runtimeInstance)==null||e.incrementReferenceCount()},e.prototype.decrementReferenceCount=function(){var e;this._referenceCount--,(e=this._runtimeInstance)==null||e.decrementReferenceCount()},Object.defineProperty(e.prototype,`properties`,{get:function(){return this._runtimeInstance?.getProperties().map(function(e){return s({},e)})||[]}
19,enumerable:!1,configurable:!0}),e.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},e.prototype.cleanup=function(){var e=this,t;if(this._referenceCount--,this._referenceCount<=0){this.selfUnref&&((t=this._runtimeInstance)==null||t.unref()),this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach(function(e){e.cleanup()}),this._viewModelInstances.clear();var n=u([],this._children,!0);this._children.length=0;var r=u([],this._parents,!0);this._parents.length=0,n.forEach(function(t){t.removeParent(e)}),r.forEach(function(t){t.removeFromViewModelCallbacks(e)})}},e}(),F=function(){function e(e,t){this.callbacks=[],this._viewModelInstanceValue=e,this._parentViewModel=t}return e.prototype.on=function(e){this.callbacks.length===0&&this._viewModelInstanceValue.clearChanges(),this.callbacks.includes(e)||(this.callbacks.push(e),this._parentViewModel.addToPropertyCallbacks(this))},e.prototype.off=function(e){e?this.callbacks=this.callbacks.filter(function(t){return t!==e}):this.callbacks.length=0,this.callbacks.length===0&&this._parentViewModel.removeFromPropertyCallbacks(this)},e.prototype.internalHandleCallback=function(e){},e.prototype.handleCallbacks=function(){var e=this;this._viewModelInstanceValue.hasChanged&&this.callbacks.forEach(function(t){e.internalHandleCallback(t)})},e.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},e.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(e.prototype,`name`,{get:function(){return this._viewModelInstanceValue.name},enumerable:!1,configurable:!0}),e}(),oe=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,`value`,{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(F),se=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,`value`,{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(F),ce=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,`value`,{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(F),le=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(F),ue=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,`value`,{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`valueIndex`,{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(e){this._viewModelInstanceValue.valueIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`values`,{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(F),de=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,`length`,{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),t.prototype.addInstance=function(e){e.runtimeInstance!=null&&(this._viewModelInstanceValue.addInstance(e.runtimeInstance),e.addParent(this._parentViewModel))},t.prototype.addInstanceAt=function(e,t){return e.runtimeInstance!=null&&this._viewModelInstanceValue.addInstanceAt(e.runtimeInstance,t)?(e.addParent(this._parentViewModel),!0):!1},t.prototype.removeInstance=function(e){e.runtimeInstance!=null&&(this._viewModelInstanceValue.removeInstance(e.runtimeInstance),e.removeParent(this._parentViewModel))},t.prototype.removeInstanceAt=function(e){this._viewModelInstanceValue.removeInstanceAt(e)},t.prototype.instanceAt=function(e){var t=this._viewModelInstanceValue.instanceAt(e);if(t!=null){var n=new P(t,this._parentViewModel);return(0,a.createFinalization)(n,t),n}return null},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(F),fe=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,`value`,{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e}
19,enumerable:!1,configurable:!0}),t.prototype.rgb=function(e,t,n){this._viewModelInstanceValue.rgb(e,t,n)},t.prototype.rgba=function(e,t,n,r){this._viewModelInstanceValue.argb(r,e,t,n)},t.prototype.argb=function(e,t,n,r){this._viewModelInstanceValue.argb(e,t,n,r)},t.prototype.alpha=function(e){this._viewModelInstanceValue.alpha(e)},t.prototype.opacity=function(e){this._viewModelInstanceValue.alpha(Math.round(Math.max(0,Math.min(1,e))*255))},t.prototype.internalHandleCallback=function(e){e(this.value)},t}(F),pe=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,`value`,{set:function(e){this._viewModelInstanceValue.value(e?.nativeImage??null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(F),I=function(e){o(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,`value`,{set:function(e){var t=e.isBindableArtboard?e:e.file.internalBindableArtboardFromArtboard(e.nativeArtboard);this._viewModelInstanceValue.value(t?.nativeArtboard??null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(F),me=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Request(e),[4,fetch(t)];case 1:return n=i.sent(),[4,n.arrayBuffer()];case 2:return r=i.sent(),[2,r]}})})},L=function(e){return typeof e==`string`?[e]:e instanceof Array?e:[]},R={EventManager:O,TaskQueueManager:k},z=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Promise(function(t){return _.getInstance(function(n){n.decodeAudio(e,t)})}),[4,t];case 1:return n=i.sent(),r=new a.AudioWrapper(n),a.finalizationRegistry.register(r,n),[2,r]}})})},B=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Promise(function(t){return _.getInstance(function(n){n.decodeImage(e,t)})}),[4,t];case 1:return n=i.sent(),r=new a.ImageWrapper(n),a.finalizationRegistry.register(r,n),[2,r]}})})},he=function(e){return c(void 0,void 0,void 0,function(){var t,n,r;return l(this,function(i){switch(i.label){case 0:return t=new Promise(function(t){return _.getInstance(function(n){n.decodeFont(e,t)})}),[4,t];case 1:return n=i.sent(),r=new a.FontWrapper(n),a.finalizationRegistry.register(r,n),[2,r]}})})}})(),r})())}))(),1),je=`/assets/rive.PUoxkxNO.wasm`,K=[`width`,`height`],q=p({__name:`RiveAnimation`,props:{desktopSrc:{},mobileSrc:{},breakpoint:{default:768},stateMachines:{default:`State Machine 1`},canvasClass:{default:`w-full`},desktopWidth:{},desktopHeight:{},mobileWidth:{},mobileHeight:{},enableHover:{type:Boolean,default:!1}},setup(e){Ae.RuntimeLoader.setWasmUrl(je);let t=e,r=a(null),o=a(null),l=null,u=a(!1),p=null,m=a(!1),h=a(!1),_=a(!1),v=()=>{_.value=window.innerWidth<t.breakpoint},y=()=>_.value&&t.mobileSrc?t.mobileSrc:t.desktopSrc,b=n(()=>_.value&&t.mobileWidth?t.mobileWidth:t.desktopWidth),x=n(()=>_.value&&t.mobileHeight?t.mobileHeight:t.desktopHeight),S=()=>
19{if(!r.value||l)return;let e={src:y(),canvas:r.value,autoplay:!1,onLoad:()=>{l?.resizeDrawingSurfaceToCanvas(),m.value=(l?.animationNames||[]).includes(`hover`)}};t.enableHover&&!_.value?e.animations=`hover`:e.stateMachines=t.stateMachines,l=new Ae.Rive(e)},C=()=>{l&&l.play()},w=()=>{t.enableHover&&!_.value&&m.value&&l&&!h.value&&(h.value=!0,l.play(`hover`))},T=()=>{},E=()=>{l&&=(l.cleanup(),null)},D=()=>{let e=_.value;if(v(),e!==_.value){let e=u.value;E(),S(),e&&C()}};return d(()=>{v(),S(),(!t.enableHover||_.value)&&(p=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&!u.value&&(u.value=!0,C())})},{threshold:.1}),o.value&&p.observe(o.value)),window.addEventListener(`resize`,D)}),g(()=>{E(),p&&o.value&&(p.unobserve(o.value),p.disconnect()),window.removeEventListener(`resize`,D)}),(t,n)=>(f(),i(`div`,{ref_key:`containerRef`,ref:o,class:s([`touch-none select-none`,{"pointer-events-none":_.value}]),onMouseenter:w,onMouseleave:T},[c(`canvas`,{ref_key:`canvasRef`,ref:r,width:b.value,height:x.value,class:s(e.canvasClass)},null,10,K)],34))}}),Me={class:`wrapper wrapper--ticks border-t grid lg:grid-cols-2 divide-x divide-y divide-nickel`},J={class:`flex flex-col gap-3`},Ne={class:`flex flex-col gap-3 justify-between`},Y=h({__name:`FeatureGrid`,setup(e){return(e,t)=>(f(),i(r,null,[c(`section`,Me,[c(`div`,J,[t[0]||=c(`div`,{class:`p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3`},[c(`h5`,{class:`text-balance sm:text-pretty text-white`},` Vite Powered `),c(`p`,{class:`sm:max-w-[30rem] text-pretty`},[y(` Reuse `),c(`code`,{class:`mr-1 outline-none bg-nickel/50 text-vite`},`Vite`),y(`'s config and plugins - consistent across your app and tests. But it's not required to use Vitest! `)])],-1),m(q,{"desktop-src":o(G),"desktop-width":650,"desktop-height":300,"canvas-class":`w-full`},null,8,[`desktop-src`])]),t[2]||=u("",2),c(`div`,Ne,[t[1]||=c(`div`,{class:`p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3`},[c(`h5`,{class:`text-white`},` ESM, TypeScript, JSX `),c(`p`,{class:`max-w-[25rem] text-pretty`},[y(` Out-of-box ESM, TypeScript and JSX support powered by `),c(`code`,{class:`mx-1 outline-none bg-nickel/50 text-aqua`},`Oxc`),y(`. `)])],-1),m(q,{"desktop-src":o(ke),"desktop-width":640,"desktop-height":300,"canvas-class":`w-full`},null,8,[`desktop-src`])])]),t[3]||=c(`section`,{class:`wrapper border-t py-10 flex items-center justify-center`},[c(`a`,{href:`/guide/features`,class:`button`},`See full features list`)],-1)],64))}},[[`__scopeId`,`data-v-76b7f7a6`]]),Pe={},Fe={class:`wrapper wrapper--ticks grid md:grid-cols-2 w-full border-nickel divide-x`};function Ie(e,t){return f(),i(`div`,Fe,[...t[0]||=[u("",2)]])}var Le=h(Pe,[[`render`,Ie],[`__scopeId`,`data-v-173dd357`]]),Re={},ze={class:`wrapper wrapper--ticks border-t py-14 lg:py-30 px-5 sm:px-10 lg:px-20`};function Be(e,t){return f(),i(`div`,ze,[...t[0]||=[u("",1)]])}var Ve=h(Re,[[`render`,Be]]),He={__name:`Home`,setup(e){return(e,t)=>(f(),i(r,null,[m(Le),m(Ve),m(re,{heading:`Fast. Lightweight. Integrated.`}),m(Y),m(Ce,{description:`Vitest is free and open source, made possible by wonderful sponsors.`,"sponsor-link":`https://github.com/sponsors/vitest-dev`,sponsors:o(Oe)},null,8,[`sponsors`]),m(De),m(j,{heading:`Start testing with Vitest`,subheading:`Supercharge your tests with unparalleled performance made for the modern web`,"button-text":`Get started`,"button-link":`/guide/`})],64))}},Ue=JSON.parse(`{"title":"Vitest","titleTemplate":"Next Generation testing framework","description":"","frontmatter":{"title":"Vitest","titleTemplate":"Next Generation testing framework","layout":"home","theme":"dark"},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1768295489000}`),We=Object.assign({name:`index.md`},{setup(e){return(e,t)=>(f(),i(`div`,null,[t[0]||=c(`div`,{style:{display:`none`},hidden:``,"data-nosnippet":``},`Are you an LLM? View /llms.txt for optimized Markdown documentation, or /llms-full.txt for full documentation bundle`,-1),m(He)]))}});export{Ue as __pageData,We as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.