1async function e(e,t,{retries:n=3,delay:r=300}={}){try{return await e()}catch{for(let t=0;t<n;t++){await new Promise(e=>setTimeout(e,r*(t+1)));try{return await e()}catch(e){if(t===n-1)throw e}}}}window.chesscom=window.chesscom||{},window.chesscom.routes=window.chesscom.routes||{},Object.assign(window.chesscom.routes,{web_about:{tokens:[[`text`,`/about`]],defaults:{host:`www.chess.com`},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`af_ZA|ar_AR|az_AZ|be_BY|bg_BG|bn_BD|bs_BA|ca|cs_CZ|da_DK|de_DE|el_GR|en_US|es_ES|et_EE|eu_ES|fa_IR|fi_FI|fil_PH|fr_FR|gl_ES|he_IL|hi_IN|hr_HR|hu_HU|hy_AM|id_ID|is_IS|it_IT|ja_JP|ka_GE|ko_KR|lt_LT|lv_LV|nl_BE|ms_MY|nl_NL|no_NO|pl_PL|pt_BR|pt_PT|ro_RO|ru_RU|sk_SK|sl_SI|sq_AL|sr_RS|sv_SE|tk_TM|tr_TR|uk_UA|ur_PK|vi_VN|zh_CN|zh_HK|zh_TW`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},web_article_view:{tokens:[[`variable`,`/`,`[^/]++`,`url`,!0],[`text`,`/article/view`]],defaults:{host:`www.chess.com`},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`af_ZA|ar_AR|az_AZ|be_BY|bg_BG|bn_BD|bs_BA|ca|cs_CZ|da_DK|de_DE|el_GR|en_US|es_ES|et_EE|eu_ES|fa_IR|fi_FI|fil_PH|fr_FR|gl_ES|he_IL|hi_IN|hr_HR|hu_HU|hy_AM|id_ID|is_IS|it_IT|ja_JP|ka_GE|ko_KR|lt_LT|lv_LV|nl_BE|ms_MY|nl_NL|no_NO|pl_PL|pt_BR|pt_PT|ro_RO|ru_RU|sk_SK|sl_SI|sq_AL|sr_RS|sv_SE|tk_TM|tr_TR|uk_UA|ur_PK|vi_VN|zh_CN|zh_HK|zh_TW`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},web_membership:{tokens:[[`text`,`/membership`]],defaults:{host:`www.chess.com`},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`af_ZA|ar_AR|az_AZ|be_BY|bg_BG|bn_BD|bs_BA|ca|cs_CZ|da_DK|de_DE|el_GR|en_US|es_ES|et_EE|eu_ES|fa_IR|fi_FI|fil_PH|fr_FR|gl_ES|he_IL|hi_IN|hr_HR|hu_HU|hy_AM|id_ID|is_IS|it_IT|ja_JP|ka_GE|ko_KR|lt_LT|lv_LV|nl_BE|ms_MY|nl_NL|no_NO|pl_PL|pt_BR|pt_PT|ro_RO|ru_RU|sk_SK|sl_SI|sq_AL|sr_RS|sv_SE|tk_TM|tr_TR|uk_UA|ur_PK|vi_VN|zh_CN|zh_HK|zh_TW`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},web_member_titled_players:{tokens:[[`text`,`/members/titled-players`]],defaults:{host:`www.chess.com`},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`af_ZA|ar_AR|az_AZ|be_BY|bg_BG|bn_BD|bs_BA|ca|cs_CZ|da_DK|de_DE|el_GR|en_US|es_ES|et_EE|eu_ES|fa_IR|fi_FI|fil_PH|fr_FR|gl_ES|he_IL|hi_IN|hr_HR|hu_HU|hy_AM|id_ID|is_IS|it_IT|ja_JP|ka_GE|ko_KR|lt_LT|lv_LV|nl_BE|ms_MY|nl_NL|no_NO|pl_PL|pt_BR|pt_PT|ro_RO|ru_RU|sk_SK|sl_SI|sq_AL|sr_RS|sv_SE|tk_TM|tr_TR|uk_UA|ur_PK|vi_VN|zh_CN|zh_HK|zh_TW`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},web_member_view:{tokens:[[`variable`,`/`,`[^/]++`,`username`,!0],[`text`,`/member`]],defaults:{host:`www.chess.com`},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`af_ZA|ar_AR|az_AZ|be_BY|bg_BG|bn_BD|bs_BA|ca|cs_CZ|da_DK|de_DE|el_GR|en_US|es_ES|et_EE|eu_ES|fa_IR|fi_FI|fil_PH|fr_FR|gl_ES|he_IL|hi_IN|hr_HR|hu_HU|hy_AM|id_ID|is_IS|it_IT|ja_JP|ka_GE|ko_KR|lt_LT|lv_LV|nl_BE|ms_MY|nl_NL|no_NO|pl_PL|pt_BR|pt_PT|ro_RO|ru_RU|sk_SK|sl_SI|sq_AL|sr_RS|sv_SE|tk_TM|tr_TR|uk_UA|ur_PK|vi_VN|zh_CN|zh_HK|zh_TW`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[`GET`,`POST`],schemes:[`https`]},i18n_web_article_view:{tokens:[[`variable`,`/`,`[^/]++`,`url`,!0],[`text`,`/article/view`],[`variable`,`/`,`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`,`_locale`,!0]],defaults:{host:`www.chess.com`,_locale:``},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},i18n_web_membership:{tokens:[[`text`,`/membership`],[`variable`,`/`,`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`,`_locale`,!0]],defaults:{host:`www.chess.com`,_locale:``},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},i18n_web_member_titled_players:{tokens:[[`text`,`/members/titled-players`],[`variable`,`/`,`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`,`_locale`,!0]],defaults:{host:`www.chess.com`,_locale:``},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},i18n_web_member_view:{tokens:[[`variable`,`/`,`[^/]++`,`username`,!0],[`text`,`/member`],[`variable`,`/`,`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`,`_locale`,!0]],defaults:{host:`www.chess.com`,_locale:``},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[`GET`,`POST`],schemes:[`https`]}});import{a as t,i as n,n as r,r as i,t as a}from"./rolldown-runtime.CNC7AqOflz.chunk.js";import{A as o,B as s,D as c,E as l,F as u,G as d,H as f,I as p,J as m,K as h,L as g,M as _,N as v,O as y,P as b,R as x,T as S,U as C,V as w,W as T,a as ee,f as E,i as D,j as O,k as te,m as ne,o as re,p as ie,q as ae,r as oe,t as se,v as k,w as A,y as j,z as M}from"./shared.eager.BYcWqFZPa1.chunk.js";import{Fragment as N,computed as P,createApp as ce,createBlock as le,createCommentVNode as ue,createElementBlock as de,createTextVNode as fe,createVNode as pe,defineComponent as F,getCurrentInstance as I,getCurrentScope as L,hasInjectionContext as me,inject as he,mergeProps as ge,normalizeClass as _e,onBeforeUnmount as ve,onMounted as ye,onScopeDispose as R,onUnmounted as be,openBlock as z,reactive as B,ref as xe,renderSlot as Se,shallowReadonly as Ce,shallowRef as we,toValue as Te,unref as Ee,useCssVars as De,useTemplateRef as Oe,watch as ke,watchEffect as V,withCtx as Ae}from"/r2/assets-chess/vite/vendors/vue.Dw52G4BYUB.js";import{createPinia as je}from"/r2/assets-chess/vite/vendors/pinia.Cs4EaXNzmp.js";function Me(e){"@babel/helpers - typeof";return Me=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Me(e)}var Ne=r((()=>{})),Pe,Fe=r((()=>{Pe=(e,t)=>
1{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n}})),Ie=r((()=>{}));function H(e,t){let n=t&&t.cache?t.cache:Ke,r=t&&t.serializer?t.serializer:We;return(t&&t.strategy?t.strategy:Ve)(e,{cache:n,serializer:r})}function Le(e){return e==null||typeof e==`number`||typeof e==`boolean`}function Re(e,t,n,r){let i=Le(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function ze(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function Be(e,t,n,r,i){return n.bind(t,e,r,i)}function Ve(e,t){let n=e.length===1?Re:ze;return Be(e,this,n,t.cache.create(),t.serializer)}function He(e,t){return Be(e,this,ze,t.cache.create(),t.serializer)}function Ue(e,t){return Be(e,this,Re,t.cache.create(),t.serializer)}var We,Ge,Ke,qe,Je=r((()=>{We=function(){return JSON.stringify(arguments)},Ge=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}},Ke={create:function(){return new Ge}},qe={variadic:He,monadic:Ue}}));function Ye(e){let t={};return e.replace(rt,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-4];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-4];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}function Xe(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(it).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function Ze(e){return e.replace(/^(.*?)-/,``)}function Qe(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(ot,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function $e(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function et(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!ct.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function tt(e){return $e(e)||{}}function nt(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=Ze(n.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>
1({...e,...tt(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...tt(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(st,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(ct.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(at.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(at,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...Qe(e)});continue}if(ot.test(n.stem)){t={...t,...Qe(n.stem)};continue}let e=$e(n.stem);e&&(t={...t,...e});let r=et(n.stem);r&&(t={...t,...r})}return t}var rt,it,at,ot,st,ct,lt=r((()=>{rt=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,it=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,at=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,ot=/^(@+)?(\+|#+)?[rs]?$/g,st=/(\*)(0+)|(#+)(0+)|(0+)/g,ct=/^(0+)$/})),ut=a((e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),dt,ft=r((()=>{dt=()=>!!window.chesscom?.features?.includes(`use_rive_offscreen_renderer`)})),pt,mt=r((()=>{pt=`cached-user-activity-service`})),ht,U,gt,_t,vt=r((()=>{ht=`raw-rive-animation-canvas`,U=`raw-rive-animation-size`,gt=`raw-rive-animation-hidden`,_t={canvas:ht,size:U,hidden:gt}})),yt,bt,W=r((()=>{yt=e=>{queueMicrotask(e)},bt=e=>{e&&yt(()=>{try{e.cleanup()}catch{}})}})),xt,St,Ct=r((()=>{xt=(e,t)=>{try{let n=e.getInstance?.();if(!n)return;let r=t?n.artboardByName(t):n.defaultArtboard();if(!r)return;try{let e=[];for(let t=0;t<r.stateMachineCount();t++)e.push(r.stateMachineByIndex(t).name);return e}finally{r.delete()}}catch{return}},St=(e,t)=>{if(e===void 0)return t;if(e.length===0)return;let n=Array.isArray(t)?t:[t],r=n.filter(t=>e.includes(t));return r.length===n.length?t:r.length>0?Array.isArray(t)?r:r[0]:e.length===1&&n.every(e=>e===`sm-main`)?e[0]:t}}));function wt(e){return e?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):null}var Tt=r((()=>{}));function Et({getViewModelInstance:e,maxRetries:t,scheduleRetry:n=requestAnimationFrame}){let r=[],i=[],a=(r=t)=>{if(i.length===0)return;let o=e();if(!o){if(r<=0)return;n(()=>a(r-1));return}for(let[e,t]of i.splice(0))o.trigger(e)?.on(t)};return{attach:a,detach:()=>{i=[...r]},subscribe:(e,t)=>
1{r.some(([n,r])=>n===e&&r===t)||(r.push([e,t]),i.push([e,t]),a())}}}var Dt=r((()=>{})),Ot,kt=r((()=>{Ot=`Web1_0`}));function At(e,t,n,r){let i=``;if(n){let e=new Date;e.setTime(e.getTime()+Math.min(Mt,n)*24*60*60*1e3),i=`; expires=${e.toUTCString()}`}let a=``;r&&(a=`; domain=${r}`),document.cookie=`${e}=${t||``}${i}${a}; path=/; samesite=none; secure`}function jt(e){let t={};return document.cookie.split(`; `).forEach(e=>{let[n,r]=e.split(`=`);n&&r&&(t[n]=r)}),t[e]||null}var Mt,Nt=r((()=>{Mt=365}));function Pt(e=window.location.href){return new URL(e).hostname.split(`.`).slice(-2).join(`.`)}var Ft=r((()=>{}));function It(){return window.context.i18n.locale}var Lt=r((()=>{}));function Rt(){return!!(window.Cypress||window.Config?.cypress||window.location.host.includes(`localhost:`))}var zt=r((()=>{}));function Bt(){return window.context?.environment===`ephemeral_qa`}var Vt=r((()=>{}));function Ht(){return[`test`,`dev`,`preview`,`qa`].includes(window.context.environment)}var Ut=r((()=>{}));function Wt(e){return Object.keys(e)}var Gt=r((()=>{}));function Kt(e){return e.replace(Xt,`\\$&`)}function qt(e){for(let t=0;t<Zt.length;t++)if(e.startsWith(Zt[t]))return!0;return!1}function Jt(e){if(Qt!==null&&$t===e)return Qt;let t=Object.keys(e),n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e[i]?.tokens;!a||a.length===0||qt(a[a.length-1][1])||n.push(i)}return Qt=n,$t=e,n}function Yt(e,t){if(!t||Object.keys(t).length===0)return``;let n=e,r=Jt(t),i=r.length,a=``,o=-1;for(let e=0;e<i;e++){let i=r[e],s=t[i],c=s.tokens,l=c.length,u=0;for(let e=0;e<l;e++)c[e][0]===`variable`&&u++;let d=(l-u)*100-u;if(d<=o)continue;if(u===0){if(l===1)n===c[0][1]&&(a=i,o=d);else{let e=``;for(let t=l-1;t>=0;--t)e+=c[t][1];n===e&&(a=i,o=d)}continue}let f=c[l-1];if(f[0]===`text`&&!n.startsWith(f[1]))continue;let p=s._re;if(p===void 0){let e=``;for(let t=l-1;t>=0;--t){let n=c[t];if(n[0]===`variable`){let t=`${Kt(n[1])}(${n[2].replace(`++`,`+`)})`;e+=n[4]===!0?`(?:${t})?`:t}else e+=Kt(n[1])}try{p=RegExp(`^${e}$`)}catch{p=void 0}s._re=p??null}p&&p.test(n)&&(a=i,o=d)}return a}var Xt,Zt,Qt,$t,en=r((()=>{Xt=/[-[\]/{}()*+?.\\^$|]/g,Zt=[`/callback`,`/admin`,`/pub/`,`/int/`],Qt=null,$t=null}));function tn(){return!!(window.chesscom.enableSentryHP&&window.context?.user&&(window.context.user.isStreamer||window.context.user.chessTitle||window.context.user.hasConnectedTwitch||window.context.user.hasConnectedYoutube))}var nn=r((()=>{}));function rn(e){return typeof e==`string`}var an=r((()=>{}));function on(){return!!window.context?.user?.isStaff}var sn=r((()=>{}));function cn(e){return e}var G=r((()=>{})),ln,un,dn=r((()=>{ln=`rive-animation-dimensions`,un={dimensions:ln}})),fn,pn=r((()=>{fn={BUTTON_CLASS:`landing-page-button`,LANDING_PAGE_ASSET:`landing-page-trackable-asset`,LANDING_PAGE_BLOCK:`landing-page-block`}}));function mn(e,t){e.provide(hn,t)}var hn,gn=r((()=>{hn=`design-system-key`}));function _n(e){return e.type===0}function vn(e){return e.type===1}function yn(e){return e.type===2}function bn(e){return e.type===3}function xn(e){return e.type===4}function Sn(e){return e.type===5}function Cn(e){return e.type===6}function wn(e){return e.type===7}function Tn(e){return e.type===8}function En(e){return!!(e&&typeof e==`object`&&e.type===0)}function Dn(e){return!!(e&&typeof e==`object`&&e.type===1)}function On(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i===`j`){let a=0;for(;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;let o=1+(a&1),s=a<2?1:3+(a>>1),c=kn(t);for((c==`H`||c==`k`)&&(s=0);s-->0;)n+=`a`;for(;o-->0;)n=c+n}else i===`J`?n+=`H`:n+=i}return n}function kn(e){let t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let n=e.language,r;return n!==`root`&&(r=e.maximize().region),(zn[r||``]||zn[n||``]||zn[`${n}-001`]||zn[`001`])[0]}function K(e,t){return{start:e,end:t}}function An(e,t){return Jn.lastIndex=t,Jn.exec(e)[1]??``}function jn(e){return e>=97&&e<=122||e>=65&&e<=90}function Mn(e){return jn(e)||e===47}function Nn(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Pn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}
1function Fn(e){e.forEach(e=>{if(delete e.location,Sn(e)||Cn(e))for(let t in e.options)delete e.options[t].location,Fn(e.options[t].value);else yn(e)&&En(e.style)||(bn(e)||xn(e))&&Dn(e.style)?delete e.style.location:Tn(e)&&Fn(e.children)})}function In(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new Yn(e,t).parse();if(n.err){let e=SyntaxError(Ln[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t?.captureLocation||Fn(n.val),n.val}var Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,q=r((()=>{lt(),Ln=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({}),Rn=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,zn={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]},Bn=RegExp(`^${Rn.source}*`),Vn=RegExp(`${Rn.source}*$`),Hn=!!Object.fromEntries,Un=!!String.prototype.trimStart,Wn=!!String.prototype.trimEnd,Gn=Hn?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},Kn=Un?function(e){return e.trimStart()}:function(e){return e.replace(Bn,``)},qn=Wn?function(e){return e.trimEnd()}:function(e){return e.replace(Vn,``)},Jn=RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`),Yn=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}
1parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:K(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,K(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&jn(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:K(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(`</`)){if(this.isEOF()||!jn(this.char()))return this.error(23,K(o,this.clonePosition()));let e=this.clonePosition();return r===this.parseTagName()?(this.bumpSpace(),this.bumpIf(`>`)?{val:{type:8,value:r,children:a,location:K(n,this.clonePosition())},err:null}:this.error(23,K(o,this.clonePosition()))):this.error(26,K(e,this.clonePosition()))}else return this.error(27,K(n,this.clonePosition()))}else return this.error(23,K(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&Nn(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}let i=K(n,this.clonePosition());return{val:{type:0,value:r,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Mn(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,K(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,K(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,K(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,K(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:K(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,K(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,K(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=An(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:K(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,K(i,o));case`number`:case`date`:case`time`:{this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=qn(n.val);if(r.length===0)return this.error(6,K(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:K(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=K(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=Kn(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}else{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=On(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?Ye(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:e?.style??null},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,K(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,K(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=K(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:Gn(c.val),location:u},err:null}:{val:{type:6,value:n,options:Gn(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,K(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,K(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,K(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump();break}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=Xe(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?nt(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=K(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,K(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:K(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,K(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,K(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=K(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){let t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&Pn(this.char());)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}}})),Xn=i({ErrorCode:()=>ir,FormatError:()=>ar,IntlMessageFormat:()=>ur,InvalidValueError:()=>or,InvalidValueTypeError:()=>sr,MissingValueError:()=>cr,PART_TYPE:()=>lr,default:()=>dr,formatToParts:()=>$n,isFormatXMLElementFn:()=>Qn});function Zn(e){return e.length<2?e:e.reduce((e,t)=>
1{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function Qn(e){return typeof e==`function`}function $n(e,t,n,r,i,a,o){if(e.length===1&&_n(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(_n(c)){s.push({type:0,value:c.value});continue}if(wn(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new cr(e,o);let l=i[e];if(vn(c)){(!l||typeof l==`string`||typeof l==`number`||typeof l==`bigint`)&&(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});continue}if(bn(c)){let e=typeof c.style==`string`?r.date[c.style]:Dn(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(xn(c)){let e=typeof c.style==`string`?r.time[c.style]:Dn(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(yn(c)){let e=typeof c.style==`string`?r.number[c.style]:En(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)});continue}if(Tn(c)){let{children:e,value:l}=c,u=i[l];if(!Qn(u))throw new sr(l,`function`,o);let d=u($n(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(Sn(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new or(c.value,l,Object.keys(c.options),o);s.push(...$n(a.value,t,n,r,i));continue}if(Cn(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new ar(`Intl.PluralRules is not available in this environment. 2Try polyfilling it using "@formatjs/intl-pluralrules" 3`,`MISSING_INTL_API`,o);let e=typeof l==`bigint`?Number(l):l,r=n.getPluralRules(t,{type:c.pluralType}).select(e-(c.offset||0));a=(Object.prototype.hasOwnProperty.call(c.options,r)?c.options[r]:void 0)||c.options.other}if(!a)throw new or(c.value,l,Object.keys(c.options),o);let u=typeof l==`bigint`?Number(l):l;s.push(...$n(a.value,t,n,r,i,u-(c.offset||0)));continue}}return Zn(s)}function er(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function tr(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=er(e[r],t[r]),n),{...e}):e}function nr(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function rr(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:H((...e)=>new Intl.NumberFormat(...e),{cache:nr(e.number),strategy:qe.variadic}),getDateTimeFormat:H((...e)=>new Intl.DateTimeFormat(...e),{cache:nr(e.dateTime),strategy:qe.variadic}),getPluralRules:H((...e)=>new Intl.PluralRules(...e),{cache:nr(e.pluralRules),strategy:qe.variadic})}}var J,ir,ar,or,sr,cr,lr,ur,dr,fr=r((()=>{Je(),q(),ir=function(e){return e.MISSING_VALUE=`MISSING_VALUE`,e.INVALID_VALUE=`INVALID_VALUE`,e.MISSING_INTL_API=`MISSING_INTL_API`,e}({}),ar=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},or=class extends ar{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},sr=class extends ar{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},cr=class extends ar{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}},lr=function(e){return e[e.literal=0]=`literal`,e[e.object=1]=`object`,e}({}),ur=(J=class e{constructor(t,n=e.defaultLocale,r,i){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=e=>{let t=this.formatToParts(e);if(t.length===1)return t[0].value;let n=t.reduce((e,t)=>(!e.length||t.type!==0||typeof e[e.length-1]!=`string`?e.push(t.value):e[e.length-1]+=t.value,e),[]);return n.length<=1?n[0]||``:n},this.formatToParts=e=>$n(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t==`string`){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");let{...n}=i||{};this.ast=e.__parse(t,{...n,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError(`A message must be provided as a String or AST.`);this.formats=tr(e.formats,r),this.formatters=i&&i.formatters||rr(this.formatterCache)}static get defaultLocale(){return e.memoizedDefaultLocale||=new Intl.NumberFormat().resolvedOptions().locale,e.memoizedDefaultLocale}},J.memoizedDefaultLocale=null,J.resolveLocale=e=>{if(Intl.Locale===void 0)return;let t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale(typeof e==`string`?e:e[0])},J.__parse=In,J.formats={number:{integer:{maximumFractionDigits:0},currency:{style:`currency`},percent:{style:`percent`}},date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}}},J),dr=ur})),pr=a(((e,t)=>{(function(e,r){typeof t==`object`&&t.exports?t.exports=r((fr(),n(Xn))):typeof define==`function`&&define.amd?define([`intl-messageformat`],r):e.Translator=r(e.IntlMessageFormat)})(typeof self<`u`?self:e,function(e){var t={},n=`en`,r=[],i=new RegExp(/^\w+\: +(.+)$/),a=new RegExp(/^\s*((\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]]))\s?(.+?)$/),o=new RegExp(/^\s*(\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\}
3)|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]])/),s=`+intl-icu`,c={locale:g(),fallback:n,placeHolderPrefix:`%`,placeHolderSuffix:`%`,defaultDomain:`messages`,pluralSeparator:`|`,add:function(e,n,i,a){var o=a||this.locale||this.fallback,s=i||this.defaultDomain;return t[o]||(t[o]={}),t[o][s]||(t[o][s]={}),t[o][s][e]=n,!1===h(r,s)&&r.push(s),this},trans:function(t,n,r,i){var a={},o=u(t,r,i,this.locale,this.fallback,a);if(a.isICU){if(e===void 0)throw Error(`The dependency "IntlMessageFormat" is required to use ICU MessageFormat but it has not been found. Please read https://github.com/willdurand/BazingaJsTranslationBundle/blob/master/Resources/doc/index.md#using-icu-messageformat`);return new e.IntlMessageFormat(o,void 0,void 0,{ignoreTag:!0}).format(n||{})}return l(o,n||{})},transChoice:function(e,t,n,r,i){var a=u(e,r,i,this.locale,this.fallback),o=parseInt(t,10);return n||={},n.count===void 0&&(n.count=t),a!==void 0&&!isNaN(o)&&(a=f(a,o,i||this.locale||this.fallback)),l(a,n)},fromJSON:function(e){if(typeof e==`string`&&(e=JSON.parse(e)),e.locale&&(this.locale=e.locale),e.fallback&&(this.fallback=e.fallback),e.defaultDomain&&(this.defaultDomain=e.defaultDomain),e.translations)for(var t in e.translations)for(var n in e.translations[t])for(var r in e.translations[t][n])this.add(r,e.translations[t][n][r],n,t);return this},reset:function(){t={},r=[],this.locale=g()}};function l(e,t){var n,r=c.placeHolderPrefix,i=c.placeHolderSuffix;for(n in t){var a=new RegExp(r+n+i,`g`);if(a.test(e)){var o=String(t[n]).replace(RegExp(`\\$`,`g`),`$$$$`);e=e.replace(a,o)}}return e}function u(e,n,i,a,o,c){var l=i||a||o,u=n,f=c||{},p=l.split(`_`)[0];if(f.isICU=!1,!(l in t))if(p in t)l=p;else{if(!(o in t))return e;l=o}if(u==null){for(var m=0;m<r.length;m++)if(d(l,r[m],e)||d(p,r[m],e)||d(o,r[m],e)){u=r[m].replace(s,``);break}}if(d(l,u+s,e))return f.isICU=!0,t[l][u+s][e];if(d(l,u,e))return t[l][u][e];for(var h,g,_,v;l.length>2&&(h=l.length,g=l.split(/[\s_]+/),_=g[g.length-1],v=_.length,g.length!==1);)if(l=l.substring(0,h-(v+1)),d(l,u,e))return t[l][u][e];return d(o,u,e)?t[o][u][e]:e}function d(e,n,r){return!(!(e in t)||!(n in t[e])||!(r in t[e][n]))}function f(e,t,n){var r,s,l=[],u=[],d=e.split(c.pluralSeparator),f=[];for(r=0;r<d.length;r++){var h=d[r];a.test(h)?(f=h.match(a),l[f[0]]=f[f.length-1]):i.test(h)?(f=h.match(i),u.push(f[1])):u.push(h)}for(s in l)if(o.test(s))if(f=s.match(o),f[1]){var g=f[2].split(`,`),_;for(_ in g)if(t==g[_])return l[s]}else{var v=p(f[4]),y=p(f[5]);if((f[3]===`[`?t>=v:t>v)&&(f[6]===`]`?t<=y:t<y))return l[s]}return u[m(t,n)]||u[0]||void 0}function p(e){return e===`-Inf`?-1/0:e===`+Inf`||e===`Inf`?1/0:parseInt(e,10)}function m(e,t){var n=t;switch(n===`pt_BR`&&(n=`xbr`),n.length>3&&(n=n.split(`_`)[0]),n){case`bo`:case`dz`:case`id`:case`ja`:case`jv`:case`ka`:case`km`:case`kn`:case`ko`:case`ms`:case`th`:case`tr`:case`vi`:case`zh`:return 0;case`af`:case`az`:case`bn`:case`bg`:case`ca`:case`da`:case`de`:case`el`:case`en`:case`eo`:case`es`:case`et`:case`eu`:case`fa`:case`fi`:case`fo`:case`fur`:case`fy`:case`gl`:case`gu`:case`ha`:case`he`:case`hu`:case`is`:case`it`:case`ku`:case`lb`:case`ml`:case`mn`:case`mr`:case`nah`:case`nb`:case`ne`:case`nl`:case`nn`:case`no`:case`om`:case`or`:case`pa`:case`pap`:case`ps`:case`pt`:case`so`:case`sq`:case`sv`:case`sw`:case`ta`:case`te`:case`tk`:case`ur`:case`zu`:return e==1?0:1;case`am`:case`bh`:case`fil`:case`fr`:case`gun`:case`hi`:case`ln`:case`mg`:case`nso`:case`xbr`:case`ti`:case`wa`:return e===0||e==1?0:1;case`be`:case`bs`:case`hr`:case`ru`:case`sr`:case`uk`:return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case`cs`:case`sk`:return e==1?0:e>=2&&e<=4?1:2;case`ga`:return e==1?0:e==2?1:2;case`lt`:return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2;case`sl`:return e%100==1?0:e%100==2?1:e%100==3||e%100==4?2:3;case`mk`:return e%10==1?0:1;case`mt`:return e==1?0:e===0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3;case`lv`:return e===0?0:e%10==1&&e%100!=11?1:2;case`pl`:return e==1?0:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?1:2;case`cy`:return e==1?0:e==2?1:e==8||e==11?2:3;case`ro`:return e==1?0:e===0||e%100>0&&e%100<20?1:2;case`ar`:return e===0?0:e==1?1:e==2?2:e>=3&&e<=10?3:e>=11&&e<=99?4:5;default:return 0}}function h(e,t){for(var n=0;n<e.length;n++)if(t===e[n])return!0;return!1}function g(){return typeof document<`u`?document.documentElement.lang.replace(`-`,`_`):n}return c})}));function Y(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Tr(e,t,n)}}function mr(e){return function(){return Er(e,[...arguments])}}function X(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Mr;Q&&Q(e,null);let r=t.length;for(;r--;){let i=t[r];
vendor: 9,844 bytes, line 3
3if(typeof i==`string`){let e=n(i);e!==i&&(yr(t)||(t[r]=e),i=e)}e[i]=!0}return e}function hr(e){for(let t=0;t<e.length;t++)Rr(e,t)||(e[t]=null);return e}function gr(e){let t=wr(null);for(let[n,r]of vr(e))Rr(e,n)&&(Array.isArray(r)?t[n]=hr(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=gr(r):t[n]=r);return t}function Z(e,t){for(;e!==null;){let n=xr(e,t);if(n){if(n.get)return Y(n.get);if(typeof n.value==`function`)return Y(n.value)}e=br(e)}function n(){return null}return n}function _r(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ui(),t=e=>_r(e);if(t.version=`3.2.5`,t.removed=[],!e||!e.document||e.document.nodeType!==li.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=Z(m,`cloneNode`),g=Z(m,`remove`),_=Z(m,`nextSibling`),v=Z(m,`childNodes`),y=Z(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:w,getElementsByTagName:T}=n,{importNode:ee}=r,E=fi();t.isSupported=typeof vr==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:D,ERB_EXPR:O,TMPLIT_EXPR:te,DATA_ATTR:ne,ARIA_ATTR:re,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:ae,CUSTOM_ELEMENT:oe}=ci,{IS_ALLOWED_URI:se}=ci,k=null,A=X({},[...Vr,...Hr,...Ur,...Gr,...qr]),j=null,M=X({},[...Jr,...Yr,...Xr,...Zr]),N=Object.seal(wr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),P=null,ce=null,le=!0,ue=!0,de=!1,fe=!0,pe=!1,F=!0,I=!1,L=!1,me=!1,he=!1,ge=!1,_e=!1,ve=!0,ye=!1,R=!0,be=!1,z={},B=null,xe=X({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Se=null,Ce=X({},[`audio`,`video`,`img`,`source`,`image`,`track`]),we=null,Te=X({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ee=`http://www.w3.org/1998/Math/MathML`,De=`http://www.w3.org/2000/svg`,Oe=`http://www.w3.org/1999/xhtml`,ke=Oe,V=!1,Ae=null,je=X({},[Ee,De,Oe],Nr),Me=X({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Ne=X({},[`annotation-xml`]),Pe=X({},[`title`,`style`,`font`,`a`,`script`]),Fe=null,Ie=[`application/xhtml+xml`,`text/html`],H=null,Le=null,Re=n.createElement(`form`),ze=function(e){return e instanceof RegExp||e instanceof Function},Be=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Le&&Le===e)){if((!e||typeof e!=`object`)&&(e={}),e=gr(e),Fe=Ie.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,H=Fe===`application/xhtml+xml`?Nr:Mr,k=Rr(e,`ALLOWED_TAGS`)?X({},e.ALLOWED_TAGS,H):A,j=Rr(e,`ALLOWED_ATTR`)?X({},e.ALLOWED_ATTR,H):M,Ae=Rr(e,`ALLOWED_NAMESPACES`)?X({},e.ALLOWED_NAMESPACES,Nr):je,we=Rr(e,`ADD_URI_SAFE_ATTR`)?X(gr(Te),e.ADD_URI_SAFE_ATTR,H):Te,Se=Rr(e,`ADD_DATA_URI_TAGS`)?X(gr(Ce),e.ADD_DATA_URI_TAGS,H):Ce,B=Rr(e,`FORBID_CONTENTS`)?X({},e.FORBID_CONTENTS,H):xe,P=Rr(e,`FORBID_TAGS`)?X({},e.FORBID_TAGS,H):{},ce=Rr(e,`FORBID_ATTR`)?X({},e.FORBID_ATTR,H):{},z=Rr(e,`USE_PROFILES`)?e.USE_PROFILES:!1,le=e.ALLOW_ARIA_ATTR!==!1,ue=e.ALLOW_DATA_ATTR!==!1,de=e.ALLOW_UNKNOWN_PROTOCOLS||!1,fe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,pe=e.SAFE_FOR_TEMPLATES||!1,F=e.SAFE_FOR_XML!==!1,I=e.WHOLE_DOCUMENT||!1,he=e.RETURN_DOM||!1,ge=e.RETURN_DOM_FRAGMENT||!1,_e=e.RETURN_TRUSTED_TYPE||!1,me=e.FORCE_BODY||!1,ve=e.SANITIZE_DOM!==!1,ye=e.SANITIZE_NAMED_PROPS||!1,R=e.KEEP_CONTENT!==!1,be=e.IN_PLACE||!1,se=e.ALLOWED_URI_REGEXP||ri,ke=e.NAMESPACE||Oe,Me=e.MATHML_TEXT_INTEGRATION_POINTS||Me,Ne=e.HTML_INTEGRATION_POINTS||Ne,N=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ze(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(N.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ze(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(N.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(N.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),pe&&(ue=!1),ge&&(he=!0),z&&(k=X({},qr),j=[],z.html===!0&&(X(k,Vr),X(j,Jr)),z.svg===!0&&(X(k,Hr),X(j,Yr),X(j,Zr)),z.svgFilters===!0&&(X(k,Ur),X(j,Yr),X(j,Zr)),z.mathMl===!0&&(X(k,Gr),X(j,Xr),X(j,Zr))),e.ADD_TAGS&&(k===A&&(k=gr(k)),X(k,e.ADD_TAGS,H)),e.ADD_ATTR&&(j===M&&(j=gr(j)),X(j,e.ADD_ATTR,H)),e.ADD_URI_SAFE_ATTR&&X(we,e.ADD_URI_SAFE_ATTR,H),e.FORBID_CONTENTS&&(B===xe&&(B=gr(B)),X(B,e.FORBID_CONTENTS,H)),R&&(k[`#text`]=!0),I&&X(k,[`html`,`head`,`body`]),k.table&&(X(k,[`tbody`]),delete P.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Br(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Br(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=di(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));Sr&&Sr(e),Le=e}},Ve=X({},[...Hr,...Ur,...Wr]),He=X({},[...Gr,...Kr]),Ue=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:ke,tagName:`template`});let n=Mr(e.tagName),r=Mr(t.tagName);return Ae[e.namespaceURI]?e.namespaceURI===De?t.namespaceURI===Oe?n===`svg`:t.namespaceURI===Ee?n===`svg`&&(r===`annotation-xml`||Me[r]):!!Ve[n]:e.namespaceURI===Ee?t.namespaceURI===Oe?n===`math`:t.namespaceURI===De?n===`math`&&Ne[r]:!!He[n]:e.namespaceURI===Oe?t.namespaceURI===De&&!Ne[r]||t.namespaceURI===Ee&&!Me[r]?!1:!He[n]&&(Pe[n]||!Ve[n]):!!(Fe===`application/xhtml+xml`&&Ae[e.namespaceURI]):!1},We=function(e){Ar(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},Ge=function(e,n){try{Ar(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Ar(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(he||ge)try{We(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Ke=function(e){let t=null,r=null;if(me)e=`<remove></remove>`+e;else{let t=Pr(e,/^[\r\n\t ]+/);r=t&&t[0]}Fe===`application/xhtml+xml`&&ke===Oe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(ke===Oe)try{t=new f().parseFromString(i,Fe)}catch{}if(!t||!t.documentElement){t=S.createDocument(ke,`template`,null);try{t.documentElement.innerHTML=V?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ke===Oe?T.call(t,I?`html`:`body`)[0]:I?t.documentElement:a},qe=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Je=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Ye=function(e){return typeof s==`function`&&e instanceof s};function Xe(e,n,r){Dr(e,e=>{e.call(t,n,r,Le)})}let Ze=function(e){let n=null;if(Xe(E.beforeSanitizeElements,e,null),Je(e))return We(e),!0;let r=H(e.nodeName);if(Xe(E.uponSanitizeElement,e,{tagName:r,allowedTags:k}),e.hasChildNodes()&&!Ye(e.firstElementChild)&&zr(/<[/\w!]/g,e.innerHTML)&&zr(/<[/\w!]/g,e.textContent)||e.nodeType===li.progressingInstruction||F&&e.nodeType===li.comment&&zr(/<[/\w]/g,e.data))return We(e),!0;if(!k[r]||P[r]){if(!P[r]&&$e(r)&&(N.tagNameCheck instanceof RegExp&&zr(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r)))return!1;if(R&&!B[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return We(e),!0}return e instanceof c&&!Ue(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&zr(/<\/no(script|embed|frames)/i,e.innerHTML)?(We(e),!0):(pe&&e.nodeType===li.text&&(n=e.textContent,Dr([D,O,te],e=>{n=Fr(n,e,` `)}),e.textContent!==n&&(Ar(t.removed,{element:e.cloneNode()}),e.textContent=n)),Xe(E.afterSanitizeElements,e,null),!1)},Qe=function(e,t,r){if(ve&&(t===`id`||t===`name`)&&(r in n||r in Re))return!1;if(!(ue&&!ce[t]&&zr(ne,t))&&!(le&&zr(re,t))){if(!j[t]||ce[t]){if(!($e(e)&&(N.tagNameCheck instanceof RegExp&&zr(N.tagNameCheck,e)||N.tagNameCheck instanceof Function&&N.tagNameCheck(e))&&(N.attributeNameCheck instanceof RegExp&&zr(N.attributeNameCheck,t)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(t))||t===`is`&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&zr(N.tagNameCheck,r)||N.tagNameCheck instanceof Function&&N.tagNameCheck(r))))return!1}else if(!we[t]&&!zr(se,Fr(r,ae,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Ir(r,`data:`)===0&&Se[e])&&!(de&&!zr(ie,Fr(r,ae,``)))&&r)return!1}return!0},$e=function(e){return e!==`annotation-xml`&&Pr(e,oe)},et=function(e){Xe(E.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||Je(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=H(a),l=a===`value`?s:Lr(s);if(r.attrName=c,r.attrValue=l,r.keepAttr=!0,r.forceKeepAttr=void 0,Xe(E.uponSanitizeAttribute,e,r),l=r.attrValue,ye&&(c===`id`||c===`name`)&&(Ge(
3a,e),l=`user-content-`+l),F&&zr(/((--!?|])>)|<\/(style|title)/i,l)){Ge(a,e);continue}if(r.forceKeepAttr||(Ge(a,e),!r.keepAttr))continue;if(!fe&&zr(/\/>/i,l)){Ge(a,e);continue}pe&&Dr([D,O,te],e=>{l=Fr(l,e,` `)});let u=H(e.nodeName);if(Qe(u,c,l)){if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(u,c)){case`TrustedHTML`:l=b.createHTML(l);break;case`TrustedScriptURL`:l=b.createScriptURL(l);break}try{o?e.setAttributeNS(o,a,l):e.setAttribute(a,l),Je(e)?We(e):kr(t.removed)}catch{}}}Xe(E.afterSanitizeAttributes,e,null)},tt=function e(t){let n=null,r=qe(t);for(Xe(E.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Xe(E.uponSanitizeShadowNode,n,null),Ze(n),et(n),n.content instanceof a&&e(n.content);Xe(E.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(V=!e,V&&(e=`<!-->`),typeof e!=`string`&&!Ye(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Br(`dirty is not a string, aborting`)}else throw Br(`toString is not a function`);if(!t.isSupported)return e;if(L||Be(n),t.removed=[],typeof e==`string`&&(be=!1),be){if(e.nodeName){let t=H(e.nodeName);if(!k[t]||P[t])throw Br(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=Ke(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===li.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!he&&!pe&&!I&&e.indexOf(`<`)===-1)return b&&_e?b.createHTML(e):e;if(i=Ke(e),!i)return he?null:_e?x:``}i&&me&&We(i.firstChild);let u=qe(be?e:i);for(;c=u.nextNode();)Ze(c),et(c),c.content instanceof a&&tt(c.content);if(be)return e;if(he){if(ge)for(l=w.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(j.shadowroot||j.shadowrootmode)&&(l=ee.call(r,l,!0)),l}let d=I?i.outerHTML:i.innerHTML;return I&&k[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&zr(oi,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`> 4`+d),pe&&Dr([D,O,te],e=>{d=Fr(d,e,` `)}),b&&_e?b.createHTML(d):d},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Be(e),L=!0},t.clearConfig=function(){Le=null,L=!1},t.isValidAttribute=function(e,t,n){Le||Be({});let r=H(e),i=H(t);return Qe(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&Ar(E[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Or(E[e],t);return n===-1?void 0:jr(E[e],n,1)[0]}return kr(E[e])},t.removeHooks=function(e){E[e]=[]},t.removeAllHooks=function(){E=fi()},t}var vr,Q,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi=r((()=>{({entries:vr,setPrototypeOf:Q,isFrozen:yr,getPrototypeOf:br,getOwnPropertyDescriptor:xr}=Object),{freeze:Sr,seal:Cr,create:wr}=Object,{apply:Tr,construct:Er}=typeof Reflect<`u`&&Reflect,Sr||=function(e){return e},Cr||=function(e){return e},Tr||=function(e,t,n){return e.apply(t,n)},Er||=function(e,t){return new e(...t)},Dr=Y(Array.prototype.forEach),Or=Y(Array.prototype.lastIndexOf),kr=Y(Array.prototype.pop),Ar=Y(Array.prototype.push),jr=Y(Array.prototype.splice),Mr=Y(String.prototype.toLowerCase),Nr=Y(String.prototype.toString),Pr=Y(String.prototype.match),Fr=Y(String.prototype.replace),Ir=Y(String.prototype.indexOf),Lr=Y(String.prototype.trim),Rr=Y(Object.prototype.hasOwnProperty),zr=Y(RegExp.prototype.test),Br=mr(TypeError),Vr=Sr(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.section.select.shadow.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Hr=Sr(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.filter.font.g.glyph.glyphref.hkern.image.line.lineargradient.marker.mask.metadata.mpath.path.pattern.pol
4ygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Ur=Sr([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Wr=Sr([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Gr=Sr(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Kr=Sr([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),qr=Sr([`#text`]),Jr=Sr(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.face.for.headers.height.hidden.high.href.hreflang.id.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),Yr=Sr(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Xr=Sr(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Zr=Sr([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Qr=Cr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$r=Cr(/<%[\w\W]*|[\w\W]*%>/gm),ei=Cr(/\$\{[\w\W]*/gm),ti=Cr(/^data-[\-\w.\u00B7-\uFFFF]+$/),ni=Cr(/^aria-[\-\w]+$/),ri=Cr(/^(?:(?:(?
4:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ii=Cr(/^(?:\w+script|data):/i),ai=Cr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),oi=Cr(/^html$/i),si=Cr(/^[a-z][.\w]*(-[.\w]+)+$/i),ci=Object.freeze({__proto__:null,ARIA_ATTR:ni,ATTR_WHITESPACE:ai,CUSTOM_ELEMENT:si,DATA_ATTR:ti,DOCTYPE_NAME:oi,ERB_EXPR:$r,IS_ALLOWED_URI:ri,IS_SCRIPT_OR_DATA:ii,MUSTACHE_EXPR:Qr,TMPLIT_EXPR:ei}),li={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ui=function(){return typeof window>`u`?null:window},di=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},fi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},pi=_r()}));function hi(){return!!window?.chesscom?.features?.includes?.(`xss_filter_strip_diagram_comments`)}function gi(e,t){let n=e;if(t.forbidTags?.length){let r=document.createElement(`template`);r.innerHTML=e,r.content.querySelectorAll(t.forbidTags.join(`,`)).forEach(e=>{e.remove()}),n=r.innerHTML}let r=e=>{let t=[`noopener`,`noreferrer`,`noopener noreferrer`],n=e.getAttribute(`rel`)??``;`target`in e&&!t.includes(n)&&(e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener`))};pi.addHook(`afterSanitizeAttributes`,r);try{return pi.sanitize(n,{USE_PROFILES:{html:!0},ADD_ATTR:[`target`]})}finally{pi.removeHook(`afterSanitizeAttributes`,r)}}function _i(e,t={}){let n=typeof e==`string`?e:String(e);return hi()?gi(n,t):vi(n,t)}function vi(e,t){let n=[];return gi(e.replace(/<!--[\s\S]*?&-diagramtype:[\s\S]*?-->/g,e=>`__CHESS_DIAGRAM_PLACEHOLDER_${n.push(e)-1}__`),t).replace(/__CHESS_DIAGRAM_PLACEHOLDER_(\d+)__/g,(e,t)=>n[parseInt(t,10)]||``)}var yi,bi,xi,Si=r((()=>{mi(),yi=`a-zA-Z0-9_!#$%&*@ï¼ /"`,bi=`a-zA-Z0-9_-`,xi=`[@ï¼ ]([${bi}]{3,25})(?=[^${bi}]|$)`,RegExp(`(^|[^${yi}])(${xi})`,`g`)}));function Ci(){return Ai?.context?.i18n?.locale||Ai?.context?.locale||`en_US`}function wi(){return Ci()===`fr_FR`}function Ti(e){let t=e.trim(),n=t.match(Li);if(n){let e=n[1].split(`,`).map(e=>Number(e.trim()));return{matchesNumber:t=>e.includes(t),text:n[2].trim()}}let r=t.match(Ri);if(r){let e=r[1],t=Ei(r[2]),n=Ei(r[3]),i=r[4];return{matchesNumber:r=>(e===`[`?r>=t:r>t)&&(i===`]`?r<=n:r<n),text:r[5].trim()}}return{matchesNumber:()=>!1,text:t}}function Ei(e){let t=e.toLowerCase();return t===`-inf`?-1/0:t===`inf`||t===`+inf`?1/0:Number(e)}function Di(e,t){let n=e.find(e=>e.matchesNumber(t)),r=e[e.length-1]?.text??``;return n?n.text:t===0||t===1?e[0]?.text??``:t%1e6==0?e[1]?.text??r:e[2]?.text??r}function Oi(e,t,n,r){let i=Di(e.split(`|`).map(Ti),t);return ki.default.trans(i,n,r)}var ki,Ai,ji,Mi,Ni,Pi,$,Fi,Ii,Li,Ri,zi=r((()=>{ki=t(pr(),1),Si(),Ai=window,ki.default.placeHolderPrefix=``,ki.default.placeHolderSuffix=``,ji=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Mi=e=>{let t={};return e!=null&&Object.keys(e).forEach(n=>{let r=ji(n);r!=null&&r.length>0&&(t[r]=_i(e[n]))}),t},Ni=e=>{let t={};return e!=null&&Object.keys(e).forEach(n=>{let r=ji(n);r!=null&&r.length>0&&(t[r]=e[n])}),t},Pi=(e,t=`messages`,n)=>{let r=Ci();if(Ai?.chesscom?.translations?.[r]?.[t]?.[e])return Ai.chesscom.translations[r][t][e];if(Ai?.chesscom_translations?.[t]?.[e])return Ai.chesscom_translations[t][e];if(t===`countries`&&Ai?.Country?.[e])return Ai.Country[e];if(!n)return t===`javascript`?e:Pi(e,`javascript`)},$=(e,t,n)=>ki.default.trans(Pi(e,n),Mi(t),n),Fi=(e,t,n)=>ki.default.trans(Pi(e,n),Ni(t),n),Ii=(e,t,n,r)=>{if(t===void 0)return``;let i=Pi(e,r),a=Mi(n);return wi()?Oi(i,t,a,r):ki.default.transChoice(i,t,a)},Li=/^\{\s*(-?\d+(?:\s*,\s*-?\d+)*)\s*\}\s*(.*)$/,Ri=/^([\[\]])\s*(-?inf|-?\d+)\s*,\s*(\+?inf|-?\d+)\s*([\[\]])\s*(.*)$/i})),Bi,Vi=r((()=>{zi(),Bi={key:`gameplay.show_membership_badges`,edit:{label:()=>$(`Show Membership Badges`),type:`switch`}}}));function Hi(){return`ssr-${Qi++}`}function Ui(e,t=Hi()){return()=>(Xi[t]||(Xi[t]=e(t)),Xi[t])}function Wi(e){return Yi?.[e]}function Gi(e){return Yi?.[e]!==void 0}function Ki(){return qi()||Ji()}function qi(){return!!Zi.er?.runtime}function Ji(){return!!(Zi.er&&!Zi.er.runtime)}var Yi,Xi,Zi,Qi,$i=r((()=>{Yi={},Xi={},Zi=window,Qi=0}));function ea(e,t){return Ui(()=>t(),e)}var ta=r((()=>{$i()}));function na(){let e=window.chesscom?.settings;return e?Wt(e).map(t=>({key:t,value:e[t]})):[]}var ra,ia=r((()=>{ta(),Gt(),ra=ea(`extension.settings`,()=>B({loadedSettings:na(),changedSettings:[],failedSettings:[],loadingSettings:[],localOverwrites:{},isReloadingThemeStyle:!1,pendingThemeStyleReload:null}))}));function aa(e){let t=ra(),n=rn(e)?e:e.key;return n in t.localOverwrites?t.localOverwrites[n]:t.loadedSettings.find(e=>e.key===n)?.value}var oa=r((()=>{ia(),an()}));function sa(){return aa(Bi)??!0}var ca=r((()=>{Vi(),oa()})),la,ua=r((()=>{$i(),la=Ui(e=>{let t=je();return Gi(e)&&(t.state.value=Wi(e)),t},`pinia`)})),da,fa,pa=r((()=>
4{da={exports:{}},da.exports,(function(e,t){var n=t();typeof define==`function`&&define.amd?define([],n.Routing):typeof da==`object`&&da.exports?da.exports=n.Routing:(e.Routing=n.Routing,e.fos={Router:n.Router})})(void 0,function(){var e={};e.__esModule=!0,e.Routing=e.Router=void 0;var t=function(){function t(e,t){this.context_=e||{base_url:``,prefix:``,host:``,port:``,scheme:``,locale:``},this.setRoutes(t||{})}return t.getInstance=function(){return e.Routing},t.setData=function(e){t.getInstance().setRoutingData(e)},t.prototype.setRoutingData=function(e){this.setBaseUrl(e.base_url),this.setRoutes(e.routes),e.prefix!==void 0&&this.setPrefix(e.prefix),e.port!==void 0&&this.setPort(e.port),e.locale!==void 0&&this.setLocale(e.locale),this.setHost(e.host),e.scheme!==void 0&&this.setScheme(e.scheme)},t.prototype.setRoutes=function(e){this.routes_=Object.freeze(e)},t.prototype.getRoutes=function(){return this.routes_},t.prototype.setBaseUrl=function(e){this.context_.base_url=e},t.prototype.getBaseUrl=function(){return this.context_.base_url},t.prototype.setPrefix=function(e){this.context_.prefix=e},t.prototype.setScheme=function(e){this.context_.scheme=e},t.prototype.getScheme=function(){return this.context_.scheme},t.prototype.setHost=function(e){this.context_.host=e},t.prototype.getHost=function(){return this.context_.host},t.prototype.setPort=function(e){this.context_.port=e},t.prototype.getPort=function(){return this.context_.port},t.prototype.setLocale=function(e){this.context_.locale=e},t.prototype.getLocale=function(){return this.context_.locale},t.prototype.buildQueryParams=function(e,t,n){var r=this,i,a=new RegExp(/\[\]$/);if(t instanceof Array)t.forEach(function(t,i){a.test(e)?n(e,t):r.buildQueryParams(e+`[`+(typeof t==`object`?i:``)+`]`,t,n)});else if(typeof t==`object`)for(i in t)this.buildQueryParams(e+`[`+i+`]`,t[i],n);else n(e,t)},t.prototype.getRoute=function(e){var t=[this.context_.prefix+e,e+`.`+this.context_.locale,this.context_.prefix+e+`.`+this.context_.locale,e];for(var n in t)if(t[n]in this.routes_)return this.routes_[t[n]];throw Error(`The route "`+e+`" does not exist.`)},t.prototype.generate=function(e,n,r){var i=this.getRoute(e),a=n||{},o=Object.assign({},a),s=``,c=!0,l=``,u=this.getPort()===void 0||this.getPort()===null?``:this.getPort();if(i.tokens.forEach(function(n){if(n[0]===`text`&&typeof n[1]==`string`){s=t.encodePathComponent(n[1])+s,c=!1;return}if(n[0]===`variable`){n.length===6&&n[5]===!0&&(c=!1);var r=i.defaults&&!Array.isArray(i.defaults)&&typeof n[3]==`string`&&n[3]in i.defaults;if(!1===c||!r||typeof n[3]==`string`&&n[3]in a&&!Array.isArray(i.defaults)&&a[n[3]]!=i.defaults[n[3]]){var l=void 0;if(typeof n[3]==`string`&&n[3]in a)l=a[n[3]],delete o[n[3]];else if(typeof n[3]==`string`&&r&&!Array.isArray(i.defaults))l=i.defaults[n[3]];else if(c)return;else throw Error(`The route "`+e+`" requires the parameter "`+n[3]+`".`);if(!(!0===l||!1===l||l===``)||!c){var u=t.encodePathComponent(l);u===`null`&&l===null&&(u=``),s=n[1]+u+s}c=!1}else r&&typeof n[3]==`string`&&n[3]in o&&delete o[n[3]];return}throw Error(`The token type "`+n[0]+`" is not supported.`)}),s===``&&(s=`/`),i.hosttokens.forEach(function(e){var t;if(e[0]===`text`){l=e[1]+l;return}e[0]===`variable`&&(e[3]in a?(t=a[e[3]],delete o[e[3]]):i.defaults&&!Array.isArray(i.defaults)&&e[3]in i.defaults&&(t=i.defaults[e[3]]),l=e[1]+t+l)}),s=this.context_.base_url+s,i.requirements&&`_scheme`in i.requirements&&this.getScheme()!=i.requirements._scheme){var d=l||this.getHost();s=i.requirements._scheme+`://`+d+(d.indexOf(`:`+u)>-1||u===``?``:`:`+u)+s}else if(i.schemes!==void 0&&i.schemes[0]!==void 0&&this.getScheme()!==i.schemes[0]){var d=l||this.getHost();s=i.schemes[0]+`://`+d+(d.indexOf(`:`+u)>-1||u===``?``:`:`+u)+s}else l&&this.getHost()!==l+(l.indexOf(`:`+u)>-1||u===``?``:`:`+u)?s=this.getScheme()+`://`+l+(l.indexOf(`:`+u)>-1||u===``?``:`:`+u)+s:r===!0&&(s=this.getScheme()+`://`+this.getHost()+(this.getHost().indexOf(`:`+u)>-1||u===``?``:`:`+u)+s);if(Object.keys(o).length>
40){var f=[],p=function(e,n){n=typeof n==`function`?n():n,n=n===null?``:n,f.push(t.encodeQueryComponent(e)+`=`+t.encodeQueryComponent(n))};for(var m in o)o.hasOwnProperty(m)&&this.buildQueryParams(m,o[m],p);s=s+`?`+f.join(`&`)}return s},t.customEncodeURIComponent=function(e){return encodeURIComponent(e).replace(/%2F/g,`/`).replace(/%40/g,`@`).replace(/%3A/g,`:`).replace(/%21/g,`!`).replace(/%3B/g,`;`).replace(/%2C/g,`,`).replace(/%2A/g,`*`).replace(/\(/g,`%28`).replace(/\)/g,`%29`).replace(/'/g,`%27`)},t.encodePathComponent=function(e){return t.customEncodeURIComponent(e).replace(/%3D/g,`=`).replace(/%2B/g,`+`).replace(/%21/g,`!`).replace(/%7C/g,`|`)},t.encodeQueryComponent=function(e){return t.customEncodeURIComponent(e).replace(/%3F/g,`?`)},t}();return e.Router=t,e.Routing=new t,e.default=e.Routing,{Router:e.Router,Routing:e.Routing}}),fa=(da.exports==null?{}:da.exports).default||da.exports,(da.exports==null?{}:da.exports).__esModule,(da.exports==null?{}:da.exports).Router,(da.exports==null?{}:da.exports).Routing,(da.exports==null?{}:da.exports).undefined}));function ma(){return fa}var ha=r((()=>{pa()}));function ga(e){let t=ma();if(t.routes_[e])return;try{Object.assign(t.context_,{base_url:``,prefix:``,host:`www.chess.com`,port:``,scheme:`https`,locale:``})}catch{}Object.isFrozen(t.routes_)&&(t.routes_=Object.assign({},t.routes_));let n=`.chess-dev.com`,r=window.location.host.replace(/^[^.]+/,``),i=!window.Config?.cypress&&r;if(i&&t.context_.host.includes(n)&&(t.context_.host=t.context_.host.replace(n,r)),window.chesscom?.routes?.[e]){let a=window.chesscom.routes[e];i&&(a.defaults?.host?.includes(n)&&(a.defaults.host=a.defaults.host.replace(n,r)),a.hosttokens?.forEach(e=>{e.forEach((t,i)=>{rn(t)&&t.includes(n)&&(e[i]=t.replace(n,r))})})),t.routes_[e]=a}}var _a=r((()=>{ha(),an()})),va,ya,ba,xa,Sa=r((()=>{va=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),ya=function(e){return`/bundles/app/vite/`+e},ba={},xa=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=ya(t,n),t=s(t),t in ba)return;ba[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:va,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}}));async function Ca(){return xa(()=>e(()=>import(`/r2/assets-chess/vite/vendors/@sentry/browser.BlrLLymbcR.js`),`/r2/assets-chess/vite/vendors/@sentry/browser.BlrLLymbcR.js`),[])}var wa=r((()=>{Sa()}));async function Ta(){try{return!!(await Ca()).getCurrentHub().getClient()}catch{return!1}}var Ea=r((()=>{wa()}));async function Da(e=0){if(await Ta()&&(window.chesscom.sudoEnableSentry=!0,e>0)){let t=Date.now()+e*24*60*60*1e3;window.localStorage.setItem(`enableSentryUntil`,t.toString())}}var Oa=r((()=>{Ea()}));async function ka(e,t){if((Ht()||on())&&console.error(e),!await Ta())return;await Da();let n=await Ca(),r=e instanceof Error?e:Error(typeof e==`string`?e:String(e));t?n.withScope(e=>{t?.extra&&e.setExtras(t.extra),t?.tags&&e.setTags(t.tags),t?.processEvent&&e.addEventProcessor(t.processEvent),t?.attachments?.forEach(t=>e.addAttachment(t)),n.captureException(r)}):n.captureException(r)}var Aa=r((()=>{Ut(),Oa(),wa(),Ea(),sn()})),ja,Ma,Na=r((()=>{Ft(),Lt(),zt(),Vt(),_a(),ha(),Aa(),ja=class{generate(e,t,n){let r=t||{};typeof r.username==`string`&&(r.username=r.username.toLowerCase()),ga(e);try{let t=ma().generate(e,r,n);if(t.startsWith(`http`))try{let e=new URL(t),n=window.location;if(e.origin===n.origin)return t;if(n.hostname===`localhost`)t=t.replace(e.origin,n.origin);else{if(Bt()){let[r]=e.hostname.split(`.`);r===`api`&&(e.hostname=`api-${n.hostname}`,t=e.toString())}let r=Pt(),i=Pt(t);t=t.replace(i,r)}}catch{ka(Error(`Failed replacing hostname in route '${e}
4'.`),{extra:{routeName:e,routeParams:r,absoluteUrl:n}})}return t}catch{let t=Error(`Couldn't find missing route '${e}'.`);return window.Jest||console.error(t),Rt()||ka(t,{extra:{missing_route:e}}),`/`}}i18nable(e){return`i18n_${e}`in window.chesscom.routes}i18n(e,t,n){let r=e,i=t||{};window.context?.route?.startsWith(`i18n`)&&this.i18nable(e)&&(i._locale=It().slice(0,2),r=`i18n_${e}`);let a=this.generate(r,i,n);return n?a:a.replace(/^.*\/\/[^/]+/,``)}},Ma=new ja})),Pa,Fa,Ia=r((()=>{Na(),zi(),window.chesscom=window.chesscom||{},window.chesscom.routes=window.chesscom.routes||{},Object.assign(window.chesscom.routes,{web_about:{tokens:[[`text`,`/about`]],defaults:{host:`www.chess.com`},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`af_ZA|ar_AR|az_AZ|be_BY|bg_BG|bn_BD|bs_BA|ca|cs_CZ|da_DK|de_DE|el_GR|en_US|es_ES|et_EE|eu_ES|fa_IR|fi_FI|fil_PH|fr_FR|gl_ES|he_IL|hi_IN|hr_HR|hu_HU|hy_AM|id_ID|is_IS|it_IT|ja_JP|ka_GE|ko_KR|lt_LT|lv_LV|nl_BE|ms_MY|nl_NL|no_NO|pl_PL|pt_BR|pt_PT|ro_RO|ru_RU|sk_SK|sl_SI|sq_AL|sr_RS|sv_SE|tk_TM|tr_TR|uk_UA|ur_PK|vi_VN|zh_CN|zh_HK|zh_TW`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},web_article_view:{tokens:[[`variable`,`/`,`[^/]++`,`url`,!0],[`text`,`/article/view`]],defaults:{host:`www.chess.com`},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`af_ZA|ar_AR|az_AZ|be_BY|bg_BG|bn_BD|bs_BA|ca|cs_CZ|da_DK|de_DE|el_GR|en_US|es_ES|et_EE|eu_ES|fa_IR|fi_FI|fil_PH|fr_FR|gl_ES|he_IL|hi_IN|hr_HR|hu_HU|hy_AM|id_ID|is_IS|it_IT|ja_JP|ka_GE|ko_KR|lt_LT|lv_LV|nl_BE|ms_MY|nl_NL|no_NO|pl_PL|pt_BR|pt_PT|ro_RO|ru_RU|sk_SK|sl_SI|sq_AL|sr_RS|sv_SE|tk_TM|tr_TR|uk_UA|ur_PK|vi_VN|zh_CN|zh_HK|zh_TW`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},web_membership:{tokens:[[`text`,`/membership`]],defaults:{host:`www.chess.com`},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`af_ZA|ar_AR|az_AZ|be_BY|bg_BG|bn_BD|bs_BA|ca|cs_CZ|da_DK|de_DE|el_GR|en_US|es_ES|et_EE|eu_ES|fa_IR|fi_FI|fil_PH|fr_FR|gl_ES|he_IL|hi_IN|hr_HR|hu_HU|hy_AM|id_ID|is_IS|it_IT|ja_JP|ka_GE|ko_KR|lt_LT|lv_LV|nl_BE|ms_MY|nl_NL|no_NO|pl_PL|pt_BR|pt_PT|ro_RO|ru_RU|sk_SK|sl_SI|sq_AL|sr_RS|sv_SE|tk_TM|tr_TR|uk_UA|ur_PK|vi_VN|zh_CN|zh_HK|zh_TW`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},web_member_titled_players:{tokens:[[`text`,`/members/titled-players`]],defaults:{host:`www.chess.com`},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`af_ZA|ar_AR|az_AZ|be_BY|bg_BG|bn_BD|bs_BA|ca|cs_CZ|da_DK|de_DE|el_GR|en_US|es_ES|et_EE|eu_ES|fa_IR|fi_FI|fil_PH|fr_FR|gl_ES|he_IL|hi_IN|hr_HR|hu_HU|hy_AM|id_ID|is_IS|it_IT|ja_JP|ka_GE|ko_KR|lt_LT|lv_LV|nl_BE|ms_MY|nl_NL|no_NO|pl_PL|pt_BR|pt_PT|ro_RO|ru_RU|sk_SK|sl_SI|sq_AL|sr_RS|sv_SE|tk_TM|tr_TR|uk_UA|ur_PK|vi_VN|zh_CN|zh_HK|zh_TW`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},web_member_view:{tokens:[[`variable`,`/`,`[^/]++`,`username`,!0],[`text`,`/member`]],defaults:{host:`www.chess.com`},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`af_ZA|ar_AR|az_AZ|be_BY|bg_BG|bn_BD|bs_BA|ca|cs_CZ|da_DK|de_DE|el_GR|en_US|es_ES|et_EE|eu_ES|fa_IR|fi_FI|fil_PH|fr_FR|gl_ES|he_IL|hi_IN|hr_HR|hu_HU|hy_AM|id_ID|is_IS|it_IT|ja_JP|ka_GE|ko_KR|lt_LT|lv_LV|nl_BE|ms_MY|nl_NL|no_NO|pl_PL|pt_BR|pt_PT|ro_RO|ru_RU|sk_SK|sl_SI|sq_AL|sr_RS|sv_SE|tk_TM|tr_TR|uk_UA|ur_PK|vi_VN|zh_CN|zh_HK|zh_TW`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[`GET`,`POST`],schemes:[`https`]},i18n_web_article_view:{tokens:[[`variable`,`/`,`[^/]++`,`url`,!0],[`text`,`/article/view`],[`variable`,`/`,`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`,`_locale`,!0]],defaults:{host:`www.chess.com`,_locale:``},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},i18n_web_membership:{tokens:[[`text`,`/membership`],[`variable`,`/`,`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`,`_locale`,!0]],defaults:{host:`www.chess.com`,_locale:``},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},i18n_web_member_titled_players:{tokens:[[`text`,`/members/titled-players`],[`variable`,`/`,`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`,`_locale`,!0]],defaults:{host:`www.chess.com`,_locale:``},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[],schemes:[`https`]},i18n_web_member_view:{tokens:[[`variable`,`/`,`[^/]++`,`username`,!0],[`text`,`/member`],[`variable`,`/`,`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`,`_locale`,!0]],defaults:{host:`www.chess.com`,_locale:``},requirements:{host:`(?!admin)(www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(\\.)?[^\\s]+`,_locale:`es|fr|de|pl|ru|sv|el|pt|it|zh|ja|ko|nl|hy|bg|hr|cs|da|fi|hu|lt|no|ro|sk|sl|tr|uk|af|ar|az|be|bs|et|fa|gl|he|hi|id|is|ka|lv|ms|pt-BR|sq|sr|vi|zh-HK|zh-TW|fil|nl-BE|bn|tk|ca|ur|--locale--`},hosttokens:[[`variable`,``,`(?!admin)(?:www|schach|ru|uk|ajedrez|fr|scacchi|sakk|schaken|szachy)?(?:\\.)?[^\\s]+`,`host`,!0]],methods:[`GET`,`POST`],schemes:[`https`]}}),Pa=()=>({webAbout:Ma.generate(`web_about`),webArticleUkraine:Ma.generate(`web_article_view`,{url:`on-the-invasion-of-ukraine`}),webMembership:e=>Ma.generate(`web_membership`,e),webMemberTitledPlayers:Ma.generate(`web_member_titled_players`),webMemberView:e=>Ma.generate(`web_member_view`,{username:e})}),Fa=()=>({"Avatar of %username%":e=>$(`Avatar of %username%`,{"%username%":e}),Avatar:$(`Avatar`),"Back to Top":$(`Back to Top`),Back:$(`Back`),Close:$(`Close`),Collapse:$(`Collapse`),"Current Page, Page %pageNumber%":e=>$(`Current Page, Page %pageNumber%`,{"%pageNumber%":String(e)}),"Diamond Member":$(`Diamond Member`),Diamond:$(`Diamond`),Expand:$(`Expand`),"First Page":$(`First Page`),First:$(`First`),"Gold Member":$(`Gold Member`),Gold:$(`Gold`),Premium:$(`Premium`),"Last Page":$(`Last Page`),Last:$
4(`Last`),"Loading...":$(`Loading...`),Moderator:$(`Moderator`),"Next Page":$(`Next Page`),"Page %pageNumber%":e=>$(`Page %pageNumber%`,{"%pageNumber%":String(e)}),"Platinum Member":$(`Platinum Member`),Platinum:$(`Platinum`),"Previous Page":$(`Previous Page`),"Staff Member":$(`Staff Member`),Top:$(`Top`),"Upgrade to Diamond to use this feature":$(`Upgrade to Diamond to use this feature`),"Upgrade to Gold to use this feature":$(`Upgrade to Gold to use this feature`),"Upgrade to Platinum to use this feature":$(`Upgrade to Platinum to use this feature`),"Upgrade to use this feature":$(`Upgrade to use this feature`),"Click here to see our stance on the war in Ukraine":$(`Click here to see our stance on the war in Ukraine`),"Due to the ongoing war and resulting international sanctions, Russian and Belarusian flags will not be shown for players in Verified events.":$(`Due to the ongoing war and resulting international sanctions, Russian and Belarusian flags will not be shown for players in Verified events.`)})}));function La(){return window.chesscom.enableSentry||window.chesscom.sudoEnableSentry||tn()}var Ra=r((()=>{nn()}));function za(e){console.error(e),La()&&ka(e)}var Ba=r((()=>{Aa(),Ra()})),Va=r((()=>{Ba()})),Ha=r((()=>{Va()}));function Ua(e,t){if(Me(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Me(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Wa=r((()=>{Ne()}));function Ga(e){var t=Ua(e,`string`);return Me(t)==`symbol`?t:t+``}var Ka=r((()=>{Ne(),Wa()}));function qa(e,t,n){return(t=Ga(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ja=r((()=>{Ka()})),Ya,Xa,Za=r((()=>{Ba(),Ja(),Ya=class{constructor(){qa(this,`promise`,Promise.resolve())}add(e){return this.promise=this.promise.then(()=>e instanceof Promise?e:e()).catch(za)}reset(){this.promise=Promise.resolve()}async settle(){let e;do e=this.promise,await e;while(e!==this.promise)}},Xa=class{constructor(){qa(this,`promise`,Promise.resolve()),qa(this,`pending`,new Set)}add(e){let t=Promise.resolve().then(()=>e instanceof Promise?e:e()).catch(za);return this.pending.add(t),t.finally(()=>{this.pending.delete(t),this.updatePromise()}),this.updatePromise(),t}reset(){this.pending.clear(),this.promise=Promise.resolve()}async settle(){let e;do e=this.promise,await e;while(e!==this.promise)}updatePromise(){this.pending.size===0?this.promise=Promise.resolve():this.promise=Promise.all([...this.pending]).then(()=>{})}},new Xa,new Ya})),Qa=r((()=>{Za()})),$a=r((()=>{yo()})),eo=r((()=>{Ba(),$a(),Za()})),to=r((()=>{Za()})),no=r((()=>{Ba(),Va(),Za()})),ro=r((()=>{})),io=r((()=>{ro(),Ba()})),ao=r((()=>{io()})),oo=r((()=>{Ha(),Qa(),$i(),$a(),eo(),to(),Za(),no(),ta(),ua(),Ja(),ao(),io()}));function so(e){let t=window.chesscom?.routes;if(!t)return``;let n=e??window.location.pathname;if(e===void 0&&co===n&&lo!==null)return lo;let r=Yt(n,t);return e===void 0&&(co=n,lo=r),r}var co,lo,uo=r((()=>{en(),co=null,lo=null}));function fo(){return window.chesscom.features.includes(`web_route_name_from_url`)||Ki()?so():window.context?.route??``}var po=r((()=>{oo(),uo()})),mo,ho=r((()=>{zi(),mo={methods:{$unsafeTrans:Fi,$trans:$,$transChoice:Ii}}}));function go(e){e.use(la()),e.mixin(mo);let t=fo();return mn(e,{currentRoute:()=>t,features:window.chesscom.features,routes:Pa(),trans:Fa(),shouldShowMembershipBadges:sa}),e}var _o=r((()=>{gn(),ca(),ua(),Ia(),po(),ho()}));function vo(e,t){return go(ce(e,t))}var yo=r((()=>{_o()})),bo=a(((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,{Animation:()=>r.Animation});var r=n(2)}),((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}
4,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,{RuntimeLoader:()=>o});var r=n(4),i=n(5),a=function(){return a=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},a.apply(this,arguments)},o=function(){function e(){}return e.notifyError=function(t){var n;for(e.isLoading=!1;e.errorCallbackQueue.length>0;)(n=e.errorCallbackQueue.shift())==null||n(t);e.callBackQueue=[]},e.loadRuntime=function(){var t=e.wasmURL,n=e.wasmBinary;e.enablePerfMarks&&performance.mark(`rive:wasm-init:start`),r.default(a({locateFile:function(){return t}},n?{wasmBinary:n}:{})).then(function(t){var n;for(e.enablePerfMarks&&(performance.mark(`rive:wasm-init:end`),performance.measure(`rive:wasm-init`,`rive:wasm-init:start`,`r
4ive:wasm-init:end`)),e.runtime=t,e.errorCallbackQueue=[];e.callBackQueue.length>0;)(n=e.callBackQueue.shift())==null||n(e.runtime)}).catch(function(n){var r={message:n?.message||`Unknown error`,type:n?.name||`Error`,wasmError:n instanceof WebAssembly.CompileError||n instanceof WebAssembly.RuntimeError,originalError:n};console.debug(`Rive WASM load error details:`,r);var i=e.wasmFallbackURL,a=i!==null&&t.toLowerCase()===i.toLowerCase();if(i!==null&&!a)console.warn(`Failed to load WASM from ${t} (${r.message}), trying fallback URL: ${i}`),e.wasmBinary=null,e.setWasmUrl(i),e.loadRuntime();else{var o=[`Could not load Rive WASM file from ${a?`the configured WASM URL or its fallback (${i})`:t}.`,`Possible reasons:`,`- Network connection is down`,`- WebAssembly is not supported in this environment`,`- The WASM file is corrupted or incompatible`,` 5Error details:`,`- Type: ${r.type}`,`- Message: ${r.message}`,`- WebAssembly-specific error: ${r.wasmError}`,` 6To resolve, you may need to:`,`1. Check your network connection`,`2. Set a new WASM source via RuntimeLoader.setWasmUrl()`,`3. Call RuntimeLoader.awaitInstance() again`].join(` 7`);console.error(o),e.notifyError(Error(o))}})},e.getInstance=function(t,n){e.isLoading||(e.isLoading=!0,e.loadRuntime()),e.runtime?t(e.runtime):(e.callBackQueue.push(t),n&&e.errorCallbackQueue.push(n))},e.awaitInstance=function(){return new Promise(function(t,n){return e.getInstance(t,n)})},e.setWasmUrl=function(t){e.wasmURL=t},e.getWasmUrl=function(){return e.wasmURL},e.setWasmFallbackUrl=function(t){e.wasmFallbackURL=t},e.getWasmFallbackUrl=function(){return e.wasmFallbackURL},e.setWasmBinary=function(t){if(t instanceof ArrayBuffer||t===null){e.wasmBinary=t;return}console.error(`setWasmBinary expects an ArrayBuffer or null`)},e.getWasmBinary=function(){return e.wasmBinary},e.isLoading=!1,e.callBackQueue=[],e.wasmURL=`https://unpkg.com/${i.name}@${i.version}/rive.wasm`,e.wasmFallbackURL=`https://cdn.jsdelivr.net/npm/${i.name}@${i.version}/rive_fallback.wasm`,e.wasmBinary=null,e.errorCallbackQueue=[],e.enablePerfMarks=!1,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.nb(),i&&i.Ob()}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.Mb=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.Ob=function(){var r=performance.now();n?(++t,r-=n,1e3<r&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.nb=function(){}}function u(){console.assert(!0);let e=new Map,t=-1/0;this.push=function(n){return n=n+255>>8,e.has(n)&&clearTimeout(e.get(n)),e.set(n,setTimeout(function(){e.delete(n),e.length==0?t=-1/0:n==t&&(t=Math.max(...e.keys()),console.assert(t<n))},1e3)),t=Math.max(n,t),t<<8}}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.setFallbackFontCb;r.setFallbackFontCallback=typeof n==`function`?function(e){n(e)}:function(){console.warn(`Module.setFallbackFontCallback called, but text support is not enabled in this build.`)};let i=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=i.extend(`CustomFileAssetLoader`,{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Cb=e},loadContents:function(e,t){return e=r.ptrToAsset(e),this.Cb(e,t)}}),r.CDNFileAssetLoader=i.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=i.extend(`FallbackFileAssetLoader`,{__construct:function(){this.__parent.__construct.call(this),this.jb=[]},addLoader:function(e){this.jb.push(e)},loadContents:function(e,t){for(let n of this.jb)if(n.loadContents(e,t))return!0;return!1}});let a=r.computeAlignment;r.computeAlignment=function(e,t,n,r,i=1){return a.call(this,e,t,n,r,i)}};let f=r.onRuntimeInitialized;r.onRuntimeInitialized=function(){function e(e){this.G=e,this.Bb=e.getContext(`2d`),this.$a=i,this.S=[],this.ka=0,this.clear=function(){console.assert(this.ka==0),this.S=[],a.delete(this)},this.save=function(){++this.ka,this.S.push(i.save.bind(i))},this.restore=function(){0<this.ka&&(this.S.push(i.restore.bind(i)),--this.ka)},this.transform=function(e){this.S.push(i.transform.bind(i,e))},this.align=function(e,t,n,r,a=1){this.S.push(i.align.bind(i,e,t,n,r,a))},this.flush=function(){console.assert(this.ka==0),a.add(this),i.Za||n()},this.bindContext=function(){let e=this.$a;e&&e.Z&&nr(e.Z)},this.delete=function(){}}function t(e,t=!1){var n={alpha:!0,depth:t,stencil:t,antialias:t,premultipliedAlpha:!0,preserveDrawingBuffer:0,powerPreference:`high-performance`,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:!1,explicitSwapControl:0,renderViaOffscreenBackBuffer:0};if(t=e.getContext(`webgl2`,n),!t)return null;n=tr(t,n),nr(n);let r=o(e.width,e.height);r.Z=n,r.G=e,r.Oa=e.width,r.Na=e.height,r.T=t,r.Gb=function(){this.Z&&nr(this.Z)};var i=r.delete;return r.delete=function(){this.Gb(),i.call(this);var e=this.Z;ir===q[e]&&(ir=null),typeof JSEvents==`object`&&JSEvents.Rc(q[e].F.canvas),q[e]&&q[e].F.canvas&&(q[e].F.canvas.Ab=void 0),this.Z=this.G=this.Oa=this.Na=this.T=q[e]=null},r}function n(){if(i){var e=i.Eb,t=0,n=0,o=0,s=Array(a.size),c=0;for(var l of a)l.fa=Math.min(l.G.width,e),l.ea=Math.min(l.G.height,e),l.La=l.ea*l.fa,t=Math.max(t,l.fa),n=Math.max(n,l.ea),o+=l.La,s[c++]=l;if(a.clear(),!(0>=o)){for(t=1<<(0>=t?0:32-Math.clz32(t-1)),n=1<<(0>=n?0:32-Math.clz32(n-1));n*t<o;)t<=n?t*=2:n*=2;
7for(t=Math.min(t,e),t=Math.min(n,e),s.sort((e,t)=>t.La-e.La),o=new r.DynamicRectanizer(e),l=0;l<s.length;){for(o.reset(t,n),c=l;c<s.length;++c){var u=s[c],f=o.addRect(u.fa,u.ea);if(0>f){console.assert(c>l);break}u.qa=f&65535,u.ra=f>>16}for(u=d.push(o.drawWidth()),f=p.push(o.drawHeight()),console.assert(u>=o.drawWidth()),console.assert(f>=o.drawHeight()),console.assert(u<=e),console.assert(f<=e),i.G.width!=u&&(i.G.width=u),i.G.height!=f&&(i.G.height=f),i.clear(),u=l;u<c;++u){f=s[u],i.saveClipRect(f.qa,f.ra,f.qa+f.fa,f.ra+f.ea);let e=new r.Mat2D;e.xx=f.fa/f.G.width,e.yy=f.ea/f.G.height,e.xy=e.yx=0,e.tx=f.qa,e.ty=f.ra,i.transform(e);for(let e of f.S)e();i.restoreClipRect(),f.S=[]}for(i.flush();l<c;++l)u=s[l],f=u.Bb,f.globalCompositeOperation=`copy`,f.drawImage(i.G,u.qa,u.ra,u.fa,u.ea,0,0,u.G.width,u.G.height);l=c}}}}f&&f();let i=null,a=new Set,o=r.makeRenderer;r.makeRenderer=function(n,r){if(!i){function e(e){var n=document.createElement(`canvas`);return n.width=1,n.height=1,i=t(n,e),i?(i.Za=!!i.T.getExtension(`WEBGL_shader_pixel_local_storage`),i.Eb=Math.min(i.T.getParameter(i.T.MAX_RENDERBUFFER_SIZE),i.T.getParameter(i.T.MAX_TEXTURE_SIZE)),i.Ma=!i.Za,(e=i.T.getExtension(`WEBGL_debug_renderer_info`))&&(n=i.T.getParameter(e.UNMASKED_RENDERER_WEBGL),i.T.getParameter(e.UNMASKED_VENDOR_WEBGL).includes(`Google`)&&n.includes(`ANGLE Metal Renderer`)&&(i.Ma=!1)),i):null}if(i=e(!0),!i)throw`Unable to create WebGL context, your environment may not support WebGL. Try out @rive-app/canvas as an alternative.`;i.Ma||(i=e(!1))}return r?new e(n):t(n,i.Ma)};let s=r.Artboard.prototype.delete;r.Artboard.prototype.delete=function(){this.Fb=!0,s.call(this)};let c=r.Artboard.prototype.draw;r.Artboard.prototype.draw=function(e){e.S?e.S.push(()=>{this.Fb||c.call(this,e.$a)}):c.call(this,e)};let d=new u,p=new u,m=new l;r.requestAnimationFrame=m.requestAnimationFrame.bind(m),r.cancelAnimationFrame=m.cancelAnimationFrame.bind(m),r.enableFPSCounter=m.Mb.bind(m),m.nb=n,r.resolveAnimationFrame=n;let h=r.load;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)),Promise.resolve(h(e,i))};let g=r.WebGL2Renderer.prototype.clear;r.WebGL2Renderer.prototype.clear=function(){nr(this.Z);let e=this.G;(this.Oa!=e.width||this.Na!=e.height)&&(this.resize(e.width,e.height),this.Oa=e.width,this.Na=e.height),g.call(this)},r.decodeImage=function(e,t){e=r.decodeWebGL2Image(e),t(e)};let _=r.Renderer.prototype.align;r.Renderer.prototype.align=function(e,t,n,r,i=1){_.call(this,e,t,n,r,i)}};var p=Object.assign({},r),m=`./this.program`,h=``,g,_;(s||c)&&(c?h=self.location.href:typeof document<`u`&&document.currentScript&&(h=document.currentScript.src),e&&(h=e),h=h.startsWith(`blob:`)?``:h.substr(0,h.replace(/[?#].*/,``).lastIndexOf(`/`)+1),c&&(_=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),g=(e,t,n)=>{if(N(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 v=r.print||console.log.bind(console),y=r.printErr||console.error.bind(console);Object.assign(r,p),p=null,r.thisProgram&&(m=r.thisProgram);var b;r.wasmBinary&&(b=r.wasmBinary);var x,S=!1,C,w,T,ee,E,D,O,te;function ne(){var e=x.buffer;r.HEAP8=C=new Int8Array(e),r.HEAP16=T=new Int16Array(e),r.HEAPU8=w=new Uint8Array(e),r.HEAPU16=ee=new Uint16Array(e),r.HEAP32=E=new Int32Array(e),r.HEAPU32=D=new Uint32Array(e),r.HEAPF32=O=new Float32Array(e),r.HEAPF64=te=new Float64Array(e)}var re=[],ie=[],ae=[];function oe(){var e=r.preRun.shift();re.unshift(e)}var se=0,k=null,A=null;function j(e){throw r.onAbort?.(e),e=`Aborted(`+e+`)`,y(e),S=!0,e=new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`),a(e),e}var M=e=>e.startsWith(`data:application/octet-stream;base64,`),N=e=>e.startsWith(`file://`),P;function ce(e){if(e==P&&b)return new Uint8Array(b);if(_)return _(e);throw`both async and sync fetching of the wasm failed`}function le(e){return b?Promise.resolve().then(()=>ce(e)):new Promise((t,n)=>{g(e,e=>
7t(new Uint8Array(e)),()=>{try{t(ce(e))}catch(e){n(e)}})})}function ue(e,t,n){return le(e).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{y(`failed to asynchronously prepare wasm: ${e}`),j(e)})}function de(e,t){var n=P;return b||typeof WebAssembly.instantiateStreaming!=`function`||M(n)||N(n)||typeof fetch!=`function`?ue(n,e,t):fetch(n,{credentials:`same-origin`}).then(r=>WebAssembly.instantiateStreaming(r,e).then(t,function(r){return y(`wasm streaming compile failed: ${r}`),y(`falling back to ArrayBuffer instantiation`),ue(n,e,t)}))}var fe,pe,F={571519:(e,t,n,r,i)=>{if(typeof window>`u`||(window.AudioContext||window.webkitAudioContext)===void 0)return 0;if(window.h===void 0){window.h={Ga:0},window.h.I={},window.h.I.Da=e,window.h.I.capture=t,window.h.I.Qa=n,window.h.ia={},window.h.ia.stopped=r,window.h.ia.vb=i;let a=window.h;a.C=[],a.nc=function(e){for(var t=0;t<a.C.length;++t)if(a.C[t]==null)return a.C[t]=e,t;return a.C.push(e),a.C.length-1},a.zb=function(e){for(a.C[e]=null;0<a.C.length&&a.C[a.C.length-1]==null;)a.C.pop()},a.Uc=function(e){for(var t=0;t<a.C.length;++t)if(a.C[t]==e)return a.zb(t)},a.ua=function(e){return a.C[e]},a.Ya=[`touchend`,`click`],a.unlock=function(){for(var e=0;e<a.C.length;++e){var t=a.C[e];t!=null&&t.K!=null&&t.state===a.ia.vb&&t.K.resume().then(()=>{Sr(t.ob)},e=>{console.error(`Failed to resume audiocontext`,e)})}a.Ya.map(function(e){document.removeEventListener(e,a.unlock,!0)})},a.Ya.map(function(e){document.addEventListener(e,a.unlock,!0)})}return window.h.Ga+=1,1},573697:()=>{window.h!==void 0&&(window.h.Ya.map(function(e){document.removeEventListener(e,window.h.unlock,!0)}),--window.h.Ga,window.h.Ga===0&&delete window.h)},574001:()=>navigator.mediaDevices!==void 0&&navigator.mediaDevices.getUserMedia!==void 0,574105:()=>{try{var e=new(window.AudioContext||window.webkitAudioContext),t=e.sampleRate;return e.close(),t}catch{return 0}},574276:(e,t,n,r,i,a)=>{if(window.h===void 0)return-1;var o={},s={};return e==window.h.I.Da&&n!=0&&(s.sampleRate=n),o.K=new(window.AudioContext||window.webkitAudioContext)(s),o.K.suspend(),o.state=window.h.ia.stopped,n=0,e!=window.h.I.Da&&(n=t),o.Y=o.K.createScriptProcessor(r,n,t),o.Y.onaudioprocess=function(n){if((o.va==null||o.va.length==0)&&(o.va=new Float32Array(O.buffer,i,r*t)),e==window.h.I.capture||e==window.h.I.Qa){for(var s=0;s<t;s+=1)for(var c=n.inputBuffer.getChannelData(s),l=o.va,u=0;u<r;u+=1)l[u*t+s]=c[u];Cr(a,r,i)}if(e==window.h.I.Da||e==window.h.I.Qa)for(wr(a,r,i),s=0;s<n.outputBuffer.numberOfChannels;++s)for(c=n.outputBuffer.getChannelData(s),l=o.va,u=0;u<r;u+=1)c[u]=l[u*t+s];else for(s=0;s<n.outputBuffer.numberOfChannels;++s)n.outputBuffer.getChannelData(s).fill(0)},e!=window.h.I.capture&&e!=window.h.I.Qa||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(e){o.Ha=o.K.createMediaStreamSource(e),o.Ha.connect(o.Y),o.Y.connect(o.K.destination)}).catch(function(e){console.log(`Failed to get user media: `+e)}),e==window.h.I.Da&&o.Y.connect(o.K.destination),o.ob=a,window.h.nc(o)},577153:e=>window.h.ua(e).K.sampleRate,577226:e=>{e=window.h.ua(e),e.Y!==void 0&&(e.Y.onaudioprocess=function(){},e.Y.disconnect(),e.Y=void 0),e.Ha!==void 0&&(e.Ha.disconnect(),e.Ha=void 0),e.K.close(),e.K=void 0,e.ob=void 0},577626:e=>{window.h.zb(e)},577676:e=>{e=window.h.ua(e),e.K.resume(),e.state=window.h.ia.vb},577815:e=>{e=window.h.ua(e),e.K.suspend(),e.state=window.h.ia.stopped}},I=e=>{for(;0<e.length;)e.shift()(r)};function L(){var e=E[ft>>2];return ft+=4,e}var me=(e,t)=>
7{for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];i===`.`?e.splice(r,1):i===`..`?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift(`..`);return e},he=e=>{var t=e.charAt(0)===`/`,n=e.substr(-1)===`/`;return(e=me(e.split(`/`).filter(e=>!!e),!t).join(`/`))||t||(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},ge=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],!e&&!t?`.`:(t&&=t.substr(0,t.length-1),e+t)},_e=e=>{if(e===`/`)return`/`;e=he(e),e=e.replace(/\/$/,``);var t=e.lastIndexOf(`/`);return t===-1?e:e.substr(t+1)},ve=()=>{if(typeof crypto==`object`&&typeof crypto.getRandomValues==`function`)return e=>crypto.getRandomValues(e);j(`initRandomDevice`)},ye=e=>(ye=ve())(e),R=(...e)=>{for(var t=``,n=!1,r=e.length-1;-1<=r&&!n;r--){if(n=0<=r?e[r]:`/`,typeof n!=`string`)throw TypeError(`Arguments to path.resolve must be strings`);if(!n)return``;t=n+`/`+t,n=n.charAt(0)===`/`}return t=me(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`},be=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0,z=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&be)return be.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},B=[],xe=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},Se=(e,t,n,r)=>{if(!(0<r))return 0;var i=n;r=n+r-1;for(var a=0;a<e.length;++a){var o=e.charCodeAt(a);if(55296<=o&&57343>=o){var s=e.charCodeAt(++a);o=65536+((o&1023)<<10)|s&1023}if(127>=o){if(n>=r)break;t[n++]=o}else{if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6}else{if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63}t[n++]=128|o>>6&63}t[n++]=128|o&63}}return t[n]=0,n-i};function Ce(e,t){var n=Array(xe(e)+1);return e=Se(e,n,0,n.length),t&&(n.length=e),n}var we=[];function Te(e,t){we[e]={input:[],H:[],V:t},Qe(e,Ee)}var Ee={open(e){var t=we[e.node.Fa];if(!t)throw new H(43);e.s=t,e.seekable=!1},close(e){e.s.V.ta(e.s)},ta(e){e.s.V.ta(e.s)},read(e,t,n,r){if(!e.s||!e.s.V.ib)throw new H(60);for(var i=0,a=0;a<r;a++){try{var o=e.s.V.ib(e.s)}catch{throw new H(29)}if(o===void 0&&i===0)throw new H(6);if(o==null)break;i++,t[n+a]=o}return i&&(e.node.timestamp=Date.now()),i},write(e,t,n,r){if(!e.s||!e.s.V.Ta)throw new H(60);try{for(var i=0;i<r;i++)e.s.V.Ta(e.s,t[n+i])}catch{throw new H(29)}return r&&(e.node.timestamp=Date.now()),i}},De={ib(){a:{if(!B.length){var e=null;if(typeof window<`u`&&typeof window.prompt==`function`&&(e=window.prompt(`Input: `),e!==null&&(e+=` 8`)),!e){e=null;break a}B=Ce(e,!0)}e=B.shift()}return e},Ta(e,t){t===null||t===10?(v(z(e.H,0)),e.H=[]):t!=0&&e.H.push(t)},ta(e){e.H&&0<e.H.length&&(v(z(e.H,0)),e.H=[])},Xb(){return{yc:25856,Ac:5,xc:191,zc:35387,wc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Yb(){return 0},Zb(){return[24,80]}},Oe={Ta(e,t){t===null||t===10?(y(z(e.H,0)),e.H=[]):t!=0&&e.H.push(t)},ta(e){e.H&&0<e.H.length&&(y(z(e.H,0)),e.H=[])}};function ke(e,t){var n=e.l?e.l.length:0;n>=t||(t=Math.max(t,n*(1048576>n?2:1.125)>>>0),n!=0&&(t=Math.max(t,256)),n=e.l,e.l=new Uint8Array(t),0<e.v&&e.l.set(n.subarray(0,e.v),0))}var V={N:null,U(){return V.createNode(null,`/`,16895,0)},createNode(e,t,n,r){if((n&61440)==24576||(n&61440)==4096)throw new H(63);return V.N||={dir:{node:{X:V.j.X,P:V.j.P,la:V.j.la,Ba:V.j.Ba,tb:V.j.tb,yb:V.j.yb,ub:V.j.ub,sb:V.j.sb,Ia:V.j.Ia},stream:{ba:V.m.ba}},file:{node:{X:V.j.X,P:V.j.P},stream:{ba:V.m.ba,read:V.m.read,write:V.m.write,ab:V.m.ab,kb:V.m.kb,mb:V.m.mb}},link:{node:{X:V.j.X,P:V.j.P,ma:V.j.ma},stream:{}},bb:{node:{X:V.j.X,P:V.j.P},stream:Ze}},n=We(e,t,n,r),(n.mode&61440)==16384?(n.j=V.N.dir.node,n.m=V.N.dir.stream,n.l={}):(n.mode&61440)==32768?(n.j=V.N.file.node,n.m=V.N.file.stream,n.v=0,n.l=null):(n.mode&61440)==40960?(n.j=V.N.link.node,n.m=V.N.link.stream):(n.mode&61440)==8192&&(n.j=V.N.bb.node,n.m=V.N.bb.stream),n.timestamp=Date.now(),e&&(e.l[t]=n,e.timestamp=n.timestamp),n},Gc(e){return e.l?e.l.subarray?e.l.subarray(0,e.v):new Uint8Array(e.l):new Uint8Array},j:{X(e){var t={};return t.Dc=(e.mode&61440)==8192?e.id:1,t.Ic=e.id,t.mode=e.mode,t.Oc=1,t.uid=0,t.Hc=0,t.Fa=e.Fa,(e.mode&61440)==16384?t.size=4096:(e.mode&61440)==32768?t.size=e.v:(e.mode&61440)==40960?t.size=e.link.length:t.size=0,t.uc=new Date(e.timestamp),t.Nc=new Date(e.timestamp),t.Bc=new Date(e.timestamp),t.Hb=4096,t.vc=Math.ceil(t.size/t.Hb),t},P(e,t){if(t.mode!==void 0&&(e.mode=t.mode),t.timestamp!==void 0&&(e.timestamp=t.timestamp),t.size!==void 0&&(t=t.size,e.v!=t))if(t==0)e.l=null,e.v=0;else{var n=e.l;e.l=new Uint8Array(t),n&&e.l.set(n.subarray(0,Math.min(t,e.v))),e.v=t}},la(){throw Le[44]},Ba(e,t,n,r){return V.createNode(e,t,n,r)},tb(e,t,n){if((e.mode&61440)==16384){try{var r=Ue(t,n)}catch{}if(r)for(var i in r.l)throw new H(55)}delete e.parent.l[e.name],e.parent.timestamp=Date.now(),e.name=n,t.l[n]=e,t.timestamp=e.parent.timestamp},yb(e,t){delete e.l[t],e.timestamp=Date.now()},ub(e,t){var n=Ue(e,t),r;for(r in n.l)throw new H(55);delete e.l[t],e.timestamp=Date.now()},sb(e){var t=[`.`,`..`],n;for(n of Object.keys(e.l))t.push(n);return t}
8,Ia(e,t,n){return e=V.createNode(e,t,41471,0),e.link=n,e},ma(e){if((e.mode&61440)!=40960)throw new H(28);return e.link}},m:{read(e,t,n,r,i){var a=e.node.l;if(i>=e.node.v)return 0;if(e=Math.min(e.node.v-i,r),8<e&&a.subarray)t.set(a.subarray(i,i+e),n);else for(r=0;r<e;r++)t[n+r]=a[i+r];return e},write(e,t,n,r,i,a){if(t.buffer===C.buffer&&(a=!1),!r)return 0;if(e=e.node,e.timestamp=Date.now(),t.subarray&&(!e.l||e.l.subarray)){if(a)return e.l=t.subarray(n,n+r),e.v=r;if(e.v===0&&i===0)return e.l=t.slice(n,n+r),e.v=r;if(i+r<=e.v)return e.l.set(t.subarray(n,n+r),i),r}if(ke(e,i+r),e.l.subarray&&t.subarray)e.l.set(t.subarray(n,n+r),i);else for(a=0;a<r;a++)e.l[i+a]=t[n+a];return e.v=Math.max(e.v,i+r),r},ba(e,t,n){if(n===1?t+=e.position:n===2&&(e.node.mode&61440)==32768&&(t+=e.node.v),0>t)throw new H(28);return t},ab(e,t,n){ke(e.node,t+n),e.node.v=Math.max(e.node.v,t+n)},kb(e,t,n,r,i){if((e.node.mode&61440)!=32768)throw new H(43);if(e=e.node.l,i&2||e.buffer!==C.buffer){if((0<n||n+t<e.length)&&(e=e.subarray?e.subarray(n,n+t):Array.prototype.slice.call(e,n,n+t)),n=!0,j(),t=void 0,!t)throw new H(48);C.set(e,t)}else n=!1,t=e.byteOffset;return{o:t,tc:n}},mb(e,t,n,r){return V.m.write(e,t,0,r,n,!1),0}}},Ae=(e,t)=>
8{var n=0;return e&&(n|=365),t&&(n|=146),n},je=null,Me={},Ne=[],Pe=1,Fe=null,Ie=!0,H=class{constructor(e){this.name=`ErrnoError`,this.aa=e}},Le={},Re=class{constructor(){this.h={},this.node=null}get flags(){return this.h.flags}set flags(e){this.h.flags=e}get position(){return this.h.position}set position(e){this.h.position=e}},ze=class{constructor(e,t,n,r){e||=this,this.parent=e,this.U=e.U,this.Ca=null,this.id=Pe++,this.name=t,this.mode=n,this.j={},this.m={},this.Fa=r}get read(){return(this.mode&365)==365}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)==146}set write(e){e?this.mode|=146:this.mode&=-147}};function Be(e,t={}){if(e=R(e),!e)return{path:``,node:null};if(t=Object.assign({hb:!0,Va:0},t),8<t.Va)throw new H(32);e=e.split(`/`).filter(e=>!!e);for(var n=je,r=`/`,i=0;i<e.length;i++){var a=i===e.length-1;if(a&&t.parent)break;if(n=Ue(n,e[i]),r=he(r+`/`+e[i]),n.Ca&&(!a||a&&t.hb)&&(n=n.Ca.root),!a||t.gb){for(a=0;(n.mode&61440)==40960;)if(n=it(r),r=R(ge(r),n),n=Be(r,{Va:t.Va+1}).node,40<a++)throw new H(32)}}return{path:r,node:n}}function Ve(e){for(var t;;){if(e===e.parent)return e=e.U.lb,t?e[e.length-1]===`/`?e+t:`${e}/${t}`:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function He(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%Fe.length}function Ue(e,t){var n=(e.mode&61440)==16384?(n=Ke(e,`x`))?n:e.j.la?0:2:54;if(n)throw new H(n);for(n=Fe[He(e.id,t)];n;n=n.bc){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return e.j.la(e,t)}function We(e,t,n,r){return e=new ze(e,t,n,r),t=He(e.parent.id,e.name),e.bc=Fe[t],Fe[t]=e}function Ge(e){var t=[`r`,`w`,`rw`][e&3];return e&512&&(t+=`w`),t}function Ke(e,t){if(Ie)return 0;if(!t.includes(`r`)||e.mode&292){if(t.includes(`w`)&&!(e.mode&146)||t.includes(`x`)&&!(e.mode&73))return 2}else return 2;return 0}function qe(e,t){try{return Ue(e,t),20}catch{}return Ke(e,`wx`)}function Je(e){if(e=Ne[e],!e)throw new H(8);return e}function Ye(e,t=-1){if(e=Object.assign(new Re,e),t==-1)a:{for(t=0;4096>=t;t++)if(!Ne[t])break a;throw new H(33)}return e.W=t,Ne[t]=e}function Xe(e,t=-1){return e=Ye(e,t),e.m?.Fc?.(e),e}var Ze={open(e){e.m=Me[e.node.Fa].m,e.m.open?.(e)},ba(){throw new H(70)}};function Qe(e,t){Me[e]={m:t}}function $e(e,t){var n=t===`/`;if(n&&je)throw new H(10);if(!n&&t){var r=Be(t,{hb:!1});if(t=r.path,r=r.node,r.Ca)throw new H(10);if((r.mode&61440)!=16384)throw new H(54)}t={type:e,Qc:{},lb:t,$b:[]},e=e.U(t),e.U=t,t.root=e,n?je=e:r&&(r.Ca=t,r.U&&r.U.$b.push(t))}function et(e,t,n){var r=Be(e,{parent:!0}).node;if(e=_e(e),!e||e===`.`||e===`..`)throw new H(28);var i=qe(r,e);if(i)throw new H(i);if(!r.j.Ba)throw new H(63);return r.j.Ba(r,e,t,n)}function tt(e){return et(e,16895,0)}function nt(e,t,n){n===void 0&&(n=t,t=438),et(e,t|8192,n)}function rt(e,t){if(!R(e))throw new H(44);var n=Be(t,{parent:!0}).node;if(!n)throw new H(44);t=_e(t);var r=qe(n,t);if(r)throw new H(r);if(!n.j.Ia)throw new H(63);n.j.Ia(n,t,e)}function it(e){if(e=Be(e).node,!e)throw new H(44);if(!e.j.ma)throw new H(28);return R(Ve(e.parent),e.j.ma(e))}function at(e,t,n){if(e===``)throw new H(44);if(typeof t==`string`){var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(i===void 0)throw Error(`Unknown file open mode: ${t}`);t=i}if(n=t&64?(n===void 0?438:n)&4095|32768:0,typeof e==`object`)var a=e;else{e=he(e);try{a=Be(e,{gb:!(t&131072)}).node}catch{}}if(i=!1,t&64)if(a){if(t&128)throw new H(20)}else a=et(e,n,0),i=!0;if(!a)throw new H(44);if((a.mode&61440)==8192&&(t&=-513),t&65536&&(a.mode&61440)!=16384)throw new H(54);if(!i&&(n=a?(a.mode&61440)==40960?32:(a.mode&61440)==16384&&(Ge(t)!==`r`||t&512)?31:Ke(a,Ge(t)):44))throw new H(n);if(t&512&&!i){if(n=a,n=typeof n==`string`?Be(n,{gb:!0}).node:n,!n.j.P)throw new H(63);if((n.mode&61440)==16384)throw new H(31);if((n.mode&61440)!=32768)throw new H(28);if(i=Ke(n,`w`))throw new H(i);n.j.P(n,{size:0,timestamp:Date.now()})}return t&=-131713,a=Ye({node:a,path:Ve(a),flags:t,seekable:!0,position:0,m:a.m,oc:[],error:!1}),a.m.open&&a.m.open(a),!r.logReadFiles||t&1||(dt||={},e in dt||(dt[e]=1)),a}function ot(e,t,n){if(e.W===null)throw new H(8);if(!e.seekable||!e.m.ba)throw new H(70);if(n!=0&&n!=1&&n!=2)throw new H(28);e.position=e.m.ba(e,t,n),e.oc=[]}var st;function ct(e,t,n){e=he(`/dev/`+e);var r=Ae(!!t,!!n);lt||=64;var i=lt++<<8|0;Qe(i,{open(e){e.seekable=!1},close(){n?.buffer?.length&&n(10)},read(e,n,r,i){for(var a=0,o=0;o<i;o++){try{var s=t()}catch{throw new H(29)}if(s===void 0&&a===0)throw new H(6);if(s==null)break;a++,n[r+o]=s}return a&&(e.node.timestamp=Date.now()),a}
8,write(e,t,r,i){for(var a=0;a<i;a++)try{n(t[r+a])}catch{throw new H(29)}return i&&(e.node.timestamp=Date.now()),a}}),nt(e,r,i)}var lt,ut={},dt,ft=void 0,pt=(e,t)=>Object.defineProperty(t,"name",{value:e}),mt=[],ht=[],U,gt=e=>{if(!e)throw new U(`Cannot use deleted val. handle = `+e);return ht[e]},_t=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=mt.pop()||ht.length;return ht[t]=e,ht[t+1]=1,t}},vt=e=>{var t=Error,n=pt(e,function(t){this.name=e,this.message=t,t=Error(t).stack,t!==void 0&&(this.stack=this.toString()+` 9`+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},yt,bt,W=e=>{for(var t=``;w[e];)t+=bt[w[e++]];return t},xt=[],St=()=>{for(;xt.length;){var e=xt.pop();e.g.ha=!1,e.delete()}},Ct,wt={},Tt=(e,t)=>{if(t===void 0)throw new U(`ptr should not be undefined`);for(;e.B;)t=e.oa(t),e=e.B;return t},Et={},Dt=e=>{e=xr(e);var t=W(e);return yr(e),t},Ot=(e,t)=>{var n=Et[e];if(n===void 0)throw e=`${t} has unknown type ${Dt(e)}`,new U(e);return n},kt=()=>{},At=!1,jt=(e,t,n)=>t===n?e:n.B===void 0?null:(e=jt(e,t,n.B),e===null?null:n.Kb(e)),Mt={},Nt=(e,t)=>(t=Tt(e,t),wt[t]),Pt,Ft=(e,t)=>
9{if(!t.u||!t.o)throw new Pt(`makeClassHandle requires ptr and ptrType`);if(!!t.J!=!!t.D)throw new Pt(`Both smartPtrType and smartPtr must be specified`);return t.count={value:1},It(Object.create(e,{g:{value:t,writable:!0}}))},It=e=>typeof FinalizationRegistry>`u`?(It=e=>e,e):(At=new FinalizationRegistry(e=>{e=e.g,--e.count.value,e.count.value===0&&(e.D?e.J.O(e.D):e.u.i.O(e.o))}),It=e=>{var t=e.g;return t.D&&At.register(e,{g:t},e),e},kt=e=>{At.unregister(e)},It(e)),Lt={},Rt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function zt(e){return this.fromWireType(D[e>>2])}var Bt={},Vt={},Ht=(e,t,n)=>{function r(t){if(t=n(t),t.length!==e.length)throw new Pt(`Mismatched type converter count`);for(var r=0;r<e.length;++r)Wt(e[r],t[r])}e.forEach(function(e){Vt[e]=t});var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{Et.hasOwnProperty(e)?i[t]=Et[e]:(a.push(e),Bt.hasOwnProperty(e)||(Bt[e]=[]),Bt[e].push(()=>{i[t]=Et[e],++o,o===a.length&&r(i)}))}),a.length===0&&r(i)};function Ut(e,t,n={}){var r=t.name;if(!e)throw new U(`type "${r}" must have a positive integer typeid pointer`);if(Et.hasOwnProperty(e)){if(n.Ub)return;throw new U(`Cannot register type '${r}' twice`)}Et[e]=t,delete Vt[e],Bt.hasOwnProperty(e)&&(t=Bt[e],delete Bt[e],t.forEach(e=>e()))}function Wt(e,t,n={}){if(!(`argPackAdvance`in t))throw TypeError(`registerType registeredInstance requires argPackAdvance`);return Ut(e,t,n)}var Gt=e=>{throw new U(e.g.u.i.name+` instance already deleted`)};function Kt(){}var qt=(e,t,n)=>{if(e[t].A===void 0){var r=e[t];e[t]=function(...r){if(!e[t].A.hasOwnProperty(r.length))throw new U(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].A})!`);return e[t].A[r.length].apply(this,r)},e[t].A=[],e[t].A[r.ga]=r}},Jt=(e,t,n)=>{if(r.hasOwnProperty(e)){if(n===void 0||r[e].A!==void 0&&r[e].A[n]!==void 0)throw new U(`Cannot register public name '${e}' twice`);if(qt(r,e,e),r.hasOwnProperty(n))throw new U(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`);r[e].A[n]=t}else r[e]=t,n!==void 0&&(r[e].Pc=n)},Yt=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 Xt(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.M=n,this.O=r,this.B=i,this.Pb=a,this.oa=o,this.Kb=s,this.pb=[]}var Zt=(e,t,n)=>{for(;t!==n;){if(!t.oa)throw new U(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.oa(e),t=t.B}return e};function Qt(e,t){if(t===null){if(this.Sa)throw new U(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new U(`Cannot pass "${yn(t)}" as a ${this.name}`);if(!t.g.o)throw new U(`Cannot pass deleted object as a pointer of type ${this.name}`);return Zt(t.g.o,t.g.u.i,this.i)}function $t(e,t){if(t===null){if(this.Sa)throw new U(`null is not a valid ${this.name}`);if(this.xa){var n=this.Ua();return e!==null&&e.push(this.O,n),n}return 0}if(!t||!t.g)throw new U(`Cannot pass "${yn(t)}" as a ${this.name}`);if(!t.g.o)throw new U(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.wa&&t.g.u.wa)throw new U(`Cannot convert argument of type ${t.g.J?t.g.J.name:t.g.u.name} to parameter type ${this.name}`);if(n=Zt(t.g.o,t.g.u.i,this.i),this.xa){if(t.g.D===void 0)throw new U(`Passing raw pointer to smart pointer is illegal`);switch(this.ic){case 0:if(t.g.J===this)n=t.g.D;else throw new U(`Cannot convert argument of type ${t.g.J?t.g.J.name:t.g.u.name} to parameter type ${this.name}`);break;case 1:n=t.g.D;break;case 2:if(t.g.J===this)n=t.g.D;else{var r=t.clone();n=this.dc(n,_t(()=>r.delete())),e!==null&&e.push(this.O,n)}break;default:throw new U(`Unsupporting sharing policy`)}}return n}function en(e,t){if(t===null){if(this.Sa)throw new U(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new U(`Cannot pass "${yn(t)}" as a ${this.name}`);if(!t.g.o)throw new U(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.g.u.wa)throw new U(`Cannot convert argument of type ${t.g.u.name} to parameter type ${this.name}`);return Zt(t.g.o,t.g.u.i,this.i)}function tn(e,t,n,r,i,a,o,s,c,l,u){this.name=e,this.i=t,this.Sa=n,this.wa=r,this.xa=i,this.cc=a,this.ic=o,this.rb=s,this.Ua=c,this.dc=l,this.O=u,i||t.B!==void 0?this.toWireType=$t:(this.toWireType=r?Qt:en,this.L=null)}var nn=(e,t,n)=>{if(!r.hasOwnProperty(e))throw new Pt(`Replacing nonexistent public symbol`);r[e].A!==void 0&&n!==void 0?r[e].A[n]=t:(r[e]=t,r[e].ga=n)},rn=[],an,on=e=>{var t=rn[e];return t||(e>=rn.length&&(rn.length=e+1),rn[e]=t=an.get(e)),t},sn=(e,t,n=[])=>(e.includes(`j`)?(e=e.replace(/p/g,`i`),t=(0,r[`dynCall_`+e])(t,...n)):t=on(t)(...n),t),cn=(e,t)=>(...n)=>sn(e,t,n),G=(e,t)=>{e=W(e);var n=e.includes(`j`)?cn(e,t):on(t);if(typeof n!=`function`)throw new U(`unknown function pointer with signature ${e}: ${t}`);return n},ln,un=(e,t)=>{function n(e){i[e]||Et[e]||(Vt[e]?Vt[e].forEach(n):(r.push(e),i[e]=!0))}var r=[],i={};throw t.forEach(n),new ln(`${e}: `+r.map(Dt).join([`, `]))};function dn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].L===void 0)return!0;return!1}function fn(e,t,n,r,i){var a=t.length;if(2>a)throw new U(`argTypes array size mismatch! Must at least get return value and 'this' types!`);var o=t[1]!==null&&n!==null,s=dn(t),c=t[0].name!==`void`,l=a-2,u=Array(l),d=[],f=[];return pt(e,function(...n){if(n.length!==l)throw new U(`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)Rt(f);else for(p=o?1:2;p<t.length;p++){var m=p===1?a:u[p-2];t[p].L!==null&&t[p].L(m)}return a=c?t[0].fromWireType(n):void 0,a})}var pn=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(D[t+4*r>>2]);return n},mn=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.substr(0,t)},hn=(e,t,n)=>{if(!(e instanceof Object))throw new U(`${n}
9 with invalid "this": ${e}`);if(!(e instanceof t.i.constructor))throw new U(`${n} incompatible with "this" of type ${e.constructor.name}`);if(!e.g.o)throw new U(`cannot call emscripten binding method ${n} on deleted object`);return Zt(e.g.o,e.g.u.i,t.i)},gn=e=>{9<e&&--ht[e+1]===0&&(ht[e]=void 0,mt.push(e))},_n={name:`emscripten::val`,fromWireType:e=>{var t=gt(e);return gn(e),t},toWireType:(e,t)=>_t(t),argPackAdvance:8,readValueFromPointer:zt,L:null},vn=(e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(C[e])}:function(e){return this.fromWireType(w[e])};case 2:return n?function(e){return this.fromWireType(T[e>>1])}:function(e){return this.fromWireType(ee[e>>1])};case 4:return n?function(e){return this.fromWireType(E[e>>2])}:function(e){return this.fromWireType(D[e>>2])};default:throw TypeError(`invalid integer width (${t}): ${e}`)}},yn=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e},bn=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(O[e>>2])};case 8:return function(e){return this.fromWireType(te[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},xn=(e,t,n)=>{switch(t){case 1:return n?e=>C[e]:e=>w[e];case 2:return n?e=>T[e>>1]:e=>ee[e>>1];case 4:return n?e=>E[e>>2]:e=>D[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Sn=typeof TextDecoder<`u`?new TextDecoder(`utf-16le`):void 0,Cn=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&ee[n];)++n;if(n<<=1,32<n-e&&Sn)return Sn.decode(w.subarray(e,n));for(n=``,r=0;!(r>=t/2);++r){var i=T[e+2*r>>1];if(i==0)break;n+=String.fromCharCode(i)}return n},wn=(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)T[t>>1]=e.charCodeAt(i),t+=2;return T[t>>1]=0,t-r},Tn=e=>2*e.length,En=(e,t)=>{for(var n=0,r=``;!(n>=t/4);){var i=E[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},Dn=(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(E[t>>2]=a,t+=4,t+4>n)break}return E[t>>2]=0,t-r},On=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},kn=(e,t,n)=>{var r=[];return e=e.toWireType(r,n),r.length&&(D[t>>2]=_t(r)),e},K=[],An={},jn=e=>{var t=An[e];return t===void 0?W(e):t},Mn=e=>{var t=K.length;return K.push(e),t},Nn=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=Ot(D[t+4*r>>2],`parameter `+r);return n},Pn=Reflect.construct,Fn=e=>e%4==0&&(e%100!=0||e%400==0),In=[0,31,60,91,121,152,182,213,244,274,305,335],Ln=[0,31,59,90,120,151,181,212,243,273,304,334],Rn=[],zn=e=>{e.Ec=e.getExtension(`WEBGL_draw_instanced_base_vertex_base_instance`)},Bn=e=>{e.Mc=e.getExtension(`WEBGL_multi_draw_instanced_base_vertex_base_instance`)},Vn=e=>{var t=`EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw`.split(` `);return(e.getSupportedExtensions()||[]).filter(e=>t.includes(e))},Hn=1,Un=[],Wn=[],Gn=[],Kn=[],qn=[],Jn=[],Yn=[],q=[],Xn={},Zn=4,Qn=0,$n=e=>{for(var t=Hn++,n=e.length;n<t;n++)e[n]=null;return t},er=(e,t,n,r)=>{for(var i=0;i<e;i++){var a=Z[n](),o=a&&$n(r);a?(a.name=o,r[o]=a):J||=1282,E[t+4*i>>2]=o}},tr=(e,t)=>{var n=$n(q),r={handle:n,attributes:t,version:t.Lc,F:e};return e.canvas&&(e.canvas.Ab=r),q[n]=r,(t.Lb===void 0||t.Lb)&&rr(r),n},nr=e=>(ir=q[e],r.Cc=Z=ir?.F,!(e&&!Z)),rr=e=>{if(e||=ir,!e.Vb){e.Vb=!0;var t=e.F;zn(t),Bn(t),2<=e.version&&(t.eb=t.getExtension(`EXT_disjoint_timer_query_webgl2`)),(2>e.version||!t.eb)&&(t.eb=t.getExtension(`EXT_disjoint_timer_query`)),t.ac=t.getExtension(`WEBGL_multi_draw`),Vn(t).forEach(e
9=>{e.includes(`lose_context`)||e.includes(`debug`)||t.getExtension(e)})}},J,ir,ar={},or=()=>{if(!sr){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`,_:m||`./this.program`},t;for(t in ar)ar[t]===void 0?delete e[t]:e[t]=ar[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);sr=n}return sr},sr,cr=[];function lr(){var e=Vn(Z);return e=e.concat(e.map(e=>`GL_`+e))}var ur=(e,t)=>{if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return;case 34814:case 36345:n=0;break;case 34466:var r=Z.getParameter(34467);n=r?r.length:0;break;case 33309:if(2>ir.version){J||=1282;return}n=lr().length;break;case 33307:case 33308:if(2>ir.version){J||=1280;return}n=e==33307?3:0}if(n===void 0)switch(r=Z.getParameter(e),typeof r){case`number`:n=r;break;case`boolean`:n=+!!r;break;case`string`:J||=1280;return;case`object`:if(r===null)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:J||=1280;return}else{if(r instanceof Float32Array||r instanceof Uint32Array||r instanceof Int32Array||r instanceof Array){for(e=0;e<r.length;++e)E[t+4*e>>2]=r[e];return}try{n=r.name|0}catch(t){J||=1280,y(`GL_INVALID_ENUM in glGet0v: Unknown object returned from WebGL getParameter(${e})! (error: ${t})`);return}}break;default:J||=1280,y(`GL_INVALID_ENUM in glGet0v: Native code calling glGet0v(${e}) and it returns ${r} of type ${typeof r}!`);return}E[t>>2]=n}else J||=1281},dr=e=>{var t=xe(e)+1,n=br(t);return n&&Se(e,w,n,t),n},fr=e=>e.slice(-1)==`]`&&e.lastIndexOf(`[`),pr=e=>(e-=5120,e==0?C:e==1?w:e==2?T:e==4?E:e==6?O:e==5||e==28922||e==28520||e==30779||e==30782?D:ee),Y=[31,29,31,30,31,30,31,31,30,31,30,31],mr=[31,28,31,30,31,30,31,31,30,31,30,31],X=(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.ca;for(e=new Date(new Date(e.da+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(Fn(e.getFullYear())?Y:mr)[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=D[r+40>>2];for(var u in r={lc:E[r>>2],kc:E[r+4>>2],Ja:E[r+8>>2],Wa:E[r+12>>2],Ka:E[r+16>>2],da:E[r+20>>2],R:E[r+24>>2],ca:E[r+28>>2],Tc:E[r+32>>2],jc:E[r+36>>2],mc:l&&l?z(w,l):``},n=n?z(w,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.R].substring(0,3),"%A":e=>d[e.R],"%b":e=>f[e.Ka].substring(0,3),"%B":e=>f[e.Ka],"%C":e=>a((e.da+1900)/100|0,2),"%d":e=>a(e.Wa,2),"%e":e=>i(e.Wa,2,` `),"%g":e=>c(e).toString().substring(2),"%G":c,"%H":e=>a(e.Ja,2),"%I":e=>(e=e.Ja,e==0?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.Ka-1;t+=(Fn(e.da+1900)?Y:mr)[n++]);return a(e.Wa+t,3)},"%m":e=>a(e.Ka+1,2),"%M":e=>a(e.kc,2),"%n":()=>` 10`,"%p":e=>0<=e.Ja&&12>e.Ja?`AM`:`PM`,"%S":e=>a(e.lc,2),"%t":()=>` `,"%u":e=>e.R||7,"%U":e=>a(Math.floor((e.ca+7-e.R)/7),2),"%V":e=>{var t=Math.floor((e.ca+7-(e.R+6)%7)/7);if(2>=(e.R+371-e.ca-2)%7&&t++,t)t==53&&(n=(e.R+371-e.ca)%7,n==4||n==3&&Fn(e.da)||(t=1));else{t=52;var n=(e.R+7-e.ca-1)%7;(n==4||n==5&&Fn(e.da%400-1))&&t++}return a(t,2)},"%w":e=>e.R,"%W":e=>a(Math.floor((e.ca+7-(e.R+6)%7)/7),2),"%y":e=>(e.da+1900).toString().substring(2),"%Y":e=>e.da+1900,"%z":e=>{e=e.jc;var t=0<=e;return e=Math.abs(e)/60,(t?`+`:`-`)+String(`0000`+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.mc,"%%":()=>`%`},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=Ce(n,!1),u.length>t?0:(C.set(u,e),u.length-1)};
10[44].forEach(e=>{Le[e]=new H(e),Le[e].stack=`<generic error, no stack>`}),Fe=Array(4096),$e(V,`/`),tt(`/tmp`),tt(`/home`),tt(`/home/web_user`),(function(){tt(`/dev`),Qe(259,{read:()=>0,write:(e,t,n,r)=>r}),nt(`/dev/null`,259),Te(1280,De),Te(1536,Oe),nt(`/dev/tty`,1280),nt(`/dev/tty1`,1536);var e=new Uint8Array(1024),t=0,n=()=>(t===0&&(t=ye(e).byteLength),e[--t]);ct(`random`,n),ct(`urandom`,n),tt(`/dev/shm`),tt(`/dev/shm/tmp`)})(),(function(){tt(`/proc`);var e=tt(`/proc/self`);tt(`/proc/self/fd`),$e({U(){var t=We(e,`fd`,16895,73);return t.j={la(e,t){var n=Je(+t);return e={parent:null,U:{lb:`fake`},j:{ma:()=>n.path}},e.parent=e}},t}},`/proc/self/fd`)})(),U=r.BindingError=class extends Error{constructor(e){super(e),this.name=`BindingError`}},ht.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=()=>ht.length/2-5-mt.length,yt=r.PureVirtualError=vt(`PureVirtualError`);for(var hr=Array(256),gr=0;256>gr;++gr)hr[gr]=String.fromCharCode(gr);bt=hr,r.getInheritedInstanceCount=()=>Object.keys(wt).length,r.getLiveInheritedInstances=()=>{var e=[],t;for(t in wt)wt.hasOwnProperty(t)&&e.push(wt[t]);return e},r.flushPendingDeletes=St,r.setDelayFunction=e=>{Ct=e,xt.length&&Ct&&Ct(St)},Pt=r.InternalError=class extends Error{constructor(e){super(e),this.name=`InternalError`}},Object.assign(Kt.prototype,{isAliasOf:function(e){if(!(this instanceof Kt&&e instanceof Kt))return!1;var t=this.g.u.i,n=this.g.o;e.g=e.g;var r=e.g.u.i;for(e=e.g.o;t.B;)n=t.oa(n),t=t.B;for(;r.B;)e=r.oa(e),r=r.B;return t===r&&n===e},clone:function(){if(this.g.o||Gt(this),this.g.ja)return this.g.count.value+=1,this;var e=It,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.g;return e=e(n.call(t,r,{g:{value:{count:i.count,ha:i.ha,ja:i.ja,o:i.o,u:i.u,D:i.D,J:i.J}}})),e.g.count.value+=1,e.g.ha=!1,e},delete(){if(this.g.o||Gt(this),this.g.ha&&!this.g.ja)throw new U(`Object already scheduled for deletion`);kt(this);var e=this.g;--e.count.value,e.count.value===0&&(e.D?e.J.O(e.D):e.u.i.O(e.o)),this.g.ja||(this.g.D=void 0,this.g.o=void 0)},isDeleted:function(){return!this.g.o},deleteLater:function(){if(this.g.o||Gt(this),this.g.ha&&!this.g.ja)throw new U(`Object already scheduled for deletion`);return xt.push(this),xt.length===1&&Ct&&Ct(St),this.g.ha=!0,this}}),Object.assign(tn.prototype,{Qb(e){return this.rb&&(e=this.rb(e)),e},cb(e){this.O?.(e)},argPackAdvance:8,readValueFromPointer:zt,fromWireType:function(e){function t(){return this.xa?Ft(this.i.M,{u:this.cc,o:n,J:this,D:e}):Ft(this.i.M,{u:this,o:e})}var n=this.Qb(e);if(!n)return this.cb(e),null;var r=Nt(this.i,n);if(r!==void 0)return r.g.count.value===0?(r.g.o=n,r.g.D=e,r.clone()):(r=r.clone(),this.cb(e),r);if(r=this.i.Pb(n),r=Mt[r],!r)return t.call(this);r=this.wa?r.Ib:r.pointerType;var i=jt(n,this.i,r.i);return i===null?t.call(this):this.xa?Ft(r.i.M,{u:r,o:i,J:this,D:e}):Ft(r.i.M,{u:r,o:i})}}),ln=r.UnboundTypeError=vt(`UnboundTypeError`);for(var Z,_r=0;32>_r;++_r)cr.push(Array(_r));var vr={__syscall_fcntl64:function(e,t,n){ft=n;try{var r=Je(e);switch(t){case 0:var i=L();if(0>i)break;for(;Ne[i];)i++;return Xe(r,i).W;case 1:case 2:return 0;case 3:return r.flags;case 4:return i=L(),r.flags|=i,0;case 12:return i=L(),T[i+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return-e.aa}},__syscall_ioctl:function(e,t,n){ft=n;try{var r=Je(e);switch(t){case 21509:return r.s?0:-59;case 21505:if(!r.s)return-59;if(r.s.V.Xb){e=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var i=L();E[i>>2]=25856,E[i+4>>2]=5,E[i+8>>2]=191,E[i+12>>2]=35387;for(var a=0;32>a;a++)C[i+a+17]=e[a]||0}return 0;case 21510:case 21511:case 21512:return r.s?0:-59;case 21506:case 21507:case 21508:if(!r.s)return-59;if(r.s.V.Yb)for(i=L(),e=[],a=0;32>a;a++)e.push(C[i+a+17]);return 0;case 21519:return r.s?(i=L(),E[i>>2]=0):-59;case 21520:return r.s?-28:-59;case 21531:if(i=L(),!r.m.Wb)throw new H(59);return r.m.Wb(r,t,i);case 21523:return r.s?(r.s.V.Zb&&(a=[24,80],i=L(),T[i>>1]=a[0],T[i+2>>1]=a[1]),0):-59;case 21524:return r.s?0:-59;case 21515:return r.s?0:-59;default:return-28}}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return-e.aa}}
10,__syscall_openat:function(e,t,n,r){ft=r;try{t=t?z(w,t):``;var i=t;if(i.charAt(0)===`/`)t=i;else{var a=e===-100?`/`:Je(e).path;if(i.length==0)throw new H(44);t=he(a+`/`+i)}var o=r?L():0;return at(t,n,o).W}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return-e.aa}},_abort_js:()=>{j(``)},_embind_create_inheriting_constructor:(e,t,n)=>{e=W(e),t=Ot(t,`wrapper`),n=gt(n);var r=t.i,i=r.M,a=r.B.M,o=r.B.constructor;return e=pt(e,function(...e){r.B.pb.forEach(function(e){if(this[e]===a[e])throw new yt(`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 U(`Pass correct 'this' to __construct`);e=o.implement(this,...e),kt(e);var t=e.g;if(e.notifyOnDestruction(),t.ja=!0,Object.defineProperties(this,{g:{value:t}}),It(this),e=t.o,e=Tt(r,e),wt.hasOwnProperty(e))throw new U(`Tried to register registered instance: ${e}`);wt[e]=this},i.__destruct=function(){if(this===i)throw new U(`Pass correct 'this' to __destruct`);kt(this);var e=this.g.o;if(e=Tt(r,e),wt.hasOwnProperty(e))delete wt[e];else throw new U(`Tried to unregister unregistered instance: ${e}`)},e.prototype=Object.create(i),Object.assign(e.prototype,n),_t(e)},_embind_finalize_value_object:e=>{var t=Lt[e];delete Lt[e];var n=t.Ua,r=t.O,i=t.fb,a=i.map(e=>e.Tb).concat(i.map(e=>e.fc));Ht([e],a,e=>{var a={};return i.forEach((t,n)=>{var r=e[n],o=t.Rb,s=t.Sb,c=e[n+i.length],l=t.ec,u=t.hc;a[t.Nb]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];l(u,e,c.toWireType(n,t)),Rt(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:zt,L:r}]})},_embind_register_bigint:()=>{},_embind_register_bool:(e,t,n,r)=>{t=W(t),Wt(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(w[e])},L:null})},_embind_register_class:(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=W(u),a=G(i,a),s&&=G(o,s),l&&=G(c,l),f=G(d,f);var p=Yt(u);Jt(p,function(){un(`Cannot construct ${u} due to unbound types`,[r])}),Ht([e,t,n],r?[r]:[],t=>{if(t=t[0],r)var n=t.i,i=n.M;else i=Kt.prototype;t=pt(u,function(...e){if(Object.getPrototypeOf(this)!==o)throw new U(`Use 'new' to construct `+u);if(c.$===void 0)throw new U(u+` has no accessible constructor`);var t=c.$[e.length];if(t===void 0)throw new U(`Tried to invoke ctor of ${u} with invalid number of parameters (${e.length}) - expected (${Object.keys(c.$).toString()}) parameters instead!`);return t.apply(this,e)});var o=Object.create(i,{constructor:{value:t}});t.prototype=o;var c=new Xt(u,t,o,f,n,a,s,l);if(c.B){var d;(d=c.B).pa??(d.pa=[]),c.B.pa.push(c)}
10return n=new tn(u,c,!0,!1,!1),d=new tn(u+`*`,c,!1,!1,!1),i=new tn(u+` const*`,c,!1,!0,!1),Mt[e]={pointerType:d,Ib:i},nn(p,t),[n,d,i]})},_embind_register_class_class_function:(e,t,n,r,i,a,o)=>{var s=pn(n,r);t=W(t),t=mn(t),a=G(i,a),Ht([],[e],e=>{function r(){un(`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.i.constructor;return c[t]===void 0?(r.ga=n-1,c[t]=r):(qt(c,t,i),c[t].A[n-1]=r),Ht([],s,r=>{if(r=fn(i,[r[0],null].concat(r.slice(1)),null,a,o),c[t].A===void 0?(r.ga=n-1,c[t]=r):c[t].A[n-1]=r,e.i.pa)for(let n of e.i.pa)n.constructor.hasOwnProperty(t)||(n.constructor[t]=r);return[]}),[]})},_embind_register_class_class_property:(e,t,n,r,i,a,o,s)=>{t=W(t),a=G(i,a),Ht([],[e],e=>{e=e[0];var i=`${e.name}.${t}`,c={get(){un(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return c.set=s?()=>{un(`Cannot access ${i} due to unbound types`,[n])}:()=>{throw new U(`${i} is a read-only property`)},Object.defineProperty(e.i.constructor,t,c),Ht([],[n],n=>{n=n[0];var i={get(){return n.fromWireType(a(r))},enumerable:!0};return s&&(s=G(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),Rt(t)}),Object.defineProperty(e.i.constructor,t,i),[]}),[]})},_embind_register_class_constructor:(e,t,n,r,i,a)=>{var o=pn(t,n);i=G(r,i),Ht([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(e.i.$===void 0&&(e.i.$=[]),e.i.$[t-1]!==void 0)throw new U(`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.i.$[t-1]=()=>{un(`Cannot construct ${e.name} due to unbound types`,o)},Ht([],o,r=>(r.splice(1,0,null),e.i.$[t-1]=fn(n,r,null,i,a),[])),[]})},_embind_register_class_function:(e,t,n,r,i,a,o,s)=>{var c=pn(n,r);t=W(t),t=mn(t),a=G(i,a),Ht([],[e],e=>{function r(){un(`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.i.pb.push(t);var l=e.i.M,u=l[t];return u===void 0||u.A===void 0&&u.className!==e.name&&u.ga===n-2?(r.ga=n-2,r.className=e.name,l[t]=r):(qt(l,t,i),l[t].A[n-2]=r),Ht([],c,r=>(r=fn(i,r,e,a,o),l[t].A===void 0?(r.ga=n-2,l[t]=r):l[t].A[n-2]=r,[])),[]})},_embind_register_class_property:(e,t,n,r,i,a,o,s,c,l)=>{t=W(t),i=G(r,i),Ht([],[e],e=>{e=e[0];var r=`${e.name}.${t}`,u={get(){un(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return u.set=c?()=>un(`Cannot access ${r} due to unbound types`,[n,o]):()=>{throw new U(r+` is a read-only property`)},Object.defineProperty(e.i.M,t,u),Ht([],c?[n,o]:[n],n=>{var o=n[0],u={get(){var t=hn(this,e,r+` getter`);return o.fromWireType(i(a,t))},enumerable:!0};if(c){c=G(s,c);var d=n[1];u.set=function(t){var n=hn(this,e,r+` setter`),i=[];c(l,n,d.toWireType(i,t)),Rt(i)}}return Object.defineProperty(e.i.M,t,u),[]}),[]})},_embind_register_emval:e=>Wt(e,_n),_embind_register_enum:(e,t,n,r)=>{function i(){}t=W(t),i.values={},Wt(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,argPackAdvance:8,readValueFromPointer:vn(t,n,r),L:null}),Jt(t,i)},_embind_register_enum_value:(e,t,n)=>{var r=Ot(e,`enum`);t=W(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:pt(`${r.name}_${t}`,function(){})}}),e.values[n]=r,e[t]=r},_embind_register_float:(e,t,n)=>{t=W(t),Wt(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:bn(t,n),L:null})},_embind_register_function:(e,t,n,r,i,a)=>{var o=pn(t,n);e=W(e),e=mn(e),i=G(r,i),Jt(e,function(){un(`Cannot call ${e} due to unbound types`,o)},t-1),Ht([],o,n=>(nn(e,fn(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]))},_embind_register_integer:(e,t,n,r,i)=>{if(t=W(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};Wt(e,{name:t,fromWireType:i,toWireType:o,argPackAdvance:8,readValueFromPointer:xn(t,n,r!==0),L:null})},_embind_register_memory_view:(e,t,n)=>{function r(e){return new i(C.buffer,D[e+4>>2],D[e>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array
10][t];n=W(n),Wt(e,{name:n,fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Ub:!0})},_embind_register_std_string:(e,t)=>{t=W(t);var n=t===`std::string`;Wt(e,{name:t,fromWireType:function(e){var t=D[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||w[o]==0){if(i=i?z(w,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(w[r+a]);s=s.join(``)}return yr(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 U(`Cannot pass non-string to std::string`);var i=n&&r?xe(t):t.length,a=br(4+i+1),o=a+4;if(D[a>>2]=i,n&&r)Se(t,w,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);if(255<s)throw yr(o),new U(`String has UTF-16 code units that do not fit in 8 bits`);w[o+r]=s}else for(r=0;r<i;++r)w[o+r]=t[r];return e!==null&&e.push(yr,a),a},argPackAdvance:8,readValueFromPointer:zt,L(e){yr(e)}})},_embind_register_std_wstring:(e,t,n)=>{if(n=W(n),t===2)var r=Cn,i=wn,a=Tn,o=e=>ee[e>>1];else t===4&&(r=En,i=Dn,a=On,o=e=>D[e>>2]);Wt(e,{name:n,fromWireType:e=>{for(var n=D[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 yr(e),i},toWireType:(e,r)=>{if(typeof r!=`string`)throw new U(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=br(4+o+t);return D[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(yr,s),s},argPackAdvance:8,readValueFromPointer:zt,L(e){yr(e)}})},_embind_register_value_object:(e,t,n,r,i,a)=>{Lt[e]={name:W(t),Ua:G(n,r),O:G(i,a),fb:[]}},_embind_register_value_object_field:(e,t,n,r,i,a,o,s,c,l)=>{Lt[e].fb.push({Nb:W(t),Tb:n,Rb:G(r,i),Sb:a,fc:o,ec:G(s,c),hc:l})},_embind_register_void:(e,t)=>{t=W(t),Wt(e,{Jc:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:(e,t,n)=>w.copyWithin(e,t,t+n),_emscripten_throw_longjmp:()=>{throw 1/0},_emval_as:(e,t,n)=>(e=gt(e),t=Ot(t,`emval::as`),kn(t,n,e)),_emval_call:(e,t,n,r)=>(e=K[e],t=gt(t),e(null,t,n,r)),_emval_call_method:(e,t,n,r,i)=>(e=K[e],t=gt(t),n=jn(n),e(t,t[n],r,i)),_emval_decref:gn,_emval_get_method_caller:(e,t,n)=>{var r=Nn(e,t),i=r.shift();e--;var a=Array(e);return t=`methodCaller<(${r.map(e=>e.name).join(`, `)}) => ${i.name}>`,Mn(pt(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?Pn(o,a):o.apply(t,a),kn(i,s,t)}))},_emval_get_property:(e,t)=>(e=gt(e),t=gt(t),_t(e[t])),_emval_incref:e=>{9<e&&(ht[e+1]+=1)},_emval_new_array:()=>_t([]),_emval_new_cstring:e=>_t(jn(e)),_emval_new_object:()=>_t({}),_emval_run_destructors:e=>{Rt(gt(e)),gn(e)},_emval_set_property:(e,t,n)=>{e=gt(e),t=gt(t),n=gt(n),e[t]=n},_emval_take_value:(e,t)=>(e=Ot(e,`_emval_take_value`),e=e.readValueFromPointer(t),_t(e)),_gmtime_js:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),E[n>>2]=e.getUTCSeconds(),E[n+4>>2]=e.getUTCMinutes(),E[n+8>>2]=e.getUTCHours(),E[n+12>>2]=e.getUTCDate(),E[n+16>>2]=e.getUTCMonth(),E[n+20>>2]=e.getUTCFullYear()-1900,E[n+24>>2]=e.getUTCDay(),E[n+28>>2]=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0},_localtime_js:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),E[n>>2]=e.getSeconds(),E[n+4>>2]=e.getMinutes(),E[n+8>>2]=e.getHours(),E[n+12>>2]=e.getDate(),E[n+16>>2]=e.getMonth(),E[n+20>>2]=e.getFullYear()-1900,E[n+24>>2]=e.getDay(),E[n+28>>2]=(Fn(e.getFullYear())?In:Ln)[e.getMonth()]+e.getDate()-1|0,E[n+36>>2]=-(60*e.getTimezoneOffset()),t=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();E[n+32>>2]=(t!=r&&e.getTimezoneOffset()==Math.min(r,t))|0},_tzset_js:(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1);i=a.getTimezoneOffset();var s=o.getTimezoneOffset();D[e>>2]=60*Math.max(i,s),E[t>>2]=Number(i!=s),e=e=>e.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:`short`}).split(` `)[1],a=e(a),o=e(o),s<i?(Se(a,w,n,17),Se(o,w,r,17)):(Se(a,w,r,17),Se(o,w,n,17))},beginPixelLocalStorageWEBGL:function(e,t,n){(e=q[e].F.Ea)&&e.beginPixelLocalStorageWEBGL(r.HEAPU32.subarray(n,n+t))},decode_image:function(e,t,n){var i=r.images;i||(i=new Map,r.images=i);var a=new Image;i.set(e,a),t=r.HEAP8.subarray(t,t+n),n=new Uint8Array(n),n.set(t),a.src=URL.createObjectURL(new Blob([n],{type:`image/png`})),a.onload=function(){r._setWebImage(e,a.width,a.height)}},delete_image:function(e){var t=r.images;t&&t.get(e)&&t.delete(e)}
10,emscripten_asm_const_int:(e,t,n)=>{Rn.length=0;for(var r;r=w[t++];){var i=r!=105;i&=r!=112,n+=i&&n%8?4:0,Rn.push(r==112?D[n>>2]:r==105?E[n>>2]:te[n>>3]),n+=i?8:4}return F[e](...Rn)},emscripten_date_now:()=>Date.now(),emscripten_get_now:()=>performance.now(),emscripten_resize_heap:e=>{var t=w.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)-x.buffer.byteLength+65535)/65536;try{x.grow(i),ne();var a=1;break a}catch{}a=void 0}if(a)return!0}return!1},emscripten_webgl_enable_extension:(e,t)=>(e=q[e],t=t?z(w,t):``,t.startsWith(`GL_`)&&(t=t.substr(3)),t==`WEBGL_draw_instanced_base_vertex_base_instance`&&zn(Z),t==`WEBGL_multi_draw_instanced_base_vertex_base_instance`&&Bn(Z),t==`WEBGL_multi_draw`&&(Z.ac=Z.getExtension(`WEBGL_multi_draw`)),!!e.F.getExtension(t)),emscripten_webgl_get_current_context:()=>ir?ir.handle:0,emscripten_webgl_make_context_current:e=>nr(e)?0:-5,enable_WEBGL_provoking_vertex:function(e){return e=q[e].F,e.qb=e.getExtension(`WEBGL_provoking_vertex`),!!e.qb},enable_WEBGL_shader_pixel_local_storage_coherent:function(e){e=q[e].F;let t=e.getExtension(`WEBGL_shader_pixel_local_storage`);if(t&&t.isCoherent()){if(t.framebufferTexturePixelLocalStorageWEBGL.length==5)return e.Ea=t,!0;console.warn(`WEBGL_shader_pixel_local_storage is advertised, but a deprecated version has been detected. Disabling.`)}return!1},endPixelLocalStorageWEBGL:function(e,t,n){(e=q[e].F.Ea)&&e.endPixelLocalStorageWEBGL(r.HEAPU32.subarray(n,n+t))},environ_get:(e,t)=>{var n=0;return or().forEach((r,i)=>{var a=t+n;for(i=D[e+4*i>>2]=a,a=0;a<r.length;++a)C[i++]=r.charCodeAt(a);C[i]=0,n+=r.length+1}),0},environ_sizes_get:(e,t)=>{var n=or();D[e>>2]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),D[t>>2]=r,0},fd_close:function(e){try{var t=Je(e);if(t.W===null)throw new H(8);t.Ra&&=null;try{t.m.close&&t.m.close(t)}catch(e){throw e}finally{Ne[t.W]=null}return t.W=null,0}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return e.aa}},fd_read:function(e,t,n,r){try{a:{var i=Je(e);e=t;for(var a,o=t=0;o<n;o++){var s=D[e>>2],c=D[e+4>>2];e+=8;var l=i,u=a,d=C;if(0>c||0>u)throw new H(28);if(l.W===null||(l.flags&2097155)==1)throw new H(8);if((l.node.mode&61440)==16384)throw new H(31);if(!l.m.read)throw new H(28);var f=u!==void 0;if(!f)u=l.position;else if(!l.seekable)throw new H(70);var p=l.m.read(l,d,s,c,u);f||(l.position+=p);var m=p;if(0>m){var h=-1;break a}if(t+=m,m<c)break;a!==void 0&&(a+=m)}h=t}return D[r>>2]=h,0}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return e.aa}},fd_seek:function(e,t,n,r,i){t=n+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*n:NaN;try{if(isNaN(t))return 61;var a=Je(e);return ot(a,t,r),pe=[a.position>>>0,(fe=a.position,1<=+Math.abs(fe)?0<fe?Math.floor(fe/4294967296)>>>0:~~+Math.ceil((fe-+(~~fe>>>0))/4294967296)>>>0:0)],E[i>>2]=pe[0],E[i+4>>2]=pe[1],a.Ra&&t===0&&r===0&&(a.Ra=null),0}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return e.aa}},fd_write:function(e,t,n,r){try{a:{var i=Je(e);e=t;for(var a,o=t=0;o<n;o++){var s=D[e>>2],c=D[e+4>>2];e+=8;var l=i,u=s,d=c,f=a,p=C;if(0>d||0>f)throw new H(28);if(l.W===null||!(l.flags&2097155))throw new H(8);if((l.node.mode&61440)==16384)throw new H(31);if(!l.m.write)throw new H(28);l.seekable&&l.flags&1024&&ot(l,0,2);var m=f!==void 0;if(!m)f=l.position;else if(!l.seekable)throw new H(70);var h=l.m.write(l,p,u,d,f,void 0);m||(l.position+=h);var g=h;if(0>g){var _=-1;break a}t+=g,a!==void 0&&(a+=g)}_=t}return D[r>>2]=_,0}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return e.aa}},framebufferPixelLocalClearValuefvWEBGL:function(e,t,n,r,i,a){(e=q[e].F.Ea)&&e.framebufferPixelLocalClearValuefvWEBGL(t,[n,r,i,a])},framebufferTexturePixelLocalStorageWEBGL:function(e,t,n,r,i,a){(e=q[e].F.Ea)&&e.framebufferTexturePixelLocalStorageWEBGL(t,qn[n],r,i,a)},glActiveTexture:e=>Z.activeTexture(e),glAttachShader:(e,t)=>{Z.attachShader(Wn[e],Jn[t])},glBindBuffer:(e,t)=>{e==35051?Z.Pa=t:e==35052&&(Z.sa=t),Z.bindBuffer(e,Un[t])},glBindBufferRange:(e,t,n,r,i)=>{Z.bindBufferRange(e,t,Un[n],r,i)},glBindFramebuffer:(e,t)=>
10{Z.bindFramebuffer(e,Gn[t])},glBindRenderbuffer:(e,t)=>{Z.bindRenderbuffer(e,Kn[t])},glBindTexture:(e,t)=>{Z.bindTexture(e,qn[t])},glBindVertexArray:e=>{Z.bindVertexArray(Yn[e])},glBlendEquation:e=>Z.blendEquation(e),glBlendFunc:(e,t)=>Z.blendFunc(e,t),glBlitFramebuffer:(e,t,n,r,i,a,o,s,c,l)=>Z.blitFramebuffer(e,t,n,r,i,a,o,s,c,l),glBufferData:(e,t,n,r)=>{n&&t?Z.bufferData(e,w,r,n,t):Z.bufferData(e,t,r)},glBufferSubData:(e,t,n,r)=>{n&&Z.bufferSubData(e,t,w,r,n)},glClear:e=>Z.clear(e),glClearBufferfv:(e,t,n)=>{Z.clearBufferfv(e,t,O,n>>2)},glClearBufferuiv:(e,t,n)=>{Z.clearBufferuiv(e,t,D,n>>2)},glClearColor:(e,t,n,r)=>Z.clearColor(e,t,n,r),glClearDepthf:e=>Z.clearDepth(e),glClearStencil:e=>Z.clearStencil(e),glColorMask:(e,t,n,r)=>{Z.colorMask(!!e,!!t,!!n,!!r)},glCompileShader:e=>{Z.compileShader(Jn[e])},glCompressedTexSubImage2D:(e,t,n,r,i,a,o,s,c)=>{Z.sa||!s?Z.compressedTexSubImage2D(e,t,n,r,i,a,o,s,c):Z.compressedTexSubImage2D(e,t,n,r,i,a,o,w,c,s)},glCreateProgram:()=>{var e=$n(Wn),t=Z.createProgram();return t.name=e,t.Aa=t.ya=t.za=0,t.Xa=1,Wn[e]=t,e},glCreateShader:e=>{var t=$n(Jn);return Jn[t]=Z.createShader(e),t},glCullFace:e=>Z.cullFace(e),glDeleteBuffers:(e,t)=>{for(var n=0;n<e;n++){var r=E[t+4*n>>2],i=Un[r];i&&(Z.deleteBuffer(i),i.name=0,Un[r]=null,r==Z.Pa&&(Z.Pa=0),r==Z.sa&&(Z.sa=0))}},glDeleteFramebuffers:(e,t)=>{for(var n=0;n<e;++n){var r=E[t+4*n>>2],i=Gn[r];i&&(Z.deleteFramebuffer(i),i.name=0,Gn[r]=null)}},glDeleteProgram:e=>{if(e){var t=Wn[e];t?(Z.deleteProgram(t),t.name=0,Wn[e]=null):J||=1281}},glDeleteRenderbuffers:(e,t)=>{for(var n=0;n<e;n++){var r=E[t+4*n>>2],i=Kn[r];i&&(Z.deleteRenderbuffer(i),i.name=0,Kn[r]=null)}},glDeleteShader:e=>{if(e){var t=Jn[e];t?(Z.deleteShader(t),Jn[e]=null):J||=1281}},glDeleteTextures:(e,t)=>{for(var n=0;n<e;n++){var r=E[t+4*n>>2],i=qn[r];i&&(Z.deleteTexture(i),i.name=0,qn[r]=null)}},glDeleteVertexArrays:(e,t)=>{for(var n=0;n<e;n++){var r=E[t+4*n>>2];Z.deleteVertexArray(Yn[r]),Yn[r]=null}},glDepthFunc:e=>Z.depthFunc(e),glDepthMask:e=>{Z.depthMask(!!e)},glDepthRangef:(e,t)=>Z.depthRange(e,t),glDisable:e=>Z.disable(e),glDrawArrays:(e,t,n)=>{Z.drawArrays(e,t,n)},glDrawArraysInstanced:(e,t,n,r)=>{Z.drawArraysInstanced(e,t,n,r)},glDrawBuffers:(e,t)=>{for(var n=cr[e],r=0;r<e;r++)n[r]=E[t+4*r>>2];Z.drawBuffers(n)},glDrawElements:(e,t,n,r)=>{Z.drawElements(e,t,n,r)},glDrawElementsInstanced:(e,t,n,r,i)=>{Z.drawElementsInstanced(e,t,n,r,i)},glEnable:e=>Z.enable(e),glEnableVertexAttribArray:e=>{Z.enableVertexAttribArray(e)},glFlush:()=>Z.flush(),glFramebufferRenderbuffer:(e,t,n,r)=>{Z.framebufferRenderbuffer(e,t,n,Kn[r])},glFramebufferTexture2D:(e,t,n,r,i)=>{Z.framebufferTexture2D(e,t,n,qn[r],i)},glFrontFace:e=>Z.frontFace(e),glGenBuffers:(e,t)=>{er(e,t,`createBuffer`,Un)},glGenFramebuffers:(e,t)=>{er(e,t,`createFramebuffer`,Gn)},glGenRenderbuffers:(e,t)=>{er(e,t,`createRenderbuffer`,Kn)},glGenTextures:(e,t)=>{er(e,t,`createTexture`,qn)},glGenVertexArrays:(e,t)=>{er(e,t,`createVertexArray`,Yn)},glGenerateMipmap:e=>Z.generateMipmap(e),glGetIntegerv:(e,t)=>ur(e,t),glGetProgramiv:(e,t,n)=>{if(n)if(e>=Hn)J||=1281;else if(e=Wn[e],t==35716)e=Z.getProgramInfoLog(e),e===null&&(e=`(unknown error)`),E[n>>2]=e.length+1;else if(t==35719){if(!e.Aa)for(t=0;t<Z.getProgramParameter(e,35718);++t)e.Aa=Math.max(e.Aa,Z.getActiveUniform(e,t).name.length+1);E[n>>2]=e.Aa}else if(t==35722){if(!e.ya)for(t=0;t<Z.getProgramParameter(e,35721);++t)e.ya=Math.max(e.ya,Z.getActiveAttrib(e,t).name.length+1);E[n>>2]=e.ya}else if(t==35381){if(!e.za)for(t=0;t<Z.getProgramParameter(e,35382);++t)e.za=Math.max(e.za,Z.getActiveUniformBlockName(e,t).length+1);E[n>>2]=e.za}else E[n>>2]=Z.getProgramParameter(e,t);else J||=1281},glGetString:e=>{var t=Xn[e];if(!t){switch(e){case 7939:t=dr(lr().join(` `));break;case 7936:case 7937:case 37445:case 37446:(t=Z.getParameter(e))||(J||=1280),t=t?dr(t):0;break;case 7938:t=dr(`OpenGL ES 3.0 (${Z.getParameter(7938)})`);break;case 35724:t=Z.getParameter(35724);var n=t.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);n!==null&&(n[1].length==3&&(n[1]+=`0`),t=`OpenGL ES GLSL ES ${n[1]} (${t})`),t=dr(t);break;default:J||=1280}Xn[e]=t}return t},glGetUniformBlockIndex:(e,t)=>Z.getUniformBlockIndex(Wn[e],t?z(w,t):``),glGetUniformLocation:(e,t)=>{if(t=t?z(w,t):``,e=Wn[e]){var n=e,r=n.na,i=n.xb,a;if(!r)for(n.na=r={},n.wb={},a=0;a<Z.getProgramParameter(n,35718);++a){var o=Z.getActiveUniform(n,a),s=o.name;o=o.size;var c=fr(s);c=0<c?s.slice(0,c):s;var l=n.Xa;for(n.Xa+=o,i[c]=[o,l],s=0;s<o;++s)r[l]=s,n.wb[l++]=c}
10if(n=e.na,r=0,i=t,a=fr(t),0<a&&(r=parseInt(t.slice(a+1))>>>0,i=t.slice(0,a)),(i=e.xb[i])&&r<i[0]&&(r+=i[1],n[r]=n[r]||Z.getUniformLocation(e,t)))return r}else J||=1281;return-1},glInvalidateFramebuffer:(e,t,n)=>{for(var r=cr[t],i=0;i<t;i++)r[i]=E[n+4*i>>2];Z.invalidateFramebuffer(e,r)},glLinkProgram:e=>{e=Wn[e],Z.linkProgram(e),e.na=0,e.xb={}},glPixelStorei:(e,t)=>{e==3317?Zn=t:e==3314&&(Qn=t),Z.pixelStorei(e,t)},glReadPixels:(e,t,n,r,i,a,o)=>{if(Z.Pa)Z.readPixels(e,t,n,r,i,a,o);else{var s=pr(a);o>>>=31-Math.clz32(s.BYTES_PER_ELEMENT),Z.readPixels(e,t,n,r,i,a,s,o)}},glRenderbufferStorageMultisample:(e,t,n,r,i)=>Z.renderbufferStorageMultisample(e,t,n,r,i),glScissor:(e,t,n,r)=>Z.scissor(e,t,n,r),glShaderSource:(e,t,n,r)=>{for(var i=``,a=0;a<t;++a){var o=(o=D[n+4*a>>2])?z(w,o,r?D[r+4*a>>2]:void 0):``;i+=o}Z.shaderSource(Jn[e],i)},glStencilFunc:(e,t,n)=>Z.stencilFunc(e,t,n),glStencilFuncSeparate:(e,t,n,r)=>Z.stencilFuncSeparate(e,t,n,r),glStencilMask:e=>Z.stencilMask(e),glStencilOp:(e,t,n)=>Z.stencilOp(e,t,n),glStencilOpSeparate:(e,t,n,r)=>Z.stencilOpSeparate(e,t,n,r),glTexParameteri:(e,t,n)=>Z.texParameteri(e,t,n),glTexStorage2D:(e,t,n,r,i)=>Z.texStorage2D(e,t,n,r,i),glTexStorage3D:(e,t,n,r,i,a)=>Z.texStorage3D(e,t,n,r,i,a),glTexSubImage2D:(e,t,n,r,i,a,o,s,c)=>{if(Z.sa)Z.texSubImage2D(e,t,n,r,i,a,o,s,c);else if(c){var l=pr(s);Z.texSubImage2D(e,t,n,r,i,a,o,s,l,c>>>31-Math.clz32(l.BYTES_PER_ELEMENT))}else{if(c){l=pr(s);var u=a*((Qn||i)*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[o-6402]||1)*l.BYTES_PER_ELEMENT+Zn-1&-Zn);c=l.subarray(c>>>31-Math.clz32(l.BYTES_PER_ELEMENT),c+u>>>31-Math.clz32(l.BYTES_PER_ELEMENT))}else c=null;Z.texSubImage2D(e,t,n,r,i,a,o,s,c)}},glUniform1i:(e,t)=>{var n=Z,r=n.uniform1i,i=Z.Jb;if(i){var a=i.na[e];typeof a==`number`&&(i.na[e]=a=Z.getUniformLocation(i,i.wb[e]+(0<a?`[${a}]`:``))),e=a}else J||=1282,e=void 0;r.call(n,e,t)},glUniformBlockBinding:(e,t,n)=>{e=Wn[e],Z.uniformBlockBinding(e,t,n)},glUseProgram:e=>{e=Wn[e],Z.useProgram(e),Z.Jb=e},glVertexAttribDivisor:(e,t)=>{Z.vertexAttribDivisor(e,t)},glVertexAttribIPointer:(e,t,n,r,i)=>{Z.vertexAttribIPointer(e,t,n,r,i)},glVertexAttribPointer:(e,t,n,r,i,a)=>{Z.vertexAttribPointer(e,t,n,!!r,i,a)},glViewport:(e,t,n,r)=>Z.viewport(e,t,n,r),invoke_vii:Or,isWindowsBrowser:function(){return-1<navigator.platform.indexOf(`Win`)},provokingVertexWEBGL:function(e,t){(e=q[e].F.qb)&&e.provokingVertexWEBGL(t)},strftime:X,strftime_l:(e,t,n,r)=>X(e,t,n,r),upload_image:function(e,t){var n=r.images;n&&(t=n.get(t))&&(e=q[e].F,e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1))},wasm_start_image_decode:function(e,t,n){t=r.HEAP8.subarray(t,t+n),n=new Uint8Array(n),n.set(t),createImageBitmap(new Blob([n])).then(function(t){var n=new OffscreenCanvas(t.width,t.height).getContext(`2d`);n.drawImage(t,0,0),n=n.getImageData(0,0,t.width,t.height);var i=n.data.length,a=r.Db(i);r.pc.set(n.data,a),r.rc(e,t.width,t.height,a,i)}).catch(function(t){t=t.message||`decode failed`;var n=r.Kc(t)+1,i=r.Db(n);r.Sc(t,i,n),r.sc(e,i),r.qc(i)})}},Q=function(){function e(e){return Q=e.exports,x=Q.memory,ne(),an=Q.__indirect_function_table,ie.unshift(Q.__wasm_call_ctors),se--,r.monitorRunDependencies?.(se),se==0&&(k!==null&&(clearInterval(k),k=null),A&&(e=A,A=null,e())),Q}var t={env:vr,wasi_snapshot_preview1:vr};if(se++,r.monitorRunDependencies?.(se),r.instantiateWasm)try{return r.instantiateWasm(t,e)}catch(e){y(`Module.instantiateWasm callback failed with error: ${e}`),a(e)}return P||=M(`webgl2_advanced.wasm`)?`webgl2_advanced.wasm`:r.locateFile?r.locateFile(`webgl2_advanced.wasm`,h):h+`webgl2_advanced.wasm`,de(t,function(t){e(t.instance)}).catch(a),{}}(),yr=e=>(yr=Q.free)(e),br=e=>(br=Q.malloc)(e);r._setWebImage=(e,t,n)=>(r._setWebImage=Q.setWebImage)(e,t,n);var xr=e=>(xr=Q.__getTypeName)(e);r._wasm_image_decode_complete=(e,t,n,i,a)=>(r._wasm_image_decode_complete=Q.wasm_image_decode_complete)(e,t,n,i,a),r._wasm_image_decode_error=(e,t)=>(r._wasm_image_decode_error=Q.wasm_image_decode_error)(e,t);var Sr=r._ma_device__on_notification_unlocked=e=>(Sr=r._ma_device__on_notification_unlocked=Q.ma_device__on_notification_unlocked)(e);r._ma_malloc_emscripten=(e,t)=>(r._ma_malloc_emscripten=Q.ma_malloc_emscripten)(e,t),r._ma_free_emscripten=(e,t)=>(r._ma_free_emscripten=Q.ma_free_emscripten)(e,t);var Cr=r._ma_device_process_pcm_frames_capture__webaudio=(e,t,n)=>(Cr=r._ma_device_process_pcm_frames_capture__webaudio=Q.ma_device_process_pcm_frames_capture__webaudio)(e,t,n),wr=r._ma_device_process_pcm_frames_playback__webaudio=(e,t,n)=>(wr=r._ma_device_process_pcm_frames_playback__webaudio=Q.ma_device_process_pcm_frames_playback__webaudio)(e,t,n),Tr=(e,t)=>(Tr=Q.setThrew)(e,t),Er=e=>(Er=Q._emscripten_stack_restore)(e),Dr=()=>(Dr=Q.emscripten_stack_get_current)();r.dynCall_iiiji=(e,t,n,i,a,o)=>(r.dynCall_iiiji=Q.dynCall_iiiji)(e,t,n,i,a,o),r.dynCall_iij=(e,t,n,i)=>(r.dynCall_iij=Q.dynCall_iij)(e,t,n,i),r.dynCall_iiji=(e,t,n,i,a)=>(r.dynCall_iiji=Q.dynCall_iiji)(e,t,n,i,a),r.dynCall_jii=(e,t,n)=>
10(r.dynCall_jii=Q.dynCall_jii)(e,t,n),r.dynCall_vijj=(e,t,n,i,a,o)=>(r.dynCall_vijj=Q.dynCall_vijj)(e,t,n,i,a,o),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);function Or(e,t,n){var r=Dr();try{on(e)(t,n)}catch(e){if(Er(r),e!==e+0)throw e;Tr(1,0)}}var kr;A=function e(){kr||Ar(),kr||(A=e)};function Ar(){function e(){if(!kr&&(kr=!0,r.calledRun=!0,!S)){if(r.noFSInit||st||(st=!0,r.stdin=r.stdin,r.stdout=r.stdout,r.stderr=r.stderr,r.stdin?ct(`stdin`,r.stdin):rt(`/dev/tty`,`/dev/stdin`),r.stdout?ct(`stdout`,null,r.stdout):rt(`/dev/tty`,`/dev/stdout`),r.stderr?ct(`stderr`,null,r.stderr):rt(`/dev/tty1`,`/dev/stderr`),at(`/dev/stdin`,0),at(`/dev/stdout`,1),at(`/dev/stderr`,1)),Ie=!1,I(ie),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();ae.unshift(e)}I(ae)}}if(!(0<se)){if(r.preRun)for(typeof r.preRun==`function`&&(r.preRun=[r.preRun]);r.preRun.length;)oe();I(re),0<se||(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 Ar(),n=o,n})})()}),(e=>{e.exports=JSON.parse(`{"name":"@rive-app/webgl2","version":"2.38.2","description":"Rive's webgl2 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])","Chris Dalton <[email protected]> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive_fallback.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)}),((e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>o.AudioAssetWrapper,AudioWrapper:()=>o.AudioWrapper,BLANK_URL:()=>a.BLANK_URL,CustomFileAssetLoaderWrapper:()=>o.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>o.FileAssetWrapper,FileFinalizer:()=>o.FileFinalizer,FocusSessionState:()=>i.FocusSessionState,FontAssetWrapper:()=>o.FontAssetWrapper,FontWrapper:()=>o.FontWrapper,ImageAssetWrapper:()=>o.ImageAssetWrapper,ImageWrapper:()=>o.ImageWrapper,KeyboardInteractions:()=>i.KeyboardInteractions,RiveFont:()=>s.RiveFont,createFinalization:()=>o.createFinalization,finalizationRegistry:()=>o.finalizationRegistry,registerTouchInteractions:()=>r.registerTouchInteractions,sanitizeUrl:()=>a.sanitizeUrl});var r=n(7),i=n(8),a=n(9),o=n(10),s=n(11)}),((e,t,n)=>{n.r(t),n.d(t,{registerTouchInteractions:()=>o});var r=void 0,i=function(e,t,n){var r=[];if(t)for(var i=0;i<e.length;i++){var a=e[i];r.push({clientX:a.clientX,clientY:a.clientY,identifier:a.identifier})}else{var o=n===null?e[0]:Array.from(e).find(function(e){return e.identifier===n})??null;o&&r.push({clientX:o.clientX,clientY:o.clientY,identifier:o.identifier})}return r},a=function(e,t,n,r){var a=e;return a.changedTouches?.length?(!t&&[`touchstart`,`touchmove`].includes(e.type)&&e.preventDefault(),i(a.changedTouches,n,r)):[{clientX:e.clientX,clientY:e.clientY,identifier:0}]},o=function(e){var t=e.canvas,n=e.artboard,i=e.stateMachines,o=i===void 0?[]:i,s=e.renderer,c=e.rive,l=e.fit,u=e.alignment,d=e.isTouchScrollEnabled,f=d!==void 0&&d,p=e.dispatchPointerExit,m=p===void 0||p,h=e.enableMultiTouch,g=h!==void 0&&h,_=e.layoutScaleFactor,v=_===void 0?1:_,y=e.advanceAndDrain;if(!t||!o.length||!s||!c||!n||typeof window>`u`)return null;var b=null,x=!1,S=null,C=function(e){if(x&&e instanceof MouseEvent){e.type==`mouseup`&&(x=!1);return}x=f&&e.type===`touchend`&&b===`touchstart`,b=e.type;var t=e.currentTarget.getBoundingClientRect();if(!g&&e.type===`touchstart`&&S===null){var r=e.changedTouches?.[0];r&&(S=r.identifier)}var i=a(e,f,g,g?null:S),s=c.computeAlignment(l,u,{minX:0,minY:0,maxX:t.width,maxY:t.height},n.bounds,v),d=new c.Mat2D;
10switch(s.invert(d),i.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),s=c.mapXY(d,o),l=s.x(),u=s.y();e.transformedX=l,e.transformedY=u,s.delete(),o.delete()}}),d.delete(),s.delete(),e.type){case`mouseout`:for(var p=function(e){m?i.forEach(function(t){e.pointerExit(t.transformedX,t.transformedY,t.identifier)}):i.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},h=0,_=o;h<_.length;h++){var C=_[h];p(C)}break;case`touchmove`:case`mouseover`:case`mousemove`:for(var w=function(e){i.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},T=0,ee=o;T<ee.length;T++){var C=ee[T];w(C)}break;case`touchstart`:case`mousedown`:for(var E=function(e){i.forEach(function(t){e.pointerDown(t.transformedX,t.transformedY,t.identifier)})},D=0,O=o;D<O.length;D++){var C=O[D];E(C)}y(0);break;case`touchend`:for(var te=function(e){i.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier),e.pointerExit(t.transformedX,t.transformedY,t.identifier)})},ne=0,re=o;ne<re.length;ne++){var C=re[ne];te(C)}y(0),!g&&i.some(function(e){return e.identifier===S})&&(S=null);break;case`mouseup`:for(var ie=function(e){i.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier)})},ae=0,oe=o;ae<oe.length;ae++){var C=oe[ae];ie(C)}y(0);break;default:}},w=function(){S=null},T=C.bind(r);return t.addEventListener(`mouseover`,T),t.addEventListener(`mouseout`,T),t.addEventListener(`mousemove`,T),t.addEventListener(`mousedown`,T),t.addEventListener(`mouseup`,T),t.addEventListener(`touchmove`,T,{passive:f}),t.addEventListener(`touchstart`,T,{passive:f}),t.addEventListener(`touchend`,T),t.addEventListener(`touchcancel`,w),function(){t.removeEventListener(`mouseover`,T),t.removeEventListener(`mouseout`,T),t.removeEventListener(`mousemove`,T),t.removeEventListener(`mousedown`,T),t.removeEventListener(`mouseup`,T),t.removeEventListener(`touchmove`,T),t.removeEventListener(`touchstart`,T),t.removeEventListener(`touchend`,T),t.removeEventListener(`touchcancel`,w)}}}),((e,t,n)=>{n.r(t),n.d(t,{FocusSessionState:()=>r,KeyboardInteractions:()=>i});var r;(function(e){e.NotFocused=`notFocused`,e.EntryPending=`entryPending`,e.RiveFocused=`riveFocused`})(r||={});var i=function(){function e(e){var t=e.canvas,n=e.stateMachine,i=e.hasFocusNodes,a=this;this.focusSessionState=r.NotFocused,this.onCanvasFocus=function(e){a.hasFocusNodes&&(a.mainSm.focusState().hasFocus||(a.focusSessionState=r.EntryPending,a.isKeyboardDrivenFocus()&&(a.cameFromBeforeCanvas(e.relatedTarget)?a.mainSm.focusNext():a.mainSm.focusPrevious())&&(a.focusSessionState=r.RiveFocused)))},this.onCanvasBlur=function(e){a.focusSessionState=r.NotFocused},this.onKeyDown=function(e){a.focusSessionState!==r.NotFocused&&e.code===`Tab`&&a.hasFocusNodes&&((e.shiftKey?a.mainSm.focusPrevious():a.mainSm.focusNext())?(a.focusSessionState=r.RiveFocused,e.preventDefault()):a.focusSessionState=r.NotFocused)},this.canvas=t,this.mainSm=n,this.hasFocusNodes=i,t.addEventListener(`focus`,this.onCanvasFocus),t.addEventListener(`blur`,this.onCanvasBlur),t.addEventListener(`keydown`,this.onKeyDown)}return e.prototype.setFocusSessionState=function(e){this.focusSessionState=e},e.prototype.notifyRiveFocused=function(){this.focusSessionState=r.RiveFocused},e.prototype.isKeyboardDrivenFocus=function(){try{return this.canvas.matches(`:focus-visible`)}catch{return!1}},e.prototype.cameFromBeforeCanvas=function(e){if(!e)return!0;var t=this.canvas.compareDocumentPosition(e);return t&Node.DOCUMENT_POSITION_PRECEDING?!0:!(t&Node.DOCUMENT_POSITION_FOLLOWING)},e.prototype.cleanup=function(){this.canvas.removeEventListener(`focus`,this.onCanvasFocus),this.canvas.removeEventListener(`blur`,this.onCanvasBlur),this.canvas.removeEventListener(`keydown`,this.onKeyDown)},e}()}),((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}
10t.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;if(e.isImage)n=new f(e);else if(e.isAudio)n=new p(e);else if(e.isFont)n=new m(e);else return!1;return 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)}}),((e,t,n)=>{n.r(t),n.d(t,{RiveFont:()=>i});var r=n(3),i=function(){function e(){}return e.setFallbackFontCallback=function(t){e._fallbackFontCallback=t??null,e._wireFallbackProc()},e._fontToPtr=function(e){if(e==null)return null;var t=e.nativeFont;return(t?.ptr)?.call(t)??null},e._getFallbackPtr=function(t,n){return n<0||n>=t.length?null:e._fontToPtr(t[n])},e._wireFallbackProc=function(){r.RuntimeLoader.getInstance(function(t){var n=e._fallbackFontCallback;n?t.setFallbackFontCallback((function(t,r,i){var a=n(t,i);return a?Array.isArray(a)?e._getFallbackPtr(a,r):r===0?e._fontToPtr(a):null:null})):t.setFallbackFontCallback(null)})},e._fallbackFontCallback=null,e}()})],t={};function n(r){var i=t[r];
10if(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:()=>p,DataEnum:()=>k,DataType:()=>oe,DrawOptimizationOptions:()=>m,EventType:()=>w,Fit:()=>f,Layout:()=>h,LoopType:()=>T,Rive:()=>ae,RiveEventType:()=>v,RiveFile:()=>ie,RiveFont:()=>i.RiveFont,RuntimeLoader:()=>t.RuntimeLoader,StateMachineInput:()=>_,StateMachineInputType:()=>g,Testing:()=>me,ViewModel:()=>se,ViewModelInstance:()=>j,ViewModelInstanceArtboard:()=>F,ViewModelInstanceAssetImage:()=>pe,ViewModelInstanceBoolean:()=>ce,ViewModelInstanceColor:()=>fe,ViewModelInstanceEnum:()=>ue,ViewModelInstanceList:()=>de,ViewModelInstanceNumber:()=>P,ViewModelInstanceString:()=>N,ViewModelInstanceTrigger:()=>le,ViewModelInstanceValue:()=>M,decodeAudio:()=>he,decodeFont:()=>_e,decodeImage:()=>ge});var e=n(1),t=n(3),i=n(6),a=(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)}})(),o=function(){return o=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},o.apply(this,arguments)},s=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())})},c=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}}},l=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))},u=function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return t}(Error),d=function(e){return e&&e.isHandledError?e.message:`Problem loading file; may be corrupt!`},f;(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`})(f||={});var p;(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`})(p||={});var m;(function(e){e.AlwaysDraw=`alwaysDraw`,e.DrawOnChanged=`drawOnChanged`})(m||={});var h=function(){function e(e){this.fit=e?.fit??f.Contain,this.alignment=e?.alignment??p.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===f.Cover?e.Fit.cover:this.fit===f.Contain?e.Fit.contain:this.fit===f.Fill?e.Fit.fill:this.fit===f.FitWidth?e.Fit.fitWidth:this.fit===f.FitHeight?e.Fit.fitHeight:this.fit===f.ScaleDown?e.Fit.scaleDown:this.fit===f.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===p.TopLeft?e.Alignment.topLeft:this.alignment===p.TopCenter?e.Alignment.topCenter:this.alignment===p.TopRight?e.Alignment.topRight:this.alignment===p.CenterLeft?e.Alignment.centerLeft:this.alignment===p.CenterRight?e.Alignment.centerRight:this.alignment===p.BottomLeft?e.Alignment.bottomLeft:this.alignment===p.BottomCenter?e.Alignment.bottomCenter:this.alignment===p.BottomRight?e.Alignment.bottomRight:e.Alignment.center;return this.cachedRuntimeAlignment=t,t},e}(),g;(function(e){e[e.Number=56]=`Number`,e[e.Trigger=58]=`Trigger`,e[e.Boolean=59]=`Boolean`})(g||={});var _=function(){function e(e,t){this.type=e,this.runtimeInput=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.runtimeInput.name}
10,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===g.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}(),v;(function(e){e[e.General=128]=`General`,e[e.OpenUrl=131]=`OpenUrl`})(v||={});var y=function(){function e(e){this.isBindableArtboard=!1,this.isBindableArtboard=e}return e}(),b=function(e){a(t,e);function t(t,n){var r=e.call(this,!1)||this;return r.nativeArtboard=t,r.file=n,r}return t}(y),x=function(e){a(t,e);function t(t){var n=e.call(this,!0)||this;return n.selfUnref=!1,n.nativeArtboard=t,n}return Object.defineProperty(t.prototype,"viewModel",{set:function(e){this.nativeViewModel=e.nativeInstance},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){var e;this.selfUnref&&(this.nativeArtboard.unref(),(e=this.nativeViewModel)==null||e.unref())},t}(y),S=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),this.hasFocusNodes=this.instance.hasFocusNodes()}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 _(g.Boolean,e.asBool());if(e.type===t.SMIInput.number)return new _(g.Number,e.asNumber());if(e.type===t.SMIInput.trigger)return new _(g.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.prototype.focusState=function(){return this.instance.focusState()},e.prototype.clearFocus=function(){this.instance.clearFocus()},e}(),C=function(){function t(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 t.prototype.add=function(t,n,r){if(r===void 0&&(r=!0),t=L(t),t.length===0)this.animations.forEach(function(e){return e.playing=n}),this.stateMachines.forEach(function(e){return e.playing=n});else for(var i=this.animations.map(function(e){return e.name}),a=this.stateMachines.map(function(e){return e.name}),o=0;o<t.length;o++){var s=i.indexOf(t[o]),c=a.indexOf(t[o]);if(s>=0||c>=0)s>=0?this.animations[s].playing=n:this.stateMachines[c].playing=n;else{var l=this.artboard.animationByName(t[o]);if(l){var u=new e.Animation(l,this.artboard,this.runtime,n);u.advance(0),u.apply(1),this.animations.push(u)}else{var d=this.artboard.stateMachineByName(t[o]);if(d){var f=new S(d,this.runtime,n,this.artboard);this.stateMachines.push(f)}}}}return r&&(n?this.eventManager.fire({type:w.Play,data:this.playing}):this.eventManager.fire({type:w.Pause,data:this.paused})),n?this.playing:this.paused},t.prototype.initLinearAnimations=function(t,n,r){r===void 0&&(r=!1);for(var i=this.animations.map(function(e){return e.name}),a=0;a<t.length;a++){var o=i.indexOf(t[a]);if(o>=0)this.animations[o].playing=n;else{var s=this.artboard.animationByName(t[a]);if(s){var c=new e.Animation(s,this.artboard,this.runtime,n);c.advance(0),c.apply(1),this.animations.push(c)}else if(r)throw new u(`State Machine with name ${t[a]} not found`);else console.error(`Animation with name ${t[a]} not found.`)}}},t.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 S(a,this.runtime,t,this.artboard);this.stateMachines.push(o)}else console.warn(`State Machine with name ${e[r]} not found. Falling back to find an animation with the same name.`),this.initLinearAnimations([e[r]],t,!0)}}},t.prototype.play=function(e){return this.add(e,!0)},t.prototype.advanceIfPaused=function(){this.stateMachines.forEac
10h(function(e){e.playing||e.advanceAndApply(0)})},t.prototype.pause=function(e){return this.add(e,!1)},t.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(t.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(t.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}),t.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:w.Stop,data:n}),n},Object.defineProperty(t.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(t.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),t.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},t.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:w.Loop,data:{animation:n.name,type:T.Loop}}),n.loopCount=0):n.loopValue===2&&n.loopCount>1&&(this.eventManager.fire({type:w.Loop,data:{animation:n.name,type:T.PingPong}}),n.loopCount=0)}},t.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:w.StateChange,data:e})},t.prototype.handleAdvancing=function(e){this.eventManager.fire({type:w.Advance,data:e})},t}(),w;(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`})(w||={});var T;
10(function(e){e.OneShot=`oneshot`,e.Loop=`loop`,e.PingPong=`pingpong`})(T||={});var ee=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}(),E=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}(),D;(function(e){e[e.AVAILABLE=0]=`AVAILABLE`,e[e.UNAVAILABLE=1]=`UNAVAILABLE`})(D||={});var O=new(function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=D.UNAVAILABLE,t}return t.prototype.delay=function(e){return s(this,void 0,void 0,function(){return c(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})},t.prototype.timeout=function(){return s(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(e,t){return setTimeout(t,50)})]})})},t.prototype.reportToListeners=function(){this.fire({type:w.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return s(this,void 0,void 0,function(){return c(this,function(e){return this._enabled||(this._enabled=!0,this._status=D.AVAILABLE,this.reportToListeners()),[2]})})},t.prototype.testAudio=function(){return s(this,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:if(!(this._status===D.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 s(this,void 0,void 0,function(){return c(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===D.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 s(e,void 0,void 0,function(){return c(this,function(e){return this.enableAudio(),[2]})})},{once:!0})},t.prototype.establishAudio=function(){return s(this,void 0,void 0,function(){return c(this,function(e){return this._establishAudio(),[2]})})},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===D.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(ee)),te=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),ne=globalThis.ResizeObserver||te,re=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 ne(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}()),ie=function(){function e(e){this.enableRiveAssetCDN=!0,this.enablePerfMarks=!1,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,this.enablePerfMarks=!!e.enablePerfMarks,this.enablePerfMarks&&(t.RuntimeLoader.enablePerfMarks=!0),this.eventManager=new ee,e.onLoad&&this.on(w.Load,e.onLoad),e.onLoadError&&this.on(w.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 s(this,void 0,void 0,function(){var t,n,r,a,o,s;return c(this,function(c){switch(c.label){case 0:if(!(this.src&&!this.buffer))return[3,4];c.label=1;case 1:return c.trys.push([1,3,,4]),t=this,[4,I(this.src)];case 2:return t.buffer=c.sent(),[3,4];case 3:throw n=c.sent(),n instanceof Error?n:new u(e.fileLoadErrorMessage);case 4:return this.destroyed?[2]:(this.assetLoader&&(a=new i.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),r=a.assetLoader),this.enablePerfMarks&&performance.mark(`rive:file-load:start`),o=this,[4,this.runtime.load(new Uint8Array(this.buffer),r,this.enableRiveAssetCDN)]);case 5:return o.file=c.sent(),this.enablePerfMarks&&(performance.mark(`rive:file-load:end`),performance.measure(`rive:file-load`,`rive:file-load:start`,`r
10ive:file-load:end`)),s=new i.FileFinalizer(this.file),i.finalizationRegistry.register(this,s),this.destroyed?(this.releaseFile(),[2]):(this.file===null?this.fireLoadError(e.fileLoadErrorMessage):this.eventManager.fire({type:w.Load,data:this}),[2])}})})},e.prototype.loadRiveFileBytes=function(){return s(this,void 0,void 0,function(){var e;return c(this,function(t){return this.enablePerfMarks&&performance.mark(`rive:fetch-riv:start`),e=this.src?I(this.src):Promise.resolve(this.buffer),this.enablePerfMarks&&this.src&&e.then(function(){performance.mark(`rive:fetch-riv:end`),performance.measure(`rive:fetch-riv`,`rive:fetch-riv:start`,`rive:fetch-riv:end`)}),[2,e]})})},e.prototype.loadRuntime=function(){return s(this,void 0,void 0,function(){var e;return c(this,function(n){return this.enablePerfMarks&&performance.mark(`rive:await-wasm:start`),e=t.RuntimeLoader.awaitInstance(),this.enablePerfMarks&&e.then(function(){performance.mark(`rive:await-wasm:end`),performance.measure(`rive:await-wasm`,`rive:await-wasm:start`,`rive:await-wasm:end`)}),[2,e]})})},e.prototype.init=function(){return s(this,void 0,void 0,function(){var t,n,r,i;return c(this,function(a){switch(a.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(e.missingErrorMessage),[2];a.label=1;case 1:return a.trys.push([1,4,,5]),[4,Promise.all([this.loadRiveFileBytes(),this.loadRuntime()])];case 2:return t=a.sent(),n=t[0],r=t[1],this.destroyed?[2]:(this.buffer=n,this.runtime=r,this.enablePerfMarks&&performance.mark(`rive:init-data:start`),[4,this.initData()]);case 3:return a.sent(),this.enablePerfMarks&&(performance.mark(`rive:init-data:end`),performance.measure(`rive:init-data`,`rive:init-data:start`,`rive:init-data:end`)),[3,5];case 4:return i=a.sent(),this.fireLoadError(i instanceof Error?i.message:e.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:w.LoadError,data:e}),new u(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 x(e);return(0,i.createFinalization)(t,t.nativeArtboard),this.bindableArtboards.push(t),t}return null},e.prototype.getArtboard=function(e){var t=this.file.artboardByName(e);if(t!=null)return new b(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.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return t===null?null:new se(t)},e.missingErrorMessage=`Rive source file or data buffer required`,e.fileLoadErrorMessage=`The file failed to load`,e}(),ae=function(){function e(e){var n=this;this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this._keyboardInteractions=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._needsRedraw=!1,this._currentCanvasWidth=0,this._currentCanvasHeight=0,this._audioEventListener=null,this._boundDraw=null,this._pageVisibilityHandler=null,this._explicitlyStoppedRendering=!1,this._viewModelInstance=null,this._dataEnums=null,this._tabIndex=null,this._prevHasFocus=!1,this._focusOptions={allowFocusInterrupt:!1},this.drawOptimization=m.DrawOnChanged,this.enablePerfMarks=!1,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(e){var t=n._hasZeroSize!==e;n._hasZeroSize=e,e?(!n._layout.maxX||!n._layout.maxY)&&n.resizeToCanvas():t&&n.resizeDrawingSurfaceToCanvas()},this.frameRequestId=null,this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),typeof document<`u`&&(this._pageVisibilityHandler=this._onPageVisibilityChange.bind(this),document.addEventListener(`visibilitychange`,this._pageVisibilityHandler)),this.canvas=e.canvas,e.canvas.constructor===HTMLCanvasElement&&(this._observed=re.add(this.canvas,this.onCanvasResize)),this._currentCanvasWidth=this.canvas.width,this._currentCanvasHeight=this.canvas.height,this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=e.layout??new h,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||e.enableRiveAssetCDN,this.enablePerfMarks=!!e.enablePerfMarks,this.enablePerfMarks&&(t.RuntimeLoader.enablePerfMarks=!0),this._focusOptions=e.focusOptions??this._focusOptions,this.eventManager=new ee,e.onLoad&&this.on(w.Load,e.onLoad),e.onLoadError&&this.on(w.LoadError,e.onLoadError),e.onPlay&&this.on(w.Play,e.onPlay),e.onPause&&this.on(w.Pause,e.onPause),e.onStop&&this.on(w.Stop,e.onStop),e.onLoop&&this.on(w.Lo
10op,e.onLoop),e.onStateChange&&this.on(w.StateChange,e.onStateChange),e.onAdvance&&this.on(w.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(w.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(w.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(w.Play,e.onplay),e.onpause&&!e.onPause&&this.on(w.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(w.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(w.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(w.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new E(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,tabIndex:e.tabIndex})}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(n){var r=this,i=n.src,a=n.buffer,o=n.riveFile,s=n.animations,c=n.stateMachines,l=n.artboard,d=n.autoplay,f=d!==void 0&&d,p=n.useOffscreenRenderer,m=p!==void 0&&p,h=n.autoBind,g=h!==void 0&&h,_=n.tabIndex;if(!this.destroyed){if(this.src=i,this.buffer=a,this.riveFile=o,this._tabIndex=_??null,!this.src&&!this.buffer&&!this.riveFile)throw new u(e.missingErrorMessage);var v=L(s),y=L(c);this.loaded=!1,this.readyForPlaying=!1,t.RuntimeLoader.awaitInstance().then(function(e){if(!r.destroyed){r.runtime=e,r.removeRiveListeners(),r.deleteRiveRenderer(),r.enablePerfMarks&&performance.mark(`rive:make-renderer:start`);try{if(r.renderer=r.runtime.makeRenderer(r.canvas,m),!r.renderer)throw Error(`Renderer is null, cannot render Rive on the canvas.`)}catch(e){throw console.error(e),new u(`Unable to create the renderer, your environment may not support WebGL. Try the @rive-app/canvas runtime as an alternative.`)}r.enablePerfMarks&&(performance.mark(`rive:make-renderer:end`),performance.measure(`rive:make-renderer`,`rive:make-renderer:start`,`rive:make-renderer:end`)),r.canvas.width||r.canvas.height||r.resizeDrawingSurfaceToCanvas(),r.initData(l,v,y,f,g).then(function(e){if(e)return r.setupRiveListeners()}).catch(function(e){console.error(e)})}}).catch(function(e){r.eventManager.fire({type:w.LoadError,data:e.message})})}},e.prototype.setupRiveListeners=function(e){var t=this;if(this.eventCleanup&&this.eventCleanup(),this.cleanupKeyboardInteractions(),!this.shouldDisableRiveListeners){var n=this.animator.stateMachines.filter(function(e){return e.playing}),r=n.filter(function(e){return t.runtime.hasListeners(e.instance)}).map(function(e){return e.instance}),a=this.isTouchScrollEnabled,o=this.dispatchPointerExit,s=this.enableMultiTouch;e&&`isTouchScrollEnabled`in e&&(a=e.isTouchScrollEnabled),this.eventCleanup=(0,i.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:r,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:a,dispatchPointerExit:o,enableMultiTouch:s,layoutScaleFactor:this._layout.layoutScaleFactor,advanceAndDrain:this.advanceAndReportChanges.bind(this)});var c=n.filter(function(e){return e.hasFocusNodes});if(c.length){var l=this.canvas.tabIndex;(l===-1||isNaN(l))&&(this.canvas.tabIndex=this._tabIndex===null?0:this._tabIndex),typeof window<`u`&&(this._keyboardInteractions=new i.KeyboardInteractions({canvas:this.canvas,stateMachine:c[0].instance,hasFocusNodes:!0}))}}},e.prototype.cleanupKeyboardInteractions=function(){this._keyboardInteractions&&=(this._keyboardInteractions.cleanup(),null)},e.prototype.removeRiveListeners=function(){this.eventCleanup&&=(this.eventCleanup(),null),this.cleanupKeyboardInteractions()},e.prototype.initializeAudio=function(){var e=this;O.status==D.UNAVAILABLE&&(this.file.hasAudio||this.artboard?.hasAudio&&this._audioEventListener===null)&&(this._audioEventListener={type:w.AudioStatusChange,callback:function(){return e.onSystemAudioChanged()}},O.add(this._audioEventListener),O.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 s(this,void 0,void 0,function(){var a,o,s;return c(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),this.riveFile==null?(a=new ie({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader,enablePerfMarks:this.enablePerfMarks}),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:this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,r,i),this.initArtboardSize(),this.initializeAudio();try{this.loaded=!0,this.eventManager.fire({type:w.Load,data:this.src??`buffer`})}catch(e){console.error(e)}return this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return o=c.sent(),s=d(o),this.eventManager.fire({type:w.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}})})},e.prototype.initArtboard=function(e,t,n,r,a){if(this.file){var o=e?this.file.artboardByName(e):this.file.defaultArtboard();if(!o)throw new u(`Invalid artboard name or no default artboard`);this.artboard=o,o.volume=this._volume*O.systemVolume,this.animator=new C(this.runtime,this.artboard,this.eventManager);var s;if(t.length>0||n.length>0?(s=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):s=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?w.Play:w.Pause,data:s}}),a){var c=this.file.defaultArtboardViewModel(o);if(c!==null){var l=c.defaultInstance();if(l!==null){var d=new j(l,null);(0,i.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._canvasSizeChanged=function(){var e=!1;return this.canvas&&(this.canvas.width!==this._currentCanvasWidth&&(this._currentCanvasWidth=this.canvas.width,e=!0),this.canvas.height!==this._currentCanvasHeight&&(this._currentCanvasHeight=this.canvas.height,e=!0)),e},e.prototype.pollFocusState=function(){if(!this._keyboardInteractions){this._prevHasFocus=!1;return}var e=this.animator.stateMachines.find(function(e){return e.playing&&e.hasFocusNodes});if(!e){this._prevHasFocus=!1;return}if(this.canvas instanceof HTMLCanvasElement){if(e.focusState().hasFocus){this._keyboardInteractions.notifyRiveFocused(),this._prevHasFocus||=(this.canvas!==document.activeElement&&this._focusOptions.allowFocusInterrupt&&this.canvas.focus(),!0);return}this._prevHasFocus=!1,this._keyboardInteractions.focusSessionState===i.FocusSessionState.RiveFocused&&this._keyboardInteractions.setFocusSessionState(i.FocusSessionState.NotFocused)}},e.prototype.advanceAndReportChanges=function(e){for(var t,n=this.animator.animations.filter(function(e){return e.playing||e.needsScrub}).sort(function(e){return e.needsScrub?-1:1}),r=0,a=n;r<a.length;r++){var o=a[r];o.advance(e),o.instance.didLoop&&(o.loopCount+=1),o.apply(1)}for(var s=this.animator.stateMachines.filter(function(e){return e.playing}),c=this.enablePerfMarks&&this.frameCount<3?this.frameCount:-1,l=0,u=s;l<u.length;l++){var d=u[l],f=d.reportedEventCount();if(f)for(var p=0;p<f;p++){var m=d.reportedEventAt(p);if(m)if(m.type===v.OpenUrl){if(this.eventManager.fire({type:w.RiveEvent,data:m}),this.automaticallyHandleEvents){var h=document.createElement(`a`),g=m,_=g.url,y=g.target,b=(0,i.sanitizeUrl)(_);_&&h.setAttribute(`href`,b),y&&h.setAttribute(`target`,y),b&&b!==i.BLANK_URL&&h.click()}}else this.eventManager.fire({type:w.RiveEvent,data:m})}c>=0&&performance.mark(`rive:sm-advance:start:f${c}`),d.advanceAndApply(e),c>=0&&(performance.mark(`rive:sm-advance:end:f${c}`),performance.measure(`rive:sm-advance:f${c}`,`rive:sm-advance:start:f${c}`,`rive:sm-advance:end:f${c}`))}this.animator.stateMachines.length==0&&this.artboard.advance(e),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(e),this.pollFocusState(),(t=this._viewModelInstance)==null||t.handleCallbacks()},e.prototype.draw=function(e,t){this.frameRequestId=null;var n=performance.now(),r=this.enablePerfMarks&&this.frameCount<3?this.frameCount:-1;this.lastRenderTime||=e,this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,t?.());var i=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e,this.advanceAndReportChanges(i);var a=this.renderer;this._hasZeroSize||(this.drawOptimization==m.AlwaysDraw||this.artboard.didChange()||this._needsRedraw||this._canvasSizeChanged())&&(a.clear(),a.save(),r>=0&&performance.mark(`rive:align-renderer:start:f${r}`),this.alignRenderer(),r>=0&&(performance.mark(`rive:align-renderer:end:f${r}`),performance.measure(`rive:align-renderer:f${r}`,`rive:align-renderer:start:f${r}`,`rive:align-renderer:end:f${r}`)),r>=0&&performance.mark(`rive:artboard-draw:start:f${r}`),this.artboard.draw(a),r>=0&&(performance.mark(`rive:artboard-draw:end:f${r}`),performance.measure(`rive:artboard-draw:f${r}`,`rive:artboard-draw:start:f${r}`,`rive:artboard-draw:end:f${r}
10`)),a.restore(),r>=0&&performance.mark(`rive:renderer-flush:start:f${r}`),a.flush(),r>=0&&(performance.mark(`rive:renderer-flush:end:f${r}`),performance.measure(`rive:renderer-flush:f${r}`,`rive:renderer-flush:start:f${r}`,`rive:renderer-flush:end:f${r}`)),this._needsRedraw=!1),this.frameCount++;var o=performance.now();for(this.frameTimes.push(o),this.durations.push(o-n);this.frameTimes[0]<=o-1e3;)this.frameTimes.shift(),this.durations.shift();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,n,r;this.destroyed=!0,this.stopRendering(),(t=(e=this.renderer)?.bindContext)==null||t.call(e),this.cleanupInstances(),this._observed!==null&&re.remove(this._observed),this.removeRiveListeners(),this.file&&=((n=this.riveFile)==null||n.cleanup(),null),this.riveFile=null,this.deleteRiveRenderer(),this._audioEventListener!==null&&(O.remove(this._audioEventListener),this._audioEventListener=null),this._pageVisibilityHandler&&=(document.removeEventListener(`visibilitychange`,this._pageVisibilityHandler),null),(r=this._viewModelInstance)==null||r.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.cleanupKeyboardInteractions(),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.cleanupKeyboardInteractions(),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.cleanupKeyboardInteractions(),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(),this.cleanupKeyboardInteractions()},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()}
10,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._needsRedraw=!0,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===f.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},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===g.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===g.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===g.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}):[]}
10,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??!0},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._explicitlyStoppedRendering=!0,this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},e.prototype.startRendering=function(){this._explicitlyStoppedRendering=!1,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._onPageVisibilityChange=function(){document.hidden?(this.frameRequestId!==null&&(this.runtime?.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null),this.lastRenderTime=0):this.animator?.isPlaying&&!this._explicitlyStoppedRendering&&this.scheduleRendering()},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();o++){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*O.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>
100?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 se(t)},e.prototype.viewModelByName=function(e){return this.riveFile?.viewModelByName(e)},e.prototype.enums=function(){if(this._dataEnums===null){var e=this.file.enums();this._dataEnums=e.map(function(e){return new k(e)})}return this._dataEnums},e.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new se(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.prototype.clearFocus=function(){this.animator.stateMachines.filter(function(e){return e.playing&&e.hasFocusNodes}).forEach(function(e){return e.clearFocus()})},e.missingErrorMessage=`Rive source file or data buffer required`,e.cleanupErrorMessage=`Attempt to use file after calling cleanup.`,e}(),oe;(function(e){e.none=`none`,e.string=`string`,e.number=`number`,e.boolean=`boolean`,e.color=`color`,e.list=`list`,e.enumType=`enumType`,e.trigger=`trigger`,e.viewModel=`viewModel`,e.integer=`integer`,e.listIndex=`listIndex`,e.image=`image`,e.artboard=`artboard`})(oe||={});var se=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 j(t,null);return(0,i.createFinalization)(n,t),n}return null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);if(t!==null){var n=new j(t,null);return(0,i.createFinalization)(n,t),n}return null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();if(e!==null){var t=new j(e,null);return(0,i.createFinalization)(t,e),t}return null},e.prototype.instance=function(){var e=this._viewModel.instance();if(e!==null){var t=new j(e,null);return(0,i.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()},enumerable:!1,configurable:!0}),e}(),k=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}(),A;(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`})(A||={});var j=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>
100)&&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 A.Number:if(i=this._runtimeInstance?.number(e[t])??null,i!==null)return new P(i,this);break;case A.String:if(i=this._runtimeInstance?.string(e[t])??null,i!==null)return new N(i,this);break;case A.Boolean:if(i=this._runtimeInstance?.boolean(e[t])??null,i!==null)return new ce(i,this);break;case A.Color:if(i=this._runtimeInstance?.color(e[t])??null,i!==null)return new fe(i,this);break;case A.Trigger:if(i=this._runtimeInstance?.trigger(e[t])??null,i!==null)return new le(i,this);break;case A.Enum:if(i=this._runtimeInstance?.enum(e[t])??null,i!==null)return new ue(i,this);break;case A.List:if(i=this._runtimeInstance?.list(e[t])??null,i!==null)return new de(i,this);break;case A.Image:if(i=this._runtimeInstance?.image(e[t])??null,i!==null)return new pe(i,this);break;case A.Artboard:if(i=this._runtimeInstance?.artboard(e[t])??null,i!==null)return new F(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,i.createFinalization)(r,n),r.internalIncrementReferenceCount(),this._viewModelInstances.set(t,r),r}return null},e.prototype.number=function(e){return this.propertyFromPath(e,A.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,A.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,A.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,A.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,A.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,A.Enum)},e.prototype.list=function(e){return this.propertyFromPath(e,A.List)},e.prototype.image=function(e){return this.propertyFromPath(e,A.Image)},e.prototype.artboard=function(e){return this.propertyFromPath(e,A.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 o({},e)})||[]}
10,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewModelName",{get:function(){return this._runtimeInstance?.getViewModelName()??``},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=l([],this._children,!0);this._children.length=0;var r=l([],this._parents,!0);this._parents.length=0,n.forEach(function(t){t.removeParent(e)}),r.forEach(function(t){t.removeFromViewModelCallbacks(e)})}},e}(),M=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}(),N=function(e){a(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}(M),P=function(e){a(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}(M),ce=function(e){a(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}(M),le=function(e){a(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}(M),ue=function(e){a(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}(M),de=function(e){a(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 j(t,this._parentViewModel);return(0,i.createFinalization)(n,t),n}return null},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(M),fe=function(e){a(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}
10,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}(M),pe=function(e){a(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}(M),F=function(e){a(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),t?.nativeViewModel&&this._viewModelInstanceValue.viewModelInstance(t?.nativeViewModel??null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(M),I=function(e){return s(void 0,void 0,void 0,function(){var t,n,r;return c(this,function(i){switch(i.label){case 0:return t=new Request(e),[4,fetch(t)];case 1:if(n=i.sent(),!n.ok)throw Error(`Failed to fetch the Rive file: HTTP ${n.status}`);return[4,n.arrayBuffer()];case 2:return r=i.sent(),[2,r]}})})},L=function(e){return typeof e==`string`?[e]:e instanceof Array?e:[]},me={EventManager:ee,TaskQueueManager:E},he=function(e){return s(void 0,void 0,void 0,function(){var n,r,a;return c(this,function(o){switch(o.label){case 0:return n=new Promise(function(n){return t.RuntimeLoader.getInstance(function(t){t.decodeAudio(e,n)})}),[4,n];case 1:return r=o.sent(),a=new i.AudioWrapper(r),i.finalizationRegistry.register(a,r),[2,a]}})})},ge=function(e){return s(void 0,void 0,void 0,function(){var n,r,a;return c(this,function(o){switch(o.label){case 0:return n=new Promise(function(n){return t.RuntimeLoader.getInstance(function(t){t.decodeImage(e,n)})}),[4,n];case 1:return r=o.sent(),a=new i.ImageWrapper(r),i.finalizationRegistry.register(a,r),[2,a]}})})},_e=function(e){return s(void 0,void 0,void 0,function(){var n,r,a;return c(this,function(o){switch(o.label){case 0:return n=new Promise(function(n){return t.RuntimeLoader.getInstance(function(t){t.decodeFont(e,n)})}),[4,n];case 1:return r=o.sent(),a=new i.FontWrapper(r),i.finalizationRegistry.register(a,r),[2,a]}})})}})(),r})())}));function xo(e,t){return L()?(R(e,t),!0):!1}function So(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}function Co(e,t={}){let n,r,i=No,a=No,o=we(!1),s=e=>{clearTimeout(e),i(),i=No},c;return Object.assign(l=>{let u=Te(e),d=Te(t.maxWait);return n&&s(n),u<=0||d!==void 0&&d<=0?(r&&=(s(r),void 0),o.value=!1,Promise.resolve(l())):(o.value=!0,new Promise((e,f)=>{i=t.rejectOnCancel?f:e,a=e,c=l,d&&!r&&(r=setTimeout(()=>{n&&s(n),r=void 0,o.value=!1,e(c())},d)),n=setTimeout(()=>{r&&s(r),r=void 0,o.value=!1,e(l())},u)}))},{cancel:()=>{n&&=(s(n),void 0),r&&=(s(r),void 0),o.value=!1,a=No},flush:()=>
10{if(o.value){n&&=(clearTimeout(n),void 0),r&&=(clearTimeout(r),void 0),o.value=!1;let e=a;i=No,a=No,e(c())}},isPending:Ce(o)})}function wo(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function To(e){return Array.isArray(e)?e:[e]}function Eo(e,t=200,n={}){return So(Co(t,n),e)}function Do(e,t,n){return ke(e,t,{...n,immediate:!0})}var Oo,ko,Ao,jo,Mo,No,Po=r((()=>{Oo=new WeakMap,ko=(...e)=>{let t=e[0],n=I()?.proxy??L();if(n==null&&!me())throw Error(`injectLocal must be called in setup`);return n&&Oo.has(n)&&t in Oo.get(n)?Oo.get(n)[t]:he(...e)},Ao=typeof window<`u`&&typeof document<`u`,typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope,jo=Object.prototype.toString,Mo=e=>jo.call(e)===`[object Object]`,No=()=>{}}));function Fo(e){let t=Te(e);return t?.$el??t}function Io(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=P(()=>{let t=To(Te(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return Do(()=>[n.value?.map(e=>Fo(e))??[Wo].filter(e=>e!=null),To(Te(n.value?e[1]:e[0])),To(Ee(n.value?e[2]:e[1])),Te(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=Mo(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function Lo(){let e=we(!1),t=I();return t&&ye(()=>{e.value=!0},t),e}function Ro(e){let t=Lo();return P(()=>(t.value,!!e()))}function zo(){let e=me()?ko(Go,null):null;return typeof e==`number`?e:void 0}function Bo(e,t={}){let{window:n=Wo,ssrWidth:r=zo()}=t,i=Ro(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),a=we(typeof r==`number`),o=we(),s=we(!1);return V(()=>{if(a.value){a.value=!i.value;let t=Te(e).split(`,`);s.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=wo(n[1])),i&&a&&(a=r<=wo(i[1])),t?!a:a});return}i.value&&(o.value=n.matchMedia(Te(e)),s.value=o.value.matches)}),Io(o,`change`,e=>{s.value=e.matches},{passive:!0}),P(()=>s.value)}function Vo(e,t,n={}){let{window:r=Wo,...i}=n,a,o=Ro(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=ke(P(()=>{let t=Te(e);return Array.isArray(t)?t.map(e=>Fo(e)):[Fo(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return xo(l),{isSupported:o,stop:l}}function Ho(e){function t(t){let n=Ko.get(e)||new Set;n.add(t),Ko.set(e,n);let i=()=>r(t);return xo(i),i}function n(e){function n(...t){r(n),e(...t)}return t(n)}function r(t){let n=Ko.get(e);n&&(n.delete(t),n.size||i())}function i(){Ko.delete(e)}function a(t,n){var r;(r=Ko.get(e))==null||r.forEach(e=>e(t,n))}return{on:t,once:n,off:r,emit:a,reset:i}}function Uo(e){let t=Bo(`(prefers-reduced-motion: reduce)`,e);return P(()=>t.value?`reduce`:`no-preference`)}var Wo,Go,Ko,qo=r((()=>{Po(),Po(),Wo=Ao?window:void 0,Ao&&window.document,Ao&&window.navigator,Ao&&window.location,Go=Symbol(`vueuse-ssr-width`),Ko=new Map}));function Jo(e){return e.clientWidth<2||e.clientHeight<2}function Yo(e){let t=e.prototype;if(t[Xo])return;let n=t.draw;t.draw=function(e,t){let r=this.canvas;if(r instanceof HTMLCanvasElement&&Jo(r)){this.stopRendering();return}if(this.activeArtboard===``){this.stopRendering();return}try{return n.call(this,e,t)}catch{this.stopRendering();return}},t[Xo]=!0}var Xo,Zo=r((()=>{Xo=Symbol.for(`chesscom.rive.tinyCanvasDrawGuard`)})),Qo,$o,es,ts=r((()=>{Qo=bo(),qo(),ft(),W(),Ct(),Zo(),Dt(),zt(),$o=10,es=F({__name:`raw-rive-animation`,props:{fit:{default:`Contain`},alignment:{default:`CenterLeft`},layoutScaleFactor:{},riveFile:{},autoplay:{type:Boolean,default:!1},artboard:{},stateMachines:{default:`sm-main`},controls:{},initialBindings:{},height:{default:`100%`},width:{default:`100%`},respectReducedMotion:{type:Boolean,default:!1}},emits:[`statechange`,`loop`,`play`,`pause`,`load`,`advance`,`stop`],setup(e,{emit:t}){De(e=>({v75767f10:e.height,v17b65055:e.width})),Yo(Qo.Rive);let n=e,r=t,i=Uo(),a=P(()=>n.respectReducedMotion&&i.value===`reduce`);ke(()=>[n.autoplay,n.stateMachines,n.riveFile],()=>ie()),ke(()=>({fit:n.fit,alignment:n.alignment,layoutScaleFactor:n.layoutScaleFactor}),e=>D(e));let o=Oe(`canvas`),s=we(null),c=xe(!1),l=e=>{e.preventDefault(),ie()},u=we(void 0),d=(e,t=$o)=>
10{if(!e)return;let n=s.value?.viewModelInstance;if(!n){if(t<=0){u.value=void 0;return}u.value=e,requestAnimationFrame(()=>{u.value===e&&d(e,t-1)});return}u.value=void 0,f(n,e)},f=(e,t)=>{let[n,r,...i]=t;switch(n){case`boolean`:{let t=e.boolean(r);if(!t)break;t.value=i[0];break}case`string`:{let t=e.string(r);if(!t)break;t.value=i[0];break}case`enum`:{let t=e.enum(r);if(!t)break;t.value=i[0];break}case`number`:{let t=e.number(r);if(!t)break;t.value=i[0];break}case`color`:{let t=e.color(r);if(!t)break;t.value=i[0];break}case`rgb`:{let t=e.color(r);if(!t)break;t.rgb(i[0],i[1],i[2]);break}case`rgba`:{let t=e.color(r);if(!t)break;t.rgba(i[0],i[1],i[2],i[3]);break}case`opacity`:{let t=e.color(r);if(!t)break;t.opacity(i[0]);break}case`trigger`:{let t=e.trigger(r);if(!t)break;t.trigger();break}case`image`:m(r,i[0]);break;default:break}},p=new Map,m=async(e,t)=>{let n=(p.get(e)??0)+1;p.set(e,n);let r=await(0,Qo.decodeImage)(t),i=s.value?.viewModelInstance,a=p.get(e)===n?i?.image(e):void 0;a&&(a.value=r),r.unref()},h=Et({getViewModelInstance:()=>s.value?.viewModelInstance,maxRetries:$o}),g=e=>{if(!e)return;let[,t,...n]=e,r=n[0];typeof r==`function`&&h.subscribe(t,r)},_=!1,v=()=>{let e=s.value,t=n.initialBindings;if(!e||!t?.length)return;let r=e.defaultViewModel()?.defaultInstance();r&&(t.forEach(e=>f(r,e)),e.bindViewModelInstance(r)),n.autoplay&&!_&&e.play()},y=e=>{!s.value||!o.value||e.type!==Qo.EventType.Load||(Jo(o.value)?(_=!0,s.value.stopRendering()):(_=!1,D(n)),v(),h.attach(),r(`load`))},b=()=>{ne()},x=(e,t)=>{if(e===`binding`){d(t);return}if(e===`subscribe`){g(t);return}if(s.value)switch(e){case`play`:if(!s.value.isPlaying){let e=t?.[1];s.value.play(e)}break;case`pause`:s.value.isPlaying&&s.value.pause();break;case`stop`:s.value.isPlaying&&s.value.stop();break;default:break}},S=e=>{!s.value||e.type!==Qo.EventType.StateChange||r(`statechange`,e)},C=e=>{!s.value||e.type!==Qo.EventType.Loop||s.value.isPlaying&&r(`loop`)},w=e=>{!s.value||e.type!==Qo.EventType.Pause||s.value.isPlaying||r(`pause`)},T=e=>{!s.value||e.type!==Qo.EventType.Play||s.value.isPlaying&&r(`play`)},ee=e=>{!s.value||e.type!==Qo.EventType.Advance||s.value.isPlaying&&r(`advance`,e)},E=e=>{!s.value||e.type!==Qo.EventType.Stop||s.value.isPlaying||r(`stop`)},D=({fit:e,alignment:t,layoutScaleFactor:n})=>{let r=s.value;if(!(!r||!r.activeArtboard||!o.value||!e||!t)){if(Jo(o.value)){r.stopRendering();return}r.layout=new Qo.Layout({fit:Qo.Fit[e],alignment:Qo.Alignment[t],layoutScaleFactor:n}),r.resizeDrawingSurfaceToCanvas(),r.startRendering(),c.value=!0}},O=P(()=>!s.value||!o.value||!n.riveFile),te=()=>{if(!o.value||!n.riveFile||a.value)return;let e=St(xt(n.riveFile,n.artboard),n.stateMachines),t=!!n.initialBindings?.length;s.value=new Qo.Rive({riveFile:n.riveFile,canvas:o.value,autoplay:!t&&n.autoplay,stateMachines:e,layout:new Qo.Layout({fit:Qo.Fit[n.fit],alignment:Qo.Alignment[n.alignment],layoutScaleFactor:n.layoutScaleFactor}),autoBind:!t,artboard:n.artboard,useOffscreenRenderer:dt(),onLoad:y,onLoadError:b,onStateChange:S,onLoop:C,onPause:w,onPlay:T,onAdvance:ee,onStop:E}),Rt()&&(o.value.riveInstance=s.value)},ne=()=>{if(_=!1,c.value=!1,s.value){let e=s.value;s.value=null,bt(e)}h.detach(),o.value&&Reflect.deleteProperty(o.value,`riveInstance`)},re=0,ie=()=>{ne();let e=++re;yt(()=>{e===re&&te()})},ae=()=>{let e=o.value;if(e){if(Jo(e)){s.value?.stopRendering();return}if(_){ie();return}D(n)}},oe=Eo(ae,50);return Vo(o,()=>{if(!c.value){ae();return}oe()}),Io(o,`webglcontextlost`,l),Io(o,`contextlost`,l),ye(()=>{n.controls&&n.controls.on(x),te()}),ve(()=>{n.controls&&n.controls.off(x),re+=1,ne()}),(e,t)=>(z(),de(N,null,[O.value?Se(e.$slots,`default`,{},void 0,void 0,0):ue(``,!0),t[0]||=fe(),a.value?ue(``,!0):(z(),de(`canvas`,ge({key:1},e.$attrs,{ref_key:`canvas`,ref:o,class:[`rive-animation-canvas`,[e.$style.canvas,e.$style.size,{[e.$style.hidden]:!c.value}]]}),null,16))],64))}})})),ns,rs,is=r((()=>{ts(),ts(),vt(),Fe(),ns={$style:_t},rs=Pe(es,[[`__cssModules`,ns]])})),as,os=r((()=>{is(),as=F({__name:`rive-animation`,props:{hints:{},autoplay:{type:Boolean,default:!1},artboard:{},stateMachines:{},controls:{},initialBindings:{},height:{default:`100%`},width:{default:`100%`},fit:{default:`Contain`},alignment:{default:`CenterLeft`},layoutScaleFactor:{},respectReducedMotion:{type:Boolean,default:!1}},emits:[`statechange`,`loop`,`play`,`pause`,`load`,`advance`,`stop`],setup(e){let t=e,n=P(()=>t.artboard),r=P(()=>t.stateMachines);return(t,i)=>(z(),le(rs,{"rive-file":e.hints.riveFile,autoplay:e.autoplay,artboard:n.value,"state-machines":r.value,controls:e.controls,"initial-bindings":e.initialBindings,height:e.height,width:e.width,fit:e.fit,alignment:e.alignment,"layout-scale-factor":e.layoutScaleFactor,"respect-reduced-motion":e.respectReducedMotion,onStatechange:i[0]||=e=>t.$emit(`statechange`,e),onLoop:i[1]||=e=>t.$emit(`loop`),onPlay:i[2]||=e=>t.$emit(`play`),onPause:i[3]||=e=>t.$emit(`pause`),onLoad:i[4]||=e=>t.$emit(`load`),onAdvance:i[5]||=e=>t.$emit(`advance`,e),onStop:i[6]||=e=>t.$emit(`stop`)},{default:Ae(()=>[Se(t.$slots,`default`)]),_:3}
vendor: 22,848 bytes, line 10
10,8,[`rive-file`,`autoplay`,`artboard`,`state-machines`,`controls`,`initial-bindings`,`height`,`width`,`fit`,`alignment`,`layout-scale-factor`,`respect-reduced-motion`]))}})})),ss,cs=r((()=>{os(),os(),ss=as})),ls=a((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f;for(f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),us=a((e=>{var t=ls(),n=ut(),r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=s,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return d(e)}return c(e,t,n)}s.poolSize=8192;function c(e,t,n){if(typeof e==`string`)return f(e,t);if(ArrayBuffer.isView(e))return m(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(R(e,ArrayBuffer)||e&&R(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(R(e,SharedArrayBuffer)||e&&R(e.buffer,SharedArrayBuffer)))return h(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return s.from(r,t,n);let i=g(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return s.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function u(e,t,n){return l(e),e<=0||t===void 0?o(e):typeof n==`string`?o(e).fill(t,n):o(e).fill(t)}s.alloc=function(e,t,n){return u(e,t,n)};function d(e){return l(e),o(e<0?0:_(e)|0)}s.allocUnsafe=function(e){return d(e)},s.allocUnsafeSlow=function(e){return d(e)};function f(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!s.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=y(e,t)|0,r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function p(e){let t=e.length<0?0:_(e.length)|0,n=o(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function m(e){if(R(e,Uint8Array)){let t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}function h(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,s.prototype),r}function g(e){if(s.isBuffer(e)){let t=_(e.length)|0,n=o(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||be(e.length)?o(0):p(e);if(e.type===`Buffer`&&Array.isArray(e.data))return p(e.data)}function _(e){if(e>=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function v(e){return+e!=e&&(e=0),s.alloc(+e)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(R(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),R(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return s.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(R(t,Uint8Array))i+t.length>r.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(s.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||R(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return he(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return ve(e).length;default:if(i)return r?-1:he(e).length;t=(``+t).toLowerCase(),i=!0}}s.byteLength=y;function b(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return oe(this,t,n);case`utf8`:case`utf-8`:return te(this,t,n);case`ascii`:return ie(this,t,n);case`latin1`:case`binary`:return ae(this,t,n);case`base64`:return O(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return se(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}s.prototype._isBuffer=!0;function x(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)x(this,t,t+1);return this},s.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},s.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},s.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?te(this,0,e):b.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||s.compare(this,e)===0},s.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(R(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,c=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<c;++e)if(l[e]!==u[e]){a=l[e],o=u[e];break}return a<o?-1:+(o<a)};function S(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,be(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0)if(i)n=0;else return-1;if(typeof t==`string`&&(t=s.from(t,r)),s.isBuffer(t))return t.length===0?-1:C(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function C(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}s.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},s.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)};function w(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o;for(o=0;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(be(r))return o;e[n+o]=r}return o}function T(e,t,n,r){return ye(he(t,e.length-n),e,n,r)}function ee(e,t,n,r){return ye(ge(t),e,n,r)}function E(e,t,n,r){return ye(ve(t),e,n,r)}function D(e,t,n,r){return ye(_e(t,e.length-n),e,n,r)}s.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return w(this,e,t,n);case`utf8`:case`utf-8`:return T(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return ee(this,e,t,n);case`base64`:return E(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return D(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function O(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function te(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return re(r)}var ne=4096;function re(e){let t=e.length;if(t<=ne)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ne));return n}function ie(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function ae(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function oe(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=z[e[r]];return i}function se(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}s.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r};function k(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=B(function(e){e>>>=0,F(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&I(e,this.length-8);let r=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=B(function(e){e>>>=0,F(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&I(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=B(function(e){e>>>=0,F(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&I(e,this.length-8);let r=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),s.prototype.readBigInt64BE=B(function(e){e>>>=0,F(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&I(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),n.read(this,e,!1,52,8)};function A(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;A(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;A(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function j(e,t,n,r,i){pe(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function M(e,t,n,r,i){pe(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}s.prototype.writeBigUInt64LE=B(function(e,t=0){return j(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),s.prototype.writeBigUInt64BE=B(function(e,t=0){return M(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);A(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);A(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeBigInt64LE=B(function(e,t=0){return j(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),s.prototype.writeBigInt64BE=B(function(e,t=0){return M(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function N(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function P(e,t,r,i,a){return t=+t,r>>>=0,a||N(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}s.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)};function ce(e,t,r,i,a){return t=+t,r>>>=0,a||N(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}s.prototype.writeDoubleLE=function(e,t,n){return ce(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return ce(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!s.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=s.isBuffer(e)?e:s.from(e,r),o=a.length;
10if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};var le={};function ue(e,t,n){le[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}ue(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),ue(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),ue(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=de(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=de(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function de(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function fe(e,t,n){F(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&I(t,e.length-(n+1))}function pe(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new le.ERR_OUT_OF_RANGE(`value`,i,e)}fe(r,i,a)}function F(e,t){if(typeof e!=`number`)throw new le.ERR_INVALID_ARG_TYPE(t,`number`,e)}function I(e,t,n){throw Math.floor(e)===e?t<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(F(e,n),new le.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}var L=/[^+/0-9A-Za-z-_]/g;function me(e){if(e=e.split(`=`)[0],e=e.trim().replace(L,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function he(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function ge(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function _e(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function ve(e){return t.toByteArray(me(e))}function ye(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function R(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function be(e){return e!==e}var z=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function B(e){return typeof BigInt>`u`?xe:e}function xe(){throw Error(`BigInt not supported`)}}));async function ds(e){let t=await e;if(fs.Buffer.isBuffer(t))return t;if(typeof t==`string`){let e=await fetch(t);return e.ok?fs.Buffer.from(await e.arrayBuffer()):void 0}if(t instanceof ArrayBuffer)return fs.Buffer.from(t);if(typeof t==`object`&&`type`in t&&t.type===`Buffer`&&`data`in t&&Array.isArray(t.data))return fs.Buffer.from(t.data);if(typeof t==`object`&&`arrayBuffer`in t&&typeof t.arrayBuffer==`function`)return fs.Buffer.from(await t.arrayBuffer())}var fs,ps=r((()=>{fs=us()})),ms,hs,gs,_s=r((()=>{ms=bo(),hs=us(),ps(),Tt(),Aa(),gs=F({__name:`raw-rive-file`,props:{src:{}},emits:[`load`,`error`],setup(e,{emit:t}){typeof window<`u`&&!window.Buffer&&(window.Buffer=hs.Buffer);let n=e,r=t,i=we(),a=e=>{let t;t=e instanceof Error?e:e.type===ms.EventType.LoadError?Error(e.data?.toString()??`RiveFile load error`):Error(`RiveFile load error`),window.chesscom.features.includes(`web_rive_error_reporting`)&&ka(t,{extra:{component:`raw-rive-file`,srcType:typeof n.src,srcLength:typeof n.src==`string`?n.src.length??-1:-1}}),r(`error`,t)},o=()=>{},s=xe(o),c=Symbol(`non-string-src`),l=()=>{let{src:e}=n;return e?typeof e==`string`?e:c:null},u=async(e,t)=>{try{let n=await ds(e);if(l()!==t)return;let c=new ms.RiveFile({buffer:wt(n)??void 0,onLoad:e=>{e.type!==ms.EventType.Load||!(e.data instanceof ms.RiveFile)||l()===t&&(i.value=e.data,r(`load`,e.data))},onLoadError:a});s.value=()=>{c.cleanup(),i.value=void 0},c.cleanup=o,await c.init()}catch(e){let t=e instanceof Error?e:Error(`raw-rive-file: load: Unknown error`);a(t)}},d=()=>
10{s.value(),s.value=o,i.value=void 0};return ye(()=>{let{src:e}=n;e&&u(e,l())}),ke(l,e=>{let{src:t}=n;t?u(t,e):d()}),be(()=>{d()}),(e,t)=>Se(e.$slots,`default`)}})})),vs,ys=r((()=>{_s(),_s(),vs=gs})),bs,xs=r((()=>{ys(),bs=F({__name:`rive-file`,props:{src:{}},emits:[`load`,`error`],setup(e,{emit:t}){let n=t,r=we(),i=e=>{r.value=e,n(`load`,e)},a=e=>{n(`error`,e)};return(t,n)=>(z(),le(vs,{src:e.src,onLoad:i,onError:a},{default:Ae(()=>[Se(t.$slots,`default`,{riveFile:r.value})]),_:3},8,[`src`]))}})})),Ss,Cs=r((()=>{xs(),xs(),Ss=bs})),ws,Ts=r((()=>{qo(),ws=()=>{let e=Ho(Symbol(`rive-controls`));return ve(()=>{e.reset()}),{controls:e,binding:{setColor:(t,n)=>{e.emit(`binding`,[`color`,t,n])},setRgb:(t,n,r,i)=>{e.emit(`binding`,[`rgb`,t,n,r,i])},setRgba:(t,n,r,i,a)=>{e.emit(`binding`,[`rgba`,t,n,r,i,a])},setOpacity:(t,n)=>{e.emit(`binding`,[`opacity`,t,n])},setBoolean:(t,n)=>{e.emit(`binding`,[`boolean`,t,n])},setString:(t,n)=>{e.emit(`binding`,[`string`,t,n])},setEnum:(t,n)=>{e.emit(`binding`,[`enum`,t,n])},setNumber:(t,n)=>{e.emit(`binding`,[`number`,t,n])},trigger:t=>{e.emit(`binding`,[`trigger`,t])},setImage:(t,n)=>{e.emit(`binding`,[`image`,t,n])}},onTrigger:(t,n)=>{e.emit(`subscribe`,[`trigger`,t,n])},play:t=>{t?e.emit(`play`,[`string`,t]):e.emit(`play`)},pause:()=>{e.emit(`pause`)},stop:()=>{e.emit(`stop`)}}}})),Es,Ds=r((()=>{cs(),Cs(),Ts(),G(),Es=F({__name:`rive-animation`,props:{fields:{},riveSrc:{}},setup(e){let t=ws(),n=xe(!1),r=e,i=cn(r.riveSrc),a=()=>{n.value=!0,setTimeout(()=>{o(),t.play()},100)},o=()=>{if(!(!t.binding||!n.value))for(let e of r.fields){let{key:n,value:r}=e;if(typeof r==`string`)try{t.binding.setString(n,r)}catch{}else if(typeof r==`boolean`)try{t.binding.setBoolean(n,r)}catch{}else if(typeof r==`number`)try{t.binding.setNumber(n,r)}catch{}}};return(e,n)=>(z(),le(Ss,{src:Ee(i),class:_e(e.$style.dimensions)},{default:Ae(n=>[pe(ss,{hints:n,class:_e(e.$style.dimensions),autoplay:!0,controls:Ee(t).controls,"view-model":`vm-main`,fit:`Contain`,alignment:`Center`,"state-machines":`sm-main`,animations:`main`,onLoad:a},null,8,[`hints`,`class`,`controls`])]),_:1},8,[`src`,`class`]))}})})),Os,ks,As=r((()=>{Ds(),Ds(),dn(),Fe(),Os={$style:un},ks=Pe(Es,[[`__cssModules`,Os]])}));function js(){let e=document.getElementsByClassName(`landing-page-rive-animation`);if(e.length)for(let t of e){let e=`#${CSS.escape(t.id)}`;vo(ks,{fields:JSON.parse(t.getAttribute(`data-fields`)||`{}`),riveSrc:t.getAttribute(`data-rive-src`)||``}).mount(e)}}var Ms=r((()=>{yo(),As()}));function Ns(e,t){Rs(t,e);let n=Is(e.$unknown,t),[r,i,a]=Ls(t);for(let e of n)j(r,new p(e.data),i,e.wireType,{readUnknownFields:!0});return a()}function Ps(e,t){return t.extendee.typeName===e.$typeName&&!!e.$unknown?.find(e=>e.no===t.number)}function Fs(e,t){let n=e.proto.options;return n?Ps(n,t):!1}function Is(e,t){if(e===void 0)return[];if(t.fieldKind===`enum`||t.fieldKind===`scalar`){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.number)return[e[n]];return[]}return e.filter(e=>e.no===t.number)}function Ls(e,t){let n=e.typeName,r=Object.assign(Object.assign({},e),{kind:`field`,parent:e.extendee,localName:n}),i=Object.assign(Object.assign({},e.extendee),{fields:[r],members:[r],oneofs:[]}),a=M(i,t===void 0?void 0:{[n]:t});return[_(i,a),r,()=>{let t=a[n];if(t===void 0){let t=e.message;return f(t)?T(t.fields[0].scalar,t.fields[0].longAsString):M(t)}return t}]}function Rs(e,t){if(e.extendee.typeName!=t.$typeName)throw Error(`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}var zs=r((()=>{s(),k(),O(),C(),g(),w()})),Bs=r((()=>{})),Vs=r((()=>{})),Hs=r((()=>{g(),te(),x(),S(),Vs()}));function Us(e){return e?Object.assign(Object.assign({},cc),e):cc}function Ws(e,t,n){return Gs(_(e,t),Us(n))}function Gs(e,t){let n=Qs(e,t);if(n!==void 0)return n;let r={};for(let n of e.sortedFields){if(!e.isSet(n)){if(n.presence==oc)throw Error(`cannot encode field ${e.desc.typeName}.${n.name} to JSON: required field not set`);if(!t.alwaysEmitImplicit||n.presence!==sc)continue}let i=Ks(n,e.get(n),t);i!==void 0&&(r[Zs(n,t)]=i)}if(t.registry){let n=new Set;for(let i of e.getUnknown()??[]){if(n.has(i.no))continue;let a=t.registry.getExtensionFor(e.desc,i.no);if(!a)continue;let[o,s]=Ls(a,Ns(e.message,a)),c=Ks(s,o.get(s),t);c!==void 0&&(r[a.jsonName]=c)}}return r}function Ks(e,t,n){switch(e.fieldKind){case`scalar`:return Xs(e,t);case`message`:return Gs(t,n);case`enum`:return Ys(e.enum,t,n.enumAsInteger);case`list`:return Js(t,n);case`map`:return qs(t,n)}}function qs(e,t){let n=e.field(),r={};switch(n.mapKind){case`scalar`:for(let[t,i]of e)r[t]=Xs(n,i);break;case`message`:for(let[n,i]of e)r[n]=Gs(i,t);break;case`enum`:for(let[i,a]of e)r[i]=Ys(n.enum,a,t.enumAsInteger);break}return t.alwaysEmitImplicit||e.size>0?r:void 0}function Js(e,t){let n=e.field(),r=[];switch(n.listKind){case`scalar`:for(let t of e)r.push(Xs(n,t));break;case`enum`:for(let i of e)r.push(Ys(n.enum,i,t.enumAsInteger));break;case`message`:for(let n of e)r.push(Gs(n,t));break}return t.alwaysEmitImplicit||r.length>0?r:void 0}
10function Ys(e,t,n){if(typeof t!=`number`)throw Error(`cannot encode ${e} to JSON: expected number, got ${b(t)}`);return e.typeName==`google.protobuf.NullValue`?null:n?t:e.value[t]?.name??t}function Xs(e,t){switch(e.scalar){case h.INT32:case h.SFIXED32:case h.SINT32:case h.FIXED32:case h.UINT32:if(typeof t!=`number`)throw Error(`cannot encode ${e} to JSON: ${v(e,t)?.message}`);return t;case h.FLOAT:case h.DOUBLE:if(typeof t!=`number`)throw Error(`cannot encode ${e} to JSON: ${v(e,t)?.message}`);return isNaN(t)?`NaN`:t===1/0?`Infinity`:t===-1/0?`-Infinity`:t;case h.STRING:if(typeof t!=`string`)throw Error(`cannot encode ${e} to JSON: ${v(e,t)?.message}`);return t;case h.BOOL:if(typeof t!=`boolean`)throw Error(`cannot encode ${e} to JSON: ${v(e,t)?.message}`);return t;case h.UINT64:case h.FIXED64:case h.INT64:case h.SFIXED64:case h.SINT64:if(typeof t!=`bigint`&&typeof t!=`string`)throw Error(`cannot encode ${e} to JSON: ${v(e,t)?.message}`);return t.toString();case h.BYTES:if(t instanceof Uint8Array)return y(t);throw Error(`cannot encode ${e} to JSON: ${v(e,t)?.message}`)}}function Zs(e,t){return t.useProtoFieldName?e.name:e.jsonName}function Qs(e,t){if(e.desc.typeName.startsWith(`google.protobuf.`))switch(e.desc.typeName){case`google.protobuf.Any`:return $s(e.message,t);case`google.protobuf.Timestamp`:return ac(e.message);case`google.protobuf.Duration`:return ec(e.message);case`google.protobuf.FieldMask`:return tc(e.message);case`google.protobuf.Struct`:return nc(e.message);case`google.protobuf.Value`:return rc(e.message);case`google.protobuf.ListValue`:return ic(e.message);default:if(f(e.desc)){let t=e.desc.fields[0];return Xs(t,e.get(t))}return}}function $s(e,t){if(e.typeUrl===``)return{};let{registry:n}=t,r,i;if(n&&(r=ne(e,n),r&&(i=n.getMessage(r.$typeName))),!i||!r)throw Error(`cannot encode message ${e.$typeName} to JSON: "${e.typeUrl}" is not in the type registry`);let a=Gs(_(i,r),t);return(i.typeName.startsWith(`google.protobuf.`)||a===null||Array.isArray(a)||typeof a!=`object`)&&(a={value:a}),a[`@type`]=e.typeUrl,a}function ec(e){if(Number(e.seconds)>315576e6||Number(e.seconds)<-315576e6)throw Error(`cannot encode message ${e.$typeName} to JSON: value out of range`);let t=e.seconds.toString();if(e.nanos!==0){let n=Math.abs(e.nanos).toString();n=`0`.repeat(9-n.length)+n,n.substring(3)===`000000`?n=n.substring(0,3):n.substring(6)===`000`&&(n=n.substring(0,6)),t+=`.`+n,e.nanos<0&&Number(e.seconds)==0&&(t=`-`+t)}return t+`s`}function tc(e){return e.paths.map(t=>{if(t.match(/_[0-9]?_/g)||t.match(/[A-Z]/g))throw Error(`cannot encode message ${e.$typeName} to JSON: lowerCamelCase of path name "`+t+`" is irreversible`);return c(t)}).join(`,`)}function nc(e){let t={};for(let[n,r]of Object.entries(e.fields))t[n]=rc(r);return t}function rc(e){switch(e.kind.case){case`nullValue`:return null;case`numberValue`:if(!Number.isFinite(e.kind.value))throw Error(`${e.$typeName} cannot be NaN or Infinity`);return e.kind.value;case`boolValue`:return e.kind.value;case`stringValue`:return e.kind.value;case`structValue`:return nc(e.kind.value);case`listValue`:return ic(e.kind.value);default:throw Error(`${e.$typeName} must have a value`)}}function ic(e){return e.values.map(rc)}function ac(e){let t=Number(e.seconds)*1e3;if(t<Date.parse(`0001-01-01T00:00:00Z`)||t>Date.parse(`9999-12-31T23:59:59Z`))throw Error(`cannot encode message ${e.$typeName} to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);if(e.nanos<0)throw Error(`cannot encode message ${e.$typeName} to JSON: nanos must not be negative`);let n=`Z`;if(e.nanos>0){let t=(e.nanos+1e9).toString().substring(1);n=t.substring(3)===`000000`?`.`+t.substring(0,3)+`Z`:t.substring(6)===`000`?`.`+t.substring(0,6)+`Z`:`.`+t+`Z`}return new Date(t).toISOString().replace(`.000Z`,n)}var oc,sc,cc,lc=r((()=>{ae(),l(),O(),ie(),w(),Hs(),zs(),u(),oc=3,sc=2,cc={alwaysEmitImplicit:!1,enumAsInteger:!1,useProtoFieldName:!1}})),uc=r((()=>{})),dc=r((()=>{Ie(),m(),s(),o(),ae(),Bs(),E(),A(),lc(),uc(),zs(),d()}));function fc(e,t){if(!Fs(e,re)&&!Fs(e,ee))throw Error(`Packed message must contain event_definition or context_extension o
10ption, but such option was not found on the ${e.name}`);return Object.assign(Ws(e,M(e,t)),{"@type":`type.googleapis.com/${e.typeName}`})}var pc=r((()=>{dc(),D()}));function mc(){let e=localStorage.getItem(`user-activity-sdk-device-id`),t=gc(),n=t??oe();return e&&e!==t&&(n=e,hc(n)),!e&&!t&&hc(n),e||localStorage.setItem(`user-activity-sdk-device-id`,n),n}function hc(e){let t=JSON.stringify({deviceId:e});At(`me`,encodeURIComponent(t),365,String(window.context?.cookies?.domain||``))}function gc(){let e=jt(`me`);if(e)try{return JSON.parse(decodeURIComponent(e)).deviceId}catch{}}var _c=r((()=>{Nt(),se()}));function vc(){let{user:e}=window.context||{},t=e?.uuid,n=e&&!e.isGuest?e.id:void 0;return{userId:t,legacyUserId:n,deviceId:mc(),bucketingId:e&&n&&e.bucketingId?e.bucketingId:jt(`BUCKETING_ID_V2`)??void 0}}var yc=r((()=>{_c(),Nt()}));function bc(){if(window.chesscom?.userActivityService)return window.chesscom.userActivityService;let{userId:t,legacyUserId:n,bucketingId:r,deviceId:i}=vc(),a={applicationId:`APPLICATION_CHESSCOM`,cacheKey:pt,client:{build:window.context.commit,name:`WEB`,version:window.context.version},legacyUserId:n,deviceId:i,userId:t,bucketingId:r,clientVersion:Ot};return window.chesscom.userActivityService=xa(()=>e(()=>import(`./index.4c35b2b4.CsZiFi7e8c.chunk.js`),`./index.4c35b2b4.CsZiFi7e8c.chunk.js`).then(e=>(e.t(),e.n)).then(e=>e.createUserActivityClient(a)),[]),window.chesscom.userActivityService}var xc=r((()=>{mt(),yc(),kt(),Sa()}));async function Sc(e,t){(await bc()).sendEvent(e,t)}var Cc=r((()=>{xc()})),wc,Tc,Ec,Dc=r((()=>{pc(),Cc(),Sa(),wc=async(t,n,r,i,a,o,s)=>{let{PageBlockButtonClickedSchema:c}=await xa(async()=>{let{PageBlockButtonClickedSchema:t}=await e(()=>import(`./index.e9c3c5f6.B4_AUsy8_V.chunk.js`),`./index.e9c3c5f6.B4_AUsy8_V.chunk.js`).then(e=>(e.t(),e.n));return{PageBlockButtonClickedSchema:t}},[]);Sc(fc(c,{blockId:t,buttonId:n,interface:r,button:i,buttonType:a,positionIndex:o,url:s}))},Tc=async(t,n)=>{let{PageBlockImageClickedSchema:r}=await xa(async()=>{let{PageBlockImageClickedSchema:t}=await e(()=>import(`./index.e9c3c5f6.B4_AUsy8_V.chunk.js`),`./index.e9c3c5f6.B4_AUsy8_V.chunk.js`).then(e=>(e.t(),e.n));return{PageBlockImageClickedSchema:t}},[]);Sc(fc(r,{interface:t,url:n}))},Ec=async(t,n,r,i)=>{let{PageBlockInterfaceViewedSchema:a}=await xa(async()=>{let{PageBlockInterfaceViewedSchema:t}=await e(()=>import(`./index.e9c3c5f6.B4_AUsy8_V.chunk.js`),`./index.e9c3c5f6.B4_AUsy8_V.chunk.js`).then(e=>(e.t(),e.n));return{PageBlockInterfaceViewedSchema:t}},[]);Sc(fc(a,{blockId:t,interface:n,positionIndex:r,totalPositions:i}))}}));function Oc(e){if(e?.hasAttribute(`use-observer`)){let t=new IntersectionObserver(n=>{n.forEach(n=>{n.isIntersecting&&(Ec(kc(e),Ac(e),jc(e),Mc(e)),t.unobserve(n.target),t.disconnect())})},{threshold:.6});e.hasAttribute(`data-observed`)||(t.observe(e),e.setAttribute(`data-observed`,`true`))}}var kc,Ac,jc,Mc,Nc=r((()=>{Dc(),kc=e=>e.getAttribute(`data-block-id`),Ac=e=>{let t=e.getAttribute(`data-interface`);return parseInt(t,10)},jc=e=>{let t=e.getAttribute(`data-position-index`);return parseInt(t,10)},Mc=e=>{let t=e.getAttribute(`data-total-positions`);return parseInt(t,10)}}));function Pc(){Fc(),Ic(),Lc()}function Fc(){document.querySelectorAll(`.${fn.LANDING_PAGE_BLOCK}`).forEach(e=>{Oc(e)})}function Ic(){document.querySelectorAll(`.${fn.BUTTON_CLASS}`).forEach(e=>{e.addEventListener(`click`,()=>{let t=e.getAttribute(`data-button-id`),n=e.getAttribute(`data-block-id`),r=e.getAttribute(`data-key`),i=Number(e.getAttribute(`data-variant`)),a=Number(e.getAttribute(`data-interface`)),o=e.getAttribute(`data-url`),s=e.closest(`.${fn.LANDING_PAGE_BLOCK}`);s&&wc(n,t,a,r,i,Number(s.getAttribute(`data-position-index`)),o||void 0)})})}function Lc(){document.querySelectorAll(`.${fn.LANDING_PAGE_ASSET}`).forEach(e=>{e.addEventListener(`click`,()=>{let t=e.getAttribute(`data-interface`),n=e.getAttribute(`data-url`);Tc(Number(t),n??void 0)})})}var Rc=r((()=>{Dc(),pn(),Nc()}));function zc(){Pc(),js(),document.removeEventListener(`DOMContentLoaded`,zc)}r((()=>{Ms(),Rc(),document.addEventListener(`DOMContentLoaded`,zc)}))();
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.