@cesdk/cesdk-js 1.5.0-alpha.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/.browserslistrc +4 -4
  2. package/ThirdPartyLicenses.md +59 -256
  3. package/assets/core/cesdk.wasm +0 -0
  4. package/assets/extensions/ly.img.cesdk.fonts/fonts/imgly_font_kumar_one_outline.otf +0 -0
  5. package/assets/extensions/ly.img.cesdk.fonts/manifest.json +1 -1
  6. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/manifest.json +199 -0
  7. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/frame.png +0 -0
  8. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/halfcircle.png +0 -0
  9. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/organic1.png +0 -0
  10. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/organic2.png +0 -0
  11. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/organic3.png +0 -0
  12. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/organic4.png +0 -0
  13. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/organicdot1.png +0 -0
  14. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/organicdot2.png +0 -0
  15. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/quartercircle-outline.png +0 -0
  16. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/quartercircle.png +0 -0
  17. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/rectanglemask.png +0 -0
  18. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/roundmask.png +0 -0
  19. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/splash1.png +0 -0
  20. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/splash2.png +0 -0
  21. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/splash3.png +0 -0
  22. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/splash4.png +0 -0
  23. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/wiggle.png +0 -0
  24. package/assets/extensions/ly.img.cesdk.vectorpaths.abstract/thumbnails/ziczac.png +0 -0
  25. package/assets/i18n/de.json +77 -10
  26. package/assets/i18n/en.json +93 -26
  27. package/assets/ui/stylesheets/cesdk.css +39 -40
  28. package/cesdk-engine.umd.d.ts +1499 -41
  29. package/cesdk-engine.umd.js +1 -2
  30. package/cesdk.umd.js +1 -1
  31. package/index.d.ts +1804 -0
  32. package/index.html +0 -1
  33. package/package.json +2 -2
  34. package/BlockAPI.d.ts +0 -792
  35. package/EventAPI.d.ts +0 -19
  36. package/SceneAPI.d.ts +0 -52
  37. package/VariableAPI.d.ts +0 -27
  38. package/api.d.ts +0 -14
  39. package/assets/core/cesdk.js +0 -1
  40. package/assets/extensions/ch.post.fonts/README.md +0 -3
  41. package/assets/extensions/ch.post.fonts/fonts/imgly_font_intro_black.otf +0 -0
  42. package/assets/extensions/ch.post.fonts/fonts/imgly_font_intro_medium.otf +0 -0
  43. package/assets/extensions/ch.post.fonts/fonts/imgly_font_madelyn_regular.otf +0 -0
  44. package/assets/extensions/ch.post.fonts/fonts/imgly_font_mixa_extra_bold.otf +0 -0
  45. package/assets/extensions/ch.post.fonts/fonts/imgly_font_sensa_brush_fill.otf +0 -0
  46. package/assets/extensions/ch.post.fonts/manifest.json +0 -42
  47. package/assets/extensions/ch.post.fonts/preview.png +0 -0
  48. package/assets/extensions/ly.img.cesdk.fonts/fonts/imgly_font_kumar_one_outline.ttf +0 -0
  49. package/types.d.ts +0 -759
@@ -1,2 +1 @@
1
- /*! For license information please see cesdk-engine.umd.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CreativeEngine=t():e.CreativeEngine=t()}(self,(function(){return(()=>{var e,t={96212:function(e){e.exports=function(){"use strict";for(var e=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e<t?t:e>r?r:e},t={},r=0,n=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];r<n.length;r+=1){var o=n[r];t["[object "+o+"]"]=o.toLowerCase()}var i=function(e){return t[Object.prototype.toString.call(e)]||"object"},a=Math.PI,s={clip_rgb:function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var r=0;r<=3;r++)r<3?((t[r]<0||t[r]>255)&&(t._clipped=!0),t[r]=e(t[r],0,255)):3===r&&(t[r]=e(t[r],0,1));return t},limit:e,type:i,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==i(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==i(e[t])?e[t].toLowerCase():null},PI:a,TWOPI:2*a,PITHIRD:a/3,DEG2RAD:a/180,RAD2DEG:180/a},c={format:{},autodetect:[]},u=s.last,l=s.clip_rgb,d=s.type,f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if("object"===d(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var n=u(e),o=!1;if(!n){o=!0,c.sorted||(c.autodetect=c.autodetect.sort((function(e,t){return t.p-e.p})),c.sorted=!0);for(var i=0,a=c.autodetect;i<a.length;i+=1){var s=a[i];if(n=s.test.apply(s,e))break}}if(!c.format[n])throw new Error("unknown format: "+e);var f=c.format[n].apply(null,o?e:e.slice(0,-1));r._rgb=l(f),3===r._rgb.length&&r._rgb.push(1)};f.prototype.toString=function(){return"function"==d(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var p=f,g=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g.Color,[null].concat(e)))};g.Color=p,g.version="2.1.2";var h=g,m=s.unpack,v=Math.max,b=s.unpack,y=s.unpack,E=s.type;p.prototype.cmyk=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=m(e,"rgb"),n=r[0],o=r[1],i=r[2],a=1-v(n/=255,v(o/=255,i/=255)),s=a<1?1/(1-a):0;return[(1-n-a)*s,(1-o-a)*s,(1-i-a)*s,a]}(this._rgb)},h.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["cmyk"])))},c.format.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=b(e,"cmyk"))[0],n=e[1],o=e[2],i=e[3],a=e.length>4?e[4]:1;return 1===i?[0,0,0,a]:[r>=1?0:255*(1-r)*(1-i),n>=1?0:255*(1-n)*(1-i),o>=1?0:255*(1-o)*(1-i),a]},c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=y(e,"cmyk"),"array"===E(e)&&4===e.length)return"cmyk"}});var _=s.unpack,w=s.last,O=function(e){return Math.round(100*e)/100},T=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=_(e,"hsla"),n=w(e)||"lsa";return r[0]=O(r[0]||0),r[1]=O(100*r[1])+"%",r[2]=O(100*r[2])+"%","hsla"===n||r.length>3&&r[3]<1?(r[3]=r.length>3?r[3]:1,n="hsla"):r.length=3,n+"("+r.join(",")+")"},P=s.unpack,D=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=P(e,"rgba"))[0],n=e[1],o=e[2];r/=255,n/=255,o/=255;var i,a,s=Math.min(r,n,o),c=Math.max(r,n,o),u=(c+s)/2;return c===s?(i=0,a=Number.NaN):i=u<.5?(c-s)/(c+s):(c-s)/(2-c-s),r==c?a=(n-o)/(c-s):n==c?a=2+(o-r)/(c-s):o==c&&(a=4+(r-n)/(c-s)),(a*=60)<0&&(a+=360),e.length>3&&void 0!==e[3]?[a,i,u,e[3]]:[a,i,u]},x=s.unpack,k=s.last,R=Math.round,S=s.unpack,M=Math.round,A=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];var n,o,i,a=(t=S(t,"hsl"))[0],s=t[1],c=t[2];if(0===s)n=o=i=255*c;else{var u=[0,0,0],l=[0,0,0],d=c<.5?c*(1+s):c+s-c*s,f=2*c-d,p=a/360;u[0]=p+1/3,u[1]=p,u[2]=p-1/3;for(var g=0;g<3;g++)u[g]<0&&(u[g]+=1),u[g]>1&&(u[g]-=1),6*u[g]<1?l[g]=f+6*(d-f)*u[g]:2*u[g]<1?l[g]=d:3*u[g]<2?l[g]=f+(d-f)*(2/3-u[g])*6:l[g]=f;n=(e=[M(255*l[0]),M(255*l[1]),M(255*l[2])])[0],o=e[1],i=e[2]}return t.length>3?[n,o,i,t[3]]:[n,o,i,1]},F=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,L=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,C=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,j=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,I=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,N=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,U=Math.round,H=function(e){var t;if(e=e.toLowerCase().trim(),c.format.named)try{return c.format.named(e)}catch(e){}if(t=e.match(F)){for(var r=t.slice(1,4),n=0;n<3;n++)r[n]=+r[n];return r[3]=1,r}if(t=e.match(L)){for(var o=t.slice(1,5),i=0;i<4;i++)o[i]=+o[i];return o}if(t=e.match(C)){for(var a=t.slice(1,4),s=0;s<3;s++)a[s]=U(2.55*a[s]);return a[3]=1,a}if(t=e.match(j)){for(var u=t.slice(1,5),l=0;l<3;l++)u[l]=U(2.55*u[l]);return u[3]=+u[3],u}if(t=e.match(I)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var f=A(d);return f[3]=1,f}if(t=e.match(N)){var p=t.slice(1,4);p[1]*=.01,p[2]*=.01;var g=A(p);return g[3]=+t[4],g}};H.test=function(e){return F.test(e)||L.test(e)||C.test(e)||j.test(e)||I.test(e)||N.test(e)};var B=H,X=s.type;p.prototype.css=function(e){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=x(e,"rgba"),n=k(e)||"rgb";return"hsl"==n.substr(0,3)?T(D(r),n):(r[0]=R(r[0]),r[1]=R(r[1]),r[2]=R(r[2]),("rgba"===n||r.length>3&&r[3]<1)&&(r[3]=r.length>3?r[3]:1,n="rgba"),n+"("+r.slice(0,"rgb"===n?3:4).join(",")+")")}(this._rgb,e)},h.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["css"])))},c.format.css=B,c.autodetect.push({p:5,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===X(e)&&B.test(e))return"css"}});var Q=s.unpack;c.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Q(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r},h.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["gl"])))},p.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var Z=s.unpack,G=s.unpack,q=Math.floor,V=s.unpack,W=s.type;p.prototype.hcg=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=Z(e,"rgb"),o=n[0],i=n[1],a=n[2],s=Math.min(o,i,a),c=Math.max(o,i,a),u=c-s,l=100*u/255,d=s/(255-u)*100;return 0===u?r=Number.NaN:(o===c&&(r=(i-a)/u),i===c&&(r=2+(a-o)/u),a===c&&(r=4+(o-i)/u),(r*=60)<0&&(r+=360)),[r,l,d]}(this._rgb)},h.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hcg"])))},c.format.hcg=function(){for(var e,t,r,n,o,i,a=[],s=arguments.length;s--;)a[s]=arguments[s];var c,u,l,d=(a=G(a,"hcg"))[0],f=a[1],p=a[2];p*=255;var g=255*f;if(0===f)c=u=l=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var h=q(d/=60),m=d-h,v=p*(1-f),b=v+g*(1-m),y=v+g*m,E=v+g;switch(h){case 0:c=(e=[E,y,v])[0],u=e[1],l=e[2];break;case 1:c=(t=[b,E,v])[0],u=t[1],l=t[2];break;case 2:c=(r=[v,E,y])[0],u=r[1],l=r[2];break;case 3:c=(n=[v,b,E])[0],u=n[1],l=n[2];break;case 4:c=(o=[y,v,E])[0],u=o[1],l=o[2];break;case 5:c=(i=[E,v,b])[0],u=i[1],l=i[2]}}return[c,u,l,a.length>3?a[3]:1]},c.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=V(e,"hcg"),"array"===W(e)&&3===e.length)return"hcg"}});var z=s.unpack,Y=s.last,$=Math.round,K=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=z(e,"rgba"),n=r[0],o=r[1],i=r[2],a=r[3],s=Y(e)||"auto";void 0===a&&(a=1),"auto"===s&&(s=a<1?"rgba":"rgb");var c="000000"+((n=$(n))<<16|(o=$(o))<<8|(i=$(i))).toString(16);c=c.substr(c.length-6);var u="0"+$(255*a).toString(16);switch(u=u.substr(u.length-2),s.toLowerCase()){case"rgba":return"#"+c+u;case"argb":return"#"+u+c;default:return"#"+c}},J=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,ee=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,te=function(e){if(e.match(J)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(ee)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var r=parseInt(e,16);return[r>>24&255,r>>16&255,r>>8&255,Math.round((255&r)/255*100)/100]}throw new Error("unknown hex color: "+e)},re=s.type;p.prototype.hex=function(e){return K(this._rgb,e)},h.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hex"])))},c.format.hex=te,c.autodetect.push({p:4,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===re(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var ne=s.unpack,oe=s.TWOPI,ie=Math.min,ae=Math.sqrt,se=Math.acos,ce=s.unpack,ue=s.limit,le=s.TWOPI,de=s.PITHIRD,fe=Math.cos,pe=s.unpack,ge=s.type;p.prototype.hsi=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=ne(e,"rgb"),o=n[0],i=n[1],a=n[2],s=ie(o/=255,i/=255,a/=255),c=(o+i+a)/3,u=c>0?1-s/c:0;return 0===u?r=NaN:(r=(o-i+(o-a))/2,r/=ae((o-i)*(o-i)+(o-a)*(i-a)),r=se(r),a>i&&(r=oe-r),r/=oe),[360*r,u,c]}(this._rgb)},h.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsi"])))},c.format.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,o,i=(e=ce(e,"hsi"))[0],a=e[1],s=e[2];return isNaN(i)&&(i=0),isNaN(a)&&(a=0),i>360&&(i-=360),i<0&&(i+=360),(i/=360)<1/3?n=1-((o=(1-a)/3)+(r=(1+a*fe(le*i)/fe(de-le*i))/3)):i<2/3?o=1-((r=(1-a)/3)+(n=(1+a*fe(le*(i-=1/3))/fe(de-le*i))/3)):r=1-((n=(1-a)/3)+(o=(1+a*fe(le*(i-=2/3))/fe(de-le*i))/3)),[255*(r=ue(s*r*3)),255*(n=ue(s*n*3)),255*(o=ue(s*o*3)),e.length>3?e[3]:1]},c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=pe(e,"hsi"),"array"===ge(e)&&3===e.length)return"hsi"}});var he=s.unpack,me=s.type;p.prototype.hsl=function(){return D(this._rgb)},h.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsl"])))},c.format.hsl=A,c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=he(e,"hsl"),"array"===me(e)&&3===e.length)return"hsl"}});var ve=s.unpack,be=Math.min,ye=Math.max,Ee=s.unpack,_e=Math.floor,we=s.unpack,Oe=s.type;p.prototype.hsv=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,o,i=(e=ve(e,"rgb"))[0],a=e[1],s=e[2],c=be(i,a,s),u=ye(i,a,s),l=u-c;return o=u/255,0===u?(r=Number.NaN,n=0):(n=l/u,i===u&&(r=(a-s)/l),a===u&&(r=2+(s-i)/l),s===u&&(r=4+(i-a)/l),(r*=60)<0&&(r+=360)),[r,n,o]}(this._rgb)},h.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsv"])))},c.format.hsv=function(){for(var e,t,r,n,o,i,a=[],s=arguments.length;s--;)a[s]=arguments[s];var c,u,l,d=(a=Ee(a,"hsv"))[0],f=a[1],p=a[2];if(p*=255,0===f)c=u=l=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var g=_e(d/=60),h=d-g,m=p*(1-f),v=p*(1-f*h),b=p*(1-f*(1-h));switch(g){case 0:c=(e=[p,b,m])[0],u=e[1],l=e[2];break;case 1:c=(t=[v,p,m])[0],u=t[1],l=t[2];break;case 2:c=(r=[m,p,b])[0],u=r[1],l=r[2];break;case 3:c=(n=[m,v,p])[0],u=n[1],l=n[2];break;case 4:c=(o=[b,m,p])[0],u=o[1],l=o[2];break;case 5:c=(i=[p,m,v])[0],u=i[1],l=i[2]}}return[c,u,l,a.length>3?a[3]:1]},c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=we(e,"hsv"),"array"===Oe(e)&&3===e.length)return"hsv"}});var Te=18,Pe=.95047,De=1,xe=1.08883,ke=.137931034,Re=.206896552,Se=.12841855,Me=.008856452,Ae=s.unpack,Fe=Math.pow,Le=function(e){return(e/=255)<=.04045?e/12.92:Fe((e+.055)/1.055,2.4)},Ce=function(e){return e>Me?Fe(e,1/3):e/Se+ke},je=function(e,t,r){return e=Le(e),t=Le(t),r=Le(r),[Ce((.4124564*e+.3575761*t+.1804375*r)/Pe),Ce((.2126729*e+.7151522*t+.072175*r)/De),Ce((.0193339*e+.119192*t+.9503041*r)/xe)]},Ie=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Ae(e,"rgb"),n=r[0],o=r[1],i=r[2],a=je(n,o,i),s=a[0],c=a[1],u=116*c-16;return[u<0?0:u,500*(s-c),200*(c-a[2])]},Ne=s.unpack,Ue=Math.pow,He=function(e){return 255*(e<=.00304?12.92*e:1.055*Ue(e,1/2.4)-.055)},Be=function(e){return e>Re?e*e*e:Se*(e-ke)},Xe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,o,i=(e=Ne(e,"lab"))[0],a=e[1],s=e[2];return n=(i+16)/116,r=isNaN(a)?n:n+a/500,o=isNaN(s)?n:n-s/200,n=De*Be(n),r=Pe*Be(r),o=xe*Be(o),[He(3.2404542*r-1.5371385*n-.4985314*o),He(-.969266*r+1.8760108*n+.041556*o),He(.0556434*r-.2040259*n+1.0572252*o),e.length>3?e[3]:1]},Qe=s.unpack,Ze=s.type;p.prototype.lab=function(){return Ie(this._rgb)},h.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["lab"])))},c.format.lab=Xe,c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Qe(e,"lab"),"array"===Ze(e)&&3===e.length)return"lab"}});var Ge=s.unpack,qe=s.RAD2DEG,Ve=Math.sqrt,We=Math.atan2,ze=Math.round,Ye=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Ge(e,"lab"),n=r[0],o=r[1],i=r[2],a=Ve(o*o+i*i),s=(We(i,o)*qe+360)%360;return 0===ze(1e4*a)&&(s=Number.NaN),[n,a,s]},$e=s.unpack,Ke=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$e(e,"rgb"),n=r[0],o=r[1],i=r[2],a=Ie(n,o,i),s=a[0],c=a[1],u=a[2];return Ye(s,c,u)},Je=s.unpack,et=s.DEG2RAD,tt=Math.sin,rt=Math.cos,nt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Je(e,"lch"),n=r[0],o=r[1],i=r[2];return isNaN(i)&&(i=0),[n,rt(i*=et)*o,tt(i)*o]},ot=s.unpack,it=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=ot(e,"lch"))[0],n=e[1],o=e[2],i=nt(r,n,o),a=i[0],s=i[1],c=i[2],u=Xe(a,s,c);return[u[0],u[1],u[2],e.length>3?e[3]:1]},at=s.unpack,st=s.unpack,ct=s.type;p.prototype.lch=function(){return Ke(this._rgb)},p.prototype.hcl=function(){return Ke(this._rgb).reverse()},h.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["lch"])))},h.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hcl"])))},c.format.lch=it,c.format.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=at(e,"hcl").reverse();return it.apply(void 0,r)},["lch","hcl"].forEach((function(e){return c.autodetect.push({p:2,test:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(t=st(t,e),"array"===ct(t)&&3===t.length)return e}})}));var ut={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},lt=s.type;p.prototype.name=function(){for(var e=K(this._rgb,"rgb"),t=0,r=Object.keys(ut);t<r.length;t+=1){var n=r[t];if(ut[n]===e)return n.toLowerCase()}return e},c.format.named=function(e){if(e=e.toLowerCase(),ut[e])return te(ut[e]);throw new Error("unknown color name: "+e)},c.autodetect.push({p:5,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===lt(e)&&ut[e.toLowerCase()])return"named"}});var dt=s.unpack,ft=s.type,pt=s.type;p.prototype.num=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=dt(e,"rgb");return(r[0]<<16)+(r[1]<<8)+r[2]}(this._rgb)},h.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["num"])))},c.format.num=function(e){if("number"==ft(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},c.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===pt(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var gt=s.unpack,ht=s.type,mt=Math.round;p.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(mt)},p.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,r){return r<3?!1===e?t:mt(t):t}))},h.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["rgb"])))},c.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=gt(e,"rgba");return void 0===r[3]&&(r[3]=1),r},c.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=gt(e,"rgba"),"array"===ht(e)&&(3===e.length||4===e.length&&"number"==ht(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var vt=Math.log,bt=function(e){var t,r,n,o=e/100;return o<66?(t=255,r=-155.25485562709179-.44596950469579133*(r=o-2)+104.49216199393888*vt(r),n=o<20?0:.8274096064007395*(n=o-10)-254.76935184120902+115.67994401066147*vt(n)):(t=351.97690566805693+.114206453784165*(t=o-55)-40.25366309332127*vt(t),r=325.4494125711974+.07943456536662342*(r=o-50)-28.0852963507957*vt(r),n=255),[t,r,n,1]},yt=s.unpack,Et=Math.round;p.prototype.temp=p.prototype.kelvin=p.prototype.temperature=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r,n=yt(e,"rgb"),o=n[0],i=n[2],a=1e3,s=4e4,c=.4;s-a>c;){var u=bt(r=.5*(s+a));u[2]/u[0]>=i/o?s=r:a=r}return Et(r)}(this._rgb)},h.temp=h.kelvin=h.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["temp"])))},c.format.temp=c.format.kelvin=c.format.temperature=bt;var _t=s.type;p.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===_t(e)?t?(this._rgb[3]=e,this):new p([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},p.prototype.clipped=function(){return this._rgb._clipped||!1},p.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=Te*e,new p(t,"lab").alpha(this.alpha(),!0)},p.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},p.prototype.darker=p.prototype.darken,p.prototype.brighter=p.prototype.brighten,p.prototype.get=function(e){var t=e.split("."),r=t[0],n=t[1],o=this[r]();if(n){var i=r.indexOf(n);if(i>-1)return o[i];throw new Error("unknown channel "+n+" in mode "+r)}return o};var wt=s.type,Ot=Math.pow;p.prototype.luminance=function(e){if(void 0!==e&&"number"===wt(e)){if(0===e)return new p([0,0,0,this._rgb[3]],"rgb");if(1===e)return new p([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),r=20,n=function(t,o){var i=t.interpolate(o,.5,"rgb"),a=i.luminance();return Math.abs(e-a)<1e-7||!r--?i:a>e?n(t,i):n(i,o)},o=(t>e?n(new p([0,0,0]),this):n(this,new p([255,255,255]))).rgb();return new p(o.concat([this._rgb[3]]))}return Tt.apply(void 0,this._rgb.slice(0,3))};var Tt=function(e,t,r){return.2126*(e=Pt(e))+.7152*(t=Pt(t))+.0722*Pt(r)},Pt=function(e){return(e/=255)<=.03928?e/12.92:Ot((e+.055)/1.055,2.4)},Dt={},xt=s.type,kt=function(e,t,r){void 0===r&&(r=.5);for(var n=[],o=arguments.length-3;o-- >0;)n[o]=arguments[o+3];var i=n[0]||"lrgb";if(Dt[i]||n.length||(i=Object.keys(Dt)[0]),!Dt[i])throw new Error("interpolation mode "+i+" is not defined");return"object"!==xt(e)&&(e=new p(e)),"object"!==xt(t)&&(t=new p(t)),Dt[i](e,t,r).alpha(e.alpha()+r*(t.alpha()-e.alpha()))};p.prototype.mix=p.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return kt.apply(void 0,[this,e,t].concat(r))},p.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,r=t[3];return e?(this._rgb=[t[0]*r,t[1]*r,t[2]*r,r],this):new p([t[0]*r,t[1]*r,t[2]*r,r],"rgb")},p.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=Te*e,t[1]<0&&(t[1]=0),new p(t,"lch").alpha(this.alpha(),!0)},p.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Rt=s.type;p.prototype.set=function(e,t,r){void 0===r&&(r=!1);var n=e.split("."),o=n[0],i=n[1],a=this[o]();if(i){var s=o.indexOf(i);if(s>-1){if("string"==Rt(t))switch(t.charAt(0)){case"+":case"-":a[s]+=+t;break;case"*":a[s]*=+t.substr(1);break;case"/":a[s]/=+t.substr(1);break;default:a[s]=+t}else{if("number"!==Rt(t))throw new Error("unsupported value for Color.set");a[s]=t}var c=new p(a,o);return r?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+i+" in mode "+o)}return a};Dt.rgb=function(e,t,r){var n=e._rgb,o=t._rgb;return new p(n[0]+r*(o[0]-n[0]),n[1]+r*(o[1]-n[1]),n[2]+r*(o[2]-n[2]),"rgb")};var St=Math.sqrt,Mt=Math.pow;Dt.lrgb=function(e,t,r){var n=e._rgb,o=n[0],i=n[1],a=n[2],s=t._rgb,c=s[0],u=s[1],l=s[2];return new p(St(Mt(o,2)*(1-r)+Mt(c,2)*r),St(Mt(i,2)*(1-r)+Mt(u,2)*r),St(Mt(a,2)*(1-r)+Mt(l,2)*r),"rgb")};Dt.lab=function(e,t,r){var n=e.lab(),o=t.lab();return new p(n[0]+r*(o[0]-n[0]),n[1]+r*(o[1]-n[1]),n[2]+r*(o[2]-n[2]),"lab")};var At=function(e,t,r,n){var o,i,a,s,c,u,l,d,f,g,h,m;return"hsl"===n?(a=e.hsl(),s=t.hsl()):"hsv"===n?(a=e.hsv(),s=t.hsv()):"hcg"===n?(a=e.hcg(),s=t.hcg()):"hsi"===n?(a=e.hsi(),s=t.hsi()):"lch"!==n&&"hcl"!==n||(n="hcl",a=e.hcl(),s=t.hcl()),"h"===n.substr(0,1)&&(c=(o=a)[0],l=o[1],f=o[2],u=(i=s)[0],d=i[1],g=i[2]),isNaN(c)||isNaN(u)?isNaN(c)?isNaN(u)?m=Number.NaN:(m=u,1!=f&&0!=f||"hsv"==n||(h=d)):(m=c,1!=g&&0!=g||"hsv"==n||(h=l)):m=c+r*(u>c&&u-c>180?u-(c+360):u<c&&c-u>180?u+360-c:u-c),void 0===h&&(h=l+r*(d-l)),new p([m,h,f+r*(g-f)],n)},Ft=function(e,t,r){return At(e,t,r,"lch")};Dt.lch=Ft,Dt.hcl=Ft;Dt.num=function(e,t,r){var n=e.num(),o=t.num();return new p(n+r*(o-n),"num")};Dt.hcg=function(e,t,r){return At(e,t,r,"hcg")};Dt.hsi=function(e,t,r){return At(e,t,r,"hsi")};Dt.hsl=function(e,t,r){return At(e,t,r,"hsl")};Dt.hsv=function(e,t,r){return At(e,t,r,"hsv")};var Lt=s.clip_rgb,Ct=Math.pow,jt=Math.sqrt,It=Math.PI,Nt=Math.cos,Ut=Math.sin,Ht=Math.atan2,Bt=function(e,t){for(var r=e.length,n=[0,0,0,0],o=0;o<e.length;o++){var i=e[o],a=t[o]/r,s=i._rgb;n[0]+=Ct(s[0],2)*a,n[1]+=Ct(s[1],2)*a,n[2]+=Ct(s[2],2)*a,n[3]+=s[3]*a}return n[0]=jt(n[0]),n[1]=jt(n[1]),n[2]=jt(n[2]),n[3]>.9999999&&(n[3]=1),new p(Lt(n))},Xt=s.type,Qt=Math.pow,Zt=function(e){var t="rgb",r=h("#ccc"),n=0,o=[0,1],i=[],a=[0,0],s=!1,c=[],u=!1,l=0,d=1,f=!1,p={},g=!0,m=1,v=function(e){if((e=e||["#fff","#000"])&&"string"===Xt(e)&&h.brewer&&h.brewer[e.toLowerCase()]&&(e=h.brewer[e.toLowerCase()]),"array"===Xt(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t<e.length;t++)e[t]=h(e[t]);i.length=0;for(var r=0;r<e.length;r++)i.push(r/(e.length-1))}return _(),c=e},b=function(e){return e},y=function(e){return e},E=function(e,n){var o,u;if(null==n&&(n=!1),isNaN(e)||null===e)return r;u=n?e:s&&s.length>2?function(e){if(null!=s){for(var t=s.length-1,r=0;r<t&&e>=s[r];)r++;return r-1}return 0}(e)/(s.length-2):d!==l?(e-l)/(d-l):1,u=y(u),n||(u=b(u)),1!==m&&(u=Qt(u,m)),u=a[0]+u*(1-a[0]-a[1]),u=Math.min(1,Math.max(0,u));var f=Math.floor(1e4*u);if(g&&p[f])o=p[f];else{if("array"===Xt(c))for(var v=0;v<i.length;v++){var E=i[v];if(u<=E){o=c[v];break}if(u>=E&&v===i.length-1){o=c[v];break}if(u>E&&u<i[v+1]){u=(u-E)/(i[v+1]-E),o=h.interpolate(c[v],c[v+1],u,t);break}}else"function"===Xt(c)&&(o=c(u));g&&(p[f]=o)}return o},_=function(){return p={}};v(e);var w=function(e){var t=h(E(e));return u&&t[u]?t[u]():t};return w.classes=function(e){if(null!=e){if("array"===Xt(e))s=e,o=[e[0],e[e.length-1]];else{var t=h.analyze(o);s=0===e?[t.min,t.max]:h.limits(t,"e",e)}return w}return s},w.domain=function(e){if(!arguments.length)return o;l=e[0],d=e[e.length-1],i=[];var t=c.length;if(e.length===t&&l!==d)for(var r=0,n=Array.from(e);r<n.length;r+=1){var a=n[r];i.push((a-l)/(d-l))}else{for(var s=0;s<t;s++)i.push(s/(t-1));if(e.length>2){var u=e.map((function(t,r){return r/(e.length-1)})),f=e.map((function(e){return(e-l)/(d-l)}));f.every((function(e,t){return u[t]===e}))||(y=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=f[t+1];)t++;var r=(e-f[t])/(f[t+1]-f[t]);return u[t]+r*(u[t+1]-u[t])})}}return o=[l,d],w},w.mode=function(e){return arguments.length?(t=e,_(),w):t},w.range=function(e,t){return v(e),w},w.out=function(e){return u=e,w},w.spread=function(e){return arguments.length?(n=e,w):n},w.correctLightness=function(e){return null==e&&(e=!0),f=e,_(),b=f?function(e){for(var t=E(0,!0).lab()[0],r=E(1,!0).lab()[0],n=t>r,o=E(e,!0).lab()[0],i=t+(r-t)*e,a=o-i,s=0,c=1,u=20;Math.abs(a)>.01&&u-- >0;)n&&(a*=-1),a<0?(s=e,e+=.5*(c-e)):(c=e,e+=.5*(s-e)),a=(o=E(e,!0).lab()[0])-i;return e}:function(e){return e},w},w.padding=function(e){return null!=e?("number"===Xt(e)&&(e=[e,e]),a=e,w):a},w.colors=function(t,r){arguments.length<2&&(r="hex");var n=[];if(0===arguments.length)n=c.slice(0);else if(1===t)n=[w(.5)];else if(t>1){var i=o[0],a=o[1]-i;n=Gt(0,t,!1).map((function(e){return w(i+e/(t-1)*a)}))}else{e=[];var u=[];if(s&&s.length>2)for(var l=1,d=s.length,f=1<=d;f?l<d:l>d;f?l++:l--)u.push(.5*(s[l-1]+s[l]));else u=o;n=u.map((function(e){return w(e)}))}return h[r]&&(n=n.map((function(e){return e[r]()}))),n},w.cache=function(e){return null!=e?(g=e,w):g},w.gamma=function(e){return null!=e?(m=e,w):m},w.nodata=function(e){return null!=e?(r=h(e),w):r},w};function Gt(e,t,r){for(var n=[],o=e<t,i=r?o?t+1:t-1:t,a=e;o?a<i:a>i;o?a++:a--)n.push(a);return n}var qt=function(e){var t,r,n,o,i,a,s;if(2===(e=e.map((function(e){return new p(e)}))).length)t=e.map((function(e){return e.lab()})),i=t[0],a=t[1],o=function(e){var t=[0,1,2].map((function(t){return i[t]+e*(a[t]-i[t])}));return new p(t,"lab")};else if(3===e.length)r=e.map((function(e){return e.lab()})),i=r[0],a=r[1],s=r[2],o=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*i[t]+2*(1-e)*e*a[t]+e*e*s[t]}));return new p(t,"lab")};else if(4===e.length){var c;n=e.map((function(e){return e.lab()})),i=n[0],a=n[1],s=n[2],c=n[3],o=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*i[t]+3*(1-e)*(1-e)*e*a[t]+3*(1-e)*e*e*s[t]+e*e*e*c[t]}));return new p(t,"lab")}}else if(5===e.length){var u=qt(e.slice(0,3)),l=qt(e.slice(2,5));o=function(e){return e<.5?u(2*e):l(2*(e-.5))}}return o},Vt=function(e,t,r){if(!Vt[r])throw new Error("unknown blend mode "+r);return Vt[r](e,t)},Wt=function(e){return function(t,r){var n=h(r).rgb(),o=h(t).rgb();return h.rgb(e(n,o))}},zt=function(e){return function(t,r){var n=[];return n[0]=e(t[0],r[0]),n[1]=e(t[1],r[1]),n[2]=e(t[2],r[2]),n}};Vt.normal=Wt(zt((function(e){return e}))),Vt.multiply=Wt(zt((function(e,t){return e*t/255}))),Vt.screen=Wt(zt((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),Vt.overlay=Wt(zt((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),Vt.darken=Wt(zt((function(e,t){return e>t?t:e}))),Vt.lighten=Wt(zt((function(e,t){return e>t?e:t}))),Vt.dodge=Wt(zt((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),Vt.burn=Wt(zt((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var Yt=Vt,$t=s.type,Kt=s.clip_rgb,Jt=s.TWOPI,er=Math.pow,tr=Math.sin,rr=Math.cos,nr=Math.floor,or=Math.random,ir=Math.log,ar=Math.pow,sr=Math.floor,cr=Math.abs,ur=function(e,t){void 0===t&&(t=null);var r={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===i(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===i(e)&&(e=e[t]),null==e||isNaN(e)||(r.values.push(e),r.sum+=e,e<r.min&&(r.min=e),e>r.max&&(r.max=e),r.count+=1)})),r.domain=[r.min,r.max],r.limits=function(e,t){return lr(r,e,t)},r},lr=function(e,t,r){void 0===t&&(t="equal"),void 0===r&&(r=7),"array"==i(e)&&(e=ur(e));var n=e.min,o=e.max,a=e.values.sort((function(e,t){return e-t}));if(1===r)return[n,o];var s=[];if("c"===t.substr(0,1)&&(s.push(n),s.push(o)),"e"===t.substr(0,1)){s.push(n);for(var c=1;c<r;c++)s.push(n+c/r*(o-n));s.push(o)}else if("l"===t.substr(0,1)){if(n<=0)throw new Error("Logarithmic scales are only possible for values > 0");var u=Math.LOG10E*ir(n),l=Math.LOG10E*ir(o);s.push(n);for(var d=1;d<r;d++)s.push(ar(10,u+d/r*(l-u)));s.push(o)}else if("q"===t.substr(0,1)){s.push(n);for(var f=1;f<r;f++){var p=(a.length-1)*f/r,g=sr(p);if(g===p)s.push(a[g]);else{var h=p-g;s.push(a[g]*(1-h)+a[g+1]*h)}}s.push(o)}else if("k"===t.substr(0,1)){var m,v=a.length,b=new Array(v),y=new Array(r),E=!0,_=0,w=null;(w=[]).push(n);for(var O=1;O<r;O++)w.push(n+O/r*(o-n));for(w.push(o);E;){for(var T=0;T<r;T++)y[T]=0;for(var P=0;P<v;P++)for(var D=a[P],x=Number.MAX_VALUE,k=void 0,R=0;R<r;R++){var S=cr(w[R]-D);S<x&&(x=S,k=R),y[k]++,b[P]=k}for(var M=new Array(r),A=0;A<r;A++)M[A]=null;for(var F=0;F<v;F++)null===M[m=b[F]]?M[m]=a[F]:M[m]+=a[F];for(var L=0;L<r;L++)M[L]*=1/y[L];E=!1;for(var C=0;C<r;C++)if(M[C]!==w[C]){E=!0;break}w=M,++_>200&&(E=!1)}for(var j={},I=0;I<r;I++)j[I]=[];for(var N=0;N<v;N++)j[m=b[N]].push(a[N]);for(var U=[],H=0;H<r;H++)U.push(j[H][0]),U.push(j[H][j[H].length-1]);U=U.sort((function(e,t){return e-t})),s.push(U[0]);for(var B=1;B<U.length;B+=2){var X=U[B];isNaN(X)||-1!==s.indexOf(X)||s.push(X)}}return s},dr={analyze:ur,limits:lr},fr=Math.sqrt,pr=Math.atan2,gr=Math.abs,hr=Math.cos,mr=Math.PI,vr={cool:function(){return Zt([h.hsl(180,1,.9),h.hsl(250,.7,.4)])},hot:function(){return Zt(["#000","#f00","#ff0","#fff"]).mode("rgb")}},br={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},yr=0,Er=Object.keys(br);yr<Er.length;yr+=1){var _r=Er[yr];br[_r.toLowerCase()]=br[_r]}var wr=br;return h.average=function(e,t,r){void 0===t&&(t="lrgb"),void 0===r&&(r=null);var n=e.length;r||(r=Array.from(new Array(n)).map((function(){return 1})));var o=n/r.reduce((function(e,t){return e+t}));if(r.forEach((function(e,t){r[t]*=o})),e=e.map((function(e){return new p(e)})),"lrgb"===t)return Bt(e,r);for(var i=e.shift(),a=i.get(t),s=[],c=0,u=0,l=0;l<a.length;l++)if(a[l]=(a[l]||0)*r[0],s.push(isNaN(a[l])?0:r[0]),"h"===t.charAt(l)&&!isNaN(a[l])){var d=a[l]/180*It;c+=Nt(d)*r[0],u+=Ut(d)*r[0]}var f=i.alpha()*r[0];e.forEach((function(e,n){var o=e.get(t);f+=e.alpha()*r[n+1];for(var i=0;i<a.length;i++)if(!isNaN(o[i]))if(s[i]+=r[n+1],"h"===t.charAt(i)){var l=o[i]/180*It;c+=Nt(l)*r[n+1],u+=Ut(l)*r[n+1]}else a[i]+=o[i]*r[n+1]}));for(var g=0;g<a.length;g++)if("h"===t.charAt(g)){for(var h=Ht(u/s[g],c/s[g])/It*180;h<0;)h+=360;for(;h>=360;)h-=360;a[g]=h}else a[g]=a[g]/s[g];return f/=n,new p(a,t).alpha(f>.99999?1:f,!0)},h.bezier=function(e){var t=qt(e);return t.scale=function(){return Zt(t)},t},h.blend=Yt,h.cubehelix=function(e,t,r,n,o){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===r&&(r=1),void 0===n&&(n=1),void 0===o&&(o=[0,1]);var i,a=0;"array"===$t(o)?i=o[1]-o[0]:(i=0,o=[o,o]);var s=function(s){var c=Jt*((e+120)/360+t*s),u=er(o[0]+i*s,n),l=(0!==a?r[0]+s*a:r)*u*(1-u)/2,d=rr(c),f=tr(c);return h(Kt([255*(u+l*(-.14861*d+1.78277*f)),255*(u+l*(-.29227*d-.90649*f)),255*(u+l*(1.97294*d)),1]))};return s.start=function(t){return null==t?e:(e=t,s)},s.rotations=function(e){return null==e?t:(t=e,s)},s.gamma=function(e){return null==e?n:(n=e,s)},s.hue=function(e){return null==e?r:("array"===$t(r=e)?0==(a=r[1]-r[0])&&(r=r[1]):a=0,s)},s.lightness=function(e){return null==e?o:("array"===$t(e)?(o=e,i=e[1]-e[0]):(o=[e,e],i=0),s)},s.scale=function(){return h.scale(s)},s.hue(r),s},h.mix=h.interpolate=kt,h.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(nr(16*or()));return new p(e,"hex")},h.scale=Zt,h.analyze=dr.analyze,h.contrast=function(e,t){e=new p(e),t=new p(t);var r=e.luminance(),n=t.luminance();return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},h.deltaE=function(e,t,r,n){void 0===r&&(r=1),void 0===n&&(n=1),e=new p(e),t=new p(t);for(var o=Array.from(e.lab()),i=o[0],a=o[1],s=o[2],c=Array.from(t.lab()),u=c[0],l=c[1],d=c[2],f=fr(a*a+s*s),g=fr(l*l+d*d),h=i<16?.511:.040975*i/(1+.01765*i),m=.0638*f/(1+.0131*f)+.638,v=f<1e-6?0:180*pr(s,a)/mr;v<0;)v+=360;for(;v>=360;)v-=360;var b=v>=164&&v<=345?.56+gr(.2*hr(mr*(v+168)/180)):.36+gr(.4*hr(mr*(v+35)/180)),y=f*f*f*f,E=fr(y/(y+1900)),_=m*(E*b+1-E),w=f-g,O=a-l,T=s-d,P=(i-u)/(r*h),D=w/(n*m);return fr(P*P+D*D+(O*O+T*T-w*w)/(_*_))},h.distance=function(e,t,r){void 0===r&&(r="lab"),e=new p(e),t=new p(t);var n=e.get(r),o=t.get(r),i=0;for(var a in n){var s=(n[a]||0)-(o[a]||0);i+=s*s}return Math.sqrt(i)},h.limits=dr.limits,h.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(p,[null].concat(e))),!0}catch(e){return!1}},h.scales=vr,h.colors=ut,h.brewer=wr,h}()},60850:(e,t,r)=>{"use strict";var n=r(86481),o=r(55618),i=r(99637),a=r(73727),s=r(87389),c=r(53403),u=r(26315),l=r(52977),d={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},f=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.Z)(this,e),this.init(t,r)}return(0,a.Z)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||d,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,(0,o.Z)({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),p=function(){function e(){(0,i.Z)(this,e),this.observers={}}return(0,a.Z)(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function g(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function h(e){return null==e?"":""+e}function m(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function v(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),e=e[a]}return o()?{}:{obj:e,k:n(i.shift())}}function b(e,t,r){var n=v(e,t,Object);n.obj[n.k]=r}function y(e,t){var r=v(e,t),n=r.obj,o=r.k;if(n)return n[o]}function E(e,t,r){var n=y(e,r);return void 0!==n?n:y(t,r)}function _(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):_(e[n],t[n],r):e[n]=t[n]);return e}function w(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var O={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function T(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return O[e]})):e}var P="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,D=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,i.Z)(this,t),r=(0,s.Z)(this,(0,c.Z)(t).call(this)),P&&p.call((0,u.Z)(r)),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return(0,l.Z)(t,e),(0,a.Z)(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=[e,t];return r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(i=e.split(".")),y(this.data,i)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(n=t,t=(a=e.split("."))[1]),this.addNamespaces(t),b(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var c=y(this.data,s)||{};n?_(c,r,i):c=(0,o.Z)({},c,r),b(this.data,s,c),a.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?(0,o.Z)({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(p),x={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))})),t}},k={},R=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.Z)(this,t),r=(0,s.Z)(this,(0,c.Z)(t).call(this)),P&&p.call((0,u.Z)(r)),m(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,(0,u.Z)(r)),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=f.create("translator"),r}return(0,l.Z)(t,e),(0,a.Z)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==(0,n.Z)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),c=s.key,u=s.namespaces,l=u[u.length-1],d=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(f){var p=t.nsSeparator||this.options.nsSeparator;return l+p+c}return c}var g=this.resolve(e,t),h=g&&g.res,m=g&&g.usedKey||c,v=g&&g.exactUsedKey||c,b=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],E=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,w="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(_&&h&&w&&y.indexOf(b)<0&&("string"!=typeof E||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,h,t):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(a){var O="[object Array]"===b,T=O?[]:{},P=O?v:m;for(var D in h)if(Object.prototype.hasOwnProperty.call(h,D)){var x="".concat(P).concat(a).concat(D);T[D]=this.translate(x,(0,o.Z)({},t,{joinArrays:!1,ns:u})),T[D]===x&&(T[D]=h[D])}h=T}}else if(_&&"string"==typeof E&&"[object Array]"===b)(h=h.join(E))&&(h=this.extendTranslation(h,e,t,r));else{var k=!1,R=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(k=!0,void 0!==t.count){var S=this.pluralResolver.getSuffix(d,t.count);h=t["defaultValue".concat(S)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(R=!0,h=c);var M=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(R||k||M){if(this.logger.log(M?"updateKey":"missingKey",d,l,c,M?t.defaultValue:h),a){var A=this.resolve(c,(0,o.Z)({},t,{keySeparator:!1}));A&&A.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var C=0;C<L.length;C++)F.push(L[C]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var j=function(e,r){i.options.missingKeyHandler?i.options.missingKeyHandler(e,l,r,M?t.defaultValue:h,M,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,l,r,M?t.defaultValue:h,M,t),i.emit("missingKey",e,l,r,h)};if(this.options.saveMissing){var I=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&I?F.forEach((function(e){i.pluralResolver.getPluralFormsOfKey(e,c).forEach((function(t){return j([e],t)}))})):j(F,c)}}h=this.extendTranslation(h,e,t,g,r),R&&h===c&&this.options.appendNamespaceToMissingKey&&(h="".concat(l,":").concat(c)),R&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init((0,o.Z)({},r,{interpolation:(0,o.Z)({},this.options.interpolation,r.interpolation)}));var s,c=r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(c){var u=e.match(this.interpolator.nestingRegexp);s=u&&u.length}var l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l=(0,o.Z)({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),c){var d=e.match(this.interpolator.nestingRegexp);s<(d&&d.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return i&&i[0]===n[0]&&!r.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):a.translate.apply(a,n.concat([t]))}),r)),r.interpolation&&this.interpolator.reset()}var f=r.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=x.handle(p,e,t,this.options&&this.options.postProcessPassResolved?(0,o.Z)({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,s),u=c.key;r=u;var l=c.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,f=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!k["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(k["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(r){if(!a.isValidLookup(t)){o=r;var i,c,l=u,p=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(p,u,r,e,s):(d&&(i=a.pluralResolver.getSuffix(r,s.count)),d&&f&&p.push(l+i),f&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),d&&p.push(l+=i));c=p.pop();)a.isValidLookup(t)||(n=c,t=a.getResource(r,e,c,s))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(p);function S(e){return e.charAt(0).toUpperCase()+e.slice(1)}var M=function(){function e(t){(0,i.Z)(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=f.create("languageUtils")}return(0,a.Z)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=S(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=S(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=S(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach((function(e){if(!t){var n=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(n)||(t=n)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find((function(e){if(0===e.indexOf(n))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach((function(e){o.indexOf(e)<0&&i(r.formatLanguageCode(e))})),o}}]),e}(),A=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],F={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function L(){var e={};return A.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:F[t.fc]}}))})),e}var C=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.Z)(this,e),this.languageUtils=t,this.options=r,this.logger=f.create("pluralResolver"),this.rules=L()}return(0,a.Z)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],o=this.getRule(e);return o?(o.numbers.forEach((function(o){var i=r.getSuffix(e,o);n.push("".concat(t).concat(i))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var o=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),i=n.numbers[o];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,i.Z)(this,e),this.logger=f.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,a.Z)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:T,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?w(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?w(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?w(t.nestingPrefix):t.nestingPrefixEscaped||w("$t("),this.nestingSuffix=t.nestingSuffix?w(t.nestingSuffix):t.nestingSuffixEscaped||w(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,i,a,s=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=E(t,c,e);return s.alwaysFormat?s.format(o,void 0,r):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),u=i.join(s.formatSeparator).trim();return s.format(E(t,c,a),u,r,n)};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,f=n&&n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof d){var r=d(e,o,n);i="string"==typeof r?r:""}else{if(f){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=h(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var r,n,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=(0,o.Z)({},a);function c(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0],i=(i=this.interpolate(i,s)).replace(/'/g,'"');try{s=JSON.parse(i),t&&(s=(0,o.Z)({},t,s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;r=this.nestingRegexp.exec(e);){var u=[],l=!1;if(r[0].includes(this.formatSeparator)&&!/{.*}/.test(r[1])){var d=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=d.shift(),u=d,l=!0}if((n=t(c.call(this,r[1].trim(),s),s))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=h(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=u.reduce((function(e,t){return i.format(e,t,a.lng,a)}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),I=function(e){function t(e,r,n){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,i.Z)(this,t),o=(0,s.Z)(this,(0,c.Z)(t).call(this)),P&&p.call((0,u.Z)(o)),o.backend=e,o.store=r,o.services=n,o.languageUtils=n.languageUtils,o.options=a,o.logger=f.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,a.backend,a),o}return(0,l.Z)(t,e),(0,a.Z)(t,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i=[],a=[],s=[],c=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,n=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),c.indexOf(t)<0&&c.push(t)))})),n||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:n}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:c}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),r&&this.store.addResourceBundle(o,i,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,s,c,u,l;n=r.loaded,s=i,(u=(c=v(n,[o],Object)).obj)[l=c.k]=u[l]||[],u[l].push(s),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(s,c){s&&c&&o<5?setTimeout((function(){n.read.call(n,e,t,r,o+1,2*i,a)}),i):a(s,c)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,(function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(o," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,(0,o.Z)({},a,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),t}(p);function N(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,n.Z)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,n.Z)(e[2])||"object"===(0,n.Z)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function U(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function H(){}new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if((0,i.Z)(this,t),e=(0,s.Z)(this,(0,c.Z)(t).call(this)),P&&p.call((0,u.Z)(e)),e.options=U(r),e.services={},e.logger=f,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),(0,s.Z)(e,(0,u.Z)(e));setTimeout((function(){e.init(r,n)}),0)}return e}return(0,l.Z)(t,e),(0,a.Z)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=(0,o.Z)({},N(),this.options,U(t)),this.format=this.options.interpolation.format,r||(r=H),!this.options.isClone){this.modules.logger?f.init(n(this.modules.logger),this.options):f.init(null,this.options);var i=new M(this.options);this.store=new D(this.options.resources,this.options);var a=this.services;a.logger=f,a.resourceStore=this.store,a.languageUtils=i,a.pluralResolver=new C(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new j(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new I(n(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(a.languageDetector=n(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=n(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new R(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var s=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var u=g(),l=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=g();return e||(e=this.languages),t||(t=this.options.ns),r||(r=H),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&x.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=g();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:r.services.languageUtils.getBestMatchFromCodes(e);o&&(r.language||(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o)),r.translator.language||r.translator.changeLanguage(o),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(o)),r.loadResources(o,(function(e){!function(e,o){o?(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,i=function e(t,i){var a;if("object"!==(0,n.Z)(i)){for(var s=arguments.length,c=new Array(s>2?s-2:0),u=2;u<s;u++)c[u-2]=arguments[u];a=r.options.overloadTranslationOptionHandler([t,i].concat(c))}else a=(0,o.Z)({},i);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,r.t(t,a)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||!(!a(n,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=g();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=g();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter((function(e){return n.indexOf(e)<0}));return o.length?(this.options.preload=n.concat(o),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,i=(0,o.Z)({},this.options,r,{isClone:!0}),a=new t(i),s=["store","services","language"];return s.forEach((function(t){a[t]=e[t]})),a.services=(0,o.Z)({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new R(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];a.emit.apply(a,[e].concat(r))})),a.init(i,n),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(p))},77643:(e,t,r)=>{var n=r(35557),o=r(4349),i=r(90407),a=r(55134),s=r(49951);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},63872:(e,t,r)=>{var n=r(62470),o=r(77289),i=r(97614),a=r(3067),s=r(19346);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},65674:(e,t,r)=>{var n=r(70489)(r(4818),"Map");e.exports=n},22462:(e,t,r)=>{var n=r(76290),o=r(94951),i=r(40440),a=r(86180),s=r(67719);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},35135:(e,t,r)=>{var n=r(63872),o=r(71490),i=r(32594),a=r(35953),s=r(74667),c=r(84615);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},29652:(e,t,r)=>{var n=r(4818).Symbol;e.exports=n},64600:(e,t,r)=>{var n=r(4818).Uint8Array;e.exports=n},46562:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},1998:(e,t,r)=>{var n=r(31453),o=r(25664),i=r(5860),a=r(79571),s=r(58347),c=r(1859),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),l=!r&&o(e),d=!r&&!l&&a(e),f=!r&&!l&&!d&&c(e),p=r||l||d||f,g=p?n(e.length,String):[],h=g.length;for(var m in e)!t&&!u.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,h))||g.push(m);return g}},1612:(e,t,r)=>{var n=r(46912),o=r(3355);e.exports=function(e,t,r){(void 0!==r&&!o(e[t],r)||void 0===r&&!(t in e))&&n(e,t,r)}},66258:(e,t,r)=>{var n=r(46912),o=r(3355),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},8620:(e,t,r)=>{var n=r(3355);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},46912:(e,t,r)=>{var n=r(94698);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},8528:(e,t,r)=>{var n=r(54820),o=Object.create,i=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=i},3153:(e,t,r)=>{var n=r(57572)();e.exports=n},52759:(e,t,r)=>{var n=r(29652),o=r(25135),i=r(73744),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},16651:(e,t,r)=>{var n=r(52759),o=r(71408);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},93216:(e,t,r)=>{var n=r(90830),o=r(70931),i=r(54820),a=r(21304),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,d=u.hasOwnProperty,f=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?f:s).test(a(e))}},19920:(e,t,r)=>{var n=r(52759),o=r(27906),i=r(71408),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},63339:(e,t,r)=>{var n=r(54820),o=r(87839),i=r(73003),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},97604:(e,t,r)=>{var n=r(35135),o=r(1612),i=r(3153),a=r(70480),s=r(54820),c=r(82551),u=r(50830);e.exports=function e(t,r,l,d,f){t!==r&&i(r,(function(i,c){if(f||(f=new n),s(i))a(t,r,c,l,e,d,f);else{var p=d?d(u(t,c),i,c+"",t,r,f):void 0;void 0===p&&(p=i),o(t,c,p)}}),c)}},70480:(e,t,r)=>{var n=r(1612),o=r(58192),i=r(49947),a=r(46581),s=r(91172),c=r(25664),u=r(5860),l=r(25274),d=r(79571),f=r(90830),p=r(54820),g=r(51969),h=r(1859),m=r(50830),v=r(42963);e.exports=function(e,t,r,b,y,E,_){var w=m(e,r),O=m(t,r),T=_.get(O);if(T)n(e,r,T);else{var P=E?E(w,O,r+"",e,t,_):void 0,D=void 0===P;if(D){var x=u(O),k=!x&&d(O),R=!x&&!k&&h(O);P=O,x||k||R?u(w)?P=w:l(w)?P=a(w):k?(D=!1,P=o(O,!0)):R?(D=!1,P=i(O,!0)):P=[]:g(O)||c(O)?(P=w,c(w)?P=v(w):p(w)&&!f(w)||(P=s(O))):D=!1}D&&(_.set(O,P),y(P,O,b,E,_),_.delete(O)),n(e,r,P)}}},95757:(e,t,r)=>{var n=r(81191),o=r(62549),i=r(6613);e.exports=function(e,t){return i(o(e,t,n),e+"")}},44274:(e,t,r)=>{var n=r(47477),o=r(94698),i=r(81191),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},31453:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},28275:e=>{e.exports=function(e){return function(t){return e(t)}}},81254:(e,t,r)=>{var n=r(64600);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},58192:(e,t,r)=>{e=r.nmd(e);var n=r(4818),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},49947:(e,t,r)=>{var n=r(81254);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},46581:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},87200:(e,t,r)=>{var n=r(66258),o=r(46912);e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,c=t.length;++s<c;){var u=t[s],l=i?i(r[u],e[u],u,r,e):void 0;void 0===l&&(l=e[u]),a?o(r,u,l):n(r,u,l)}return r}},38940:(e,t,r)=>{var n=r(4818)["__core-js_shared__"];e.exports=n},13102:(e,t,r)=>{var n=r(95757),o=r(77072);e.exports=function(e){return n((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var c=r[n];c&&e(t,c,n,a)}return t}))}},57572:e=>{e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===r(i[c],c,i))break}return t}}},94698:(e,t,r)=>{var n=r(70489),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},3566:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},6330:(e,t,r)=>{var n=r(25513);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},70489:(e,t,r)=>{var n=r(93216),o=r(83626);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},74966:(e,t,r)=>{var n=r(96148)(Object.getPrototypeOf,Object);e.exports=n},25135:(e,t,r)=>{var n=r(29652),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},83626:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},35557:(e,t,r)=>{var n=r(32037);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},4349:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},90407:(e,t,r)=>{var n=r(32037),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},55134:(e,t,r)=>{var n=r(32037),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},49951:(e,t,r)=>{var n=r(32037);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},91172:(e,t,r)=>{var n=r(8528),o=r(74966),i=r(87839);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},58347:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},77072:(e,t,r)=>{var n=r(3355),o=r(28809),i=r(58347),a=r(54820);e.exports=function(e,t,r){if(!a(r))return!1;var s=typeof t;return!!("number"==s?o(r)&&i(t,r.length):"string"==s&&t in r)&&n(r[t],e)}},25513:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},70931:(e,t,r)=>{var n,o=r(38940),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},87839:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},62470:e=>{e.exports=function(){this.__data__=[],this.size=0}},77289:(e,t,r)=>{var n=r(8620),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():o.call(t,r,1),--this.size,0))}},97614:(e,t,r)=>{var n=r(8620);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},3067:(e,t,r)=>{var n=r(8620);e.exports=function(e){return n(this.__data__,e)>-1}},19346:(e,t,r)=>{var n=r(8620);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},76290:(e,t,r)=>{var n=r(77643),o=r(63872),i=r(65674);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},94951:(e,t,r)=>{var n=r(6330);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},40440:(e,t,r)=>{var n=r(6330);e.exports=function(e){return n(this,e).get(e)}},86180:(e,t,r)=>{var n=r(6330);e.exports=function(e){return n(this,e).has(e)}},67719:(e,t,r)=>{var n=r(6330);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},32037:(e,t,r)=>{var n=r(70489)(Object,"create");e.exports=n},73003:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},29693:(e,t,r)=>{e=r.nmd(e);var n=r(3566),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},73744:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},96148:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},62549:(e,t,r)=>{var n=r(46562),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),c=Array(s);++a<s;)c[a]=i[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=i[a];return u[t]=r(c),n(e,this,u)}}},4818:(e,t,r)=>{var n=r(3566),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},50830:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},6613:(e,t,r)=>{var n=r(44274),o=r(13546)(n);e.exports=o},13546:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},71490:(e,t,r)=>{var n=r(63872);e.exports=function(){this.__data__=new n,this.size=0}},32594:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},35953:e=>{e.exports=function(e){return this.__data__.get(e)}},74667:e=>{e.exports=function(e){return this.__data__.has(e)}},84615:(e,t,r)=>{var n=r(63872),o=r(65674),i=r(22462);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},21304:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},47477:e=>{e.exports=function(e){return function(){return e}}},3355:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},81191:e=>{e.exports=function(e){return e}},25664:(e,t,r)=>{var n=r(16651),o=r(71408),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},5860:e=>{var t=Array.isArray;e.exports=t},28809:(e,t,r)=>{var n=r(90830),o=r(27906);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},25274:(e,t,r)=>{var n=r(28809),o=r(71408);e.exports=function(e){return o(e)&&n(e)}},79571:(e,t,r)=>{e=r.nmd(e);var n=r(4818),o=r(18585),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},90830:(e,t,r)=>{var n=r(52759),o=r(54820);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},27906:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},54820:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},71408:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},51969:(e,t,r)=>{var n=r(52759),o=r(74966),i=r(71408),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=n(e))return!1;var t=o(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==l}},1859:(e,t,r)=>{var n=r(19920),o=r(28275),i=r(29693),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},82551:(e,t,r)=>{var n=r(1998),o=r(63339),i=r(28809);e.exports=function(e){return i(e)?n(e,!0):o(e)}},57168:(e,t,r)=>{var n=r(97604),o=r(13102)((function(e,t,r){n(e,t,r)}));e.exports=o},18585:e=>{e.exports=function(){return!1}},42963:(e,t,r)=>{var n=r(87200),o=r(82551);e.exports=function(e){return n(e,o(e))}},5732:(e,t,r)=>{var n=r(22743);e.exports=function(e){var t,r,o,i;if(t=/^((?:rgb|hs[lv]|cmyk|xyz|lab)a?)\s*\(([^\)]*)\)/.exec(e)){var a=t[1],s="cmyk"===(c=a.replace(/a$/,""))?4:3;r=n[c],o=t[2].replace(/^\s+|\s+$/g,"").split(/\s*,\s*/).map((function(e,t){return/%$/.test(e)&&t===s?parseFloat(e)/100:(/%$/.test(e),parseFloat(e))})),a===c&&o.push(1),i=void 0===o[s]?1:o[s],o=o.slice(0,s),r[c]=function(){return o}}else if(/^#[A-Fa-f0-9]+$/.test(e)){var c;s=(c=e.replace(/^#/,"")).length,r=n.rgb,o=(o=c.split(3===s?/(.)/:/(..)/)).filter(Boolean).map((function(e){return 3===s?parseInt(e+e,16):parseInt(e,16)})),i=1,r.rgb=function(){return o},o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0)}else(r=n.keyword).keyword=function(){return e},o=e,i=1;var u={rgb:void 0,hsl:void 0,hsv:void 0,cmyk:void 0,keyword:void 0,hex:void 0};try{u.rgb=r.rgb(o)}catch(e){}try{u.hsl=r.hsl(o)}catch(e){}try{u.hsv=r.hsv(o)}catch(e){}try{u.cmyk=r.cmyk(o)}catch(e){}try{u.keyword=r.keyword(o)}catch(e){}return u.rgb&&(u.hex="#"+u.rgb.map((function(e){var t=e.toString(16);return 1===t.length?"0"+t:t})).join("")),u.rgb&&(u.rgba=u.rgb.concat(i)),u.hsl&&(u.hsla=u.hsl.concat(i)),u.hsv&&(u.hsva=u.hsv.concat(i)),u.cmyk&&(u.cmyka=u.cmyk.concat(i)),u}},71919:e=>{function t(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(n,o,i),s=Math.max(n,o,i),c=s-a;return s==a?t=0:n==s?t=(o-i)/c:o==s?t=2+(i-n)/c:i==s&&(t=4+(n-o)/c),(t=Math.min(60*t,360))<0&&(t+=360),r=(a+s)/2,[t,100*(s==a?0:r<=.5?c/(s+a):c/(2-s-a)),100*r]}function n(e){var t,r,n=e[0],o=e[1],i=e[2],a=Math.min(n,o,i),s=Math.max(n,o,i),c=s-a;return r=0==s?0:c/s*1e3/10,s==a?t=0:n==s?t=(o-i)/c:o==s?t=2+(i-n)/c:i==s&&(t=4+(n-o)/c),(t=Math.min(60*t,360))<0&&(t+=360),[t,r,s/255*1e3/10]}function o(e){var r=e[0],n=e[1],o=e[2];return[t(e)[0],1/255*Math.min(r,Math.min(n,o))*100,100*(o=1-1/255*Math.max(r,Math.max(n,o)))]}function i(e){var t,r=e[0]/255,n=e[1]/255,o=e[2]/255;return[100*((1-r-(t=Math.min(1-r,1-n,1-o)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]}function a(e){return O[JSON.stringify(e)]}function s(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]}function c(e){var t=s(e),r=t[0],n=t[1],o=t[2];return n/=100,o/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function u(e){var t,r,n,o,i,a=e[0]/360,s=e[1]/100,c=e[2]/100;if(0==s)return[i=255*c,i,i];t=2*c-(r=c<.5?c*(1+s):c+s-c*s),o=[0,0,0];for(var u=0;u<3;u++)(n=a+1/3*-(u-1))<0&&n++,n>1&&n--,i=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,o[u]=255*i;return o}function l(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),a=255*n*(1-r),s=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,c,a];case 1:return[s,n,a];case 2:return[a,n,c];case 3:return[a,s,n];case 4:return[c,a,n];case 5:return[n,a,s]}}function d(e){var t,n,o,i,a=e[0]/360,s=e[1]/100,c=e[2]/100,u=s+c;switch(u>1&&(s/=u,c/=u),o=6*a-(t=Math.floor(6*a)),0!=(1&t)&&(o=1-o),i=s+o*((n=1-c)-s),t){default:case 6:case 0:r=n,g=i,b=s;break;case 1:r=i,g=n,b=s;break;case 2:r=s,g=n,b=i;break;case 3:r=s,g=i,b=n;break;case 4:r=i,g=s,b=n;break;case 5:r=n,g=s,b=i}return[255*r,255*g,255*b]}function f(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]}function p(e){var t,r,n,o=e[0]/100,i=e[1]/100,a=e[2]/100;return r=-.9689*o+1.8758*i+.0415*a,n=.0557*o+-.204*i+1.057*a,t=(t=3.2406*o+-1.5372*i+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:t*=12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]}function h(e){var t=e[0],r=e[1],n=e[2];return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function m(e){var t,r,n,o,i=e[0],a=e[1],s=e[2];return i<=8?o=(r=100*i/903.3)/100*7.787+16/116:(r=100*Math.pow((i+16)/116,3),o=Math.pow(r/100,1/3)),[t=t/95.047<=.008856?t=95.047*(a/500+o-16/116)/7.787:95.047*Math.pow(a/500+o,3),r,n=n/108.883<=.008859?n=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function v(e){var t,r=e[0],n=e[1],o=e[2];return(t=360*Math.atan2(o,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+o*o),t]}function y(e){return p(m(e))}function E(e){var t,r=e[0],n=e[1];return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]}function _(e){return w[e]}e.exports={rgb2hsl:t,rgb2hsv:n,rgb2hwb:o,rgb2cmyk:i,rgb2keyword:a,rgb2xyz:s,rgb2lab:c,rgb2lch:function(e){return v(c(e))},hsl2rgb:u,hsl2hsv:function(e){var t=e[0],r=e[1]/100,n=e[2]/100;return 0===n?[0,0,0]:[t,2*(r*=(n*=2)<=1?n:2-n)/(n+r)*100,(n+r)/2*100]},hsl2hwb:function(e){return o(u(e))},hsl2cmyk:function(e){return i(u(e))},hsl2keyword:function(e){return a(u(e))},hsv2rgb:l,hsv2hsl:function(e){var t,r,n=e[0],o=e[1]/100,i=e[2]/100;return t=o*i,[n,100*(t=(t/=(r=(2-o)*i)<=1?r:2-r)||0),100*(r/=2)]},hsv2hwb:function(e){return o(l(e))},hsv2cmyk:function(e){return i(l(e))},hsv2keyword:function(e){return a(l(e))},hwb2rgb:d,hwb2hsl:function(e){return t(d(e))},hwb2hsv:function(e){return n(d(e))},hwb2cmyk:function(e){return i(d(e))},hwb2keyword:function(e){return a(d(e))},cmyk2rgb:f,cmyk2hsl:function(e){return t(f(e))},cmyk2hsv:function(e){return n(f(e))},cmyk2hwb:function(e){return o(f(e))},cmyk2keyword:function(e){return a(f(e))},keyword2rgb:_,keyword2hsl:function(e){return t(_(e))},keyword2hsv:function(e){return n(_(e))},keyword2hwb:function(e){return o(_(e))},keyword2cmyk:function(e){return i(_(e))},keyword2lab:function(e){return c(_(e))},keyword2xyz:function(e){return s(_(e))},xyz2rgb:p,xyz2lab:h,xyz2lch:function(e){return v(h(e))},lab2xyz:m,lab2rgb:y,lab2lch:v,lch2lab:E,lch2xyz:function(e){return m(E(e))},lch2rgb:function(e){return y(E(e))}};var w={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},O={};for(var T in w)O[JSON.stringify(w[T])]=T},22743:(e,t,r)=>{var n=r(71919),o=function(){return new u};for(var i in n){o[i+"Raw"]=function(e){return function(t){return"number"==typeof t&&(t=Array.prototype.slice.call(arguments)),n[e](t)}}(i);var a=/(\w+)2(\w+)/.exec(i),s=a[1],c=a[2];(o[s]=o[s]||{})[c]=o[i]=function(e){return function(t){"number"==typeof t&&(t=Array.prototype.slice.call(arguments));var r=n[e](t);if("string"==typeof r||void 0===r)return r;for(var o=0;o<r.length;o++)r[o]=Math.round(r[o]);return r}}(i)}var u=function(){this.convs={}};u.prototype.routeSpace=function(e,t){var r=t[0];return void 0===r?this.getValues(e):("number"==typeof r&&(r=Array.prototype.slice.call(t)),this.setValues(e,r))},u.prototype.setValues=function(e,t){return this.space=e,this.convs={},this.convs[e]=t,this},u.prototype.getValues=function(e){var t=this.convs[e];if(!t){var r=this.space,n=this.convs[r];t=o[r][e](n),this.convs[e]=t}return t},["rgb","hsl","hsv","cmyk","keyword"].forEach((function(e){u.prototype[e]=function(t){return this.routeSpace(e,arguments)}})),e.exports=o},52660:(e,t,r)=>{"use strict";r.d(t,{T:()=>i,t1:()=>a,uS:()=>s,ZP:()=>h});var n,o,i,a,s,c=r(56954),u=(r(43985),r(41940)),l=r(57897),d=r(17019),f=r(18700),p=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},g=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};!function(e){e.Absolute="Absolute",e.Percent="Percent",e.Undefined="Auto"}(i||(i={})),function(e){e.Absolute="Absolute",e.Percent="Percent",e.Auto="Auto"}(a||(a={})),function(e){e.Bool="Bool",e.Int="Int",e.Float="Float",e.String="String",e.Color="Color",e.Enum="Enum",e.Struct="Struct"}(s||(s={}));class h{constructor(e){n.set(this,void 0),o.set(this,void 0),p(this,n,e,"f"),p(this,o,new u.Z(e),"f")}async export(e,t=c.HY.Png){return(0,f.ZP)("handle",e,(0,d.Rx)()),(0,f.ZP)("mimeType",t,(0,f.zF)()),new Promise(((r,o)=>{g(this,n,"f").exportToBuffer(e,t,(e=>{"error"in e?o(e.error):r(new Blob([e],{type:t}))}),{jpegQuality:.9,pngCompressionLevel:5,useTargetSize:!1,targetWidth:0,targetHeight:0})}))}async loadFromString(e){return(0,f.ZP)("content",e,(0,d.Z_)()),new Promise((t=>{g(this,n,"f").loadBlocksFromString(e,(e=>{const r=(0,u.L)(e);t((0,l.Z)(r))}))}))}async saveToString(e){return(0,f.ZP)("blocks",e,(0,d.IX)((0,d.Rx)())),new Promise((t=>{g(this,n,"f").saveBlocksToString(e,(e=>{const r=(0,u.L)(e);t(r)}))}))}create(e){return(0,f.ZP)("type",e,(0,d.Z_)()),(0,u.L)(g(this,n,"f").create(e))}getType(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getType(e))}setSelected(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("selected",t,(0,d.O7)()),(0,u.L)(g(this,n,"f").setSelected(e,t))}isSelected(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").isSelected(e))}findAllSelected(){return(0,l.Z)(g(this,n,"f").findAllSelected())}setName(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("name",t,(0,d.Z_)()),g(this,o,"f").setValue(e,c.uY,"name",t)}getName(e){return(0,f.ZP)("id",e,(0,d._L)()),g(this,o,"f").getValue(e,c.uY,"name")}findByName(e){(0,f.ZP)("name",e,(0,d.Z_)());const t=g(this,n,"f").findByName(e);return(0,l.Z)(t)}findByType(e){(0,f.ZP)("type",e,(0,d.Z_)());const t=g(this,n,"f").findByType(e),r=(0,u.L)(t);return(0,l.Z)(r)}findAll(){return(0,l.Z)(g(this,n,"f").findAll())}isVisible(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").isVisible(e))}setVisible(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("visible",t,(0,d.O7)()),(0,u.L)(g(this,n,"f").setVisible(e,t))}getPositionX(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getPositionX(e))}getPositionXMode(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getPositionXMode(e))}getPositionY(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getPositionY(e))}getPositionYMode(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getPositionYMode(e))}setPositionX(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("value",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setPositionX(e,t))}setPositionXMode(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").setPositionXMode(e,t))}setPositionY(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("value",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setPositionY(e,t))}setPositionYMode(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").setPositionYMode(e,t))}getRotation(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getRotation(e))}setRotation(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("radians",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setRotation(e,t))}getFlipHorizontal(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getFlip(e)).horizontal}getFlipVertical(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getFlip(e)).vertical}setFlipHorizontal(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("flip",t,(0,d.O7)()),(0,u.L)(g(this,n,"f").setFlipHorizontal(e,t))}setFlipVertical(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("flip",t,(0,d.O7)()),(0,u.L)(g(this,n,"f").setFlipVertical(e,t))}getWidth(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getWidth(e))}getWidthMode(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getWidthMode(e))}getHeight(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getHeight(e))}getHeightMode(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getHeightMode(e))}setWidth(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("value",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setWidth(e,t))}setWidthMode(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").setWidthMode(e,t))}setHeight(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("value",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setHeight(e,t))}setHeightMode(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").setHeightMode(e,t))}getFrameWidth(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getLastFrameWidth(e))}getFrameHeight(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getLastFrameHeight(e))}duplicate(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").duplicate(e))}destroy(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").destroy(e))}isValid(e){return(0,f.ZP)("id",e,(0,d._L)()),g(this,n,"f").isValid(e)}getParent(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getParent(e))}getChildren(e){(0,f.ZP)("id",e,(0,d._L)());const t=(0,u.L)(g(this,n,"f").getChildren(e));return(0,l.Z)(t)}insertChild(e,t,r){return(0,f.ZP)("parent",e,(0,d.Rx)()),(0,f.ZP)("child",t,(0,d.Rx)()),(0,f.ZP)("index",r,(0,d.VV)((0,d.Rx)(),0)),(0,u.L)(g(this,n,"f").insertChild(e,t,r))}appendChild(e,t){return(0,f.ZP)("parent",e,(0,d.Rx)()),(0,f.ZP)("child",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").appendChild(e,t))}referencesAnyVariables(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").referencesAnyVariables(e))}getGlobalBoundingBoxX(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getGlobalBoundingBoxX(e))}getGlobalBoundingBoxY(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getGlobalBoundingBoxY(e))}getGlobalBoundingBoxWidth(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getGlobalBoundingBoxWidth(e))}getGlobalBoundingBoxHeight(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getGlobalBoundingBoxHeight(e))}findAllProperties(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,l.Z)((0,u.L)(g(this,n,"f").findAllProperties(e)))}getPropertyType(e){return(0,f.ZP)("property",e,(0,d.Z_)()),(0,u.L)(g(this,n,"f").getPropertyType(e))}getEnumValues(e){return(0,f.ZP)("enumProperty",e,(0,d.Z_)()),(0,l.Z)((0,u.L)(g(this,n,"f").getEnumValues(e)))}setBool(e,t,r){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,f.ZP)("value",r,(0,d.O7)()),(0,u.L)(g(this,n,"f").setBool(e,t,r))}getBool(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,u.L)(g(this,n,"f").getBool(e,t))}setInt(e,t,r){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,f.ZP)("value",r,(0,d._L)()),(0,u.L)(g(this,n,"f").setInt(e,t,r))}getInt(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,u.L)(g(this,n,"f").getInt(e,t))}setFloat(e,t,r){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,f.ZP)("value",r,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setFloat(e,t,r))}getFloat(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,u.L)(g(this,n,"f").getFloat(e,t))}setString(e,t,r){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,f.ZP)("value",r,(0,d.Z_)()),(0,u.L)(g(this,n,"f").setString(e,t,r))}getString(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,u.L)(g(this,n,"f").getString(e,t))}setColorRGBA(e,t,r,o,i,a){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,f.ZP)("r",r,(0,d.Rx)()),(0,f.ZP)("g",o,(0,d.Rx)()),(0,f.ZP)("b",i,(0,d.Rx)()),(0,f.ZP)("a",a,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setColorRGBA(e,t,r,o,i,a))}getColorRGBA(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,u.L)(g(this,n,"f").getColorRGBA(e,t))}setEnum(e,t,r){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,f.ZP)("value",r,(0,d.Z_)()),(0,u.L)(g(this,n,"f").setEnum(e,t,r))}getEnum(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("property",t,(0,d.Z_)()),(0,u.L)(g(this,n,"f").getEnum(e,t))}hasCrop(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").hasCrop(e))}setCropScaleX(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("scaleX",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setCropScaleX(e,t))}setCropScaleY(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("scaleY",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setCropScaleY(e,t))}setCropRotation(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("rotation",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setCropRotation(e,t))}setCropTranslationX(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("translationX",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setCropTranslationX(e,t))}setCropTranslationY(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("translationY",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setCropTranslationY(e,t))}resetCrop(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").resetCrop(e))}getCropScaleX(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getCropScaleX(e))}getCropScaleY(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getCropScaleY(e))}getCropRotation(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getCropRotation(e))}getCropTranslationX(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getCropTranslationX(e))}getCropTranslationY(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getCropTranslationY(e))}hasOpacity(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").hasOpacity(e))}setOpacity(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("opacity",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setOpacity(e,t))}getOpacity(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getOpacity(e))}hasFillColor(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").hasFillColor(e))}setFillColorRGBA(e,t,r,o,i){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("r",t,(0,d.Rx)()),(0,f.ZP)("g",r,(0,d.Rx)()),(0,f.ZP)("b",o,(0,d.Rx)()),(0,f.ZP)("a",i,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setFillColorRGBA(e,t,r,o,i))}getFillColorRGBA(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getFillColorRGBA(e))}setFillColorEnabled(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("enabled",t,(0,d.O7)()),(0,u.L)(g(this,n,"f").setFillColorEnabled(e,t))}isFillColorEnabled(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").isFillColorEnabled(e))}hasBackgroundColor(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").hasBackgroundColor(e))}setBackgroundColorRGBA(e,t,r,o,i){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("r",t,(0,d.Rx)()),(0,f.ZP)("g",r,(0,d.Rx)()),(0,f.ZP)("b",o,(0,d.Rx)()),(0,f.ZP)("a",i,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setBackgroundColorRGBA(e,t,r,o,i))}getBackgroundColorRGBA(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getBackgroundColorRGBA(e))}setBackgroundColorEnabled(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("enabled",t,(0,d.O7)()),(0,u.L)(g(this,n,"f").setBackgroundColorEnabled(e,t))}isBackgroundColorEnabled(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").isBackgroundColorEnabled(e))}hasOutline(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").hasOutline(e))}setOutlineColorRGBA(e,t,r,o,i){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("r",t,(0,d.Rx)()),(0,f.ZP)("g",r,(0,d.Rx)()),(0,f.ZP)("b",o,(0,d.Rx)()),(0,f.ZP)("a",i,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setOutlineColorRGBA(e,t,r,o,i))}getOutlineColorRGBA(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getOutlineColorRGBA(e))}setOutlineEnabled(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("enabled",t,(0,d.O7)()),(0,u.L)(g(this,n,"f").setOutlineEnabled(e,t))}isOutlineEnabled(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").isOutlineEnabled(e))}setOutlineWidth(e,t){return(0,f.ZP)("id",e,(0,d._L)()),(0,f.ZP)("width",t,(0,d.Rx)()),(0,u.L)(g(this,n,"f").setOutlineWidth(e,t))}getOutlineWidth(e){return(0,f.ZP)("id",e,(0,d._L)()),(0,u.L)(g(this,n,"f").getOutlineWidth(e))}}n=new WeakMap,o=new WeakMap},21849:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u}),r(56954),r(43985);var n,o=r(41940),i=r(57897),a=r(18700),s=r(17019),c=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class u{constructor(e){n.set(this,void 0),function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,r):o?o.value=r:t.set(e,r)}(this,n,e,"f")}subscribe(e,t){(0,a.ZP)("blocks",e,(0,s.IX)());const r=c(this,n,"f").subscribe(e,(e=>{try{t((0,i.Z)(e,!0))}catch(e){console.error(e)}}));return()=>{(0,o.L)(c(this,n,"f").unsubscribe(r))}}}n=new WeakMap},49674:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n,o,i=r(56954),a=(r(43985),r(41940)),s=r(57897),c=r(18700),u=r(17019),l=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},d=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class f{constructor(e){n.set(this,void 0),o.set(this,void 0),l(this,n,e,"f"),l(this,o,new a.Z(e),"f")}async loadFromString(e){return(0,c.ZP)("sceneContent",e,(0,u.Z_)()),new Promise((t=>{d(this,n,"f").loadSceneFromString(e,(e=>{const r=(0,a.L)(e);t(r)}))}))}async loadFromURL(e){return(0,c.ZP)("url",e,(0,u.Z_)()),new Promise((t=>{d(this,n,"f").loadSceneFromURL(e,(e=>{const r=(0,a.L)(e);t(r)}))}))}async saveToString(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):d(this,n,"f").saveSceneToString(r,(t=>{const r=(0,a.L)(t);e(r)}))}))}create(){return(0,a.L)(d(this,n,"f").createScene({layout:i.Kc.Free}))}createFromImage(e,t=300,r=1){return(0,c.ZP)("url",e,(0,u.Z_)()),(0,c.ZP)("dpi",t,(0,u.VV)((0,u.Rx)(),0)),(0,c.ZP)("pixelScaleFactor",r,(0,u.VV)((0,u.Rx)(),0)),new Promise((o=>{d(this,n,"f").createSceneFromImage(e,t,r,i.Kc.Free,0,!1,(e=>{const t=(0,a.L)(e);o(t)}))}))}get(){const e=d(this,n,"f").findByType(i._h.Scene),t=(0,a.L)(e),r=(0,s.Z)(t);return r.length>0?r[0]:null}}n=new WeakMap,o=new WeakMap},2477:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u}),r(43985);var n,o=r(41940),i=r(57897),a=r(18700),s=r(17019),c=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class u{constructor(e){n.set(this,void 0),function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,r):o?o.value=r:t.set(e,r)}(this,n,e,"f")}findAll(){return(0,i.Z)(c(this,n,"f").findAllVariables())}setString(e,t){return(0,a.ZP)("key",e,(0,s.Z_)()),(0,a.ZP)("value",t,(0,s.Z_)()),(0,o.L)(c(this,n,"f").setVariableString(e,t))}getString(e){return(0,a.ZP)("key",e,(0,s.Z_)()),(0,o.L)(c(this,n,"f").getVariableString(e))}remove(e){return(0,a.ZP)("key",e,(0,s.Z_)()),(0,o.L)(c(this,n,"f").removeVariable(e))}}n=new WeakMap},20733:(e,t,r)=>{"use strict";r(52660),r(49674),r(2477),r(21849),r(43985)},18700:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>o,zF:()=>i});var n=r(17019);function o(e,t,r){const[o]=(0,n.Gu)(t,r);if(o)throw o.message=`Error in argument '${e}': ${o.message}`,o}function i(){const e=/image\/(png|jpeg|x-tga)|application\/octet-stream/;return(0,n.Ou)("MimeType",(t=>!("string"!=typeof t||!e.test(t))||{message:`expected one of "image/png", "image/jpeg", "image/x-tga", or "application/octet-stream", but got "${t}"`}))}},19496:(e,t,r)=>{"use strict";r.d(t,{vx:()=>s,pA:()=>u,_z:()=>l,qZ:()=>d,sj:()=>f,Zj:()=>p,V1:()=>g,zI:()=>h,mF:()=>m,YV:()=>v,Hf:()=>b});var n=r(56954),o=r(39069),i=r(58308),a=r(35180);(0,i.W)(10),(0,i.W)(50),(0,i.W)(10).map((e=>.1*e));const s={baseURL:"/extensions/",entries:["ly.img.cesdk.filters.duotone","ly.img.cesdk.filters.lut","ly.img.cesdk.stickers.emoticons","ly.img.cesdk.vectorpaths","ly.img.cesdk.fonts","ly.img.cesdk.images.samples","ly.img.cesdk.effects","ly.img.cesdk.stickers.doodle","ly.img.cesdk.stickers.hand","ly.img.cesdk.stickers.emoji"]},c={"din-a0":{width:1189,height:841,unit:o.X5.Millimeter},"din-a1":{width:841,height:594,unit:o.X5.Millimeter},"din-a2":{width:594,height:420,unit:o.X5.Millimeter},"din-a3":{width:420,height:297,unit:o.X5.Millimeter},"din-a4":{width:297,height:210,unit:o.X5.Millimeter},"din-a5":{width:210,height:148,unit:o.X5.Millimeter},"din-a6":{meta:{default:!0},width:148,height:105,unit:o.X5.Millimeter},"din-a65":{width:210,height:105,unit:o.X5.Millimeter},"din-b5":{width:250,height:176,unit:o.X5.Millimeter},square:{width:105,height:105,unit:o.X5.Millimeter},"twitter-profile":{width:400,height:400,unit:o.X5.Pixel},"twitter-image":{width:1024,height:512,unit:o.X5.Pixel},"twitter-header":{width:1500,height:500,unit:o.X5.Pixel},"instagram-profile":{width:180,height:180,unit:o.X5.Pixel},"instagram-photo":{width:1080,height:1080,unit:o.X5.Pixel},"instagram-story":{width:1080,height:1920,unit:o.X5.Pixel},"american-letter":{width:8.5,height:11,unit:o.X5.Inch},"american-legal":{width:8.5,height:14,unit:o.X5.Inch},"16:10":{width:1600,height:1e3,unit:o.X5.Pixel},"16:9":{width:1600,height:900,unit:o.X5.Pixel},"16:10@2400p":{width:3840,height:2400,unit:o.X5.Pixel},"16:9@2160p":{width:3840,height:2160,unit:o.X5.Pixel},"business-card":{width:85,height:55,unit:o.X5.Millimeter}},u={company_name:{value:"img.ly"},first_name:{value:"Charly"},last_name:{value:"Williams"},address:{value:"742 Evergreen Terrace"},city:{value:"Springfield"}},l=(e,t)=>{const r=`[UBQ] ${e}`;switch(t){case n.in.Warning:console.warn(r);break;case n.in.Error:console.error(r);break;case n.in.Info:console.log(r);break;default:console.log(r)}},d={log:l},f={en:{variables:{company_name:{label:"Company Name"},first_name:{label:"First name"},last_name:{label:"Last name"},address:{label:"Address"},city:{label:"City"}}},de:{variables:{company_name:{label:"Firmenname"},first_name:{label:"Vorname"},last_name:{label:"Nachname"},address:{label:"Adresse"},city:{label:"Stadt"}}}},p={colorPalettes:{primary:{meta:{default:!0},entries:["#FFFFFF","#000000","#6686FF","#66CCFF","#54FFEA","#E75050","#F28855","#FFF763"]}},pageFormats:c},g={headingsHierarchyStart:2},h={baseURL:"core/"},m={baseURL:"ui/",scale:"normal",elements:a.ZP,stylesheets:{disableShadowDOM:!1,disableTagInsertion:!1,disableFontInsertion:!1}},v={maskSpotColor:void 0,dpi:300,pixelScaleFactor:1},b={title:{fontFileUri:"bundle://ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",show:!0}}},2821:(e,t,r)=>{"use strict";r.d(t,{V:()=>c});var n=r(57168),o=r.n(n),i=r(19496);function a(e,t=window.location.href){return new URL(e,t).toString()}function s(e){return"/"!==e[e.length-1]?`${e}/`:e}r(39069);class c{constructor(){Object.defineProperty(this,"baseURL",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"license",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"role",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"locale",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"theme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"devMode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"featureFlags",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"initialSceneString",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"initialSceneURL",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"initialImageURL",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"extensions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"core",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ui",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"i18n",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"a11y",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scene",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"assets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"assetSources",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"presets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"variables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"callbacks",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"defaultFont",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}static initWithDefaults(e={}){var t,r,n,u,l,d,f,p,g,h,m,v,b,y,E,_,w,O,T,P,D,x;const k=new c;return e&&(k.initialSceneString=null!==(t=e.initialSceneString)&&void 0!==t?t:void 0,k.initialSceneURL=null!==(r=e.initialSceneURL)&&void 0!==r?r:void 0,k.initialImageURL=null!==(n=e.initialImageURL)&&void 0!==n?n:void 0,k.license=e.license,k.role=null!==(u=e.role)&&void 0!==u?u:"Creator",k.locale=null!==(l=e.locale)&&void 0!==l?l:"en",k.theme=null!==(d=e.theme)&&void 0!==d?d:"dark",k.devMode=null!==(f=e.devMode)&&void 0!==f&&f,k.featureFlags=null!==(p=e.featureFlags)&&void 0!==p?p:{},k.baseURL=null!==(g=e.baseURL)&&void 0!==g?g:"https://cdn.img.ly/packages/imgly/cesdk-js/1.5.0-alpha.0/assets",k.core=null!==(h=e.core)&&void 0!==h?h:Object.assign({},i.zI),k.ui=o()({},i.mF,null!==(m=e.ui)&&void 0!==m?m:{}),k.extensions=null!==(v=e.extensions)&&void 0!==v?v:Object.assign({},i.vx),k.extensions.entries=null!==(b=k.extensions.entries)&&void 0!==b?b:Object.assign({},i.vx.entries),k.i18n=null!==(y=e.i18n)&&void 0!==y?y:Object.assign({},i.sj),k.a11y=null!==(E=e.a11y)&&void 0!==E?E:Object.assign({},i.V1),k.callbacks=null!==(_=e.callbacks)&&void 0!==_?_:Object.assign({},i.qZ),k.variables=null!==(w=e.variables)&&void 0!==w?w:Object.assign({},i.pA),k.presets=null!==(O=e.presets)&&void 0!==O?O:Object.assign({},i.Zj),k.scene=null!==(T=e.scene)&&void 0!==T?T:Object.assign({},i.YV),k.page=o()({},i.Hf,null!==(P=e.page)&&void 0!==P?P:{}),k.assets=null!==(D=e.assets)&&void 0!==D?D:{},k.assetSources=o()({},e.assetSources),k.defaultFont=null!==(x=e.defaultFont)&&void 0!==x?x:void 0,Object.entries(i.Zj).forEach((([e,t])=>{var r;k.presets[e]=null!==(r=k.presets[e])&&void 0!==r?r:Object.assign({},t)}))),k.baseURL=a(k.baseURL),k.baseURL=s(k.baseURL),k.core.baseURL=a(k.core.baseURL,k.baseURL),k.core.baseURL=s(k.core.baseURL),k.ui.baseURL=a(k.ui.baseURL,k.baseURL),k.ui.baseURL=s(k.ui.baseURL),k.extensions.baseURL=s(k.extensions.baseURL),k.extensions.entries=k.extensions.entries.map((e=>s(e))),k}extend(e){return o()({},this,e)}}},39069:(e,t,r)=>{"use strict";r.d(t,{X5:()=>n,pE:()=>o});var n,o,i=r(56954);r(34821),r(59926),r(43579),function(e){e.Pixel="px",e.Millimeter="mm",e.Inch="in"}(n||(n={})),n.Pixel,i.X5.Pixel,n.Millimeter,i.X5.Millimeter,n.Inch,i.X5.Inch,i.X5.Pixel,n.Pixel,i.X5.Millimeter,n.Millimeter,i.X5.Inch,n.Inch,function(e){e.Advanced="advanced",e.Default="default"}(o||(o={}))},35180:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>l});var n,o=r(39069),i=r(15294);!function(e){e.Left="left",e.Right="right"}(n||(n={}));const a={show:!0,position:n.Right},s={show:!1,position:n.Left},c={show:!0,position:n.Left},u={show:!0,position:i.O.Top,title:null,action:{close:{show:!1},back:{show:!1},save:{show:!1},export:{show:!1},share:{show:!1},download:{show:!1},load:{show:!1}}},l={view:{adopter:{style:o.pE.Default}},panels:{inspector:a,settings:s,assetLibrary:c},templates:{show:!0},libraries:{image:{show:!0},text:{show:!0},element:{show:!0}},navigation:u,blocks:{opacity:!0,transform:!0,"//ly.img.ubq/text":{advanced:{show:!0},color:{show:!0},backgroundColor:{show:!0}},"//ly.img.ubq/image":{crop:{show:!0},filters:{show:!0},adjustments:{show:!0},effects:{show:!0},blur:{show:!0}}}}},15294:(e,t,r)=>{"use strict";var n,o;r.d(t,{O:()=>o}),function(e){e.Left="left",e.Right="right"}(n||(n={})),function(e){e.Top="top",e.Bottom="bottom"}(o||(o={}))},58308:(e,t,r)=>{"use strict";function n(e){return Array.from(Array(e+1).keys())}r.d(t,{W:()=>n}),r(39069)},56954:(e,t,r)=>{"use strict";var n,o,i,a,s,c,u;r.d(t,{in:()=>a,_h:()=>c,$R:()=>u,uY:()=>l,JY:()=>F,X5:()=>_,HY:()=>M,Kc:()=>A}),function(e){e.Uninitialized="Uninitialized",e.EngineLoading="EngineLoading",e.AssetsLoading="AssetsLoading",e.EngineReady="EngineReady",e.SceneReady="SceneReady",e.EngineUnsupported="EngineUnsupported",e.EngineLoadingError="EngineLoadingError"}(n||(n={})),function(e){e.Download="download",e.Load="load",e.Decode="decode"}(o||(o={})),function(e){e[e.Pending=0]="Pending",e[e.Ready=1]="Ready",e[e.Error=2]="Error"}(i||(i={})),function(e){e.Info="Info",e.Warning="Warning",e.Error="Error"}(a||(a={})),function(e){e.Added="DesignBlockAddedEvent",e.Updated="DesignBlockUpdatedEvent",e.Removed="DesignBlockRemovedEvent"}(s||(s={})),function(e){e.Scene="//ly.img.ubq/scene",e.Camera="//ly.img.ubq/camera",e.Page="//ly.img.ubq/page",e.Image="//ly.img.ubq/image",e.Text="//ly.img.ubq/text",e.Sticker="//ly.img.ubq/sticker",e.VectorPath="//ly.img.ubq/vector_path",e.RectShape="//ly.img.ubq/shapes/rect",e.LineShape="//ly.img.ubq/shapes/line",e.StarShape="//ly.img.ubq/shapes/star",e.PolygonShape="//ly.img.ubq/shapes/polygon",e.EllipseShape="//ly.img.ubq/shapes/ellipse"}(c||(c={})),function(e){e.Scene="ubq/designblocks/SceneProps",e.Camera="ubq/designblocks/Camera",e.Page="ubq/designblocks/Page",e.Image="ubq/designblocks/Image",e.Sticker="ubq/designblocks/Sticker",e.Text="ubq/designblocks/CompositedText",e.Crop="ubq/types/Crop",e.Scale="ubq/scene/Scale",e.Opacity="ubq/types/Opacity",e.FillColor="ubq/types/FillColor",e.BackgroundColor="ubq/types/BackgroundColor",e.Outline="ubq/types/Outline",e.VectorPath="ubq/designblocks/CESDKVectorPathProps",e.PendingState="ubq/designblocks/PendingState",e.ErrorState="ubq/designblocks/ErrorState"}(u||(u={}));const l="ubq/designblocks/CommonDesignBlockProps";var d,f,p,g,h,m,v;!function(e){e.Transform="ubq/editMode/transform",e.Crop="ubq/editMode/crop",e.Text="ubq/editMode/text"}(d||(d={})),function(e){e[e.Arrow=0]="Arrow",e[e.Move=1]="Move",e[e.MoveNotPermitted=2]="MoveNotPermitted",e[e.Resize=3]="Resize",e[e.Rotate=4]="Rotate",e[e.Text=5]="Text"}(f||(f={})),function(e){e.None="None",e.Normal="Normal",e.Darken="Darken",e.Multiply="Multiply",e.ColorBurn="ColorBurn",e.LinearBurn="LinearBurn",e.DarkenColor="DarkenColor",e.Lighten="Lighten",e.Screen="Screen",e.ColorDodge="ColorDodge",e.Add="Add",e.LightenColor="LightenColor",e.Overlay="Overlay",e.SoftLight="SoftLight",e.HardLight="HarfLight",e.VividLight="VividLight",e.LinearLight="LinearLight",e.PinLight="PinLight",e.HardMix="HardMix",e.Difference="Difference",e.Exclusion="Exclusion",e.Subtract="Substract",e.Divide="Divide"}(p||(p={})),function(e){e.None="None",e.Cover="Cover",e.Contain="Contain"}(g||(g={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Center=2]="Center"}(h||(h={})),function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom",e[e.Center=2]="Center"}(m||(m={})),function(e){e[e.Creator=0]="Creator",e[e.Adopter=1]="Adopter",e[e.Viewer=2]="Viewer",e[e.Presenter=3]="Presenter"}(v||(v={}));const b={c:.75,m:.68,y:.67,k:.9};var y,E,_,w,O,T,P,D,x,k,R,S,M,A;function F(e){return{colorSpace:y.sRGB,components:{x:e.r,y:e.g,z:e.b,w:e.a},spotColor:{name:"",rgbApproximation:e,cmykApproximation:b}}}!function(e){e[e.sRGB=0]="sRGB",e[e.CMYK=1]="CMYK",e[e.SpotColor=2]="SpotColor"}(y||(y={})),function(e){e[e.Information=0]="Information",e[e.Warning=1]="Warning",e[e.Error=2]="Error"}(E||(E={})),function(e){e[e.Pixel=0]="Pixel",e[e.Millimeter=1]="Millimeter",e[e.Inch=2]="Inch"}(_||(_={})),function(e){e[e.Began=0]="Began",e[e.Changed=1]="Changed",e[e.Ended=2]="Ended"}(w||(w={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Middle=2]="Middle",e[e.Unknown=255]="Unknown"}(O||(O={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(T||(T={})),function(e){e[e.Key0=0]="Key0",e[e.Key1=1]="Key1",e[e.Key2=2]="Key2",e[e.Key3=3]="Key3",e[e.Key4=4]="Key4",e[e.Key5=5]="Key5",e[e.Key6=6]="Key6",e[e.Key7=7]="Key7",e[e.Key8=8]="Key8",e[e.Key9=9]="Key9",e[e.A=10]="A",e[e.B=11]="B",e[e.C=12]="C",e[e.D=13]="D",e[e.E=14]="E",e[e.F=15]="F",e[e.G=16]="G",e[e.H=17]="H",e[e.I=18]="I",e[e.J=19]="J",e[e.K=20]="K",e[e.L=21]="L",e[e.M=22]="M",e[e.N=23]="N",e[e.O=24]="O",e[e.P=25]="P",e[e.Q=26]="Q",e[e.R=27]="R",e[e.S=28]="S",e[e.T=29]="T",e[e.U=30]="U",e[e.V=31]="V",e[e.W=32]="W",e[e.X=33]="X",e[e.Y=34]="Y",e[e.Z=35]="Z",e[e.ArrowLeft=36]="ArrowLeft",e[e.ArrowRight=37]="ArrowRight",e[e.ArrowUp=38]="ArrowUp",e[e.ArrowDown=39]="ArrowDown",e[e.Backspace=40]="Backspace",e[e.Enter=41]="Enter",e[e.Space=42]="Space",e[e.Escape=43]="Escape",e[e.Delete=44]="Delete",e[e.Control=45]="Control",e[e.Option=46]="Option",e[e.Shift=47]="Shift",e[e.Unknown=255]="Unknown"}(P||(P={})),function(e){e.ImageMatting="imageMatting",e.ImageMattingBackground="imageMattingBackground",e.ImageMattingBackgroundForInpainting="imageMattingBackgroundForInpainting",e.ImageMattingAlphaMatte="imageMattingAlphaMatte",e.ImageMattingInvertedAlphaMatte="imageMattingInvertedAlphaMatte",e.Inpainting="inpainting",e.InpaintingHighRes="inpaintingHighRes",e.SmartCrop="smartCrop",e.SuperResolution="superResolution"}(D||(D={})),function(e){e[e.Thin=100]="Thin",e[e.ExtraLight=200]="ExtraLight",e[e.Light=300]="Light",e[e.Normal=400]="Normal",e[e.Medium=500]="Medium",e[e.SemiBold=600]="SemiBold",e[e.Bold=700]="Bold",e[e.ExtraBold=800]="ExtraBold",e[e.Heavy=900]="Heavy"}(x||(x={})),function(e){e[e.Normal=0]="Normal",e[e.Italic=1]="Italic"}(k||(k={})),function(e){e.Bold="bold",e.Italic="italic"}(R||(R={})),function(e){e[e.Undefined=0]="Undefined",e[e.DesignUnit=1]="DesignUnit",e[e.Percent=2]="Percent",e[e.Auto=3]="Auto"}(S||(S={})),function(e){e.Png="image/png",e.Jpeg="image/jpeg",e.Tga="image/x-tga",e.Binary="application/octet-stream"}(M||(M={})),function(e){e[e.Free=0]="Free",e[e.VerticalStack=1]="VerticalStack",e[e.HorizontalStack=2]="HorizontalStack"}(A||(A={}))},59926:(e,t,r)=>{"use strict";r(56954),r(39069)},43579:(e,t,r)=>{"use strict";r(60850),r(64370),r(99817)},53496:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n,o=r(2821),i=r(56954),a=(r(43985),r(41940)),s=r(87109);const c=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var t,o,i=void 0!==(e=e||{})?e:{};i.ready=new Promise((function(e,r){t=e,o=r})),Object.getOwnPropertyDescriptor(i.ready,"_main")||(Object.defineProperty(i.ready,"_main",{configurable:!0,get:function(){Ue("You are getting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_main",{configurable:!0,set:function(){Ue("You are setting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_emscripten_stack_get_end")||(Object.defineProperty(i.ready,"_emscripten_stack_get_end",{configurable:!0,get:function(){Ue("You are getting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_emscripten_stack_get_end",{configurable:!0,set:function(){Ue("You are setting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_emscripten_stack_get_free")||(Object.defineProperty(i.ready,"_emscripten_stack_get_free",{configurable:!0,get:function(){Ue("You are getting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_emscripten_stack_get_free",{configurable:!0,set:function(){Ue("You are setting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_emscripten_stack_init")||(Object.defineProperty(i.ready,"_emscripten_stack_init",{configurable:!0,get:function(){Ue("You are getting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_emscripten_stack_init",{configurable:!0,set:function(){Ue("You are setting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_stackSave")||(Object.defineProperty(i.ready,"_stackSave",{configurable:!0,get:function(){Ue("You are getting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_stackSave",{configurable:!0,set:function(){Ue("You are setting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_stackRestore")||(Object.defineProperty(i.ready,"_stackRestore",{configurable:!0,get:function(){Ue("You are getting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_stackRestore",{configurable:!0,set:function(){Ue("You are setting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_stackAlloc")||(Object.defineProperty(i.ready,"_stackAlloc",{configurable:!0,get:function(){Ue("You are getting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_stackAlloc",{configurable:!0,set:function(){Ue("You are setting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___wasm_call_ctors")||(Object.defineProperty(i.ready,"___wasm_call_ctors",{configurable:!0,get:function(){Ue("You are getting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___wasm_call_ctors",{configurable:!0,set:function(){Ue("You are setting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_fflush")||(Object.defineProperty(i.ready,"_fflush",{configurable:!0,get:function(){Ue("You are getting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_fflush",{configurable:!0,set:function(){Ue("You are setting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___errno_location")||(Object.defineProperty(i.ready,"___errno_location",{configurable:!0,get:function(){Ue("You are getting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___errno_location",{configurable:!0,set:function(){Ue("You are setting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_malloc")||(Object.defineProperty(i.ready,"_malloc",{configurable:!0,get:function(){Ue("You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_malloc",{configurable:!0,set:function(){Ue("You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_free")||(Object.defineProperty(i.ready,"_free",{configurable:!0,get:function(){Ue("You are getting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_free",{configurable:!0,set:function(){Ue("You are setting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___dl_seterr")||(Object.defineProperty(i.ready,"___dl_seterr",{configurable:!0,get:function(){Ue("You are getting ___dl_seterr on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___dl_seterr",{configurable:!0,set:function(){Ue("You are setting ___dl_seterr on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_emscripten_webgl_make_context_current")||(Object.defineProperty(i.ready,"_emscripten_webgl_make_context_current",{configurable:!0,get:function(){Ue("You are getting _emscripten_webgl_make_context_current on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_emscripten_webgl_make_context_current",{configurable:!0,set:function(){Ue("You are setting _emscripten_webgl_make_context_current on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_emscripten_webgl_get_current_context")||(Object.defineProperty(i.ready,"_emscripten_webgl_get_current_context",{configurable:!0,get:function(){Ue("You are getting _emscripten_webgl_get_current_context on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_emscripten_webgl_get_current_context",{configurable:!0,set:function(){Ue("You are setting _emscripten_webgl_get_current_context on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_saveSetjmp")||(Object.defineProperty(i.ready,"_saveSetjmp",{configurable:!0,get:function(){Ue("You are getting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_saveSetjmp",{configurable:!0,set:function(){Ue("You are setting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_setThrew")||(Object.defineProperty(i.ready,"_setThrew",{configurable:!0,get:function(){Ue("You are getting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_setThrew",{configurable:!0,set:function(){Ue("You are setting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_memalign")||(Object.defineProperty(i.ready,"_memalign",{configurable:!0,get:function(){Ue("You are getting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_memalign",{configurable:!0,set:function(){Ue("You are setting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"_emscripten_main_thread_process_queued_calls")||(Object.defineProperty(i.ready,"_emscripten_main_thread_process_queued_calls",{configurable:!0,get:function(){Ue("You are getting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_emscripten_main_thread_process_queued_calls",{configurable:!0,set:function(){Ue("You are setting _emscripten_main_thread_process_queued_calls on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___getTypeName")||(Object.defineProperty(i.ready,"___getTypeName",{configurable:!0,get:function(){Ue("You are getting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___getTypeName",{configurable:!0,set:function(){Ue("You are setting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___embind_register_native_and_builtin_types")||(Object.defineProperty(i.ready,"___embind_register_native_and_builtin_types",{configurable:!0,get:function(){Ue("You are getting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___embind_register_native_and_builtin_types",{configurable:!0,set:function(){Ue("You are setting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"onRuntimeInitialized")||(Object.defineProperty(i.ready,"onRuntimeInitialized",{configurable:!0,get:function(){Ue("You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"onRuntimeInitialized",{configurable:!0,set:function(){Ue("You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),i.expectedDataFileDownloads||(i.expectedDataFileDownloads=0),i.expectedDataFileDownloads++,function(e){"object"==typeof window?window.encodeURIComponent(window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/"):"undefined"==typeof process&&"undefined"!=typeof location&&encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/");var t="cesdk.data";"function"!=typeof i.locateFilePackage||i.locateFile||(i.locateFile=i.locateFilePackage,P("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)"));var r,n,o,a,s=i.locateFile?i.locateFile(t,""):t,c=e.remote_package_size,u=null,l=i.getPreloadedPackage?i.getPreloadedPackage(s,c):null;function d(){function t(e,t){if(!e)throw t+(new Error).stack}function r(e,t,r){this.start=e,this.end=t,this.audio=r}i.FS_createPath("/","ly.img.cesdk",!0,!0),i.FS_createPath("/ly.img.cesdk","images",!0,!0),i.FS_createPath("/ly.img.cesdk","shaders",!0,!0),i.FS_createPath("/ly.img.cesdk/shaders","common",!0,!0),i.FS_createPath("/ly.img.cesdk","presets",!0,!0),i.FS_createPath("/ly.img.cesdk","fonts",!0,!0),r.prototype={requests:{},open:function(e,t){this.name=t,this.requests[t]=this,i.addRunDependency("fp "+this.name)},send:function(){},onload:function(){var e=this.byteArray.subarray(this.start,this.end);this.finish(e)},finish:function(e){i.FS_createDataFile(this.name,null,e,!0,!0,!0),i.removeRunDependency("fp "+this.name),this.requests[this.name]=null}};for(var n=e.files,o=0;o<n.length;++o)new r(n[o].start,n[o].end,n[o].audio||0).open("GET",n[o].filename);function a(n){t(n,"Loading data file failed."),t(n instanceof ArrayBuffer,"bad input to processPackageData");var o=new Uint8Array(n);r.prototype.byteArray=o;for(var a=e.files,s=0;s<a.length;++s)r.prototype.requests[a[s].filename].onload();i.removeRunDependency("datafile_cesdk.data")}i.addRunDependency("datafile_cesdk.data"),i.preloadResults||(i.preloadResults={}),i.preloadResults["cesdk.data"]={fromCache:!1},l?(a(l),l=null):u=a}l||(r=s,n=c,o=function(e){u?(u(e),u=null):l=e},(a=new XMLHttpRequest).open("GET",r,!0),a.responseType="arraybuffer",a.onprogress=function(e){var t=r,o=n;if(e.total&&(o=e.total),e.loaded){a.addedTotal?i.dataFileDownloads[t].loaded=e.loaded:(a.addedTotal=!0,i.dataFileDownloads||(i.dataFileDownloads={}),i.dataFileDownloads[t]={loaded:e.loaded,total:o});var s=0,c=0,u=0;for(var l in i.dataFileDownloads){var d=i.dataFileDownloads[l];s+=d.total,c+=d.loaded,u++}s=Math.ceil(s*i.expectedDataFileDownloads/u),i.setStatus&&i.setStatus("Downloading data... ("+c+"/"+s+")")}else i.dataFileDownloads||i.setStatus&&i.setStatus("Downloading data...")},a.onerror=function(e){throw new Error("NetworkError for: "+r)},a.onload=function(e){if(!(200==a.status||304==a.status||206==a.status||0==a.status&&a.response))throw new Error(a.statusText+" : "+a.responseURL);var t=a.response;o(t)},a.send(null)),i.calledRun?d():(i.preRun||(i.preRun=[]),i.preRun.push(d))}({files:[{filename:"/ly.img.cesdk/.DS_Store",start:0,end:6148},{filename:"/ly.img.cesdk/images/watermark.png",start:6148,end:96295},{filename:"/ly.img.cesdk/shaders/liquid.sksl",start:96295,end:98905},{filename:"/ly.img.cesdk/shaders/mirror.sksl",start:98905,end:99359},{filename:"/ly.img.cesdk/shaders/outliner.sksl",start:99359,end:100996},{filename:"/ly.img.cesdk/shaders/tv_glitch.sksl",start:100996,end:103933},{filename:"/ly.img.cesdk/shaders/mask_color.sksl",start:103933,end:104435},{filename:"/ly.img.cesdk/shaders/lut_filter.sksl",start:104435,end:107298},{filename:"/ly.img.cesdk/shaders/vignette.sksl",start:107298,end:107670},{filename:"/ly.img.cesdk/shaders/sharpie.sksl",start:107670,end:109975},{filename:"/ly.img.cesdk/shaders/hsp_selective_adjustments.sksl",start:109975,end:123575},{filename:"/ly.img.cesdk/shaders/half_tone.sksl",start:123575,end:124069},{filename:"/ly.img.cesdk/shaders/tiltshift.sksl",start:124069,end:124701},{filename:"/ly.img.cesdk/shaders/pixelize.sksl",start:124701,end:125001},{filename:"/ly.img.cesdk/shaders/linocut.sksl",start:125001,end:125786},{filename:"/ly.img.cesdk/shaders/glow.sksl",start:125786,end:126753},{filename:"/ly.img.cesdk/shaders/radial_pixel.sksl",start:126753,end:127316},{filename:"/ly.img.cesdk/shaders/black_and_white_color_mixer.sksl",start:127316,end:133633},{filename:"/ly.img.cesdk/shaders/shifter.sksl",start:133633,end:134317},{filename:"/ly.img.cesdk/shaders/posterize.sksl",start:134317,end:134529},{filename:"/ly.img.cesdk/shaders/dot_pattern.sksl",start:134529,end:135044},{filename:"/ly.img.cesdk/shaders/adjustments.sksl",start:135044,end:138933},{filename:"/ly.img.cesdk/shaders/extrude_blur.sksl",start:138933,end:141050},{filename:"/ly.img.cesdk/shaders/duotone_filter.sksl",start:141050,end:142014},{filename:"/ly.img.cesdk/shaders/cross_cut.sksl",start:142014,end:142841},{filename:"/ly.img.cesdk/shaders/placeholder_overlay_lines.sksl",start:142841,end:143422},{filename:"/ly.img.cesdk/shaders/common/ubq_constants.sksl",start:143422,end:143912},{filename:"/ly.img.cesdk/shaders/common/ubq_adjustments.sksl",start:143912,end:148475},{filename:"/ly.img.cesdk/shaders/common/ubq_color_conversions.sksl",start:148475,end:158460},{filename:"/ly.img.cesdk/shaders/common/ubq_hue_constants.sksl",start:158460,end:161627},{filename:"/ly.img.cesdk/presets/.keep",start:161627,end:161627},{filename:"/ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",start:161627,end:432387}],remote_package_size:432387,package_uuid:"dce9b362-3655-41d6-a879-93fa46750d1d"});var a=i.preRun.slice();"object"==typeof window&&"object"==typeof window.performance?i.performance=performance:"object"==typeof r.g&&"object"==typeof r.g.perf_hooks&&"object"==typeof r.g.perf_hooks.performance?i.performance=r.g.perf_hooks.performance:i.performance={mark:function(){},measure:function(){}},i.emscripten_ubq_asyncFetchStates=new Map,i.emscripten_ubq_asyncFetchCompletedBytes=new Map,i.emscripten_ubq_asyncFetchTotalBytes=new Map,i.emscripten_ubq_asyncFetchHeaders=new Map,i.emscripten_ubq_asyncFetchNextHandle=0,i.emscripten_ubq_asyncFetchNextHeaderHandle=0;const s={PENDING:0,FINISHED:1,ALLOCATED:2,ERROR:3},c=["GET","POST"];if(!i.preRun)throw"Module.preRun should exist because file support used it; did a pre-js delete it?";a.forEach((function(e){if(i.preRun.indexOf(e)<0)throw"All preRun tasks that exist before user pre-js code should remain after; did you replace Module or modify Module.preRun?"}));var u,l={};for(u in i)i.hasOwnProperty(u)&&(l[u]=i[u]);var d=[],f="./this.program",p=function(e,t){throw t},g=!0,h=!1,m=!1,v=!1;if(i.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var b,y,E,_="";function w(e){return i.locateFile?i.locateFile(e,_):_+e}function O(e){if(!(e instanceof Vd)){var t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),P("exiting due to exception: "+t)}}if(v){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(b=function(e){return read(e)}),E=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(j("object"==typeof(t=read(e,"binary"))),t)},y=function(e,t,r){setTimeout((function(){t(E(e))}),0)},"undefined"!=typeof scriptArgs?d=scriptArgs:void 0!==arguments&&(d=arguments),"function"==typeof quit&&(p=function(e,t){O(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!g&&!h)throw new Error("environment detection error");if(h?_=self.location.href:"undefined"!=typeof document&&document.currentScript&&(_=document.currentScript.src),n&&(_=n),_=0!==_.indexOf("blob:")?_.substr(0,_.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");b=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h&&(E=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),y=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var T=i.print||console.log.bind(console),P=i.printErr||console.warn.bind(console);for(u in l)l.hasOwnProperty(u)&&(i[u]=l[u]);function D(e){D.shown||(D.shown={}),D.shown[e]||(D.shown[e]=1,P(e))}l=null,i.arguments&&(d=i.arguments),Object.getOwnPropertyDescriptor(i,"arguments")||Object.defineProperty(i,"arguments",{configurable:!0,get:function(){Ue("Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),i.thisProgram&&(f=i.thisProgram),Object.getOwnPropertyDescriptor(i,"thisProgram")||Object.defineProperty(i,"thisProgram",{configurable:!0,get:function(){Ue("Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),i.quit&&(p=i.quit),Object.getOwnPropertyDescriptor(i,"quit")||Object.defineProperty(i,"quit",{configurable:!0,get:function(){Ue("Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),j(void 0===i.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),j(void 0===i.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),j(void 0===i.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),j(void 0===i.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),j(void 0===i.read,"Module.read option was removed (modify read_ in JS)"),j(void 0===i.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),j(void 0===i.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),j(void 0===i.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),j(void 0===i.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Object.getOwnPropertyDescriptor(i,"read")||Object.defineProperty(i,"read",{configurable:!0,get:function(){Ue("Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(i,"readAsync")||Object.defineProperty(i,"readAsync",{configurable:!0,get:function(){Ue("Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(i,"readBinary")||Object.defineProperty(i,"readBinary",{configurable:!0,get:function(){Ue("Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(i,"setWindowTitle")||Object.defineProperty(i,"setWindowTitle",{configurable:!0,get:function(){Ue("Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),j(!h,"worker environment detected but not enabled at build time. Add 'worker' to `-s ENVIRONMENT` to enable."),j(!m,"node environment detected but not enabled at build time. Add 'node' to `-s ENVIRONMENT` to enable."),j(!v,"shell environment detected but not enabled at build time. Add 'shell' to `-s ENVIRONMENT` to enable.");var x,k=0,R=function(e){k=e},S=function(){return k};i.wasmBinary&&(x=i.wasmBinary),Object.getOwnPropertyDescriptor(i,"wasmBinary")||Object.defineProperty(i,"wasmBinary",{configurable:!0,get:function(){Ue("Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}});var M,A=i.noExitRuntime||!0;function F(e,t,r){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return Z[e>>0];case"i16":return q[e>>1];case"i32":case"i64":return W[e>>2];case"float":return Y[e>>2];case"double":return Number($[e>>3]);default:Ue("invalid type for getValue: "+t)}return null}Object.getOwnPropertyDescriptor(i,"noExitRuntime")||Object.defineProperty(i,"noExitRuntime",{configurable:!0,get:function(){Ue("Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),"object"!=typeof WebAssembly&&Ue("no native wasm support detected");var L,C=!1;function j(e,t){e||Ue("Assertion failed: "+t)}var I="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function N(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&I)return I.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|c:(240!=(248&a)&&D("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),a=(7&a)<<18|s<<12|c<<6|63&e[t++]),a<65536)i+=String.fromCharCode(a);else{var u=a-65536;i+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function U(e,t){return e?N(G,e,t):""}function H(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;s>1114111&&D("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function B(e,t,r){return j("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),H(e,G,t,r)}function X(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var Q,Z,G,q,V,W,z,Y,$,K="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function J(e,t){j(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r=e,n=r>>1,o=n+t/2;!(n>=o)&&V[n];)++n;if((r=n<<1)-e>32&&K)return K.decode(G.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=q[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ee(e,t,r){if(j(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),j("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);q[t>>1]=a,t+=2}return q[t>>1]=0,t-n}function te(e){return 2*e.length}function re(e,t){j(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var o=W[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function ne(e,t,r){if(j(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),j("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),W[t>>2]=a,(t+=4)+4>o)break}return W[t>>2]=0,t-n}function oe(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t}function ie(e){var t=X(e)+1,r=kd(t);return H(e,Z,r,t),r}function ae(e,t){j(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),Z.set(e,t)}function se(e,t,r){for(var n=0;n<e.length;++n)j(e.charCodeAt(n)===(255&e.charCodeAt(n))),Z[t++>>0]=e.charCodeAt(n);r||(Z[t>>0]=0)}function ce(e,t){return e%t>0&&(e+=t-e%t),e}function ue(e){Q=e,i.HEAP8=Z=new Int8Array(e),i.HEAP16=q=new Int16Array(e),i.HEAP32=W=new Int32Array(e),i.HEAPU8=G=new Uint8Array(e),i.HEAPU16=V=new Uint16Array(e),i.HEAPU32=z=new Uint32Array(e),i.HEAPF32=Y=new Float32Array(e),i.HEAPF64=$=new Float64Array(e)}var le=5242880;i.TOTAL_STACK&&j(le===i.TOTAL_STACK,"the stack size can no longer be determined at runtime");var de,fe=i.INITIAL_MEMORY||268435456;function pe(){var e=Sd();j(0==(3&e)),W[e+4>>2]=34821223,W[e+8>>2]=2310721022,W[0]=1668509029}function ge(){if(!C){var e=Sd(),t=z[e+4>>2],r=z[e+8>>2];34821223==t&&2310721022==r||Ue("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" "+t.toString(16)),1668509029!==W[0]&&Ue("Runtime error: The application has corrupted its heap memory area (address zero)!")}}Object.getOwnPropertyDescriptor(i,"INITIAL_MEMORY")||Object.defineProperty(i,"INITIAL_MEMORY",{configurable:!0,get:function(){Ue("Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),j(fe>=le,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+fe+"! (TOTAL_STACK="+le+")"),j("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),j(!i.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),j(268435456==fe,"Detected runtime INITIAL_MEMORY setting. Use -s IMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)"}();var he=[],me=[],ve=[],be=[],ye=[],Ee=!1,_e=!1,we=0;function Oe(){return A||we>0}function Te(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)Re(i.preRun.shift());Ye(he)}function Pe(){ge(),j(!Ee),Ee=!0,i.noFSInit||yt.init.initialized||yt.init(),yt.ignorePermissions=!1,dt.init(),Ye(me)}function De(){ge(),Ye(ve)}function xe(){ge(),_e=!0}function ke(){if(ge(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)Me(i.postRun.shift());Ye(ye)}function Re(e){he.unshift(e)}function Se(e){me.unshift(e)}function Me(e){ye.unshift(e)}j(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),j(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),j(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),j(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var Ae=0,Fe=null,Le=null,Ce={};function je(e){for(var t=e;;){if(!Ce[e])return e;e=t+Math.random()}}function Ie(e){Ae++,i.monitorRunDependencies&&i.monitorRunDependencies(Ae),e?(j(!Ce[e]),Ce[e]=1,null===Fe&&"undefined"!=typeof setInterval&&(Fe=setInterval((function(){if(C)return clearInterval(Fe),void(Fe=null);var e=!1;for(var t in Ce)e||(e=!0,P("still waiting on run dependencies:")),P("dependency: "+t);e&&P("(end of list)")}),1e4))):P("warning: run dependency added without ID")}function Ne(e){if(Ae--,i.monitorRunDependencies&&i.monitorRunDependencies(Ae),e?(j(Ce[e]),delete Ce[e]):P("warning: run dependency removed without ID"),0==Ae&&(null!==Fe&&(clearInterval(Fe),Fe=null),Le)){var t=Le;Le=null,t()}}function Ue(e){i.onAbort&&i.onAbort(e),P(e="Aborted("+e+")"),C=!0,L=1;var t=new WebAssembly.RuntimeError(e);throw o(t),t}i.preloadedImages={},i.preloadedAudios={};var He,Be,Xe,Qe="data:application/octet-stream;base64,";function Ze(e){return e.startsWith(Qe)}function Ge(e){return e.startsWith("file://")}function qe(e,t){return function(){var r=e,n=t;return t||(n=i.asm),j(Ee,"native function `"+r+"` called before runtime initialization"),j(!_e,"native function `"+r+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n[e]||j(n[e],"exported native function `"+r+"` not found"),n[e].apply(null,arguments)}}function Ve(e){try{if(e==He&&x)return new Uint8Array(x);if(E)return E(e);throw"both async and sync fetching of the wasm failed"}catch(e){Ue(e)}}function We(){return x||!g&&!h||"function"!=typeof fetch?Promise.resolve().then((function(){return Ve(He)})):fetch(He,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+He+"'";return e.arrayBuffer()})).catch((function(){return Ve(He)}))}function ze(){var e={env:_d,wasi_snapshot_preview1:_d};function t(e,t){var r=e.exports;i.asm=r,j(M=i.asm.memory,"memory not found in wasm exports"),ue(M.buffer),j(de=i.asm.__indirect_function_table,"table not found in wasm exports"),Se(i.asm.__wasm_call_ctors),Ne("wasm-instantiate")}Ie("wasm-instantiate");var r=i;function n(e){j(i===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(e.instance)}function a(t){return We().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){P("failed to asynchronously prepare wasm: "+e),Ge(He)&&P("warning: Loading from a file URI ("+He+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),Ue(e)}))}if(i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){return P("Module.instantiateWasm callback failed with error: "+e),!1}return(x||"function"!=typeof WebAssembly.instantiateStreaming||Ze(He)||"function"!=typeof fetch?a(n):fetch(He,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){return P("wasm streaming compile failed: "+e),P("falling back to ArrayBuffer instantiation"),a(n)}))}))).catch(o),{}}function Ye(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?et(r)():et(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(i)}}function $e(e){return D("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function Ke(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=$e(e);return e===t?e:t+" ["+e+"]"}))}Ze(He="cesdk.wasm")||(He=w(He));var Je=[];function et(e){var t=Je[e];return t||(e>=Je.length&&(Je.length=e+1),Je[e]=t=de.get(e)),j(de.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function tt(e){if(e instanceof Vd||"unwind"==e)return L;p(1,e)}function rt(e,t,r,n){Ue("Assertion failed: "+U(e)+", at: "+[t?U(t):"unknown filename",r,n?U(n):"unknown function"])}function nt(e){return wd(e+16)+16}function ot(e,t){}function it(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(e){W[this.ptr+4>>2]=e},this.get_type=function(){return W[this.ptr+4>>2]},this.set_destructor=function(e){W[this.ptr+8>>2]=e},this.get_destructor=function(){return W[this.ptr+8>>2]},this.set_refcount=function(e){W[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,Z[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=Z[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,Z[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=Z[this.ptr+13>>0]},this.init=function(e,t){this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=W[this.ptr>>2];W[this.ptr>>2]=e+1},this.release_ref=function(){var e=W[this.ptr>>2];return W[this.ptr>>2]=e-1,j(e>0),1===e}}function at(e,t,r){throw new it(e).init(t,r),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch."}function st(e){return W[Td()>>2]=e,e}var ct={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=ct.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=ct.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(e){if("/"===e)return"/";var t=(e=(e=ct.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return ct.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return ct.normalize(e.join("/"))},join2:function(e,t){return ct.normalize(e+"/"+t)}};function ut(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){Ue("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")}}var lt={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:yt.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t="/"===n.charAt(0)}return(t?"/":"")+(e=ct.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=lt.resolve(e).substr(1),t=lt.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var c=[];for(s=a;s<n.length;s++)c.push("..");return(c=c.concat(o.slice(a))).join("/")}},dt={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){dt.ttys[e]={input:[],output:[],ops:t},yt.registerDevice(e,dt.stream_ops)},stream_ops:{open:function(e){var t=dt.ttys[e.node.rdev];if(!t)throw new yt.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new yt.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new yt.ErrnoError(29)}if(void 0===s&&0===i)throw new yt.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new yt.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new yt.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=yd(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(T(N(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(T(N(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(P(N(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(P(N(e.output,0)),e.output=[])}}};function ft(e,t){G.fill(0,e,e+t)}function pt(e,t){return j(t,"alignment argument is required"),Math.ceil(e/t)*t}function gt(e){e=pt(e,65536);var t=Ad(65536,e);return t?(ft(t,e),t):0}var ht={ops_table:null,mount:function(e){return ht.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(yt.isBlkdev(r)||yt.isFIFO(r))throw new yt.ErrnoError(63);ht.ops_table||(ht.ops_table={dir:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr,lookup:ht.node_ops.lookup,mknod:ht.node_ops.mknod,rename:ht.node_ops.rename,unlink:ht.node_ops.unlink,rmdir:ht.node_ops.rmdir,readdir:ht.node_ops.readdir,symlink:ht.node_ops.symlink},stream:{llseek:ht.stream_ops.llseek}},file:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr},stream:{llseek:ht.stream_ops.llseek,read:ht.stream_ops.read,write:ht.stream_ops.write,allocate:ht.stream_ops.allocate,mmap:ht.stream_ops.mmap,msync:ht.stream_ops.msync}},link:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr,readlink:ht.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr},stream:yt.chrdev_stream_ops}});var o=yt.createNode(e,t,r,n);return yt.isDir(o.mode)?(o.node_ops=ht.ops_table.dir.node,o.stream_ops=ht.ops_table.dir.stream,o.contents={}):yt.isFile(o.mode)?(o.node_ops=ht.ops_table.file.node,o.stream_ops=ht.ops_table.file.stream,o.usedBytes=0,o.contents=null):yt.isLink(o.mode)?(o.node_ops=ht.ops_table.link.node,o.stream_ops=ht.ops_table.link.stream):yt.isChrdev(o.mode)&&(o.node_ops=ht.ops_table.chrdev.node,o.stream_ops=ht.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=yt.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,yt.isDir(e.mode)?t.size=4096:yt.isFile(e.mode)?t.size=e.usedBytes:yt.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&ht.resizeFileStorage(e,t.size)},lookup:function(e,t){throw yt.genericErrors[44]},mknod:function(e,t,r,n){return ht.createNode(e,t,r,n)},rename:function(e,t,r){if(yt.isDir(e.mode)){var n;try{n=yt.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new yt.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=yt.lookupNode(e,t);for(var n in r.contents)throw new yt.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=ht.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!yt.isLink(e.mode))throw new yt.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(j(a>=0),a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write:function(e,t,r,n,o,i){if(j(!(t instanceof ArrayBuffer)),t.buffer===Z.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return j(0===o,"canOwn must imply no weird position inside the file"),a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(ht.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&yt.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new yt.ErrnoError(28);return n},allocate:function(e,t,r){ht.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o,i){if(0!==t)throw new yt.ErrnoError(28);if(!yt.isFile(e.node.mode))throw new yt.ErrnoError(43);var a,s,c=e.node.contents;if(2&i||c.buffer!==Q){if((n>0||n+r<c.length)&&(c=c.subarray?c.subarray(n,n+r):Array.prototype.slice.call(c,n,n+r)),s=!0,!(a=gt(r)))throw new yt.ErrnoError(48);Z.set(c,a)}else s=!1,a=c.byteOffset;return{ptr:a,allocated:s}},msync:function(e,t,r,n,o){if(!yt.isFile(e.node.mode))throw new yt.ErrnoError(43);return 2&o||ht.stream_ops.write(e,t,0,n,r,!1),0}}};function mt(e,t,r,n){var o=n?"":je("al "+e);y(e,(function(r){j(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&Ne(o)}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&Ie(o)}var vt={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},bt={},yt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(e,t){if(t=t||{},!(e=lt.resolve(yt.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===t[n]&&(t[n]=r[n]);if(t.recurse_count>8)throw new yt.ErrnoError(32);for(var o=ct.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),i=yt.root,a="/",s=0;s<o.length;s++){var c=s===o.length-1;if(c&&t.parent)break;if(i=yt.lookupNode(i,o[s]),a=ct.join2(a,o[s]),yt.isMountpoint(i)&&(!c||c&&t.follow_mount)&&(i=i.mounted.root),!c||t.follow)for(var u=0;yt.isLink(i.mode);){var l=yt.readlink(a);if(a=lt.resolve(ct.dirname(a),l),i=yt.lookupPath(a,{recurse_count:t.recurse_count}).node,u++>40)throw new yt.ErrnoError(32)}}return{path:a,node:i}},getPath:function(e){for(var t;;){if(yt.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%yt.nameTable.length},hashAddNode:function(e){var t=yt.hashName(e.parent.id,e.name);e.name_next=yt.nameTable[t],yt.nameTable[t]=e},hashRemoveNode:function(e){var t=yt.hashName(e.parent.id,e.name);if(yt.nameTable[t]===e)yt.nameTable[t]=e.name_next;else for(var r=yt.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=yt.mayLookup(e);if(r)throw new yt.ErrnoError(r,e);for(var n=yt.hashName(e.id,t),o=yt.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return yt.lookup(e,t)},createNode:function(e,t,r,n){j("object"==typeof e);var o=new yt.FSNode(e,t,r,n);return yt.hashAddNode(o),o},destroyNode:function(e){yt.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(e){var t=yt.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return yt.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2},mayLookup:function(e){return yt.nodePermissions(e,"x")||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return yt.lookupNode(e,t),20}catch(e){}return yt.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var n;try{n=yt.lookupNode(e,t)}catch(e){return e.errno}var o=yt.nodePermissions(e,"wx");if(o)return o;if(r){if(!yt.isDir(n.mode))return 54;if(yt.isRoot(n)||yt.getPath(n)===yt.cwd())return 10}else if(yt.isDir(n.mode))return 31;return 0},mayOpen:function(e,t){return e?yt.isLink(e.mode)?32:yt.isDir(e.mode)&&("r"!==yt.flagsToPermissionString(t)||512&t)?31:yt.nodePermissions(e,yt.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||yt.MAX_OPEN_FDS;for(var r=e;r<=t;r++)if(!yt.streams[r])return r;throw new yt.ErrnoError(33)},getStream:function(e){return yt.streams[e]},createStream:function(e,t,r){yt.FSStream||(yt.FSStream=function(){},yt.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new yt.FSStream;for(var o in e)n[o]=e[o];e=n;var i=yt.nextfd(t,r);return e.fd=i,yt.streams[i]=e,e},closeStream:function(e){yt.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=yt.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new yt.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){yt.devices[e]={stream_ops:t}},getDevice:function(e){return yt.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),yt.syncFSRequests++,yt.syncFSRequests>1&&P("warning: "+yt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=yt.getMounts(yt.root.mount),n=0;function o(e){return j(yt.syncFSRequests>0),yt.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:function(e,t,r){if("string"==typeof e)throw e;var n,o="/"===r,i=!r;if(o&&yt.root)throw new yt.ErrnoError(10);if(!o&&!i){var a=yt.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,yt.isMountpoint(n))throw new yt.ErrnoError(10);if(!yt.isDir(n.mode))throw new yt.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,o?yt.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:function(e){var t=yt.lookupPath(e,{follow_mount:!1});if(!yt.isMountpoint(t.node))throw new yt.ErrnoError(28);var r=t.node,n=r.mounted,o=yt.getMounts(n);Object.keys(yt.nameTable).forEach((function(e){for(var t=yt.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&yt.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);j(-1!==i),r.mount.mounts.splice(i,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var n=yt.lookupPath(e,{parent:!0}).node,o=ct.basename(e);if(!o||"."===o||".."===o)throw new yt.ErrnoError(28);var i=yt.mayCreate(n,o);if(i)throw new yt.ErrnoError(i);if(!n.node_ops.mknod)throw new yt.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,yt.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,yt.mknod(e,t,0)},mkdirTree:function(e,t){for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{yt.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:function(e,t,r){return void 0===r&&(r=t,t=438),t|=8192,yt.mknod(e,t,r)},symlink:function(e,t){if(!lt.resolve(e))throw new yt.ErrnoError(44);var r=yt.lookupPath(t,{parent:!0}).node;if(!r)throw new yt.ErrnoError(44);var n=ct.basename(t),o=yt.mayCreate(r,n);if(o)throw new yt.ErrnoError(o);if(!r.node_ops.symlink)throw new yt.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:function(e,t){var r,n,o=ct.dirname(e),i=ct.dirname(t),a=ct.basename(e),s=ct.basename(t);if(r=yt.lookupPath(e,{parent:!0}).node,n=yt.lookupPath(t,{parent:!0}).node,!r||!n)throw new yt.ErrnoError(44);if(r.mount!==n.mount)throw new yt.ErrnoError(75);var c,u=yt.lookupNode(r,a),l=lt.relative(e,i);if("."!==l.charAt(0))throw new yt.ErrnoError(28);if("."!==(l=lt.relative(t,o)).charAt(0))throw new yt.ErrnoError(55);try{c=yt.lookupNode(n,s)}catch(e){}if(u!==c){var d=yt.isDir(u.mode),f=yt.mayDelete(r,a,d);if(f)throw new yt.ErrnoError(f);if(f=c?yt.mayDelete(n,s,d):yt.mayCreate(n,s))throw new yt.ErrnoError(f);if(!r.node_ops.rename)throw new yt.ErrnoError(63);if(yt.isMountpoint(u)||c&&yt.isMountpoint(c))throw new yt.ErrnoError(10);if(n!==r&&(f=yt.nodePermissions(r,"w")))throw new yt.ErrnoError(f);yt.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(e){throw e}finally{yt.hashAddNode(u)}}},rmdir:function(e){var t=yt.lookupPath(e,{parent:!0}).node,r=ct.basename(e),n=yt.lookupNode(t,r),o=yt.mayDelete(t,r,!0);if(o)throw new yt.ErrnoError(o);if(!t.node_ops.rmdir)throw new yt.ErrnoError(63);if(yt.isMountpoint(n))throw new yt.ErrnoError(10);t.node_ops.rmdir(t,r),yt.destroyNode(n)},readdir:function(e){var t=yt.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new yt.ErrnoError(54);return t.node_ops.readdir(t)},unlink:function(e){var t=yt.lookupPath(e,{parent:!0}).node,r=ct.basename(e),n=yt.lookupNode(t,r),o=yt.mayDelete(t,r,!1);if(o)throw new yt.ErrnoError(o);if(!t.node_ops.unlink)throw new yt.ErrnoError(63);if(yt.isMountpoint(n))throw new yt.ErrnoError(10);t.node_ops.unlink(t,r),yt.destroyNode(n)},readlink:function(e){var t=yt.lookupPath(e).node;if(!t)throw new yt.ErrnoError(44);if(!t.node_ops.readlink)throw new yt.ErrnoError(28);return lt.resolve(yt.getPath(t.parent),t.node_ops.readlink(t))},stat:function(e,t){var r=yt.lookupPath(e,{follow:!t}).node;if(!r)throw new yt.ErrnoError(44);if(!r.node_ops.getattr)throw new yt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(e){return yt.stat(e,!0)},chmod:function(e,t,r){var n;if(!(n="string"==typeof e?yt.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:function(e,t){yt.chmod(e,t,!0)},fchmod:function(e,t){var r=yt.getStream(e);if(!r)throw new yt.ErrnoError(8);yt.chmod(r.node,t)},chown:function(e,t,r,n){var o;if(!(o="string"==typeof e?yt.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(e,t,r){yt.chown(e,t,r,!0)},fchown:function(e,t,r){var n=yt.getStream(e);if(!n)throw new yt.ErrnoError(8);yt.chown(n.node,t,r)},truncate:function(e,t){if(t<0)throw new yt.ErrnoError(28);var r;if(!(r="string"==typeof e?yt.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);if(yt.isDir(r.mode))throw new yt.ErrnoError(31);if(!yt.isFile(r.mode))throw new yt.ErrnoError(28);var n=yt.nodePermissions(r,"w");if(n)throw new yt.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:function(e,t){var r=yt.getStream(e);if(!r)throw new yt.ErrnoError(8);if(0==(2097155&r.flags))throw new yt.ErrnoError(28);yt.truncate(r.node,t)},utime:function(e,t,r){var n=yt.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:function(e,t,r,n,o){if(""===e)throw new yt.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?yt.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)a=e;else{e=ct.normalize(e);try{a=yt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new yt.ErrnoError(20)}else a=yt.mknod(e,r,0),s=!0;if(!a)throw new yt.ErrnoError(44);if(yt.isChrdev(a.mode)&&(t&=-513),65536&t&&!yt.isDir(a.mode))throw new yt.ErrnoError(54);if(!s){var c=yt.mayOpen(a,t);if(c)throw new yt.ErrnoError(c)}512&t&&yt.truncate(a,0),t&=-131713;var u=yt.createStream({node:a,path:yt.getPath(a),id:a.id,flags:t,mode:a.mode,seekable:!0,position:0,stream_ops:a.stream_ops,node_ops:a.node_ops,ungotten:[],error:!1},n,o);return u.stream_ops.open&&u.stream_ops.open(u),!i.logReadFiles||1&t||(yt.readFiles||(yt.readFiles={}),e in yt.readFiles||(yt.readFiles[e]=1)),u},close:function(e){if(yt.isClosed(e))throw new yt.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{yt.closeStream(e.fd)}e.fd=null},isClosed:function(e){return null===e.fd},llseek:function(e,t,r){if(yt.isClosed(e))throw new yt.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new yt.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new yt.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:function(e,t,r,n,o){if(n<0||o<0)throw new yt.ErrnoError(28);if(yt.isClosed(e))throw new yt.ErrnoError(8);if(1==(2097155&e.flags))throw new yt.ErrnoError(8);if(yt.isDir(e.node.mode))throw new yt.ErrnoError(31);if(!e.stream_ops.read)throw new yt.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new yt.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:function(e,t,r,n,o,i){if(n<0||o<0)throw new yt.ErrnoError(28);if(yt.isClosed(e))throw new yt.ErrnoError(8);if(0==(2097155&e.flags))throw new yt.ErrnoError(8);if(yt.isDir(e.node.mode))throw new yt.ErrnoError(31);if(!e.stream_ops.write)throw new yt.ErrnoError(28);e.seekable&&1024&e.flags&&yt.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new yt.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=s),s},allocate:function(e,t,r){if(yt.isClosed(e))throw new yt.ErrnoError(8);if(t<0||r<=0)throw new yt.ErrnoError(28);if(0==(2097155&e.flags))throw new yt.ErrnoError(8);if(!yt.isFile(e.node.mode)&&!yt.isDir(e.node.mode))throw new yt.ErrnoError(43);if(!e.stream_ops.allocate)throw new yt.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:function(e,t,r,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new yt.ErrnoError(2);if(1==(2097155&e.flags))throw new yt.ErrnoError(2);if(!e.stream_ops.mmap)throw new yt.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o,i)},msync:function(e,t,r,n,o){return e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0},munmap:function(e){return 0},ioctl:function(e,t,r){if(!e.stream_ops.ioctl)throw new yt.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:function(e,t){if((t=t||{}).flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=yt.open(e,t.flags),o=yt.stat(e).size,i=new Uint8Array(o);return yt.read(n,i,0,o,0),"utf8"===t.encoding?r=N(i,0):"binary"===t.encoding&&(r=i),yt.close(n),r},writeFile:function(e,t,r){(r=r||{}).flags=r.flags||577;var n=yt.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(X(t)+1),i=H(t,o,0,o.length);yt.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");yt.write(n,t,0,t.byteLength,void 0,r.canOwn)}yt.close(n)},cwd:function(){return yt.currentPath},chdir:function(e){var t=yt.lookupPath(e,{follow:!0});if(null===t.node)throw new yt.ErrnoError(44);if(!yt.isDir(t.node.mode))throw new yt.ErrnoError(54);var r=yt.nodePermissions(t.node,"x");if(r)throw new yt.ErrnoError(r);yt.currentPath=t.path},createDefaultDirectories:function(){yt.mkdir("/tmp"),yt.mkdir("/home"),yt.mkdir("/home/web_user")},createDefaultDevices:function(){yt.mkdir("/dev"),yt.registerDevice(yt.makedev(1,3),{read:function(){return 0},write:function(e,t,r,n,o){return n}}),yt.mkdev("/dev/null",yt.makedev(1,3)),dt.register(yt.makedev(5,0),dt.default_tty_ops),dt.register(yt.makedev(6,0),dt.default_tty1_ops),yt.mkdev("/dev/tty",yt.makedev(5,0)),yt.mkdev("/dev/tty1",yt.makedev(6,0));var e=ut();yt.createDevice("/dev","random",e),yt.createDevice("/dev","urandom",e),yt.mkdir("/dev/shm"),yt.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){yt.mkdir("/proc");var e=yt.mkdir("/proc/self");yt.mkdir("/proc/self/fd"),yt.mount({mount:function(){var t=yt.createNode(e,"fd",16895,73);return t.node_ops={lookup:function(e,t){var r=+t,n=yt.getStream(r);if(!n)throw new yt.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){i.stdin?yt.createDevice("/dev","stdin",i.stdin):yt.symlink("/dev/tty","/dev/stdin"),i.stdout?yt.createDevice("/dev","stdout",null,i.stdout):yt.symlink("/dev/tty","/dev/stdout"),i.stderr?yt.createDevice("/dev","stderr",null,i.stderr):yt.symlink("/dev/tty1","/dev/stderr");var e=yt.open("/dev/stdin",0),t=yt.open("/dev/stdout",1),r=yt.open("/dev/stderr",1);j(0===e.fd,"invalid handle for stdin ("+e.fd+")"),j(1===t.fd,"invalid handle for stdout ("+t.fd+")"),j(2===r.fd,"invalid handle for stderr ("+r.fd+")")},ensureErrnoError:function(){yt.ErrnoError||(yt.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,bt)if(bt[t]===e){this.code=t;break}},this.setErrno(e),this.message=vt[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Ke(this.stack))},yt.ErrnoError.prototype=new Error,yt.ErrnoError.prototype.constructor=yt.ErrnoError,[44].forEach((function(e){yt.genericErrors[e]=new yt.ErrnoError(e),yt.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:function(){yt.ensureErrnoError(),yt.nameTable=new Array(4096),yt.mount(ht,{},"/"),yt.createDefaultDirectories(),yt.createDefaultDevices(),yt.createSpecialDirectories(),yt.filesystems={MEMFS:ht}},init:function(e,t,r){j(!yt.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),yt.init.initialized=!0,yt.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,yt.createStandardStreams()},quit:function(){yt.init.initialized=!1;var e=i._fflush;e&&e(0);for(var t=0;t<yt.streams.length;t++){var r=yt.streams[t];r&&yt.close(r)}},getMode:function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:function(e,t){var r=yt.analyzePath(e,t);return r.exists?r.object:null},analyzePath:function(e,t){try{e=(n=yt.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=yt.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=ct.basename(e),n=yt.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:function(e,t,r,n){e="string"==typeof e?e:yt.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ct.join2(e,i);try{yt.mkdir(a)}catch(e){}e=a}}return a},createFile:function(e,t,r,n,o){var i=ct.join2("string"==typeof e?e:yt.getPath(e),t),a=yt.getMode(n,o);return yt.create(i,a)},createDataFile:function(e,t,r,n,o,i){var a=t?ct.join2("string"==typeof e?e:yt.getPath(e),t):e,s=yt.getMode(n,o),c=yt.create(a,s);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,d=r.length;l<d;++l)u[l]=r.charCodeAt(l);r=u}yt.chmod(c,146|s);var f=yt.open(c,577);yt.write(f,r,0,r.length,0,i),yt.close(f),yt.chmod(c,s)}return c},createDevice:function(e,t,r,n){var o=ct.join2("string"==typeof e?e:yt.getPath(e),t),i=yt.getMode(!!r,!!n);yt.createDevice.major||(yt.createDevice.major=64);var a=yt.makedev(yt.createDevice.major++,0);return yt.registerDevice(a,{open:function(e){e.seekable=!1},close:function(e){n&&n.buffer&&n.buffer.length&&n(10)},read:function(e,t,n,o,i){for(var a=0,s=0;s<o;s++){var c;try{c=r()}catch(e){throw new yt.ErrnoError(29)}if(void 0===c&&0===a)throw new yt.ErrnoError(6);if(null==c)break;a++,t[n+s]=c}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,o,i){for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new yt.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),yt.mkdev(o,i,a)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!b)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=yd(b(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new yt.ErrnoError(29)}},createLazyFile:function(e,t,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(e){var t=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(o.responseType="arraybuffer"),o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):yd(o.responseText||"",!0)}(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,T("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!h)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var c=yt.createFile(e,t,s,n,o);s.contents?c.contents=s.contents:s.url&&(c.contents=null,c.url=s.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(c.stream_ops).forEach((function(e){var t=c.stream_ops[e];u[e]=function(){return yt.forceLoadFile(c),t.apply(null,arguments)}})),u.read=function(e,t,r,n,o){yt.forceLoadFile(c);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(j(a>=0),i.slice)for(var s=0;s<a;s++)t[r+s]=i[o+s];else for(s=0;s<a;s++)t[r+s]=i.get(o+s);return a},c.stream_ops=u,c},createPreloadedFile:function(e,t,r,n,o,a,s,c,u,l){bo.init();var d=t?lt.resolve(ct.join2(e,t)):e,f=je("cp "+d);function p(r){function p(r){l&&l(),c||yt.createDataFile(e,t,r,n,o,u),a&&a(),Ne(f)}var g=!1;i.preloadPlugins.forEach((function(e){g||e.canHandle(d)&&(e.handle(r,d,p,(function(){s&&s(),Ne(f)})),g=!0)})),g||p(r)}Ie(f),"string"==typeof r?mt(r,(function(e){p(e)}),s):p(r)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(e,t,r){t=t||function(){},r=r||function(){};var n=yt.indexedDB();try{var o=n.open(yt.DB_NAME(),yt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=function(){T("creating db"),o.result.createObjectStore(yt.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([yt.DB_STORE_NAME],"readwrite"),i=n.objectStore(yt.DB_STORE_NAME),a=0,s=0,c=e.length;function u(){0==s?t():r()}e.forEach((function(e){var t=i.put(yt.analyzePath(e).object.contents,e);t.onsuccess=function(){++a+s==c&&u()},t.onerror=function(){s++,a+s==c&&u()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:function(e,t,r){t=t||function(){},r=r||function(){};var n=yt.indexedDB();try{var o=n.open(yt.DB_NAME(),yt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([yt.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(yt.DB_STORE_NAME),s=0,c=0,u=e.length;function l(){0==c?t():r()}e.forEach((function(e){var t=a.get(e);t.onsuccess=function(){yt.analyzePath(e).exists&&yt.unlink(e),yt.createDataFile(ct.dirname(e),ct.basename(e),t.result,!0,!0,!0),++s+c==u&&l()},t.onerror=function(){c++,s+c==u&&l()}})),i.onerror=r},o.onerror=r},absolutePath:function(){Ue("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:function(){Ue("FS.createFolder has been removed; use FS.mkdir instead")},createLink:function(){Ue("FS.createLink has been removed; use FS.symlink instead")},joinPath:function(){Ue("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:function(){Ue("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:function(){Ue("FS.standardizePath has been removed; use PATH.normalize instead")}},Et={mappings:{},DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if("/"===t[0])return t;var n;if(-100===e)n=yt.cwd();else{var o=yt.getStream(e);if(!o)throw new yt.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new yt.ErrnoError(44);return n}return ct.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ct.normalize(t)!==ct.normalize(yt.getPath(e.node)))return-54;throw e}return W[r>>2]=n.dev,W[r+4>>2]=0,W[r+8>>2]=n.ino,W[r+12>>2]=n.mode,W[r+16>>2]=n.nlink,W[r+20>>2]=n.uid,W[r+24>>2]=n.gid,W[r+28>>2]=n.rdev,W[r+32>>2]=0,Xe=[n.size>>>0,(Be=n.size,+Math.abs(Be)>=1?Be>0?(0|Math.min(+Math.floor(Be/4294967296),4294967295))>>>0:~~+Math.ceil((Be-+(~~Be>>>0))/4294967296)>>>0:0)],W[r+40>>2]=Xe[0],W[r+44>>2]=Xe[1],W[r+48>>2]=4096,W[r+52>>2]=n.blocks,W[r+56>>2]=n.atime.getTime()/1e3|0,W[r+60>>2]=0,W[r+64>>2]=n.mtime.getTime()/1e3|0,W[r+68>>2]=0,W[r+72>>2]=n.ctime.getTime()/1e3|0,W[r+76>>2]=0,Xe=[n.ino>>>0,(Be=n.ino,+Math.abs(Be)>=1?Be>0?(0|Math.min(+Math.floor(Be/4294967296),4294967295))>>>0:~~+Math.ceil((Be-+(~~Be>>>0))/4294967296)>>>0:0)],W[r+80>>2]=Xe[0],W[r+84>>2]=Xe[1],0},doMsync:function(e,t,r,n,o){var i=G.slice(e,e+r);yt.msync(t,i,o,r,n)},doMkdir:function(e,t){return"/"===(e=ct.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),yt.mkdir(e,t,0),0},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return yt.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=yt.readlink(e),o=Math.min(r,X(n)),i=Z[t+o];return B(n,t,r+1),Z[t+o]=i,o},doAccess:function(e,t){if(-8&t)return-28;var r;if(!(r=yt.lookupPath(e,{follow:!0}).node))return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&yt.nodePermissions(r,n)?-2:0},doDup:function(e,t,r){var n=yt.getStream(r);return n&&yt.close(n),yt.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=W[t+8*i>>2],s=W[t+(8*i+4)>>2],c=yt.read(e,Z,a,s,n);if(c<0)return-1;if(o+=c,c<s)break}return o},doWritev:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=W[t+8*i>>2],s=W[t+(8*i+4)>>2],c=yt.write(e,Z,a,s,n);if(c<0)return-1;o+=c}return o},varargs:void 0,get:function(){return j(null!=Et.varargs),Et.varargs+=4,W[Et.varargs-4>>2]},getStr:function(e){return U(e)},getStreamFromFD:function(e){var t=yt.getStream(e);if(!t)throw new yt.ErrnoError(8);return t},get64:function(e,t){return j(e>=0?0===t:-1===t),e}};function _t(e,t,r){Et.varargs=r;try{var n=Et.getStreamFromFD(e);switch(t){case 0:return(o=Et.get())<0?-28:yt.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=Et.get();return n.flags|=o,0;case 12:return o=Et.get(),q[o+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return st(28),-1;default:return-28}}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),-e.errno}}function wt(e,t){try{var r=Et.getStreamFromFD(e);return Et.doStat(yt.stat,r.path,t)}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),-e.errno}}function Ot(e,t,r){try{var n=Et.getStreamFromFD(e);n.getdents||(n.getdents=yt.readdir(n.path));for(var o=280,i=0,a=yt.llseek(n,0,1),s=Math.floor(a/o);s<n.getdents.length&&i+o<=r;){var c,u,l=n.getdents[s];if("."===l)c=n.id,u=4;else if(".."===l)c=yt.lookupPath(n.path,{parent:!0}).id,u=4;else{var d=yt.lookupNode(n,l);c=d.id,u=yt.isChrdev(d.mode)?2:yt.isDir(d.mode)?4:yt.isLink(d.mode)?10:8}Xe=[c>>>0,(Be=c,+Math.abs(Be)>=1?Be>0?(0|Math.min(+Math.floor(Be/4294967296),4294967295))>>>0:~~+Math.ceil((Be-+(~~Be>>>0))/4294967296)>>>0:0)],W[t+i>>2]=Xe[0],W[t+i+4>>2]=Xe[1],Xe=[(s+1)*o>>>0,(Be=(s+1)*o,+Math.abs(Be)>=1?Be>0?(0|Math.min(+Math.floor(Be/4294967296),4294967295))>>>0:~~+Math.ceil((Be-+(~~Be>>>0))/4294967296)>>>0:0)],W[t+i+8>>2]=Xe[0],W[t+i+12>>2]=Xe[1],q[t+i+16>>1]=280,Z[t+i+18>>0]=u,B(l,t+i+19,256),i+=o,s+=1}return yt.llseek(n,s*o,0),i}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),-e.errno}}function Tt(e,t,r){Et.varargs=r;try{var n=Et.getStreamFromFD(e);switch(t){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Et.get();return W[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=Et.get(),yt.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:Ue("bad ioctl syscall "+t)}}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),-e.errno}}function Pt(e,t,r,n,o,i){var a;i<<=12;var s=!1;if(0!=(16&n)&&e%65536!=0)return-28;if(0!=(32&n)){if(!(a=gt(t)))return-48;s=!0}else{var c=yt.getStream(o);if(!c)return-8;var u=yt.mmap(c,e,t,i,r,n);a=u.ptr,s=u.allocated}return Et.mappings[a]={malloc:a,len:t,allocated:s,fd:o,prot:r,flags:n,offset:i},a}function Dt(e,t,r,n,o,i){try{return Pt(e,t,r,n,o,i)}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),-e.errno}}function xt(e,t){var r=Et.mappings[e];if(0===t||!r)return-28;if(t===r.len){var n=yt.getStream(r.fd);n&&(2&r.prot&&Et.doMsync(e,n,t,r.flags,r.offset),yt.munmap(n)),Et.mappings[e]=null,r.allocated&&Od(r.malloc)}return 0}function kt(e,t){try{return xt(e,t)}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),-e.errno}}function Rt(e,t,r){Et.varargs=r;try{var n=Et.getStr(e),o=r?Et.get():0;return yt.open(n,t,o).fd}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),-e.errno}}function St(e,t){try{return e=Et.getStr(e),Et.doStat(yt.stat,e,t)}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),-e.errno}}function Mt(e,t){Ue("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function At(e,t){Ue("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}var Ft={};function Lt(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Ct(e){return this.fromWireType(z[e>>2])}var jt={},It={},Nt={},Ut=48,Ht=57;function Bt(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Ut&&t<=Ht?"_"+e:e}function Xt(e,t){return e=Bt(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Qt(e,t){var r=Xt(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var Zt=void 0;function Gt(e){throw new Zt(e)}function qt(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Gt("Mismatched type converter count");for(var o=0;o<e.length;++o)nr(e[o],n[o])}e.forEach((function(e){Nt[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){It.hasOwnProperty(e)?o[t]=It[e]:(i.push(e),jt.hasOwnProperty(e)||(jt[e]=[]),jt[e].push((function(){o[t]=It[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Vt(e){var t=Ft[e];delete Ft[e];var r=t.elements,n=r.length,o=r.map((function(e){return e.getterReturnType})).concat(r.map((function(e){return e.setterArgumentType}))),i=t.rawConstructor,a=t.rawDestructor;qt([e],o,(function(e){return r.forEach((function(t,r){var o=e[r],i=t.getter,a=t.getterContext,s=e[r+n],c=t.setter,u=t.setterContext;t.read=function(e){return o.fromWireType(i(a,e))},t.write=function(e,t){var r=[];c(u,e,s.toWireType(r,t)),Lt(r)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(n),o=0;o<n;++o)t[o]=r[o].read(e);return a(e),t},toWireType:function(e,o){if(n!==o.length)throw new TypeError("Incorrect number of tuple elements for "+t.name+": expected="+n+", actual="+o.length);for(var s=i(),c=0;c<n;++c)r[c].write(s,o[c]);return null!==e&&e.push(a,s),s},argPackAdvance:8,readValueFromPointer:Ct,destructorFunction:a}]}))}var Wt={};function zt(e){var t=Wt[e];delete Wt[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;qt([e],o.map((function(e){return e.getterReturnType})).concat(o.map((function(e){return e.setterArgumentType}))),(function(e){var i={};return o.forEach((function(t,r){var n=t.fieldName,a=e[r],s=t.getter,c=t.getterContext,u=e[r+o.length],l=t.setter,d=t.setterContext;i[n]={read:function(e){return a.fromWireType(s(c,e))},write:function(e,t){var r=[];l(d,e,u.toWireType(r,t)),Lt(r)}}})),[{name:t.name,fromWireType:function(e){var t={};for(var r in i)t[r]=i[r].read(e);return n(e),t},toWireType:function(e,t){for(var o in i)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,t[o]);return null!==e&&e.push(n,a),a},argPackAdvance:8,readValueFromPointer:Ct,destructorFunction:n}]}))}function Yt(e,t,r,n,o){}function $t(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function Kt(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Jt=e}var Jt=void 0;function er(e){for(var t="",r=e;G[r];)t+=Jt[G[r++]];return t}var tr=void 0;function rr(e){throw new tr(e)}function nr(e,t,r){if(r=r||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||rr('type "'+n+'" must have a positive integer typeid pointer'),It.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;rr("Cannot register type '"+n+"' twice")}if(It[e]=t,delete Nt[e],jt.hasOwnProperty(e)){var o=jt[e];delete jt[e],o.forEach((function(e){e()}))}}function or(e,t,r,n,o){var i=$t(r);nr(e,{name:t=er(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=Z;else if(2===r)n=q;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=W}return this.fromWireType(n[e>>i])},destructorFunction:null})}function ir(e){if(!(this instanceof _r))return!1;if(!(e instanceof _r))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o}function ar(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function sr(e){rr(e.$$.ptrType.registeredClass.name+" instance already deleted")}var cr=!1;function ur(e){}function lr(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function dr(e){e.count.value-=1,0===e.count.value&&lr(e)}function fr(e){return"undefined"==typeof FinalizationRegistry?(fr=function(e){return e},e):(cr=new FinalizationRegistry((function(e){console.warn(e.leakWarning.stack.replace(/^Error: /,"")),dr(e.$$)})),ur=function(e){cr.unregister(e)},(fr=function(e){var t=e.$$,r={$$:t},n=t.ptrType.registeredClass;return r.leakWarning=new Error("Embind found a leaked C++ instance "+n.name+" <0x"+t.ptr.toString(16)+">.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated"),"captureStackTrace"in Error&&Error.captureStackTrace(r.leakWarning,n.constructor),cr.register(e,r,e),e})(e))}function pr(){if(this.$$.ptr||sr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=fr(Object.create(Object.getPrototypeOf(this),{$$:{value:ar(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function gr(){this.$$.ptr||sr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&rr("Object already scheduled for deletion"),ur(this),dr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function hr(){return!this.$$.ptr}var mr=void 0,vr=[];function br(){for(;vr.length;){var e=vr.pop();e.$$.deleteScheduled=!1,e.delete()}}function yr(){return this.$$.ptr||sr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&rr("Object already scheduled for deletion"),vr.push(this),1===vr.length&&mr&&mr(br),this.$$.deleteScheduled=!0,this}function Er(){_r.prototype.isAliasOf=ir,_r.prototype.clone=pr,_r.prototype.delete=gr,_r.prototype.isDeleted=hr,_r.prototype.deleteLater=yr}function _r(){}var wr={};function Or(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||rr("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function Tr(e,t,r){i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&rr("Cannot register public name '"+e+"' twice"),Or(i,e,e),i.hasOwnProperty(r)&&rr("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))}function Pr(e,t,r,n,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Dr(e,t,r){for(;t!==r;)t.upcast||rr("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function xr(e,t){if(null===t)return this.isReference&&rr("null is not a valid "+this.name),0;t.$$||rr('Cannot pass "'+bn(t)+'" as a '+this.name),t.$$.ptr||rr("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Dr(t.$$.ptr,r,this.registeredClass)}function kr(e,t){var r;if(null===t)return this.isReference&&rr("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||rr('Cannot pass "'+bn(t)+'" as a '+this.name),t.$$.ptr||rr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&rr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=Dr(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&rr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:rr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,fn.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:rr("Unsupporting sharing policy")}return r}function Rr(e,t){if(null===t)return this.isReference&&rr("null is not a valid "+this.name),0;t.$$||rr('Cannot pass "'+bn(t)+'" as a '+this.name),t.$$.ptr||rr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&rr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Dr(t.$$.ptr,r,this.registeredClass)}function Sr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Mr(e){this.rawDestructor&&this.rawDestructor(e)}function Ar(e){null!==e&&e.delete()}function Fr(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=Fr(e,t,r.baseClass);return null===n?null:r.downcast(n)}function Lr(){return Object.keys(Nr).length}function Cr(){var e=[];for(var t in Nr)Nr.hasOwnProperty(t)&&e.push(Nr[t]);return e}function jr(e){mr=e,vr.length&&mr&&mr(br)}function Ir(){i.getInheritedInstanceCount=Lr,i.getLiveInheritedInstances=Cr,i.flushPendingDeletes=br,i.setDelayFunction=jr}var Nr={};function Ur(e,t){for(void 0===t&&rr("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function Hr(e,t){return t=Ur(e,t),Nr[t]}function Br(e,t){return t.ptrType&&t.ptr||Gt("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Gt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},fr(Object.create(e,{$$:{value:t}}))}function Xr(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Hr(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Br(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Br(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=wr[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=Fr(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?Br(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):Br(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function Qr(){Zr.prototype.getPointee=Sr,Zr.prototype.destructor=Mr,Zr.prototype.argPackAdvance=8,Zr.prototype.readValueFromPointer=Ct,Zr.prototype.deleteObject=Ar,Zr.prototype.fromWireType=Xr}function Zr(e,t,r,n,o,i,a,s,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,o||void 0!==t.baseClass?this.toWireType=kr:n?(this.toWireType=xr,this.destructorFunction=null):(this.toWireType=Rr,this.destructorFunction=null)}function Gr(e,t,r){i.hasOwnProperty(e)||Gt("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)}function qr(e,t,r){j("dynCall_"+e in i,"bad function pointer type - no table for sig '"+e+"'"),r&&r.length?j(r.length===e.substring(1).replace(/j/g,"--").length):j(1==e.length);var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)}function Vr(e,t,r){return e.includes("j")?qr(e,t,r):(j(et(t),"missing table entry in dynCall: "+t),et(t).apply(null,r))}function Wr(e,t){j(e.includes("j"),"getDynCaller should only be called with i64 sigs");var r=[];return function(){r.length=arguments.length;for(var n=0;n<arguments.length;n++)r[n]=arguments[n];return Vr(e,t,r)}}function zr(e,t){var r=(e=er(e)).includes("j")?Wr(e,t):et(t);return"function"!=typeof r&&rr("unknown function pointer with signature "+e+": "+t),r}var Yr=void 0;function $r(e){var t=Pd(e),r=er(t);return Od(t),r}function Kr(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||It[t]||(Nt[t]?Nt[t].forEach(e):(r.push(t),n[t]=!0))})),new Yr(e+": "+r.map($r).join([", "]))}function Jr(e,t,r,n,o,i,a,s,c,u,l,d,f){l=er(l),i=zr(o,i),s&&(s=zr(a,s)),u&&(u=zr(c,u)),f=zr(d,f);var p=Bt(l);Tr(p,(function(){Kr("Cannot construct "+l+" due to unbound types",[n])})),qt([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:_r.prototype;var a=Xt(p,(function(){if(Object.getPrototypeOf(this)!==c)throw new tr("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new tr(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new tr("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),c=Object.create(o,{constructor:{value:a}});a.prototype=c;var d=new Pr(l,a,c,f,r,i,s,u),g=new Zr(l,d,!0,!1,!1),h=new Zr(l+"*",d,!1,!1,!1),m=new Zr(l+" const*",d,!1,!0,!1);return wr[e]={pointerType:h,constPointerType:m},Gr(p,a),[g,h,m]}))}function en(e,t){for(var r=[],n=0;n<e;n++)r.push(W[(t>>2)+n]);return r}function tn(e,t,r,n,o,i){j(t>0);var a=en(t,r);o=zr(n,o),qt([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new tr("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.registeredClass.constructor_body[t-1]=function(){Kr("Cannot construct "+e.name+" due to unbound types",a)},qt([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=nn(r,n,null,o,i),[]})),[]}))}function rn(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Xt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function nn(e,t,r,n,o){var i=t.length;i<2&&rr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){s=!0;break}var u="void"!==t[0].name,l="",d="";for(c=0;c<i-2;++c)l+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var f="return function "+Bt(e)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(f+="var destructors = [];\n");var p=s?"destructors":"null",g=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[rr,n,o,Lt,t[0],t[1]];for(a&&(f+="var thisWired = classParam.toWireType("+p+", this);\n"),c=0;c<i-2;++c)f+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+t[c+2].name+"\n",g.push("argType"+c),h.push(t[c+2]);if(a&&(d="thisWired"+(d.length>0?", ":"")+d),f+=(u?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)f+="runDestructors(destructors);\n";else for(c=a?1:2;c<t.length;++c){var m=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(f+=m+"_dtor("+m+"); // "+t[c].name+"\n",g.push(m+"_dtor"),h.push(t[c].destructorFunction))}return u&&(f+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f+="}\n",g.push(f),rn(Function,g).apply(null,h)}function on(e,t,r,n,o,i,a,s){var c=en(r,n);t=er(t),i=zr(o,i),qt([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){Kr("Cannot call "+n+" due to unbound types",c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,l=u[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===r-2?(o.argCount=r-2,o.className=e.name,u[t]=o):(Or(u,t,n),u[t].overloadTable[r-2]=o),qt([],c,(function(o){var s=nn(n,o,e,i,a);return void 0===u[t].overloadTable?(s.argCount=r-2,u[t]=s):u[t].overloadTable[r-2]=s,[]})),[]}))}var an=[],sn=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function cn(e){e>4&&0==--sn[e].refcount&&(sn[e]=void 0,an.push(e))}function un(){for(var e=0,t=5;t<sn.length;++t)void 0!==sn[t]&&++e;return e}function ln(){for(var e=5;e<sn.length;++e)if(void 0!==sn[e])return sn[e];return null}function dn(){i.count_emval_handles=un,i.get_first_emval=ln}var fn={toValue:function(e){return e||rr("Cannot use deleted val. handle = "+e),sn[e].value},toHandle:function(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=an.length?an.pop():sn.length;return sn[t]={refcount:1,value:e},t}}};function pn(e,t){nr(e,{name:t=er(t),fromWireType:function(e){var t=fn.toValue(e);return cn(e),t},toWireType:function(e,t){return fn.toHandle(t)},argPackAdvance:8,readValueFromPointer:Ct,destructorFunction:null})}function gn(e,t,r){switch(t){case 0:return function(e){var t=r?Z:G;return this.fromWireType(t[e])};case 1:return function(e){var t=r?q:V;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?W:z;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function hn(e,t,r,n){var o=$t(r);function i(){}t=er(t),i.values={},nr(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:gn(t,o,n),destructorFunction:null}),Tr(t,i)}function mn(e,t){var r=It[e];return void 0===r&&rr(t+" has unknown type "+$r(e)),r}function vn(e,t,r){var n=mn(e,"enum");t=er(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Xt(n.name+"_"+t,(function(){}))}});o.values[r]=i,o[t]=i}function bn(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function yn(e,t){switch(t){case 2:return function(e){return this.fromWireType(Y[e>>2])};case 3:return function(e){return this.fromWireType($[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function En(e,t,r){var n=$t(r);nr(e,{name:t=er(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+bn(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:yn(t,n),destructorFunction:null})}function _n(e,t,r,n,o,i){var a=en(t,r);e=er(e),o=zr(n,o),Tr(e,(function(){Kr("Cannot call "+e+" due to unbound types",a)}),t-1),qt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Gr(e,nn(e,n,null,o,i),t-1),[]}))}function wn(e,t,r){switch(t){case 0:return r?function(e){return Z[e]}:function(e){return G[e]};case 1:return r?function(e){return q[e>>1]}:function(e){return V[e>>1]};case 2:return r?function(e){return W[e>>2]}:function(e){return z[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function On(e,t,r,n,o){t=er(t),-1===o&&(o=4294967295);var i=$t(r),a=function(e){return e};if(0===n){var s=32-8*r;a=function(e){return e<<s>>>s}}var c=t.includes("unsigned");nr(e,{name:t,fromWireType:a,toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+bn(r)+'" to '+this.name);if(r<n||r>o)throw new TypeError('Passing a number "'+bn(r)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!");return c?r>>>0:0|r},argPackAdvance:8,readValueFromPointer:wn(t,i,0!==n),destructorFunction:null})}function Tn(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=z,r=t[e>>=2],o=t[e+1];return new n(Q,o,r)}nr(e,{name:r=er(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function Pn(e,t,r,n,o,i,a,s,c,u,l,d){r=er(r),i=zr(o,i),s=zr(a,s),u=zr(c,u),d=zr(l,d),qt([e],[t],(function(e){return e=e[0],[new Zr(r,e.registeredClass,!1,!1,!0,e,n,i,s,u,d)]}))}function Dn(e,t){var r="std::string"===(t=er(t));nr(e,{name:t,fromWireType:function(e){var t,n=z[e>>2];if(r)for(var o=e+4,i=0;i<=n;++i){var a=e+4+i;if(i==n||0==G[a]){var s=U(o,a-o);void 0===t?t=s:(t+=String.fromCharCode(0),t+=s),o=a+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(G[e+4+i]);t=c.join("")}return Od(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||rr("Cannot pass non-string to std::string");var o=(r&&n?function(){return X(t)}:function(){return t.length})(),i=wd(4+o+1);if(z[i>>2]=o,r&&n)B(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=t.charCodeAt(a);s>255&&(Od(i),rr("String has UTF-16 code units that do not fit in 8 bits")),G[i+4+a]=s}else for(a=0;a<o;++a)G[i+4+a]=t[a];return null!==e&&e.push(Od,i),i},argPackAdvance:8,readValueFromPointer:Ct,destructorFunction:function(e){Od(e)}})}function xn(e,t,r){var n,o,i,a,s;r=er(r),2===t?(n=J,o=ee,a=te,i=function(){return V},s=1):4===t&&(n=re,o=ne,a=oe,i=function(){return z},s=2),nr(e,{name:r,fromWireType:function(e){for(var r,o=z[e>>2],a=i(),c=e+4,u=0;u<=o;++u){var l=e+4+u*t;if(u==o||0==a[l>>s]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return Od(e),r},toWireType:function(e,n){"string"!=typeof n&&rr("Cannot pass non-string to C++ string type "+r);var i=a(n),c=wd(4+i+t);return z[c>>2]=i>>s,o(n,c+4,i+t),null!==e&&e.push(Od,c),c},argPackAdvance:8,readValueFromPointer:Ct,destructorFunction:function(e){Od(e)}})}function kn(e,t,r,n,o,i){Ft[e]={name:er(t),rawConstructor:zr(r,n),rawDestructor:zr(o,i),elements:[]}}function Rn(e,t,r,n,o,i,a,s,c){Ft[e].elements.push({getterReturnType:t,getter:zr(r,n),getterContext:o,setterArgumentType:i,setter:zr(a,s),setterContext:c})}function Sn(e,t,r,n,o,i){Wt[e]={name:er(t),rawConstructor:zr(r,n),rawDestructor:zr(o,i),fields:[]}}function Mn(e,t,r,n,o,i,a,s,c,u){Wt[e].fields.push({fieldName:er(t),getterReturnType:r,getter:zr(n,o),getterContext:i,setterArgumentType:a,setter:zr(s,c),setterContext:u})}function An(e,t){nr(e,{isVoid:!0,name:t=er(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}function Fn(){throw"longjmp"}function Ln(e,t,r){e=fn.toValue(e),t=mn(t,"emval::as");var n=[],o=fn.toHandle(n);return W[r>>2]=o,t.toWireType(n,e)}function Cn(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=mn(W[(t>>2)+n],"parameter "+n);return r}function jn(e,t,r,n){e=fn.toValue(e);for(var o=Cn(t,r),i=new Array(t),a=0;a<t;++a){var s=o[a];i[a]=s.readValueFromPointer(n),n+=s.argPackAdvance}var c=e.apply(void 0,i);return fn.toHandle(c)}function In(e){var t=[];return W[e>>2]=fn.toHandle(t),t}var Nn={};function Un(e){var t=Nn[e];return void 0===t?er(e):t}var Hn=[];function Bn(e,t,r,n,o){return(e=Hn[e])(t=fn.toValue(t),r=Un(r),In(n),o)}function Xn(e,t,r,n){(e=Hn[e])(t=fn.toValue(t),r=Un(r),null,n)}function Qn(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Zn(e){return 0===e?fn.toHandle(Qn()):(e=Un(e),fn.toHandle(Qn()[e]))}function Gn(e){var t=Hn.length;return Hn.push(e),t}function qn(e,t){for(var r=Cn(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=["retType"],a=[n],s="",c=0;c<e-1;++c)s+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),a.push(r[1+c]);var u="return function "+Bt("methodCaller_"+o)+"(handle, name, destructors, args) {\n",l=0;for(c=0;c<e-1;++c)u+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=r[c+1].argPackAdvance;for(u+=" var rv = handle[name]("+s+");\n",c=0;c<e-1;++c)r[c+1].deleteObject&&(u+=" argType"+c+".deleteObject(arg"+c+");\n");return n.isVoid||(u+=" return retType.toWireType(destructors, rv);\n"),u+="};\n",i.push(u),Gn(rn(Function,i).apply(null,a))}function Vn(e,t){return e=fn.toValue(e),t=fn.toValue(t),fn.toHandle(e[t])}function Wn(e){e>4&&(sn[e].refcount+=1)}function zn(e,t){return(e=fn.toValue(e))instanceof fn.toValue(t)}function Yn(e){return"string"==typeof(e=fn.toValue(e))}function $n(e){for(var t="",r=0;r<e;++r)t+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+e+"(constructor, argTypes, args) {\n";for(r=0;r<e;++r)n+="var argType"+r+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+r+'], "parameter '+r+'");\nvar arg'+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle",n)(mn,i,fn.toHandle)}var Kn,Jn={};function eo(e,t,r,n){e=fn.toValue(e);var o=Jn[t];return o||(o=$n(t),Jn[t]=o),o(e,r,n)}function to(){return fn.toHandle([])}function ro(e){return fn.toHandle(Un(e))}function no(){return fn.toHandle({})}function oo(e){Lt(fn.toValue(e)),cn(e)}function io(e,t,r){e=fn.toValue(e),t=fn.toValue(t),r=fn.toValue(r),e[t]=r}function ao(e,t){var r=(e=mn(e,"_emval_take_value")).readValueFromPointer(t);return fn.toHandle(r)}function so(e){throw fn.toValue(e)}function co(){Ue("native code called abort()")}Kn=function(){return performance.now()};var uo=!0;function lo(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!uo)return st(28),-1;r=Kn()}return W[t>>2]=r/1e3|0,W[t+4>>2]=r%1e3*1e3*1e3|0,0}function fo(e,t){if(bo.mainLoop.timingMode=e,bo.mainLoop.timingValue=t,!bo.mainLoop.func)return P("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up."),1;if(bo.mainLoop.running||(bo.mainLoop.running=!0),0==e)bo.mainLoop.scheduler=function(){var e=0|Math.max(0,bo.mainLoop.tickStartTime+t-Kn());setTimeout(bo.mainLoop.runner,e)},bo.mainLoop.method="timeout";else if(1==e)bo.mainLoop.scheduler=function(){bo.requestAnimationFrame(bo.mainLoop.runner)},bo.mainLoop.method="rAF";else if(2==e){if("undefined"==typeof setImmediate){var r=[],n="setimmediate";addEventListener("message",(function(e){e.data!==n&&e.data.target!==n||(e.stopPropagation(),r.shift()())}),!0),setImmediate=function(e){r.push(e),h?(void 0===i.setImmediates&&(i.setImmediates=[]),i.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}bo.mainLoop.scheduler=function(){setImmediate(bo.mainLoop.runner)},bo.mainLoop.method="immediate"}return 0}function po(e){Kd(e)}function go(){if(!Oe())try{po(L)}catch(e){tt(e)}}function ho(e,t,r,n,o){j(!bo.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),bo.mainLoop.func=e,bo.mainLoop.arg=n;var a=bo.mainLoop.currentlyRunningMainloop;function s(){return!(a<bo.mainLoop.currentlyRunningMainloop&&(go(),1))}if(bo.mainLoop.running=!1,bo.mainLoop.runner=function(){if(!C)if(bo.mainLoop.queue.length>0){var t=Date.now(),r=bo.mainLoop.queue.shift();if(r.func(r.arg),bo.mainLoop.remainingBlockers){var n=bo.mainLoop.remainingBlockers,o=n%1==0?n-1:Math.floor(n);r.counted?bo.mainLoop.remainingBlockers=o:(o+=.5,bo.mainLoop.remainingBlockers=(8*n+o)/9)}if(T('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),bo.mainLoop.updateStatus(),!s())return;setTimeout(bo.mainLoop.runner,0)}else s()&&(bo.mainLoop.currentFrameNumber=bo.mainLoop.currentFrameNumber+1|0,1==bo.mainLoop.timingMode&&bo.mainLoop.timingValue>1&&bo.mainLoop.currentFrameNumber%bo.mainLoop.timingValue!=0?bo.mainLoop.scheduler():(0==bo.mainLoop.timingMode&&(bo.mainLoop.tickStartTime=Kn()),"timeout"===bo.mainLoop.method&&i.ctx&&(D("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),bo.mainLoop.method=""),bo.mainLoop.runIter(e),ge(),s()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),bo.mainLoop.scheduler())))},o||(t&&t>0?fo(0,1e3/t):fo(1,1),bo.mainLoop.scheduler()),r)throw"unwind"}function mo(e,t){if(_e||C)P("user callback triggered after runtime exited or application aborted. Ignoring.");else if(t)e();else try{e()}catch(e){tt(e)}}function vo(e,t){return setTimeout((function(){mo(e)}),t)}var bo={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){bo.mainLoop.scheduler=null,bo.mainLoop.currentlyRunningMainloop++},resume:function(){bo.mainLoop.currentlyRunningMainloop++;var e=bo.mainLoop.timingMode,t=bo.mainLoop.timingValue,r=bo.mainLoop.func;bo.mainLoop.func=null,ho(r,0,!1,bo.mainLoop.arg,!0),fo(e,t),bo.mainLoop.scheduler()},updateStatus:function(){if(i.setStatus){var e=i.statusMessage||"Please wait...",t=bo.mainLoop.remainingBlockers,r=bo.mainLoop.expectedBlockers;t?t<r?i.setStatus(e+" ("+(r-t)+"/"+r+")"):i.setStatus(e):i.setStatus("")}},runIter:function(e){if(!C){if(i.preMainLoop&&!1===i.preMainLoop())return;mo(e),i.postMainLoop&&i.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(i.preloadPlugins||(i.preloadPlugins=[]),!bo.initted){bo.initted=!0;try{new Blob,bo.hasBlobConstructor=!0}catch(e){bo.hasBlobConstructor=!1,T("warning: no blob constructor, cannot create blobs with mimetypes")}bo.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:bo.hasBlobConstructor?null:T("warning: no BlobBuilder"),bo.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,i.noImageDecoding||void 0!==bo.URLObject||(T("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),i.noImageDecoding=!0);var e={canHandle:function(e){return!i.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,r,n){var o=null;if(bo.hasBlobConstructor)try{(o=new Blob([e],{type:bo.getMimetype(t)})).size!==e.length&&(o=new Blob([new Uint8Array(e).buffer],{type:bo.getMimetype(t)}))}catch(e){D("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!o){var a=new bo.BlobBuilder;a.append(new Uint8Array(e).buffer),o=a.getBlob()}var s=bo.URLObject.createObjectURL(o);j("string"==typeof s,"createObjectURL must return a url as a string");var c=new Image;c.onload=function(){j(c.complete,"Image "+t+" could not be decoded");var n=document.createElement("canvas");n.width=c.width,n.height=c.height,n.getContext("2d").drawImage(c,0,0),i.preloadedImages[t]=n,bo.URLObject.revokeObjectURL(s),r&&r(e)},c.onerror=function(e){T("Image "+s+" could not be decoded"),n&&n()},c.src=s}};i.preloadPlugins.push(e);var t={canHandle:function(e){return!i.noAudioDecoding&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,r,n){var o=!1;function a(n){o||(o=!0,i.preloadedAudios[t]=n,r&&r(e))}function s(){o||(o=!0,i.preloadedAudios[t]=new Audio,n&&n())}if(!bo.hasBlobConstructor)return s();try{var c=new Blob([e],{type:bo.getMimetype(t)})}catch(e){return s()}var u=bo.URLObject.createObjectURL(c);j("string"==typeof u,"createObjectURL must return a url as a string");var l=new Audio;l.addEventListener("canplaythrough",(function(){a(l)}),!1),l.onerror=function(r){o||(T("warning: browser could not fully decode audio "+t+", trying slower base64 approach"),l.src="data:audio/x-"+t.substr(-3)+";base64,"+function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="",n=0,o=0,i=0;i<e.length;i++)for(n=n<<8|e[i],o+=8;o>=6;){var a=n>>o-6&63;o-=6,r+=t[a]}return 2==o?(r+=t[(3&n)<<4],r+="=="):4==o&&(r+=t[(15&n)<<2],r+="="),r}(e),a(l))},l.src=u,vo((function(){a(l)}),1e4)}};i.preloadPlugins.push(t);var r=i.canvas;r&&(r.requestPointerLock=r.requestPointerLock||r.mozRequestPointerLock||r.webkitRequestPointerLock||r.msRequestPointerLock||function(){},r.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},r.exitPointerLock=r.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",n,!1),document.addEventListener("mozpointerlockchange",n,!1),document.addEventListener("webkitpointerlockchange",n,!1),document.addEventListener("mspointerlockchange",n,!1),i.elementPointerLock&&r.addEventListener("click",(function(e){!bo.pointerLock&&i.canvas.requestPointerLock&&(i.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){bo.pointerLock=document.pointerLockElement===i.canvas||document.mozPointerLockElement===i.canvas||document.webkitPointerLockElement===i.canvas||document.msPointerLockElement===i.canvas}},createContext:function(e,t,r,n){if(t&&i.ctx&&e==i.canvas)return i.ctx;var o,a;if(t){var s={antialias:!1,alpha:!1,majorVersion:"undefined"!=typeof WebGL2RenderingContext?2:1};if(n)for(var c in n)s[c]=n[c];void 0!==xo&&(a=xo.createContext(e,s))&&(o=xo.getContext(a).GLctx)}else o=e.getContext("2d");return o?(r&&(t||j(void 0===fd,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),i.ctx=o,t&&xo.makeContextCurrent(a),i.useWebGL=t,bo.moduleContextCreatedCallbacks.forEach((function(e){e()})),bo.init()),o):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t){bo.lockPointer=e,bo.resizeCanvas=t,void 0===bo.lockPointer&&(bo.lockPointer=!0),void 0===bo.resizeCanvas&&(bo.resizeCanvas=!1);var r=i.canvas;function n(){bo.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=bo.exitFullscreen,bo.lockPointer&&r.requestPointerLock(),bo.isFullscreen=!0,bo.resizeCanvas?bo.setFullscreenCanvasSize():bo.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),bo.resizeCanvas?bo.setWindowedCanvasSize():bo.updateCanvasDimensions(r)),i.onFullScreen&&i.onFullScreen(bo.isFullscreen),i.onFullscreen&&i.onFullscreen(bo.isFullscreen)}bo.fullscreenHandlersInstalled||(bo.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var o=document.createElement("div");r.parentNode.insertBefore(o,r),o.appendChild(r),o.requestFullscreen=o.requestFullscreen||o.mozRequestFullScreen||o.msRequestFullscreen||(o.webkitRequestFullscreen?function(){o.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(o.webkitRequestFullScreen?function(){o.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),o.requestFullscreen()},requestFullScreen:function(){Ue("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){return!!bo.isFullscreen&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)},nextRAF:0,fakeRequestAnimationFrame:function(e){var t=Date.now();if(0===bo.nextRAF)bo.nextRAF=t+1e3/60;else for(;t+2>=bo.nextRAF;)bo.nextRAF+=1e3/60;var r=Math.max(bo.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function(e){"function"!=typeof requestAnimationFrame?(0,bo.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:function(e){return vo(e)},safeRequestAnimationFrame:function(e){return bo.requestAnimationFrame((function(){mo(e)}))},getMimetype:function(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia:function(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX:function(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY:function(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta:function(e){var t=0;switch(e.type){case"DOMMouseScroll":t=e.detail/3;break;case"mousewheel":t=e.wheelDelta/120;break;case"wheel":switch(t=e.deltaY,e.deltaMode){case 0:t/=100;break;case 1:t/=3;break;case 2:t*=80;break;default:throw"unrecognized mouse wheel delta mode: "+e.deltaMode}break;default:throw"unrecognized mouse wheel event: "+e.type}return t},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(e){if(bo.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?bo.mouseMovementX=bo.mouseMovementY=0:(bo.mouseMovementX=bo.getMovementX(e),bo.mouseMovementY=bo.getMovementY(e)),"undefined"!=typeof SDL?(bo.mouseX=SDL.mouseX+bo.mouseMovementX,bo.mouseY=SDL.mouseY+bo.mouseMovementY):(bo.mouseX+=bo.mouseMovementX,bo.mouseY+=bo.mouseMovementY);else{var t=i.canvas.getBoundingClientRect(),r=i.canvas.width,n=i.canvas.height,o=void 0!==window.scrollX?window.scrollX:window.pageXOffset,a=void 0!==window.scrollY?window.scrollY:window.pageYOffset;if(j(void 0!==o&&void 0!==a,"Unable to retrieve scroll position, mouse positions likely broken."),"touchstart"===e.type||"touchend"===e.type||"touchmove"===e.type){var s=e.touch;if(void 0===s)return;var c=s.pageX-(o+t.left),u=s.pageY-(a+t.top),l={x:c*=r/t.width,y:u*=n/t.height};if("touchstart"===e.type)bo.lastTouches[s.identifier]=l,bo.touches[s.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var d=bo.touches[s.identifier];d||(d=l),bo.lastTouches[s.identifier]=d,bo.touches[s.identifier]=l}return}var f=e.pageX-(o+t.left),p=e.pageY-(a+t.top);f*=r/t.width,p*=n/t.height,bo.mouseMovementX=f-bo.mouseX,bo.mouseMovementY=p-bo.mouseY,bo.mouseX=f,bo.mouseY=p}},resizeListeners:[],updateResizeListeners:function(){var e=i.canvas;bo.resizeListeners.forEach((function(t){t(e.width,e.height)}))},setCanvasSize:function(e,t,r){var n=i.canvas;bo.updateCanvasDimensions(n,e,t),r||bo.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=z[SDL.screen>>2];e|=8388608,W[SDL.screen>>2]=e}bo.updateCanvasDimensions(i.canvas),bo.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=z[SDL.screen>>2];e&=-8388609,W[SDL.screen>>2]=e}bo.updateCanvasDimensions(i.canvas),bo.updateResizeListeners()},updateCanvasDimensions:function(e,t,r){t&&r?(e.widthNative=t,e.heightNative=r):(t=e.widthNative,r=e.heightNative);var n=t,o=r;if(i.forcedAspectRatio&&i.forcedAspectRatio>0&&(n/o<i.forcedAspectRatio?n=Math.round(o*i.forcedAspectRatio):o=Math.round(n/i.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&"undefined"!=typeof screen){var a=Math.min(screen.width/n,screen.height/o);n=Math.round(n*a),o=Math.round(o*a)}bo.resizeCanvas?(e.width!=n&&(e.width=n),e.height!=o&&(e.height=o),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=r&&(e.height=r),void 0!==e.style&&(n!=t||o!=r?(e.style.setProperty("width",n+"px","important"),e.style.setProperty("height",o+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}},yo={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode:function(e){yo.errorCode=e},chooseConfig:function(e,t,r,n,o){if(62e3!=e)return yo.setErrorCode(12296),0;if(t)for(;;){var i=W[t>>2];if(12321==i){var a=W[t+4>>2];yo.contextAttributes.alpha=a>0}else if(12325==i){var s=W[t+4>>2];yo.contextAttributes.depth=s>0}else if(12326==i){var c=W[t+4>>2];yo.contextAttributes.stencil=c>0}else if(12337==i){var u=W[t+4>>2];yo.contextAttributes.antialias=u>0}else if(12338==i)u=W[t+4>>2],yo.contextAttributes.antialias=1==u;else if(12544==i){var l=W[t+4>>2];yo.contextAttributes.lowLatency=12547!=l}else if(12344==i)break;t+=8}return r&&n||o?(o&&(W[o>>2]=1),r&&n>0&&(W[r>>2]=62002),yo.setErrorCode(12288),1):(yo.setErrorCode(12300),0)}};function Eo(e,t,r,n,o){return yo.chooseConfig(e,t,r,n,o)}function _o(e){var t=e.getExtension("ANGLE_instanced_arrays");if(t)return e.vertexAttribDivisor=function(e,r){t.vertexAttribDivisorANGLE(e,r)},e.drawArraysInstanced=function(e,r,n,o){t.drawArraysInstancedANGLE(e,r,n,o)},e.drawElementsInstanced=function(e,r,n,o,i){t.drawElementsInstancedANGLE(e,r,n,o,i)},1}function wo(e){var t=e.getExtension("OES_vertex_array_object");if(t)return e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)},1}function Oo(e){var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)},1}function To(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function Po(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function Do(e){return!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw"))}var xo={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){xo.lastError||(xo.lastError=e)},getNewId:function(e){for(var t=xo.counter++,r=e.length;r<t;r++)e[r]=null;return t},getSource:function(e,t,r,n){for(var o="",i=0;i<t;++i){var a=n?W[n+4*i>>2]:-1;o+=U(W[r+4*i>>2],a<0?void 0:a)}return o},createContext:function(e,t){e.getContextSafariWebGL2Fixed||(e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=function(t,r){var n=e.getContextSafariWebGL2Fixed(t,r);return"webgl"==t==n instanceof WebGLRenderingContext?n:null});var r=t.majorVersion>1?e.getContext("webgl2",t):e.getContext("webgl",t);return r?xo.registerContext(r,t):0},registerContext:function(e,t){var r=xo.getNewId(xo.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),xo.contexts[r]=n,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&xo.initExtensions(n),r},makeContextCurrent:function(e){return xo.currentContext=xo.contexts[e],i.ctx=fd=xo.currentContext&&xo.currentContext.GLctx,!(e&&!fd)},getContext:function(e){return xo.contexts[e]},deleteContext:function(e){xo.currentContext===xo.contexts[e]&&(xo.currentContext=null),"object"==typeof Al&&Al.removeAllHandlersOnTarget(xo.contexts[e].GLctx.canvas),xo.contexts[e]&&xo.contexts[e].GLctx.canvas&&(xo.contexts[e].GLctx.canvas.GLctxObject=void 0),xo.contexts[e]=null},initExtensions:function(e){if(e||(e=xo.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;_o(t),wo(t),Oo(t),To(t),Po(t),e.version>=2&&(t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query_webgl2")),(e.version<2||!t.disjointTimerQueryExt)&&(t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query")),Do(t),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}};function ko(e,t,r,n){if(62e3!=e)return yo.setErrorCode(12296),0;for(var o=1;;){var a=W[n>>2];if(12440!=a){if(12344==a)break;return yo.setErrorCode(12292),0}o=W[n+4>>2],n+=8}return o<2||o>3?(yo.setErrorCode(12293),0):(yo.contextAttributes.majorVersion=o-1,yo.contextAttributes.minorVersion=0,yo.context=xo.createContext(i.canvas,yo.contextAttributes),0!=yo.context?(yo.setErrorCode(12288),xo.makeContextCurrent(yo.context),i.useWebGL=!0,bo.moduleContextCreatedCallbacks.forEach((function(e){e()})),xo.makeContextCurrent(null),62004):(yo.setErrorCode(12297),0))}function Ro(e,t,r,n){return 62e3!=e?(yo.setErrorCode(12296),0):62002!=t?(yo.setErrorCode(12293),0):(yo.setErrorCode(12288),62006)}function So(e,t){return 62e3!=e?(yo.setErrorCode(12296),0):62004!=t?(yo.setErrorCode(12294),0):(xo.deleteContext(yo.context),yo.setErrorCode(12288),yo.currentContext==t&&(yo.currentContext=0),1)}function Mo(e,t){return 62e3!=e?(yo.setErrorCode(12296),0):62006!=t?(yo.setErrorCode(12301),1):(yo.currentReadSurface==t&&(yo.currentReadSurface=0),yo.currentDrawSurface==t&&(yo.currentDrawSurface=0),yo.setErrorCode(12288),1)}function Ao(e,t,r,n){if(62e3!=e)return yo.setErrorCode(12296),0;if(62002!=t)return yo.setErrorCode(12293),0;if(!n)return yo.setErrorCode(12300),0;switch(yo.setErrorCode(12288),r){case 12320:return W[n>>2]=yo.contextAttributes.alpha?32:24,1;case 12321:return W[n>>2]=yo.contextAttributes.alpha?8:0,1;case 12322:case 12323:case 12324:return W[n>>2]=8,1;case 12325:return W[n>>2]=yo.contextAttributes.depth?24:0,1;case 12326:return W[n>>2]=yo.contextAttributes.stencil?8:0,1;case 12327:return W[n>>2]=12344,1;case 12328:return W[n>>2]=62002,1;case 12329:return W[n>>2]=0,1;case 12330:return W[n>>2]=4096,1;case 12331:return W[n>>2]=16777216,1;case 12332:return W[n>>2]=4096,1;case 12333:case 12334:return W[n>>2]=0,1;case 12335:return W[n>>2]=12344,1;case 12337:return W[n>>2]=yo.contextAttributes.antialias?4:0,1;case 12338:return W[n>>2]=yo.contextAttributes.antialias?1:0,1;case 12339:return W[n>>2]=4,1;case 12340:return W[n>>2]=12344,1;case 12341:case 12342:case 12343:return W[n>>2]=-1,1;case 12345:case 12346:case 12347:return W[n>>2]=0,1;case 12348:return W[n>>2]=1,1;case 12349:case 12350:return W[n>>2]=0,1;case 12351:return W[n>>2]=12430,1;case 12352:return W[n>>2]=4,1;case 12354:return W[n>>2]=0,1;default:return yo.setErrorCode(12292),0}}function Fo(e){return yo.setErrorCode(12288),62e3}function Lo(){return yo.errorCode}function Co(e,t,r){return 62e3==e?(t&&(W[t>>2]=1),r&&(W[r>>2]=4),yo.defaultDisplayInitialized=!0,yo.setErrorCode(12288),1):(yo.setErrorCode(12296),0)}function jo(e,t,r,n){return 62e3!=e?(yo.setErrorCode(12296),0):0!=n&&62004!=n?(yo.setErrorCode(12294),0):0!=r&&62006!=r||0!=t&&62006!=t?(yo.setErrorCode(12301),0):(xo.makeContextCurrent(n?yo.context:null),yo.currentContext=n,yo.currentDrawSurface=t,yo.currentReadSurface=r,yo.setErrorCode(12288),1)}function Io(){if(yo.defaultDisplayInitialized)if(i.ctx){if(!i.ctx.isContextLost())return yo.setErrorCode(12288),1;yo.setErrorCode(12302)}else yo.setErrorCode(12290);else yo.setErrorCode(12289);return 0}function No(e){return 62e3!=e?(yo.setErrorCode(12296),0):(yo.currentContext=0,yo.currentReadSurface=0,yo.currentDrawSurface=0,yo.defaultDisplayInitialized=!1,yo.setErrorCode(12288),1)}function Uo(e){j("number"==typeof e),P(U(e))}function Ho(e){j("number"==typeof e),T(U(e))}function Bo(e){j("number"==typeof e),console.warn(U(e))}function Xo(){}function Qo(){return 2147483648}function Zo(e){fd.activeTexture(e)}function Go(e,t){fd.attachShader(xo.programs[e],xo.shaders[t])}function qo(e,t){fd.beginQuery(e,xo.queries[t])}function Vo(e,t){fd.disjointTimerQueryExt.beginQueryEXT(e,xo.queries[t])}function Wo(e){fd.beginTransformFeedback(e)}function zo(e,t,r){fd.bindAttribLocation(xo.programs[e],t,U(r))}function Yo(e,t){35051==e?fd.currentPixelPackBufferBinding=t:35052==e&&(fd.currentPixelUnpackBufferBinding=t),fd.bindBuffer(e,xo.buffers[t])}function $o(e,t,r){fd.bindBufferBase(e,t,xo.buffers[r])}function Ko(e,t,r,n,o){fd.bindBufferRange(e,t,xo.buffers[r],n,o)}function Jo(e,t){fd.bindFramebuffer(e,xo.framebuffers[t])}function ei(e,t){fd.bindRenderbuffer(e,xo.renderbuffers[t])}function ti(e,t){fd.bindSampler(e,xo.samplers[t])}function ri(e,t){fd.bindTexture(e,xo.textures[t])}function ni(e,t){fd.bindTransformFeedback(e,xo.transformFeedbacks[t])}function oi(e){fd.bindVertexArray(xo.vaos[e])}function ii(e){fd.bindVertexArray(xo.vaos[e])}function ai(e,t,r,n){fd.blendColor(e,t,r,n)}function si(e){fd.blendEquation(e)}function ci(e,t){fd.blendEquationSeparate(e,t)}function ui(e,t){fd.blendFunc(e,t)}function li(e,t,r,n){fd.blendFuncSeparate(e,t,r,n)}function di(e,t,r,n,o,i,a,s,c,u){fd.blitFramebuffer(e,t,r,n,o,i,a,s,c,u)}function fi(e,t,r,n){xo.currentContext.version>=2?r?fd.bufferData(e,G,n,r,t):fd.bufferData(e,t,n):fd.bufferData(e,r?G.subarray(r,r+t):t,n)}function pi(e,t,r,n){xo.currentContext.version>=2?fd.bufferSubData(e,t,G,n,r):fd.bufferSubData(e,t,G.subarray(n,n+r))}function gi(e){return fd.checkFramebufferStatus(e)}function hi(e){fd.clear(e)}function mi(e,t,r,n){fd.clearBufferfi(e,t,r,n)}function vi(e,t,r){fd.clearBufferfv(e,t,Y,r>>2)}function bi(e,t,r){fd.clearBufferiv(e,t,W,r>>2)}function yi(e,t,r){fd.clearBufferuiv(e,t,z,r>>2)}function Ei(e,t,r,n){fd.clearColor(e,t,r,n)}function _i(e){fd.clearDepth(e)}function wi(e){fd.clearStencil(e)}function Oi(e,t){return j(t===(0|t)),(e>>>0)+4294967296*t}function Ti(e,t,r,n){return fd.clientWaitSync(xo.syncs[e],t,Oi(r,n))}function Pi(e,t,r,n){fd.colorMask(!!e,!!t,!!r,!!n)}function Di(e){fd.compileShader(xo.shaders[e])}function xi(e,t,r,n,o,i,a,s){xo.currentContext.version>=2?fd.currentPixelUnpackBufferBinding?fd.compressedTexImage2D(e,t,r,n,o,i,a,s):fd.compressedTexImage2D(e,t,r,n,o,i,G,s,a):fd.compressedTexImage2D(e,t,r,n,o,i,s?G.subarray(s,s+a):null)}function ki(e,t,r,n,o,i,a,s,c){fd.currentPixelUnpackBufferBinding?fd.compressedTexImage3D(e,t,r,n,o,i,a,s,c):fd.compressedTexImage3D(e,t,r,n,o,i,a,G,c,s)}function Ri(e,t,r,n,o,i,a,s,c){xo.currentContext.version>=2?fd.currentPixelUnpackBufferBinding?fd.compressedTexSubImage2D(e,t,r,n,o,i,a,s,c):fd.compressedTexSubImage2D(e,t,r,n,o,i,a,G,c,s):fd.compressedTexSubImage2D(e,t,r,n,o,i,a,c?G.subarray(c,c+s):null)}function Si(e,t,r,n,o,i,a,s,c,u,l){fd.currentPixelUnpackBufferBinding?fd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,u,l):fd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,G,l,u)}function Mi(e,t,r,n,o){fd.copyBufferSubData(e,t,r,n,o)}function Ai(e,t,r,n,o,i,a,s){fd.copyTexImage2D(e,t,r,n,o,i,a,s)}function Fi(e,t,r,n,o,i,a,s){fd.copyTexSubImage2D(e,t,r,n,o,i,a,s)}function Li(e,t,r,n,o,i,a,s,c){fd.copyTexSubImage3D(e,t,r,n,o,i,a,s,c)}function Ci(){var e=xo.getNewId(xo.programs),t=fd.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,xo.programs[e]=t,e}function ji(e){var t=xo.getNewId(xo.shaders);return xo.shaders[t]=fd.createShader(e),t}function Ii(e){fd.cullFace(e)}function Ni(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=xo.buffers[n];o&&(fd.deleteBuffer(o),o.name=0,xo.buffers[n]=null,n==fd.currentPixelPackBufferBinding&&(fd.currentPixelPackBufferBinding=0),n==fd.currentPixelUnpackBufferBinding&&(fd.currentPixelUnpackBufferBinding=0))}}function Ui(e,t){for(var r=0;r<e;++r){var n=W[t+4*r>>2],o=xo.framebuffers[n];o&&(fd.deleteFramebuffer(o),o.name=0,xo.framebuffers[n]=null)}}function Hi(e){if(e){var t=xo.programs[e];t?(fd.deleteProgram(t),t.name=0,xo.programs[e]=null):xo.recordError(1281)}}function Bi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=xo.queries[n];o&&(fd.deleteQuery(o),xo.queries[n]=null)}}function Xi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=xo.queries[n];o&&(fd.disjointTimerQueryExt.deleteQueryEXT(o),xo.queries[n]=null)}}function Qi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=xo.renderbuffers[n];o&&(fd.deleteRenderbuffer(o),o.name=0,xo.renderbuffers[n]=null)}}function Zi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=xo.samplers[n];o&&(fd.deleteSampler(o),o.name=0,xo.samplers[n]=null)}}function Gi(e){if(e){var t=xo.shaders[e];t?(fd.deleteShader(t),xo.shaders[e]=null):xo.recordError(1281)}}function qi(e){if(e){var t=xo.syncs[e];t?(fd.deleteSync(t),t.name=0,xo.syncs[e]=null):xo.recordError(1281)}}function Vi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=xo.textures[n];o&&(fd.deleteTexture(o),o.name=0,xo.textures[n]=null)}}function Wi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=xo.transformFeedbacks[n];o&&(fd.deleteTransformFeedback(o),o.name=0,xo.transformFeedbacks[n]=null)}}function zi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2];fd.deleteVertexArray(xo.vaos[n]),xo.vaos[n]=null}}function Yi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2];fd.deleteVertexArray(xo.vaos[n]),xo.vaos[n]=null}}function $i(e){fd.depthFunc(e)}function Ki(e){fd.depthMask(!!e)}function Ji(e,t){fd.depthRange(e,t)}function ea(e,t){fd.detachShader(xo.programs[e],xo.shaders[t])}function ta(e){fd.disable(e)}function ra(e){fd.disableVertexAttribArray(e)}function na(e,t,r){fd.drawArrays(e,t,r)}function oa(e,t,r,n){fd.drawArraysInstanced(e,t,r,n)}function ia(e,t,r,n){fd.drawArraysInstanced(e,t,r,n)}function aa(e,t,r,n){fd.drawArraysInstanced(e,t,r,n)}function sa(e,t,r,n,o){fd.dibvbi.drawArraysInstancedBaseInstanceWEBGL(e,t,r,n,o)}function ca(e,t,r,n){fd.drawArraysInstanced(e,t,r,n)}function ua(e,t,r,n){fd.drawArraysInstanced(e,t,r,n)}var la=[];function da(e,t){for(var r=la[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];fd.drawBuffers(r)}function fa(e,t){for(var r=la[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];fd.drawBuffers(r)}function pa(e,t){for(var r=la[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];fd.drawBuffers(r)}function ga(e,t,r,n){fd.drawElements(e,t,r,n)}function ha(e,t,r,n,o){fd.drawElementsInstanced(e,t,r,n,o)}function ma(e,t,r,n,o){fd.drawElementsInstanced(e,t,r,n,o)}function va(e,t,r,n,o){fd.drawElementsInstanced(e,t,r,n,o)}function ba(e,t,r,n,o,i,a){fd.dibvbi.drawElementsInstancedBaseVertexBaseInstanceWEBGL(e,t,r,n,o,i,a)}function ya(e,t,r,n,o){fd.drawElementsInstanced(e,t,r,n,o)}function Ea(e,t,r,n,o){fd.drawElementsInstanced(e,t,r,n,o)}function _a(e,t,r,n){fd.drawElements(e,t,r,n)}function wa(e,t,r,n,o,i){_a(e,n,o,i)}function Oa(e){fd.enable(e)}function Ta(e){fd.enableVertexAttribArray(e)}function Pa(e){fd.endQuery(e)}function Da(e){fd.disjointTimerQueryExt.endQueryEXT(e)}function xa(){fd.endTransformFeedback()}function ka(e,t){var r=fd.fenceSync(e,t);if(r){var n=xo.getNewId(xo.syncs);return r.name=n,xo.syncs[n]=r,n}return 0}function Ra(){fd.finish()}function Sa(){fd.flush()}function Ma(e,t,r,n){fd.framebufferRenderbuffer(e,t,r,xo.renderbuffers[n])}function Aa(e,t,r,n,o){fd.framebufferTexture2D(e,t,r,xo.textures[n],o)}function Fa(e,t,r,n,o){fd.framebufferTextureLayer(e,t,xo.textures[r],n,o)}function La(e){fd.frontFace(e)}function Ca(e,t,r,n){for(var o=0;o<e;o++){var i=fd[r](),a=i&&xo.getNewId(n);i?(i.name=a,n[a]=i):xo.recordError(1282),W[t+4*o>>2]=a}}function ja(e,t){Ca(e,t,"createBuffer",xo.buffers)}function Ia(e,t){Ca(e,t,"createFramebuffer",xo.framebuffers)}function Na(e,t){Ca(e,t,"createQuery",xo.queries)}function Ua(e,t){for(var r=0;r<e;r++){var n=fd.disjointTimerQueryExt.createQueryEXT();if(!n){for(xo.recordError(1282);r<e;)W[t+4*r++>>2]=0;return}var o=xo.getNewId(xo.queries);n.name=o,xo.queries[o]=n,W[t+4*r>>2]=o}}function Ha(e,t){Ca(e,t,"createRenderbuffer",xo.renderbuffers)}function Ba(e,t){Ca(e,t,"createSampler",xo.samplers)}function Xa(e,t){Ca(e,t,"createTexture",xo.textures)}function Qa(e,t){Ca(e,t,"createTransformFeedback",xo.transformFeedbacks)}function Za(e,t){Ca(e,t,"createVertexArray",xo.vaos)}function Ga(e,t){Ca(e,t,"createVertexArray",xo.vaos)}function qa(e){fd.generateMipmap(e)}function Va(e,t,r,n,o,i,a,s){t=xo.programs[t];var c=fd[e](t,r);if(c){var u=s&&B(c.name,s,n);o&&(W[o>>2]=u),i&&(W[i>>2]=c.size),a&&(W[a>>2]=c.type)}}function Wa(e,t,r,n,o,i,a){Va("getActiveAttrib",e,t,r,n,o,i,a)}function za(e,t,r,n,o,i,a){Va("getActiveUniform",e,t,r,n,o,i,a)}function Ya(e,t,r,n,o){e=xo.programs[e];var i=fd.getActiveUniformBlockName(e,t);if(i)if(o&&r>0){var a=B(i,o,r);n&&(W[n>>2]=a)}else n&&(W[n>>2]=0)}function $a(e,t,r,n){if(n)if(e=xo.programs[e],35393!=r){var o=fd.getActiveUniformBlockParameter(e,t,r);if(null!==o)if(35395==r)for(var i=0;i<o.length;i++)W[n+4*i>>2]=o[i];else W[n>>2]=o}else{var a=fd.getActiveUniformBlockName(e,t);W[n>>2]=a.length+1}else xo.recordError(1281)}function Ka(e,t,r,n,o){if(o)if(t>0&&0==r)xo.recordError(1281);else{e=xo.programs[e];for(var i=[],a=0;a<t;a++)i.push(W[r+4*a>>2]);var s=fd.getActiveUniforms(e,i,n);if(s){var c=s.length;for(a=0;a<c;a++)W[o+4*a>>2]=s[a]}}else xo.recordError(1281)}function Ja(e,t,r,n){var o=fd.getAttachedShaders(xo.programs[e]),i=o.length;i>t&&(i=t),W[r>>2]=i;for(var a=0;a<i;++a){var s=xo.shaders.indexOf(o[a]);W[n+4*a>>2]=s}}function es(e,t){return fd.getAttribLocation(xo.programs[e],U(t))}function ts(e){return z[e>>2]+4294967296*W[e+4>>2]}function rs(e){return z[e>>2]+4294967296*z[e+4>>2]}function ns(e,t){z[e>>2]=t,z[e+4>>2]=(t-z[e>>2])/4294967296;var r=t>=0?rs(e):ts(e);r!=t&&D("writeI53ToI64() out of range: serialized JS Number "+t+" to Wasm heap as bytes lo=0x"+z[e>>2].toString(16)+", hi=0x"+z[e+4>>2].toString(16)+", which deserializes back to "+r+" instead!")}function os(e,t,r){if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=r&&1!=r&&xo.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=fd.getParameter(34467);n=o?o.length:0;break;case 33309:if(xo.currentContext.version<2)return void xo.recordError(1282);n=2*(fd.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(xo.currentContext.version<2)return void xo.recordError(1280);n=33307==e?3:0}if(void 0===n){var i=fd.getParameter(e);switch(typeof i){case"number":n=i;break;case"boolean":n=i?1:0;break;case"string":return void xo.recordError(1280);case"object":if(null===i)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:return void xo.recordError(1280)}else{if(i instanceof Float32Array||i instanceof Uint32Array||i instanceof Int32Array||i instanceof Array){for(var a=0;a<i.length;++a)switch(r){case 0:W[t+4*a>>2]=i[a];break;case 2:Y[t+4*a>>2]=i[a];break;case 4:Z[t+a>>0]=i[a]?1:0}return}try{n=0|i.name}catch(t){return xo.recordError(1280),void P("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return xo.recordError(1280),void P("GL_INVALID_ENUM in glGet"+r+"v: Native code calling glGet"+r+"v("+e+") and it returns "+i+" of type "+typeof i+"!")}}switch(r){case 1:ns(t,n);break;case 0:W[t>>2]=n;break;case 2:Y[t>>2]=n;break;case 4:Z[t>>0]=n?1:0}}else xo.recordError(1281)}function is(e,t){os(e,t,4)}function as(e,t,r){r?ns(r,fd.getBufferParameter(e,t)):xo.recordError(1281)}function ss(e,t,r){r?W[r>>2]=fd.getBufferParameter(e,t):xo.recordError(1281)}function cs(){var e=fd.getError()||xo.lastError;return xo.lastError=0,e}function us(e,t){os(e,t,2)}function ls(e,t){return fd.getFragDataLocation(xo.programs[e],U(t))}function ds(e,t,r,n){var o=fd.getFramebufferAttachmentParameter(e,t,r);(o instanceof WebGLRenderbuffer||o instanceof WebGLTexture)&&(o=0|o.name),W[n>>2]=o}function fs(e,t,r,n){if(r){var o,i=fd.getIndexedParameter(e,t);switch(typeof i){case"boolean":o=i?1:0;break;case"number":o=i;break;case"object":if(null===i)switch(e){case 35983:case 35368:o=0;break;default:return void xo.recordError(1280)}else{if(!(i instanceof WebGLBuffer))return void xo.recordError(1280);o=0|i.name}break;default:return void xo.recordError(1280)}switch(n){case 1:ns(r,o);break;case 0:W[r>>2]=o;break;case 2:Y[r>>2]=o;break;case 4:Z[r>>0]=o?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+n}}else xo.recordError(1281)}function ps(e,t,r){fs(e,t,r,1)}function gs(e,t){os(e,t,1)}function hs(e,t,r){fs(e,t,r,0)}function ms(e,t){os(e,t,0)}function vs(e,t,r,n,o){if(n<0)xo.recordError(1281);else if(o){var i=fd.getInternalformatParameter(e,t,r);if(null!==i)for(var a=0;a<i.length&&a<n;++a)W[o+a>>2]=i[a]}else xo.recordError(1281)}function bs(e,t,r,n,o){xo.recordError(1282)}function ys(e,t,r,n){var o=fd.getProgramInfoLog(xo.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?B(o,n,t):0;r&&(W[r>>2]=i)}function Es(e,t,r){if(r)if(e>=xo.counter)xo.recordError(1281);else if(e=xo.programs[e],35716==t){var n=fd.getProgramInfoLog(e);null===n&&(n="(unknown error)"),W[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<fd.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,fd.getActiveUniform(e,o).name.length+1);W[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<fd.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,fd.getActiveAttrib(e,o).name.length+1);W[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<fd.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,fd.getActiveUniformBlockName(e,o).length+1);W[r>>2]=e.maxUniformBlockNameLength}else W[r>>2]=fd.getProgramParameter(e,t);else xo.recordError(1281)}function _s(e,t,r){if(r){var n,o=xo.queries[e];ns(r,"boolean"==typeof(n=xo.currentContext.version<2?fd.disjointTimerQueryExt.getQueryObjectEXT(o,t):fd.getQueryParameter(o,t))?n?1:0:n)}else xo.recordError(1281)}function ws(e,t,r){if(r){var n,o=xo.queries[e],i=fd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else xo.recordError(1281)}function Os(e,t,r){if(r){var n,o=xo.queries[e];ns(r,"boolean"==typeof(n=xo.currentContext.version<2?fd.disjointTimerQueryExt.getQueryObjectEXT(o,t):fd.getQueryParameter(o,t))?n?1:0:n)}else xo.recordError(1281)}function Ts(e,t,r){if(r){var n,o=xo.queries[e],i=fd.getQueryParameter(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else xo.recordError(1281)}function Ps(e,t,r){if(r){var n,o=xo.queries[e],i=fd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else xo.recordError(1281)}function Ds(e,t,r){r?W[r>>2]=fd.getQuery(e,t):xo.recordError(1281)}function xs(e,t,r){r?W[r>>2]=fd.disjointTimerQueryExt.getQueryEXT(e,t):xo.recordError(1281)}function ks(e,t,r){r?W[r>>2]=fd.getRenderbufferParameter(e,t):xo.recordError(1281)}function Rs(e,t,r){r?Y[r>>2]=fd.getSamplerParameter(xo.samplers[e],t):xo.recordError(1281)}function Ss(e,t,r){r?W[r>>2]=fd.getSamplerParameter(xo.samplers[e],t):xo.recordError(1281)}function Ms(e,t,r,n){var o=fd.getShaderInfoLog(xo.shaders[e]);null===o&&(o="(unknown error)");var i=t>0&&n?B(o,n,t):0;r&&(W[r>>2]=i)}function As(e,t,r,n){var o=fd.getShaderPrecisionFormat(e,t);W[r>>2]=o.rangeMin,W[r+4>>2]=o.rangeMax,W[n>>2]=o.precision}function Fs(e,t,r,n){var o=fd.getShaderSource(xo.shaders[e]);if(o){var i=t>0&&n?B(o,n,t):0;r&&(W[r>>2]=i)}}function Ls(e,t,r){if(r)if(35716==t){var n=fd.getShaderInfoLog(xo.shaders[e]);null===n&&(n="(unknown error)");var o=n?n.length+1:0;W[r>>2]=o}else if(35720==t){var i=fd.getShaderSource(xo.shaders[e]),a=i?i.length+1:0;W[r>>2]=a}else W[r>>2]=fd.getShaderParameter(xo.shaders[e],t);else xo.recordError(1281)}function Cs(e){var t=X(e)+1,r=wd(t);return B(e,r,t),r}function js(e){var t=xo.stringCache[e];if(!t){switch(e){case 7939:var r=fd.getSupportedExtensions()||[];t=Cs((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=fd.getParameter(e);n||xo.recordError(1280),t=n&&Cs(n);break;case 7938:var o=fd.getParameter(7938);t=Cs(o=xo.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=fd.getParameter(35724),a=i.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==a&&(3==a[1].length&&(a[1]=a[1]+"0"),i="OpenGL ES GLSL ES "+a[1]+" ("+i+")"),t=Cs(i);break;default:xo.recordError(1280)}xo.stringCache[e]=t}return t}function Is(e,t){if(xo.currentContext.version<2)return xo.recordError(1282),0;var r=xo.stringiCache[e];if(r)return t<0||t>=r.length?(xo.recordError(1281),0):r[t];switch(e){case 7939:var n=fd.getSupportedExtensions()||[];return n=(n=n.concat(n.map((function(e){return"GL_"+e})))).map((function(e){return Cs(e)})),r=xo.stringiCache[e]=n,t<0||t>=r.length?(xo.recordError(1281),0):r[t];default:return xo.recordError(1280),0}}function Ns(e,t,r,n,o){if(r<0)xo.recordError(1281);else if(o){var i=fd.getSyncParameter(xo.syncs[e],t);null!==i&&(W[o>>2]=i,n&&(W[n>>2]=1))}else xo.recordError(1281)}function Us(e,t,r){r?Y[r>>2]=fd.getTexParameter(e,t):xo.recordError(1281)}function Hs(e,t,r){r?W[r>>2]=fd.getTexParameter(e,t):xo.recordError(1281)}function Bs(e,t,r,n,o,i,a){e=xo.programs[e];var s=fd.getTransformFeedbackVarying(e,t);if(s){if(a&&r>0){var c=B(s.name,a,r);n&&(W[n>>2]=c)}else n&&(W[n>>2]=0);o&&(W[o>>2]=s.size),i&&(W[i>>2]=s.type)}}function Xs(e,t){return fd.getUniformBlockIndex(xo.programs[e],U(t))}function Qs(e,t,r,n){if(n)if(t>0&&(0==r||0==n))xo.recordError(1281);else{e=xo.programs[e];for(var o=[],i=0;i<t;i++)o.push(U(W[r+4*i>>2]));var a=fd.getUniformIndices(e,o);if(a){var s=a.length;for(i=0;i<s;i++)W[n+4*i>>2]=a[i]}}else xo.recordError(1281)}function Zs(e){return parseInt(e)}function Gs(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function qs(e){var t,r,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<fd.getProgramParameter(e,35718);++t){var i=fd.getActiveUniform(e,t),a=i.name,s=i.size,c=Gs(a),u=c>0?a.slice(0,c):a,l=e.uniformIdCounter;for(e.uniformIdCounter+=s,o[u]=[s,l],r=0;r<s;++r)n[l]=r,e.uniformArrayNamesById[l++]=u}}function Vs(e,t){if(t=U(t),e=xo.programs[e]){qs(e);var r=e.uniformLocsById,n=0,o=t,i=Gs(t);i>0&&(n=Zs(t.slice(i+1))>>>0,o=t.slice(0,i));var a=e.uniformSizeAndIdsByName[o];if(a&&n<a[0]&&(r[n+=a[1]]=r[n]||fd.getUniformLocation(e,t)))return n}else xo.recordError(1281);return-1}function Ws(e){var t=fd.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=fd.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}xo.recordError(1282)}function zs(e,t,r,n){if(r){qs(e=xo.programs[e]);var o=fd.getUniform(e,Ws(t));if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:W[r>>2]=o;break;case 2:Y[r>>2]=o}else for(var i=0;i<o.length;i++)switch(n){case 0:W[r+4*i>>2]=o[i];break;case 2:Y[r+4*i>>2]=o[i]}}else xo.recordError(1281)}function Ys(e,t,r){zs(e,t,r,2)}function $s(e,t,r){zs(e,t,r,0)}function Ks(e,t,r){zs(e,t,r,0)}function Js(e,t,r,n){if(r){var o=fd.getVertexAttrib(e,t);if(34975==t)W[r>>2]=o&&o.name;else if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:W[r>>2]=o;break;case 2:Y[r>>2]=o;break;case 5:W[r>>2]=Math.fround(o)}else for(var i=0;i<o.length;i++)switch(n){case 0:W[r+4*i>>2]=o[i];break;case 2:Y[r+4*i>>2]=o[i];break;case 5:W[r+4*i>>2]=Math.fround(o[i])}}else xo.recordError(1281)}function ec(e,t,r){Js(e,t,r,0)}function tc(e,t,r){Js(e,t,r,0)}function rc(e,t,r){r?W[r>>2]=fd.getVertexAttribOffset(e,t):xo.recordError(1281)}function nc(e,t,r){Js(e,t,r,2)}function oc(e,t,r){Js(e,t,r,5)}function ic(e,t){fd.hint(e,t)}function ac(e,t,r){for(var n=la[t],o=0;o<t;o++)n[o]=W[r+4*o>>2];fd.invalidateFramebuffer(e,n)}function sc(e,t,r,n,o,i,a){for(var s=la[t],c=0;c<t;c++)s[c]=W[r+4*c>>2];fd.invalidateSubFramebuffer(e,s,n,o,i,a)}function cc(e){var t=xo.buffers[e];return t?fd.isBuffer(t):0}function uc(e){return fd.isEnabled(e)}function lc(e){var t=xo.framebuffers[e];return t?fd.isFramebuffer(t):0}function dc(e){return(e=xo.programs[e])?fd.isProgram(e):0}function fc(e){var t=xo.queries[e];return t?fd.isQuery(t):0}function pc(e){var t=xo.queries[e];return t?fd.disjointTimerQueryExt.isQueryEXT(t):0}function gc(e){var t=xo.renderbuffers[e];return t?fd.isRenderbuffer(t):0}function hc(e){var t=xo.samplers[e];return t?fd.isSampler(t):0}function mc(e){var t=xo.shaders[e];return t?fd.isShader(t):0}function vc(e){return fd.isSync(xo.syncs[e])}function bc(e){var t=xo.textures[e];return t?fd.isTexture(t):0}function yc(e){return fd.isTransformFeedback(xo.transformFeedbacks[e])}function Ec(e){var t=xo.vaos[e];return t?fd.isVertexArray(t):0}function _c(e){var t=xo.vaos[e];return t?fd.isVertexArray(t):0}function wc(e){fd.lineWidth(e)}function Oc(e){e=xo.programs[e],fd.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function Tc(e,t,r,n,o,i){fd.mdibvbi.multiDrawArraysInstancedBaseInstanceWEBGL(e,W,t>>2,W,r>>2,W,n>>2,z,o>>2,i)}function Pc(e,t,r,n,o,i,a,s){fd.mdibvbi.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(e,W,t>>2,r,W,n>>2,W,o>>2,W,i>>2,z,a>>2,s)}function Dc(){fd.pauseTransformFeedback()}function xc(e,t){3317==e&&(xo.unpackAlignment=t),fd.pixelStorei(e,t)}function kc(e,t){fd.polygonOffset(e,t)}function Rc(e,t,r,n){xo.recordError(1280)}function Sc(e,t,r){xo.recordError(1280)}function Mc(e,t){fd.disjointTimerQueryExt.queryCounterEXT(xo.queries[e],t)}function Ac(e){fd.readBuffer(e)}function Fc(e,t,r,n){var o;return t*(e*r+(o=n)-1&-o)}function Lc(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}function Cc(e){return 0==(e-=5120)?Z:1==e?G:2==e?q:4==e?W:6==e?Y:5==e||28922==e||28520==e||30779==e||30782==e?z:V}function jc(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function Ic(e,t,r,n,o,i){var a=Cc(e),s=jc(a),c=1<<s,u=Fc(r,n,Lc(t)*c,xo.unpackAlignment);return a.subarray(o>>s,o+u>>s)}function Nc(e,t,r,n,o,i,a){if(xo.currentContext.version>=2)if(fd.currentPixelPackBufferBinding)fd.readPixels(e,t,r,n,o,i,a);else{var s=Cc(i);fd.readPixels(e,t,r,n,o,i,s,a>>jc(s))}else{var c=Ic(i,o,r,n,a);c?fd.readPixels(e,t,r,n,o,i,c):xo.recordError(1280)}}function Uc(){}function Hc(e,t,r,n){fd.renderbufferStorage(e,t,r,n)}function Bc(e,t,r,n,o){fd.renderbufferStorageMultisample(e,t,r,n,o)}function Xc(){fd.resumeTransformFeedback()}function Qc(e,t){fd.sampleCoverage(e,!!t)}function Zc(e,t,r){fd.samplerParameterf(xo.samplers[e],t,r)}function Gc(e,t,r){var n=Y[r>>2];fd.samplerParameterf(xo.samplers[e],t,n)}function qc(e,t,r){fd.samplerParameteri(xo.samplers[e],t,r)}function Vc(e,t,r){var n=W[r>>2];fd.samplerParameteri(xo.samplers[e],t,n)}function Wc(e,t,r,n){fd.scissor(e,t,r,n)}function zc(){xo.recordError(1280)}function Yc(e,t,r,n){var o=xo.getSource(e,t,r,n);if(xo.currentContext.version>=2&&o.includes("#version 100")){var i="";(o=(o=o.replace(/#extension GL_OES_standard_derivatives : enable/g,"")).replace(/#extension GL_EXT_shader_texture_lod : enable/g,"")).includes("gl_FragColor")&&(i+="out mediump vec4 GL_FragColor;\n",o=o.replace(/gl_FragColor/g,"GL_FragColor")),o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.includes("attribute")?(o=o.replace(/attribute/g,"in")).replace(/varying/g,"out"):o.replace(/varying/g,"in")).replace(/textureCubeLodEXT/g,"textureCubeLod")).replace(/texture2DLodEXT/g,"texture2DLod")).replace(/texture2DProjLodEXT/g,"texture2DProjLod")).replace(/texture2DGradEXT/g,"texture2DGrad")).replace(/texture2DProjGradEXT/g,"texture2DProjGrad")).replace(/textureCubeGradEXT/g,"textureCubeGrad")).replace(/textureCube/g,"texture")).replace(/texture1D/g,"texture")).replace(/texture2D/g,"texture")).replace(/texture3D/g,"texture")).replace(/#version 100/g,"#version 300 es\n"+i)}fd.shaderSource(xo.shaders[e],o)}function $c(e,t,r){fd.stencilFunc(e,t,r)}function Kc(e,t,r,n){fd.stencilFuncSeparate(e,t,r,n)}function Jc(e){fd.stencilMask(e)}function eu(e,t){fd.stencilMaskSeparate(e,t)}function tu(e,t,r){fd.stencilOp(e,t,r)}function ru(e,t,r,n){fd.stencilOpSeparate(e,t,r,n)}function nu(e,t,r,n,o,i,a,s,c){if(xo.currentContext.version>=2&&(6402==a&&6402==r&&5125==s&&(r=33190),36193==s&&(s=5131,6408==a&&6408==r&&(r=34842)),34041==r&&(r=35056)),xo.currentContext.version>=2)if(fd.currentPixelUnpackBufferBinding)fd.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Cc(s);fd.texImage2D(e,t,r,n,o,i,a,s,u,c>>jc(u))}else fd.texImage2D(e,t,r,n,o,i,a,s,null);else fd.texImage2D(e,t,r,n,o,i,a,s,c?Ic(s,a,n,o,c):null)}function ou(e,t,r,n,o,i,a,s,c,u){if(fd.currentPixelUnpackBufferBinding)fd.texImage3D(e,t,r,n,o,i,a,s,c,u);else if(u){var l=Cc(c);fd.texImage3D(e,t,r,n,o,i,a,s,c,l,u>>jc(l))}else fd.texImage3D(e,t,r,n,o,i,a,s,c,null)}function iu(e,t,r){fd.texParameterf(e,t,r)}function au(e,t,r){var n=Y[r>>2];fd.texParameterf(e,t,n)}function su(e,t,r){fd.texParameteri(e,t,r)}function cu(e,t,r){var n=W[r>>2];fd.texParameteri(e,t,n)}function uu(e,t,r,n,o){fd.texStorage2D(e,t,r,n,o)}function lu(e,t,r,n,o,i){fd.texStorage3D(e,t,r,n,o,i)}function du(e,t,r,n,o,i,a,s,c){if(xo.currentContext.version>=2&&36193==s&&(s=5131),xo.currentContext.version>=2)if(fd.currentPixelUnpackBufferBinding)fd.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Cc(s);fd.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>jc(u))}else fd.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=Ic(s,a,o,i,c)),fd.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function fu(e,t,r,n,o,i,a,s,c,u,l){if(fd.currentPixelUnpackBufferBinding)fd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,l);else if(l){var d=Cc(u);fd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,d,l>>jc(d))}else fd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,null)}function pu(e,t,r,n){e=xo.programs[e];for(var o=[],i=0;i<t;i++)o.push(U(W[r+4*i>>2]));fd.transformFeedbackVaryings(e,o,n)}function gu(e,t){fd.uniform1f(Ws(e),t)}var hu=[];function mu(e,t,r){if(xo.currentContext.version>=2)fd.uniform1fv(Ws(e),Y,r>>2,t);else{if(t<=288)for(var n=hu[t-1],o=0;o<t;++o)n[o]=Y[r+4*o>>2];else n=Y.subarray(r>>2,r+4*t>>2);fd.uniform1fv(Ws(e),n)}}function vu(e,t){fd.uniform1i(Ws(e),t)}var bu=[];function yu(e,t,r){if(xo.currentContext.version>=2)fd.uniform1iv(Ws(e),W,r>>2,t);else{if(t<=288)for(var n=bu[t-1],o=0;o<t;++o)n[o]=W[r+4*o>>2];else n=W.subarray(r>>2,r+4*t>>2);fd.uniform1iv(Ws(e),n)}}function Eu(e,t){fd.uniform1ui(Ws(e),t)}function _u(e,t,r){fd.uniform1uiv(Ws(e),z,r>>2,t)}function wu(e,t,r){fd.uniform2f(Ws(e),t,r)}function Ou(e,t,r){if(xo.currentContext.version>=2)fd.uniform2fv(Ws(e),Y,r>>2,2*t);else{if(t<=144)for(var n=hu[2*t-1],o=0;o<2*t;o+=2)n[o]=Y[r+4*o>>2],n[o+1]=Y[r+(4*o+4)>>2];else n=Y.subarray(r>>2,r+8*t>>2);fd.uniform2fv(Ws(e),n)}}function Tu(e,t,r){fd.uniform2i(Ws(e),t,r)}function Pu(e,t,r){if(xo.currentContext.version>=2)fd.uniform2iv(Ws(e),W,r>>2,2*t);else{if(t<=144)for(var n=bu[2*t-1],o=0;o<2*t;o+=2)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2];else n=W.subarray(r>>2,r+8*t>>2);fd.uniform2iv(Ws(e),n)}}function Du(e,t,r){fd.uniform2ui(Ws(e),t,r)}function xu(e,t,r){fd.uniform2uiv(Ws(e),z,r>>2,2*t)}function ku(e,t,r,n){fd.uniform3f(Ws(e),t,r,n)}function Ru(e,t,r){if(xo.currentContext.version>=2)fd.uniform3fv(Ws(e),Y,r>>2,3*t);else{if(t<=96)for(var n=hu[3*t-1],o=0;o<3*t;o+=3)n[o]=Y[r+4*o>>2],n[o+1]=Y[r+(4*o+4)>>2],n[o+2]=Y[r+(4*o+8)>>2];else n=Y.subarray(r>>2,r+12*t>>2);fd.uniform3fv(Ws(e),n)}}function Su(e,t,r,n){fd.uniform3i(Ws(e),t,r,n)}function Mu(e,t,r){if(xo.currentContext.version>=2)fd.uniform3iv(Ws(e),W,r>>2,3*t);else{if(t<=96)for(var n=bu[3*t-1],o=0;o<3*t;o+=3)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2],n[o+2]=W[r+(4*o+8)>>2];else n=W.subarray(r>>2,r+12*t>>2);fd.uniform3iv(Ws(e),n)}}function Au(e,t,r,n){fd.uniform3ui(Ws(e),t,r,n)}function Fu(e,t,r){fd.uniform3uiv(Ws(e),z,r>>2,3*t)}function Lu(e,t,r,n,o){fd.uniform4f(Ws(e),t,r,n,o)}function Cu(e,t,r){if(xo.currentContext.version>=2)fd.uniform4fv(Ws(e),Y,r>>2,4*t);else{if(t<=72){var n=hu[4*t-1],o=Y;r>>=2;for(var i=0;i<4*t;i+=4){var a=r+i;n[i]=o[a],n[i+1]=o[a+1],n[i+2]=o[a+2],n[i+3]=o[a+3]}}else n=Y.subarray(r>>2,r+16*t>>2);fd.uniform4fv(Ws(e),n)}}function ju(e,t,r,n,o){fd.uniform4i(Ws(e),t,r,n,o)}function Iu(e,t,r){if(xo.currentContext.version>=2)fd.uniform4iv(Ws(e),W,r>>2,4*t);else{if(t<=72)for(var n=bu[4*t-1],o=0;o<4*t;o+=4)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2],n[o+2]=W[r+(4*o+8)>>2],n[o+3]=W[r+(4*o+12)>>2];else n=W.subarray(r>>2,r+16*t>>2);fd.uniform4iv(Ws(e),n)}}function Nu(e,t,r,n,o){fd.uniform4ui(Ws(e),t,r,n,o)}function Uu(e,t,r){fd.uniform4uiv(Ws(e),z,r>>2,4*t)}function Hu(e,t,r){e=xo.programs[e],fd.uniformBlockBinding(e,t,r)}function Bu(e,t,r,n){if(xo.currentContext.version>=2)fd.uniformMatrix2fv(Ws(e),!!r,Y,n>>2,4*t);else{if(t<=72)for(var o=hu[4*t-1],i=0;i<4*t;i+=4)o[i]=Y[n+4*i>>2],o[i+1]=Y[n+(4*i+4)>>2],o[i+2]=Y[n+(4*i+8)>>2],o[i+3]=Y[n+(4*i+12)>>2];else o=Y.subarray(n>>2,n+16*t>>2);fd.uniformMatrix2fv(Ws(e),!!r,o)}}function Xu(e,t,r,n){fd.uniformMatrix2x3fv(Ws(e),!!r,Y,n>>2,6*t)}function Qu(e,t,r,n){fd.uniformMatrix2x4fv(Ws(e),!!r,Y,n>>2,8*t)}function Zu(e,t,r,n){if(xo.currentContext.version>=2)fd.uniformMatrix3fv(Ws(e),!!r,Y,n>>2,9*t);else{if(t<=32)for(var o=hu[9*t-1],i=0;i<9*t;i+=9)o[i]=Y[n+4*i>>2],o[i+1]=Y[n+(4*i+4)>>2],o[i+2]=Y[n+(4*i+8)>>2],o[i+3]=Y[n+(4*i+12)>>2],o[i+4]=Y[n+(4*i+16)>>2],o[i+5]=Y[n+(4*i+20)>>2],o[i+6]=Y[n+(4*i+24)>>2],o[i+7]=Y[n+(4*i+28)>>2],o[i+8]=Y[n+(4*i+32)>>2];else o=Y.subarray(n>>2,n+36*t>>2);fd.uniformMatrix3fv(Ws(e),!!r,o)}}function Gu(e,t,r,n){fd.uniformMatrix3x2fv(Ws(e),!!r,Y,n>>2,6*t)}function qu(e,t,r,n){fd.uniformMatrix3x4fv(Ws(e),!!r,Y,n>>2,12*t)}function Vu(e,t,r,n){if(xo.currentContext.version>=2)fd.uniformMatrix4fv(Ws(e),!!r,Y,n>>2,16*t);else{if(t<=18){var o=hu[16*t-1],i=Y;n>>=2;for(var a=0;a<16*t;a+=16){var s=n+a;o[a]=i[s],o[a+1]=i[s+1],o[a+2]=i[s+2],o[a+3]=i[s+3],o[a+4]=i[s+4],o[a+5]=i[s+5],o[a+6]=i[s+6],o[a+7]=i[s+7],o[a+8]=i[s+8],o[a+9]=i[s+9],o[a+10]=i[s+10],o[a+11]=i[s+11],o[a+12]=i[s+12],o[a+13]=i[s+13],o[a+14]=i[s+14],o[a+15]=i[s+15]}}else o=Y.subarray(n>>2,n+64*t>>2);fd.uniformMatrix4fv(Ws(e),!!r,o)}}function Wu(e,t,r,n){fd.uniformMatrix4x2fv(Ws(e),!!r,Y,n>>2,8*t)}function zu(e,t,r,n){fd.uniformMatrix4x3fv(Ws(e),!!r,Y,n>>2,12*t)}function Yu(e){e=xo.programs[e],fd.useProgram(e),fd.currentProgram=e}function $u(e){fd.validateProgram(xo.programs[e])}function Ku(e,t){fd.vertexAttrib1f(e,t)}function Ju(e,t){fd.vertexAttrib1f(e,Y[t>>2])}function el(e,t,r){fd.vertexAttrib2f(e,t,r)}function tl(e,t){fd.vertexAttrib2f(e,Y[t>>2],Y[t+4>>2])}function rl(e,t,r,n){fd.vertexAttrib3f(e,t,r,n)}function nl(e,t){fd.vertexAttrib3f(e,Y[t>>2],Y[t+4>>2],Y[t+8>>2])}function ol(e,t,r,n,o){fd.vertexAttrib4f(e,t,r,n,o)}function il(e,t){fd.vertexAttrib4f(e,Y[t>>2],Y[t+4>>2],Y[t+8>>2],Y[t+12>>2])}function al(e,t){fd.vertexAttribDivisor(e,t)}function sl(e,t){fd.vertexAttribDivisor(e,t)}function cl(e,t){fd.vertexAttribDivisor(e,t)}function ul(e,t){fd.vertexAttribDivisor(e,t)}function ll(e,t){fd.vertexAttribDivisor(e,t)}function dl(e,t,r,n,o){fd.vertexAttribI4i(e,t,r,n,o)}function fl(e,t){fd.vertexAttribI4i(e,W[t>>2],W[t+4>>2],W[t+8>>2],W[t+12>>2])}function pl(e,t,r,n,o){fd.vertexAttribI4ui(e,t,r,n,o)}function gl(e,t){fd.vertexAttribI4ui(e,z[t>>2],z[t+4>>2],z[t+8>>2],z[t+12>>2])}function hl(e,t,r,n,o){fd.vertexAttribIPointer(e,t,r,n,o)}function ml(e,t,r,n,o,i){fd.vertexAttribPointer(e,t,r,!!n,o,i)}function vl(e,t,r,n){fd.viewport(e,t,r,n)}function bl(e,t,r,n){fd.waitSync(xo.syncs[e],t,Oi(r,n))}function yl(e,t,r){G.copyWithin(e,t,t+r)}function El(e){try{return M.grow(e-Q.byteLength+65535>>>16),ue(M.buffer),1}catch(t){P("emscripten_realloc_buffer: Attempted to grow heap from "+Q.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function _l(e){var t=G.length;j((e>>>=0)>t);var r=2147483648;if(e>r)return P("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147483648 bytes!"),!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);o=Math.min(o,e+100663296);var i=Math.min(r,ce(Math.max(e,o),65536));if(El(i))return!0}return P("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1}function wl(e){if(i.emscripten_ubq_asyncFetchStates.has(e)){const t=i.emscripten_ubq_asyncFetchStates.get(e);if(t.state==s.ALLOCATED)return!0;if(t.state==s.FINISHED){const r=t.result.length,n=i._malloc(r);return i.HEAPU8.set(t.result,n),t.resultAddress=n,t.resultLength=r,t.state=s.ALLOCATED,i.emscripten_ubq_asyncFetchStates.set(e,t),!0}}return!1}function Ol(e,t,r,n){let o=i.UTF8ToString(e,t),a=i.UTF8ToString(r,n),s=i.emscripten_ubq_asyncFetchNextHeaderHandle++;return i.emscripten_ubq_asyncFetchHeaders.set(s,{key:o,value:a}),s}function Tl(e){return i.emscripten_ubq_asyncFetchHeaders.has(e)?i.emscripten_ubq_asyncFetchHeaders.get(e):0}function Pl(e,t,r,n,o,a,u,l,d){let f=i.UTF8ToString(t,r),p=i.UTF8ToString(l,d),g=i.emscripten_ubq_asyncFetchNextHandle++;i.emscripten_ubq_asyncFetchStates.set(g,{state:s.PENDING});let h={};for(let e=0;e<o;e++){const t=i.getValue(n+4*e,"i32"),r=i.emscripten_ubq_asyncFetchHeaders.get(t);h[r.key]=r.value}const m=c[e];let v;return"GET"!==m&&"HEAD"!==m&&(v=new Uint8Array(i.HEAPU8.buffer,a,u)),fetch(f,{method:m,headers:h,body:v,mode:"cors",credentials:p}).then((e=>{if(e.status>=200&&e.status<=209){let t=0;async function r(e,t){const r=e.getReader();let n=0,o=[];for(;;){const{done:e,value:t}=await r.read();if(e)break;o.push(t),n+=t.length,i.emscripten_ubq_asyncFetchCompletedBytes.set(g,n)}let a=new Uint8Array(n),s=0;for(let e of o)a.set(e,s),s+=e.length;return a}return e.headers.has("Content-Length")&&(t=+e.headers.get("Content-Length")),i.emscripten_ubq_asyncFetchTotalBytes.set(g,t),r(e.body)}return Promise.reject(e.statusText)})).then((e=>{i.emscripten_ubq_asyncFetchStates.set(g,{state:s.FINISHED,result:e})})).catch((e=>{i.emscripten_ubq_asyncFetchStates.set(g,{state:s.ERROR,error:e})})),g}function Dl(e){return!!i.emscripten_ubq_asyncFetchStates.has(e)&&(i.emscripten_ubq_asyncFetchStates.delete(e),!0)}function xl(e){return i.emscripten_ubq_asyncFetchCompletedBytes.has(e)?i.emscripten_ubq_asyncFetchCompletedBytes.get(e):0}function kl(e){if(i.emscripten_ubq_asyncFetchStates.has(e)){const t=i.emscripten_ubq_asyncFetchStates.get(e);if(t.state==s.ALLOCATED)return t.resultAddress}return-1}function Rl(e){if(i.emscripten_ubq_asyncFetchStates.has(e)){const t=i.emscripten_ubq_asyncFetchStates.get(e);if(t.state==s.ALLOCATED)return t.resultLength}return-1}function Sl(e){return i.emscripten_ubq_asyncFetchStates.has(e)?i.emscripten_ubq_asyncFetchStates.get(e).state:-1}function Ml(e){return i.emscripten_ubq_asyncFetchTotalBytes.has(e)?i.emscripten_ubq_asyncFetchTotalBytes.get(e):0}var Al={inEventHandler:0,removeAllEventListeners:function(){for(var e=Al.eventHandlers.length-1;e>=0;--e)Al._removeHandler(e);Al.eventHandlers=[],Al.deferredCalls=[]},registerRemoveEventListeners:function(){Al.removeEventListenersRegistered||(be.push(Al.removeAllEventListeners),Al.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(e,t,r){function n(e,t){if(e.length!=t.length)return!1;for(var r in e)if(e[r]!=t[r])return!1;return!0}for(var o in Al.deferredCalls){var i=Al.deferredCalls[o];if(i.targetFunction==e&&n(i.argsList,r))return}Al.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),Al.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<Al.deferredCalls.length;++t)Al.deferredCalls[t].targetFunction==e&&(Al.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return Al.inEventHandler&&Al.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(Al.canPerformEventHandlerRequests())for(var e=0;e<Al.deferredCalls.length;++e){var t=Al.deferredCalls[e];Al.deferredCalls.splice(e,1),--e,t.targetFunction.apply(null,t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<Al.eventHandlers.length;++r)Al.eventHandlers[r].target!=e||t&&t!=Al.eventHandlers[r].eventTypeString||Al._removeHandler(r--)},_removeHandler:function(e){var t=Al.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),Al.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++Al.inEventHandler,Al.currentEventHandler=e,Al.runDeferredCalls(),e.handlerFunc(t),Al.runDeferredCalls(),--Al.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),Al.eventHandlers.push(e),Al.registerRemoveEventListeners();else for(var r=0;r<Al.eventHandlers.length;++r)Al.eventHandlers[r].target==e.target&&Al.eventHandlers[r].eventTypeString==e.eventTypeString&&Al._removeHandler(r--)},getNodeNameForTarget:function(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},Fl=["default","low-power","high-performance"];function Ll(e){return e>2?U(e):e}var Cl=[0,document,window];function jl(e){return e=Ll(e),Cl[e]||document.querySelector(e)}function Il(e){return jl(e)}function Nl(e,t){j(t);var r=t>>2,n=W[r+6],o={alpha:!!W[r+0],depth:!!W[r+1],stencil:!!W[r+2],antialias:!!W[r+3],premultipliedAlpha:!!W[r+4],preserveDrawingBuffer:!!W[r+5],powerPreference:Fl[n],failIfMajorPerformanceCaveat:!!W[r+7],majorVersion:W[r+8],minorVersion:W[r+9],enableExtensionsByDefault:W[r+10],explicitSwapControl:W[r+11],proxyContextToMainThread:W[r+12],renderViaOffscreenBackBuffer:W[r+13]},i=Il(e);return i?o.explicitSwapControl?0:xo.createContext(i,o):0}function Ul(e,t){return Nl(e,t)}function Hl(){return xo.currentContext?xo.currentContext.handle:0}function Bl(){return Hl()}function Xl(e){return xo.makeContextCurrent(e)?0:-5}function Ql(e){xo.currentContext==e&&(xo.currentContext=0),xo.deleteContext(e)}function Zl(e){j(e);for(var t=e>>2,r=0;r<14;++r)W[t+r]=0;W[t+0]=W[t+1]=W[t+3]=W[t+4]=W[t+8]=W[t+10]=1}i._emscripten_webgl_get_current_context=Bl,i._emscripten_webgl_make_context_current=Xl;var Gl={};function ql(){return f||"./this.program"}function Vl(){if(!Vl.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ql()};for(var t in Gl)void 0===Gl[t]?delete e[t]:e[t]=Gl[t];var r=[];for(var t in e)r.push(t+"="+e[t]);Vl.strings=r}return Vl.strings}function Wl(e,t){var r=0;return Vl().forEach((function(n,o){var i=t+r;W[e+4*o>>2]=i,se(n,i),r+=n.length+1})),0}function zl(e,t){var r=Vl();W[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),W[t>>2]=n,0}function Yl(e){try{var t=Et.getStreamFromFD(e);return yt.close(t),0}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),e.errno}}function $l(e,t,r,n,o,i){try{j(!o,"offsets over 2^32 not yet supported");var a=Et.getStreamFromFD(e),s=Et.doReadv(a,t,r,n);return W[i>>2]=s,0}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),e.errno}}function Kl(e,t,r,n){try{var o=Et.getStreamFromFD(e),i=Et.doReadv(o,t,r);return W[n>>2]=i,0}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),e.errno}}function Jl(e,t,r,n,o){try{var i=Et.getStreamFromFD(e),a=4294967296*r+(t>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(yt.llseek(i,a,n),Xe=[i.position>>>0,(Be=i.position,+Math.abs(Be)>=1?Be>0?(0|Math.min(+Math.floor(Be/4294967296),4294967295))>>>0:~~+Math.ceil((Be-+(~~Be>>>0))/4294967296)>>>0:0)],W[o>>2]=Xe[0],W[o+4>>2]=Xe[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),e.errno}}function ed(e,t,r,n){try{var o=Et.getStreamFromFD(e),i=Et.doWritev(o,t,r);return W[n>>2]=i,0}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ue(e),e.errno}}function td(){return S()}function rd(e){var t=Date.now();return W[e>>2]=t/1e3|0,W[e+4>>2]=t%1e3*1e3|0,0}function nd(e){R(e)}function od(e){return e%4==0&&(e%100!=0||e%400==0)}function id(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var ad=[31,29,31,30,31,30,31,31,30,31,30,31],sd=[31,28,31,30,31,30,31,31,30,31,30,31];function cd(e,t){for(var r=new Date(e.getTime());t>0;){var n=od(r.getFullYear()),o=r.getMonth(),i=(n?ad:sd)[o];if(!(t>i-r.getDate()))return r.setDate(r.getDate()+t),r;t-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function ud(e,t,r,n){var o=W[n+40>>2],i={tm_sec:W[n>>2],tm_min:W[n+4>>2],tm_hour:W[n+8>>2],tm_mday:W[n+12>>2],tm_mon:W[n+16>>2],tm_year:W[n+20>>2],tm_wday:W[n+24>>2],tm_yday:W[n+28>>2],tm_isdst:W[n+32>>2],tm_gmtoff:W[n+36>>2],tm_zone:o?U(o):""},a=U(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in s)a=a.replace(new RegExp(c,"g"),s[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function f(e,t){return d(e,t,"0")}function p(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function g(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 h(e){var t=cd(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=g(r),i=g(n);return p(o,t)<=0?p(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return u[e.tm_wday].substring(0,3)},"%A":function(e){return u[e.tm_wday]},"%b":function(e){return l[e.tm_mon].substring(0,3)},"%B":function(e){return l[e.tm_mon]},"%C":function(e){return f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),f(t,2)},"%j":function(e){return f(e.tm_mday+id(od(e.tm_year+1900)?ad:sd,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return f(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),r=0===t.getDay()?t:cd(t,7-t.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(p(r,n)<0){var o=id(od(n.getFullYear())?ad:sd,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return f(Math.ceil(i/7),2)}return 0===p(r,t)?"01":"00"},"%V":function(e){var t,r=new Date(e.tm_year+1900,0,4),n=new Date(e.tm_year+1901,0,4),o=g(r),i=g(n),a=cd(new Date(e.tm_year+1900,0,1),e.tm_yday);return p(a,o)<0?"53":p(i,a)<=0?"01":(t=o.getFullYear()<e.tm_year+1900?e.tm_yday+32-o.getDate():e.tm_yday+1-o.getDate(),f(Math.ceil(t/7),2))},"%w":function(e){return e.tm_wday},"%W":function(e){var t=new Date(e.tm_year,0,1),r=1===t.getDay()?t:cd(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(p(r,n)<0){var o=id(od(n.getFullYear())?ad:sd,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return f(Math.ceil(i/7),2)}return 0===p(r,t)?"01":"00"},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var c in m)a.includes(c)&&(a=a.replace(new RegExp(c,"g"),m[c](i)));var v=yd(a,!1);return v.length>t?0:(ae(v,e),v.length-1)}function ld(e,t,r,n){return ud(e,t,r,n)}function dd(e){var t=Date.now()/1e3|0;return e&&(W[e>>2]=t),t}var fd,pd=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=yt.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},gd=365,hd=146;Object.defineProperties(pd.prototype,{read:{get:function(){return(this.mode&gd)===gd},set:function(e){e?this.mode|=gd:this.mode&=~gd}},write:{get:function(){return(this.mode&hd)===hd},set:function(e){e?this.mode|=hd:this.mode&=~hd}},isFolder:{get:function(){return yt.isDir(this.mode)}},isDevice:{get:function(){return yt.isChrdev(this.mode)}}}),yt.FSNode=pd,yt.staticInit(),i.FS_createPath=yt.createPath,i.FS_createDataFile=yt.createDataFile,i.FS_createPreloadedFile=yt.createPreloadedFile,i.FS_createLazyFile=yt.createLazyFile,i.FS_createDevice=yt.createDevice,i.FS_unlink=yt.unlink,bt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Zt=i.InternalError=Qt(Error,"InternalError"),Kt(),tr=i.BindingError=Qt(Error,"BindingError"),Er(),Qr(),Ir(),Yr=i.UnboundTypeError=Qt(Error,"UnboundTypeError"),dn(),i.requestFullscreen=function(e,t){bo.requestFullscreen(e,t)},i.requestFullScreen=function(){bo.requestFullScreen()},i.requestAnimationFrame=function(e){bo.requestAnimationFrame(e)},i.setCanvasSize=function(e,t,r){bo.setCanvasSize(e,t,r)},i.pauseMainLoop=function(){bo.mainLoop.pause()},i.resumeMainLoop=function(){bo.mainLoop.resume()},i.getUserMedia=function(){bo.getUserMedia()},i.createContext=function(e,t,r,n){return bo.createContext(e,t,r,n)};for(var md=0;md<32;++md)la.push(new Array(md));var vd=new Float32Array(288);for(md=0;md<288;++md)hu[md]=vd.subarray(0,md+1);var bd=new Int32Array(288);for(md=0;md<288;++md)bu[md]=bd.subarray(0,md+1);function yd(e,t,r){var n=r>0?r:X(e)+1,o=new Array(n),i=H(e,o,0,o.length);return t&&(o.length=i),o}"function"==typeof atob&&atob;var Ed,_d={__assert_fail:rt,__cxa_allocate_exception:nt,__cxa_atexit:ot,__cxa_throw:at,__syscall_fcntl64:_t,__syscall_fstat64:wt,__syscall_getdents64:Ot,__syscall_ioctl:Tt,__syscall_mmap2:Dt,__syscall_munmap:kt,__syscall_open:Rt,__syscall_stat64:St,_dlopen_js:Mt,_dlsym_js:At,_embind_finalize_value_array:Vt,_embind_finalize_value_object:zt,_embind_register_bigint:Yt,_embind_register_bool:or,_embind_register_class:Jr,_embind_register_class_constructor:tn,_embind_register_class_function:on,_embind_register_emval:pn,_embind_register_enum:hn,_embind_register_enum_value:vn,_embind_register_float:En,_embind_register_function:_n,_embind_register_integer:On,_embind_register_memory_view:Tn,_embind_register_smart_ptr:Pn,_embind_register_std_string:Dn,_embind_register_std_wstring:xn,_embind_register_value_array:kn,_embind_register_value_array_element:Rn,_embind_register_value_object:Sn,_embind_register_value_object_field:Mn,_embind_register_void:An,_emscripten_throw_longjmp:Fn,_emval_as:Ln,_emval_call:jn,_emval_call_method:Bn,_emval_call_void_method:Xn,_emval_decref:cn,_emval_get_global:Zn,_emval_get_method_caller:qn,_emval_get_property:Vn,_emval_incref:Wn,_emval_instanceof:zn,_emval_is_string:Yn,_emval_new:eo,_emval_new_array:to,_emval_new_cstring:ro,_emval_new_object:no,_emval_run_destructors:oo,_emval_set_property:io,_emval_take_value:ao,_emval_throw:so,abort:co,clock_gettime:lo,eglChooseConfig:Eo,eglCreateContext:ko,eglCreateWindowSurface:Ro,eglDestroyContext:So,eglDestroySurface:Mo,eglGetConfigAttrib:Ao,eglGetDisplay:Fo,eglGetError:Lo,eglInitialize:Co,eglMakeCurrent:jo,eglSwapBuffers:Io,eglTerminate:No,emscripten_console_error:Uo,emscripten_console_log:Ho,emscripten_console_warn:Bo,emscripten_debugger:Xo,emscripten_get_heap_max:Qo,emscripten_glActiveTexture:Zo,emscripten_glAttachShader:Go,emscripten_glBeginQuery:qo,emscripten_glBeginQueryEXT:Vo,emscripten_glBeginTransformFeedback:Wo,emscripten_glBindAttribLocation:zo,emscripten_glBindBuffer:Yo,emscripten_glBindBufferBase:$o,emscripten_glBindBufferRange:Ko,emscripten_glBindFramebuffer:Jo,emscripten_glBindRenderbuffer:ei,emscripten_glBindSampler:ti,emscripten_glBindTexture:ri,emscripten_glBindTransformFeedback:ni,emscripten_glBindVertexArray:oi,emscripten_glBindVertexArrayOES:ii,emscripten_glBlendColor:ai,emscripten_glBlendEquation:si,emscripten_glBlendEquationSeparate:ci,emscripten_glBlendFunc:ui,emscripten_glBlendFuncSeparate:li,emscripten_glBlitFramebuffer:di,emscripten_glBufferData:fi,emscripten_glBufferSubData:pi,emscripten_glCheckFramebufferStatus:gi,emscripten_glClear:hi,emscripten_glClearBufferfi:mi,emscripten_glClearBufferfv:vi,emscripten_glClearBufferiv:bi,emscripten_glClearBufferuiv:yi,emscripten_glClearColor:Ei,emscripten_glClearDepthf:_i,emscripten_glClearStencil:wi,emscripten_glClientWaitSync:Ti,emscripten_glColorMask:Pi,emscripten_glCompileShader:Di,emscripten_glCompressedTexImage2D:xi,emscripten_glCompressedTexImage3D:ki,emscripten_glCompressedTexSubImage2D:Ri,emscripten_glCompressedTexSubImage3D:Si,emscripten_glCopyBufferSubData:Mi,emscripten_glCopyTexImage2D:Ai,emscripten_glCopyTexSubImage2D:Fi,emscripten_glCopyTexSubImage3D:Li,emscripten_glCreateProgram:Ci,emscripten_glCreateShader:ji,emscripten_glCullFace:Ii,emscripten_glDeleteBuffers:Ni,emscripten_glDeleteFramebuffers:Ui,emscripten_glDeleteProgram:Hi,emscripten_glDeleteQueries:Bi,emscripten_glDeleteQueriesEXT:Xi,emscripten_glDeleteRenderbuffers:Qi,emscripten_glDeleteSamplers:Zi,emscripten_glDeleteShader:Gi,emscripten_glDeleteSync:qi,emscripten_glDeleteTextures:Vi,emscripten_glDeleteTransformFeedbacks:Wi,emscripten_glDeleteVertexArrays:zi,emscripten_glDeleteVertexArraysOES:Yi,emscripten_glDepthFunc:$i,emscripten_glDepthMask:Ki,emscripten_glDepthRangef:Ji,emscripten_glDetachShader:ea,emscripten_glDisable:ta,emscripten_glDisableVertexAttribArray:ra,emscripten_glDrawArrays:na,emscripten_glDrawArraysInstanced:oa,emscripten_glDrawArraysInstancedANGLE:ia,emscripten_glDrawArraysInstancedARB:aa,emscripten_glDrawArraysInstancedBaseInstanceWEBGL:sa,emscripten_glDrawArraysInstancedEXT:ca,emscripten_glDrawArraysInstancedNV:ua,emscripten_glDrawBuffers:da,emscripten_glDrawBuffersEXT:fa,emscripten_glDrawBuffersWEBGL:pa,emscripten_glDrawElements:ga,emscripten_glDrawElementsInstanced:ha,emscripten_glDrawElementsInstancedANGLE:ma,emscripten_glDrawElementsInstancedARB:va,emscripten_glDrawElementsInstancedBaseVertexBaseInstanceWEBGL:ba,emscripten_glDrawElementsInstancedEXT:ya,emscripten_glDrawElementsInstancedNV:Ea,emscripten_glDrawRangeElements:wa,emscripten_glEnable:Oa,emscripten_glEnableVertexAttribArray:Ta,emscripten_glEndQuery:Pa,emscripten_glEndQueryEXT:Da,emscripten_glEndTransformFeedback:xa,emscripten_glFenceSync:ka,emscripten_glFinish:Ra,emscripten_glFlush:Sa,emscripten_glFramebufferRenderbuffer:Ma,emscripten_glFramebufferTexture2D:Aa,emscripten_glFramebufferTextureLayer:Fa,emscripten_glFrontFace:La,emscripten_glGenBuffers:ja,emscripten_glGenFramebuffers:Ia,emscripten_glGenQueries:Na,emscripten_glGenQueriesEXT:Ua,emscripten_glGenRenderbuffers:Ha,emscripten_glGenSamplers:Ba,emscripten_glGenTextures:Xa,emscripten_glGenTransformFeedbacks:Qa,emscripten_glGenVertexArrays:Za,emscripten_glGenVertexArraysOES:Ga,emscripten_glGenerateMipmap:qa,emscripten_glGetActiveAttrib:Wa,emscripten_glGetActiveUniform:za,emscripten_glGetActiveUniformBlockName:Ya,emscripten_glGetActiveUniformBlockiv:$a,emscripten_glGetActiveUniformsiv:Ka,emscripten_glGetAttachedShaders:Ja,emscripten_glGetAttribLocation:es,emscripten_glGetBooleanv:is,emscripten_glGetBufferParameteri64v:as,emscripten_glGetBufferParameteriv:ss,emscripten_glGetError:cs,emscripten_glGetFloatv:us,emscripten_glGetFragDataLocation:ls,emscripten_glGetFramebufferAttachmentParameteriv:ds,emscripten_glGetInteger64i_v:ps,emscripten_glGetInteger64v:gs,emscripten_glGetIntegeri_v:hs,emscripten_glGetIntegerv:ms,emscripten_glGetInternalformativ:vs,emscripten_glGetProgramBinary:bs,emscripten_glGetProgramInfoLog:ys,emscripten_glGetProgramiv:Es,emscripten_glGetQueryObjecti64vEXT:_s,emscripten_glGetQueryObjectivEXT:ws,emscripten_glGetQueryObjectui64vEXT:Os,emscripten_glGetQueryObjectuiv:Ts,emscripten_glGetQueryObjectuivEXT:Ps,emscripten_glGetQueryiv:Ds,emscripten_glGetQueryivEXT:xs,emscripten_glGetRenderbufferParameteriv:ks,emscripten_glGetSamplerParameterfv:Rs,emscripten_glGetSamplerParameteriv:Ss,emscripten_glGetShaderInfoLog:Ms,emscripten_glGetShaderPrecisionFormat:As,emscripten_glGetShaderSource:Fs,emscripten_glGetShaderiv:Ls,emscripten_glGetString:js,emscripten_glGetStringi:Is,emscripten_glGetSynciv:Ns,emscripten_glGetTexParameterfv:Us,emscripten_glGetTexParameteriv:Hs,emscripten_glGetTransformFeedbackVarying:Bs,emscripten_glGetUniformBlockIndex:Xs,emscripten_glGetUniformIndices:Qs,emscripten_glGetUniformLocation:Vs,emscripten_glGetUniformfv:Ys,emscripten_glGetUniformiv:$s,emscripten_glGetUniformuiv:Ks,emscripten_glGetVertexAttribIiv:ec,emscripten_glGetVertexAttribIuiv:tc,emscripten_glGetVertexAttribPointerv:rc,emscripten_glGetVertexAttribfv:nc,emscripten_glGetVertexAttribiv:oc,emscripten_glHint:ic,emscripten_glInvalidateFramebuffer:ac,emscripten_glInvalidateSubFramebuffer:sc,emscripten_glIsBuffer:cc,emscripten_glIsEnabled:uc,emscripten_glIsFramebuffer:lc,emscripten_glIsProgram:dc,emscripten_glIsQuery:fc,emscripten_glIsQueryEXT:pc,emscripten_glIsRenderbuffer:gc,emscripten_glIsSampler:hc,emscripten_glIsShader:mc,emscripten_glIsSync:vc,emscripten_glIsTexture:bc,emscripten_glIsTransformFeedback:yc,emscripten_glIsVertexArray:Ec,emscripten_glIsVertexArrayOES:_c,emscripten_glLineWidth:wc,emscripten_glLinkProgram:Oc,emscripten_glMultiDrawArraysInstancedBaseInstanceWEBGL:Tc,emscripten_glMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL:Pc,emscripten_glPauseTransformFeedback:Dc,emscripten_glPixelStorei:xc,emscripten_glPolygonOffset:kc,emscripten_glProgramBinary:Rc,emscripten_glProgramParameteri:Sc,emscripten_glQueryCounterEXT:Mc,emscripten_glReadBuffer:Ac,emscripten_glReadPixels:Nc,emscripten_glReleaseShaderCompiler:Uc,emscripten_glRenderbufferStorage:Hc,emscripten_glRenderbufferStorageMultisample:Bc,emscripten_glResumeTransformFeedback:Xc,emscripten_glSampleCoverage:Qc,emscripten_glSamplerParameterf:Zc,emscripten_glSamplerParameterfv:Gc,emscripten_glSamplerParameteri:qc,emscripten_glSamplerParameteriv:Vc,emscripten_glScissor:Wc,emscripten_glShaderBinary:zc,emscripten_glShaderSource:Yc,emscripten_glStencilFunc:$c,emscripten_glStencilFuncSeparate:Kc,emscripten_glStencilMask:Jc,emscripten_glStencilMaskSeparate:eu,emscripten_glStencilOp:tu,emscripten_glStencilOpSeparate:ru,emscripten_glTexImage2D:nu,emscripten_glTexImage3D:ou,emscripten_glTexParameterf:iu,emscripten_glTexParameterfv:au,emscripten_glTexParameteri:su,emscripten_glTexParameteriv:cu,emscripten_glTexStorage2D:uu,emscripten_glTexStorage3D:lu,emscripten_glTexSubImage2D:du,emscripten_glTexSubImage3D:fu,emscripten_glTransformFeedbackVaryings:pu,emscripten_glUniform1f:gu,emscripten_glUniform1fv:mu,emscripten_glUniform1i:vu,emscripten_glUniform1iv:yu,emscripten_glUniform1ui:Eu,emscripten_glUniform1uiv:_u,emscripten_glUniform2f:wu,emscripten_glUniform2fv:Ou,emscripten_glUniform2i:Tu,emscripten_glUniform2iv:Pu,emscripten_glUniform2ui:Du,emscripten_glUniform2uiv:xu,emscripten_glUniform3f:ku,emscripten_glUniform3fv:Ru,emscripten_glUniform3i:Su,emscripten_glUniform3iv:Mu,emscripten_glUniform3ui:Au,emscripten_glUniform3uiv:Fu,emscripten_glUniform4f:Lu,emscripten_glUniform4fv:Cu,emscripten_glUniform4i:ju,emscripten_glUniform4iv:Iu,emscripten_glUniform4ui:Nu,emscripten_glUniform4uiv:Uu,emscripten_glUniformBlockBinding:Hu,emscripten_glUniformMatrix2fv:Bu,emscripten_glUniformMatrix2x3fv:Xu,emscripten_glUniformMatrix2x4fv:Qu,emscripten_glUniformMatrix3fv:Zu,emscripten_glUniformMatrix3x2fv:Gu,emscripten_glUniformMatrix3x4fv:qu,emscripten_glUniformMatrix4fv:Vu,emscripten_glUniformMatrix4x2fv:Wu,emscripten_glUniformMatrix4x3fv:zu,emscripten_glUseProgram:Yu,emscripten_glValidateProgram:$u,emscripten_glVertexAttrib1f:Ku,emscripten_glVertexAttrib1fv:Ju,emscripten_glVertexAttrib2f:el,emscripten_glVertexAttrib2fv:tl,emscripten_glVertexAttrib3f:rl,emscripten_glVertexAttrib3fv:nl,emscripten_glVertexAttrib4f:ol,emscripten_glVertexAttrib4fv:il,emscripten_glVertexAttribDivisor:al,emscripten_glVertexAttribDivisorANGLE:sl,emscripten_glVertexAttribDivisorARB:cl,emscripten_glVertexAttribDivisorEXT:ul,emscripten_glVertexAttribDivisorNV:ll,emscripten_glVertexAttribI4i:dl,emscripten_glVertexAttribI4iv:fl,emscripten_glVertexAttribI4ui:pl,emscripten_glVertexAttribI4uiv:gl,emscripten_glVertexAttribIPointer:hl,emscripten_glVertexAttribPointer:ml,emscripten_glViewport:vl,emscripten_glWaitSync:bl,emscripten_memcpy_big:yl,emscripten_resize_heap:_l,emscripten_ubq_fetch_allocateFetchResult:wl,emscripten_ubq_fetch_createHeader:Ol,emscripten_ubq_fetch_deleteHeader:Tl,emscripten_ubq_fetch_dispatchAsyncFetch:Pl,emscripten_ubq_fetch_freeFetchResult:Dl,emscripten_ubq_fetch_getFetchCompletedBytes:xl,emscripten_ubq_fetch_getFetchResultAddress:kl,emscripten_ubq_fetch_getFetchResultLength:Rl,emscripten_ubq_fetch_getFetchState:Sl,emscripten_ubq_fetch_getFetchTotalBytes:Ml,emscripten_webgl_create_context:Ul,emscripten_webgl_destroy_context:Ql,emscripten_webgl_init_context_attributes:Zl,emscripten_webgl_make_context_current:Xl,environ_get:Wl,environ_sizes_get:zl,exit:po,fd_close:Yl,fd_pread:$l,fd_read:Kl,fd_seek:Jl,fd_write:ed,getTempRet0:td,gettimeofday:rd,invoke_ii:Fd,invoke_iii:Ld,invoke_iiii:jd,invoke_iiiii:Xd,invoke_iiiiii:Ud,invoke_iiiiiii:Bd,invoke_v:qd,invoke_vi:Id,invoke_vii:Nd,invoke_viii:Cd,invoke_viiii:Hd,invoke_viiiii:Qd,invoke_viiiiii:Gd,invoke_viiiiiiiii:Zd,setTempRet0:nd,strftime_l:ld,time:dd},wd=(ze(),i.___wasm_call_ctors=qe("__wasm_call_ctors"),i._malloc=qe("malloc")),Od=(i._main=qe("main"),i._free=qe("free")),Td=i.___errno_location=qe("__errno_location"),Pd=(i._fflush=qe("fflush"),i._saveSetjmp=qe("saveSetjmp"),i.___getTypeName=qe("__getTypeName")),Dd=(i.___embind_register_native_and_builtin_types=qe("__embind_register_native_and_builtin_types"),i._emscripten_main_thread_process_queued_calls=qe("emscripten_main_thread_process_queued_calls"),i.___dl_seterr=qe("__dl_seterr"),i.stackSave=qe("stackSave")),xd=i.stackRestore=qe("stackRestore"),kd=i.stackAlloc=qe("stackAlloc"),Rd=i._emscripten_stack_init=function(){return(Rd=i._emscripten_stack_init=i.asm.emscripten_stack_init).apply(null,arguments)},Sd=(i._emscripten_stack_get_free=function(){return(i._emscripten_stack_get_free=i.asm.emscripten_stack_get_free).apply(null,arguments)},i._emscripten_stack_get_end=function(){return(Sd=i._emscripten_stack_get_end=i.asm.emscripten_stack_get_end).apply(null,arguments)}),Md=i._setThrew=qe("setThrew"),Ad=i._memalign=qe("memalign");function Fd(e,t){var r=Dd();try{return et(e)(t)}catch(e){if(xd(r),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Ld(e,t,r){var n=Dd();try{return et(e)(t,r)}catch(e){if(xd(n),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Cd(e,t,r,n){var o=Dd();try{et(e)(t,r,n)}catch(e){if(xd(o),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function jd(e,t,r,n){var o=Dd();try{return et(e)(t,r,n)}catch(e){if(xd(o),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Id(e,t){var r=Dd();try{et(e)(t)}catch(e){if(xd(r),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Nd(e,t,r){var n=Dd();try{et(e)(t,r)}catch(e){if(xd(n),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Ud(e,t,r,n,o,i){var a=Dd();try{return et(e)(t,r,n,o,i)}catch(e){if(xd(a),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Hd(e,t,r,n,o){var i=Dd();try{et(e)(t,r,n,o)}catch(e){if(xd(i),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Bd(e,t,r,n,o,i,a){var s=Dd();try{return et(e)(t,r,n,o,i,a)}catch(e){if(xd(s),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Xd(e,t,r,n,o){var i=Dd();try{return et(e)(t,r,n,o)}catch(e){if(xd(i),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Qd(e,t,r,n,o,i){var a=Dd();try{et(e)(t,r,n,o,i)}catch(e){if(xd(a),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Zd(e,t,r,n,o,i,a,s,c,u){var l=Dd();try{et(e)(t,r,n,o,i,a,s,c,u)}catch(e){if(xd(l),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Gd(e,t,r,n,o,i,a){var s=Dd();try{et(e)(t,r,n,o,i,a)}catch(e){if(xd(s),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function qd(e){var t=Dd();try{et(e)()}catch(e){if(xd(t),e!==e+0&&"longjmp"!==e)throw e;Md(1,0)}}function Vd(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Wd(e){j(0==Ae,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),j(0==he.length,"cannot call main when preRun functions remain to be called");var t=i._main,r=(e=e||[]).length+1,n=kd(4*(r+1));W[n>>2]=ie(f);for(var o=1;o<r;o++)W[(n>>2)+o]=ie(e[o-1]);W[(n>>2)+r]=0;try{var a=t(r,n);return Kd(a,!0),a}catch(e){return tt(e)}}function zd(){Rd(),pe()}function Yd(e){function r(){Ed||(Ed=!0,i.calledRun=!0,C||(Pe(),De(),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),ef&&Wd(e),ke()))}e=e||d,Ae>0||(zd(),Te(),Ae>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r(),ge()))}function $d(){var e=T,t=P,r=!1;T=P=function(e){r=!0};try{var n=i._fflush;n&&n(0),["stdout","stderr"].forEach((function(e){var t=yt.analyzePath("/dev/"+e);if(t){var n=t.object.rdev,o=dt.ttys[n];o&&o.output&&o.output.length&&(r=!0)}}))}catch(e){}T=e,P=t,r&&D("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")}function Kd(e,t){if(L=e,$d(),Oe()){if(!t){var r="program exited (with status: "+e+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)";o(r),P(r)}}else xe();Jd(e)}function Jd(e){L=e,Oe()||(i.onExit&&i.onExit(e),C=!0),p(e,new Vd(e))}if(i.dynCall_ji=qe("dynCall_ji"),i.dynCall_jij=qe("dynCall_jij"),i.dynCall_iiiijii=qe("dynCall_iiiijii"),i.dynCall_viiij=qe("dynCall_viiij"),i.dynCall_viji=qe("dynCall_viji"),i.dynCall_vijiii=qe("dynCall_vijiii"),i.dynCall_viiiiij=qe("dynCall_viiiiij"),i.dynCall_jiiiijiiiii=qe("dynCall_jiiiijiiiii"),i.dynCall_jii=qe("dynCall_jii"),i.dynCall_iiij=qe("dynCall_iiij"),i.dynCall_iiiij=qe("dynCall_iiiij"),i.dynCall_viij=qe("dynCall_viij"),i.dynCall_iij=qe("dynCall_iij"),i.dynCall_vij=qe("dynCall_vij"),i.dynCall_jiiii=qe("dynCall_jiiii"),i.dynCall_jiiiiii=qe("dynCall_jiiiiii"),i.dynCall_jiiiiji=qe("dynCall_jiiiiji"),i.dynCall_iijj=qe("dynCall_iijj"),i.dynCall_jiji=qe("dynCall_jiji"),i.dynCall_iiiiij=qe("dynCall_iiiiij"),i.dynCall_iiiiijj=qe("dynCall_iiiiijj"),i.dynCall_iiiiiijj=qe("dynCall_iiiiiijj"),i.dynCall_viijii=qe("dynCall_viijii"),Object.getOwnPropertyDescriptor(i,"intArrayFromString")||(i.intArrayFromString=function(){Ue("'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"intArrayToString")||(i.intArrayToString=function(){Ue("'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ccall")||(i.ccall=function(){Ue("'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"cwrap")||(i.cwrap=function(){Ue("'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"setValue")||(i.setValue=function(){Ue("'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.getValue=F,Object.getOwnPropertyDescriptor(i,"allocate")||(i.allocate=function(){Ue("'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"UTF8ArrayToString")||(i.UTF8ArrayToString=function(){Ue("'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.UTF8ToString=U,Object.getOwnPropertyDescriptor(i,"stringToUTF8Array")||(i.stringToUTF8Array=function(){Ue("'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"stringToUTF8")||(i.stringToUTF8=function(){Ue("'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"lengthBytesUTF8")||(i.lengthBytesUTF8=function(){Ue("'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"stackTrace")||(i.stackTrace=function(){Ue("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"addOnPreRun")||(i.addOnPreRun=function(){Ue("'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"addOnInit")||(i.addOnInit=function(){Ue("'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"addOnPreMain")||(i.addOnPreMain=function(){Ue("'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"addOnExit")||(i.addOnExit=function(){Ue("'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"addOnPostRun")||(i.addOnPostRun=function(){Ue("'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"writeStringToMemory")||(i.writeStringToMemory=function(){Ue("'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"writeArrayToMemory")||(i.writeArrayToMemory=function(){Ue("'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"writeAsciiToMemory")||(i.writeAsciiToMemory=function(){Ue("'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.addRunDependency=Ie,i.removeRunDependency=Ne,Object.getOwnPropertyDescriptor(i,"FS_createFolder")||(i.FS_createFolder=function(){Ue("'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.FS_createPath=yt.createPath,i.FS_createDataFile=yt.createDataFile,i.FS_createPreloadedFile=yt.createPreloadedFile,i.FS_createLazyFile=yt.createLazyFile,Object.getOwnPropertyDescriptor(i,"FS_createLink")||(i.FS_createLink=function(){Ue("'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.FS_createDevice=yt.createDevice,i.FS_unlink=yt.unlink,Object.getOwnPropertyDescriptor(i,"getLEB")||(i.getLEB=function(){Ue("'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getFunctionTables")||(i.getFunctionTables=function(){Ue("'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"alignFunctionTables")||(i.alignFunctionTables=function(){Ue("'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerFunctions")||(i.registerFunctions=function(){Ue("'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"addFunction")||(i.addFunction=function(){Ue("'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"removeFunction")||(i.removeFunction=function(){Ue("'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getFuncWrapper")||(i.getFuncWrapper=function(){Ue("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"prettyPrint")||(i.prettyPrint=function(){Ue("'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"dynCall")||(i.dynCall=function(){Ue("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getCompilerSetting")||(i.getCompilerSetting=function(){Ue("'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"print")||(i.print=function(){Ue("'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"printErr")||(i.printErr=function(){Ue("'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getTempRet0")||(i.getTempRet0=function(){Ue("'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"setTempRet0")||(i.setTempRet0=function(){Ue("'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"callMain")||(i.callMain=function(){Ue("'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"abort")||(i.abort=function(){Ue("'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"keepRuntimeAlive")||(i.keepRuntimeAlive=function(){Ue("'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"zeroMemory")||(i.zeroMemory=function(){Ue("'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"stringToNewUTF8")||(i.stringToNewUTF8=function(){Ue("'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"setFileTime")||(i.setFileTime=function(){Ue("'setFileTime' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emscripten_realloc_buffer")||(i.emscripten_realloc_buffer=function(){Ue("'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ENV")||(i.ENV=function(){Ue("'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"withStackSave")||(i.withStackSave=function(){Ue("'withStackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ERRNO_CODES")||(i.ERRNO_CODES=function(){Ue("'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ERRNO_MESSAGES")||(i.ERRNO_MESSAGES=function(){Ue("'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"setErrNo")||(i.setErrNo=function(){Ue("'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"inetPton4")||(i.inetPton4=function(){Ue("'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"inetNtop4")||(i.inetNtop4=function(){Ue("'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"inetPton6")||(i.inetPton6=function(){Ue("'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"inetNtop6")||(i.inetNtop6=function(){Ue("'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"readSockaddr")||(i.readSockaddr=function(){Ue("'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"writeSockaddr")||(i.writeSockaddr=function(){Ue("'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"DNS")||(i.DNS=function(){Ue("'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getHostByName")||(i.getHostByName=function(){Ue("'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"GAI_ERRNO_MESSAGES")||(i.GAI_ERRNO_MESSAGES=function(){Ue("'GAI_ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"Protocols")||(i.Protocols=function(){Ue("'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"Sockets")||(i.Sockets=function(){Ue("'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getRandomDevice")||(i.getRandomDevice=function(){Ue("'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"traverseStack")||(i.traverseStack=function(){Ue("'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"UNWIND_CACHE")||(i.UNWIND_CACHE=function(){Ue("'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"readAsmConstArgsArray")||(i.readAsmConstArgsArray=function(){Ue("'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"readAsmConstArgs")||(i.readAsmConstArgs=function(){Ue("'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"mainThreadEM_ASM")||(i.mainThreadEM_ASM=function(){Ue("'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"jstoi_q")||(i.jstoi_q=function(){Ue("'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"jstoi_s")||(i.jstoi_s=function(){Ue("'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getExecutableName")||(i.getExecutableName=function(){Ue("'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"listenOnce")||(i.listenOnce=function(){Ue("'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"autoResumeAudioContext")||(i.autoResumeAudioContext=function(){Ue("'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"dynCallLegacy")||(i.dynCallLegacy=function(){Ue("'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getDynCaller")||(i.getDynCaller=function(){Ue("'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"dynCall")||(i.dynCall=function(){Ue("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"callRuntimeCallbacks")||(i.callRuntimeCallbacks=function(){Ue("'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"wasmTableMirror")||(i.wasmTableMirror=function(){Ue("'wasmTableMirror' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"setWasmTableEntry")||(i.setWasmTableEntry=function(){Ue("'setWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getWasmTableEntry")||(i.getWasmTableEntry=function(){Ue("'getWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"handleException")||(i.handleException=function(){Ue("'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"runtimeKeepalivePush")||(i.runtimeKeepalivePush=function(){Ue("'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"runtimeKeepalivePop")||(i.runtimeKeepalivePop=function(){Ue("'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"callUserCallback")||(i.callUserCallback=function(){Ue("'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"maybeExit")||(i.maybeExit=function(){Ue("'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"safeSetTimeout")||(i.safeSetTimeout=function(){Ue("'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"asmjsMangle")||(i.asmjsMangle=function(){Ue("'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"asyncLoad")||(i.asyncLoad=function(){Ue("'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"alignMemory")||(i.alignMemory=function(){Ue("'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"mmapAlloc")||(i.mmapAlloc=function(){Ue("'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"reallyNegative")||(i.reallyNegative=function(){Ue("'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"unSign")||(i.unSign=function(){Ue("'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"reSign")||(i.reSign=function(){Ue("'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"formatString")||(i.formatString=function(){Ue("'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"PATH")||(i.PATH=function(){Ue("'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"PATH_FS")||(i.PATH_FS=function(){Ue("'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"SYSCALLS")||(i.SYSCALLS=function(){Ue("'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"syscallMmap2")||(i.syscallMmap2=function(){Ue("'syscallMmap2' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"syscallMunmap")||(i.syscallMunmap=function(){Ue("'syscallMunmap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getSocketFromFD")||(i.getSocketFromFD=function(){Ue("'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getSocketAddress")||(i.getSocketAddress=function(){Ue("'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"JSEvents")||(i.JSEvents=function(){Ue("'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerKeyEventCallback")||(i.registerKeyEventCallback=function(){Ue("'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.specialHTMLTargets=Cl,Object.getOwnPropertyDescriptor(i,"maybeCStringToJsString")||(i.maybeCStringToJsString=function(){Ue("'maybeCStringToJsString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"findEventTarget")||(i.findEventTarget=function(){Ue("'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"findCanvasEventTarget")||(i.findCanvasEventTarget=function(){Ue("'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getBoundingClientRect")||(i.getBoundingClientRect=function(){Ue("'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"fillMouseEventData")||(i.fillMouseEventData=function(){Ue("'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerMouseEventCallback")||(i.registerMouseEventCallback=function(){Ue("'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerWheelEventCallback")||(i.registerWheelEventCallback=function(){Ue("'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerUiEventCallback")||(i.registerUiEventCallback=function(){Ue("'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerFocusEventCallback")||(i.registerFocusEventCallback=function(){Ue("'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"fillDeviceOrientationEventData")||(i.fillDeviceOrientationEventData=function(){Ue("'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerDeviceOrientationEventCallback")||(i.registerDeviceOrientationEventCallback=function(){Ue("'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"fillDeviceMotionEventData")||(i.fillDeviceMotionEventData=function(){Ue("'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerDeviceMotionEventCallback")||(i.registerDeviceMotionEventCallback=function(){Ue("'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"screenOrientation")||(i.screenOrientation=function(){Ue("'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"fillOrientationChangeEventData")||(i.fillOrientationChangeEventData=function(){Ue("'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerOrientationChangeEventCallback")||(i.registerOrientationChangeEventCallback=function(){Ue("'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"fillFullscreenChangeEventData")||(i.fillFullscreenChangeEventData=function(){Ue("'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerFullscreenChangeEventCallback")||(i.registerFullscreenChangeEventCallback=function(){Ue("'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerRestoreOldStyle")||(i.registerRestoreOldStyle=function(){Ue("'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"hideEverythingExceptGivenElement")||(i.hideEverythingExceptGivenElement=function(){Ue("'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"restoreHiddenElements")||(i.restoreHiddenElements=function(){Ue("'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"setLetterbox")||(i.setLetterbox=function(){Ue("'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"currentFullscreenStrategy")||(i.currentFullscreenStrategy=function(){Ue("'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"restoreOldWindowedStyle")||(i.restoreOldWindowedStyle=function(){Ue("'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"softFullscreenResizeWebGLRenderTarget")||(i.softFullscreenResizeWebGLRenderTarget=function(){Ue("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"doRequestFullscreen")||(i.doRequestFullscreen=function(){Ue("'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"fillPointerlockChangeEventData")||(i.fillPointerlockChangeEventData=function(){Ue("'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerPointerlockChangeEventCallback")||(i.registerPointerlockChangeEventCallback=function(){Ue("'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerPointerlockErrorEventCallback")||(i.registerPointerlockErrorEventCallback=function(){Ue("'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"requestPointerLock")||(i.requestPointerLock=function(){Ue("'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"fillVisibilityChangeEventData")||(i.fillVisibilityChangeEventData=function(){Ue("'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerVisibilityChangeEventCallback")||(i.registerVisibilityChangeEventCallback=function(){Ue("'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerTouchEventCallback")||(i.registerTouchEventCallback=function(){Ue("'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"fillGamepadEventData")||(i.fillGamepadEventData=function(){Ue("'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerGamepadEventCallback")||(i.registerGamepadEventCallback=function(){Ue("'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerBeforeUnloadEventCallback")||(i.registerBeforeUnloadEventCallback=function(){Ue("'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"fillBatteryEventData")||(i.fillBatteryEventData=function(){Ue("'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"battery")||(i.battery=function(){Ue("'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerBatteryEventCallback")||(i.registerBatteryEventCallback=function(){Ue("'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"setCanvasElementSize")||(i.setCanvasElementSize=function(){Ue("'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getCanvasElementSize")||(i.getCanvasElementSize=function(){Ue("'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"demangle")||(i.demangle=function(){Ue("'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"demangleAll")||(i.demangleAll=function(){Ue("'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"jsStackTrace")||(i.jsStackTrace=function(){Ue("'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"stackTrace")||(i.stackTrace=function(){Ue("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getEnvStrings")||(i.getEnvStrings=function(){Ue("'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"checkWasiClock")||(i.checkWasiClock=function(){Ue("'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"writeI53ToI64")||(i.writeI53ToI64=function(){Ue("'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"writeI53ToI64Clamped")||(i.writeI53ToI64Clamped=function(){Ue("'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"writeI53ToI64Signaling")||(i.writeI53ToI64Signaling=function(){Ue("'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"writeI53ToU64Clamped")||(i.writeI53ToU64Clamped=function(){Ue("'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"writeI53ToU64Signaling")||(i.writeI53ToU64Signaling=function(){Ue("'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"readI53FromI64")||(i.readI53FromI64=function(){Ue("'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"readI53FromU64")||(i.readI53FromU64=function(){Ue("'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"convertI32PairToI53")||(i.convertI32PairToI53=function(){Ue("'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"convertU32PairToI53")||(i.convertU32PairToI53=function(){Ue("'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"setImmediateWrapped")||(i.setImmediateWrapped=function(){Ue("'setImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"clearImmediateWrapped")||(i.clearImmediateWrapped=function(){Ue("'clearImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"polyfillSetImmediate")||(i.polyfillSetImmediate=function(){Ue("'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"uncaughtExceptionCount")||(i.uncaughtExceptionCount=function(){Ue("'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"exceptionLast")||(i.exceptionLast=function(){Ue("'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"exceptionCaught")||(i.exceptionCaught=function(){Ue("'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ExceptionInfo")||(i.ExceptionInfo=function(){Ue("'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"CatchInfo")||(i.CatchInfo=function(){Ue("'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"exception_addRef")||(i.exception_addRef=function(){Ue("'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"exception_decRef")||(i.exception_decRef=function(){Ue("'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"Browser")||(i.Browser=function(){Ue("'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"funcWrappers")||(i.funcWrappers=function(){Ue("'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getFuncWrapper")||(i.getFuncWrapper=function(){Ue("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"setMainLoop")||(i.setMainLoop=function(){Ue("'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"wget")||(i.wget=function(){Ue("'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"FS")||(i.FS=function(){Ue("'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"MEMFS")||(i.MEMFS=function(){Ue("'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"TTY")||(i.TTY=function(){Ue("'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"PIPEFS")||(i.PIPEFS=function(){Ue("'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"SOCKFS")||(i.SOCKFS=function(){Ue("'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"_setNetworkCallback")||(i._setNetworkCallback=function(){Ue("'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"tempFixedLengthArray")||(i.tempFixedLengthArray=function(){Ue("'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"miniTempWebGLFloatBuffers")||(i.miniTempWebGLFloatBuffers=function(){Ue("'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"heapObjectForWebGLType")||(i.heapObjectForWebGLType=function(){Ue("'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"heapAccessShiftForWebGLHeap")||(i.heapAccessShiftForWebGLHeap=function(){Ue("'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"GL")||(i.GL=function(){Ue("'GL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emscriptenWebGLGet")||(i.emscriptenWebGLGet=function(){Ue("'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"computeUnpackAlignedImageSize")||(i.computeUnpackAlignedImageSize=function(){Ue("'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emscriptenWebGLGetTexPixelData")||(i.emscriptenWebGLGetTexPixelData=function(){Ue("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emscriptenWebGLGetUniform")||(i.emscriptenWebGLGetUniform=function(){Ue("'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"webglGetUniformLocation")||(i.webglGetUniformLocation=function(){Ue("'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"webglPrepareUniformLocationsBeforeFirstUse")||(i.webglPrepareUniformLocationsBeforeFirstUse=function(){Ue("'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"webglGetLeftBracePos")||(i.webglGetLeftBracePos=function(){Ue("'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emscriptenWebGLGetVertexAttrib")||(i.emscriptenWebGLGetVertexAttrib=function(){Ue("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"writeGLArray")||(i.writeGLArray=function(){Ue("'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"AL")||(i.AL=function(){Ue("'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"SDL_unicode")||(i.SDL_unicode=function(){Ue("'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"SDL_ttfContext")||(i.SDL_ttfContext=function(){Ue("'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"SDL_audio")||(i.SDL_audio=function(){Ue("'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"SDL")||(i.SDL=function(){Ue("'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"SDL_gfx")||(i.SDL_gfx=function(){Ue("'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"GLUT")||(i.GLUT=function(){Ue("'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"EGL")||(i.EGL=function(){Ue("'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"GLFW_Window")||(i.GLFW_Window=function(){Ue("'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"GLFW")||(i.GLFW=function(){Ue("'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"GLEW")||(i.GLEW=function(){Ue("'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"IDBStore")||(i.IDBStore=function(){Ue("'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"runAndAbortIfError")||(i.runAndAbortIfError=function(){Ue("'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emval_handle_array")||(i.emval_handle_array=function(){Ue("'emval_handle_array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emval_free_list")||(i.emval_free_list=function(){Ue("'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emval_symbols")||(i.emval_symbols=function(){Ue("'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"init_emval")||(i.init_emval=function(){Ue("'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"count_emval_handles")||(i.count_emval_handles=function(){Ue("'count_emval_handles' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"get_first_emval")||(i.get_first_emval=function(){Ue("'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getStringOrSymbol")||(i.getStringOrSymbol=function(){Ue("'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"Emval")||(i.Emval=function(){Ue("'Emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emval_newers")||(i.emval_newers=function(){Ue("'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"craftEmvalAllocator")||(i.craftEmvalAllocator=function(){Ue("'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emval_get_global")||(i.emval_get_global=function(){Ue("'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emval_methodCallers")||(i.emval_methodCallers=function(){Ue("'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"InternalError")||(i.InternalError=function(){Ue("'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"BindingError")||(i.BindingError=function(){Ue("'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"UnboundTypeError")||(i.UnboundTypeError=function(){Ue("'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"PureVirtualError")||(i.PureVirtualError=function(){Ue("'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"init_embind")||(i.init_embind=function(){Ue("'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"throwInternalError")||(i.throwInternalError=function(){Ue("'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"throwBindingError")||(i.throwBindingError=function(){Ue("'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"throwUnboundTypeError")||(i.throwUnboundTypeError=function(){Ue("'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ensureOverloadTable")||(i.ensureOverloadTable=function(){Ue("'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"exposePublicSymbol")||(i.exposePublicSymbol=function(){Ue("'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"replacePublicSymbol")||(i.replacePublicSymbol=function(){Ue("'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"extendError")||(i.extendError=function(){Ue("'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"createNamedFunction")||(i.createNamedFunction=function(){Ue("'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registeredInstances")||(i.registeredInstances=function(){Ue("'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getBasestPointer")||(i.getBasestPointer=function(){Ue("'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerInheritedInstance")||(i.registerInheritedInstance=function(){Ue("'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"unregisterInheritedInstance")||(i.unregisterInheritedInstance=function(){Ue("'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getInheritedInstance")||(i.getInheritedInstance=function(){Ue("'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getInheritedInstanceCount")||(i.getInheritedInstanceCount=function(){Ue("'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getLiveInheritedInstances")||(i.getLiveInheritedInstances=function(){Ue("'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registeredTypes")||(i.registeredTypes=function(){Ue("'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"awaitingDependencies")||(i.awaitingDependencies=function(){Ue("'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"typeDependencies")||(i.typeDependencies=function(){Ue("'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registeredPointers")||(i.registeredPointers=function(){Ue("'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"registerType")||(i.registerType=function(){Ue("'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"whenDependentTypesAreResolved")||(i.whenDependentTypesAreResolved=function(){Ue("'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"embind_charCodes")||(i.embind_charCodes=function(){Ue("'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"embind_init_charCodes")||(i.embind_init_charCodes=function(){Ue("'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"readLatin1String")||(i.readLatin1String=function(){Ue("'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getTypeName")||(i.getTypeName=function(){Ue("'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"heap32VectorToArray")||(i.heap32VectorToArray=function(){Ue("'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"requireRegisteredType")||(i.requireRegisteredType=function(){Ue("'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"getShiftFromSize")||(i.getShiftFromSize=function(){Ue("'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"integerReadValueFromPointer")||(i.integerReadValueFromPointer=function(){Ue("'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"enumReadValueFromPointer")||(i.enumReadValueFromPointer=function(){Ue("'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"floatReadValueFromPointer")||(i.floatReadValueFromPointer=function(){Ue("'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"simpleReadValueFromPointer")||(i.simpleReadValueFromPointer=function(){Ue("'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"runDestructors")||(i.runDestructors=function(){Ue("'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"new_")||(i.new_=function(){Ue("'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"craftInvokerFunction")||(i.craftInvokerFunction=function(){Ue("'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"embind__requireFunction")||(i.embind__requireFunction=function(){Ue("'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"tupleRegistrations")||(i.tupleRegistrations=function(){Ue("'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"structRegistrations")||(i.structRegistrations=function(){Ue("'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"genericPointerToWireType")||(i.genericPointerToWireType=function(){Ue("'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"constNoSmartPtrRawPointerToWireType")||(i.constNoSmartPtrRawPointerToWireType=function(){Ue("'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"nonConstNoSmartPtrRawPointerToWireType")||(i.nonConstNoSmartPtrRawPointerToWireType=function(){Ue("'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"init_RegisteredPointer")||(i.init_RegisteredPointer=function(){Ue("'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"RegisteredPointer")||(i.RegisteredPointer=function(){Ue("'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"RegisteredPointer_getPointee")||(i.RegisteredPointer_getPointee=function(){Ue("'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"RegisteredPointer_destructor")||(i.RegisteredPointer_destructor=function(){Ue("'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"RegisteredPointer_deleteObject")||(i.RegisteredPointer_deleteObject=function(){Ue("'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"RegisteredPointer_fromWireType")||(i.RegisteredPointer_fromWireType=function(){Ue("'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"runDestructor")||(i.runDestructor=function(){Ue("'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"releaseClassHandle")||(i.releaseClassHandle=function(){Ue("'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"finalizationRegistry")||(i.finalizationRegistry=function(){Ue("'finalizationRegistry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"detachFinalizer_deps")||(i.detachFinalizer_deps=function(){Ue("'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"detachFinalizer")||(i.detachFinalizer=function(){Ue("'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"attachFinalizer")||(i.attachFinalizer=function(){Ue("'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"makeClassHandle")||(i.makeClassHandle=function(){Ue("'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"init_ClassHandle")||(i.init_ClassHandle=function(){Ue("'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ClassHandle")||(i.ClassHandle=function(){Ue("'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ClassHandle_isAliasOf")||(i.ClassHandle_isAliasOf=function(){Ue("'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"throwInstanceAlreadyDeleted")||(i.throwInstanceAlreadyDeleted=function(){Ue("'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ClassHandle_clone")||(i.ClassHandle_clone=function(){Ue("'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ClassHandle_delete")||(i.ClassHandle_delete=function(){Ue("'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"deletionQueue")||(i.deletionQueue=function(){Ue("'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ClassHandle_isDeleted")||(i.ClassHandle_isDeleted=function(){Ue("'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"ClassHandle_deleteLater")||(i.ClassHandle_deleteLater=function(){Ue("'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"flushPendingDeletes")||(i.flushPendingDeletes=function(){Ue("'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"delayFunction")||(i.delayFunction=function(){Ue("'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"setDelayFunction")||(i.setDelayFunction=function(){Ue("'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"RegisteredClass")||(i.RegisteredClass=function(){Ue("'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"shallowCopyInternalPointer")||(i.shallowCopyInternalPointer=function(){Ue("'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"downcastPointer")||(i.downcastPointer=function(){Ue("'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"upcastPointer")||(i.upcastPointer=function(){Ue("'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"validateThis")||(i.validateThis=function(){Ue("'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"char_0")||(i.char_0=function(){Ue("'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"char_9")||(i.char_9=function(){Ue("'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"makeLegalFunctionName")||(i.makeLegalFunctionName=function(){Ue("'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"emscriptenWebGLGetIndexed")||(i.emscriptenWebGLGetIndexed=function(){Ue("'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"warnOnce")||(i.warnOnce=function(){Ue("'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"stackSave")||(i.stackSave=function(){Ue("'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"stackRestore")||(i.stackRestore=function(){Ue("'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"stackAlloc")||(i.stackAlloc=function(){Ue("'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"AsciiToString")||(i.AsciiToString=function(){Ue("'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"stringToAscii")||(i.stringToAscii=function(){Ue("'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"UTF16ToString")||(i.UTF16ToString=function(){Ue("'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"stringToUTF16")||(i.stringToUTF16=function(){Ue("'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"lengthBytesUTF16")||(i.lengthBytesUTF16=function(){Ue("'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"UTF32ToString")||(i.UTF32ToString=function(){Ue("'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"stringToUTF32")||(i.stringToUTF32=function(){Ue("'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"lengthBytesUTF32")||(i.lengthBytesUTF32=function(){Ue("'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"allocateUTF8")||(i.allocateUTF8=function(){Ue("'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(i,"allocateUTF8OnStack")||(i.allocateUTF8OnStack=function(){Ue("'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),i.writeStackCookie=pe,i.checkStackCookie=ge,Object.getOwnPropertyDescriptor(i,"ALLOC_NORMAL")||Object.defineProperty(i,"ALLOC_NORMAL",{configurable:!0,get:function(){Ue("'ALLOC_NORMAL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(i,"ALLOC_STACK")||Object.defineProperty(i,"ALLOC_STACK",{configurable:!0,get:function(){Ue("'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Le=function e(){Ed||Yd(),Ed||(Le=e)},i.run=Yd,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();var ef=!0;return i.noInitialRun&&(ef=!1),Yd(),e.ready}),u=r.p+"assets/core/cesdk.wasm",l=r.p+"assets/core/cesdk.data",d=(e,t)=>null!=t?[t,e.split("/").pop()].join(""):new URL(e,window.location.origin),f={init:(e,t)=>{const r=o.V.initWithDefaults(t),{core:n}=r,f=(0,s.Z)(r);return new Promise(((t,o)=>{let s,p;return c({locateFile:(e,t)=>{if(e.endsWith(".wasm")){const e=d(u,n.baseURL).toString();return s=e,e}if(e.endsWith(".data")){const e=d(l,n.baseURL).toString();return p=e,e}return t+e},print:e=>{e&&"undefined"!==e&&f(e,i.in.Info)},printErr:e=>{e&&"undefined"!==e&&f(e,i.in.Error)},onRuntimeInitialized:()=>{f("Engine has been initialized.",i.in.Info)},logReadFiles:!1,printWithColors:!0}).then((n=>{let s="";"string"==typeof e?s=e:(n.specialHTMLTargets["!canvas"]=e,s="!canvas");const c=n.createEngine(s);if(c.isValid()){const e=c.value();!function(e,t){const r=new a.Z(e);function n(e,t){return r.execute("ubq/settings/set",[e,t])}n("ubq://license",t.license||""),n("ubq://basePath",t.baseURL),Object.entries(t.assets).forEach((([e,t])=>{r.execute("ubq/assets/register",[e,t.src,""])})),Object.entries(t.presets.images||{}).forEach((([e,t])=>{r.execute("ubq/assets/registerImage",[e,t.thumbnailURL||t.imageURL,t.imageURL,t.width,t.height])})),Object.entries(t.presets.typefaces||{}).forEach((([e,t])=>{(t.fonts||[]).forEach((n=>{const o=`${e}_${n.weight}_${n.style}`;r.execute("ubq/assets/registerFont",[o,n.fontURL,t.family,n.weight,n.style])}))})),n("ubq://features/effectsEnabled",!0),n("ubq://page/title/fontFileUri",t.page.title.fontFileUri),n("ubq://page/title/show",t.page.title.show),function(){if(void 0!==t.scene.maskSpotColor){const{rgbApproximation:e}=t.scene.maskSpotColor,n=(0,i.JY)(Object.assign(Object.assign({},e),{a:1}));r.execute("cesdk/setSpecialSpotColor",n)}}(),function(){var e;const n=null!==(e=t.extensions)&&void 0!==e?e:[];n.entries.forEach((e=>{r.execute("ubq/extension/register",`${n.baseURL+e}`)}))}(),function(){var r;const n=null!==(r=t.variables)&&void 0!==r?r:{};Object.entries(n).forEach((([t,r])=>{(0,a.L)(e.setVariableString(t,r.value.toString()))}))}()}(e,r),t(e)}else{const e=c.error();o(new Error(e.publicMessage())),e.delete()}c.delete()})).catch((e=>{e instanceof Error&&(e.wasmPath=s,e.dataPath=p),o(e)}))}))}}},87109:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o}),r(2821);var n=r(19496);r(56954);const o=e=>{var t,r;return null!==(r=null===(t=null==e?void 0:e.callbacks)||void 0===t?void 0:t.log)&&void 0!==r?r:n._z}},61083:(e,t,r)=>{"use strict";var n;r(56954),function(e){e.Unknown="",e.Boolean="bool",e.Boolean2="ubq/math/bool2",e.Int="int",e.UInt8="uint8_t",e.Int32="int32_t",e.UInt32="uint32_t",e.Int2="ubq/math/ivec2",e.Size2="ubq/types/Size2",e.Color="ubq/types/Color",e.Double="double",e.Float="float",e.Float2="ubq/math/vec2",e.Float3="ubq/math/vec3",e.Float4="ubq/math/vec4",e.String="string",e.HorizontalTextAlignment="ubq/types/HorizontalTextAlignment",e.VerticalTextAlignment="ubq/types/VerticalTextAlignment",e.Margin2D="ubq/types/OuterMargin2D"}(n||(n={}))},43985:(e,t,r)=>{"use strict";r(56954),r(61083)},41940:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o,L:()=>i}),r(39069),r(56954),r(43985);var n=r(94879);r(61083);class o{constructor(e){Object.defineProperty(this,"ubq",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.ubq=e}useInternalAPI(e){const t=this.ubq.getInternalAPI();try{return e(t)}finally{t.delete()}}async createElement(e,t,r){const o=await this.execute("ubq/designblocks/create",e);this.execute("ubq/designblocks/addToParent",[o,t]);const a=i(this.ubq.getLastFrameWidth(t)),s=i(this.ubq.getLastFrameHeight(t)),{position:c,size:u}=(0,n.A5)({x:a,y:s},{x:r.width,y:r.height},8/13);this.execute("ubq/layout/setAbsoluteSize",{id:o,size:{width:u.x,height:u.y}}),u.x||this.execute("ubq/layout/setAutoWidth",{id:o}),u.y||this.execute("ubq/layout/setAutoHeight",{id:o});const l=(0,n.Vg)({x:.08*a,y:.08*s});return await this.execute("ubq/layout/setAbsolutePosition",{id:o,position:{left:c.x+l.x,top:c.y+l.y}}),o}setValue(e,t,r,n){return this.useInternalAPI((o=>i(o.setValue(e,t,r,n))))}getValue(e,t,r){return this.useInternalAPI((n=>i(n.getValue(e,t,r))))}async getEditorState(){return this.execute("ubq/editor/getEditorState")}async setEditorState(e){return this.execute("ubq/editor/setEditorState",e)}async execute(e,t){return new Promise((r=>{this.useInternalAPI((n=>n.ubqExecute(e,t,(e=>{const t=i(e);r(t)})))).delete()}))}}function i(e){if(e.isValid()){const t=e.value();return e.delete(),t}{const t=e.error(),r=t.publicMessage();throw t.delete(),e.delete(),new Error(r)}}},57897:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n}),r(56954);const n=(e,t=!0)=>{const r=[];for(let t=0;t<e.size();t+=1)r.push(e.get(t));return t&&e.delete(),r}},34821:(e,t,r)=>{"use strict";var n,o,i;r(96212),r(4146),r(51667),r(56954),r(39069),r(60850),function(e){e.Background="background",e.Active="active",e.Accent="accent"}(n||(n={})),function(e){e.Red="Red",e.Orange="Orange",e.Yellow="Yellow",e.Green="Green",e.Aqua="Aqua",e.Blue="Blue",e.Purple="Purple",e.Magenta="Magenta"}(o||(o={})),function(e){e.Hue="hue",e.Saturation="saturation",e.PerceivedBrightness="perceivedBrightness"}(i||(i={})),o.Red,o.Orange,o.Yellow,o.Green,o.Aqua,o.Blue,o.Purple,o.Magenta},94879:(e,t,r)=>{"use strict";r.d(t,{A5:()=>o,Vg:()=>i,dA:()=>a});const n=(e,t)=>({x:e.x*t,y:e.y*t});function o(e,t,r=8/13){const o=((e,t)=>{const r=e.x/e.y,o=t.x/t.y;return n(t,r>o?e.y/t.y:e.x/t.x)})(e,t),i=n(o,r);return{position:{x:.5*(e.x-i.x),y:.5*(e.y-i.y)},size:i}}function i(e={x:50,y:50}){return{x:Math.random()*e.x,y:Math.random()*e.y}}function a(e,t,r=Number.EPSILON){return Math.abs(e-t)<r}},51667:(e,t,r)=>{"use strict";r(5732)},26315:(e,t,r)=>{"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:()=>n})},99637:(e,t,r)=>{"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,{Z:()=>n})},73727:(e,t,r)=>{"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}r.d(t,{Z:()=>o})},45315:(e,t,r)=>{"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{Z:()=>n})},53403:(e,t,r)=>{"use strict";function n(e){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,{Z:()=>n})},52977:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(55601);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},55618:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(45315);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){(0,n.Z)(e,t,r[t])}))}return e}},87389:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(86481),o=r(26315);function i(e,t){return!t||"object"!==(0,n.Z)(t)&&"function"!=typeof t?(0,o.Z)(e):t}},55601:(e,t,r)=>{"use strict";function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,{Z:()=>n})},86481:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{Z:()=>n})},17019:(e,t,r)=>{"use strict";r.d(t,{IX:()=>f,O7:()=>p,Ou:()=>d,_L:()=>g,VV:()=>v,Rx:()=>h,Z_:()=>m,Gu:()=>l});class n extends TypeError{constructor(e,t){let r;const{message:n,...o}=e,{path:i}=e;super(0===i.length?n:"At path: "+i.join(".")+" -- "+n),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var n;return null!=(n=r)?n:r=[e,...t()]}}}function o(e){return"object"==typeof e&&null!=e}function i(e){return"string"==typeof e?JSON.stringify(e):""+e}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:a}=t,{type:s}=r,{refinement:c,message:u="Expected a value of type `"+s+"`"+(c?" with refinement `"+c+"`":"")+", but received: `"+i(n)+"`"}=e;return{value:n,type:s,refinement:c,key:o[o.length-1],path:o,branch:a,...e,message:u}}function*s(e,t,r,n){var i;o(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=a(o,t,r,n);e&&(yield e)}}function*c(e,t,r={}){const{path:n=[],branch:i=[e],coerce:a=!1,mask:s=!1}=r,u={path:n,branch:i};if(a&&(e=t.coercer(e,u),s&&"type"!==t.type&&o(t.schema)&&o(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let l=!0;for(const r of t.validator(e,u))l=!1,yield[r,void 0];for(let[r,d,f]of t.entries(e,u)){const t=c(d,f,{path:void 0===r?n:[...n,r],branch:void 0===r?i:[...i,d],coerce:a,mask:s});for(const n of t)n[0]?(l=!1,yield[n[0],void 0]):a&&(d=n[1],void 0===r?e=d:e instanceof Map?e.set(r,d):e instanceof Set?e.add(d):o(e)&&(e[r]=d))}if(l)for(const r of t.refiner(e,u))l=!1,yield[r,void 0];l&&(yield[void 0,e])}class u{constructor(e){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:t,schema:r,validator:n,refiner:o,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=i,this.validator=n?(e,t)=>s(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>s(o(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const r=l(e,t);if(r[0])throw r[0]}(e,this)}create(e){return function(e,t){const r=l(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}(e,this)}is(e){return function(e,t){return!l(e,t)[0]}(e,this)}mask(e){return function(e,t){const r=l(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}validate(e,t={}){return l(e,this,t)}}function l(e,t,r={}){const o=c(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(o);return i[0]?[new n(i[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function d(e,t){return new u({type:e,schema:null,validator:t})}function f(e){return new u({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: "+i(e)})}function p(){return d("boolean",(e=>"boolean"==typeof e))}function g(){return d("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: "+i(e)))}function h(){return d("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+i(e)))}function m(){return d("string",(e=>"string"==typeof e||"Expected a string, but received: "+i(e)))}function v(e,t,r={}){const{exclusive:n}=r;return function(e,t,r){return new u({...e,*refiner(n,o){yield*e.refiner(n,o);const i=s(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}(e,"min",(r=>n?r>t:r>=t||"Expected a "+e.type+" greater than "+(n?"":"or equal to ")+t+" but received `"+r+"`"))}},4146:e=>{"use strict";e.exports={}},64370:e=>{"use strict";e.exports={}},99817:e=>{"use strict";e.exports={}}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=t,e=[],o.O=(t,r,n,i)=>{if(!r){var a=1/0;for(l=0;l<e.length;l++){for(var[r,n,i]=e[l],s=!0,c=0;c<r.length;c++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](r[c])))?r.splice(c--,1):(s=!1,i<a&&(a=i));if(s){e.splice(l--,1);var u=n();void 0!==u&&(t=u)}}return t}i=i||0;for(var l=e.length;l>0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[r,n,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.p="",(()=>{var e={763:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var n,i,[a,s,c]=r,u=0;if(a.some((t=>0!==e[t]))){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);if(c)var l=c(o)}for(t&&t(r);u<a.length;u++)i=a[u],o.o(e,i)&&e[i]&&e[i][0](),e[a[u]]=0;return o.O(l)},r=self.webpackChunkcesdk=self.webpackChunkcesdk||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i={};return(()=>{"use strict";o.d(i,{default:()=>w}),o(20733);var e,t,r,n,a,s,c,u,l,d=o(52660),f=o(2821),p=o(21849),g=o(49674),h=o(56954),m=o(2477),v=o(53496),b=(o(43985),o(41940)),y=o(94879),E=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},_=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class w{constructor(o,i,u){e.add(this),Object.defineProperty(this,"block",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scene",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"variable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t.set(this,void 0),r.set(this,void 0),n.set(this,void 0),a.set(this,(()=>{const e=this.block.findByType(h._h.Camera)[0];if(!e)return;const{width:n,height:o}=_(this,r,"f"),i=_(this,t,"f").getValue(e,h.$R.Camera,"resolution");(0,y.dA)(i.width,n,1e-4)&&(0,y.dA)(i.height,o,1e-4)||_(this,t,"f").setValue(e,h.$R.Camera,"resolution",{width:n,height:o});const a=_(this,t,"f").getValue(e,h.$R.Camera,"pixelRatio");(0,y.dA)(a,window.devicePixelRatio,1e-4)||_(this,t,"f").setValue(e,h.$R.Camera,"pixelRatio",window.devicePixelRatio)})),s.set(this,void 0),E(this,n,o,"f"),E(this,t,new b.Z(o),"f"),E(this,r,i,"f"),this.block=new d.ZP(o),this.scene=new g.Z(o),this.variable=new m.Z(o),this.event=new p.Z(o),_(this,t,"f").useInternalAPI((e=>{e.setPreUpdateCallback(_(this,a,"f"))})),_(this,e,"m",c).call(this),window.Cypress&&(this.onPostUpdate=e=>{_(this,t,"f").useInternalAPI((t=>{t.setPostUpdateCallback(e)}))})}dispose(){_(this,e,"m",u).call(this),_(this,t,"f").useInternalAPI((e=>{e.setPreUpdateCallback(null)})),E(this,r,null,"f"),E(this,t,null,"f"),this.block=null,this.scene=null,this.variable=null,_(this,n,"f").delete(),E(this,n,null,"f")}static async init(e,t){console.log("[CESDK] Revision 437ac24046ce1fbf30dcb0af132c579f47b67c0c"),t||(t=document.createElement("canvas"));const r=f.V.initWithDefaults(e);return new this(await v.Z.init(t,r),t,r)}}t=new WeakMap,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap,e=new WeakSet,c=function(t=!0){if(_(this,s,"f"))return;const r=()=>{_(this,e,"m",l).call(this,t),E(this,s,requestAnimationFrame(r),"f")};E(this,s,requestAnimationFrame(r),"f")},u=function(){_(this,s,"f")&&(cancelAnimationFrame(_(this,s,"f")),E(this,s,0,"f"))},l=function(e=!0){e&&1===this.block.findByType(h._h.Scene).length&&_(this,t,"f").execute("ubq/render",{displayWidth:_(this,r,"f").width,displayHeight:_(this,r,"f").height}),_(this,n,"f").update()},Object.defineProperty(w,"PositionMode",{enumerable:!0,configurable:!0,writable:!0,value:d.T}),Object.defineProperty(w,"SizeMode",{enumerable:!0,configurable:!0,writable:!0,value:d.t1}),Object.defineProperty(w,"PropertyType",{enumerable:!0,configurable:!0,writable:!0,value:d.uS})})(),(i=o.O(i)).default})()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CreativeEngine=t():e.CreativeEngine=t()}(globalThis,(function(){return(()=>{var e,t={77643:(e,t,r)=>{var n=r(35557),o=r(4349),i=r(90407),a=r(55134),s=r(49951);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},63872:(e,t,r)=>{var n=r(62470),o=r(77289),i=r(97614),a=r(3067),s=r(19346);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},65674:(e,t,r)=>{var n=r(70489)(r(4818),"Map");e.exports=n},22462:(e,t,r)=>{var n=r(76290),o=r(94951),i=r(40440),a=r(86180),s=r(67719);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},35135:(e,t,r)=>{var n=r(63872),o=r(71490),i=r(32594),a=r(35953),s=r(74667),c=r(84615);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},29652:(e,t,r)=>{var n=r(4818).Symbol;e.exports=n},64600:(e,t,r)=>{var n=r(4818).Uint8Array;e.exports=n},46562:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},1998:(e,t,r)=>{var n=r(31453),o=r(25664),i=r(5860),a=r(79571),s=r(58347),c=r(1859),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),l=!r&&o(e),d=!r&&!l&&a(e),p=!r&&!l&&!d&&c(e),f=r||l||d||p,m=f?n(e.length,String):[],g=m.length;for(var h in e)!t&&!u.call(e,h)||f&&("length"==h||d&&("offset"==h||"parent"==h)||p&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||s(h,g))||m.push(h);return m}},1612:(e,t,r)=>{var n=r(46912),o=r(3355);e.exports=function(e,t,r){(void 0!==r&&!o(e[t],r)||void 0===r&&!(t in e))&&n(e,t,r)}},66258:(e,t,r)=>{var n=r(46912),o=r(3355),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},8620:(e,t,r)=>{var n=r(3355);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},46912:(e,t,r)=>{var n=r(94698);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},8528:(e,t,r)=>{var n=r(54820),o=Object.create,i=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=i},3153:(e,t,r)=>{var n=r(57572)();e.exports=n},52759:(e,t,r)=>{var n=r(29652),o=r(25135),i=r(73744),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},16651:(e,t,r)=>{var n=r(52759),o=r(71408);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},93216:(e,t,r)=>{var n=r(90830),o=r(70931),i=r(54820),a=r(21304),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,d=u.hasOwnProperty,p=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?p:s).test(a(e))}},19920:(e,t,r)=>{var n=r(52759),o=r(27906),i=r(71408),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},63339:(e,t,r)=>{var n=r(54820),o=r(87839),i=r(73003),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},97604:(e,t,r)=>{var n=r(35135),o=r(1612),i=r(3153),a=r(70480),s=r(54820),c=r(82551),u=r(50830);e.exports=function e(t,r,l,d,p){t!==r&&i(r,(function(i,c){if(p||(p=new n),s(i))a(t,r,c,l,e,d,p);else{var f=d?d(u(t,c),i,c+"",t,r,p):void 0;void 0===f&&(f=i),o(t,c,f)}}),c)}},70480:(e,t,r)=>{var n=r(1612),o=r(58192),i=r(49947),a=r(46581),s=r(91172),c=r(25664),u=r(5860),l=r(25274),d=r(79571),p=r(90830),f=r(54820),m=r(51969),g=r(1859),h=r(50830),E=r(42963);e.exports=function(e,t,r,_,y,v,b){var w=h(e,r),T=h(t,r),O=b.get(T);if(O)n(e,r,O);else{var P=v?v(w,T,r+"",e,t,b):void 0,D=void 0===P;if(D){var x=u(T),S=!x&&d(T),R=!x&&!S&&g(T);P=T,x||S||R?u(w)?P=w:l(w)?P=a(w):S?(D=!1,P=o(T,!0)):R?(D=!1,P=i(T,!0)):P=[]:m(T)||c(T)?(P=w,c(w)?P=E(w):f(w)&&!p(w)||(P=s(T))):D=!1}D&&(b.set(T,P),y(P,T,_,v,b),b.delete(T)),n(e,r,P)}}},95757:(e,t,r)=>{var n=r(81191),o=r(62549),i=r(6613);e.exports=function(e,t){return i(o(e,t,n),e+"")}},44274:(e,t,r)=>{var n=r(47477),o=r(94698),i=r(81191),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},31453:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},28275:e=>{e.exports=function(e){return function(t){return e(t)}}},81254:(e,t,r)=>{var n=r(64600);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},58192:(e,t,r)=>{e=r.nmd(e);var n=r(4818),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},49947:(e,t,r)=>{var n=r(81254);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},46581:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},87200:(e,t,r)=>{var n=r(66258),o=r(46912);e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,c=t.length;++s<c;){var u=t[s],l=i?i(r[u],e[u],u,r,e):void 0;void 0===l&&(l=e[u]),a?o(r,u,l):n(r,u,l)}return r}},38940:(e,t,r)=>{var n=r(4818)["__core-js_shared__"];e.exports=n},13102:(e,t,r)=>{var n=r(95757),o=r(77072);e.exports=function(e){return n((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var c=r[n];c&&e(t,c,n,a)}return t}))}},57572:e=>{e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===r(i[c],c,i))break}return t}}},94698:(e,t,r)=>{var n=r(70489),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},3566:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},6330:(e,t,r)=>{var n=r(25513);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},70489:(e,t,r)=>{var n=r(93216),o=r(83626);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},74966:(e,t,r)=>{var n=r(96148)(Object.getPrototypeOf,Object);e.exports=n},25135:(e,t,r)=>{var n=r(29652),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},83626:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},35557:(e,t,r)=>{var n=r(32037);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},4349:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},90407:(e,t,r)=>{var n=r(32037),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},55134:(e,t,r)=>{var n=r(32037),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},49951:(e,t,r)=>{var n=r(32037);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},91172:(e,t,r)=>{var n=r(8528),o=r(74966),i=r(87839);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},58347:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},77072:(e,t,r)=>{var n=r(3355),o=r(28809),i=r(58347),a=r(54820);e.exports=function(e,t,r){if(!a(r))return!1;var s=typeof t;return!!("number"==s?o(r)&&i(t,r.length):"string"==s&&t in r)&&n(r[t],e)}},25513:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},70931:(e,t,r)=>{var n,o=r(38940),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},87839:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},62470:e=>{e.exports=function(){this.__data__=[],this.size=0}},77289:(e,t,r)=>{var n=r(8620),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():o.call(t,r,1),--this.size,0))}},97614:(e,t,r)=>{var n=r(8620);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},3067:(e,t,r)=>{var n=r(8620);e.exports=function(e){return n(this.__data__,e)>-1}},19346:(e,t,r)=>{var n=r(8620);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},76290:(e,t,r)=>{var n=r(77643),o=r(63872),i=r(65674);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},94951:(e,t,r)=>{var n=r(6330);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},40440:(e,t,r)=>{var n=r(6330);e.exports=function(e){return n(this,e).get(e)}},86180:(e,t,r)=>{var n=r(6330);e.exports=function(e){return n(this,e).has(e)}},67719:(e,t,r)=>{var n=r(6330);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},32037:(e,t,r)=>{var n=r(70489)(Object,"create");e.exports=n},73003:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},29693:(e,t,r)=>{e=r.nmd(e);var n=r(3566),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},73744:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},96148:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},62549:(e,t,r)=>{var n=r(46562),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),c=Array(s);++a<s;)c[a]=i[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=i[a];return u[t]=r(c),n(e,this,u)}}},4818:(e,t,r)=>{var n=r(3566),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},50830:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},6613:(e,t,r)=>{var n=r(44274),o=r(13546)(n);e.exports=o},13546:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},71490:(e,t,r)=>{var n=r(63872);e.exports=function(){this.__data__=new n,this.size=0}},32594:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},35953:e=>{e.exports=function(e){return this.__data__.get(e)}},74667:e=>{e.exports=function(e){return this.__data__.has(e)}},84615:(e,t,r)=>{var n=r(63872),o=r(65674),i=r(22462);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},21304:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},47477:e=>{e.exports=function(e){return function(){return e}}},3355:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},81191:e=>{e.exports=function(e){return e}},25664:(e,t,r)=>{var n=r(16651),o=r(71408),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},5860:e=>{var t=Array.isArray;e.exports=t},28809:(e,t,r)=>{var n=r(90830),o=r(27906);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},25274:(e,t,r)=>{var n=r(28809),o=r(71408);e.exports=function(e){return o(e)&&n(e)}},79571:(e,t,r)=>{e=r.nmd(e);var n=r(4818),o=r(18585),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},90830:(e,t,r)=>{var n=r(52759),o=r(54820);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},27906:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},54820:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},71408:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},51969:(e,t,r)=>{var n=r(52759),o=r(74966),i=r(71408),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=n(e))return!1;var t=o(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==l}},1859:(e,t,r)=>{var n=r(19920),o=r(28275),i=r(29693),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},82551:(e,t,r)=>{var n=r(1998),o=r(63339),i=r(28809);e.exports=function(e){return i(e)?n(e,!0):o(e)}},57168:(e,t,r)=>{var n=r(97604),o=r(13102)((function(e,t,r){n(e,t,r)}));e.exports=o},18585:e=>{e.exports=function(){return!1}},42963:(e,t,r)=>{var n=r(87200),o=r(82551);e.exports=function(e){return n(e,o(e))}},81655:(e,t,r)=>{"use strict";r.d(t,{T:()=>i,t1:()=>a,uS:()=>s,Rg:()=>c,qb:()=>u,hD:()=>l,ZP:()=>y});var n,o,i,a,s,c,u,l,d=r(17019),p=r(8097),f=r(68876),m=r(81867),g=r(48641),h=r(15684),E=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},_=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};!function(e){e.Absolute="Absolute",e.Percent="Percent",e.Undefined="Auto"}(i||(i={})),function(e){e.Absolute="Absolute",e.Percent="Percent",e.Auto="Auto"}(a||(a={})),function(e){e.Bool="Bool",e.Int="Int",e.Float="Float",e.String="String",e.Color="Color",e.Enum="Enum",e.Struct="Struct"}(s||(s={})),function(e){e.Center="Center",e.Inner="Inner",e.Outer="Outer"}(c||(c={})),function(e){e.Dashed="Dashed",e.DashedRound="DashedRound",e.Dotted="Dotted",e.LongDashed="LongDashed",e.LongDashedRound="LongDashedRound",e.Solid="Solid"}(u||(u={})),function(e){e.Bevel="Bevel",e.Miter="Miter",e.Round="Round"}(l||(l={}));class y{constructor(e){n.set(this,void 0),o.set(this,void 0),E(this,n,e,"f"),E(this,o,new g.Z(e),"f")}async export(e,t=m.Z.Png){return(0,p.ZP)("handle",e,(0,d.Rx)()),(0,p.ZP)("mimeType",t,(0,p.zF)()),new Promise(((r,o)=>{_(this,n,"f").exportToBuffer(e,t,(e=>{"error"in e?o(e.error):r(new Blob([e],{type:t}))}),{jpegQuality:.9,pngCompressionLevel:5,useTargetSize:!1,targetWidth:0,targetHeight:0})}))}async loadFromString(e){return(0,p.ZP)("content",e,(0,d.Z_)()),new Promise((t=>{_(this,n,"f").loadBlocksFromString(e,(e=>{const r=(0,g.L)(e);t((0,h.Z)(r))}))}))}async saveToString(e){return(0,p.ZP)("blocks",e,(0,d.IX)((0,d.Rx)())),new Promise((t=>{_(this,n,"f").saveBlocksToString(e,(e=>{const r=(0,g.L)(e);t(r)}))}))}create(e){return(0,p.ZP)("type",e,(0,d.Z_)()),(0,g.L)(_(this,n,"f").create(e))}getType(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getType(e))}setSelected(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("selected",t,(0,d.O7)()),(0,g.L)(_(this,n,"f").setSelected(e,t))}isSelected(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").isSelected(e))}findAllSelected(){return(0,h.Z)(_(this,n,"f").findAllSelected())}isGroupable(e){return(0,p.ZP)("ids",e,(0,d.PV)((0,d.IX)((0,d.Rx)()))),(0,g.L)(_(this,n,"f").isGroupable(e))}group(e){return(0,p.ZP)("ids",e,(0,d.PV)((0,d.IX)((0,d.Rx)()))),(0,g.L)(_(this,n,"f").group(e))}ungroup(e){return(0,p.ZP)("id",e,(0,d.Rx)()),(0,g.L)(_(this,n,"f").ungroup(e))}enterGroup(e){return(0,p.ZP)("id",e,(0,d.Rx)()),(0,g.L)(_(this,n,"f").enterGroup(e))}exitGroup(e){return(0,p.ZP)("id",e,(0,d.Rx)()),(0,g.L)(_(this,n,"f").exitGroup(e))}setName(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("name",t,(0,d.Z_)()),_(this,o,"f").setValue(e,f.uY,"name",t)}getName(e){return(0,p.ZP)("id",e,(0,d._L)()),_(this,o,"f").getValue(e,f.uY,"name")}findByName(e){(0,p.ZP)("name",e,(0,d.Z_)());const t=_(this,n,"f").findByName(e);return(0,h.Z)(t)}findByType(e){(0,p.ZP)("type",e,(0,d.Z_)());const t=_(this,n,"f").findByType(e),r=(0,g.L)(t);return(0,h.Z)(r)}findAll(){return(0,h.Z)(_(this,n,"f").findAll())}isVisible(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").isVisible(e))}setVisible(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("visible",t,(0,d.O7)()),(0,g.L)(_(this,n,"f").setVisible(e,t))}isClipped(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").isClipped(e))}setClipped(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("clipped",t,(0,d.O7)()),(0,g.L)(_(this,n,"f").setClipped(e,t))}getPositionX(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getPositionX(e))}getPositionXMode(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getPositionXMode(e))}getPositionY(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getPositionY(e))}getPositionYMode(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getPositionYMode(e))}setPositionX(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("value",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setPositionX(e,t))}setPositionXMode(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").setPositionXMode(e,t))}setPositionY(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("value",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setPositionY(e,t))}setPositionYMode(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").setPositionYMode(e,t))}getRotation(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getRotation(e))}setRotation(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("radians",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setRotation(e,t))}getFlipHorizontal(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getFlip(e)).horizontal}getFlipVertical(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getFlip(e)).vertical}setFlipHorizontal(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("flip",t,(0,d.O7)()),(0,g.L)(_(this,n,"f").setFlipHorizontal(e,t))}setFlipVertical(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("flip",t,(0,d.O7)()),(0,g.L)(_(this,n,"f").setFlipVertical(e,t))}getWidth(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getWidth(e))}getWidthMode(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getWidthMode(e))}getHeight(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getHeight(e))}getHeightMode(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getHeightMode(e))}setWidth(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("value",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setWidth(e,t))}setWidthMode(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").setWidthMode(e,t))}setHeight(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("value",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setHeight(e,t))}setHeightMode(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").setHeightMode(e,t))}getFrameWidth(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getLastFrameWidth(e))}getFrameHeight(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getLastFrameHeight(e))}duplicate(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").duplicate(e))}destroy(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").destroy(e))}isValid(e){return(0,p.ZP)("id",e,(0,d._L)()),_(this,n,"f").isValid(e)}getParent(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getParent(e))}getChildren(e){(0,p.ZP)("id",e,(0,d._L)());const t=(0,g.L)(_(this,n,"f").getChildren(e));return(0,h.Z)(t)}insertChild(e,t,r){return(0,p.ZP)("parent",e,(0,d.Rx)()),(0,p.ZP)("child",t,(0,d.Rx)()),(0,p.ZP)("index",r,(0,d.VV)((0,d.Rx)(),0)),(0,g.L)(_(this,n,"f").insertChild(e,t,r))}appendChild(e,t){return(0,p.ZP)("parent",e,(0,d.Rx)()),(0,p.ZP)("child",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").appendChild(e,t))}referencesAnyVariables(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").referencesAnyVariables(e))}getGlobalBoundingBoxX(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getGlobalBoundingBoxX(e))}getGlobalBoundingBoxY(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getGlobalBoundingBoxY(e))}getGlobalBoundingBoxWidth(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getGlobalBoundingBoxWidth(e))}getGlobalBoundingBoxHeight(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getGlobalBoundingBoxHeight(e))}findAllProperties(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,h.Z)((0,g.L)(_(this,n,"f").findAllProperties(e)))}getPropertyType(e){return(0,p.ZP)("property",e,(0,d.Z_)()),(0,g.L)(_(this,n,"f").getPropertyType(e))}getEnumValues(e){return(0,p.ZP)("enumProperty",e,(0,d.Z_)()),(0,h.Z)((0,g.L)(_(this,n,"f").getEnumValues(e)))}setBool(e,t,r){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,p.ZP)("value",r,(0,d.O7)()),(0,g.L)(_(this,n,"f").setBool(e,t,r))}getBool(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,g.L)(_(this,n,"f").getBool(e,t))}setInt(e,t,r){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,p.ZP)("value",r,(0,d._L)()),(0,g.L)(_(this,n,"f").setInt(e,t,r))}getInt(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,g.L)(_(this,n,"f").getInt(e,t))}setFloat(e,t,r){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,p.ZP)("value",r,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setFloat(e,t,r))}getFloat(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,g.L)(_(this,n,"f").getFloat(e,t))}setString(e,t,r){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,p.ZP)("value",r,(0,d.Z_)()),(0,g.L)(_(this,n,"f").setString(e,t,r))}getString(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,g.L)(_(this,n,"f").getString(e,t))}setColorRGBA(e,t,r,o,i,a){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,p.ZP)("r",r,(0,d.Rx)()),(0,p.ZP)("g",o,(0,d.Rx)()),(0,p.ZP)("b",i,(0,d.Rx)()),(0,p.ZP)("a",a,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setColorRGBA(e,t,r,o,i,a))}getColorRGBA(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,g.L)(_(this,n,"f").getColorRGBA(e,t))}setEnum(e,t,r){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,p.ZP)("value",r,(0,d.Z_)()),(0,g.L)(_(this,n,"f").setEnum(e,t,r))}getEnum(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("property",t,(0,d.Z_)()),(0,g.L)(_(this,n,"f").getEnum(e,t))}hasCrop(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").hasCrop(e))}setCropScaleX(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("scaleX",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setCropScaleX(e,t))}setCropScaleY(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("scaleY",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setCropScaleY(e,t))}setCropRotation(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("rotation",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setCropRotation(e,t))}setCropTranslationX(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("translationX",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setCropTranslationX(e,t))}setCropTranslationY(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("translationY",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setCropTranslationY(e,t))}resetCrop(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").resetCrop(e))}getCropScaleX(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getCropScaleX(e))}getCropScaleY(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getCropScaleY(e))}getCropRotation(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getCropRotation(e))}getCropTranslationX(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getCropTranslationX(e))}getCropTranslationY(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getCropTranslationY(e))}hasOpacity(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").hasOpacity(e))}setOpacity(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("opacity",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setOpacity(e,t))}getOpacity(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getOpacity(e))}hasFillColor(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").hasFillColor(e))}setFillColorRGBA(e,t,r,o,i){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("r",t,(0,d.Rx)()),(0,p.ZP)("g",r,(0,d.Rx)()),(0,p.ZP)("b",o,(0,d.Rx)()),(0,p.ZP)("a",i,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setFillColorRGBA(e,t,r,o,i))}getFillColorRGBA(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getFillColorRGBA(e))}setFillColorEnabled(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("enabled",t,(0,d.O7)()),(0,g.L)(_(this,n,"f").setFillColorEnabled(e,t))}isFillColorEnabled(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").isFillColorEnabled(e))}hasBackgroundColor(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").hasBackgroundColor(e))}setBackgroundColorRGBA(e,t,r,o,i){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("r",t,(0,d.Rx)()),(0,p.ZP)("g",r,(0,d.Rx)()),(0,p.ZP)("b",o,(0,d.Rx)()),(0,p.ZP)("a",i,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setBackgroundColorRGBA(e,t,r,o,i))}getBackgroundColorRGBA(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getBackgroundColorRGBA(e))}setBackgroundColorEnabled(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("enabled",t,(0,d.O7)()),(0,g.L)(_(this,n,"f").setBackgroundColorEnabled(e,t))}isBackgroundColorEnabled(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").isBackgroundColorEnabled(e))}hasStroke(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").hasStroke(e))}setStrokeEnabled(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("enabled",t,(0,d.O7)()),(0,g.L)(_(this,n,"f").setStrokeEnabled(e,t))}isStrokeEnabled(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").isStrokeEnabled(e))}setStrokeColorRGBA(e,t,r,o,i){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("r",t,(0,d.Rx)()),(0,p.ZP)("g",r,(0,d.Rx)()),(0,p.ZP)("b",o,(0,d.Rx)()),(0,p.ZP)("a",i,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setStrokeColorRGBA(e,t,r,o,i))}getStrokeColorRGBA(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getStrokeColorRGBA(e))}setStrokeWidth(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("width",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setStrokeWidth(e,t))}getStrokeWidth(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getStrokeWidth(e))}setStrokeStyle(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").setStrokeStyle(e,t))}getStrokeStyle(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getStrokeStyle(e))}setStrokePosition(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").setStrokePosition(e,t))}getStrokePosition(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getStrokePosition(e))}setStrokeCornerGeometry(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").setStrokeCornerGeometry(e,t))}getStrokeCornerGeometry(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getStrokeCornerGeometry(e))}hasOutline(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").hasOutline(e))}setOutlineColorRGBA(e,t,r,o,i){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("r",t,(0,d.Rx)()),(0,p.ZP)("g",r,(0,d.Rx)()),(0,p.ZP)("b",o,(0,d.Rx)()),(0,p.ZP)("a",i,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setOutlineColorRGBA(e,t,r,o,i))}getOutlineColorRGBA(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getOutlineColorRGBA(e))}setOutlineEnabled(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("enabled",t,(0,d.O7)()),(0,g.L)(_(this,n,"f").setOutlineEnabled(e,t))}isOutlineEnabled(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").isOutlineEnabled(e))}setOutlineWidth(e,t){return(0,p.ZP)("id",e,(0,d._L)()),(0,p.ZP)("width",t,(0,d.Rx)()),(0,g.L)(_(this,n,"f").setOutlineWidth(e,t))}getOutlineWidth(e){return(0,p.ZP)("id",e,(0,d._L)()),(0,g.L)(_(this,n,"f").getOutlineWidth(e))}}n=new WeakMap,o=new WeakMap},37443:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n,o,i=r(8097),a=r(17019),s=r(48641),c=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},u=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class l{constructor(e){n.set(this,void 0),o.set(this,void 0),c(this,n,e,"f"),c(this,o,new s.Z(e),"f")}setZoomLevel(e=1){(0,i.ZP)("zoomLevel",e,(0,a.VV)((0,a.Rx)(),0)),u(this,n,"f").setZoomLevel(e)}getZoomLevel(){return(0,s.L)(u(this,n,"f").getZoomLevel())}addUndoStep(){(0,s.L)(u(this,n,"f").addUndoStep())}undo(){(0,s.L)(u(this,n,"f").undo())}redo(){(0,s.L)(u(this,n,"f").redo())}canUndo(){return(0,s.L)(u(this,n,"f").canUndo())}canRedo(){return(0,s.L)(u(this,n,"f").canRedo())}setSettingString(e,t){return(0,i.ZP)("keypath",e,(0,a.Z_)()),(0,i.ZP)("value",t,(0,a.Z_)()),(0,s.L)(u(this,n,"f").setSettingString(e,t))}setSettingFloat(e,t){return(0,i.ZP)("keypath",e,(0,a.Z_)()),(0,i.ZP)("value",t,(0,a.Rx)()),(0,s.L)(u(this,n,"f").setSettingFloat(e,t))}setSettingBool(e,t){return(0,i.ZP)("keypath",e,(0,a.Z_)()),(0,i.ZP)("value",t,(0,a.O7)()),(0,s.L)(u(this,n,"f").setSettingBool(e,t))}}n=new WeakMap,o=new WeakMap},94110:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n,o=r(8097),i=r(17019),a=(r(68876),r(14545),r(48641)),s=r(15684),c=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class u{constructor(e){n.set(this,void 0),function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,r):o?o.value=r:t.set(e,r)}(this,n,e,"f")}subscribe(e,t){(0,o.ZP)("blocks",e,(0,i.IX)());const r=c(this,n,"f").subscribe(e,(e=>{try{t((0,s.Z)(e,!0))}catch(e){console.error(e)}}));return()=>{(0,a.L)(c(this,n,"f").unsubscribe(r))}}}n=new WeakMap},37184:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n,o,i=r(8097),a=r(17019),s=r(68876),c=r(81867),u=(r(14545),r(48641)),l=r(15684),d=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},p=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class f{constructor(e){n.set(this,void 0),o.set(this,void 0),d(this,n,e,"f"),d(this,o,new u.Z(e),"f")}async loadFromString(e){return(0,i.ZP)("sceneContent",e,(0,a.Z_)()),new Promise((t=>{p(this,n,"f").loadSceneFromString(e,(e=>{const r=(0,u.L)(e);t(r)}))}))}async loadFromURL(e){return(0,i.ZP)("url",e,(0,a.Z_)()),new Promise((t=>{p(this,n,"f").loadSceneFromURL(e,(e=>{const r=(0,u.L)(e);t(r)}))}))}async saveToString(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):p(this,n,"f").saveSceneToString(r,(t=>{const r=(0,u.L)(t);e(r)}))}))}async saveToArchive(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):p(this,n,"f").saveSceneToArchive(r,(r=>{"error"in r?t(r.error):e(new Blob([r],{type:c.Z.Zip}))}))}))}create(){return(0,u.L)(p(this,n,"f").createScene({layout:s.Kc.Free}))}createFromImage(e,t=300,r=1){return(0,i.ZP)("url",e,(0,a.Z_)()),(0,i.ZP)("dpi",t,(0,a.VV)((0,a.Rx)(),0)),(0,i.ZP)("pixelScaleFactor",r,(0,a.VV)((0,a.Rx)(),0)),new Promise((o=>{p(this,n,"f").createSceneFromImage(e,t,r,s.Kc.Free,0,!1,(e=>{const t=(0,u.L)(e);o(t)}))}))}get(){const e=p(this,n,"f").findByType(s._h.Scene),t=(0,u.L)(e),r=(0,l.Z)(t);return r.length>0?r[0]:null}}n=new WeakMap,o=new WeakMap},49189:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n,o=r(8097),i=r(17019),a=(r(14545),r(48641)),s=r(15684),c=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class u{constructor(e){n.set(this,void 0),function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,r):o?o.value=r:t.set(e,r)}(this,n,e,"f")}findAll(){return(0,s.Z)(c(this,n,"f").findAllVariables())}setString(e,t){return(0,o.ZP)("key",e,(0,i.Z_)()),(0,o.ZP)("value",t,(0,i.Z_)()),(0,a.L)(c(this,n,"f").setVariableString(e,t))}getString(e){return(0,o.ZP)("key",e,(0,i.Z_)()),(0,a.L)(c(this,n,"f").getVariableString(e))}remove(e){return(0,o.ZP)("key",e,(0,i.Z_)()),(0,a.L)(c(this,n,"f").removeVariable(e))}}n=new WeakMap},8097:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>o,zF:()=>i});var n=r(17019);function o(e,t,r){const[o]=(0,n.Gu)(t,r);if(o)throw o.message=`Error in argument '${e}': ${o.message}`,o}function i(){const e=/image\/(png|jpeg|x-tga)|application\/octet-stream|application\/pdf/;return(0,n.Ou)("MimeType",(t=>!("string"!=typeof t||!e.test(t))||{message:`expected one of "image/png", "image/jpeg", "image/x-tga", "application/pdf" or "application/octet-stream", but got "${t}"`}))}},69786:(e,t,r)=>{"use strict";r.d(t,{vx:()=>i,pA:()=>s,_z:()=>c,qZ:()=>u,Zj:()=>l,zI:()=>d,YV:()=>p,Hf:()=>f});var n=r(58645),o=r(1440);r(32012);const i={baseURL:"/extensions/",entries:["ly.img.cesdk.filters.duotone","ly.img.cesdk.filters.lut","ly.img.cesdk.stickers.emoticons","ly.img.cesdk.vectorpaths","ly.img.cesdk.vectorpaths.abstract","ly.img.cesdk.fonts","ly.img.cesdk.images.samples","ly.img.cesdk.effects","ly.img.cesdk.stickers.doodle","ly.img.cesdk.stickers.hand","ly.img.cesdk.stickers.emoji"]},a={"din-a0":{width:1189,height:841,unit:n.Z.Millimeter},"din-a1":{width:841,height:594,unit:n.Z.Millimeter},"din-a2":{width:594,height:420,unit:n.Z.Millimeter},"din-a3":{width:420,height:297,unit:n.Z.Millimeter},"din-a4":{width:297,height:210,unit:n.Z.Millimeter},"din-a5":{width:210,height:148,unit:n.Z.Millimeter},"din-a6":{meta:{default:!0},width:148,height:105,unit:n.Z.Millimeter},"din-a65":{width:210,height:105,unit:n.Z.Millimeter},"din-b5":{width:250,height:176,unit:n.Z.Millimeter},square:{width:105,height:105,unit:n.Z.Millimeter},"twitter-profile":{width:400,height:400,unit:n.Z.Pixel},"twitter-image":{width:1024,height:512,unit:n.Z.Pixel},"twitter-header":{width:1500,height:500,unit:n.Z.Pixel},"instagram-profile":{width:180,height:180,unit:n.Z.Pixel},"instagram-photo":{width:1080,height:1080,unit:n.Z.Pixel},"instagram-story":{width:1080,height:1920,unit:n.Z.Pixel},"american-letter":{width:8.5,height:11,unit:n.Z.Inch},"american-legal":{width:8.5,height:14,unit:n.Z.Inch},"16:10":{width:1600,height:1e3,unit:n.Z.Pixel},"16:9":{width:1600,height:900,unit:n.Z.Pixel},"16:10@2400p":{width:3840,height:2400,unit:n.Z.Pixel},"16:9@2160p":{width:3840,height:2160,unit:n.Z.Pixel},"business-card":{width:85,height:55,unit:n.Z.Millimeter}},s={company_name:{value:"img.ly"},first_name:{value:"Charly"},last_name:{value:"Williams"},address:{value:"742 Evergreen Terrace"},city:{value:"Springfield"}},c=(e,t)=>{const r=`[UBQ] ${e}`;switch(t){case o.i.Warning:console.warn(r);break;case o.i.Error:console.error(r);break;case o.i.Info:console.log(r);break;default:console.log(r)}},u={log:c},l={colorPalettes:{primary:{meta:{default:!0},entries:["#FFFFFF","#000000","#6686FF","#66CCFF","#54FFEA","#E75050","#F28855","#FFF763"]}},pageFormats:a},d={baseURL:"core/"},p={maskSpotColor:void 0,dpi:300,pixelScaleFactor:1},f={title:{fontFileUri:"bundle://ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",show:!0},dimOutOfPageAreas:!0}},45755:(e,t,r)=>{"use strict";r.d(t,{QG:()=>c});var n=r(57168),o=r.n(n),i=r(69786);function a(e,t=window.location.href){return new URL(e,t).toString()}function s(e){return"/"!==e[e.length-1]?`${e}/`:e}function c(e={}){var t,r,n,c,u,l,d,p,f,m,g,h,E;const _={license:e.license,role:null!==(t=e.role)&&void 0!==t?t:"Creator",featureFlags:null!==(r=e.featureFlags)&&void 0!==r?r:{},baseURL:null!==(n=e.baseURL)&&void 0!==n?n:"https://cdn.img.ly/packages/imgly/cesdk-js/1.5.1/assets",core:null!==(c=e.core)&&void 0!==c?c:Object.assign({},i.zI),extensions:null!==(u=e.extensions)&&void 0!==u?u:Object.assign({},i.vx),callbacks:null!==(l=e.callbacks)&&void 0!==l?l:Object.assign({},i.qZ),variables:null!==(d=e.variables)&&void 0!==d?d:Object.assign({},i.pA),presets:null!==(p=e.presets)&&void 0!==p?p:Object.assign({},i.Zj),scene:null!==(f=e.scene)&&void 0!==f?f:Object.assign({},i.YV),page:o()({},i.Hf,null!==(m=e.page)&&void 0!==m?m:{}),assets:null!==(g=e.assets)&&void 0!==g?g:{},assetSources:o()({},e.assetSources),defaultFont:null!==(h=e.defaultFont)&&void 0!==h?h:void 0};return _.extensions.entries=null!==(E=_.extensions.entries)&&void 0!==E?E:Object.assign({},i.vx.entries),Object.entries(i.Zj).forEach((([e,t])=>{var r;_.presets[e]=null!==(r=_.presets[e])&&void 0!==r?r:Object.assign({},t)})),_.baseURL=a(_.baseURL),_.baseURL=s(_.baseURL),_.core.baseURL=a(_.core.baseURL,_.baseURL),_.core.baseURL=s(_.core.baseURL),_.extensions.baseURL=s(_.extensions.baseURL),_.extensions.entries=_.extensions.entries.map((e=>s(e))),_}r(32012)},45094:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o}),r(45755);var n=r(69786);function o(e){var t,r;return null!==(r=null===(t=null==e?void 0:e.callbacks)||void 0===t?void 0:t.log)&&void 0!==r?r:n._z}r(1440)},32012:(e,t,r)=>{"use strict";r(1440),r(58645)},86295:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>R});var n=r(81655),o=r(45755),i=r(94110),a=r(50124),s=r(68876),c=r(48641);function u(e,t){var r,n;const o=null==e?void 0:e.getBoundingClientRect(),i=null!==(r=null==o?void 0:o.top)&&void 0!==r?r:0,a=null!==(n=null==o?void 0:o.left)&&void 0!==n?n:0,s=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(t),c=s?t.changedTouches[0].clientX:t.clientX,u=s?t.changedTouches[0].clientY:t.clientY;return{position:{x:(c-a)*window.devicePixelRatio,y:(u-i)*window.devicePixelRatio},isOverUIElement:!1,isTouch:s,timestamp:Date.now()}}var l=r(37184),d=r(81867),p=(r(14545),r(45111)),f=r(49189),m=r(37443),g=r(48473);var h,E,_,y,v,b,w,T,O,P,D,x=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},S=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class R{constructor(e,t,r){h.add(this),Object.defineProperty(this,"block",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scene",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"variable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unstable_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),E.set(this,void 0),_.set(this,void 0),y.set(this,void 0),v.set(this,(()=>{const e=this.block.findByType(s._h.Camera)[0];if(!e)return;const{width:t,height:r}=S(this,_,"f"),n=S(this,E,"f").getValue(e,s.$R.Camera,"resolution");(0,p.dA)(n.width,t,1e-4)&&(0,p.dA)(n.height,r,1e-4)||S(this,E,"f").setValue(e,s.$R.Camera,"resolution",{width:t,height:r});const o=S(this,E,"f").getValue(e,s.$R.Camera,"pixelRatio");(0,p.dA)(o,window.devicePixelRatio,1e-4)||S(this,E,"f").setValue(e,s.$R.Camera,"pixelRatio",window.devicePixelRatio)})),b.set(this,void 0),w.set(this,void 0),T.set(this,void 0),x(this,y,e,"f"),x(this,E,new c.Z(e),"f"),x(this,_,t,"f"),this.block=new n.ZP(e),this.scene=new l.Z(e),this.variable=new f.Z(e),this.unstable_editor=new m.Z(e),this.event=new i.Z(e),S(this,E,"f").useInternalAPI((e=>{e.setPreUpdateCallback(S(this,v,"f"))})),S(this,h,"m",O).call(this),window.Cypress&&(this.config=r,this.helper=S(this,E,"f"),this.onPostUpdate=e=>{S(this,E,"f").useInternalAPI((t=>{t.setPostUpdateCallback(e)}))})}dispose(){S(this,h,"m",P).call(this),S(this,E,"f").useInternalAPI((e=>{e.setPreUpdateCallback(null)})),x(this,_,null,"f"),x(this,E,null,"f"),this.block=null,this.scene=null,this.variable=null,S(this,y,"f").delete(),x(this,y,null,"f")}static async init(e,t){console.log("[CESDK] Revision 94e85343d8f9064281f88c6a41568d38ea393311"),t||(t=document.createElement("canvas"));const r=(0,o.QG)(e);return new this(await(0,a.Z)(t,r),t,r)}}E=new WeakMap,_=new WeakMap,y=new WeakMap,v=new WeakMap,b=new WeakMap,w=new WeakMap,T=new WeakMap,h=new WeakSet,O=function(e=!0){if(S(this,b,"f"))return;x(this,w,function(e,t){const r=r=>{const n=u(e,r);n.isTouch&&r.preventDefault(),t.execute("ubq/inputs/mousemove",n)},n=r=>{const n=Object.assign(Object.assign({},u(e,r)),{button:(0,s.fn)(r instanceof MouseEvent?r.button:s.tc.Left),state:s.BN.Up,shiftIsHeld:r.shiftKey});t.execute("ubq/inputs/mousebutton",n)},o=r=>{const n=Object.assign(Object.assign({},u(e,r)),{button:(0,s.fn)(r instanceof MouseEvent?r.button:s.tc.Left),state:s.BN.Down,shiftIsHeld:r.shiftKey});t.execute("ubq/inputs/mousebutton",n)};return e.addEventListener("mousemove",r),e.addEventListener("mousedown",o),e.addEventListener("mouseup",n),e.addEventListener("touchmove",r),e.addEventListener("touchstart",o),e.addEventListener("touchend",n),e.addEventListener("touchcancel",n),()=>{e.removeEventListener("mousemove",r),e.removeEventListener("mousedown",o),e.removeEventListener("mouseup",n),e.removeEventListener("touchmove",r),e.removeEventListener("touchstart",o),e.removeEventListener("touchend",n),e.removeEventListener("touchcancel",n)}}(S(this,_,"f"),S(this,E,"f")),"f"),x(this,T,function(e,t){var r;let n=!1,o=0;const i=document.createElement("input");function a(e){try{t.useInternalAPI((t=>{const r=(0,c.L)(t.getSelectedText());""!==r&&e.clipboardData&&(e.clipboardData.setData("text/plain",r),e.preventDefault())}))}catch(e){console.error(e)}}function u(e){const r=e.target,{value:a}=r;if(a.length>0){if(n&&(o+=1),o>1){const e={key:s.u8.Backspace,characters:"",shiftIsHeld:!1,commandIsHeld:!1,optionIsHeld:!1,timestamp:Date.now()};t.execute("ubq/inputs/keyboardkey",e)}const e={key:s.u8.Unknown,characters:a,shiftIsHeld:!1,commandIsHeld:!1,optionIsHeld:!1,timestamp:Date.now()};t.execute("ubq/inputs/keyboardkey",e)}n||(i.value="")}async function l(e){if("a"===e.key&&(e.metaKey||e.ctrlKey))return void await t.execute("ubq/text/selectAllText");if("Escape"===e.key)return void async function(){const e=await t.execute("ubq/editor/getEditorState");t.setEditorState(Object.assign(Object.assign({},e),{editMode:s.Gt.Transform}))}();if("Backspace"!==e.key&&"Delete"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key&&"ArrowUp"!==e.key&&"ArrowDown"!==e.key&&"Enter"!==e.key)return;const r=(0,g.Z)(e);await t.execute("ubq/inputs/keyboardkey",r),e.currentTarget&&(i.value="")}function d(){n=!0,o=0}function p(){n=!1,o=0,i.value=""}let f;return i.id="ubq_internal-inline_text_editing_html_representation",i.style.contain="strict",i.style.opacity="0",i.style.pointerEvents="none",i.style.zIndex="-1",i.style.position="absolute",i.style.width="1px",i.style.height="1px",i.style.padding="0",i.style.margin="-1px",i.style.overflow="hidden",i.style.clip="rect(0, 0, 0, 0)",i.style.whiteSpace="nowrap",i.style.border="0",function e(r){void 0===f&&(f=r),r-f>100&&(f=r,async function(){const{editMode:e}=await t.execute("ubq/editor/getEditorState");"ubq/editMode/text"===e&&i.focus()}()),requestAnimationFrame(e)}(0),i.addEventListener("input",u),i.addEventListener("keydown",l),i.addEventListener("copy",a),i.addEventListener("compositionstart",d),i.addEventListener("compositionend",p),null===(r=null==e?void 0:e.parentElement)||void 0===r||r.appendChild(i),()=>{var t;i.removeEventListener("input",u),i.removeEventListener("keydown",l),i.removeEventListener("copy",a),i.removeEventListener("compositionstart",d),i.removeEventListener("compositionend",p),null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(i)}}(S(this,_,"f"),S(this,E,"f")),"f");const t=()=>{S(this,h,"m",D).call(this,e),x(this,b,requestAnimationFrame(t),"f")};x(this,b,requestAnimationFrame(t),"f")},P=function(){var e,t;null===(e=S(this,w,"f"))||void 0===e||e.call(this),null===(t=S(this,T,"f"))||void 0===t||t.call(this),x(this,w,void 0,"f"),x(this,T,void 0,"f"),S(this,b,"f")&&(cancelAnimationFrame(S(this,b,"f")),x(this,b,0,"f"))},D=function(e=!0){e&&1===this.block.findByType(s._h.Scene).length&&S(this,E,"f").execute("ubq/render",{displayWidth:S(this,_,"f").width,displayHeight:S(this,_,"f").height}),S(this,y,"f").update()},Object.defineProperty(R,"PositionMode",{enumerable:!0,configurable:!0,writable:!0,value:n.T}),Object.defineProperty(R,"SizeMode",{enumerable:!0,configurable:!0,writable:!0,value:n.t1}),Object.defineProperty(R,"PropertyType",{enumerable:!0,configurable:!0,writable:!0,value:n.uS}),Object.defineProperty(R,"DesignBlockType",{enumerable:!0,configurable:!0,writable:!0,value:s._h}),Object.defineProperty(R,"MimeType",{enumerable:!0,configurable:!0,writable:!0,value:d.Z}),Object.defineProperty(R,"StrokePosition",{enumerable:!0,configurable:!0,writable:!0,value:n.Rg}),Object.defineProperty(R,"StrokeCornerGeometry",{enumerable:!0,configurable:!0,writable:!0,value:n.hD}),Object.defineProperty(R,"StrokeStyle",{enumerable:!0,configurable:!0,writable:!0,value:n.qb})},50124:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n,o=r(45755),i=r(1440),a=r(68876),s=(r(14545),r(48641)),c=r(45094);const u=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var t,o,i=void 0!==(e=e||{})?e:{};i.ready=new Promise((function(e,r){t=e,o=r})),Object.getOwnPropertyDescriptor(i.ready,"_main")||(Object.defineProperty(i.ready,"_main",{configurable:!0,get:function(){Ne("You are getting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"_main",{configurable:!0,set:function(){Ne("You are setting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___getTypeName")||(Object.defineProperty(i.ready,"___getTypeName",{configurable:!0,get:function(){Ne("You are getting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___getTypeName",{configurable:!0,set:function(){Ne("You are setting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___embind_register_native_and_builtin_types")||(Object.defineProperty(i.ready,"___embind_register_native_and_builtin_types",{configurable:!0,get:function(){Ne("You are getting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___embind_register_native_and_builtin_types",{configurable:!0,set:function(){Ne("You are setting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"___stdio_exit")||(Object.defineProperty(i.ready,"___stdio_exit",{configurable:!0,get:function(){Ne("You are getting ___stdio_exit on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"___stdio_exit",{configurable:!0,set:function(){Ne("You are setting ___stdio_exit on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(i.ready,"onRuntimeInitialized")||(Object.defineProperty(i.ready,"onRuntimeInitialized",{configurable:!0,get:function(){Ne("You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(i.ready,"onRuntimeInitialized",{configurable:!0,set:function(){Ne("You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),i.expectedDataFileDownloads||(i.expectedDataFileDownloads=0),i.expectedDataFileDownloads++,i.ENVIRONMENT_IS_PTHREAD||function(e){"object"==typeof window?window.encodeURIComponent(window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/"):"undefined"==typeof process&&"undefined"!=typeof location&&encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/");var t="cesdk.data";"function"!=typeof i.locateFilePackage||i.locateFile||(i.locateFile=i.locateFilePackage,O("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)"));var r,n,o,a,s=i.locateFile?i.locateFile(t,""):t,c=e.remote_package_size,u=null,l=i.getPreloadedPackage?i.getPreloadedPackage(s,c):null;function d(){function t(e,t){if(!e)throw t+(new Error).stack}function r(e,t,r){this.start=e,this.end=t,this.audio=r}i.FS_createPath("/","ly.img.cesdk",!0,!0),i.FS_createPath("/ly.img.cesdk","images",!0,!0),i.FS_createPath("/ly.img.cesdk","shaders",!0,!0),i.FS_createPath("/ly.img.cesdk/shaders","common",!0,!0),i.FS_createPath("/ly.img.cesdk","presets",!0,!0),i.FS_createPath("/ly.img.cesdk","fonts",!0,!0),r.prototype={requests:{},open:function(e,t){this.name=t,this.requests[t]=this,i.addRunDependency("fp "+this.name)},send:function(){},onload:function(){var e=this.byteArray.subarray(this.start,this.end);this.finish(e)},finish:function(e){i.FS_createDataFile(this.name,null,e,!0,!0,!0),i.removeRunDependency("fp "+this.name),this.requests[this.name]=null}};for(var n=e.files,o=0;o<n.length;++o)new r(n[o].start,n[o].end,n[o].audio||0).open("GET",n[o].filename);function a(n){t(n,"Loading data file failed."),t(n instanceof ArrayBuffer,"bad input to processPackageData");var o=new Uint8Array(n);r.prototype.byteArray=o;for(var a=e.files,s=0;s<a.length;++s)r.prototype.requests[a[s].filename].onload();i.removeRunDependency("datafile_cesdk.data")}i.addRunDependency("datafile_cesdk.data"),i.preloadResults||(i.preloadResults={}),i.preloadResults["cesdk.data"]={fromCache:!1},l?(a(l),l=null):u=a}l||(r=s,n=c,o=function(e){u?(u(e),u=null):l=e},(a=new XMLHttpRequest).open("GET",r,!0),a.responseType="arraybuffer",a.onprogress=function(e){var t=r,o=n;if(e.total&&(o=e.total),e.loaded){a.addedTotal?i.dataFileDownloads[t].loaded=e.loaded:(a.addedTotal=!0,i.dataFileDownloads||(i.dataFileDownloads={}),i.dataFileDownloads[t]={loaded:e.loaded,total:o});var s=0,c=0,u=0;for(var l in i.dataFileDownloads){var d=i.dataFileDownloads[l];s+=d.total,c+=d.loaded,u++}s=Math.ceil(s*i.expectedDataFileDownloads/u),i.setStatus&&i.setStatus("Downloading data... ("+c+"/"+s+")")}else i.dataFileDownloads||i.setStatus&&i.setStatus("Downloading data...")},a.onerror=function(e){throw new Error("NetworkError for: "+r)},a.onload=function(e){if(!(200==a.status||304==a.status||206==a.status||0==a.status&&a.response))throw new Error(a.statusText+" : "+a.responseURL);var t=a.response;o(t)},a.send(null)),i.calledRun?d():(i.preRun||(i.preRun=[]),i.preRun.push(d))}({files:[{filename:"/ly.img.cesdk/.DS_Store",start:0,end:6148},{filename:"/ly.img.cesdk/images/watermark.png",start:6148,end:96295},{filename:"/ly.img.cesdk/shaders/liquid.sksl",start:96295,end:98905},{filename:"/ly.img.cesdk/shaders/mirror.sksl",start:98905,end:99359},{filename:"/ly.img.cesdk/shaders/outliner.sksl",start:99359,end:100996},{filename:"/ly.img.cesdk/shaders/tv_glitch.sksl",start:100996,end:103933},{filename:"/ly.img.cesdk/shaders/mask_color.sksl",start:103933,end:104435},{filename:"/ly.img.cesdk/shaders/lut_filter.sksl",start:104435,end:107298},{filename:"/ly.img.cesdk/shaders/vignette.sksl",start:107298,end:107670},{filename:"/ly.img.cesdk/shaders/sharpie.sksl",start:107670,end:109975},{filename:"/ly.img.cesdk/shaders/hsp_selective_adjustments.sksl",start:109975,end:123575},{filename:"/ly.img.cesdk/shaders/half_tone.sksl",start:123575,end:124069},{filename:"/ly.img.cesdk/shaders/tiltshift.sksl",start:124069,end:124701},{filename:"/ly.img.cesdk/shaders/pixelize.sksl",start:124701,end:125001},{filename:"/ly.img.cesdk/shaders/linocut.sksl",start:125001,end:125786},{filename:"/ly.img.cesdk/shaders/glow.sksl",start:125786,end:126753},{filename:"/ly.img.cesdk/shaders/radial_pixel.sksl",start:126753,end:127316},{filename:"/ly.img.cesdk/shaders/black_and_white_color_mixer.sksl",start:127316,end:133633},{filename:"/ly.img.cesdk/shaders/shifter.sksl",start:133633,end:134317},{filename:"/ly.img.cesdk/shaders/posterize.sksl",start:134317,end:134529},{filename:"/ly.img.cesdk/shaders/dot_pattern.sksl",start:134529,end:135044},{filename:"/ly.img.cesdk/shaders/adjustments.sksl",start:135044,end:138933},{filename:"/ly.img.cesdk/shaders/extrude_blur.sksl",start:138933,end:141050},{filename:"/ly.img.cesdk/shaders/duotone_filter.sksl",start:141050,end:142014},{filename:"/ly.img.cesdk/shaders/cross_cut.sksl",start:142014,end:142841},{filename:"/ly.img.cesdk/shaders/placeholder_overlay_lines.sksl",start:142841,end:143422},{filename:"/ly.img.cesdk/shaders/common/ubq_constants.sksl",start:143422,end:143912},{filename:"/ly.img.cesdk/shaders/common/ubq_adjustments.sksl",start:143912,end:148475},{filename:"/ly.img.cesdk/shaders/common/ubq_color_conversions.sksl",start:148475,end:158460},{filename:"/ly.img.cesdk/shaders/common/ubq_hue_constants.sksl",start:158460,end:161627},{filename:"/ly.img.cesdk/presets/.keep",start:161627,end:161627},{filename:"/ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",start:161627,end:432387}],remote_package_size:432387,package_uuid:"a6a3eb7f-f8c3-430f-b744-8abaa3de6b34"}),i.ENVIRONMENT_IS_PTHREAD&&(i.preRun=[]);var a=i.preRun.slice();"object"==typeof window&&"object"==typeof window.performance?i.performance=performance:"object"==typeof r.g&&"object"==typeof r.g.perf_hooks&&"object"==typeof r.g.perf_hooks.performance?i.performance=r.g.perf_hooks.performance:i.performance={mark:function(){},measure:function(){}},i.emscripten_ubq_asyncFetchStates=new Map,i.emscripten_ubq_asyncFetchCompletedBytes=new Map,i.emscripten_ubq_asyncFetchTotalBytes=new Map,i.emscripten_ubq_asyncFetchHeaders=new Map,i.emscripten_ubq_asyncFetchNextHandle=0,i.emscripten_ubq_asyncFetchNextHeaderHandle=0;const s={PENDING:0,FINISHED:1,ALLOCATED:2,ERROR:3},c=["GET","POST"];if(i.emscripten_ubq_codec_decoders=new Map,i.emscripten_ubq_codec_decoderNextHandle=0,i.emscripten_ubq_codec_createVideoDecoder=function(e){const t=new VideoDecoder({output:r=>{var n;if(t.presentedFrames++,t.probing&&1===t.presentedFrames)return(n=i.ctx).bindTexture(n.TEXTURE_2D,e),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),t.textureUploadFlag=!0,void r.close();t.decodeQueueSize>0||t.probing||((n=i.ctx).bindTexture(n.TEXTURE_2D,e),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),t.textureUploadFlag=!0),r.close()},error:e=>console.error(e)});return t.presentedFrames=0,t},!i.preRun)throw"Module.preRun should exist because file support used it; did a pre-js delete it?";a.forEach((function(e){if(i.preRun.indexOf(e)<0)throw"All preRun tasks that exist before user pre-js code should remain after; did you replace Module or modify Module.preRun?"}));var u=Object.assign({},i),l=[],d="./this.program",p=(e,t)=>{throw t},f=!0,m=!1,g=!1,h=!1;if(i.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var E,_,y,v="";function b(e){return i.locateFile?i.locateFile(e,v):v+e}function w(e){if(e instanceof ap)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),O("exiting due to exception: "+t)}if(h){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(E=function(e){return read(e)}),y=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),I("object"==typeof t),t)},_=function(e,t,r){setTimeout((()=>t(y(e))),0)},"undefined"!=typeof scriptArgs?l=scriptArgs:void 0!==arguments&&(l=arguments),"function"==typeof quit&&(p=(e,t)=>{w(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!f&&!m)throw new Error("environment detection error");if(m?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),n&&(v=n),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");E=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},m&&(y=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),_=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var T=i.print||console.log.bind(console),O=i.printErr||console.warn.bind(console);function P(e){P.shown||(P.shown={}),P.shown[e]||(P.shown[e]=1,O(e))}Object.assign(i,u),u=null,i.arguments&&(l=i.arguments),Object.getOwnPropertyDescriptor(i,"arguments")||Object.defineProperty(i,"arguments",{configurable:!0,get:function(){Ne("Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),i.thisProgram&&(d=i.thisProgram),Object.getOwnPropertyDescriptor(i,"thisProgram")||Object.defineProperty(i,"thisProgram",{configurable:!0,get:function(){Ne("Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),i.quit&&(p=i.quit),Object.getOwnPropertyDescriptor(i,"quit")||Object.defineProperty(i,"quit",{configurable:!0,get:function(){Ne("Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),I(void 0===i.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),I(void 0===i.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),I(void 0===i.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),I(void 0===i.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),I(void 0===i.read,"Module.read option was removed (modify read_ in JS)"),I(void 0===i.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),I(void 0===i.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),I(void 0===i.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),I(void 0===i.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Object.getOwnPropertyDescriptor(i,"read")||Object.defineProperty(i,"read",{configurable:!0,get:function(){Ne("Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(i,"readAsync")||Object.defineProperty(i,"readAsync",{configurable:!0,get:function(){Ne("Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(i,"readBinary")||Object.defineProperty(i,"readBinary",{configurable:!0,get:function(){Ne("Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(i,"setWindowTitle")||Object.defineProperty(i,"setWindowTitle",{configurable:!0,get:function(){Ne("Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),I(!m,"worker environment detected but not enabled at build time. Add 'worker' to `-s ENVIRONMENT` to enable."),I(!g,"node environment detected but not enabled at build time. Add 'node' to `-s ENVIRONMENT` to enable."),I(!h,"shell environment detected but not enabled at build time. Add 'shell' to `-s ENVIRONMENT` to enable.");var D,x=0,S=e=>{x=e},R=()=>x;i.wasmBinary&&(D=i.wasmBinary),Object.getOwnPropertyDescriptor(i,"wasmBinary")||Object.defineProperty(i,"wasmBinary",{configurable:!0,get:function(){Ne("Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}});var M,A=i.noExitRuntime||!0;function k(e,t="i8",r){switch("*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return Q[e>>0];case"i16":return G[e>>1];case"i32":case"i64":return W[e>>2];case"float":return z[e>>2];case"double":return Number($[e>>3]);default:Ne("invalid type for getValue: "+t)}return null}Object.getOwnPropertyDescriptor(i,"noExitRuntime")||Object.defineProperty(i,"noExitRuntime",{configurable:!0,get:function(){Ne("Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),"object"!=typeof WebAssembly&&Ne("no native wasm support detected");var F,C=!1;function I(e,t){e||Ne("Assertion failed"+(t?": "+t:""))}var L="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function j(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&L)return L.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|c:(240!=(248&a)&&P("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),a=(7&a)<<18|s<<12|c<<6|63&e[t++]),a<65536)i+=String.fromCharCode(a);else{var u=a-65536;i+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function U(e,t){return e?j(Z,e,t):""}function N(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;s>1114111&&P("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function H(e,t,r){return I("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),N(e,Z,t,r)}function B(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var X,Q,Z,G,q,W,V,z,$,Y="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function K(e,t){I(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r=e,n=r>>1,o=n+t/2;!(n>=o)&&q[n];)++n;if((r=n<<1)-e>32&&Y)return Y.decode(Z.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=G[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function J(e,t,r){if(I(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),I("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);G[t>>1]=a,t+=2}return G[t>>1]=0,t-n}function ee(e){return 2*e.length}function te(e,t){I(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var o=W[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function re(e,t,r){if(I(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),I("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),W[t>>2]=a,(t+=4)+4>o)break}return W[t>>2]=0,t-n}function ne(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t}function oe(e){var t=B(e)+1,r=Cd(t);return r&&N(e,Q,r,t),r}function ie(e){var t=B(e)+1,r=Gd(t);return N(e,Q,r,t),r}function ae(e,t){I(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),Q.set(e,t)}function se(e,t,r){for(var n=0;n<e.length;++n)I(e.charCodeAt(n)===(255&e.charCodeAt(n))),Q[t++>>0]=e.charCodeAt(n);r||(Q[t>>0]=0)}function ce(e,t){return e%t>0&&(e+=t-e%t),e}function ue(e){X=e,i.HEAP8=Q=new Int8Array(e),i.HEAP16=G=new Int16Array(e),i.HEAP32=W=new Int32Array(e),i.HEAPU8=Z=new Uint8Array(e),i.HEAPU16=q=new Uint16Array(e),i.HEAPU32=V=new Uint32Array(e),i.HEAPF32=z=new Float32Array(e),i.HEAPF64=$=new Float64Array(e)}var le=5242880;i.TOTAL_STACK&&I(le===i.TOTAL_STACK,"the stack size can no longer be determined at runtime");var de,pe=i.INITIAL_MEMORY||268435456;function fe(){var e=Xd();I(0==(3&e)),W[e+4>>2]=34821223,W[e+8>>2]=2310721022,W[0]=1668509029}function me(){if(!C){var e=Xd(),t=V[e+4>>2],r=V[e+8>>2];34821223==t&&2310721022==r||Ne("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16)),1668509029!==W[0]&&Ne("Runtime error: The application has corrupted its heap memory area (address zero)!")}}Object.getOwnPropertyDescriptor(i,"INITIAL_MEMORY")||Object.defineProperty(i,"INITIAL_MEMORY",{configurable:!0,get:function(){Ne("Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),I(pe>=le,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+pe+"! (TOTAL_STACK="+le+")"),I("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),I(!i.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),I(268435456==pe,"Detected runtime INITIAL_MEMORY setting. Use -s IMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)"}();var ge=[],he=[],Ee=[],_e=[],ye=[],ve=!1,be=!1,we=0;function Te(){return A||we>0}function Oe(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)Re(i.preRun.shift());$e(ge)}function Pe(){me(),I(!ve),ve=!0,i.noFSInit||_t.init.initialized||_t.init(),_t.ignorePermissions=!1,lt.init(),$e(he)}function De(){me(),$e(Ee)}function xe(){me(),be=!0}function Se(){if(me(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)Ae(i.postRun.shift());$e(ye)}function Re(e){ge.unshift(e)}function Me(e){he.unshift(e)}function Ae(e){ye.unshift(e)}I(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),I(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),I(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),I(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var ke=0,Fe=null,Ce=null,Ie={};function Le(e){for(var t=e;;){if(!Ie[e])return e;e=t+Math.random()}}function je(e){ke++,i.monitorRunDependencies&&i.monitorRunDependencies(ke),e?(I(!Ie[e]),Ie[e]=1,null===Fe&&"undefined"!=typeof setInterval&&(Fe=setInterval((function(){if(C)return clearInterval(Fe),void(Fe=null);var e=!1;for(var t in Ie)e||(e=!0,O("still waiting on run dependencies:")),O("dependency: "+t);e&&O("(end of list)")}),1e4))):O("warning: run dependency added without ID")}function Ue(e){if(ke--,i.monitorRunDependencies&&i.monitorRunDependencies(ke),e?(I(Ie[e]),delete Ie[e]):O("warning: run dependency removed without ID"),0==ke&&(null!==Fe&&(clearInterval(Fe),Fe=null),Ce)){var t=Ce;Ce=null,t()}}function Ne(e){i.onAbort&&i.onAbort(e),O(e="Aborted("+e+")"),C=!0,F=1;var t=new WebAssembly.RuntimeError(e);throw o(t),t}i.preloadedImages={},i.preloadedAudios={};var He,Be,Xe,Qe="data:application/octet-stream;base64,";function Ze(e){return e.startsWith(Qe)}function Ge(e){return e.startsWith("file://")}function qe(e,t){return function(){var r=e,n=t;return t||(n=i.asm),I(ve,"native function `"+r+"` called before runtime initialization"),I(!be,"native function `"+r+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n[e]||I(n[e],"exported native function `"+r+"` not found"),n[e].apply(null,arguments)}}function We(e){try{if(e==He&&D)return new Uint8Array(D);if(y)return y(e);throw"both async and sync fetching of the wasm failed"}catch(e){Ne(e)}}function Ve(){return D||!f&&!m||"function"!=typeof fetch?Promise.resolve().then((function(){return We(He)})):fetch(He,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+He+"'";return e.arrayBuffer()})).catch((function(){return We(He)}))}function ze(){var e={env:Fd,wasi_snapshot_preview1:Fd};function t(e,t){var r=e.exports;i.asm=r,I(M=i.asm.memory,"memory not found in wasm exports"),ue(M.buffer),I(de=i.asm.__indirect_function_table,"table not found in wasm exports"),Me(i.asm.__wasm_call_ctors),Ue("wasm-instantiate")}je("wasm-instantiate");var r=i;function n(e){I(i===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(e.instance)}function a(t){return Ve().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){O("failed to asynchronously prepare wasm: "+e),Ge(He)&&O("warning: Loading from a file URI ("+He+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),Ne(e)}))}if(i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){return O("Module.instantiateWasm callback failed with error: "+e),!1}return(D||"function"!=typeof WebAssembly.instantiateStreaming||Ze(He)||"function"!=typeof fetch?a(n):fetch(He,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){return O("wasm streaming compile failed: "+e),O("falling back to ArrayBuffer instantiation"),a(n)}))}))).catch(o),{}}function $e(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?et(r)():et(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(i)}}function Ye(e){return P("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function Ke(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=Ye(e);return e===t?e:t+" ["+e+"]"}))}Ze(He="cesdk.wasm")||(He=b(He));var Je=[];function et(e){var t=Je[e];return t||(e>=Je.length&&(Je.length=e+1),Je[e]=t=de.get(e)),I(de.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function tt(e){if(e instanceof ap||"unwind"==e)return F;p(1,e)}function rt(e,t,r,n){Ne("Assertion failed: "+U(e)+", at: "+[t?U(t):"unknown filename",r,n?U(n):"unknown function"])}function nt(e){return Cd(e+16)+16}function ot(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(e){W[this.ptr+4>>2]=e},this.get_type=function(){return W[this.ptr+4>>2]},this.set_destructor=function(e){W[this.ptr+8>>2]=e},this.get_destructor=function(){return W[this.ptr+8>>2]},this.set_refcount=function(e){W[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,Q[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=Q[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,Q[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=Q[this.ptr+13>>0]},this.init=function(e,t){this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=W[this.ptr>>2];W[this.ptr>>2]=e+1},this.release_ref=function(){var e=W[this.ptr>>2];return W[this.ptr>>2]=e-1,I(e>0),1===e}}function it(e,t,r){throw new ot(e).init(t,r),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch."}function at(e){return W[Ld()>>2]=e,e}var st={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=st.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=st.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(e){if("/"===e)return"/";var t=(e=(e=st.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return st.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return st.normalize(e.join("/"))},join2:function(e,t){return st.normalize(e+"/"+t)}};function ct(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){Ne("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")}}var ut={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:_t.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t="/"===n.charAt(0)}return(t?"/":"")+(e=st.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=ut.resolve(e).substr(1),t=ut.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var c=[];for(s=a;s<n.length;s++)c.push("..");return(c=c.concat(o.slice(a))).join("/")}},lt={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){lt.ttys[e]={input:[],output:[],ops:t},_t.registerDevice(e,lt.stream_ops)},stream_ops:{open:function(e){var t=lt.ttys[e.node.rdev];if(!t)throw new _t.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new _t.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new _t.ErrnoError(29)}if(void 0===s&&0===i)throw new _t.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new _t.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new _t.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=Ad(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(T(j(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(T(j(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(O(j(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(O(j(e.output,0)),e.output=[])}}};function dt(e,t){Z.fill(0,e,e+t)}function pt(e,t){return I(t,"alignment argument is required"),Math.ceil(e/t)*t}function ft(e){e=pt(e,65536);var t=Nd(65536,e);return t?(dt(t,e),t):0}var mt={ops_table:null,mount:function(e){return mt.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(_t.isBlkdev(r)||_t.isFIFO(r))throw new _t.ErrnoError(63);mt.ops_table||(mt.ops_table={dir:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr,lookup:mt.node_ops.lookup,mknod:mt.node_ops.mknod,rename:mt.node_ops.rename,unlink:mt.node_ops.unlink,rmdir:mt.node_ops.rmdir,readdir:mt.node_ops.readdir,symlink:mt.node_ops.symlink},stream:{llseek:mt.stream_ops.llseek}},file:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr},stream:{llseek:mt.stream_ops.llseek,read:mt.stream_ops.read,write:mt.stream_ops.write,allocate:mt.stream_ops.allocate,mmap:mt.stream_ops.mmap,msync:mt.stream_ops.msync}},link:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr,readlink:mt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr},stream:_t.chrdev_stream_ops}});var o=_t.createNode(e,t,r,n);return _t.isDir(o.mode)?(o.node_ops=mt.ops_table.dir.node,o.stream_ops=mt.ops_table.dir.stream,o.contents={}):_t.isFile(o.mode)?(o.node_ops=mt.ops_table.file.node,o.stream_ops=mt.ops_table.file.stream,o.usedBytes=0,o.contents=null):_t.isLink(o.mode)?(o.node_ops=mt.ops_table.link.node,o.stream_ops=mt.ops_table.link.stream):_t.isChrdev(o.mode)&&(o.node_ops=mt.ops_table.chrdev.node,o.stream_ops=mt.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=_t.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,_t.isDir(e.mode)?t.size=4096:_t.isFile(e.mode)?t.size=e.usedBytes:_t.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&mt.resizeFileStorage(e,t.size)},lookup:function(e,t){throw _t.genericErrors[44]},mknod:function(e,t,r,n){return mt.createNode(e,t,r,n)},rename:function(e,t,r){if(_t.isDir(e.mode)){var n;try{n=_t.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new _t.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=_t.lookupNode(e,t);for(var n in r.contents)throw new _t.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=mt.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!_t.isLink(e.mode))throw new _t.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(I(a>=0),a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write:function(e,t,r,n,o,i){if(I(!(t instanceof ArrayBuffer)),t.buffer===Q.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return I(0===o,"canOwn must imply no weird position inside the file"),a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(mt.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&_t.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new _t.ErrnoError(28);return n},allocate:function(e,t,r){mt.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o,i){if(0!==t)throw new _t.ErrnoError(28);if(!_t.isFile(e.node.mode))throw new _t.ErrnoError(43);var a,s,c=e.node.contents;if(2&i||c.buffer!==X){if((n>0||n+r<c.length)&&(c=c.subarray?c.subarray(n,n+r):Array.prototype.slice.call(c,n,n+r)),s=!0,!(a=ft(r)))throw new _t.ErrnoError(48);Q.set(c,a)}else s=!1,a=c.byteOffset;return{ptr:a,allocated:s}},msync:function(e,t,r,n,o){if(!_t.isFile(e.node.mode))throw new _t.ErrnoError(43);return 2&o||mt.stream_ops.write(e,t,0,n,r,!1),0}}};function gt(e,t,r,n){var o=n?"":Le("al "+e);_(e,(function(r){I(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&Ue(o)}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&je(o)}var ht={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Et={},_t={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=ut.resolve(_t.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===t[n]&&(t[n]=r[n]);if(t.recurse_count>8)throw new _t.ErrnoError(32);for(var o=st.normalizeArray(e.split("/").filter((e=>!!e)),!1),i=_t.root,a="/",s=0;s<o.length;s++){var c=s===o.length-1;if(c&&t.parent)break;if(i=_t.lookupNode(i,o[s]),a=st.join2(a,o[s]),_t.isMountpoint(i)&&(!c||c&&t.follow_mount)&&(i=i.mounted.root),!c||t.follow)for(var u=0;_t.isLink(i.mode);){var l=_t.readlink(a);if(a=ut.resolve(st.dirname(a),l),i=_t.lookupPath(a,{recurse_count:t.recurse_count}).node,u++>40)throw new _t.ErrnoError(32)}}return{path:a,node:i}},getPath:e=>{for(var t;;){if(_t.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%_t.nameTable.length},hashAddNode:e=>{var t=_t.hashName(e.parent.id,e.name);e.name_next=_t.nameTable[t],_t.nameTable[t]=e},hashRemoveNode:e=>{var t=_t.hashName(e.parent.id,e.name);if(_t.nameTable[t]===e)_t.nameTable[t]=e.name_next;else for(var r=_t.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=_t.mayLookup(e);if(r)throw new _t.ErrnoError(r,e);for(var n=_t.hashName(e.id,t),o=_t.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return _t.lookup(e,t)},createNode:(e,t,r,n)=>{I("object"==typeof e);var o=new _t.FSNode(e,t,r,n);return _t.hashAddNode(o),o},destroyNode:e=>{_t.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=_t.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>_t.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>_t.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{return _t.lookupNode(e,t),20}catch(e){}return _t.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=_t.lookupNode(e,t)}catch(e){return e.errno}var o=_t.nodePermissions(e,"wx");if(o)return o;if(r){if(!_t.isDir(n.mode))return 54;if(_t.isRoot(n)||_t.getPath(n)===_t.cwd())return 10}else if(_t.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?_t.isLink(e.mode)?32:_t.isDir(e.mode)&&("r"!==_t.flagsToPermissionString(t)||512&t)?31:_t.nodePermissions(e,_t.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=_t.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!_t.streams[r])return r;throw new _t.ErrnoError(33)},getStream:e=>_t.streams[e],createStream:(e,t,r)=>{_t.FSStream||(_t.FSStream=function(){},_t.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),e=Object.assign(new _t.FSStream,e);var n=_t.nextfd(t,r);return e.fd=n,_t.streams[n]=e,e},closeStream:e=>{_t.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=_t.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new _t.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{_t.devices[e]={stream_ops:t}},getDevice:e=>_t.devices[e],getMounts:e=>{for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),_t.syncFSRequests++,_t.syncFSRequests>1&&O("warning: "+_t.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=_t.getMounts(_t.root.mount),n=0;function o(e){return I(_t.syncFSRequests>0),_t.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:(e,t,r)=>{if("string"==typeof e)throw e;var n,o="/"===r,i=!r;if(o&&_t.root)throw new _t.ErrnoError(10);if(!o&&!i){var a=_t.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,_t.isMountpoint(n))throw new _t.ErrnoError(10);if(!_t.isDir(n.mode))throw new _t.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,o?_t.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:e=>{var t=_t.lookupPath(e,{follow_mount:!1});if(!_t.isMountpoint(t.node))throw new _t.ErrnoError(28);var r=t.node,n=r.mounted,o=_t.getMounts(n);Object.keys(_t.nameTable).forEach((e=>{for(var t=_t.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&_t.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);I(-1!==i),r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=_t.lookupPath(e,{parent:!0}).node,o=st.basename(e);if(!o||"."===o||".."===o)throw new _t.ErrnoError(28);var i=_t.mayCreate(n,o);if(i)throw new _t.ErrnoError(i);if(!n.node_ops.mknod)throw new _t.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,_t.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,_t.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{_t.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,_t.mknod(e,t,r)),symlink:(e,t)=>{if(!ut.resolve(e))throw new _t.ErrnoError(44);var r=_t.lookupPath(t,{parent:!0}).node;if(!r)throw new _t.ErrnoError(44);var n=st.basename(t),o=_t.mayCreate(r,n);if(o)throw new _t.ErrnoError(o);if(!r.node_ops.symlink)throw new _t.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,o=st.dirname(e),i=st.dirname(t),a=st.basename(e),s=st.basename(t);if(r=_t.lookupPath(e,{parent:!0}).node,n=_t.lookupPath(t,{parent:!0}).node,!r||!n)throw new _t.ErrnoError(44);if(r.mount!==n.mount)throw new _t.ErrnoError(75);var c,u=_t.lookupNode(r,a),l=ut.relative(e,i);if("."!==l.charAt(0))throw new _t.ErrnoError(28);if("."!==(l=ut.relative(t,o)).charAt(0))throw new _t.ErrnoError(55);try{c=_t.lookupNode(n,s)}catch(e){}if(u!==c){var d=_t.isDir(u.mode),p=_t.mayDelete(r,a,d);if(p)throw new _t.ErrnoError(p);if(p=c?_t.mayDelete(n,s,d):_t.mayCreate(n,s))throw new _t.ErrnoError(p);if(!r.node_ops.rename)throw new _t.ErrnoError(63);if(_t.isMountpoint(u)||c&&_t.isMountpoint(c))throw new _t.ErrnoError(10);if(n!==r&&(p=_t.nodePermissions(r,"w")))throw new _t.ErrnoError(p);_t.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(e){throw e}finally{_t.hashAddNode(u)}}},rmdir:e=>{var t=_t.lookupPath(e,{parent:!0}).node,r=st.basename(e),n=_t.lookupNode(t,r),o=_t.mayDelete(t,r,!0);if(o)throw new _t.ErrnoError(o);if(!t.node_ops.rmdir)throw new _t.ErrnoError(63);if(_t.isMountpoint(n))throw new _t.ErrnoError(10);t.node_ops.rmdir(t,r),_t.destroyNode(n)},readdir:e=>{var t=_t.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new _t.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=_t.lookupPath(e,{parent:!0}).node;if(!t)throw new _t.ErrnoError(44);var r=st.basename(e),n=_t.lookupNode(t,r),o=_t.mayDelete(t,r,!1);if(o)throw new _t.ErrnoError(o);if(!t.node_ops.unlink)throw new _t.ErrnoError(63);if(_t.isMountpoint(n))throw new _t.ErrnoError(10);t.node_ops.unlink(t,r),_t.destroyNode(n)},readlink:e=>{var t=_t.lookupPath(e).node;if(!t)throw new _t.ErrnoError(44);if(!t.node_ops.readlink)throw new _t.ErrnoError(28);return ut.resolve(_t.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=_t.lookupPath(e,{follow:!t}).node;if(!r)throw new _t.ErrnoError(44);if(!r.node_ops.getattr)throw new _t.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>_t.stat(e,!0),chmod:(e,t,r)=>{var n;if(!(n="string"==typeof e?_t.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new _t.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{_t.chmod(e,t,!0)},fchmod:(e,t)=>{var r=_t.getStream(e);if(!r)throw new _t.ErrnoError(8);_t.chmod(r.node,t)},chown:(e,t,r,n)=>{var o;if(!(o="string"==typeof e?_t.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new _t.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,t,r)=>{_t.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=_t.getStream(e);if(!n)throw new _t.ErrnoError(8);_t.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new _t.ErrnoError(28);var r;if(!(r="string"==typeof e?_t.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new _t.ErrnoError(63);if(_t.isDir(r.mode))throw new _t.ErrnoError(31);if(!_t.isFile(r.mode))throw new _t.ErrnoError(28);var n=_t.nodePermissions(r,"w");if(n)throw new _t.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=_t.getStream(e);if(!r)throw new _t.ErrnoError(8);if(0==(2097155&r.flags))throw new _t.ErrnoError(28);_t.truncate(r.node,t)},utime:(e,t,r)=>{var n=_t.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:(e,t,r,n,o)=>{if(""===e)throw new _t.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?_t.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)a=e;else{e=st.normalize(e);try{a=_t.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new _t.ErrnoError(20)}else a=_t.mknod(e,r,0),s=!0;if(!a)throw new _t.ErrnoError(44);if(_t.isChrdev(a.mode)&&(t&=-513),65536&t&&!_t.isDir(a.mode))throw new _t.ErrnoError(54);if(!s){var c=_t.mayOpen(a,t);if(c)throw new _t.ErrnoError(c)}512&t&&_t.truncate(a,0),t&=-131713;var u=_t.createStream({node:a,path:_t.getPath(a),flags:t,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,o);return u.stream_ops.open&&u.stream_ops.open(u),!i.logReadFiles||1&t||(_t.readFiles||(_t.readFiles={}),e in _t.readFiles||(_t.readFiles[e]=1)),u},close:e=>{if(_t.isClosed(e))throw new _t.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{_t.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(_t.isClosed(e))throw new _t.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new _t.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new _t.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:(e,t,r,n,o)=>{if(n<0||o<0)throw new _t.ErrnoError(28);if(_t.isClosed(e))throw new _t.ErrnoError(8);if(1==(2097155&e.flags))throw new _t.ErrnoError(8);if(_t.isDir(e.node.mode))throw new _t.ErrnoError(31);if(!e.stream_ops.read)throw new _t.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new _t.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:(e,t,r,n,o,i)=>{if(n<0||o<0)throw new _t.ErrnoError(28);if(_t.isClosed(e))throw new _t.ErrnoError(8);if(0==(2097155&e.flags))throw new _t.ErrnoError(8);if(_t.isDir(e.node.mode))throw new _t.ErrnoError(31);if(!e.stream_ops.write)throw new _t.ErrnoError(28);e.seekable&&1024&e.flags&&_t.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new _t.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=s),s},allocate:(e,t,r)=>{if(_t.isClosed(e))throw new _t.ErrnoError(8);if(t<0||r<=0)throw new _t.ErrnoError(28);if(0==(2097155&e.flags))throw new _t.ErrnoError(8);if(!_t.isFile(e.node.mode)&&!_t.isDir(e.node.mode))throw new _t.ErrnoError(43);if(!e.stream_ops.allocate)throw new _t.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:(e,t,r,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new _t.ErrnoError(2);if(1==(2097155&e.flags))throw new _t.ErrnoError(2);if(!e.stream_ops.mmap)throw new _t.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o,i)},msync:(e,t,r,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0,munmap:e=>0,ioctl:(e,t,r)=>{if(!e.stream_ops.ioctl)throw new _t.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=_t.open(e,t.flags),o=_t.stat(e).size,i=new Uint8Array(o);return _t.read(n,i,0,o,0),"utf8"===t.encoding?r=j(i,0):"binary"===t.encoding&&(r=i),_t.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=_t.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(B(t)+1),i=N(t,o,0,o.length);_t.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");_t.write(n,t,0,t.byteLength,void 0,r.canOwn)}_t.close(n)},cwd:()=>_t.currentPath,chdir:e=>{var t=_t.lookupPath(e,{follow:!0});if(null===t.node)throw new _t.ErrnoError(44);if(!_t.isDir(t.node.mode))throw new _t.ErrnoError(54);var r=_t.nodePermissions(t.node,"x");if(r)throw new _t.ErrnoError(r);_t.currentPath=t.path},createDefaultDirectories:()=>{_t.mkdir("/tmp"),_t.mkdir("/home"),_t.mkdir("/home/web_user")},createDefaultDevices:()=>{_t.mkdir("/dev"),_t.registerDevice(_t.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),_t.mkdev("/dev/null",_t.makedev(1,3)),lt.register(_t.makedev(5,0),lt.default_tty_ops),lt.register(_t.makedev(6,0),lt.default_tty1_ops),_t.mkdev("/dev/tty",_t.makedev(5,0)),_t.mkdev("/dev/tty1",_t.makedev(6,0));var e=ct();_t.createDevice("/dev","random",e),_t.createDevice("/dev","urandom",e),_t.mkdir("/dev/shm"),_t.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{_t.mkdir("/proc");var e=_t.mkdir("/proc/self");_t.mkdir("/proc/self/fd"),_t.mount({mount:()=>{var t=_t.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=_t.getStream(r);if(!n)throw new _t.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{i.stdin?_t.createDevice("/dev","stdin",i.stdin):_t.symlink("/dev/tty","/dev/stdin"),i.stdout?_t.createDevice("/dev","stdout",null,i.stdout):_t.symlink("/dev/tty","/dev/stdout"),i.stderr?_t.createDevice("/dev","stderr",null,i.stderr):_t.symlink("/dev/tty1","/dev/stderr");var e=_t.open("/dev/stdin",0),t=_t.open("/dev/stdout",1),r=_t.open("/dev/stderr",1);I(0===e.fd,"invalid handle for stdin ("+e.fd+")"),I(1===t.fd,"invalid handle for stdout ("+t.fd+")"),I(2===r.fd,"invalid handle for stderr ("+r.fd+")")},ensureErrnoError:()=>{_t.ErrnoError||(_t.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,Et)if(Et[t]===e){this.code=t;break}},this.setErrno(e),this.message=ht[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Ke(this.stack))},_t.ErrnoError.prototype=new Error,_t.ErrnoError.prototype.constructor=_t.ErrnoError,[44].forEach((e=>{_t.genericErrors[e]=new _t.ErrnoError(e),_t.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{_t.ensureErrnoError(),_t.nameTable=new Array(4096),_t.mount(mt,{},"/"),_t.createDefaultDirectories(),_t.createDefaultDevices(),_t.createSpecialDirectories(),_t.filesystems={MEMFS:mt}},init:(e,t,r)=>{I(!_t.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),_t.init.initialized=!0,_t.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,_t.createStandardStreams()},quit:()=>{_t.init.initialized=!1,Ud();for(var e=0;e<_t.streams.length;e++){var t=_t.streams[e];t&&_t.close(t)}},getMode:(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=_t.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=_t.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=_t.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=st.basename(e),n=_t.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:(e,t,r,n)=>{e="string"==typeof e?e:_t.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=st.join2(e,i);try{_t.mkdir(a)}catch(e){}e=a}}return a},createFile:(e,t,r,n,o)=>{var i=st.join2("string"==typeof e?e:_t.getPath(e),t),a=_t.getMode(n,o);return _t.create(i,a)},createDataFile:(e,t,r,n,o,i)=>{var a=t;e&&(e="string"==typeof e?e:_t.getPath(e),a=t?st.join2(e,t):e);var s=_t.getMode(n,o),c=_t.create(a,s);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,d=r.length;l<d;++l)u[l]=r.charCodeAt(l);r=u}_t.chmod(c,146|s);var p=_t.open(c,577);_t.write(p,r,0,r.length,0,i),_t.close(p),_t.chmod(c,s)}return c},createDevice:(e,t,r,n)=>{var o=st.join2("string"==typeof e?e:_t.getPath(e),t),i=_t.getMode(!!r,!!n);_t.createDevice.major||(_t.createDevice.major=64);var a=_t.makedev(_t.createDevice.major++,0);return _t.registerDevice(a,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,o,i)=>{for(var a=0,s=0;s<o;s++){var c;try{c=r()}catch(e){throw new _t.ErrnoError(29)}if(void 0===c&&0===a)throw new _t.ErrnoError(6);if(null==c)break;a++,t[n+s]=c}return a&&(e.node.timestamp=Date.now()),a},write:(e,t,r,o,i)=>{for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new _t.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),_t.mkdev(o,i,a)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!E)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Ad(E(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new _t.ErrnoError(29)}},createLazyFile:(e,t,r,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((e=>{var t=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Ad(o.responseText||"",!0)})(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,T("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!m)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var c=_t.createFile(e,t,s,n,o);s.contents?c.contents=s.contents:s.url&&(c.contents=null,c.url=s.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];u[e]=function(){return _t.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>{_t.forceLoadFile(c);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(I(a>=0),i.slice)for(var s=0;s<a;s++)t[r+s]=i[o+s];else for(s=0;s<a;s++)t[r+s]=i.get(o+s);return a},c.stream_ops=u,c},createPreloadedFile:(e,t,r,n,o,i,a,s,c,u)=>{var l=t?ut.resolve(st.join2(e,t)):e,d=Le("cp "+l);function p(r){function p(r){u&&u(),s||_t.createDataFile(e,t,r,n,o,c),i&&i(),Ue(d)}To.handledByPreloadPlugin(r,l,p,(()=>{a&&a(),Ue(d)}))||p(r)}je(d),"string"==typeof r?gt(r,(e=>p(e)),a):p(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=_t.indexedDB();try{var o=n.open(_t.DB_NAME(),_t.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=()=>{T("creating db"),o.result.createObjectStore(_t.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([_t.DB_STORE_NAME],"readwrite"),i=n.objectStore(_t.DB_STORE_NAME),a=0,s=0,c=e.length;function u(){0==s?t():r()}e.forEach((e=>{var t=i.put(_t.analyzePath(e).object.contents,e);t.onsuccess=()=>{++a+s==c&&u()},t.onerror=()=>{s++,a+s==c&&u()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=_t.indexedDB();try{var o=n.open(_t.DB_NAME(),_t.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([_t.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(_t.DB_STORE_NAME),s=0,c=0,u=e.length;function l(){0==c?t():r()}e.forEach((e=>{var t=a.get(e);t.onsuccess=()=>{_t.analyzePath(e).exists&&_t.unlink(e),_t.createDataFile(st.dirname(e),st.basename(e),t.result,!0,!0,!0),++s+c==u&&l()},t.onerror=()=>{c++,s+c==u&&l()}})),i.onerror=r},o.onerror=r},absolutePath:()=>{Ne("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{Ne("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{Ne("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{Ne("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{Ne("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{Ne("FS.standardizePath has been removed; use PATH.normalize instead")}},yt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if("/"===t[0])return t;var n;if(-100===e)n=_t.cwd();else{var o=_t.getStream(e);if(!o)throw new _t.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new _t.ErrnoError(44);return n}return st.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&st.normalize(t)!==st.normalize(_t.getPath(e.node)))return-54;throw e}return W[r>>2]=n.dev,W[r+4>>2]=0,W[r+8>>2]=n.ino,W[r+12>>2]=n.mode,W[r+16>>2]=n.nlink,W[r+20>>2]=n.uid,W[r+24>>2]=n.gid,W[r+28>>2]=n.rdev,W[r+32>>2]=0,Xe=[n.size>>>0,(Be=n.size,+Math.abs(Be)>=1?Be>0?(0|Math.min(+Math.floor(Be/4294967296),4294967295))>>>0:~~+Math.ceil((Be-+(~~Be>>>0))/4294967296)>>>0:0)],W[r+40>>2]=Xe[0],W[r+44>>2]=Xe[1],W[r+48>>2]=4096,W[r+52>>2]=n.blocks,W[r+56>>2]=n.atime.getTime()/1e3|0,W[r+60>>2]=0,W[r+64>>2]=n.mtime.getTime()/1e3|0,W[r+68>>2]=0,W[r+72>>2]=n.ctime.getTime()/1e3|0,W[r+76>>2]=0,Xe=[n.ino>>>0,(Be=n.ino,+Math.abs(Be)>=1?Be>0?(0|Math.min(+Math.floor(Be/4294967296),4294967295))>>>0:~~+Math.ceil((Be-+(~~Be>>>0))/4294967296)>>>0:0)],W[r+80>>2]=Xe[0],W[r+84>>2]=Xe[1],0},doMsync:function(e,t,r,n,o){var i=Z.slice(e,e+r);_t.msync(t,i,o,r,n)},doMkdir:function(e,t){return"/"===(e=st.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),_t.mkdir(e,t,0),0},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return _t.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=_t.readlink(e),o=Math.min(r,B(n)),i=Q[t+o];return H(n,t,r+1),Q[t+o]=i,o},doAccess:function(e,t){if(-8&t)return-28;var r=_t.lookupPath(e,{follow:!0}).node;if(!r)return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&_t.nodePermissions(r,n)?-2:0},doDup:function(e,t,r){var n=_t.getStream(r);return n&&_t.close(n),_t.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=W[t+8*i>>2],s=W[t+(8*i+4)>>2],c=_t.read(e,Q,a,s,n);if(c<0)return-1;if(o+=c,c<s)break}return o},doWritev:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=W[t+8*i>>2],s=W[t+(8*i+4)>>2],c=_t.write(e,Q,a,s,n);if(c<0)return-1;o+=c}return o},varargs:void 0,get:function(){return I(null!=yt.varargs),yt.varargs+=4,W[yt.varargs-4>>2]},getStr:function(e){return U(e)},getStreamFromFD:function(e){var t=_t.getStream(e);if(!t)throw new _t.ErrnoError(8);return t},get64:function(e,t){return I(e>=0?0===t:-1===t),e}};function vt(e,t,r){yt.varargs=r;try{var n=yt.getStreamFromFD(e);switch(t){case 0:return(o=yt.get())<0?-28:_t.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=yt.get();return n.flags|=o,0;case 5:return o=yt.get(),G[o+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return at(28),-1;default:return-28}}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return-e.errno}}function bt(e,t){try{var r=yt.getStreamFromFD(e);return yt.doStat(_t.stat,r.path,t)}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return-e.errno}}function wt(e,t,r,n){try{t=yt.getStr(t);var o=256&n,i=4096&n;return I(!(n&=-4353),n),t=yt.calculateAt(e,t,i),yt.doStat(o?_t.lstat:_t.stat,t,r)}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return-e.errno}}function Tt(e,t,r){try{var n=yt.getStreamFromFD(e);n.getdents||(n.getdents=_t.readdir(n.path));for(var o=280,i=0,a=_t.llseek(n,0,1),s=Math.floor(a/o);s<n.getdents.length&&i+o<=r;){var c,u,l=n.getdents[s];if("."===l)c=n.node.id,u=4;else if(".."===l)c=_t.lookupPath(n.path,{parent:!0}).node.id,u=4;else{var d=_t.lookupNode(n.node,l);c=d.id,u=_t.isChrdev(d.mode)?2:_t.isDir(d.mode)?4:_t.isLink(d.mode)?10:8}I(c),Xe=[c>>>0,(Be=c,+Math.abs(Be)>=1?Be>0?(0|Math.min(+Math.floor(Be/4294967296),4294967295))>>>0:~~+Math.ceil((Be-+(~~Be>>>0))/4294967296)>>>0:0)],W[t+i>>2]=Xe[0],W[t+i+4>>2]=Xe[1],Xe=[(s+1)*o>>>0,(Be=(s+1)*o,+Math.abs(Be)>=1?Be>0?(0|Math.min(+Math.floor(Be/4294967296),4294967295))>>>0:~~+Math.ceil((Be-+(~~Be>>>0))/4294967296)>>>0:0)],W[t+i+8>>2]=Xe[0],W[t+i+12>>2]=Xe[1],G[t+i+16>>1]=280,Q[t+i+18>>0]=u,H(l,t+i+19,256),i+=o,s+=1}return _t.llseek(n,s*o,0),i}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return-e.errno}}function Ot(e,t,r){yt.varargs=r;try{var n=yt.getStreamFromFD(e);switch(t){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=yt.get();return W[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=yt.get(),_t.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:Ne("bad ioctl syscall "+t)}}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return-e.errno}}function Pt(e,t){try{return e=yt.getStr(e),yt.doStat(_t.lstat,e,t)}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return-e.errno}}function Dt(e,t,r){yt.varargs=r;try{var n=yt.getStr(e),o=r?yt.get():0;return _t.open(n,t,o).fd}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return-e.errno}}function xt(e,t){try{return e=yt.getStr(e),yt.doStat(_t.stat,e,t)}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return-e.errno}}function St(e,t){Ne("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Rt(e,t){Ne("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}var Mt={};function At(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function kt(e){return this.fromWireType(V[e>>2])}var Ft={},Ct={},It={},Lt=48,jt=57;function Ut(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Lt&&t<=jt?"_"+e:e}function Nt(e,t){return e=Ut(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Ht(e,t){var r=Nt(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var Bt=void 0;function Xt(e){throw new Bt(e)}function Qt(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Xt("Mismatched type converter count");for(var o=0;o<e.length;++o)er(e[o],n[o])}e.forEach((function(e){It[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){Ct.hasOwnProperty(e)?o[t]=Ct[e]:(i.push(e),Ft.hasOwnProperty(e)||(Ft[e]=[]),Ft[e].push((function(){o[t]=Ct[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Zt(e){var t=Mt[e];delete Mt[e];var r=t.elements,n=r.length,o=r.map((function(e){return e.getterReturnType})).concat(r.map((function(e){return e.setterArgumentType}))),i=t.rawConstructor,a=t.rawDestructor;Qt([e],o,(function(e){return r.forEach((function(t,r){var o=e[r],i=t.getter,a=t.getterContext,s=e[r+n],c=t.setter,u=t.setterContext;t.read=e=>o.fromWireType(i(a,e)),t.write=(e,t)=>{var r=[];c(u,e,s.toWireType(r,t)),At(r)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(n),o=0;o<n;++o)t[o]=r[o].read(e);return a(e),t},toWireType:function(e,o){if(n!==o.length)throw new TypeError("Incorrect number of tuple elements for "+t.name+": expected="+n+", actual="+o.length);for(var s=i(),c=0;c<n;++c)r[c].write(s,o[c]);return null!==e&&e.push(a,s),s},argPackAdvance:8,readValueFromPointer:kt,destructorFunction:a}]}))}var Gt={};function qt(e){var t=Gt[e];delete Gt[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;Qt([e],o.map((function(e){return e.getterReturnType})).concat(o.map((function(e){return e.setterArgumentType}))),(function(e){var i={};return o.forEach((function(t,r){var n=t.fieldName,a=e[r],s=t.getter,c=t.getterContext,u=e[r+o.length],l=t.setter,d=t.setterContext;i[n]={read:function(e){return a.fromWireType(s(c,e))},write:function(e,t){var r=[];l(d,e,u.toWireType(r,t)),At(r)}}})),[{name:t.name,fromWireType:function(e){var t={};for(var r in i)t[r]=i[r].read(e);return n(e),t},toWireType:function(e,t){for(var o in i)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,t[o]);return null!==e&&e.push(n,a),a},argPackAdvance:8,readValueFromPointer:kt,destructorFunction:n}]}))}function Wt(e,t,r,n,o){}function Vt(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function zt(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);$t=e}var $t=void 0;function Yt(e){for(var t="",r=e;Z[r];)t+=$t[Z[r++]];return t}var Kt=void 0;function Jt(e){throw new Kt(e)}function er(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||Jt('type "'+n+'" must have a positive integer typeid pointer'),Ct.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Jt("Cannot register type '"+n+"' twice")}if(Ct[e]=t,delete It[e],Ft.hasOwnProperty(e)){var o=Ft[e];delete Ft[e],o.forEach((function(e){e()}))}}function tr(e,t,r,n,o){var i=Vt(r);er(e,{name:t=Yt(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=Q;else if(2===r)n=G;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=W}return this.fromWireType(n[e>>i])},destructorFunction:null})}function rr(e){if(!(this instanceof Rr))return!1;if(!(e instanceof Rr))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o}function nr(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function or(e){Jt(e.$$.ptrType.registeredClass.name+" instance already deleted")}var ir=!1;function ar(e){}function sr(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function cr(e){e.count.value-=1,0===e.count.value&&sr(e)}function ur(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=ur(e,t,r.baseClass);return null===n?null:r.downcast(n)}var lr={};function dr(){return Object.keys(_r).length}function pr(){var e=[];for(var t in _r)_r.hasOwnProperty(t)&&e.push(_r[t]);return e}var fr=[];function mr(){for(;fr.length;){var e=fr.pop();e.$$.deleteScheduled=!1,e.delete()}}var gr=void 0;function hr(e){gr=e,fr.length&&gr&&gr(mr)}function Er(){i.getInheritedInstanceCount=dr,i.getLiveInheritedInstances=pr,i.flushPendingDeletes=mr,i.setDelayFunction=hr}var _r={};function yr(e,t){for(void 0===t&&Jt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function vr(e,t){return t=yr(e,t),_r[t]}function br(e,t){return t.ptrType&&t.ptr||Xt("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Xt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Tr(Object.create(e,{$$:{value:t}}))}function wr(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=vr(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?br(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):br(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=lr[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=ur(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?br(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):br(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function Tr(e){return"undefined"==typeof FinalizationRegistry?(Tr=e=>e,e):(ir=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),cr(e.$$)})),ar=e=>ir.unregister(e),(Tr=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t},n=t.ptrType.registeredClass;r.leakWarning=new Error("Embind found a leaked C++ instance "+n.name+" <0x"+t.ptr.toString(16)+">.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated"),"captureStackTrace"in Error&&Error.captureStackTrace(r.leakWarning,wr),ir.register(e,r,e)}return e})(e))}function Or(){if(this.$$.ptr||or(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Tr(Object.create(Object.getPrototypeOf(this),{$$:{value:nr(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Pr(){this.$$.ptr||or(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Jt("Object already scheduled for deletion"),ar(this),cr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Dr(){return!this.$$.ptr}function xr(){return this.$$.ptr||or(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Jt("Object already scheduled for deletion"),fr.push(this),1===fr.length&&gr&&gr(mr),this.$$.deleteScheduled=!0,this}function Sr(){Rr.prototype.isAliasOf=rr,Rr.prototype.clone=Or,Rr.prototype.delete=Pr,Rr.prototype.isDeleted=Dr,Rr.prototype.deleteLater=xr}function Rr(){}function Mr(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Jt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function Ar(e,t,r){i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&Jt("Cannot register public name '"+e+"' twice"),Mr(i,e,e),i.hasOwnProperty(r)&&Jt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))}function kr(e,t,r,n,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Fr(e,t,r){for(;t!==r;)t.upcast||Jt("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Cr(e,t){if(null===t)return this.isReference&&Jt("null is not a valid "+this.name),0;t.$$||Jt('Cannot pass "'+gn(t)+'" as a '+this.name),t.$$.ptr||Jt("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Fr(t.$$.ptr,r,this.registeredClass)}function Ir(e,t){var r;if(null===t)return this.isReference&&Jt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Jt('Cannot pass "'+gn(t)+'" as a '+this.name),t.$$.ptr||Jt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&Jt("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=Fr(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Jt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Jt("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,un.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:Jt("Unsupporting sharing policy")}return r}function Lr(e,t){if(null===t)return this.isReference&&Jt("null is not a valid "+this.name),0;t.$$||Jt('Cannot pass "'+gn(t)+'" as a '+this.name),t.$$.ptr||Jt("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&Jt("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Fr(t.$$.ptr,r,this.registeredClass)}function jr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Ur(e){this.rawDestructor&&this.rawDestructor(e)}function Nr(e){null!==e&&e.delete()}function Hr(){Br.prototype.getPointee=jr,Br.prototype.destructor=Ur,Br.prototype.argPackAdvance=8,Br.prototype.readValueFromPointer=kt,Br.prototype.deleteObject=Nr,Br.prototype.fromWireType=wr}function Br(e,t,r,n,o,i,a,s,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,o||void 0!==t.baseClass?this.toWireType=Ir:n?(this.toWireType=Cr,this.destructorFunction=null):(this.toWireType=Lr,this.destructorFunction=null)}function Xr(e,t,r){i.hasOwnProperty(e)||Xt("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)}function Qr(e,t,r){I("dynCall_"+e in i,"bad function pointer type - no table for sig '"+e+"'"),r&&r.length?I(r.length===e.substring(1).replace(/j/g,"--").length):I(1==e.length);var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)}function Zr(e,t,r){return e.includes("j")?Qr(e,t,r):(I(et(t),"missing table entry in dynCall: "+t),et(t).apply(null,r))}function Gr(e,t){I(e.includes("j"),"getDynCaller should only be called with i64 sigs");var r=[];return function(){return r.length=0,Object.assign(r,arguments),Zr(e,t,r)}}function qr(e,t){var r=(e=Yt(e)).includes("j")?Gr(e,t):et(t);return"function"!=typeof r&&Jt("unknown function pointer with signature "+e+": "+t),r}var Wr=void 0;function Vr(e){var t=jd(e),r=Yt(t);return Id(t),r}function zr(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||Ct[t]||(It[t]?It[t].forEach(e):(r.push(t),n[t]=!0))})),new Wr(e+": "+r.map(Vr).join([", "]))}function $r(e,t,r,n,o,i,a,s,c,u,l,d,p){l=Yt(l),i=qr(o,i),s&&(s=qr(a,s)),u&&(u=qr(c,u)),p=qr(d,p);var f=Ut(l);Ar(f,(function(){zr("Cannot construct "+l+" due to unbound types",[n])})),Qt([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:Rr.prototype;var a=Nt(f,(function(){if(Object.getPrototypeOf(this)!==c)throw new Kt("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Kt(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Kt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),c=Object.create(o,{constructor:{value:a}});a.prototype=c;var d=new kr(l,a,c,p,r,i,s,u),m=new Br(l,d,!0,!1,!1),g=new Br(l+"*",d,!1,!1,!1),h=new Br(l+" const*",d,!1,!0,!1);return lr[e]={pointerType:g,constPointerType:h},Xr(f,a),[m,g,h]}))}function Yr(e,t){for(var r=[],n=0;n<e;n++)r.push(W[(t>>2)+n]);return r}function Kr(e,t,r,n,o,i){I(t>0);var a=Yr(t,r);o=qr(n,o),Qt([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Kt("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.registeredClass.constructor_body[t-1]=()=>{zr("Cannot construct "+e.name+" due to unbound types",a)},Qt([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=en(r,n,null,o,i),[]})),[]}))}function Jr(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Nt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function en(e,t,r,n,o){var i=t.length;i<2&&Jt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){s=!0;break}var u="void"!==t[0].name,l="",d="";for(c=0;c<i-2;++c)l+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var p="return function "+Ut(e)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var f=s?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[Jt,n,o,At,t[0],t[1]];for(a&&(p+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<i-2;++c)p+="var arg"+c+"Wired = argType"+c+".toWireType("+f+", arg"+c+"); // "+t[c+2].name+"\n",m.push("argType"+c),g.push(t[c+2]);if(a&&(d="thisWired"+(d.length>0?", ":"")+d),p+=(u?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)p+="runDestructors(destructors);\n";else for(c=a?1:2;c<t.length;++c){var h=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(p+=h+"_dtor("+h+"); // "+t[c].name+"\n",m.push(h+"_dtor"),g.push(t[c].destructorFunction))}return u&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",m.push(p),Jr(Function,m).apply(null,g)}function tn(e,t,r,n,o,i,a,s){var c=Yr(r,n);t=Yt(t),i=qr(o,i),Qt([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){zr("Cannot call "+n+" due to unbound types",c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,l=u[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===r-2?(o.argCount=r-2,o.className=e.name,u[t]=o):(Mr(u,t,n),u[t].overloadTable[r-2]=o),Qt([],c,(function(o){var s=en(n,o,e,i,a);return void 0===u[t].overloadTable?(s.argCount=r-2,u[t]=s):u[t].overloadTable[r-2]=s,[]})),[]}))}var rn=[],nn=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function on(e){e>4&&0==--nn[e].refcount&&(nn[e]=void 0,rn.push(e))}function an(){for(var e=0,t=5;t<nn.length;++t)void 0!==nn[t]&&++e;return e}function sn(){for(var e=5;e<nn.length;++e)if(void 0!==nn[e])return nn[e];return null}function cn(){i.count_emval_handles=an,i.get_first_emval=sn}var un={toValue:function(e){return e||Jt("Cannot use deleted val. handle = "+e),nn[e].value},toHandle:function(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=rn.length?rn.pop():nn.length;return nn[t]={refcount:1,value:e},t}}};function ln(e,t){er(e,{name:t=Yt(t),fromWireType:function(e){var t=un.toValue(e);return on(e),t},toWireType:function(e,t){return un.toHandle(t)},argPackAdvance:8,readValueFromPointer:kt,destructorFunction:null})}function dn(e,t,r){switch(t){case 0:return function(e){var t=r?Q:Z;return this.fromWireType(t[e])};case 1:return function(e){var t=r?G:q;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?W:V;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function pn(e,t,r,n){var o=Vt(r);function i(){}t=Yt(t),i.values={},er(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:dn(t,o,n),destructorFunction:null}),Ar(t,i)}function fn(e,t){var r=Ct[e];return void 0===r&&Jt(t+" has unknown type "+Vr(e)),r}function mn(e,t,r){var n=fn(e,"enum");t=Yt(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Nt(n.name+"_"+t,(function(){}))}});o.values[r]=i,o[t]=i}function gn(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function hn(e,t){switch(t){case 2:return function(e){return this.fromWireType(z[e>>2])};case 3:return function(e){return this.fromWireType($[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function En(e,t,r){var n=Vt(r);er(e,{name:t=Yt(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+gn(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:hn(t,n),destructorFunction:null})}function _n(e,t,r,n,o,i){var a=Yr(t,r);e=Yt(e),o=qr(n,o),Ar(e,(function(){zr("Cannot call "+e+" due to unbound types",a)}),t-1),Qt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Xr(e,en(e,n,null,o,i),t-1),[]}))}function yn(e,t,r){switch(t){case 0:return r?function(e){return Q[e]}:function(e){return Z[e]};case 1:return r?function(e){return G[e>>1]}:function(e){return q[e>>1]};case 2:return r?function(e){return W[e>>2]}:function(e){return V[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function vn(e,t,r,n,o){t=Yt(t),-1===o&&(o=4294967295);var i=Vt(r),a=e=>e;if(0===n){var s=32-8*r;a=e=>e<<s>>>s}var c=t.includes("unsigned"),u=(e,r)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+gn(e)+'" to '+r);if(e<n||e>o)throw new TypeError('Passing a number "'+gn(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!")};er(e,{name:t,fromWireType:a,toWireType:c?function(e,t){return u(t,this.name),t>>>0}:function(e,t){return u(t,this.name),t},argPackAdvance:8,readValueFromPointer:yn(t,i,0!==n),destructorFunction:null})}function bn(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=V,r=t[e>>=2],o=t[e+1];return new n(X,o,r)}er(e,{name:r=Yt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function wn(e,t,r,n,o,i,a,s,c,u,l,d){r=Yt(r),i=qr(o,i),s=qr(a,s),u=qr(c,u),d=qr(l,d),Qt([e],[t],(function(e){return e=e[0],[new Br(r,e.registeredClass,!1,!1,!0,e,n,i,s,u,d)]}))}function Tn(e,t){var r="std::string"===(t=Yt(t));er(e,{name:t,fromWireType:function(e){var t,n=V[e>>2];if(r)for(var o=e+4,i=0;i<=n;++i){var a=e+4+i;if(i==n||0==Z[a]){var s=U(o,a-o);void 0===t?t=s:(t+=String.fromCharCode(0),t+=s),o=a+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(Z[e+4+i]);t=c.join("")}return Id(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Jt("Cannot pass non-string to std::string");var o=(r&&n?()=>B(t):()=>t.length)(),i=Cd(4+o+1);if(V[i>>2]=o,r&&n)H(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=t.charCodeAt(a);s>255&&(Id(i),Jt("String has UTF-16 code units that do not fit in 8 bits")),Z[i+4+a]=s}else for(a=0;a<o;++a)Z[i+4+a]=t[a];return null!==e&&e.push(Id,i),i},argPackAdvance:8,readValueFromPointer:kt,destructorFunction:function(e){Id(e)}})}function On(e,t,r){var n,o,i,a,s;r=Yt(r),2===t?(n=K,o=J,a=ee,i=()=>q,s=1):4===t&&(n=te,o=re,a=ne,i=()=>V,s=2),er(e,{name:r,fromWireType:function(e){for(var r,o=V[e>>2],a=i(),c=e+4,u=0;u<=o;++u){var l=e+4+u*t;if(u==o||0==a[l>>s]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return Id(e),r},toWireType:function(e,n){"string"!=typeof n&&Jt("Cannot pass non-string to C++ string type "+r);var i=a(n),c=Cd(4+i+t);return V[c>>2]=i>>s,o(n,c+4,i+t),null!==e&&e.push(Id,c),c},argPackAdvance:8,readValueFromPointer:kt,destructorFunction:function(e){Id(e)}})}function Pn(e,t,r,n,o,i){Mt[e]={name:Yt(t),rawConstructor:qr(r,n),rawDestructor:qr(o,i),elements:[]}}function Dn(e,t,r,n,o,i,a,s,c){Mt[e].elements.push({getterReturnType:t,getter:qr(r,n),getterContext:o,setterArgumentType:i,setter:qr(a,s),setterContext:c})}function xn(e,t,r,n,o,i){Gt[e]={name:Yt(t),rawConstructor:qr(r,n),rawDestructor:qr(o,i),fields:[]}}function Sn(e,t,r,n,o,i,a,s,c,u){Gt[e].fields.push({fieldName:Yt(t),getterReturnType:r,getter:qr(n,o),getterContext:i,setterArgumentType:a,setter:qr(s,c),setterContext:u})}function Rn(e,t){er(e,{isVoid:!0,name:t=Yt(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}function Mn(){throw"longjmp"}function An(e,t,r){e=un.toValue(e),t=fn(t,"emval::as");var n=[],o=un.toHandle(n);return W[r>>2]=o,t.toWireType(n,e)}function kn(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=fn(W[(t>>2)+n],"parameter "+n);return r}function Fn(e,t,r,n){e=un.toValue(e);for(var o=kn(t,r),i=new Array(t),a=0;a<t;++a){var s=o[a];i[a]=s.readValueFromPointer(n),n+=s.argPackAdvance}var c=e.apply(void 0,i);return un.toHandle(c)}function Cn(e){var t=[];return W[e>>2]=un.toHandle(t),t}var In={};function Ln(e){var t=In[e];return void 0===t?Yt(e):t}var jn=[];function Un(e,t,r,n,o){return(e=jn[e])(t=un.toValue(t),r=Ln(r),Cn(n),o)}function Nn(e,t,r,n){(e=jn[e])(t=un.toValue(t),r=Ln(r),null,n)}function Hn(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Bn(e){return 0===e?un.toHandle(Hn()):(e=Ln(e),un.toHandle(Hn()[e]))}function Xn(e){var t=jn.length;return jn.push(e),t}var Qn=[];function Zn(e,t){var r=kn(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=Qn[o];if(void 0!==i)return i;for(var a=["retType"],s=[n],c="",u=0;u<e-1;++u)c+=(0!==u?", ":"")+"arg"+u,a.push("argType"+u),s.push(r[1+u]);var l="return function "+Ut("methodCaller_"+o)+"(handle, name, destructors, args) {\n",d=0;for(u=0;u<e-1;++u)l+=" var arg"+u+" = argType"+u+".readValueFromPointer(args"+(d?"+"+d:"")+");\n",d+=r[u+1].argPackAdvance;for(l+=" var rv = handle[name]("+c+");\n",u=0;u<e-1;++u)r[u+1].deleteObject&&(l+=" argType"+u+".deleteObject(arg"+u+");\n");return n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",a.push(l),i=Xn(Jr(Function,a).apply(null,s)),Qn[o]=i,i}function Gn(e,t){return e=un.toValue(e),t=un.toValue(t),un.toHandle(e[t])}function qn(e){e>4&&(nn[e].refcount+=1)}function Wn(e,t){return(e=un.toValue(e))instanceof un.toValue(t)}function Vn(e){return"string"==typeof(e=un.toValue(e))}function zn(e){for(var t="",r=0;r<e;++r)t+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+e+"(constructor, argTypes, args) {\n";for(r=0;r<e;++r)n+="var argType"+r+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+r+'], "parameter '+r+'");\nvar arg'+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle",n)(fn,i,un.toHandle)}var $n,Yn={};function Kn(e,t,r,n){e=un.toValue(e);var o=Yn[t];return o||(o=zn(t),Yn[t]=o),o(e,r,n)}function Jn(){return un.toHandle([])}function eo(e){return un.toHandle(Ln(e))}function to(){return un.toHandle({})}function ro(e){At(un.toValue(e)),on(e)}function no(e,t,r){e=un.toValue(e),t=un.toValue(t),r=un.toValue(r),e[t]=r}function oo(e,t){var r=(e=fn(e,"_emval_take_value")).readValueFromPointer(t);return un.toHandle(r)}function io(e){throw un.toValue(e)}function ao(e,t){var r=new Date(1e3*W[e>>2]);W[t>>2]=r.getUTCSeconds(),W[t+4>>2]=r.getUTCMinutes(),W[t+8>>2]=r.getUTCHours(),W[t+12>>2]=r.getUTCDate(),W[t+16>>2]=r.getUTCMonth(),W[t+20>>2]=r.getUTCFullYear()-1900,W[t+24>>2]=r.getUTCDay();var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),o=(r.getTime()-n)/864e5|0;W[t+28>>2]=o}function so(e,t){var r=new Date(1e3*W[e>>2]);W[t>>2]=r.getSeconds(),W[t+4>>2]=r.getMinutes(),W[t+8>>2]=r.getHours(),W[t+12>>2]=r.getDate(),W[t+16>>2]=r.getMonth(),W[t+20>>2]=r.getFullYear()-1900,W[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),o=(r.getTime()-n.getTime())/864e5|0;W[t+28>>2]=o,W[t+36>>2]=-60*r.getTimezoneOffset();var i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=0|(i!=a&&r.getTimezoneOffset()==Math.min(a,i));W[t+32>>2]=s}function co(e){var t=new Date(W[e+20>>2]+1900,W[e+16>>2],W[e+12>>2],W[e+8>>2],W[e+4>>2],W[e>>2],0),r=W[e+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i);if(r<0)W[e+32>>2]=Number(i!=a&&s==n);else if(r>0!=(s==n)){var c=Math.max(a,i),u=r>0?s:c;t.setTime(t.getTime()+6e4*(u-n))}W[e+24>>2]=t.getDay();var l=(t.getTime()-o.getTime())/864e5|0;return W[e+28>>2]=l,W[e>>2]=t.getSeconds(),W[e+4>>2]=t.getMinutes(),W[e+8>>2]=t.getHours(),W[e+12>>2]=t.getDate(),W[e+16>>2]=t.getMonth(),t.getTime()/1e3|0}function uo(e,t,r,n,o,i,a,s){try{var c=_t.getStream(o);if(!c)return-8;var u=_t.mmap(c,e,t,i,r,n),l=u.ptr;return W[a>>2]=u.allocated,l}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return-e.errno}}function lo(e,t,r,n,o,i){try{var a=_t.getStream(o);a&&(2&r&&yt.doMsync(e,a,t,n,i),_t.munmap(a))}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return-e.errno}}function po(e,t,r){var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),a=o.getTimezoneOffset(),s=i.getTimezoneOffset(),c=Math.max(a,s);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}W[e>>2]=60*c,W[t>>2]=Number(a!=s);var l=u(o),d=u(i),p=oe(l),f=oe(d);s<a?(W[r>>2]=p,W[r+4>>2]=f):(W[r>>2]=f,W[r+4>>2]=p)}function fo(e,t,r){fo.called||(fo.called=!0,po(e,t,r))}function mo(){Ne("native code called abort()")}$n=()=>performance.now();var go=!0;function ho(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!go)return at(28),-1;r=$n()}return W[t>>2]=r/1e3|0,W[t+4>>2]=r%1e3*1e3*1e3|0,0}function Eo(e,t){if(To.mainLoop.timingMode=e,To.mainLoop.timingValue=t,!To.mainLoop.func)return O("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up."),1;if(To.mainLoop.running||(To.mainLoop.running=!0),0==e)To.mainLoop.scheduler=function(){var e=0|Math.max(0,To.mainLoop.tickStartTime+t-$n());setTimeout(To.mainLoop.runner,e)},To.mainLoop.method="timeout";else if(1==e)To.mainLoop.scheduler=function(){To.requestAnimationFrame(To.mainLoop.runner)},To.mainLoop.method="rAF";else if(2==e){if("undefined"==typeof setImmediate){var r=[],n="setimmediate";addEventListener("message",(function(e){e.data!==n&&e.data.target!==n||(e.stopPropagation(),r.shift()())}),!0),setImmediate=function(e){r.push(e),m?(void 0===i.setImmediates&&(i.setImmediates=[]),i.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}To.mainLoop.scheduler=function(){setImmediate(To.mainLoop.runner)},To.mainLoop.method="immediate"}return 0}function _o(e){dp(e)}function yo(){if(!Te())try{_o(F)}catch(e){tt(e)}}function vo(e,t,r,n,o){I(!To.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),To.mainLoop.func=e,To.mainLoop.arg=n;var a=To.mainLoop.currentlyRunningMainloop;function s(){return!(a<To.mainLoop.currentlyRunningMainloop&&(yo(),1))}if(To.mainLoop.running=!1,To.mainLoop.runner=function(){if(!C)if(To.mainLoop.queue.length>0){var t=Date.now(),r=To.mainLoop.queue.shift();if(r.func(r.arg),To.mainLoop.remainingBlockers){var n=To.mainLoop.remainingBlockers,o=n%1==0?n-1:Math.floor(n);r.counted?To.mainLoop.remainingBlockers=o:(o+=.5,To.mainLoop.remainingBlockers=(8*n+o)/9)}if(T('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),To.mainLoop.updateStatus(),!s())return;setTimeout(To.mainLoop.runner,0)}else s()&&(To.mainLoop.currentFrameNumber=To.mainLoop.currentFrameNumber+1|0,1==To.mainLoop.timingMode&&To.mainLoop.timingValue>1&&To.mainLoop.currentFrameNumber%To.mainLoop.timingValue!=0?To.mainLoop.scheduler():(0==To.mainLoop.timingMode&&(To.mainLoop.tickStartTime=$n()),"timeout"===To.mainLoop.method&&i.ctx&&(P("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),To.mainLoop.method=""),To.mainLoop.runIter(e),me(),s()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),To.mainLoop.scheduler())))},o||(t&&t>0?Eo(0,1e3/t):Eo(1,1),To.mainLoop.scheduler()),r)throw"unwind"}function bo(e,t){if(be||C)O("user callback triggered after runtime exited or application aborted. Ignoring.");else if(t)e();else try{e()}catch(e){tt(e)}}function wo(e,t){return setTimeout((function(){bo(e)}),t)}var To={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){To.mainLoop.scheduler=null,To.mainLoop.currentlyRunningMainloop++},resume:function(){To.mainLoop.currentlyRunningMainloop++;var e=To.mainLoop.timingMode,t=To.mainLoop.timingValue,r=To.mainLoop.func;To.mainLoop.func=null,vo(r,0,!1,To.mainLoop.arg,!0),Eo(e,t),To.mainLoop.scheduler()},updateStatus:function(){if(i.setStatus){var e=i.statusMessage||"Please wait...",t=To.mainLoop.remainingBlockers,r=To.mainLoop.expectedBlockers;t?t<r?i.setStatus(e+" ("+(r-t)+"/"+r+")"):i.setStatus(e):i.setStatus("")}},runIter:function(e){if(!C){if(i.preMainLoop&&!1===i.preMainLoop())return;bo(e),i.postMainLoop&&i.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(i.preloadPlugins||(i.preloadPlugins=[]),!To.initted){To.initted=!0;try{new Blob,To.hasBlobConstructor=!0}catch(e){To.hasBlobConstructor=!1,T("warning: no blob constructor, cannot create blobs with mimetypes")}To.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:To.hasBlobConstructor?null:T("warning: no BlobBuilder"),To.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,i.noImageDecoding||void 0!==To.URLObject||(T("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),i.noImageDecoding=!0);var e={canHandle:function(e){return!i.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,r,n){var o=null;if(To.hasBlobConstructor)try{(o=new Blob([e],{type:To.getMimetype(t)})).size!==e.length&&(o=new Blob([new Uint8Array(e).buffer],{type:To.getMimetype(t)}))}catch(e){P("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!o){var a=new To.BlobBuilder;a.append(new Uint8Array(e).buffer),o=a.getBlob()}var s=To.URLObject.createObjectURL(o);I("string"==typeof s,"createObjectURL must return a url as a string");var c=new Image;c.onload=()=>{I(c.complete,"Image "+t+" could not be decoded");var n=document.createElement("canvas");n.width=c.width,n.height=c.height,n.getContext("2d").drawImage(c,0,0),i.preloadedImages[t]=n,To.URLObject.revokeObjectURL(s),r&&r(e)},c.onerror=e=>{T("Image "+s+" could not be decoded"),n&&n()},c.src=s}};i.preloadPlugins.push(e);var t={canHandle:function(e){return!i.noAudioDecoding&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,r,n){var o=!1;function a(n){o||(o=!0,i.preloadedAudios[t]=n,r&&r(e))}function s(){o||(o=!0,i.preloadedAudios[t]=new Audio,n&&n())}if(!To.hasBlobConstructor)return s();try{var c=new Blob([e],{type:To.getMimetype(t)})}catch(e){return s()}var u=To.URLObject.createObjectURL(c);I("string"==typeof u,"createObjectURL must return a url as a string");var l=new Audio;l.addEventListener("canplaythrough",(function(){a(l)}),!1),l.onerror=function(r){o||(T("warning: browser could not fully decode audio "+t+", trying slower base64 approach"),l.src="data:audio/x-"+t.substr(-3)+";base64,"+function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="",n=0,o=0,i=0;i<e.length;i++)for(n=n<<8|e[i],o+=8;o>=6;){var a=n>>o-6&63;o-=6,r+=t[a]}return 2==o?(r+=t[(3&n)<<4],r+="=="):4==o&&(r+=t[(15&n)<<2],r+="="),r}(e),a(l))},l.src=u,wo((function(){a(l)}),1e4)}};i.preloadPlugins.push(t);var r=i.canvas;r&&(r.requestPointerLock=r.requestPointerLock||r.mozRequestPointerLock||r.webkitRequestPointerLock||r.msRequestPointerLock||function(){},r.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},r.exitPointerLock=r.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",n,!1),document.addEventListener("mozpointerlockchange",n,!1),document.addEventListener("webkitpointerlockchange",n,!1),document.addEventListener("mspointerlockchange",n,!1),i.elementPointerLock&&r.addEventListener("click",(function(e){!To.pointerLock&&i.canvas.requestPointerLock&&(i.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){To.pointerLock=document.pointerLockElement===i.canvas||document.mozPointerLockElement===i.canvas||document.webkitPointerLockElement===i.canvas||document.msPointerLockElement===i.canvas}},handledByPreloadPlugin:function(e,t,r,n){To.init();var o=!1;return i.preloadPlugins.forEach((function(i){o||i.canHandle(t)&&(i.handle(e,t,r,n),o=!0)})),o},createContext:function(e,t,r,n){if(t&&i.ctx&&e==i.canvas)return i.ctx;var o,a;if(t){var s={antialias:!1,alpha:!1,majorVersion:"undefined"!=typeof WebGL2RenderingContext?2:1};if(n)for(var c in n)s[c]=n[c];void 0!==ko&&(a=ko.createContext(e,s))&&(o=ko.getContext(a).GLctx)}else o=e.getContext("2d");return o?(r&&(t||I(void 0===Od,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),i.ctx=o,t&&ko.makeContextCurrent(a),i.useWebGL=t,To.moduleContextCreatedCallbacks.forEach((function(e){e()})),To.init()),o):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t){To.lockPointer=e,To.resizeCanvas=t,void 0===To.lockPointer&&(To.lockPointer=!0),void 0===To.resizeCanvas&&(To.resizeCanvas=!1);var r=i.canvas;function n(){To.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=To.exitFullscreen,To.lockPointer&&r.requestPointerLock(),To.isFullscreen=!0,To.resizeCanvas?To.setFullscreenCanvasSize():To.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),To.resizeCanvas?To.setWindowedCanvasSize():To.updateCanvasDimensions(r)),i.onFullScreen&&i.onFullScreen(To.isFullscreen),i.onFullscreen&&i.onFullscreen(To.isFullscreen)}To.fullscreenHandlersInstalled||(To.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var o=document.createElement("div");r.parentNode.insertBefore(o,r),o.appendChild(r),o.requestFullscreen=o.requestFullscreen||o.mozRequestFullScreen||o.msRequestFullscreen||(o.webkitRequestFullscreen?function(){o.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(o.webkitRequestFullScreen?function(){o.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),o.requestFullscreen()},requestFullScreen:function(){Ne("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){return!!To.isFullscreen&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)},nextRAF:0,fakeRequestAnimationFrame:function(e){var t=Date.now();if(0===To.nextRAF)To.nextRAF=t+1e3/60;else for(;t+2>=To.nextRAF;)To.nextRAF+=1e3/60;var r=Math.max(To.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function(e){"function"!=typeof requestAnimationFrame?(0,To.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:function(e){return wo(e)},safeRequestAnimationFrame:function(e){return To.requestAnimationFrame((function(){bo(e)}))},getMimetype:function(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia:function(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX:function(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY:function(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta:function(e){var t=0;switch(e.type){case"DOMMouseScroll":t=e.detail/3;break;case"mousewheel":t=e.wheelDelta/120;break;case"wheel":switch(t=e.deltaY,e.deltaMode){case 0:t/=100;break;case 1:t/=3;break;case 2:t*=80;break;default:throw"unrecognized mouse wheel delta mode: "+e.deltaMode}break;default:throw"unrecognized mouse wheel event: "+e.type}return t},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(e){if(To.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?To.mouseMovementX=To.mouseMovementY=0:(To.mouseMovementX=To.getMovementX(e),To.mouseMovementY=To.getMovementY(e)),"undefined"!=typeof SDL?(To.mouseX=SDL.mouseX+To.mouseMovementX,To.mouseY=SDL.mouseY+To.mouseMovementY):(To.mouseX+=To.mouseMovementX,To.mouseY+=To.mouseMovementY);else{var t=i.canvas.getBoundingClientRect(),r=i.canvas.width,n=i.canvas.height,o=void 0!==window.scrollX?window.scrollX:window.pageXOffset,a=void 0!==window.scrollY?window.scrollY:window.pageYOffset;if(I(void 0!==o&&void 0!==a,"Unable to retrieve scroll position, mouse positions likely broken."),"touchstart"===e.type||"touchend"===e.type||"touchmove"===e.type){var s=e.touch;if(void 0===s)return;var c=s.pageX-(o+t.left),u=s.pageY-(a+t.top),l={x:c*=r/t.width,y:u*=n/t.height};if("touchstart"===e.type)To.lastTouches[s.identifier]=l,To.touches[s.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var d=To.touches[s.identifier];d||(d=l),To.lastTouches[s.identifier]=d,To.touches[s.identifier]=l}return}var p=e.pageX-(o+t.left),f=e.pageY-(a+t.top);p*=r/t.width,f*=n/t.height,To.mouseMovementX=p-To.mouseX,To.mouseMovementY=f-To.mouseY,To.mouseX=p,To.mouseY=f}},resizeListeners:[],updateResizeListeners:function(){var e=i.canvas;To.resizeListeners.forEach((function(t){t(e.width,e.height)}))},setCanvasSize:function(e,t,r){var n=i.canvas;To.updateCanvasDimensions(n,e,t),r||To.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=V[SDL.screen>>2];e|=8388608,W[SDL.screen>>2]=e}To.updateCanvasDimensions(i.canvas),To.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=V[SDL.screen>>2];e&=-8388609,W[SDL.screen>>2]=e}To.updateCanvasDimensions(i.canvas),To.updateResizeListeners()},updateCanvasDimensions:function(e,t,r){t&&r?(e.widthNative=t,e.heightNative=r):(t=e.widthNative,r=e.heightNative);var n=t,o=r;if(i.forcedAspectRatio&&i.forcedAspectRatio>0&&(n/o<i.forcedAspectRatio?n=Math.round(o*i.forcedAspectRatio):o=Math.round(n/i.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&"undefined"!=typeof screen){var a=Math.min(screen.width/n,screen.height/o);n=Math.round(n*a),o=Math.round(o*a)}To.resizeCanvas?(e.width!=n&&(e.width=n),e.height!=o&&(e.height=o),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=r&&(e.height=r),void 0!==e.style&&(n!=t||o!=r?(e.style.setProperty("width",n+"px","important"),e.style.setProperty("height",o+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}},Oo={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode:function(e){Oo.errorCode=e},chooseConfig:function(e,t,r,n,o){if(62e3!=e)return Oo.setErrorCode(12296),0;if(t)for(;;){var i=W[t>>2];if(12321==i){var a=W[t+4>>2];Oo.contextAttributes.alpha=a>0}else if(12325==i){var s=W[t+4>>2];Oo.contextAttributes.depth=s>0}else if(12326==i){var c=W[t+4>>2];Oo.contextAttributes.stencil=c>0}else if(12337==i){var u=W[t+4>>2];Oo.contextAttributes.antialias=u>0}else if(12338==i)u=W[t+4>>2],Oo.contextAttributes.antialias=1==u;else if(12544==i){var l=W[t+4>>2];Oo.contextAttributes.lowLatency=12547!=l}else if(12344==i)break;t+=8}return r&&n||o?(o&&(W[o>>2]=1),r&&n>0&&(W[r>>2]=62002),Oo.setErrorCode(12288),1):(Oo.setErrorCode(12300),0)}};function Po(e,t,r,n,o){return Oo.chooseConfig(e,t,r,n,o)}function Do(e){var t=e.getExtension("ANGLE_instanced_arrays");if(t)return e.vertexAttribDivisor=function(e,r){t.vertexAttribDivisorANGLE(e,r)},e.drawArraysInstanced=function(e,r,n,o){t.drawArraysInstancedANGLE(e,r,n,o)},e.drawElementsInstanced=function(e,r,n,o,i){t.drawElementsInstancedANGLE(e,r,n,o,i)},1}function xo(e){var t=e.getExtension("OES_vertex_array_object");if(t)return e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)},1}function So(e){var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)},1}function Ro(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function Mo(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function Ao(e){return!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw"))}var ko={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){ko.lastError||(ko.lastError=e)},getNewId:function(e){for(var t=ko.counter++,r=e.length;r<t;r++)e[r]=null;return t},getSource:function(e,t,r,n){for(var o="",i=0;i<t;++i){var a=n?W[n+4*i>>2]:-1;o+=U(W[r+4*i>>2],a<0?void 0:a)}return o},createContext:function(e,t){if(!e.getContextSafariWebGL2Fixed){function t(t,r){var n=e.getContextSafariWebGL2Fixed(t,r);return"webgl"==t==n instanceof WebGLRenderingContext?n:null}e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=t}var r=t.majorVersion>1?e.getContext("webgl2",t):e.getContext("webgl",t);return r?ko.registerContext(r,t):0},registerContext:function(e,t){var r=ko.getNewId(ko.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),ko.contexts[r]=n,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&ko.initExtensions(n),r},makeContextCurrent:function(e){return ko.currentContext=ko.contexts[e],i.ctx=Od=ko.currentContext&&ko.currentContext.GLctx,!(e&&!Od)},getContext:function(e){return ko.contexts[e]},deleteContext:function(e){ko.currentContext===ko.contexts[e]&&(ko.currentContext=null),"object"==typeof ql&&ql.removeAllHandlersOnTarget(ko.contexts[e].GLctx.canvas),ko.contexts[e]&&ko.contexts[e].GLctx.canvas&&(ko.contexts[e].GLctx.canvas.GLctxObject=void 0),ko.contexts[e]=null},initExtensions:function(e){if(e||(e=ko.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;Do(t),xo(t),So(t),Ro(t),Mo(t),e.version>=2&&(t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query_webgl2")),(e.version<2||!t.disjointTimerQueryExt)&&(t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query")),Ao(t),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}};function Fo(e,t,r,n){if(62e3!=e)return Oo.setErrorCode(12296),0;for(var o=1;;){var a=W[n>>2];if(12440!=a){if(12344==a)break;return Oo.setErrorCode(12292),0}o=W[n+4>>2],n+=8}return o<2||o>3?(Oo.setErrorCode(12293),0):(Oo.contextAttributes.majorVersion=o-1,Oo.contextAttributes.minorVersion=0,Oo.context=ko.createContext(i.canvas,Oo.contextAttributes),0!=Oo.context?(Oo.setErrorCode(12288),ko.makeContextCurrent(Oo.context),i.useWebGL=!0,To.moduleContextCreatedCallbacks.forEach((function(e){e()})),ko.makeContextCurrent(null),62004):(Oo.setErrorCode(12297),0))}function Co(e,t,r,n){return 62e3!=e?(Oo.setErrorCode(12296),0):62002!=t?(Oo.setErrorCode(12293),0):(Oo.setErrorCode(12288),62006)}function Io(e,t){return 62e3!=e?(Oo.setErrorCode(12296),0):62004!=t?(Oo.setErrorCode(12294),0):(ko.deleteContext(Oo.context),Oo.setErrorCode(12288),Oo.currentContext==t&&(Oo.currentContext=0),1)}function Lo(e,t){return 62e3!=e?(Oo.setErrorCode(12296),0):62006!=t?(Oo.setErrorCode(12301),1):(Oo.currentReadSurface==t&&(Oo.currentReadSurface=0),Oo.currentDrawSurface==t&&(Oo.currentDrawSurface=0),Oo.setErrorCode(12288),1)}function jo(e,t,r,n){if(62e3!=e)return Oo.setErrorCode(12296),0;if(62002!=t)return Oo.setErrorCode(12293),0;if(!n)return Oo.setErrorCode(12300),0;switch(Oo.setErrorCode(12288),r){case 12320:return W[n>>2]=Oo.contextAttributes.alpha?32:24,1;case 12321:return W[n>>2]=Oo.contextAttributes.alpha?8:0,1;case 12322:case 12323:case 12324:return W[n>>2]=8,1;case 12325:return W[n>>2]=Oo.contextAttributes.depth?24:0,1;case 12326:return W[n>>2]=Oo.contextAttributes.stencil?8:0,1;case 12327:return W[n>>2]=12344,1;case 12328:return W[n>>2]=62002,1;case 12329:return W[n>>2]=0,1;case 12330:return W[n>>2]=4096,1;case 12331:return W[n>>2]=16777216,1;case 12332:return W[n>>2]=4096,1;case 12333:case 12334:return W[n>>2]=0,1;case 12335:return W[n>>2]=12344,1;case 12337:return W[n>>2]=Oo.contextAttributes.antialias?4:0,1;case 12338:return W[n>>2]=Oo.contextAttributes.antialias?1:0,1;case 12339:return W[n>>2]=4,1;case 12340:return W[n>>2]=12344,1;case 12341:case 12342:case 12343:return W[n>>2]=-1,1;case 12345:case 12346:case 12347:return W[n>>2]=0,1;case 12348:return W[n>>2]=1,1;case 12349:case 12350:return W[n>>2]=0,1;case 12351:return W[n>>2]=12430,1;case 12352:return W[n>>2]=4,1;case 12354:return W[n>>2]=0,1;default:return Oo.setErrorCode(12292),0}}function Uo(e){return Oo.setErrorCode(12288),62e3}function No(){return Oo.errorCode}function Ho(e,t,r){return 62e3==e?(t&&(W[t>>2]=1),r&&(W[r>>2]=4),Oo.defaultDisplayInitialized=!0,Oo.setErrorCode(12288),1):(Oo.setErrorCode(12296),0)}function Bo(e,t,r,n){return 62e3!=e?(Oo.setErrorCode(12296),0):0!=n&&62004!=n?(Oo.setErrorCode(12294),0):0!=r&&62006!=r||0!=t&&62006!=t?(Oo.setErrorCode(12301),0):(ko.makeContextCurrent(n?Oo.context:null),Oo.currentContext=n,Oo.currentDrawSurface=t,Oo.currentReadSurface=r,Oo.setErrorCode(12288),1)}function Xo(){if(Oo.defaultDisplayInitialized)if(i.ctx){if(!i.ctx.isContextLost())return Oo.setErrorCode(12288),1;Oo.setErrorCode(12302)}else Oo.setErrorCode(12290);else Oo.setErrorCode(12289);return 0}function Qo(e){return 62e3!=e?(Oo.setErrorCode(12296),0):(Oo.currentContext=0,Oo.currentReadSurface=0,Oo.currentDrawSurface=0,Oo.defaultDisplayInitialized=!1,Oo.setErrorCode(12288),1)}function Zo(e){I("number"==typeof e),console.error(U(e))}function Go(e){I("number"==typeof e),console.log(U(e))}function qo(e){I("number"==typeof e),console.warn(U(e))}function Wo(){}function Vo(){return 2147483648}function zo(e){Od.activeTexture(e)}function $o(e,t){Od.attachShader(ko.programs[e],ko.shaders[t])}function Yo(e,t){Od.beginQuery(e,ko.queries[t])}function Ko(e,t){Od.disjointTimerQueryExt.beginQueryEXT(e,ko.queries[t])}function Jo(e){Od.beginTransformFeedback(e)}function ei(e,t,r){Od.bindAttribLocation(ko.programs[e],t,U(r))}function ti(e,t){35051==e?Od.currentPixelPackBufferBinding=t:35052==e&&(Od.currentPixelUnpackBufferBinding=t),Od.bindBuffer(e,ko.buffers[t])}function ri(e,t,r){Od.bindBufferBase(e,t,ko.buffers[r])}function ni(e,t,r,n,o){Od.bindBufferRange(e,t,ko.buffers[r],n,o)}function oi(e,t){Od.bindFramebuffer(e,ko.framebuffers[t])}function ii(e,t){Od.bindRenderbuffer(e,ko.renderbuffers[t])}function ai(e,t){Od.bindSampler(e,ko.samplers[t])}function si(e,t){Od.bindTexture(e,ko.textures[t])}function ci(e,t){Od.bindTransformFeedback(e,ko.transformFeedbacks[t])}function ui(e){Od.bindVertexArray(ko.vaos[e])}function li(e){Od.bindVertexArray(ko.vaos[e])}function di(e,t,r,n){Od.blendColor(e,t,r,n)}function pi(e){Od.blendEquation(e)}function fi(e,t){Od.blendEquationSeparate(e,t)}function mi(e,t){Od.blendFunc(e,t)}function gi(e,t,r,n){Od.blendFuncSeparate(e,t,r,n)}function hi(e,t,r,n,o,i,a,s,c,u){Od.blitFramebuffer(e,t,r,n,o,i,a,s,c,u)}function Ei(e,t,r,n){ko.currentContext.version>=2?r?Od.bufferData(e,Z,n,r,t):Od.bufferData(e,t,n):Od.bufferData(e,r?Z.subarray(r,r+t):t,n)}function _i(e,t,r,n){ko.currentContext.version>=2?Od.bufferSubData(e,t,Z,n,r):Od.bufferSubData(e,t,Z.subarray(n,n+r))}function yi(e){return Od.checkFramebufferStatus(e)}function vi(e){Od.clear(e)}function bi(e,t,r,n){Od.clearBufferfi(e,t,r,n)}function wi(e,t,r){Od.clearBufferfv(e,t,z,r>>2)}function Ti(e,t,r){Od.clearBufferiv(e,t,W,r>>2)}function Oi(e,t,r){Od.clearBufferuiv(e,t,V,r>>2)}function Pi(e,t,r,n){Od.clearColor(e,t,r,n)}function Di(e){Od.clearDepth(e)}function xi(e){Od.clearStencil(e)}function Si(e,t){return I(t===(0|t)),(e>>>0)+4294967296*t}function Ri(e,t,r,n){return Od.clientWaitSync(ko.syncs[e],t,Si(r,n))}function Mi(e,t,r,n){Od.colorMask(!!e,!!t,!!r,!!n)}function Ai(e){Od.compileShader(ko.shaders[e])}function ki(e,t,r,n,o,i,a,s){ko.currentContext.version>=2?Od.currentPixelUnpackBufferBinding?Od.compressedTexImage2D(e,t,r,n,o,i,a,s):Od.compressedTexImage2D(e,t,r,n,o,i,Z,s,a):Od.compressedTexImage2D(e,t,r,n,o,i,s?Z.subarray(s,s+a):null)}function Fi(e,t,r,n,o,i,a,s,c){Od.currentPixelUnpackBufferBinding?Od.compressedTexImage3D(e,t,r,n,o,i,a,s,c):Od.compressedTexImage3D(e,t,r,n,o,i,a,Z,c,s)}function Ci(e,t,r,n,o,i,a,s,c){ko.currentContext.version>=2?Od.currentPixelUnpackBufferBinding?Od.compressedTexSubImage2D(e,t,r,n,o,i,a,s,c):Od.compressedTexSubImage2D(e,t,r,n,o,i,a,Z,c,s):Od.compressedTexSubImage2D(e,t,r,n,o,i,a,c?Z.subarray(c,c+s):null)}function Ii(e,t,r,n,o,i,a,s,c,u,l){Od.currentPixelUnpackBufferBinding?Od.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,u,l):Od.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,Z,l,u)}function Li(e,t,r,n,o){Od.copyBufferSubData(e,t,r,n,o)}function ji(e,t,r,n,o,i,a,s){Od.copyTexImage2D(e,t,r,n,o,i,a,s)}function Ui(e,t,r,n,o,i,a,s){Od.copyTexSubImage2D(e,t,r,n,o,i,a,s)}function Ni(e,t,r,n,o,i,a,s,c){Od.copyTexSubImage3D(e,t,r,n,o,i,a,s,c)}function Hi(){var e=ko.getNewId(ko.programs),t=Od.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,ko.programs[e]=t,e}function Bi(e){var t=ko.getNewId(ko.shaders);return ko.shaders[t]=Od.createShader(e),t}function Xi(e){Od.cullFace(e)}function Qi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=ko.buffers[n];o&&(Od.deleteBuffer(o),o.name=0,ko.buffers[n]=null,n==Od.currentPixelPackBufferBinding&&(Od.currentPixelPackBufferBinding=0),n==Od.currentPixelUnpackBufferBinding&&(Od.currentPixelUnpackBufferBinding=0))}}function Zi(e,t){for(var r=0;r<e;++r){var n=W[t+4*r>>2],o=ko.framebuffers[n];o&&(Od.deleteFramebuffer(o),o.name=0,ko.framebuffers[n]=null)}}function Gi(e){if(e){var t=ko.programs[e];t?(Od.deleteProgram(t),t.name=0,ko.programs[e]=null):ko.recordError(1281)}}function qi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=ko.queries[n];o&&(Od.deleteQuery(o),ko.queries[n]=null)}}function Wi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=ko.queries[n];o&&(Od.disjointTimerQueryExt.deleteQueryEXT(o),ko.queries[n]=null)}}function Vi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=ko.renderbuffers[n];o&&(Od.deleteRenderbuffer(o),o.name=0,ko.renderbuffers[n]=null)}}function zi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=ko.samplers[n];o&&(Od.deleteSampler(o),o.name=0,ko.samplers[n]=null)}}function $i(e){if(e){var t=ko.shaders[e];t?(Od.deleteShader(t),ko.shaders[e]=null):ko.recordError(1281)}}function Yi(e){if(e){var t=ko.syncs[e];t?(Od.deleteSync(t),t.name=0,ko.syncs[e]=null):ko.recordError(1281)}}function Ki(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=ko.textures[n];o&&(Od.deleteTexture(o),o.name=0,ko.textures[n]=null)}}function Ji(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=ko.transformFeedbacks[n];o&&(Od.deleteTransformFeedback(o),o.name=0,ko.transformFeedbacks[n]=null)}}function ea(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2];Od.deleteVertexArray(ko.vaos[n]),ko.vaos[n]=null}}function ta(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2];Od.deleteVertexArray(ko.vaos[n]),ko.vaos[n]=null}}function ra(e){Od.depthFunc(e)}function na(e){Od.depthMask(!!e)}function oa(e,t){Od.depthRange(e,t)}function ia(e,t){Od.detachShader(ko.programs[e],ko.shaders[t])}function aa(e){Od.disable(e)}function sa(e){Od.disableVertexAttribArray(e)}function ca(e,t,r){Od.drawArrays(e,t,r)}function ua(e,t,r,n){Od.drawArraysInstanced(e,t,r,n)}function la(e,t,r,n){Od.drawArraysInstanced(e,t,r,n)}function da(e,t,r,n){Od.drawArraysInstanced(e,t,r,n)}function pa(e,t,r,n,o){Od.dibvbi.drawArraysInstancedBaseInstanceWEBGL(e,t,r,n,o)}function fa(e,t,r,n){Od.drawArraysInstanced(e,t,r,n)}function ma(e,t,r,n){Od.drawArraysInstanced(e,t,r,n)}var ga=[];function ha(e,t){for(var r=ga[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];Od.drawBuffers(r)}function Ea(e,t){for(var r=ga[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];Od.drawBuffers(r)}function _a(e,t){for(var r=ga[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];Od.drawBuffers(r)}function ya(e,t,r,n){Od.drawElements(e,t,r,n)}function va(e,t,r,n,o){Od.drawElementsInstanced(e,t,r,n,o)}function ba(e,t,r,n,o){Od.drawElementsInstanced(e,t,r,n,o)}function wa(e,t,r,n,o){Od.drawElementsInstanced(e,t,r,n,o)}function Ta(e,t,r,n,o,i,a){Od.dibvbi.drawElementsInstancedBaseVertexBaseInstanceWEBGL(e,t,r,n,o,i,a)}function Oa(e,t,r,n,o){Od.drawElementsInstanced(e,t,r,n,o)}function Pa(e,t,r,n,o){Od.drawElementsInstanced(e,t,r,n,o)}function Da(e,t,r,n){Od.drawElements(e,t,r,n)}function xa(e,t,r,n,o,i){Da(e,n,o,i)}function Sa(e){Od.enable(e)}function Ra(e){Od.enableVertexAttribArray(e)}function Ma(e){Od.endQuery(e)}function Aa(e){Od.disjointTimerQueryExt.endQueryEXT(e)}function ka(){Od.endTransformFeedback()}function Fa(e,t){var r=Od.fenceSync(e,t);if(r){var n=ko.getNewId(ko.syncs);return r.name=n,ko.syncs[n]=r,n}return 0}function Ca(){Od.finish()}function Ia(){Od.flush()}function La(e,t,r,n){Od.framebufferRenderbuffer(e,t,r,ko.renderbuffers[n])}function ja(e,t,r,n,o){Od.framebufferTexture2D(e,t,r,ko.textures[n],o)}function Ua(e,t,r,n,o){Od.framebufferTextureLayer(e,t,ko.textures[r],n,o)}function Na(e){Od.frontFace(e)}function Ha(e,t,r,n){for(var o=0;o<e;o++){var i=Od[r](),a=i&&ko.getNewId(n);i?(i.name=a,n[a]=i):ko.recordError(1282),W[t+4*o>>2]=a}}function Ba(e,t){Ha(e,t,"createBuffer",ko.buffers)}function Xa(e,t){Ha(e,t,"createFramebuffer",ko.framebuffers)}function Qa(e,t){Ha(e,t,"createQuery",ko.queries)}function Za(e,t){for(var r=0;r<e;r++){var n=Od.disjointTimerQueryExt.createQueryEXT();if(!n){for(ko.recordError(1282);r<e;)W[t+4*r++>>2]=0;return}var o=ko.getNewId(ko.queries);n.name=o,ko.queries[o]=n,W[t+4*r>>2]=o}}function Ga(e,t){Ha(e,t,"createRenderbuffer",ko.renderbuffers)}function qa(e,t){Ha(e,t,"createSampler",ko.samplers)}function Wa(e,t){Ha(e,t,"createTexture",ko.textures)}function Va(e,t){Ha(e,t,"createTransformFeedback",ko.transformFeedbacks)}function za(e,t){Ha(e,t,"createVertexArray",ko.vaos)}function $a(e,t){Ha(e,t,"createVertexArray",ko.vaos)}function Ya(e){Od.generateMipmap(e)}function Ka(e,t,r,n,o,i,a,s){t=ko.programs[t];var c=Od[e](t,r);if(c){var u=s&&H(c.name,s,n);o&&(W[o>>2]=u),i&&(W[i>>2]=c.size),a&&(W[a>>2]=c.type)}}function Ja(e,t,r,n,o,i,a){Ka("getActiveAttrib",e,t,r,n,o,i,a)}function es(e,t,r,n,o,i,a){Ka("getActiveUniform",e,t,r,n,o,i,a)}function ts(e,t,r,n,o){e=ko.programs[e];var i=Od.getActiveUniformBlockName(e,t);if(i)if(o&&r>0){var a=H(i,o,r);n&&(W[n>>2]=a)}else n&&(W[n>>2]=0)}function rs(e,t,r,n){if(n)if(e=ko.programs[e],35393!=r){var o=Od.getActiveUniformBlockParameter(e,t,r);if(null!==o)if(35395==r)for(var i=0;i<o.length;i++)W[n+4*i>>2]=o[i];else W[n>>2]=o}else{var a=Od.getActiveUniformBlockName(e,t);W[n>>2]=a.length+1}else ko.recordError(1281)}function ns(e,t,r,n,o){if(o)if(t>0&&0==r)ko.recordError(1281);else{e=ko.programs[e];for(var i=[],a=0;a<t;a++)i.push(W[r+4*a>>2]);var s=Od.getActiveUniforms(e,i,n);if(s){var c=s.length;for(a=0;a<c;a++)W[o+4*a>>2]=s[a]}}else ko.recordError(1281)}function os(e,t,r,n){var o=Od.getAttachedShaders(ko.programs[e]),i=o.length;i>t&&(i=t),W[r>>2]=i;for(var a=0;a<i;++a){var s=ko.shaders.indexOf(o[a]);W[n+4*a>>2]=s}}function is(e,t){return Od.getAttribLocation(ko.programs[e],U(t))}function as(e){return V[e>>2]+4294967296*W[e+4>>2]}function ss(e){return V[e>>2]+4294967296*V[e+4>>2]}function cs(e,t){V[e>>2]=t,V[e+4>>2]=(t-V[e>>2])/4294967296;var r=t>=0?ss(e):as(e);r!=t&&P("writeI53ToI64() out of range: serialized JS Number "+t+" to Wasm heap as bytes lo=0x"+V[e>>2].toString(16)+", hi=0x"+V[e+4>>2].toString(16)+", which deserializes back to "+r+" instead!")}function us(e,t,r){if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=r&&1!=r&&ko.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=Od.getParameter(34467);n=o?o.length:0;break;case 33309:if(ko.currentContext.version<2)return void ko.recordError(1282);n=2*(Od.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(ko.currentContext.version<2)return void ko.recordError(1280);n=33307==e?3:0}if(void 0===n){var i=Od.getParameter(e);switch(typeof i){case"number":n=i;break;case"boolean":n=i?1:0;break;case"string":return void ko.recordError(1280);case"object":if(null===i)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:return void ko.recordError(1280)}else{if(i instanceof Float32Array||i instanceof Uint32Array||i instanceof Int32Array||i instanceof Array){for(var a=0;a<i.length;++a)switch(r){case 0:W[t+4*a>>2]=i[a];break;case 2:z[t+4*a>>2]=i[a];break;case 4:Q[t+a>>0]=i[a]?1:0}return}try{n=0|i.name}catch(t){return ko.recordError(1280),void O("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return ko.recordError(1280),void O("GL_INVALID_ENUM in glGet"+r+"v: Native code calling glGet"+r+"v("+e+") and it returns "+i+" of type "+typeof i+"!")}}switch(r){case 1:cs(t,n);break;case 0:W[t>>2]=n;break;case 2:z[t>>2]=n;break;case 4:Q[t>>0]=n?1:0}}else ko.recordError(1281)}function ls(e,t){us(e,t,4)}function ds(e,t,r){r?cs(r,Od.getBufferParameter(e,t)):ko.recordError(1281)}function ps(e,t,r){r?W[r>>2]=Od.getBufferParameter(e,t):ko.recordError(1281)}function fs(){var e=Od.getError()||ko.lastError;return ko.lastError=0,e}function ms(e,t){us(e,t,2)}function gs(e,t){return Od.getFragDataLocation(ko.programs[e],U(t))}function hs(e,t,r,n){var o=Od.getFramebufferAttachmentParameter(e,t,r);(o instanceof WebGLRenderbuffer||o instanceof WebGLTexture)&&(o=0|o.name),W[n>>2]=o}function Es(e,t,r,n){if(r){var o,i=Od.getIndexedParameter(e,t);switch(typeof i){case"boolean":o=i?1:0;break;case"number":o=i;break;case"object":if(null===i)switch(e){case 35983:case 35368:o=0;break;default:return void ko.recordError(1280)}else{if(!(i instanceof WebGLBuffer))return void ko.recordError(1280);o=0|i.name}break;default:return void ko.recordError(1280)}switch(n){case 1:cs(r,o);break;case 0:W[r>>2]=o;break;case 2:z[r>>2]=o;break;case 4:Q[r>>0]=o?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+n}}else ko.recordError(1281)}function _s(e,t,r){Es(e,t,r,1)}function ys(e,t){us(e,t,1)}function vs(e,t,r){Es(e,t,r,0)}function bs(e,t){us(e,t,0)}function ws(e,t,r,n,o){if(n<0)ko.recordError(1281);else if(o){var i=Od.getInternalformatParameter(e,t,r);if(null!==i)for(var a=0;a<i.length&&a<n;++a)W[o+4*a>>2]=i[a]}else ko.recordError(1281)}function Ts(e,t,r,n,o){ko.recordError(1282)}function Os(e,t,r,n){var o=Od.getProgramInfoLog(ko.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?H(o,n,t):0;r&&(W[r>>2]=i)}function Ps(e,t,r){if(r)if(e>=ko.counter)ko.recordError(1281);else if(e=ko.programs[e],35716==t){var n=Od.getProgramInfoLog(e);null===n&&(n="(unknown error)"),W[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<Od.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,Od.getActiveUniform(e,o).name.length+1);W[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<Od.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,Od.getActiveAttrib(e,o).name.length+1);W[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<Od.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,Od.getActiveUniformBlockName(e,o).length+1);W[r>>2]=e.maxUniformBlockNameLength}else W[r>>2]=Od.getProgramParameter(e,t);else ko.recordError(1281)}function Ds(e,t,r){if(r){var n,o=ko.queries[e];cs(r,"boolean"==typeof(n=ko.currentContext.version<2?Od.disjointTimerQueryExt.getQueryObjectEXT(o,t):Od.getQueryParameter(o,t))?n?1:0:n)}else ko.recordError(1281)}function xs(e,t,r){if(r){var n,o=ko.queries[e],i=Od.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else ko.recordError(1281)}function Ss(e,t,r){if(r){var n,o=ko.queries[e];cs(r,"boolean"==typeof(n=ko.currentContext.version<2?Od.disjointTimerQueryExt.getQueryObjectEXT(o,t):Od.getQueryParameter(o,t))?n?1:0:n)}else ko.recordError(1281)}function Rs(e,t,r){if(r){var n,o=ko.queries[e],i=Od.getQueryParameter(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else ko.recordError(1281)}function Ms(e,t,r){if(r){var n,o=ko.queries[e],i=Od.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else ko.recordError(1281)}function As(e,t,r){r?W[r>>2]=Od.getQuery(e,t):ko.recordError(1281)}function ks(e,t,r){r?W[r>>2]=Od.disjointTimerQueryExt.getQueryEXT(e,t):ko.recordError(1281)}function Fs(e,t,r){r?W[r>>2]=Od.getRenderbufferParameter(e,t):ko.recordError(1281)}function Cs(e,t,r){r?z[r>>2]=Od.getSamplerParameter(ko.samplers[e],t):ko.recordError(1281)}function Is(e,t,r){r?W[r>>2]=Od.getSamplerParameter(ko.samplers[e],t):ko.recordError(1281)}function Ls(e,t,r,n){var o=Od.getShaderInfoLog(ko.shaders[e]);null===o&&(o="(unknown error)");var i=t>0&&n?H(o,n,t):0;r&&(W[r>>2]=i)}function js(e,t,r,n){var o=Od.getShaderPrecisionFormat(e,t);W[r>>2]=o.rangeMin,W[r+4>>2]=o.rangeMax,W[n>>2]=o.precision}function Us(e,t,r,n){var o=Od.getShaderSource(ko.shaders[e]);if(o){var i=t>0&&n?H(o,n,t):0;r&&(W[r>>2]=i)}}function Ns(e,t,r){if(r)if(35716==t){var n=Od.getShaderInfoLog(ko.shaders[e]);null===n&&(n="(unknown error)");var o=n?n.length+1:0;W[r>>2]=o}else if(35720==t){var i=Od.getShaderSource(ko.shaders[e]),a=i?i.length+1:0;W[r>>2]=a}else W[r>>2]=Od.getShaderParameter(ko.shaders[e],t);else ko.recordError(1281)}function Hs(e){var t=B(e)+1,r=Cd(t);return H(e,r,t),r}function Bs(e){var t=ko.stringCache[e];if(!t){switch(e){case 7939:var r=Od.getSupportedExtensions()||[];t=Hs((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=Od.getParameter(e);n||ko.recordError(1280),t=n&&Hs(n);break;case 7938:var o=Od.getParameter(7938);t=Hs(o=ko.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=Od.getParameter(35724),a=i.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==a&&(3==a[1].length&&(a[1]=a[1]+"0"),i="OpenGL ES GLSL ES "+a[1]+" ("+i+")"),t=Hs(i);break;default:ko.recordError(1280)}ko.stringCache[e]=t}return t}function Xs(e,t){if(ko.currentContext.version<2)return ko.recordError(1282),0;var r=ko.stringiCache[e];if(r)return t<0||t>=r.length?(ko.recordError(1281),0):r[t];switch(e){case 7939:var n=Od.getSupportedExtensions()||[];return n=(n=n.concat(n.map((function(e){return"GL_"+e})))).map((function(e){return Hs(e)})),r=ko.stringiCache[e]=n,t<0||t>=r.length?(ko.recordError(1281),0):r[t];default:return ko.recordError(1280),0}}function Qs(e,t,r,n,o){if(r<0)ko.recordError(1281);else if(o){var i=Od.getSyncParameter(ko.syncs[e],t);null!==i&&(W[o>>2]=i,n&&(W[n>>2]=1))}else ko.recordError(1281)}function Zs(e,t,r){r?z[r>>2]=Od.getTexParameter(e,t):ko.recordError(1281)}function Gs(e,t,r){r?W[r>>2]=Od.getTexParameter(e,t):ko.recordError(1281)}function qs(e,t,r,n,o,i,a){e=ko.programs[e];var s=Od.getTransformFeedbackVarying(e,t);if(s){if(a&&r>0){var c=H(s.name,a,r);n&&(W[n>>2]=c)}else n&&(W[n>>2]=0);o&&(W[o>>2]=s.size),i&&(W[i>>2]=s.type)}}function Ws(e,t){return Od.getUniformBlockIndex(ko.programs[e],U(t))}function Vs(e,t,r,n){if(n)if(t>0&&(0==r||0==n))ko.recordError(1281);else{e=ko.programs[e];for(var o=[],i=0;i<t;i++)o.push(U(W[r+4*i>>2]));var a=Od.getUniformIndices(e,o);if(a){var s=a.length;for(i=0;i<s;i++)W[n+4*i>>2]=a[i]}}else ko.recordError(1281)}function zs(e){return parseInt(e)}function $s(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function Ys(e){var t,r,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<Od.getProgramParameter(e,35718);++t){var i=Od.getActiveUniform(e,t),a=i.name,s=i.size,c=$s(a),u=c>0?a.slice(0,c):a,l=e.uniformIdCounter;for(e.uniformIdCounter+=s,o[u]=[s,l],r=0;r<s;++r)n[l]=r,e.uniformArrayNamesById[l++]=u}}function Ks(e,t){if(t=U(t),e=ko.programs[e]){Ys(e);var r=e.uniformLocsById,n=0,o=t,i=$s(t);i>0&&(n=zs(t.slice(i+1))>>>0,o=t.slice(0,i));var a=e.uniformSizeAndIdsByName[o];if(a&&n<a[0]&&(r[n+=a[1]]=r[n]||Od.getUniformLocation(e,t)))return n}else ko.recordError(1281);return-1}function Js(e){var t=Od.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=Od.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}ko.recordError(1282)}function ec(e,t,r,n){if(r){Ys(e=ko.programs[e]);var o=Od.getUniform(e,Js(t));if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:W[r>>2]=o;break;case 2:z[r>>2]=o}else for(var i=0;i<o.length;i++)switch(n){case 0:W[r+4*i>>2]=o[i];break;case 2:z[r+4*i>>2]=o[i]}}else ko.recordError(1281)}function tc(e,t,r){ec(e,t,r,2)}function rc(e,t,r){ec(e,t,r,0)}function nc(e,t,r){ec(e,t,r,0)}function oc(e,t,r,n){if(r){var o=Od.getVertexAttrib(e,t);if(34975==t)W[r>>2]=o&&o.name;else if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:W[r>>2]=o;break;case 2:z[r>>2]=o;break;case 5:W[r>>2]=Math.fround(o)}else for(var i=0;i<o.length;i++)switch(n){case 0:W[r+4*i>>2]=o[i];break;case 2:z[r+4*i>>2]=o[i];break;case 5:W[r+4*i>>2]=Math.fround(o[i])}}else ko.recordError(1281)}function ic(e,t,r){oc(e,t,r,0)}function ac(e,t,r){oc(e,t,r,0)}function sc(e,t,r){r?W[r>>2]=Od.getVertexAttribOffset(e,t):ko.recordError(1281)}function cc(e,t,r){oc(e,t,r,2)}function uc(e,t,r){oc(e,t,r,5)}function lc(e,t){Od.hint(e,t)}function dc(e,t,r){for(var n=ga[t],o=0;o<t;o++)n[o]=W[r+4*o>>2];Od.invalidateFramebuffer(e,n)}function pc(e,t,r,n,o,i,a){for(var s=ga[t],c=0;c<t;c++)s[c]=W[r+4*c>>2];Od.invalidateSubFramebuffer(e,s,n,o,i,a)}function fc(e){var t=ko.buffers[e];return t?Od.isBuffer(t):0}function mc(e){return Od.isEnabled(e)}function gc(e){var t=ko.framebuffers[e];return t?Od.isFramebuffer(t):0}function hc(e){return(e=ko.programs[e])?Od.isProgram(e):0}function Ec(e){var t=ko.queries[e];return t?Od.isQuery(t):0}function _c(e){var t=ko.queries[e];return t?Od.disjointTimerQueryExt.isQueryEXT(t):0}function yc(e){var t=ko.renderbuffers[e];return t?Od.isRenderbuffer(t):0}function vc(e){var t=ko.samplers[e];return t?Od.isSampler(t):0}function bc(e){var t=ko.shaders[e];return t?Od.isShader(t):0}function wc(e){return Od.isSync(ko.syncs[e])}function Tc(e){var t=ko.textures[e];return t?Od.isTexture(t):0}function Oc(e){return Od.isTransformFeedback(ko.transformFeedbacks[e])}function Pc(e){var t=ko.vaos[e];return t?Od.isVertexArray(t):0}function Dc(e){var t=ko.vaos[e];return t?Od.isVertexArray(t):0}function xc(e){Od.lineWidth(e)}function Sc(e){e=ko.programs[e],Od.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function Rc(e,t,r,n,o,i){Od.mdibvbi.multiDrawArraysInstancedBaseInstanceWEBGL(e,W,t>>2,W,r>>2,W,n>>2,V,o>>2,i)}function Mc(e,t,r,n,o,i,a,s){Od.mdibvbi.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(e,W,t>>2,r,W,n>>2,W,o>>2,W,i>>2,V,a>>2,s)}function Ac(){Od.pauseTransformFeedback()}function kc(e,t){3317==e&&(ko.unpackAlignment=t),Od.pixelStorei(e,t)}function Fc(e,t){Od.polygonOffset(e,t)}function Cc(e,t,r,n){ko.recordError(1280)}function Ic(e,t,r){ko.recordError(1280)}function Lc(e,t){Od.disjointTimerQueryExt.queryCounterEXT(ko.queries[e],t)}function jc(e){Od.readBuffer(e)}function Uc(e,t,r,n){var o;return t*(e*r+(o=n)-1&-o)}function Nc(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}function Hc(e){return 0==(e-=5120)?Q:1==e?Z:2==e?G:4==e?W:6==e?z:5==e||28922==e||28520==e||30779==e||30782==e?V:q}function Bc(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function Xc(e,t,r,n,o,i){var a=Hc(e),s=Bc(a),c=1<<s,u=Uc(r,n,Nc(t)*c,ko.unpackAlignment);return a.subarray(o>>s,o+u>>s)}function Qc(e,t,r,n,o,i,a){if(ko.currentContext.version>=2)if(Od.currentPixelPackBufferBinding)Od.readPixels(e,t,r,n,o,i,a);else{var s=Hc(i);Od.readPixels(e,t,r,n,o,i,s,a>>Bc(s))}else{var c=Xc(i,o,r,n,a);c?Od.readPixels(e,t,r,n,o,i,c):ko.recordError(1280)}}function Zc(){}function Gc(e,t,r,n){Od.renderbufferStorage(e,t,r,n)}function qc(e,t,r,n,o){Od.renderbufferStorageMultisample(e,t,r,n,o)}function Wc(){Od.resumeTransformFeedback()}function Vc(e,t){Od.sampleCoverage(e,!!t)}function zc(e,t,r){Od.samplerParameterf(ko.samplers[e],t,r)}function $c(e,t,r){var n=z[r>>2];Od.samplerParameterf(ko.samplers[e],t,n)}function Yc(e,t,r){Od.samplerParameteri(ko.samplers[e],t,r)}function Kc(e,t,r){var n=W[r>>2];Od.samplerParameteri(ko.samplers[e],t,n)}function Jc(e,t,r,n){Od.scissor(e,t,r,n)}function eu(){ko.recordError(1280)}function tu(e,t,r,n){var o=ko.getSource(e,t,r,n);if(ko.currentContext.version>=2&&o.includes("#version 100")){var i="";(o=(o=o.replace(/#extension GL_OES_standard_derivatives : enable/g,"")).replace(/#extension GL_EXT_shader_texture_lod : enable/g,"")).includes("gl_FragColor")&&(i+="out mediump vec4 GL_FragColor;\n",o=o.replace(/gl_FragColor/g,"GL_FragColor")),o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.includes("attribute")?(o=o.replace(/attribute/g,"in")).replace(/varying/g,"out"):o.replace(/varying/g,"in")).replace(/textureCubeLodEXT/g,"textureCubeLod")).replace(/texture2DLodEXT/g,"texture2DLod")).replace(/texture2DProjLodEXT/g,"texture2DProjLod")).replace(/texture2DGradEXT/g,"texture2DGrad")).replace(/texture2DProjGradEXT/g,"texture2DProjGrad")).replace(/textureCubeGradEXT/g,"textureCubeGrad")).replace(/textureCube/g,"texture")).replace(/texture1D/g,"texture")).replace(/texture2D/g,"texture")).replace(/texture3D/g,"texture")).replace(/#version 100/g,"#version 300 es\n"+i)}Od.shaderSource(ko.shaders[e],o)}function ru(e,t,r){Od.stencilFunc(e,t,r)}function nu(e,t,r,n){Od.stencilFuncSeparate(e,t,r,n)}function ou(e){Od.stencilMask(e)}function iu(e,t){Od.stencilMaskSeparate(e,t)}function au(e,t,r){Od.stencilOp(e,t,r)}function su(e,t,r,n){Od.stencilOpSeparate(e,t,r,n)}function cu(e,t,r,n,o,i,a,s,c){if(ko.currentContext.version>=2&&(6402==a&&6402==r&&5125==s&&(r=33190),36193==s&&(s=5131,6408==a&&6408==r&&(r=34842)),34041==r&&(r=35056)),ko.currentContext.version>=2)if(Od.currentPixelUnpackBufferBinding)Od.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Hc(s);Od.texImage2D(e,t,r,n,o,i,a,s,u,c>>Bc(u))}else Od.texImage2D(e,t,r,n,o,i,a,s,null);else Od.texImage2D(e,t,r,n,o,i,a,s,c?Xc(s,a,n,o,c):null)}function uu(e,t,r,n,o,i,a,s,c,u){if(Od.currentPixelUnpackBufferBinding)Od.texImage3D(e,t,r,n,o,i,a,s,c,u);else if(u){var l=Hc(c);Od.texImage3D(e,t,r,n,o,i,a,s,c,l,u>>Bc(l))}else Od.texImage3D(e,t,r,n,o,i,a,s,c,null)}function lu(e,t,r){Od.texParameterf(e,t,r)}function du(e,t,r){var n=z[r>>2];Od.texParameterf(e,t,n)}function pu(e,t,r){Od.texParameteri(e,t,r)}function fu(e,t,r){var n=W[r>>2];Od.texParameteri(e,t,n)}function mu(e,t,r,n,o){Od.texStorage2D(e,t,r,n,o)}function gu(e,t,r,n,o,i){Od.texStorage3D(e,t,r,n,o,i)}function hu(e,t,r,n,o,i,a,s,c){if(ko.currentContext.version>=2&&36193==s&&(s=5131),ko.currentContext.version>=2)if(Od.currentPixelUnpackBufferBinding)Od.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Hc(s);Od.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>Bc(u))}else Od.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=Xc(s,a,o,i,c)),Od.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function Eu(e,t,r,n,o,i,a,s,c,u,l){if(Od.currentPixelUnpackBufferBinding)Od.texSubImage3D(e,t,r,n,o,i,a,s,c,u,l);else if(l){var d=Hc(u);Od.texSubImage3D(e,t,r,n,o,i,a,s,c,u,d,l>>Bc(d))}else Od.texSubImage3D(e,t,r,n,o,i,a,s,c,u,null)}function _u(e,t,r,n){e=ko.programs[e];for(var o=[],i=0;i<t;i++)o.push(U(W[r+4*i>>2]));Od.transformFeedbackVaryings(e,o,n)}function yu(e,t){Od.uniform1f(Js(e),t)}var vu=[];function bu(e,t,r){if(ko.currentContext.version>=2)Od.uniform1fv(Js(e),z,r>>2,t);else{if(t<=288)for(var n=vu[t-1],o=0;o<t;++o)n[o]=z[r+4*o>>2];else n=z.subarray(r>>2,r+4*t>>2);Od.uniform1fv(Js(e),n)}}function wu(e,t){Od.uniform1i(Js(e),t)}var Tu=[];function Ou(e,t,r){if(ko.currentContext.version>=2)Od.uniform1iv(Js(e),W,r>>2,t);else{if(t<=288)for(var n=Tu[t-1],o=0;o<t;++o)n[o]=W[r+4*o>>2];else n=W.subarray(r>>2,r+4*t>>2);Od.uniform1iv(Js(e),n)}}function Pu(e,t){Od.uniform1ui(Js(e),t)}function Du(e,t,r){Od.uniform1uiv(Js(e),V,r>>2,t)}function xu(e,t,r){Od.uniform2f(Js(e),t,r)}function Su(e,t,r){if(ko.currentContext.version>=2)Od.uniform2fv(Js(e),z,r>>2,2*t);else{if(t<=144)for(var n=vu[2*t-1],o=0;o<2*t;o+=2)n[o]=z[r+4*o>>2],n[o+1]=z[r+(4*o+4)>>2];else n=z.subarray(r>>2,r+8*t>>2);Od.uniform2fv(Js(e),n)}}function Ru(e,t,r){Od.uniform2i(Js(e),t,r)}function Mu(e,t,r){if(ko.currentContext.version>=2)Od.uniform2iv(Js(e),W,r>>2,2*t);else{if(t<=144)for(var n=Tu[2*t-1],o=0;o<2*t;o+=2)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2];else n=W.subarray(r>>2,r+8*t>>2);Od.uniform2iv(Js(e),n)}}function Au(e,t,r){Od.uniform2ui(Js(e),t,r)}function ku(e,t,r){Od.uniform2uiv(Js(e),V,r>>2,2*t)}function Fu(e,t,r,n){Od.uniform3f(Js(e),t,r,n)}function Cu(e,t,r){if(ko.currentContext.version>=2)Od.uniform3fv(Js(e),z,r>>2,3*t);else{if(t<=96)for(var n=vu[3*t-1],o=0;o<3*t;o+=3)n[o]=z[r+4*o>>2],n[o+1]=z[r+(4*o+4)>>2],n[o+2]=z[r+(4*o+8)>>2];else n=z.subarray(r>>2,r+12*t>>2);Od.uniform3fv(Js(e),n)}}function Iu(e,t,r,n){Od.uniform3i(Js(e),t,r,n)}function Lu(e,t,r){if(ko.currentContext.version>=2)Od.uniform3iv(Js(e),W,r>>2,3*t);else{if(t<=96)for(var n=Tu[3*t-1],o=0;o<3*t;o+=3)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2],n[o+2]=W[r+(4*o+8)>>2];else n=W.subarray(r>>2,r+12*t>>2);Od.uniform3iv(Js(e),n)}}function ju(e,t,r,n){Od.uniform3ui(Js(e),t,r,n)}function Uu(e,t,r){Od.uniform3uiv(Js(e),V,r>>2,3*t)}function Nu(e,t,r,n,o){Od.uniform4f(Js(e),t,r,n,o)}function Hu(e,t,r){if(ko.currentContext.version>=2)Od.uniform4fv(Js(e),z,r>>2,4*t);else{if(t<=72){var n=vu[4*t-1],o=z;r>>=2;for(var i=0;i<4*t;i+=4){var a=r+i;n[i]=o[a],n[i+1]=o[a+1],n[i+2]=o[a+2],n[i+3]=o[a+3]}}else n=z.subarray(r>>2,r+16*t>>2);Od.uniform4fv(Js(e),n)}}function Bu(e,t,r,n,o){Od.uniform4i(Js(e),t,r,n,o)}function Xu(e,t,r){if(ko.currentContext.version>=2)Od.uniform4iv(Js(e),W,r>>2,4*t);else{if(t<=72)for(var n=Tu[4*t-1],o=0;o<4*t;o+=4)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2],n[o+2]=W[r+(4*o+8)>>2],n[o+3]=W[r+(4*o+12)>>2];else n=W.subarray(r>>2,r+16*t>>2);Od.uniform4iv(Js(e),n)}}function Qu(e,t,r,n,o){Od.uniform4ui(Js(e),t,r,n,o)}function Zu(e,t,r){Od.uniform4uiv(Js(e),V,r>>2,4*t)}function Gu(e,t,r){e=ko.programs[e],Od.uniformBlockBinding(e,t,r)}function qu(e,t,r,n){if(ko.currentContext.version>=2)Od.uniformMatrix2fv(Js(e),!!r,z,n>>2,4*t);else{if(t<=72)for(var o=vu[4*t-1],i=0;i<4*t;i+=4)o[i]=z[n+4*i>>2],o[i+1]=z[n+(4*i+4)>>2],o[i+2]=z[n+(4*i+8)>>2],o[i+3]=z[n+(4*i+12)>>2];else o=z.subarray(n>>2,n+16*t>>2);Od.uniformMatrix2fv(Js(e),!!r,o)}}function Wu(e,t,r,n){Od.uniformMatrix2x3fv(Js(e),!!r,z,n>>2,6*t)}function Vu(e,t,r,n){Od.uniformMatrix2x4fv(Js(e),!!r,z,n>>2,8*t)}function zu(e,t,r,n){if(ko.currentContext.version>=2)Od.uniformMatrix3fv(Js(e),!!r,z,n>>2,9*t);else{if(t<=32)for(var o=vu[9*t-1],i=0;i<9*t;i+=9)o[i]=z[n+4*i>>2],o[i+1]=z[n+(4*i+4)>>2],o[i+2]=z[n+(4*i+8)>>2],o[i+3]=z[n+(4*i+12)>>2],o[i+4]=z[n+(4*i+16)>>2],o[i+5]=z[n+(4*i+20)>>2],o[i+6]=z[n+(4*i+24)>>2],o[i+7]=z[n+(4*i+28)>>2],o[i+8]=z[n+(4*i+32)>>2];else o=z.subarray(n>>2,n+36*t>>2);Od.uniformMatrix3fv(Js(e),!!r,o)}}function $u(e,t,r,n){Od.uniformMatrix3x2fv(Js(e),!!r,z,n>>2,6*t)}function Yu(e,t,r,n){Od.uniformMatrix3x4fv(Js(e),!!r,z,n>>2,12*t)}function Ku(e,t,r,n){if(ko.currentContext.version>=2)Od.uniformMatrix4fv(Js(e),!!r,z,n>>2,16*t);else{if(t<=18){var o=vu[16*t-1],i=z;n>>=2;for(var a=0;a<16*t;a+=16){var s=n+a;o[a]=i[s],o[a+1]=i[s+1],o[a+2]=i[s+2],o[a+3]=i[s+3],o[a+4]=i[s+4],o[a+5]=i[s+5],o[a+6]=i[s+6],o[a+7]=i[s+7],o[a+8]=i[s+8],o[a+9]=i[s+9],o[a+10]=i[s+10],o[a+11]=i[s+11],o[a+12]=i[s+12],o[a+13]=i[s+13],o[a+14]=i[s+14],o[a+15]=i[s+15]}}else o=z.subarray(n>>2,n+64*t>>2);Od.uniformMatrix4fv(Js(e),!!r,o)}}function Ju(e,t,r,n){Od.uniformMatrix4x2fv(Js(e),!!r,z,n>>2,8*t)}function el(e,t,r,n){Od.uniformMatrix4x3fv(Js(e),!!r,z,n>>2,12*t)}function tl(e){e=ko.programs[e],Od.useProgram(e),Od.currentProgram=e}function rl(e){Od.validateProgram(ko.programs[e])}function nl(e,t){Od.vertexAttrib1f(e,t)}function ol(e,t){Od.vertexAttrib1f(e,z[t>>2])}function il(e,t,r){Od.vertexAttrib2f(e,t,r)}function al(e,t){Od.vertexAttrib2f(e,z[t>>2],z[t+4>>2])}function sl(e,t,r,n){Od.vertexAttrib3f(e,t,r,n)}function cl(e,t){Od.vertexAttrib3f(e,z[t>>2],z[t+4>>2],z[t+8>>2])}function ul(e,t,r,n,o){Od.vertexAttrib4f(e,t,r,n,o)}function ll(e,t){Od.vertexAttrib4f(e,z[t>>2],z[t+4>>2],z[t+8>>2],z[t+12>>2])}function dl(e,t){Od.vertexAttribDivisor(e,t)}function pl(e,t){Od.vertexAttribDivisor(e,t)}function fl(e,t){Od.vertexAttribDivisor(e,t)}function ml(e,t){Od.vertexAttribDivisor(e,t)}function gl(e,t){Od.vertexAttribDivisor(e,t)}function hl(e,t,r,n,o){Od.vertexAttribI4i(e,t,r,n,o)}function El(e,t){Od.vertexAttribI4i(e,W[t>>2],W[t+4>>2],W[t+8>>2],W[t+12>>2])}function _l(e,t,r,n,o){Od.vertexAttribI4ui(e,t,r,n,o)}function yl(e,t){Od.vertexAttribI4ui(e,V[t>>2],V[t+4>>2],V[t+8>>2],V[t+12>>2])}function vl(e,t,r,n,o){Od.vertexAttribIPointer(e,t,r,n,o)}function bl(e,t,r,n,o,i){Od.vertexAttribPointer(e,t,r,!!n,o,i)}function wl(e,t,r,n){Od.viewport(e,t,r,n)}function Tl(e,t,r,n){Od.waitSync(ko.syncs[e],t,Si(r,n))}function Ol(e,t,r){Z.copyWithin(e,t,t+r)}function Pl(e){try{return M.grow(e-X.byteLength+65535>>>16),ue(M.buffer),1}catch(t){O("emscripten_realloc_buffer: Attempted to grow heap from "+X.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function Dl(e){var t=Z.length;I((e>>>=0)>t);var r=2147483648;if(e>r)return O("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147483648 bytes!"),!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);o=Math.min(o,e+100663296);var i=Math.min(r,ce(Math.max(e,o),65536));if(Pl(i))return!0}return O("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1}function xl(e,t,r,n,o,a,s){const c=i.UTF8ToString(e,e+t),u=i.HEAPU8.subarray(o,o+a);let l=i.emscripten_ubq_codec_decoderNextHandle++;var d=ko.textures[s];const p=i.emscripten_ubq_codec_createVideoDecoder(d),f={codec:c,codedWidth:r,codedHeight:n,description:new Uint8Array(u)};return p.configure(f),i.emscripten_ubq_codec_decoders.set(l,{videoDecoder:p,decoderConfig:f,texture:d}),l}function Sl(e,t,r,n,o,a){const s=i.emscripten_ubq_codec_decoders.get(e);"closed"===s.videoDecoder.state&&(s.videoDecoder=i.emscripten_ubq_codec_createVideoDecoder(s.texture),s.videoDecoder.configure(s.decoderConfig));const c=s.videoDecoder,u=i.HEAPU8.subarray(o,o+a),l=new EncodedVideoChunk({type:t?"key":"delta",timestamp:r,duration:n,data:u});try{c.decode(l)}catch(e){return console.error(e),!1}return!0}function Rl(e){i.emscripten_ubq_codec_decoders.get(e).videoDecoder.close(),i.emscripten_ubq_codec_decoders.delete(e)}async function Ml(e){const t=i.emscripten_ubq_codec_decoders.get(e).videoDecoder;await t.flush()}function Al(e){return i.emscripten_ubq_codec_decoders.get(e).videoDecoder.presentedFrames}function kl(){return"VideoFrame"in window}function Fl(e){const t=i.emscripten_ubq_codec_decoders.get(e).videoDecoder;t.presentedFrames=0,t.probing=!0}function Cl(e){i.emscripten_ubq_codec_decoders.get(e).videoDecoder.probing=!1}function Il(e){const t=i.emscripten_ubq_codec_decoders.get(e),r=!0===t.videoDecoder.textureUploadFlag;return t.videoDecoder.textureUploadFlag=!1,r}function Ll(e){if(i.emscripten_ubq_asyncFetchStates.has(e)){const t=i.emscripten_ubq_asyncFetchStates.get(e);if(t.state==s.ALLOCATED)return!0;if(t.state==s.FINISHED){const r=t.result.length,n=i._malloc(r);return i.HEAPU8.set(t.result,n),t.resultAddress=n,t.resultLength=r,t.state=s.ALLOCATED,i.emscripten_ubq_asyncFetchStates.set(e,t),!0}}return!1}function jl(e,t,r,n){let o=i.UTF8ToString(e,t),a=i.UTF8ToString(r,n),s=i.emscripten_ubq_asyncFetchNextHeaderHandle++;return i.emscripten_ubq_asyncFetchHeaders.set(s,{key:o,value:a}),s}function Ul(e){return i.emscripten_ubq_asyncFetchHeaders.has(e)?i.emscripten_ubq_asyncFetchHeaders.get(e):0}function Nl(e,t,r,n,o,a,u,l,d){let p=i.UTF8ToString(t,r),f=i.UTF8ToString(l,d),m=i.emscripten_ubq_asyncFetchNextHandle++;i.emscripten_ubq_asyncFetchStates.set(m,{state:s.PENDING});let g={};for(let e=0;e<o;e++){const t=i.getValue(n+4*e,"i32"),r=i.emscripten_ubq_asyncFetchHeaders.get(t);g[r.key]=r.value}const h=c[e];let E;return"GET"!==h&&"HEAD"!==h&&(E=new Uint8Array(i.HEAPU8.buffer,a,u)),fetch(p,{method:h,headers:g,body:E,mode:"cors",credentials:f}).then((e=>{if(e.status>=200&&e.status<=209){let t=0;async function r(e,t){const r=e.getReader();let n=0,o=[];for(;;){const{done:e,value:t}=await r.read();if(e)break;o.push(t),n+=t.length,i.emscripten_ubq_asyncFetchCompletedBytes.set(m,n)}let a=new Uint8Array(n),s=0;for(let e of o)a.set(e,s),s+=e.length;return a}return e.headers.has("Content-Length")&&(t=+e.headers.get("Content-Length")),i.emscripten_ubq_asyncFetchTotalBytes.set(m,t),r(e.body)}return Promise.reject(e.statusText)})).then((e=>{i.emscripten_ubq_asyncFetchStates.set(m,{state:s.FINISHED,result:e})})).catch((e=>{i.emscripten_ubq_asyncFetchStates.set(m,{state:s.ERROR,error:e})})),m}function Hl(e){return!!i.emscripten_ubq_asyncFetchStates.has(e)&&(i.emscripten_ubq_asyncFetchStates.delete(e),!0)}function Bl(e){return i.emscripten_ubq_asyncFetchCompletedBytes.has(e)?i.emscripten_ubq_asyncFetchCompletedBytes.get(e):0}function Xl(e){if(i.emscripten_ubq_asyncFetchStates.has(e)){const t=i.emscripten_ubq_asyncFetchStates.get(e);if(t.state==s.ALLOCATED)return t.resultAddress}return-1}function Ql(e){if(i.emscripten_ubq_asyncFetchStates.has(e)){const t=i.emscripten_ubq_asyncFetchStates.get(e);if(t.state==s.ALLOCATED)return t.resultLength}return-1}function Zl(e){return i.emscripten_ubq_asyncFetchStates.has(e)?i.emscripten_ubq_asyncFetchStates.get(e).state:-1}function Gl(e){return i.emscripten_ubq_asyncFetchTotalBytes.has(e)?i.emscripten_ubq_asyncFetchTotalBytes.get(e):0}var ql={inEventHandler:0,removeAllEventListeners:function(){for(var e=ql.eventHandlers.length-1;e>=0;--e)ql._removeHandler(e);ql.eventHandlers=[],ql.deferredCalls=[]},registerRemoveEventListeners:function(){ql.removeEventListenersRegistered||(_e.push(ql.removeAllEventListeners),ql.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(e,t,r){function n(e,t){if(e.length!=t.length)return!1;for(var r in e)if(e[r]!=t[r])return!1;return!0}for(var o in ql.deferredCalls){var i=ql.deferredCalls[o];if(i.targetFunction==e&&n(i.argsList,r))return}ql.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),ql.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<ql.deferredCalls.length;++t)ql.deferredCalls[t].targetFunction==e&&(ql.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return ql.inEventHandler&&ql.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(ql.canPerformEventHandlerRequests())for(var e=0;e<ql.deferredCalls.length;++e){var t=ql.deferredCalls[e];ql.deferredCalls.splice(e,1),--e,t.targetFunction.apply(null,t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<ql.eventHandlers.length;++r)ql.eventHandlers[r].target!=e||t&&t!=ql.eventHandlers[r].eventTypeString||ql._removeHandler(r--)},_removeHandler:function(e){var t=ql.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),ql.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++ql.inEventHandler,ql.currentEventHandler=e,ql.runDeferredCalls(),e.handlerFunc(t),ql.runDeferredCalls(),--ql.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),ql.eventHandlers.push(e),ql.registerRemoveEventListeners();else for(var r=0;r<ql.eventHandlers.length;++r)ql.eventHandlers[r].target==e.target&&ql.eventHandlers[r].eventTypeString==e.eventTypeString&&ql._removeHandler(r--)},getNodeNameForTarget:function(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},Wl=["default","low-power","high-performance"];function Vl(e){return e>2?U(e):e}var zl=[0,document,window];function $l(e){return e=Vl(e),zl[e]||document.querySelector(e)}function Yl(e){return $l(e)}function Kl(e,t){I(t);var r=t>>2,n=W[r+6],o={alpha:!!W[r+0],depth:!!W[r+1],stencil:!!W[r+2],antialias:!!W[r+3],premultipliedAlpha:!!W[r+4],preserveDrawingBuffer:!!W[r+5],powerPreference:Wl[n],failIfMajorPerformanceCaveat:!!W[r+7],majorVersion:W[r+8],minorVersion:W[r+9],enableExtensionsByDefault:W[r+10],explicitSwapControl:W[r+11],proxyContextToMainThread:W[r+12],renderViaOffscreenBackBuffer:W[r+13]},i=Yl(e);return i?o.explicitSwapControl?0:ko.createContext(i,o):0}function Jl(e,t){return Kl(e,t)}function ed(e){ko.currentContext==e&&(ko.currentContext=0),ko.deleteContext(e)}function td(e){I(e);for(var t=e>>2,r=0;r<14;++r)W[t+r]=0;W[t+0]=W[t+1]=W[t+3]=W[t+4]=W[t+8]=W[t+10]=1}function rd(e){return ko.makeContextCurrent(e)?0:-5}var nd={};function od(){return d||"./this.program"}function id(){if(!id.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:od()};for(var t in nd)void 0===nd[t]?delete e[t]:e[t]=nd[t];var r=[];for(var t in e)r.push(t+"="+e[t]);id.strings=r}return id.strings}function ad(e,t){var r=0;return id().forEach((function(n,o){var i=t+r;W[e+4*o>>2]=i,se(n,i),r+=n.length+1})),0}function sd(e,t){var r=id();W[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),W[t>>2]=n,0}function cd(e){try{var t=yt.getStreamFromFD(e);return _t.close(t),0}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return e.errno}}function ud(e,t,r,n,o,i){try{I(!o,"offsets over 2^32 not yet supported");var a=yt.getStreamFromFD(e),s=yt.doReadv(a,t,r,n);return W[i>>2]=s,0}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return e.errno}}function ld(e,t,r,n){try{var o=yt.getStreamFromFD(e),i=yt.doReadv(o,t,r);return W[n>>2]=i,0}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return e.errno}}function dd(e,t,r,n,o){try{var i=yt.getStreamFromFD(e),a=4294967296*r+(t>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(_t.llseek(i,a,n),Xe=[i.position>>>0,(Be=i.position,+Math.abs(Be)>=1?Be>0?(0|Math.min(+Math.floor(Be/4294967296),4294967295))>>>0:~~+Math.ceil((Be-+(~~Be>>>0))/4294967296)>>>0:0)],W[o>>2]=Xe[0],W[o+4>>2]=Xe[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return e.errno}}function pd(e,t,r,n){try{var o=yt.getStreamFromFD(e),i=yt.doWritev(o,t,r);return W[n>>2]=i,0}catch(e){if(void 0===_t||!(e instanceof _t.ErrnoError))throw e;return e.errno}}function fd(){return R()}function md(e){var t=Date.now();return W[e>>2]=t/1e3|0,W[e+4>>2]=t%1e3*1e3|0,0}function gd(e){S(e)}function hd(e){return e%4==0&&(e%100!=0||e%400==0)}function Ed(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var _d=[31,29,31,30,31,30,31,31,30,31,30,31],yd=[31,28,31,30,31,30,31,31,30,31,30,31];function vd(e,t){for(var r=new Date(e.getTime());t>0;){var n=hd(r.getFullYear()),o=r.getMonth(),i=(n?_d:yd)[o];if(!(t>i-r.getDate()))return r.setDate(r.getDate()+t),r;t-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function bd(e,t,r,n){var o=W[n+40>>2],i={tm_sec:W[n>>2],tm_min:W[n+4>>2],tm_hour:W[n+8>>2],tm_mday:W[n+12>>2],tm_mon:W[n+16>>2],tm_year:W[n+20>>2],tm_wday:W[n+24>>2],tm_yday:W[n+28>>2],tm_isdst:W[n+32>>2],tm_gmtoff:W[n+36>>2],tm_zone:o?U(o):""},a=U(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in s)a=a.replace(new RegExp(c,"g"),s[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function p(e,t){return d(e,t,"0")}function f(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function m(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 g(e){var t=vd(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=m(r),i=m(n);return f(o,t)<=0?f(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var h={"%a":function(e){return u[e.tm_wday].substring(0,3)},"%A":function(e){return u[e.tm_wday]},"%b":function(e){return l[e.tm_mon].substring(0,3)},"%B":function(e){return l[e.tm_mon]},"%C":function(e){return p((e.tm_year+1900)/100|0,2)},"%d":function(e){return p(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return g(e).toString().substring(2)},"%G":function(e){return g(e)},"%H":function(e){return p(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),p(t,2)},"%j":function(e){return p(e.tm_mday+Ed(hd(e.tm_year+1900)?_d:yd,e.tm_mon-1),3)},"%m":function(e){return p(e.tm_mon+1,2)},"%M":function(e){return p(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return p(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),r=0===t.getDay()?t:vd(t,7-t.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(f(r,n)<0){var o=Ed(hd(n.getFullYear())?_d:yd,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return p(Math.ceil(i/7),2)}return 0===f(r,t)?"01":"00"},"%V":function(e){var t,r=new Date(e.tm_year+1900,0,4),n=new Date(e.tm_year+1901,0,4),o=m(r),i=m(n),a=vd(new Date(e.tm_year+1900,0,1),e.tm_yday);return f(a,o)<0?"53":f(i,a)<=0?"01":(t=o.getFullYear()<e.tm_year+1900?e.tm_yday+32-o.getDate():e.tm_yday+1-o.getDate(),p(Math.ceil(t/7),2))},"%w":function(e){return e.tm_wday},"%W":function(e){var t=new Date(e.tm_year,0,1),r=1===t.getDay()?t:vd(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(f(r,n)<0){var o=Ed(hd(n.getFullYear())?_d:yd,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return p(Math.ceil(i/7),2)}return 0===f(r,t)?"01":"00"},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var c in a=a.replace(/%%/g,"\0\0"),h)a.includes(c)&&(a=a.replace(new RegExp(c,"g"),h[c](i)));var E=Ad(a=a.replace(/\0\0/g,"%"),!1);return E.length>t?0:(ae(E,e),E.length-1)}function wd(e,t,r,n){return bd(e,t,r,n)}function Td(e){var t=Date.now()/1e3|0;return e&&(W[e>>2]=t),t}var Od,Pd=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=_t.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},Dd=365,xd=146;Object.defineProperties(Pd.prototype,{read:{get:function(){return(this.mode&Dd)===Dd},set:function(e){e?this.mode|=Dd:this.mode&=~Dd}},write:{get:function(){return(this.mode&xd)===xd},set:function(e){e?this.mode|=xd:this.mode&=~xd}},isFolder:{get:function(){return _t.isDir(this.mode)}},isDevice:{get:function(){return _t.isChrdev(this.mode)}}}),_t.FSNode=Pd,_t.staticInit(),i.FS_createPath=_t.createPath,i.FS_createDataFile=_t.createDataFile,i.FS_createPreloadedFile=_t.createPreloadedFile,i.FS_createLazyFile=_t.createLazyFile,i.FS_createDevice=_t.createDevice,i.FS_unlink=_t.unlink,Et={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Bt=i.InternalError=Ht(Error,"InternalError"),zt(),Kt=i.BindingError=Ht(Error,"BindingError"),Sr(),Er(),Hr(),Wr=i.UnboundTypeError=Ht(Error,"UnboundTypeError"),cn(),i.requestFullscreen=function(e,t){To.requestFullscreen(e,t)},i.requestFullScreen=function(){To.requestFullScreen()},i.requestAnimationFrame=function(e){To.requestAnimationFrame(e)},i.setCanvasSize=function(e,t,r){To.setCanvasSize(e,t,r)},i.pauseMainLoop=function(){To.mainLoop.pause()},i.resumeMainLoop=function(){To.mainLoop.resume()},i.getUserMedia=function(){To.getUserMedia()},i.createContext=function(e,t,r,n){return To.createContext(e,t,r,n)};for(var Sd=0;Sd<32;++Sd)ga.push(new Array(Sd));var Rd=new Float32Array(288);for(Sd=0;Sd<288;++Sd)vu[Sd]=Rd.subarray(0,Sd+1);var Md=new Int32Array(288);for(Sd=0;Sd<288;++Sd)Tu[Sd]=Md.subarray(0,Sd+1);function Ad(e,t,r){var n=r>0?r:B(e)+1,o=new Array(n),i=N(e,o,0,o.length);return t&&(o.length=i),o}"function"==typeof atob&&atob;var kd,Fd={__assert_fail:rt,__cxa_allocate_exception:nt,__cxa_throw:it,__syscall_fcntl64:vt,__syscall_fstat64:bt,__syscall_fstatat64:wt,__syscall_getdents64:Tt,__syscall_ioctl:Ot,__syscall_lstat64:Pt,__syscall_open:Dt,__syscall_stat64:xt,_dlopen_js:St,_dlsym_js:Rt,_embind_finalize_value_array:Zt,_embind_finalize_value_object:qt,_embind_register_bigint:Wt,_embind_register_bool:tr,_embind_register_class:$r,_embind_register_class_constructor:Kr,_embind_register_class_function:tn,_embind_register_emval:ln,_embind_register_enum:pn,_embind_register_enum_value:mn,_embind_register_float:En,_embind_register_function:_n,_embind_register_integer:vn,_embind_register_memory_view:bn,_embind_register_smart_ptr:wn,_embind_register_std_string:Tn,_embind_register_std_wstring:On,_embind_register_value_array:Pn,_embind_register_value_array_element:Dn,_embind_register_value_object:xn,_embind_register_value_object_field:Sn,_embind_register_void:Rn,_emscripten_throw_longjmp:Mn,_emval_as:An,_emval_call:Fn,_emval_call_method:Un,_emval_call_void_method:Nn,_emval_decref:on,_emval_get_global:Bn,_emval_get_method_caller:Zn,_emval_get_property:Gn,_emval_incref:qn,_emval_instanceof:Wn,_emval_is_string:Vn,_emval_new:Kn,_emval_new_array:Jn,_emval_new_cstring:eo,_emval_new_object:to,_emval_run_destructors:ro,_emval_set_property:no,_emval_take_value:oo,_emval_throw:io,_gmtime_js:ao,_localtime_js:so,_mktime_js:co,_mmap_js:uo,_munmap_js:lo,_tzset_js:fo,abort:mo,clock_gettime:ho,eglChooseConfig:Po,eglCreateContext:Fo,eglCreateWindowSurface:Co,eglDestroyContext:Io,eglDestroySurface:Lo,eglGetConfigAttrib:jo,eglGetDisplay:Uo,eglGetError:No,eglInitialize:Ho,eglMakeCurrent:Bo,eglSwapBuffers:Xo,eglTerminate:Qo,emscripten_console_error:Zo,emscripten_console_log:Go,emscripten_console_warn:qo,emscripten_debugger:Wo,emscripten_get_heap_max:Vo,emscripten_get_now:$n,emscripten_glActiveTexture:zo,emscripten_glAttachShader:$o,emscripten_glBeginQuery:Yo,emscripten_glBeginQueryEXT:Ko,emscripten_glBeginTransformFeedback:Jo,emscripten_glBindAttribLocation:ei,emscripten_glBindBuffer:ti,emscripten_glBindBufferBase:ri,emscripten_glBindBufferRange:ni,emscripten_glBindFramebuffer:oi,emscripten_glBindRenderbuffer:ii,emscripten_glBindSampler:ai,emscripten_glBindTexture:si,emscripten_glBindTransformFeedback:ci,emscripten_glBindVertexArray:ui,emscripten_glBindVertexArrayOES:li,emscripten_glBlendColor:di,emscripten_glBlendEquation:pi,emscripten_glBlendEquationSeparate:fi,emscripten_glBlendFunc:mi,emscripten_glBlendFuncSeparate:gi,emscripten_glBlitFramebuffer:hi,emscripten_glBufferData:Ei,emscripten_glBufferSubData:_i,emscripten_glCheckFramebufferStatus:yi,emscripten_glClear:vi,emscripten_glClearBufferfi:bi,emscripten_glClearBufferfv:wi,emscripten_glClearBufferiv:Ti,emscripten_glClearBufferuiv:Oi,emscripten_glClearColor:Pi,emscripten_glClearDepthf:Di,emscripten_glClearStencil:xi,emscripten_glClientWaitSync:Ri,emscripten_glColorMask:Mi,emscripten_glCompileShader:Ai,emscripten_glCompressedTexImage2D:ki,emscripten_glCompressedTexImage3D:Fi,emscripten_glCompressedTexSubImage2D:Ci,emscripten_glCompressedTexSubImage3D:Ii,emscripten_glCopyBufferSubData:Li,emscripten_glCopyTexImage2D:ji,emscripten_glCopyTexSubImage2D:Ui,emscripten_glCopyTexSubImage3D:Ni,emscripten_glCreateProgram:Hi,emscripten_glCreateShader:Bi,emscripten_glCullFace:Xi,emscripten_glDeleteBuffers:Qi,emscripten_glDeleteFramebuffers:Zi,emscripten_glDeleteProgram:Gi,emscripten_glDeleteQueries:qi,emscripten_glDeleteQueriesEXT:Wi,emscripten_glDeleteRenderbuffers:Vi,emscripten_glDeleteSamplers:zi,emscripten_glDeleteShader:$i,emscripten_glDeleteSync:Yi,emscripten_glDeleteTextures:Ki,emscripten_glDeleteTransformFeedbacks:Ji,emscripten_glDeleteVertexArrays:ea,emscripten_glDeleteVertexArraysOES:ta,emscripten_glDepthFunc:ra,emscripten_glDepthMask:na,emscripten_glDepthRangef:oa,emscripten_glDetachShader:ia,emscripten_glDisable:aa,emscripten_glDisableVertexAttribArray:sa,emscripten_glDrawArrays:ca,emscripten_glDrawArraysInstanced:ua,emscripten_glDrawArraysInstancedANGLE:la,emscripten_glDrawArraysInstancedARB:da,emscripten_glDrawArraysInstancedBaseInstanceWEBGL:pa,emscripten_glDrawArraysInstancedEXT:fa,emscripten_glDrawArraysInstancedNV:ma,emscripten_glDrawBuffers:ha,emscripten_glDrawBuffersEXT:Ea,emscripten_glDrawBuffersWEBGL:_a,emscripten_glDrawElements:ya,emscripten_glDrawElementsInstanced:va,emscripten_glDrawElementsInstancedANGLE:ba,emscripten_glDrawElementsInstancedARB:wa,emscripten_glDrawElementsInstancedBaseVertexBaseInstanceWEBGL:Ta,emscripten_glDrawElementsInstancedEXT:Oa,emscripten_glDrawElementsInstancedNV:Pa,emscripten_glDrawRangeElements:xa,emscripten_glEnable:Sa,emscripten_glEnableVertexAttribArray:Ra,emscripten_glEndQuery:Ma,emscripten_glEndQueryEXT:Aa,emscripten_glEndTransformFeedback:ka,emscripten_glFenceSync:Fa,emscripten_glFinish:Ca,emscripten_glFlush:Ia,emscripten_glFramebufferRenderbuffer:La,emscripten_glFramebufferTexture2D:ja,emscripten_glFramebufferTextureLayer:Ua,emscripten_glFrontFace:Na,emscripten_glGenBuffers:Ba,emscripten_glGenFramebuffers:Xa,emscripten_glGenQueries:Qa,emscripten_glGenQueriesEXT:Za,emscripten_glGenRenderbuffers:Ga,emscripten_glGenSamplers:qa,emscripten_glGenTextures:Wa,emscripten_glGenTransformFeedbacks:Va,emscripten_glGenVertexArrays:za,emscripten_glGenVertexArraysOES:$a,emscripten_glGenerateMipmap:Ya,emscripten_glGetActiveAttrib:Ja,emscripten_glGetActiveUniform:es,emscripten_glGetActiveUniformBlockName:ts,emscripten_glGetActiveUniformBlockiv:rs,emscripten_glGetActiveUniformsiv:ns,emscripten_glGetAttachedShaders:os,emscripten_glGetAttribLocation:is,emscripten_glGetBooleanv:ls,emscripten_glGetBufferParameteri64v:ds,emscripten_glGetBufferParameteriv:ps,emscripten_glGetError:fs,emscripten_glGetFloatv:ms,emscripten_glGetFragDataLocation:gs,emscripten_glGetFramebufferAttachmentParameteriv:hs,emscripten_glGetInteger64i_v:_s,emscripten_glGetInteger64v:ys,emscripten_glGetIntegeri_v:vs,emscripten_glGetIntegerv:bs,emscripten_glGetInternalformativ:ws,emscripten_glGetProgramBinary:Ts,emscripten_glGetProgramInfoLog:Os,emscripten_glGetProgramiv:Ps,emscripten_glGetQueryObjecti64vEXT:Ds,emscripten_glGetQueryObjectivEXT:xs,emscripten_glGetQueryObjectui64vEXT:Ss,emscripten_glGetQueryObjectuiv:Rs,emscripten_glGetQueryObjectuivEXT:Ms,emscripten_glGetQueryiv:As,emscripten_glGetQueryivEXT:ks,emscripten_glGetRenderbufferParameteriv:Fs,emscripten_glGetSamplerParameterfv:Cs,emscripten_glGetSamplerParameteriv:Is,emscripten_glGetShaderInfoLog:Ls,emscripten_glGetShaderPrecisionFormat:js,emscripten_glGetShaderSource:Us,emscripten_glGetShaderiv:Ns,emscripten_glGetString:Bs,emscripten_glGetStringi:Xs,emscripten_glGetSynciv:Qs,emscripten_glGetTexParameterfv:Zs,emscripten_glGetTexParameteriv:Gs,emscripten_glGetTransformFeedbackVarying:qs,emscripten_glGetUniformBlockIndex:Ws,emscripten_glGetUniformIndices:Vs,emscripten_glGetUniformLocation:Ks,emscripten_glGetUniformfv:tc,emscripten_glGetUniformiv:rc,emscripten_glGetUniformuiv:nc,emscripten_glGetVertexAttribIiv:ic,emscripten_glGetVertexAttribIuiv:ac,emscripten_glGetVertexAttribPointerv:sc,emscripten_glGetVertexAttribfv:cc,emscripten_glGetVertexAttribiv:uc,emscripten_glHint:lc,emscripten_glInvalidateFramebuffer:dc,emscripten_glInvalidateSubFramebuffer:pc,emscripten_glIsBuffer:fc,emscripten_glIsEnabled:mc,emscripten_glIsFramebuffer:gc,emscripten_glIsProgram:hc,emscripten_glIsQuery:Ec,emscripten_glIsQueryEXT:_c,emscripten_glIsRenderbuffer:yc,emscripten_glIsSampler:vc,emscripten_glIsShader:bc,emscripten_glIsSync:wc,emscripten_glIsTexture:Tc,emscripten_glIsTransformFeedback:Oc,emscripten_glIsVertexArray:Pc,emscripten_glIsVertexArrayOES:Dc,emscripten_glLineWidth:xc,emscripten_glLinkProgram:Sc,emscripten_glMultiDrawArraysInstancedBaseInstanceWEBGL:Rc,emscripten_glMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL:Mc,emscripten_glPauseTransformFeedback:Ac,emscripten_glPixelStorei:kc,emscripten_glPolygonOffset:Fc,emscripten_glProgramBinary:Cc,emscripten_glProgramParameteri:Ic,emscripten_glQueryCounterEXT:Lc,emscripten_glReadBuffer:jc,emscripten_glReadPixels:Qc,emscripten_glReleaseShaderCompiler:Zc,emscripten_glRenderbufferStorage:Gc,emscripten_glRenderbufferStorageMultisample:qc,emscripten_glResumeTransformFeedback:Wc,emscripten_glSampleCoverage:Vc,emscripten_glSamplerParameterf:zc,emscripten_glSamplerParameterfv:$c,emscripten_glSamplerParameteri:Yc,emscripten_glSamplerParameteriv:Kc,emscripten_glScissor:Jc,emscripten_glShaderBinary:eu,emscripten_glShaderSource:tu,emscripten_glStencilFunc:ru,emscripten_glStencilFuncSeparate:nu,emscripten_glStencilMask:ou,emscripten_glStencilMaskSeparate:iu,emscripten_glStencilOp:au,emscripten_glStencilOpSeparate:su,emscripten_glTexImage2D:cu,emscripten_glTexImage3D:uu,emscripten_glTexParameterf:lu,emscripten_glTexParameterfv:du,emscripten_glTexParameteri:pu,emscripten_glTexParameteriv:fu,emscripten_glTexStorage2D:mu,emscripten_glTexStorage3D:gu,emscripten_glTexSubImage2D:hu,emscripten_glTexSubImage3D:Eu,emscripten_glTransformFeedbackVaryings:_u,emscripten_glUniform1f:yu,emscripten_glUniform1fv:bu,emscripten_glUniform1i:wu,emscripten_glUniform1iv:Ou,emscripten_glUniform1ui:Pu,emscripten_glUniform1uiv:Du,emscripten_glUniform2f:xu,emscripten_glUniform2fv:Su,emscripten_glUniform2i:Ru,emscripten_glUniform2iv:Mu,emscripten_glUniform2ui:Au,emscripten_glUniform2uiv:ku,emscripten_glUniform3f:Fu,emscripten_glUniform3fv:Cu,emscripten_glUniform3i:Iu,emscripten_glUniform3iv:Lu,emscripten_glUniform3ui:ju,emscripten_glUniform3uiv:Uu,emscripten_glUniform4f:Nu,emscripten_glUniform4fv:Hu,emscripten_glUniform4i:Bu,emscripten_glUniform4iv:Xu,emscripten_glUniform4ui:Qu,emscripten_glUniform4uiv:Zu,emscripten_glUniformBlockBinding:Gu,emscripten_glUniformMatrix2fv:qu,emscripten_glUniformMatrix2x3fv:Wu,emscripten_glUniformMatrix2x4fv:Vu,emscripten_glUniformMatrix3fv:zu,emscripten_glUniformMatrix3x2fv:$u,emscripten_glUniformMatrix3x4fv:Yu,emscripten_glUniformMatrix4fv:Ku,emscripten_glUniformMatrix4x2fv:Ju,emscripten_glUniformMatrix4x3fv:el,emscripten_glUseProgram:tl,emscripten_glValidateProgram:rl,emscripten_glVertexAttrib1f:nl,emscripten_glVertexAttrib1fv:ol,emscripten_glVertexAttrib2f:il,emscripten_glVertexAttrib2fv:al,emscripten_glVertexAttrib3f:sl,emscripten_glVertexAttrib3fv:cl,emscripten_glVertexAttrib4f:ul,emscripten_glVertexAttrib4fv:ll,emscripten_glVertexAttribDivisor:dl,emscripten_glVertexAttribDivisorANGLE:pl,emscripten_glVertexAttribDivisorARB:fl,emscripten_glVertexAttribDivisorEXT:ml,emscripten_glVertexAttribDivisorNV:gl,emscripten_glVertexAttribI4i:hl,emscripten_glVertexAttribI4iv:El,emscripten_glVertexAttribI4ui:_l,emscripten_glVertexAttribI4uiv:yl,emscripten_glVertexAttribIPointer:vl,emscripten_glVertexAttribPointer:bl,emscripten_glViewport:wl,emscripten_glWaitSync:Tl,emscripten_memcpy_big:Ol,emscripten_resize_heap:Dl,emscripten_ubq_codec_createDecoder:xl,emscripten_ubq_codec_decodeSample:Sl,emscripten_ubq_codec_destroyDecoder:Rl,emscripten_ubq_codec_flushDecoder:Ml,emscripten_ubq_codec_getNumberOfDecodedFrames:Al,emscripten_ubq_codec_isSupported:kl,emscripten_ubq_codec_startProbing:Fl,emscripten_ubq_codec_stopProbing:Cl,emscripten_ubq_codec_testAndClearTextureUpdateFlag:Il,emscripten_ubq_fetch_allocateFetchResult:Ll,emscripten_ubq_fetch_createHeader:jl,emscripten_ubq_fetch_deleteHeader:Ul,emscripten_ubq_fetch_dispatchAsyncFetch:Nl,emscripten_ubq_fetch_freeFetchResult:Hl,emscripten_ubq_fetch_getFetchCompletedBytes:Bl,emscripten_ubq_fetch_getFetchResultAddress:Xl,emscripten_ubq_fetch_getFetchResultLength:Ql,emscripten_ubq_fetch_getFetchState:Zl,emscripten_ubq_fetch_getFetchTotalBytes:Gl,emscripten_webgl_create_context:Jl,emscripten_webgl_destroy_context:ed,emscripten_webgl_init_context_attributes:td,emscripten_webgl_make_context_current:rd,environ_get:ad,environ_sizes_get:sd,exit:_o,fd_close:cd,fd_pread:ud,fd_read:ld,fd_seek:dd,fd_write:pd,getTempRet0:fd,gettimeofday:md,invoke_ii:qd,invoke_iii:Wd,invoke_iiii:zd,invoke_iiiii:tp,invoke_iiiiii:Kd,invoke_iiiiiii:ep,invoke_v:op,invoke_vi:$d,invoke_vii:Yd,invoke_viii:Vd,invoke_viiii:Jd,invoke_viiiii:rp,invoke_viiiiii:ip,invoke_viiiiiiiii:np,setTempRet0:gd,strftime_l:wd,time:Td},Cd=(ze(),i.___wasm_call_ctors=qe("__wasm_call_ctors"),i._malloc=qe("malloc")),Id=(i._main=qe("main"),i._free=qe("free")),Ld=i.___errno_location=qe("__errno_location"),jd=(i._saveSetjmp=qe("saveSetjmp"),i.___getTypeName=qe("__getTypeName")),Ud=(i.___embind_register_native_and_builtin_types=qe("__embind_register_native_and_builtin_types"),i.___stdio_exit=qe("__stdio_exit")),Nd=(i.___dl_seterr=qe("__dl_seterr"),i._emscripten_main_thread_process_queued_calls=qe("emscripten_main_thread_process_queued_calls"),i._emscripten_builtin_memalign=qe("emscripten_builtin_memalign")),Hd=i._setThrew=qe("setThrew"),Bd=i._emscripten_stack_init=function(){return(Bd=i._emscripten_stack_init=i.asm.emscripten_stack_init).apply(null,arguments)},Xd=(i._emscripten_stack_get_free=function(){return(i._emscripten_stack_get_free=i.asm.emscripten_stack_get_free).apply(null,arguments)},i._emscripten_stack_get_base=function(){return(i._emscripten_stack_get_base=i.asm.emscripten_stack_get_base).apply(null,arguments)},i._emscripten_stack_get_end=function(){return(Xd=i._emscripten_stack_get_end=i.asm.emscripten_stack_get_end).apply(null,arguments)}),Qd=i.stackSave=qe("stackSave"),Zd=i.stackRestore=qe("stackRestore"),Gd=i.stackAlloc=qe("stackAlloc");function qd(e,t){var r=Qd();try{return et(e)(t)}catch(e){if(Zd(r),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function Wd(e,t,r){var n=Qd();try{return et(e)(t,r)}catch(e){if(Zd(n),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function Vd(e,t,r,n){var o=Qd();try{et(e)(t,r,n)}catch(e){if(Zd(o),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function zd(e,t,r,n){var o=Qd();try{return et(e)(t,r,n)}catch(e){if(Zd(o),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function $d(e,t){var r=Qd();try{et(e)(t)}catch(e){if(Zd(r),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function Yd(e,t,r){var n=Qd();try{et(e)(t,r)}catch(e){if(Zd(n),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function Kd(e,t,r,n,o,i){var a=Qd();try{return et(e)(t,r,n,o,i)}catch(e){if(Zd(a),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function Jd(e,t,r,n,o){var i=Qd();try{et(e)(t,r,n,o)}catch(e){if(Zd(i),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function ep(e,t,r,n,o,i,a){var s=Qd();try{return et(e)(t,r,n,o,i,a)}catch(e){if(Zd(s),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function tp(e,t,r,n,o){var i=Qd();try{return et(e)(t,r,n,o)}catch(e){if(Zd(i),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function rp(e,t,r,n,o,i){var a=Qd();try{et(e)(t,r,n,o,i)}catch(e){if(Zd(a),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function np(e,t,r,n,o,i,a,s,c,u){var l=Qd();try{et(e)(t,r,n,o,i,a,s,c,u)}catch(e){if(Zd(l),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function op(e){var t=Qd();try{et(e)()}catch(e){if(Zd(t),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function ip(e,t,r,n,o,i,a){var s=Qd();try{et(e)(t,r,n,o,i,a)}catch(e){if(Zd(s),e!==e+0&&"longjmp"!==e)throw e;Hd(1,0)}}function ap(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function sp(e){I(0==ke,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),I(0==ge.length,"cannot call main when preRun functions remain to be called");var t=i._main,r=(e=e||[]).length+1,n=Gd(4*(r+1));W[n>>2]=ie(d);for(var o=1;o<r;o++)W[(n>>2)+o]=ie(e[o-1]);W[(n>>2)+r]=0;try{var a=t(r,n);return dp(a,!0),a}catch(e){return tt(e)}}function cp(){Bd(),fe()}function up(e){function r(){kd||(kd=!0,i.calledRun=!0,C||(Pe(),De(),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),fp&&sp(e),Se()))}e=e||l,ke>0||(cp(),Oe(),ke>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r(),me()))}function lp(){var e=T,t=O,r=!1;T=O=e=>{r=!0};try{Ud(),["stdout","stderr"].forEach((function(e){var t=_t.analyzePath("/dev/"+e);if(t){var n=t.object.rdev,o=lt.ttys[n];o&&o.output&&o.output.length&&(r=!0)}}))}catch(e){}T=e,O=t,r&&P("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")}function dp(e,t){if(F=e,we||lp(),Te()){if(!t){var r="program exited (with status: "+e+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)";o(r),O(r)}}else xe();pp(e)}function pp(e){F=e,Te()||(i.onExit&&i.onExit(e),C=!0),p(e,new ap(e))}if(i.dynCall_ji=qe("dynCall_ji"),i.dynCall_ijiii=qe("dynCall_ijiii"),i.dynCall_jij=qe("dynCall_jij"),i.dynCall_iiiijii=qe("dynCall_iiiijii"),i.dynCall_jiiji=qe("dynCall_jiiji"),i.dynCall_jj=qe("dynCall_jj"),i.dynCall_iiij=qe("dynCall_iiij"),i.dynCall_jiiiji=qe("dynCall_jiiiji"),i.dynCall_viiij=qe("dynCall_viiij"),i.dynCall_viji=qe("dynCall_viji"),i.dynCall_vijiii=qe("dynCall_vijiii"),i.dynCall_viiiiij=qe("dynCall_viiiiij"),i.dynCall_jiiiijiiiii=qe("dynCall_jiiiijiiiii"),i.dynCall_jii=qe("dynCall_jii"),i.dynCall_iiiij=qe("dynCall_iiiij"),i.dynCall_viij=qe("dynCall_viij"),i.dynCall_iij=qe("dynCall_iij"),i.dynCall_vij=qe("dynCall_vij"),i.dynCall_jiiii=qe("dynCall_jiiii"),i.dynCall_jiiiiii=qe("dynCall_jiiiiii"),i.dynCall_jiiiiji=qe("dynCall_jiiiiji"),i.dynCall_iijj=qe("dynCall_iijj"),i.dynCall_jiji=qe("dynCall_jiji"),i.dynCall_viijii=qe("dynCall_viijii"),i.dynCall_iiiiij=qe("dynCall_iiiiij"),i.dynCall_iiiiijj=qe("dynCall_iiiiijj"),i.dynCall_iiiiiijj=qe("dynCall_iiiiiijj"),Object.getOwnPropertyDescriptor(i,"intArrayFromString")||(i.intArrayFromString=()=>Ne("'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"intArrayToString")||(i.intArrayToString=()=>Ne("'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ccall")||(i.ccall=()=>Ne("'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"cwrap")||(i.cwrap=()=>Ne("'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"setValue")||(i.setValue=()=>Ne("'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),i.getValue=k,Object.getOwnPropertyDescriptor(i,"allocate")||(i.allocate=()=>Ne("'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"UTF8ArrayToString")||(i.UTF8ArrayToString=()=>Ne("'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),i.UTF8ToString=U,Object.getOwnPropertyDescriptor(i,"stringToUTF8Array")||(i.stringToUTF8Array=()=>Ne("'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"stringToUTF8")||(i.stringToUTF8=()=>Ne("'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"lengthBytesUTF8")||(i.lengthBytesUTF8=()=>Ne("'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"stackTrace")||(i.stackTrace=()=>Ne("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"addOnPreRun")||(i.addOnPreRun=()=>Ne("'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"addOnInit")||(i.addOnInit=()=>Ne("'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"addOnPreMain")||(i.addOnPreMain=()=>Ne("'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"addOnExit")||(i.addOnExit=()=>Ne("'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"addOnPostRun")||(i.addOnPostRun=()=>Ne("'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"writeStringToMemory")||(i.writeStringToMemory=()=>Ne("'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"writeArrayToMemory")||(i.writeArrayToMemory=()=>Ne("'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"writeAsciiToMemory")||(i.writeAsciiToMemory=()=>Ne("'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),i.addRunDependency=je,i.removeRunDependency=Ue,Object.getOwnPropertyDescriptor(i,"FS_createFolder")||(i.FS_createFolder=()=>Ne("'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),i.FS_createPath=_t.createPath,i.FS_createDataFile=_t.createDataFile,i.FS_createPreloadedFile=_t.createPreloadedFile,i.FS_createLazyFile=_t.createLazyFile,Object.getOwnPropertyDescriptor(i,"FS_createLink")||(i.FS_createLink=()=>Ne("'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),i.FS_createDevice=_t.createDevice,i.FS_unlink=_t.unlink,Object.getOwnPropertyDescriptor(i,"getLEB")||(i.getLEB=()=>Ne("'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getFunctionTables")||(i.getFunctionTables=()=>Ne("'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"alignFunctionTables")||(i.alignFunctionTables=()=>Ne("'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerFunctions")||(i.registerFunctions=()=>Ne("'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"addFunction")||(i.addFunction=()=>Ne("'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"removeFunction")||(i.removeFunction=()=>Ne("'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getFuncWrapper")||(i.getFuncWrapper=()=>Ne("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"prettyPrint")||(i.prettyPrint=()=>Ne("'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"dynCall")||(i.dynCall=()=>Ne("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getCompilerSetting")||(i.getCompilerSetting=()=>Ne("'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"print")||(i.print=()=>Ne("'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"printErr")||(i.printErr=()=>Ne("'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getTempRet0")||(i.getTempRet0=()=>Ne("'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"setTempRet0")||(i.setTempRet0=()=>Ne("'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"callMain")||(i.callMain=()=>Ne("'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"abort")||(i.abort=()=>Ne("'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"keepRuntimeAlive")||(i.keepRuntimeAlive=()=>Ne("'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"zeroMemory")||(i.zeroMemory=()=>Ne("'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"stringToNewUTF8")||(i.stringToNewUTF8=()=>Ne("'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emscripten_realloc_buffer")||(i.emscripten_realloc_buffer=()=>Ne("'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ENV")||(i.ENV=()=>Ne("'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"withStackSave")||(i.withStackSave=()=>Ne("'withStackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ERRNO_CODES")||(i.ERRNO_CODES=()=>Ne("'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ERRNO_MESSAGES")||(i.ERRNO_MESSAGES=()=>Ne("'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"setErrNo")||(i.setErrNo=()=>Ne("'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"inetPton4")||(i.inetPton4=()=>Ne("'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"inetNtop4")||(i.inetNtop4=()=>Ne("'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"inetPton6")||(i.inetPton6=()=>Ne("'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"inetNtop6")||(i.inetNtop6=()=>Ne("'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"readSockaddr")||(i.readSockaddr=()=>Ne("'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"writeSockaddr")||(i.writeSockaddr=()=>Ne("'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"DNS")||(i.DNS=()=>Ne("'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getHostByName")||(i.getHostByName=()=>Ne("'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"Protocols")||(i.Protocols=()=>Ne("'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"Sockets")||(i.Sockets=()=>Ne("'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getRandomDevice")||(i.getRandomDevice=()=>Ne("'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"traverseStack")||(i.traverseStack=()=>Ne("'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"convertFrameToPC")||(i.convertFrameToPC=()=>Ne("'convertFrameToPC' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"UNWIND_CACHE")||(i.UNWIND_CACHE=()=>Ne("'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"saveInUnwindCache")||(i.saveInUnwindCache=()=>Ne("'saveInUnwindCache' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"convertPCtoSourceLocation")||(i.convertPCtoSourceLocation=()=>Ne("'convertPCtoSourceLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"readAsmConstArgsArray")||(i.readAsmConstArgsArray=()=>Ne("'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"readAsmConstArgs")||(i.readAsmConstArgs=()=>Ne("'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"mainThreadEM_ASM")||(i.mainThreadEM_ASM=()=>Ne("'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"jstoi_q")||(i.jstoi_q=()=>Ne("'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"jstoi_s")||(i.jstoi_s=()=>Ne("'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getExecutableName")||(i.getExecutableName=()=>Ne("'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"listenOnce")||(i.listenOnce=()=>Ne("'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"autoResumeAudioContext")||(i.autoResumeAudioContext=()=>Ne("'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"dynCallLegacy")||(i.dynCallLegacy=()=>Ne("'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getDynCaller")||(i.getDynCaller=()=>Ne("'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"dynCall")||(i.dynCall=()=>Ne("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"callRuntimeCallbacks")||(i.callRuntimeCallbacks=()=>Ne("'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"wasmTableMirror")||(i.wasmTableMirror=()=>Ne("'wasmTableMirror' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"setWasmTableEntry")||(i.setWasmTableEntry=()=>Ne("'setWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getWasmTableEntry")||(i.getWasmTableEntry=()=>Ne("'getWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"handleException")||(i.handleException=()=>Ne("'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"runtimeKeepalivePush")||(i.runtimeKeepalivePush=()=>Ne("'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"runtimeKeepalivePop")||(i.runtimeKeepalivePop=()=>Ne("'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"callUserCallback")||(i.callUserCallback=()=>Ne("'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"maybeExit")||(i.maybeExit=()=>Ne("'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"safeSetTimeout")||(i.safeSetTimeout=()=>Ne("'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"asmjsMangle")||(i.asmjsMangle=()=>Ne("'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"asyncLoad")||(i.asyncLoad=()=>Ne("'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"alignMemory")||(i.alignMemory=()=>Ne("'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"mmapAlloc")||(i.mmapAlloc=()=>Ne("'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"reallyNegative")||(i.reallyNegative=()=>Ne("'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"unSign")||(i.unSign=()=>Ne("'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"reSign")||(i.reSign=()=>Ne("'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"formatString")||(i.formatString=()=>Ne("'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"PATH")||(i.PATH=()=>Ne("'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"PATH_FS")||(i.PATH_FS=()=>Ne("'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"SYSCALLS")||(i.SYSCALLS=()=>Ne("'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getSocketFromFD")||(i.getSocketFromFD=()=>Ne("'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getSocketAddress")||(i.getSocketAddress=()=>Ne("'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"JSEvents")||(i.JSEvents=()=>Ne("'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerKeyEventCallback")||(i.registerKeyEventCallback=()=>Ne("'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),i.specialHTMLTargets=zl,Object.getOwnPropertyDescriptor(i,"maybeCStringToJsString")||(i.maybeCStringToJsString=()=>Ne("'maybeCStringToJsString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"findEventTarget")||(i.findEventTarget=()=>Ne("'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"findCanvasEventTarget")||(i.findCanvasEventTarget=()=>Ne("'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getBoundingClientRect")||(i.getBoundingClientRect=()=>Ne("'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"fillMouseEventData")||(i.fillMouseEventData=()=>Ne("'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerMouseEventCallback")||(i.registerMouseEventCallback=()=>Ne("'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerWheelEventCallback")||(i.registerWheelEventCallback=()=>Ne("'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerUiEventCallback")||(i.registerUiEventCallback=()=>Ne("'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerFocusEventCallback")||(i.registerFocusEventCallback=()=>Ne("'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"fillDeviceOrientationEventData")||(i.fillDeviceOrientationEventData=()=>Ne("'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerDeviceOrientationEventCallback")||(i.registerDeviceOrientationEventCallback=()=>Ne("'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"fillDeviceMotionEventData")||(i.fillDeviceMotionEventData=()=>Ne("'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerDeviceMotionEventCallback")||(i.registerDeviceMotionEventCallback=()=>Ne("'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"screenOrientation")||(i.screenOrientation=()=>Ne("'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"fillOrientationChangeEventData")||(i.fillOrientationChangeEventData=()=>Ne("'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerOrientationChangeEventCallback")||(i.registerOrientationChangeEventCallback=()=>Ne("'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"fillFullscreenChangeEventData")||(i.fillFullscreenChangeEventData=()=>Ne("'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerFullscreenChangeEventCallback")||(i.registerFullscreenChangeEventCallback=()=>Ne("'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerRestoreOldStyle")||(i.registerRestoreOldStyle=()=>Ne("'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"hideEverythingExceptGivenElement")||(i.hideEverythingExceptGivenElement=()=>Ne("'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"restoreHiddenElements")||(i.restoreHiddenElements=()=>Ne("'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"setLetterbox")||(i.setLetterbox=()=>Ne("'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"currentFullscreenStrategy")||(i.currentFullscreenStrategy=()=>Ne("'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"restoreOldWindowedStyle")||(i.restoreOldWindowedStyle=()=>Ne("'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"softFullscreenResizeWebGLRenderTarget")||(i.softFullscreenResizeWebGLRenderTarget=()=>Ne("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"doRequestFullscreen")||(i.doRequestFullscreen=()=>Ne("'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"fillPointerlockChangeEventData")||(i.fillPointerlockChangeEventData=()=>Ne("'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerPointerlockChangeEventCallback")||(i.registerPointerlockChangeEventCallback=()=>Ne("'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerPointerlockErrorEventCallback")||(i.registerPointerlockErrorEventCallback=()=>Ne("'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"requestPointerLock")||(i.requestPointerLock=()=>Ne("'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"fillVisibilityChangeEventData")||(i.fillVisibilityChangeEventData=()=>Ne("'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerVisibilityChangeEventCallback")||(i.registerVisibilityChangeEventCallback=()=>Ne("'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerTouchEventCallback")||(i.registerTouchEventCallback=()=>Ne("'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"fillGamepadEventData")||(i.fillGamepadEventData=()=>Ne("'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerGamepadEventCallback")||(i.registerGamepadEventCallback=()=>Ne("'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerBeforeUnloadEventCallback")||(i.registerBeforeUnloadEventCallback=()=>Ne("'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"fillBatteryEventData")||(i.fillBatteryEventData=()=>Ne("'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"battery")||(i.battery=()=>Ne("'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerBatteryEventCallback")||(i.registerBatteryEventCallback=()=>Ne("'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"setCanvasElementSize")||(i.setCanvasElementSize=()=>Ne("'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getCanvasElementSize")||(i.getCanvasElementSize=()=>Ne("'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"demangle")||(i.demangle=()=>Ne("'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"demangleAll")||(i.demangleAll=()=>Ne("'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"jsStackTrace")||(i.jsStackTrace=()=>Ne("'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"stackTrace")||(i.stackTrace=()=>Ne("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getEnvStrings")||(i.getEnvStrings=()=>Ne("'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"checkWasiClock")||(i.checkWasiClock=()=>Ne("'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"writeI53ToI64")||(i.writeI53ToI64=()=>Ne("'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"writeI53ToI64Clamped")||(i.writeI53ToI64Clamped=()=>Ne("'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"writeI53ToI64Signaling")||(i.writeI53ToI64Signaling=()=>Ne("'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"writeI53ToU64Clamped")||(i.writeI53ToU64Clamped=()=>Ne("'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"writeI53ToU64Signaling")||(i.writeI53ToU64Signaling=()=>Ne("'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"readI53FromI64")||(i.readI53FromI64=()=>Ne("'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"readI53FromU64")||(i.readI53FromU64=()=>Ne("'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"convertI32PairToI53")||(i.convertI32PairToI53=()=>Ne("'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"convertU32PairToI53")||(i.convertU32PairToI53=()=>Ne("'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"setImmediateWrapped")||(i.setImmediateWrapped=()=>Ne("'setImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"clearImmediateWrapped")||(i.clearImmediateWrapped=()=>Ne("'clearImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"polyfillSetImmediate")||(i.polyfillSetImmediate=()=>Ne("'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"uncaughtExceptionCount")||(i.uncaughtExceptionCount=()=>Ne("'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"exceptionLast")||(i.exceptionLast=()=>Ne("'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"exceptionCaught")||(i.exceptionCaught=()=>Ne("'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ExceptionInfo")||(i.ExceptionInfo=()=>Ne("'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"CatchInfo")||(i.CatchInfo=()=>Ne("'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"exception_addRef")||(i.exception_addRef=()=>Ne("'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"exception_decRef")||(i.exception_decRef=()=>Ne("'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"Browser")||(i.Browser=()=>Ne("'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"funcWrappers")||(i.funcWrappers=()=>Ne("'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getFuncWrapper")||(i.getFuncWrapper=()=>Ne("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"setMainLoop")||(i.setMainLoop=()=>Ne("'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"wget")||(i.wget=()=>Ne("'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"FS")||(i.FS=()=>Ne("'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"MEMFS")||(i.MEMFS=()=>Ne("'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"TTY")||(i.TTY=()=>Ne("'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"PIPEFS")||(i.PIPEFS=()=>Ne("'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"SOCKFS")||(i.SOCKFS=()=>Ne("'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"_setNetworkCallback")||(i._setNetworkCallback=()=>Ne("'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"tempFixedLengthArray")||(i.tempFixedLengthArray=()=>Ne("'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"miniTempWebGLFloatBuffers")||(i.miniTempWebGLFloatBuffers=()=>Ne("'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"heapObjectForWebGLType")||(i.heapObjectForWebGLType=()=>Ne("'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"heapAccessShiftForWebGLHeap")||(i.heapAccessShiftForWebGLHeap=()=>Ne("'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"GL")||(i.GL=()=>Ne("'GL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emscriptenWebGLGet")||(i.emscriptenWebGLGet=()=>Ne("'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"computeUnpackAlignedImageSize")||(i.computeUnpackAlignedImageSize=()=>Ne("'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emscriptenWebGLGetTexPixelData")||(i.emscriptenWebGLGetTexPixelData=()=>Ne("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emscriptenWebGLGetUniform")||(i.emscriptenWebGLGetUniform=()=>Ne("'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"webglGetUniformLocation")||(i.webglGetUniformLocation=()=>Ne("'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"webglPrepareUniformLocationsBeforeFirstUse")||(i.webglPrepareUniformLocationsBeforeFirstUse=()=>Ne("'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"webglGetLeftBracePos")||(i.webglGetLeftBracePos=()=>Ne("'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emscriptenWebGLGetVertexAttrib")||(i.emscriptenWebGLGetVertexAttrib=()=>Ne("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"writeGLArray")||(i.writeGLArray=()=>Ne("'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"AL")||(i.AL=()=>Ne("'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"SDL_unicode")||(i.SDL_unicode=()=>Ne("'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"SDL_ttfContext")||(i.SDL_ttfContext=()=>Ne("'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"SDL_audio")||(i.SDL_audio=()=>Ne("'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"SDL")||(i.SDL=()=>Ne("'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"SDL_gfx")||(i.SDL_gfx=()=>Ne("'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"GLUT")||(i.GLUT=()=>Ne("'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"EGL")||(i.EGL=()=>Ne("'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"GLFW_Window")||(i.GLFW_Window=()=>Ne("'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"GLFW")||(i.GLFW=()=>Ne("'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"GLEW")||(i.GLEW=()=>Ne("'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"IDBStore")||(i.IDBStore=()=>Ne("'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"runAndAbortIfError")||(i.runAndAbortIfError=()=>Ne("'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emscriptenWebGLGetIndexed")||(i.emscriptenWebGLGetIndexed=()=>Ne("'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"InternalError")||(i.InternalError=()=>Ne("'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"BindingError")||(i.BindingError=()=>Ne("'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"UnboundTypeError")||(i.UnboundTypeError=()=>Ne("'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"PureVirtualError")||(i.PureVirtualError=()=>Ne("'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"init_embind")||(i.init_embind=()=>Ne("'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"throwInternalError")||(i.throwInternalError=()=>Ne("'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"throwBindingError")||(i.throwBindingError=()=>Ne("'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"throwUnboundTypeError")||(i.throwUnboundTypeError=()=>Ne("'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ensureOverloadTable")||(i.ensureOverloadTable=()=>Ne("'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"exposePublicSymbol")||(i.exposePublicSymbol=()=>Ne("'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"replacePublicSymbol")||(i.replacePublicSymbol=()=>Ne("'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"extendError")||(i.extendError=()=>Ne("'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"createNamedFunction")||(i.createNamedFunction=()=>Ne("'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registeredInstances")||(i.registeredInstances=()=>Ne("'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getBasestPointer")||(i.getBasestPointer=()=>Ne("'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerInheritedInstance")||(i.registerInheritedInstance=()=>Ne("'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"unregisterInheritedInstance")||(i.unregisterInheritedInstance=()=>Ne("'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getInheritedInstance")||(i.getInheritedInstance=()=>Ne("'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getInheritedInstanceCount")||(i.getInheritedInstanceCount=()=>Ne("'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getLiveInheritedInstances")||(i.getLiveInheritedInstances=()=>Ne("'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registeredTypes")||(i.registeredTypes=()=>Ne("'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"awaitingDependencies")||(i.awaitingDependencies=()=>Ne("'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"typeDependencies")||(i.typeDependencies=()=>Ne("'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registeredPointers")||(i.registeredPointers=()=>Ne("'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"registerType")||(i.registerType=()=>Ne("'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"whenDependentTypesAreResolved")||(i.whenDependentTypesAreResolved=()=>Ne("'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"embind_charCodes")||(i.embind_charCodes=()=>Ne("'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"embind_init_charCodes")||(i.embind_init_charCodes=()=>Ne("'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"readLatin1String")||(i.readLatin1String=()=>Ne("'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getTypeName")||(i.getTypeName=()=>Ne("'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"heap32VectorToArray")||(i.heap32VectorToArray=()=>Ne("'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"requireRegisteredType")||(i.requireRegisteredType=()=>Ne("'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getShiftFromSize")||(i.getShiftFromSize=()=>Ne("'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"integerReadValueFromPointer")||(i.integerReadValueFromPointer=()=>Ne("'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"enumReadValueFromPointer")||(i.enumReadValueFromPointer=()=>Ne("'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"floatReadValueFromPointer")||(i.floatReadValueFromPointer=()=>Ne("'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"simpleReadValueFromPointer")||(i.simpleReadValueFromPointer=()=>Ne("'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"runDestructors")||(i.runDestructors=()=>Ne("'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"new_")||(i.new_=()=>Ne("'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"craftInvokerFunction")||(i.craftInvokerFunction=()=>Ne("'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"embind__requireFunction")||(i.embind__requireFunction=()=>Ne("'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"tupleRegistrations")||(i.tupleRegistrations=()=>Ne("'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"structRegistrations")||(i.structRegistrations=()=>Ne("'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"genericPointerToWireType")||(i.genericPointerToWireType=()=>Ne("'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"constNoSmartPtrRawPointerToWireType")||(i.constNoSmartPtrRawPointerToWireType=()=>Ne("'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"nonConstNoSmartPtrRawPointerToWireType")||(i.nonConstNoSmartPtrRawPointerToWireType=()=>Ne("'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"init_RegisteredPointer")||(i.init_RegisteredPointer=()=>Ne("'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"RegisteredPointer")||(i.RegisteredPointer=()=>Ne("'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"RegisteredPointer_getPointee")||(i.RegisteredPointer_getPointee=()=>Ne("'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"RegisteredPointer_destructor")||(i.RegisteredPointer_destructor=()=>Ne("'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"RegisteredPointer_deleteObject")||(i.RegisteredPointer_deleteObject=()=>Ne("'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"RegisteredPointer_fromWireType")||(i.RegisteredPointer_fromWireType=()=>Ne("'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"runDestructor")||(i.runDestructor=()=>Ne("'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"releaseClassHandle")||(i.releaseClassHandle=()=>Ne("'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"finalizationRegistry")||(i.finalizationRegistry=()=>Ne("'finalizationRegistry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"detachFinalizer_deps")||(i.detachFinalizer_deps=()=>Ne("'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"detachFinalizer")||(i.detachFinalizer=()=>Ne("'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"attachFinalizer")||(i.attachFinalizer=()=>Ne("'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"makeClassHandle")||(i.makeClassHandle=()=>Ne("'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"init_ClassHandle")||(i.init_ClassHandle=()=>Ne("'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ClassHandle")||(i.ClassHandle=()=>Ne("'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ClassHandle_isAliasOf")||(i.ClassHandle_isAliasOf=()=>Ne("'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"throwInstanceAlreadyDeleted")||(i.throwInstanceAlreadyDeleted=()=>Ne("'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ClassHandle_clone")||(i.ClassHandle_clone=()=>Ne("'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ClassHandle_delete")||(i.ClassHandle_delete=()=>Ne("'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"deletionQueue")||(i.deletionQueue=()=>Ne("'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ClassHandle_isDeleted")||(i.ClassHandle_isDeleted=()=>Ne("'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"ClassHandle_deleteLater")||(i.ClassHandle_deleteLater=()=>Ne("'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"flushPendingDeletes")||(i.flushPendingDeletes=()=>Ne("'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"delayFunction")||(i.delayFunction=()=>Ne("'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"setDelayFunction")||(i.setDelayFunction=()=>Ne("'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"RegisteredClass")||(i.RegisteredClass=()=>Ne("'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"shallowCopyInternalPointer")||(i.shallowCopyInternalPointer=()=>Ne("'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"downcastPointer")||(i.downcastPointer=()=>Ne("'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"upcastPointer")||(i.upcastPointer=()=>Ne("'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"validateThis")||(i.validateThis=()=>Ne("'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"char_0")||(i.char_0=()=>Ne("'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"char_9")||(i.char_9=()=>Ne("'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"makeLegalFunctionName")||(i.makeLegalFunctionName=()=>Ne("'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emval_handle_array")||(i.emval_handle_array=()=>Ne("'emval_handle_array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emval_free_list")||(i.emval_free_list=()=>Ne("'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emval_symbols")||(i.emval_symbols=()=>Ne("'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"init_emval")||(i.init_emval=()=>Ne("'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"count_emval_handles")||(i.count_emval_handles=()=>Ne("'count_emval_handles' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"get_first_emval")||(i.get_first_emval=()=>Ne("'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"getStringOrSymbol")||(i.getStringOrSymbol=()=>Ne("'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"Emval")||(i.Emval=()=>Ne("'Emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emval_newers")||(i.emval_newers=()=>Ne("'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"craftEmvalAllocator")||(i.craftEmvalAllocator=()=>Ne("'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emval_get_global")||(i.emval_get_global=()=>Ne("'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emval_methodCallers")||(i.emval_methodCallers=()=>Ne("'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"emval_registeredMethods")||(i.emval_registeredMethods=()=>Ne("'emval_registeredMethods' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"warnOnce")||(i.warnOnce=()=>Ne("'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"stackSave")||(i.stackSave=()=>Ne("'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"stackRestore")||(i.stackRestore=()=>Ne("'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"stackAlloc")||(i.stackAlloc=()=>Ne("'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"AsciiToString")||(i.AsciiToString=()=>Ne("'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"stringToAscii")||(i.stringToAscii=()=>Ne("'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"UTF16ToString")||(i.UTF16ToString=()=>Ne("'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"stringToUTF16")||(i.stringToUTF16=()=>Ne("'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"lengthBytesUTF16")||(i.lengthBytesUTF16=()=>Ne("'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"UTF32ToString")||(i.UTF32ToString=()=>Ne("'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"stringToUTF32")||(i.stringToUTF32=()=>Ne("'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"lengthBytesUTF32")||(i.lengthBytesUTF32=()=>Ne("'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"allocateUTF8")||(i.allocateUTF8=()=>Ne("'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(i,"allocateUTF8OnStack")||(i.allocateUTF8OnStack=()=>Ne("'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),i.writeStackCookie=fe,i.checkStackCookie=me,Object.getOwnPropertyDescriptor(i,"ALLOC_NORMAL")||Object.defineProperty(i,"ALLOC_NORMAL",{configurable:!0,get:function(){Ne("'ALLOC_NORMAL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(i,"ALLOC_STACK")||Object.defineProperty(i,"ALLOC_STACK",{configurable:!0,get:function(){Ne("'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Ce=function e(){kd||up(),kd||(Ce=e)},i.run=up,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();var fp=!0;return i.noInitialRun&&(fp=!1),up(),e.ready});var l=r(52934),d=r(7984);const p=u,f=(e,t)=>null!=t?[t,e.split("/").pop()].join(""):new URL(e,window.location.origin);function m(e,t){const r=(0,o.QG)(t),{core:n}=r,u=(0,c.Z)(r);return new Promise(((t,o)=>{let c,m;return p({locateFile:(e,t)=>{if(e.endsWith(".wasm")){const e=f(l,n.baseURL).toString();return c=e,e}if(e.endsWith(".data")){const e=f(d,n.baseURL).toString();return m=e,e}return t+e},print:e=>{e&&"undefined"!==e&&u(e,i.i.Info)},printErr:e=>{e&&"undefined"!==e&&u(e,i.i.Error)},onRuntimeInitialized:()=>{u("Engine has been initialized.",i.i.Info)},logReadFiles:!1,printWithColors:!0}).then((n=>{let i="";"string"==typeof e?i=e:(n.specialHTMLTargets["!canvas"]=e,i="!canvas");const c=n.createEngine(i);if(c.isValid()){const e=c.value();!function(e,t){var r;const n=new s.Z(e);function o(e,t){return n.execute("ubq/settings/set",[e,t])}o("ubq://license",t.license||""),o("ubq://role",(0,a.QL)(t.role)),o("ubq://basePath",t.baseURL),o("ubq://touchScrollingEnabled",!(null===(r=t.featureFlags)||void 0===r?void 0:r.preventScrolling)),Object.entries(t.presets.images||{}).forEach((([e,t])=>{n.execute("ubq/assets/registerImage",[e,t.thumbnailURL||t.imageURL,t.imageURL,t.width,t.height])})),Object.entries(t.presets.typefaces||{}).forEach((([e,t])=>{(t.fonts||[]).forEach((r=>{const o=`${e}_${r.weight}_${r.style}`;n.execute("ubq/assets/registerFont",[o,r.fontURL,t.family,r.weight,r.style])}))})),function(){const{imageMattingOnly:e,singlePageMode:r}=t.featureFlags||{};"VideoFrame"in window||o("ubq://features/videosEnabled",!1),o("ubq://features/singlePageModeEnabled",r),o("cesdk://trackActivePage",!r),o("ubq://features/effectsEnabled",!0)}(),o("ubq://page/title/fontFileUri",t.page.title.fontFileUri),o("ubq://page/title/show",t.page.title.show),o("ubq://page/dimOutOfPageAreas",t.page.dimOutOfPageAreas),function(){if(void 0!==t.scene.maskSpotColor){const{rgbApproximation:e}=t.scene.maskSpotColor,r=(0,a.JY)(Object.assign(Object.assign({},e),{a:1}));n.execute("cesdk/setSpecialSpotColor",r)}}(),function(){var e;const r=null!==(e=t.extensions)&&void 0!==e?e:[];r.entries.forEach((e=>{n.execute("ubq/extension/register",`${r.baseURL+e}`)}))}(),function(){var r;const n=null!==(r=t.variables)&&void 0!==r?r:{};Object.entries(n).forEach((([t,r])=>{(0,s.L)(e.setVariableString(t,r.value.toString()))}))}()}(e,r),t(e)}else{const e=c.error();o(new Error(e.publicMessage())),e.delete()}c.delete()})).catch((e=>{e instanceof Error&&(e.wasmPath=c,e.dataPath=m),o(e)}))}))}},58645:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>o}),function(e){e.Pixel="px",e.Millimeter="mm",e.Inch="in"}(n||(n={}));const o=n},1440:(e,t,r)=>{"use strict";var n;r.d(t,{i:()=>n}),function(e){e.Info="Info",e.Warning="Warning",e.Error="Error"}(n||(n={}))},81867:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>o}),function(e){e.Png="image/png",e.Jpeg="image/jpeg",e.Tga="image/x-tga",e.Binary="application/octet-stream",e.Pdf="application/pdf",e.Zip="application/zip"}(n||(n={}));const o=n;n.Png,n.Jpeg,n.Tga,n.Binary,n.Pdf,n.Zip},68876:(e,t,r)=>{"use strict";var n,o,i,a,s,c;r.d(t,{_h:()=>s,$R:()=>c,uY:()=>u,Gt:()=>l,QL:()=>h,JY:()=>A,tc:()=>w,BN:()=>T,u8:()=>O,fn:()=>k,Kc:()=>M}),r(58645),r(81867),function(e){e.Uninitialized="Uninitialized",e.EngineLoading="EngineLoading",e.AssetsLoading="AssetsLoading",e.EngineReady="EngineReady",e.SceneReady="SceneReady",e.EngineUnsupported="EngineUnsupported",e.EngineLoadingError="EngineLoadingError"}(n||(n={})),function(e){e.Download="download",e.Load="load",e.Decode="decode"}(o||(o={})),function(e){e[e.Pending=0]="Pending",e[e.Ready=1]="Ready",e[e.Error=2]="Error"}(i||(i={})),function(e){e.Added="DesignBlockAddedEvent",e.Updated="DesignBlockUpdatedEvent",e.Removed="DesignBlockRemovedEvent"}(a||(a={})),function(e){e.Scene="//ly.img.ubq/scene",e.Camera="//ly.img.ubq/camera",e.Page="//ly.img.ubq/page",e.Image="//ly.img.ubq/image",e.Video="//ly.img.ubq/video",e.Text="//ly.img.ubq/text",e.Sticker="//ly.img.ubq/sticker",e.VectorPath="//ly.img.ubq/vector_path",e.RectShape="//ly.img.ubq/shapes/rect",e.LineShape="//ly.img.ubq/shapes/line",e.StarShape="//ly.img.ubq/shapes/star",e.PolygonShape="//ly.img.ubq/shapes/polygon",e.EllipseShape="//ly.img.ubq/shapes/ellipse",e.Group="//ly.img.ubq/group"}(s||(s={})),function(e){e.Scene="ubq/designblocks/SceneProps",e.Camera="ubq/designblocks/Camera",e.Page="ubq/designblocks/Page",e.Image="ubq/designblocks/Image",e.Video="ubq/designblocks/Video",e.Sticker="ubq/designblocks/Sticker",e.Text="ubq/designblocks/CompositedText",e.Crop="ubq/types/Crop",e.Scale="ubq/scene/Scale",e.Opacity="ubq/types/Opacity",e.FillColor="ubq/types/FillColor",e.BackgroundColor="ubq/types/BackgroundColor",e.Stroke="ubq/types/Stroke",e.Group="ubq/designblocks/Group",e.VectorPath="ubq/designblocks/VectorPath",e.PendingState="ubq/designblocks/PendingState",e.ErrorState="ubq/designblocks/ErrorState"}(c||(c={}));const u="ubq/designblocks/CommonDesignBlockProps";var l,d,p,f,m,g;function h(e){switch(e){case"Creator":return g.Creator;case"Adopter":return g.Adopter;case"Viewer":return g.Viewer;case"Presenter":return g.Presenter;default:return}}!function(e){e.Transform="ubq/editMode/transform",e.Crop="ubq/editMode/crop",e.Text="ubq/editMode/text"}(l||(l={})),function(e){e[e.Arrow=0]="Arrow",e[e.Move=1]="Move",e[e.MoveNotPermitted=2]="MoveNotPermitted",e[e.Resize=3]="Resize",e[e.Rotate=4]="Rotate",e[e.Text=5]="Text"}(d||(d={})),function(e){e.None="None",e.Normal="Normal",e.Darken="Darken",e.Multiply="Multiply",e.ColorBurn="ColorBurn",e.LinearBurn="LinearBurn",e.DarkenColor="DarkenColor",e.Lighten="Lighten",e.Screen="Screen",e.ColorDodge="ColorDodge",e.Add="Add",e.LightenColor="LightenColor",e.Overlay="Overlay",e.SoftLight="SoftLight",e.HardLight="HardLight",e.VividLight="VividLight",e.LinearLight="LinearLight",e.PinLight="PinLight",e.HardMix="HardMix",e.Difference="Difference",e.Exclusion="Exclusion",e.Subtract="Subtract",e.Divide="Divide"}(p||(p={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Center=2]="Center"}(f||(f={})),function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom",e[e.Center=2]="Center"}(m||(m={})),function(e){e[e.Creator=0]="Creator",e[e.Adopter=1]="Adopter",e[e.Viewer=2]="Viewer",e[e.Presenter=3]="Presenter"}(g||(g={}));const E={c:.75,m:.68,y:.67,k:.9};var _,y,v,b,w,T,O,P,D,x,S,R,M;function A(e){return{colorSpace:_.sRGB,components:{x:e.r,y:e.g,z:e.b,w:e.a},spotColor:{name:"",rgbApproximation:e,cmykApproximation:E}}}function k(e){switch(e){case 0:return w.Left;case 1:return w.Middle;case 2:return w.Right;default:return w.Unknown}}!function(e){e[e.sRGB=0]="sRGB",e[e.CMYK=1]="CMYK",e[e.SpotColor=2]="SpotColor"}(_||(_={})),function(e){e[e.Information=0]="Information",e[e.Warning=1]="Warning",e[e.Error=2]="Error"}(y||(y={})),function(e){e[e.Pixel=0]="Pixel",e[e.Millimeter=1]="Millimeter",e[e.Inch=2]="Inch"}(v||(v={})),function(e){e[e.Began=0]="Began",e[e.Changed=1]="Changed",e[e.Ended=2]="Ended"}(b||(b={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Middle=2]="Middle",e[e.Unknown=255]="Unknown"}(w||(w={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(T||(T={})),function(e){e[e.Key0=0]="Key0",e[e.Key1=1]="Key1",e[e.Key2=2]="Key2",e[e.Key3=3]="Key3",e[e.Key4=4]="Key4",e[e.Key5=5]="Key5",e[e.Key6=6]="Key6",e[e.Key7=7]="Key7",e[e.Key8=8]="Key8",e[e.Key9=9]="Key9",e[e.A=10]="A",e[e.B=11]="B",e[e.C=12]="C",e[e.D=13]="D",e[e.E=14]="E",e[e.F=15]="F",e[e.G=16]="G",e[e.H=17]="H",e[e.I=18]="I",e[e.J=19]="J",e[e.K=20]="K",e[e.L=21]="L",e[e.M=22]="M",e[e.N=23]="N",e[e.O=24]="O",e[e.P=25]="P",e[e.Q=26]="Q",e[e.R=27]="R",e[e.S=28]="S",e[e.T=29]="T",e[e.U=30]="U",e[e.V=31]="V",e[e.W=32]="W",e[e.X=33]="X",e[e.Y=34]="Y",e[e.Z=35]="Z",e[e.ArrowLeft=36]="ArrowLeft",e[e.ArrowRight=37]="ArrowRight",e[e.ArrowUp=38]="ArrowUp",e[e.ArrowDown=39]="ArrowDown",e[e.Backspace=40]="Backspace",e[e.Enter=41]="Enter",e[e.Space=42]="Space",e[e.Escape=43]="Escape",e[e.Delete=44]="Delete",e[e.Control=45]="Control",e[e.Option=46]="Option",e[e.Shift=47]="Shift",e[e.Unknown=255]="Unknown"}(O||(O={})),function(e){e.ImageMatting="imageMatting",e.ImageMattingBackground="imageMattingBackground",e.ImageMattingBackgroundForInpainting="imageMattingBackgroundForInpainting",e.ImageMattingAlphaMatte="imageMattingAlphaMatte",e.ImageMattingInvertedAlphaMatte="imageMattingInvertedAlphaMatte",e.Inpainting="inpainting",e.InpaintingHighRes="inpaintingHighRes",e.SmartCrop="smartCrop",e.SuperResolution="superResolution"}(P||(P={})),function(e){e[e.Thin=100]="Thin",e[e.ExtraLight=200]="ExtraLight",e[e.Light=300]="Light",e[e.Normal=400]="Normal",e[e.Medium=500]="Medium",e[e.SemiBold=600]="SemiBold",e[e.Bold=700]="Bold",e[e.ExtraBold=800]="ExtraBold",e[e.Heavy=900]="Heavy"}(D||(D={})),function(e){e[e.Normal=0]="Normal",e[e.Italic=1]="Italic"}(x||(x={})),function(e){e.Bold="bold",e.Italic="italic"}(S||(S={})),function(e){e[e.Undefined=0]="Undefined",e[e.DesignUnit=1]="DesignUnit",e[e.Percent=2]="Percent",e[e.Auto=3]="Auto"}(R||(R={})),function(e){e[e.Free=0]="Free",e[e.VerticalStack=1]="VerticalStack",e[e.HorizontalStack=2]="HorizontalStack"}(M||(M={}))},72472:(e,t,r)=>{"use strict";var n;r(68876),function(e){e.Unknown="",e.Boolean="bool",e.Boolean2="ubq/math/bool2",e.Int="int",e.UInt8="uint8_t",e.Int32="int32_t",e.UInt32="uint32_t",e.Int2="ubq/math/ivec2",e.Size2="ubq/types/Size2",e.Color="ubq/types/Color",e.Double="double",e.Float="float",e.Float2="ubq/math/vec2",e.Float3="ubq/math/vec3",e.Float4="ubq/math/vec4",e.String="string",e.HorizontalTextAlignment="ubq/types/HorizontalTextAlignment",e.VerticalTextAlignment="ubq/types/VerticalTextAlignment",e.Margin2D="ubq/types/OuterMargin2D"}(n||(n={}))},14545:(e,t,r)=>{"use strict";r(68876),r(72472)},48641:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o,L:()=>i}),r(68876);var n=r(45111);r(72472),r(14545);class o{constructor(e){Object.defineProperty(this,"ubq",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.ubq=e}useInternalAPI(e){const t=this.ubq.getInternalAPI();try{return e(t)}finally{t.delete()}}async createElement(e,t,r){const o=await this.execute("ubq/designblocks/create",e);this.execute("ubq/designblocks/addToParent",[o,t]);const a=i(this.ubq.getLastFrameWidth(t)),s=i(this.ubq.getLastFrameHeight(t)),{position:c,size:u}=(0,n.A5)({x:a,y:s},{x:r.width,y:r.height},8/13);this.execute("ubq/layout/setAbsoluteSize",{id:o,size:{width:u.x,height:u.y}}),u.x||this.execute("ubq/layout/setAutoWidth",{id:o}),u.y||this.execute("ubq/layout/setAutoHeight",{id:o});const l=(0,n.Vg)({x:.08*a,y:.08*s});return await this.execute("ubq/layout/setAbsolutePosition",{id:o,position:{left:c.x+l.x,top:c.y+l.y}}),o}setValue(e,t,r,n){return this.useInternalAPI((o=>i(o.setValue(e,t,r,n))))}getValue(e,t,r){return this.useInternalAPI((n=>i(n.getValue(e,t,r))))}async getEditorState(){return this.execute("ubq/editor/getEditorState")}async setEditorState(e){return this.execute("ubq/editor/setEditorState",e)}async execute(e,t){return new Promise((r=>{this.useInternalAPI((n=>n.ubqExecute(e,t,(e=>{const t=i(e);r(t)})))).delete()}))}}function i(e){if(e.isValid()){const t=e.value();return e.delete(),t}{const t=e.error(),r=t.publicMessage();throw t.delete(),e.delete(),new Error(r)}}},15684:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n}),r(68876);const n=(e,t=!0)=>{const r=[];for(let t=0;t<e.size();t+=1)r.push(e.get(t));return t&&e.delete(),r}},48473:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(68876);function o(e){const t={key:n.u8.Unknown,characters:e.key,shiftIsHeld:e.shiftKey,commandIsHeld:e.metaKey||e.ctrlKey,optionIsHeld:e.altKey,timestamp:Date.now()};switch(e.key.toUpperCase()){case"0":t.key=n.u8.Key0;break;case"1":t.key=n.u8.Key1;break;case"2":t.key=n.u8.Key2;break;case"3":t.key=n.u8.Key3;break;case"4":t.key=n.u8.Key4;break;case"5":t.key=n.u8.Key5;break;case"6":t.key=n.u8.Key6;break;case"7":t.key=n.u8.Key7;break;case"8":t.key=n.u8.Key8;break;case"9":t.key=n.u8.Key9;break;case"A":t.key=n.u8.A;break;case"B":t.key=n.u8.B;break;case"C":t.key=n.u8.C;break;case"D":t.key=n.u8.D;break;case"E":t.key=n.u8.E;break;case"F":t.key=n.u8.F;break;case"G":t.key=n.u8.G;break;case"H":t.key=n.u8.H;break;case"I":t.key=n.u8.I;break;case"J":t.key=n.u8.J;break;case"K":t.key=n.u8.K;break;case"L":t.key=n.u8.L;break;case"M":t.key=n.u8.M;break;case"N":t.key=n.u8.N;break;case"O":t.key=n.u8.O;break;case"P":t.key=n.u8.P;break;case"Q":t.key=n.u8.Q;break;case"R":t.key=n.u8.R;break;case"S":t.key=n.u8.S;break;case"T":t.key=n.u8.T;break;case"U":t.key=n.u8.U;break;case"V":t.key=n.u8.V;break;case"W":t.key=n.u8.W;break;case"X":t.key=n.u8.X;break;case"Y":t.key=n.u8.Y;break;case"Z":t.key=n.u8.Z;break;case" ":t.key=n.u8.Space;break;case"ESCAPE":t.key=n.u8.Escape,t.characters="";break;case"BACKSPACE":t.key=n.u8.Backspace,t.characters="";break;case"DELETE":t.key=n.u8.Delete,t.characters="";break;case"ENTER":t.key=n.u8.Enter,t.characters="\n";break;case"CONTROL":t.key=n.u8.Control,t.characters="";break;case"ALT":t.key=n.u8.Option,t.characters="";break;case"SHIFT":t.key=n.u8.Shift,t.characters="";break;case"ARROWLEFT":t.key=n.u8.ArrowLeft,t.characters="";break;case"ARROWRIGHT":t.key=n.u8.ArrowRight,t.characters="";break;case"ARROWUP":t.key=n.u8.ArrowUp,t.characters="";break;case"ARROWDOWN":t.key=n.u8.ArrowDown,t.characters="";break;case"DEAD":t.key=n.u8.Unknown,t.characters=""}return t}},45111:(e,t,r)=>{"use strict";r.d(t,{A5:()=>o,Vg:()=>i,dA:()=>a});const n=(e,t)=>({x:e.x*t,y:e.y*t});function o(e,t,r=8/13){const o=((e,t)=>{const r=e.x/e.y,o=t.x/t.y;return n(t,r>o?e.y/t.y:e.x/t.x)})(e,t),i=n(o,r);return{position:{x:.5*(e.x-i.x),y:.5*(e.y-i.y)},size:i}}function i(e={x:50,y:50}){return{x:Math.random()*e.x,y:Math.random()*e.y}}function a(e,t,r=Number.EPSILON){return Math.abs(e-t)<r}},7984:(e,t,r)=>{"use strict";e.exports=r.p+"assets/core/cesdk.data"},52934:(e,t,r)=>{"use strict";e.exports=r.p+"assets/core/cesdk.wasm"},17019:(e,t,r)=>{"use strict";r.d(t,{IX:()=>p,O7:()=>f,Ou:()=>d,_L:()=>m,VV:()=>E,PV:()=>_,Rx:()=>g,Z_:()=>h,Gu:()=>l});class n extends TypeError{constructor(e,t){let r;const{message:n,...o}=e,{path:i}=e;super(0===i.length?n:"At path: "+i.join(".")+" -- "+n),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var n;return null!=(n=r)?n:r=[e,...t()]}}}function o(e){return"object"==typeof e&&null!=e}function i(e){return"string"==typeof e?JSON.stringify(e):""+e}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:a}=t,{type:s}=r,{refinement:c,message:u="Expected a value of type `"+s+"`"+(c?" with refinement `"+c+"`":"")+", but received: `"+i(n)+"`"}=e;return{value:n,type:s,refinement:c,key:o[o.length-1],path:o,branch:a,...e,message:u}}function*s(e,t,r,n){var i;o(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=a(o,t,r,n);e&&(yield e)}}function*c(e,t,r={}){const{path:n=[],branch:i=[e],coerce:a=!1,mask:s=!1}=r,u={path:n,branch:i};if(a&&(e=t.coercer(e,u),s&&"type"!==t.type&&o(t.schema)&&o(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let l=!0;for(const r of t.validator(e,u))l=!1,yield[r,void 0];for(let[r,d,p]of t.entries(e,u)){const t=c(d,p,{path:void 0===r?n:[...n,r],branch:void 0===r?i:[...i,d],coerce:a,mask:s});for(const n of t)n[0]?(l=!1,yield[n[0],void 0]):a&&(d=n[1],void 0===r?e=d:e instanceof Map?e.set(r,d):e instanceof Set?e.add(d):o(e)&&(e[r]=d))}if(l)for(const r of t.refiner(e,u))l=!1,yield[r,void 0];l&&(yield[void 0,e])}class u{constructor(e){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:t,schema:r,validator:n,refiner:o,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=i,this.validator=n?(e,t)=>s(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>s(o(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const r=l(e,t);if(r[0])throw r[0]}(e,this)}create(e){return function(e,t){const r=l(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}(e,this)}is(e){return function(e,t){return!l(e,t)[0]}(e,this)}mask(e){return function(e,t){const r=l(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}validate(e,t={}){return l(e,this,t)}}function l(e,t,r={}){const o=c(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(o);return i[0]?[new n(i[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function d(e,t){return new u({type:e,schema:null,validator:t})}function p(e){return new u({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: "+i(e)})}function f(){return d("boolean",(e=>"boolean"==typeof e))}function m(){return d("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: "+i(e)))}function g(){return d("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+i(e)))}function h(){return d("string",(e=>"string"==typeof e||"Expected a string, but received: "+i(e)))}function E(e,t,r={}){const{exclusive:n}=r;return y(e,"min",(r=>n?r>t:r>=t||"Expected a "+e.type+" greater than "+(n?"":"or equal to ")+t+" but received `"+r+"`"))}function _(e){return y(e,"nonempty",(t=>function(e){return e instanceof Map||e instanceof Set?e.size:e.length}(t)>0||"Expected a nonempty "+e.type+" but received an empty one"))}function y(e,t,r){return new u({...e,*refiner(n,o){yield*e.refiner(n,o);const i=s(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={id:e,loaded:!1,exports:{}};return t[e](i,i.exports,n),i.loaded=!0,i.exports}n.m=t,e=[],n.O=(t,r,o,i)=>{if(!r){var a=1/0;for(l=0;l<e.length;l++){for(var[r,o,i]=e[l],s=!0,c=0;c<r.length;c++)(!1&i||a>=i)&&Object.keys(n.O).every((e=>n.O[e](r[c])))?r.splice(c--,1):(s=!1,i<a&&(a=i));if(s){e.splice(l--,1);var u=o();void 0!==u&&(t=u)}}return t}i=i||0;for(var l=e.length;l>0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[r,o,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="",(()=>{var e={763:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var o,i,[a,s,c]=r,u=0;if(a.some((t=>0!==e[t]))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(c)var l=c(n)}for(t&&t(r);u<a.length;u++)i=a[u],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(l)},r=globalThis.webpackChunk_cesdk_cesdk_js=globalThis.webpackChunk_cesdk_cesdk_js||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var o={};return(()=>{"use strict";n.d(o,{default:()=>e});const e=n(86295).ZP})(),(o=n.O(o)).default})()}));