Файловый менеджер - Редактировать - /home/jogoso94/public_html/static/img/logo/scripts.zip
�азад
PK �b[P�S�S S supportcheck.jsnu �[��� "use strict";!function(){var e,t,r,n,o=!!document.querySelector('script[src*="kaspersky"]'),s=[];document.createElement("canvas").getContext("webgl")||s.push("WebGL"),"undefined"==typeof WebAssembly&&s.push("WebAssembly"),"noModule"in HTMLScriptElement.prototype||s.push("JavaScript Modules"),window["Intl"]&&window["Intl"]["Segmenter"]||s.push("Internationalization support (Intl.Segmenter)"),window["C3_ModernJSSupport_OK"]||s.push("Modern JavaScript support"),0!==s.length||o?((e=document.createElement("div")).id="notSupportedWrap",document.body.appendChild(e),(t=document.createElement("h2")).id="notSupportedTitle",t.textContent=o?"Kaspersky Internet Security broke this export":"Software update needed",e.appendChild(t),(t=document.createElement("p")).className="notSupportedMessage",r="This content is not supported because your device's software appears to be out-of-date. ",n=navigator.userAgent,/android/i.test(n)?r+='<br><br>On Android, fix this by making sure the <a href="https://play.google.com/store/apps/details?id=com.google.android.webview">Android System Webview</a> app has updates enabled and is up-to-date.':/iphone|ipad|ipod/i.test(n)?r+="Alternatively if <strong>Lockdown mode</strong> is enabled, try turning it off to view this content.":/msie/i.test(n)||/trident/i.test(n)||/edge\//i.test(n)?r+="<br><br>Note: <strong>Internet Explorer</strong> and the <strong>legacy Edge browser</strong> are not supported. Try using <a href='https://www.google.com/chrome'>Chrome</a> or <a href='https://www.mozilla.org/firefox'>Firefox</a> instead.":o?r="It appears a script was added to this export by Kaspersky software. This prevents the exported project from working. Try disabling Kaspersky and exporting again.":r+="Try installing any available software updates. Alternatively try on a different device.",r+="<br><br><em>Missing features: "+s.join(", ")+"<br>User agent: "+navigator.userAgent+"</em>",t.innerHTML=r,e.appendChild(t),document.addEventListener("deviceready",()=>{navigator["splashscreen"]&&navigator["splashscreen"]["hide"]&&navigator["splashscreen"]["hide"]()})):window["C3_Is_Supported"]=!0}();PK �b[�)[=ō ō c3main.jsnu �[��� import "./../box2d.wasm.js"; // Generated by Construct, the game and animation creation tool // Visit: https://www.construct.net var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS=(t,s)=>function(){return s||(0,t[__getOwnPropNames(t)[0]])((s={exports:{}}).exports,s),s.exports},__copyProps=(s,e,i,r)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let t of __getOwnPropNames(e))__hasOwnProp.call(s,t)||t===i||__defProp(s,t,{get:()=>e[t],enumerable:!(r=__getOwnPropDesc(e,t))||r.enumerable});return s},__toESM=(t,s,e)=>(e=null!=t?__create(__getProtoOf(t)):{},__copyProps(!s&&t&&t.__esModule?e:__defProp(e,"default",{value:t,enumerable:!0}),t)),require_c3runtime=__commonJS({"file-map:scripts/c3runtime.js"(exports,module){{let setMatrixArrayType2=function(t){ARRAY_TYPE=t},toRadian2=function(t){return t*degree},equals$92=function(t,s){return Math.abs(t-s)<=EPSILON*Math.max(1,Math.abs(t),Math.abs(s))},create$82=function(){var t=new ARRAY_TYPE(4);return ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},clone$82=function(t){var s=new ARRAY_TYPE(4);return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s},copy$82=function(t,s){return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t},identity$52=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},fromValues$82=function(t,s,e,i){var r=new ARRAY_TYPE(4);return r[0]=t,r[1]=s,r[2]=e,r[3]=i,r},set$82=function(t,s,e,i,r){return t[0]=s,t[1]=e,t[2]=i,t[3]=r,t},transpose$22=function(t,s){var e;return t===s?(e=s[1],t[1]=s[2],t[2]=e):(t[0]=s[0],t[1]=s[2],t[2]=s[1],t[3]=s[3]),t},invert$52=function(t,s){var e=s[0],i=s[1],r=s[2],n=e*(s=s[3])-r*i;return n?(t[0]=s*(n=1/n),t[1]=-i*n,t[2]=-r*n,t[3]=e*n,t):null},adjoint$22=function(t,s){var e=s[0];return t[0]=s[3],t[1]=-s[1],t[2]=-s[2],t[3]=e,t},determinant$32=function(t){return t[0]*t[3]-t[2]*t[1]},multiply$82=function(t,s,e){var i=s[0],r=s[1],n=s[2],s=s[3],h=e[0],o=e[1],a=e[2],e=e[3];return t[0]=i*h+n*o,t[1]=r*h+s*o,t[2]=i*a+n*e,t[3]=r*a+s*e,t},rotate$42=function(t,s,e){var i=s[0],r=s[1],n=s[2],s=s[3],h=Math.sin(e),e=Math.cos(e);return t[0]=i*e+n*h,t[1]=r*e+s*h,t[2]=i*-h+n*e,t[3]=r*-h+s*e,t},scale$82=function(t,s,e){var i=s[0],r=s[1],n=s[2],s=s[3],h=e[0],e=e[1];return t[0]=i*h,t[1]=r*h,t[2]=n*e,t[3]=s*e,t},fromRotation$42=function(t,s){var e=Math.sin(s),s=Math.cos(s);return t[0]=s,t[1]=e,t[2]=-e,t[3]=s,t},fromScaling$32=function(t,s){return t[0]=s[0],t[1]=0,t[2]=0,t[3]=s[1],t},str$82=function(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},frob$32=function(t){return Math.hypot(t[0],t[1],t[2],t[3])},LDU2=function(t,s,e,i){return t[2]=i[2]/i[0],e[0]=i[0],e[1]=i[1],e[3]=i[3]-t[2]*e[1],[t,s,e]},add$82=function(t,s,e){return t[0]=s[0]+e[0],t[1]=s[1]+e[1],t[2]=s[2]+e[2],t[3]=s[3]+e[3],t},subtract$62=function(t,s,e){return t[0]=s[0]-e[0],t[1]=s[1]-e[1],t[2]=s[2]-e[2],t[3]=s[3]-e[3],t},exactEquals$82=function(t,s){return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]&&t[3]===s[3]},equals$82=function(t,s){var e=t[0],i=t[1],r=t[2],t=t[3],n=s[0],h=s[1],o=s[2],s=s[3];return Math.abs(e-n)<=EPSILON*Math.max(1,Math.abs(e),Math.abs(n))&&Math.abs(i-h)<=EPSILON*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(r-o)<=EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(t-s)<=EPSILON*Math.max(1,Math.abs(t),Math.abs(s))},multiplyScalar$32=function(t,s,e){return t[0]=s[0]*e,t[1]=s[1]*e,t[2]=s[2]*e,t[3]=s[3]*e,t},multiplyScalarAndAdd$32=function(t,s,e,i){return t[0]=s[0]+e[0]*i,t[1]=s[1]+e[1]*i,t[2]=s[2]+e[2]*i,t[3]=s[3]+e[3]*i,t},create$72=function(){var t=new ARRAY_TYPE(6);return ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[4]=0,t[5]=0),t[0]=1,t[3]=1,t},clone$72=function(t){var s=new ARRAY_TYPE(6);return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s[4]=t[4],s[5]=t[5],s},copy$72=function(t,s){return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[4]=s[4],t[5]=s[5],t},identity$42=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},fromValues$72=function(t,s,e,i,r,n){var h=new ARRAY_TYPE(6);return h[0]=t,h[1]=s,h[2]=e,h[3]=i,h[4]=r,h[5]=n,h},set$72=function(t,s,e,i,r,n,h){return t[0]=s,t[1]=e,t[2]=i,t[3]=r,t[4]=n,t[5]=h,t},invert$42=function(t,s){var e=s[0],i=s[1],r=s[2],n=s[3],h=s[4],s=s[5],o=e*n-i*r;return o?(t[0]=n*(o=1/o),t[1]=-i*o,t[2]=-r*o,t[3]=e*o,t[4]=(r*s-n*h)*o,t[5]=(i*h-e*s)*o,t):null},determinant$22=function(t){return t[0]*t[3]-t[1]*t[2]},multiply$72=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=s[3],o=s[4],s=s[5],a=e[0],l=e[1],c=e[2],u=e[3],f=e[4],e=e[5];return t[0]=i*a+n*l,t[1]=r*a+h*l,t[2]=i*c+n*u,t[3]=r*c+h*u,t[4]=i*f+n*e+o,t[5]=r*f+h*e+s,t},rotate$32=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=s[3],o=s[4],s=s[5],a=Math.sin(e),e=Math.cos(e);return t[0]=i*e+n*a,t[1]=r*e+h*a,t[2]=i*-a+n*e,t[3]=r*-a+h*e,t[4]=o,t[5]=s,t},scale$72=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=s[3],o=s[4],s=s[5],a=e[0],e=e[1];return t[0]=i*a,t[1]=r*a,t[2]=n*e,t[3]=h*e,t[4]=o,t[5]=s,t},translate$32=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=s[3],o=s[4],s=s[5],a=e[0],e=e[1];return t[0]=i,t[1]=r,t[2]=n,t[3]=h,t[4]=i*a+n*e+o,t[5]=r*a+h*e+s,t},fromRotation$32=function(t,s){var e=Math.sin(s),s=Math.cos(s);return t[0]=s,t[1]=e,t[2]=-e,t[3]=s,t[4]=0,t[5]=0,t},fromScaling$22=function(t,s){return t[0]=s[0],t[1]=0,t[2]=0,t[3]=s[1],t[4]=0,t[5]=0,t},fromTranslation$32=function(t,s){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=s[0],t[5]=s[1],t},str$72=function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},frob$22=function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],1)},add$72=function(t,s,e){return t[0]=s[0]+e[0],t[1]=s[1]+e[1],t[2]=s[2]+e[2],t[3]=s[3]+e[3],t[4]=s[4]+e[4],t[5]=s[5]+e[5],t},subtract$52=function(t,s,e){return t[0]=s[0]-e[0],t[1]=s[1]-e[1],t[2]=s[2]-e[2],t[3]=s[3]-e[3],t[4]=s[4]-e[4],t[5]=s[5]-e[5],t},multiplyScalar$22=function(t,s,e){return t[0]=s[0]*e,t[1]=s[1]*e,t[2]=s[2]*e,t[3]=s[3]*e,t[4]=s[4]*e,t[5]=s[5]*e,t},multiplyScalarAndAdd$22=function(t,s,e,i){return t[0]=s[0]+e[0]*i,t[1]=s[1]+e[1]*i,t[2]=s[2]+e[2]*i,t[3]=s[3]+e[3]*i,t[4]=s[4]+e[4]*i,t[5]=s[5]+e[5]*i,t},exactEquals$72=function(t,s){return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]&&t[3]===s[3]&&t[4]===s[4]&&t[5]===s[5]},equals$72=function(t,s){var e=t[0],i=t[1],r=t[2],n=t[3],h=t[4],t=t[5],o=s[0],a=s[1],l=s[2],c=s[3],u=s[4],s=s[5];return Math.abs(e-o)<=EPSILON*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(i-a)<=EPSILON*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(r-l)<=EPSILON*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(n-c)<=EPSILON*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(h-u)<=EPSILON*Math.max(1,Math.abs(h),Math.abs(u))&&Math.abs(t-s)<=EPSILON*Math.max(1,Math.abs(t),Math.abs(s))},create$62=function(){var t=new ARRAY_TYPE(9);return ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},fromMat4$12=function(t,s){return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[4],t[4]=s[5],t[5]=s[6],t[6]=s[8],t[7]=s[9],t[8]=s[10],t},clone$62=function(t){var s=new ARRAY_TYPE(9);return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s[4]=t[4],s[5]=t[5],s[6]=t[6],s[7]=t[7],s[8]=t[8],s},copy$62=function(t,s){return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[4]=s[4],t[5]=s[5],t[6]=s[6],t[7]=s[7],t[8]=s[8],t},fromValues$62=function(t,s,e,i,r,n,h,o,a){var l=new ARRAY_TYPE(9);return l[0]=t,l[1]=s,l[2]=e,l[3]=i,l[4]=r,l[5]=n,l[6]=h,l[7]=o,l[8]=a,l},set$62=function(t,s,e,i,r,n,h,o,a,l){return t[0]=s,t[1]=e,t[2]=i,t[3]=r,t[4]=n,t[5]=h,t[6]=o,t[7]=a,t[8]=l,t},identity$32=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},transpose$12=function(t,s){var e,i,r;return t===s?(e=s[1],i=s[2],r=s[5],t[1]=s[3],t[2]=s[6],t[3]=e,t[5]=s[7],t[6]=i,t[7]=r):(t[0]=s[0],t[1]=s[3],t[2]=s[6],t[3]=s[1],t[4]=s[4],t[5]=s[7],t[6]=s[2],t[7]=s[5],t[8]=s[8]),t},invert$32=function(t,s){var e=s[0],i=s[1],r=s[2],n=s[3],h=s[4],o=s[5],a=s[6],l=s[7],c=(s=s[8])*h-o*l,u=-s*n+o*a,f=l*n-h*a,d=e*c+i*u+r*f;return d?(t[0]=c*(d=1/d),t[1]=(-s*i+r*l)*d,t[2]=(o*i-r*h)*d,t[3]=u*d,t[4]=(s*e-r*a)*d,t[5]=(-o*e+r*n)*d,t[6]=f*d,t[7]=(-l*e+i*a)*d,t[8]=(h*e-i*n)*d,t):null},adjoint$12=function(t,s){var e=s[0],i=s[1],r=s[2],n=s[3],h=s[4],o=s[5],a=s[6],l=s[7],s=s[8];return t[0]=h*s-o*l,t[1]=r*l-i*s,t[2]=i*o-r*h,t[3]=o*a-n*s,t[4]=e*s-r*a,t[5]=r*n-e*o,t[6]=n*l-h*a,t[7]=i*a-e*l,t[8]=e*h-i*n,t},determinant$12=function(t){var s=t[0],e=t[3],i=t[4],r=t[5],n=t[6],h=t[7],o=t[8];return s*(o*i-r*h)+t[1]*(-o*e+r*n)+t[2]*(h*e-i*n)},multiply$62=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=s[3],o=s[4],a=s[5],l=s[6],c=s[7],s=s[8],u=e[0],f=e[1],d=e[2],p=e[3],C=e[4],m=e[5],g=e[6],S=e[7],e=e[8];return t[0]=u*i+f*h+d*l,t[1]=u*r+f*o+d*c,t[2]=u*n+f*a+d*s,t[3]=p*i+C*h+m*l,t[4]=p*r+C*o+m*c,t[5]=p*n+C*a+m*s,t[6]=g*i+S*h+e*l,t[7]=g*r+S*o+e*c,t[8]=g*n+S*a+e*s,t},translate$22=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=s[3],o=s[4],a=s[5],l=s[6],c=s[7],s=s[8],u=e[0],e=e[1];return t[0]=i,t[1]=r,t[2]=n,t[3]=h,t[4]=o,t[5]=a,t[6]=u*i+e*h+l,t[7]=u*r+e*o+c,t[8]=u*n+e*a+s,t},rotate$22=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=s[3],o=s[4],a=s[5],l=s[6],c=s[7],s=s[8],u=Math.sin(e),e=Math.cos(e);return t[0]=e*i+u*h,t[1]=e*r+u*o,t[2]=e*n+u*a,t[3]=e*h-u*i,t[4]=e*o-u*r,t[5]=e*a-u*n,t[6]=l,t[7]=c,t[8]=s,t},scale$62=function(t,s,e){var i=e[0],e=e[1];return t[0]=i*s[0],t[1]=i*s[1],t[2]=i*s[2],t[3]=e*s[3],t[4]=e*s[4],t[5]=e*s[5],t[6]=s[6],t[7]=s[7],t[8]=s[8],t},fromTranslation$22=function(t,s){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=s[0],t[7]=s[1],t[8]=1,t},fromRotation$22=function(t,s){var e=Math.sin(s),s=Math.cos(s);return t[0]=s,t[1]=e,t[2]=0,t[3]=-e,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling$12=function(t,s){return t[0]=s[0],t[1]=0,t[2]=0,t[3]=0,t[4]=s[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromMat2d2=function(t,s){return t[0]=s[0],t[1]=s[1],t[2]=0,t[3]=s[2],t[4]=s[3],t[5]=0,t[6]=s[4],t[7]=s[5],t[8]=1,t},fromQuat$12=function(t,s){var e=s[0],i=s[2],r=i+i,e=e*(l=e+e),n=(h=s[1])*l,h=h*(c=h+h),o=i*l,a=i*c,l=(s=s[3])*l,c=s*c,s=s*r;return t[0]=1-h-(i=i*r),t[3]=n-s,t[6]=o+c,t[1]=n+s,t[4]=1-e-i,t[7]=a-l,t[2]=o-c,t[5]=a+l,t[8]=1-e-h,t},normalFromMat42=function(t,s){var e=s[0],i=s[1],r=s[2],n=s[3],h=s[4],o=s[5],a=s[6],l=s[7],c=s[8],u=s[9],f=s[10],d=s[11],p=s[12],C=s[13],m=s[14],g=e*o-i*h,S=e*a-r*h,y=e*l-n*h,_=i*a-r*o,T=i*l-n*o,A=r*l-n*a,E=c*C-u*p,I=c*m-f*p,w=u*m-f*C;return(d=g*(f=f*(s=s[15])-d*m)-S*(u=u*s-d*C)+y*w+_*(c=c*s-d*p)-T*I+A*E)?(t[0]=(o*f-a*u+l*w)*(d=1/d),t[1]=(a*c-h*f-l*I)*d,t[2]=(h*u-o*c+l*E)*d,t[3]=(r*u-i*f-n*w)*d,t[4]=(e*f-r*c+n*I)*d,t[5]=(i*c-e*u-n*E)*d,t[6]=(C*A-m*T+s*_)*d,t[7]=(m*y-p*A-s*S)*d,t[8]=(p*T-C*y+s*g)*d,t):null},projection2=function(t,s,e){return t[0]=2/s,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},str$62=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},frob$12=function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},add$62=function(t,s,e){return t[0]=s[0]+e[0],t[1]=s[1]+e[1],t[2]=s[2]+e[2],t[3]=s[3]+e[3],t[4]=s[4]+e[4],t[5]=s[5]+e[5],t[6]=s[6]+e[6],t[7]=s[7]+e[7],t[8]=s[8]+e[8],t},subtract$42=function(t,s,e){return t[0]=s[0]-e[0],t[1]=s[1]-e[1],t[2]=s[2]-e[2],t[3]=s[3]-e[3],t[4]=s[4]-e[4],t[5]=s[5]-e[5],t[6]=s[6]-e[6],t[7]=s[7]-e[7],t[8]=s[8]-e[8],t},multiplyScalar$12=function(t,s,e){return t[0]=s[0]*e,t[1]=s[1]*e,t[2]=s[2]*e,t[3]=s[3]*e,t[4]=s[4]*e,t[5]=s[5]*e,t[6]=s[6]*e,t[7]=s[7]*e,t[8]=s[8]*e,t},multiplyScalarAndAdd$12=function(t,s,e,i){return t[0]=s[0]+e[0]*i,t[1]=s[1]+e[1]*i,t[2]=s[2]+e[2]*i,t[3]=s[3]+e[3]*i,t[4]=s[4]+e[4]*i,t[5]=s[5]+e[5]*i,t[6]=s[6]+e[6]*i,t[7]=s[7]+e[7]*i,t[8]=s[8]+e[8]*i,t},exactEquals$62=function(t,s){return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]&&t[3]===s[3]&&t[4]===s[4]&&t[5]===s[5]&&t[6]===s[6]&&t[7]===s[7]&&t[8]===s[8]},equals$62=function(t,s){var e=t[0],i=t[1],r=t[2],n=t[3],h=t[4],o=t[5],a=t[6],l=t[7],t=t[8],c=s[0],u=s[1],f=s[2],d=s[3],p=s[4],C=s[5],m=s[6],g=s[7],s=s[8];return Math.abs(e-c)<=EPSILON*Math.max(1,Math.abs(e),Math.abs(c))&&Math.abs(i-u)<=EPSILON*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(r-f)<=EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(n-d)<=EPSILON*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(h-p)<=EPSILON*Math.max(1,Math.abs(h),Math.abs(p))&&Math.abs(o-C)<=EPSILON*Math.max(1,Math.abs(o),Math.abs(C))&&Math.abs(a-m)<=EPSILON*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(l-g)<=EPSILON*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(t-s)<=EPSILON*Math.max(1,Math.abs(t),Math.abs(s))},create$52=function(){var t=new ARRAY_TYPE(16);return ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},clone$52=function(t){var s=new ARRAY_TYPE(16);return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s[4]=t[4],s[5]=t[5],s[6]=t[6],s[7]=t[7],s[8]=t[8],s[9]=t[9],s[10]=t[10],s[11]=t[11],s[12]=t[12],s[13]=t[13],s[14]=t[14],s[15]=t[15],s},copy$52=function(t,s){return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[4]=s[4],t[5]=s[5],t[6]=s[6],t[7]=s[7],t[8]=s[8],t[9]=s[9],t[10]=s[10],t[11]=s[11],t[12]=s[12],t[13]=s[13],t[14]=s[14],t[15]=s[15],t},fromValues$52=function(t,s,e,i,r,n,h,o,a,l,c,u,f,d,p,C){var m=new ARRAY_TYPE(16);return m[0]=t,m[1]=s,m[2]=e,m[3]=i,m[4]=r,m[5]=n,m[6]=h,m[7]=o,m[8]=a,m[9]=l,m[10]=c,m[11]=u,m[12]=f,m[13]=d,m[14]=p,m[15]=C,m},set$52=function(t,s,e,i,r,n,h,o,a,l,c,u,f,d,p,C,m){return t[0]=s,t[1]=e,t[2]=i,t[3]=r,t[4]=n,t[5]=h,t[6]=o,t[7]=a,t[8]=l,t[9]=c,t[10]=u,t[11]=f,t[12]=d,t[13]=p,t[14]=C,t[15]=m,t},identity$22=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},transpose2=function(t,s){var e,i,r,n,h,o;return t===s?(e=s[1],i=s[2],r=s[3],n=s[6],h=s[7],o=s[11],t[1]=s[4],t[2]=s[8],t[3]=s[12],t[4]=e,t[6]=s[9],t[7]=s[13],t[8]=i,t[9]=n,t[11]=s[14],t[12]=r,t[13]=h,t[14]=o):(t[0]=s[0],t[1]=s[4],t[2]=s[8],t[3]=s[12],t[4]=s[1],t[5]=s[5],t[6]=s[9],t[7]=s[13],t[8]=s[2],t[9]=s[6],t[10]=s[10],t[11]=s[14],t[12]=s[3],t[13]=s[7],t[14]=s[11],t[15]=s[15]),t},invert$22=function(t,s){var e=s[0],i=s[1],r=s[2],n=s[3],h=s[4],o=s[5],a=s[6],l=s[7],c=s[8],u=s[9],f=s[10],d=s[11],p=s[12],C=s[13],m=s[14],g=e*o-i*h,S=e*a-r*h,y=e*l-n*h,_=i*a-r*o,T=i*l-n*o,A=r*l-n*a,E=c*C-u*p,I=c*m-f*p,w=c*(s=s[15])-d*p,R=u*m-f*C,M=u*s-d*C,b=f*s-d*m,G=g*b-S*M+y*R+_*w-T*I+A*E;return G?(t[0]=(o*b-a*M+l*R)*(G=1/G),t[1]=(r*M-i*b-n*R)*G,t[2]=(C*A-m*T+s*_)*G,t[3]=(f*T-u*A-d*_)*G,t[4]=(a*w-h*b-l*I)*G,t[5]=(e*b-r*w+n*I)*G,t[6]=(m*y-p*A-s*S)*G,t[7]=(c*A-f*y+d*S)*G,t[8]=(h*M-o*w+l*E)*G,t[9]=(i*w-e*M-n*E)*G,t[10]=(p*T-C*y+s*g)*G,t[11]=(u*y-c*T-d*g)*G,t[12]=(o*I-h*R-a*E)*G,t[13]=(e*R-i*I+r*E)*G,t[14]=(C*S-p*_-m*g)*G,t[15]=(c*_-u*S+f*g)*G,t):null},adjoint2=function(t,s){var e=s[0],i=s[1],r=s[2],n=s[3],h=s[4],o=s[5],a=s[6],l=s[7],c=s[8],u=s[9],f=s[10],d=s[11],p=s[12],C=s[13],m=s[14],g=e*o-i*h,S=e*a-r*h,y=e*l-n*h,_=i*a-r*o,T=i*l-n*o,A=r*l-n*a,E=c*C-u*p,I=c*m-f*p,w=c*(s=s[15])-d*p,R=u*m-f*C,M=u*s-d*C,b=f*s-d*m;return t[0]=o*b-a*M+l*R,t[1]=r*M-i*b-n*R,t[2]=C*A-m*T+s*_,t[3]=f*T-u*A-d*_,t[4]=a*w-h*b-l*I,t[5]=e*b-r*w+n*I,t[6]=m*y-p*A-s*S,t[7]=c*A-f*y+d*S,t[8]=h*M-o*w+l*E,t[9]=i*w-e*M-n*E,t[10]=p*T-C*y+s*g,t[11]=u*y-c*T-d*g,t[12]=o*I-h*R-a*E,t[13]=e*R-i*I+r*E,t[14]=C*S-p*_-m*g,t[15]=c*_-u*S+f*g,t},determinant2=function(t){var s=t[0],e=t[1],i=t[2],r=t[4],n=t[5],h=t[6],o=t[8],a=t[9],l=t[10],c=t[12],u=t[13],f=t[14],d=s*n-e*r,p=s*h-i*r,C=e*h-i*n,m=o*u-a*c,g=o*f-l*c,S=a*f-l*u;return t[7]*(s*S-e*g+i*m)-t[3]*(r*S-n*g+h*m)+t[15]*(o*C-a*p+l*d)-t[11]*(c*C-u*p+f*d)},multiply$52=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=s[3],o=s[4],a=s[5],l=s[6],c=s[7],u=s[8],f=s[9],d=s[10],p=s[11],C=s[12],m=s[13],g=s[14],s=s[15],S=e[0],y=e[1],_=e[2],T=e[3];return t[0]=S*i+y*o+_*u+T*C,t[1]=S*r+y*a+_*f+T*m,t[2]=S*n+y*l+_*d+T*g,t[3]=S*h+y*c+_*p+T*s,t[4]=(S=e[4])*i+(y=e[5])*o+(_=e[6])*u+(T=e[7])*C,t[5]=S*r+y*a+_*f+T*m,t[6]=S*n+y*l+_*d+T*g,t[7]=S*h+y*c+_*p+T*s,t[8]=(S=e[8])*i+(y=e[9])*o+(_=e[10])*u+(T=e[11])*C,t[9]=S*r+y*a+_*f+T*m,t[10]=S*n+y*l+_*d+T*g,t[11]=S*h+y*c+_*p+T*s,t[12]=(S=e[12])*i+(y=e[13])*o+(_=e[14])*u+(T=e[15])*C,t[13]=S*r+y*a+_*f+T*m,t[14]=S*n+y*l+_*d+T*g,t[15]=S*h+y*c+_*p+T*s,t},translate$12=function(t,s,e){var i,r,n,h,o,a,l,c,u,f,d,p,C=e[0],m=e[1],e=e[2];return s===t?(t[12]=s[0]*C+s[4]*m+s[8]*e+s[12],t[13]=s[1]*C+s[5]*m+s[9]*e+s[13],t[14]=s[2]*C+s[6]*m+s[10]*e+s[14],t[15]=s[3]*C+s[7]*m+s[11]*e+s[15]):(i=s[0],r=s[1],n=s[2],h=s[3],o=s[4],a=s[5],l=s[6],c=s[7],u=s[8],f=s[9],d=s[10],p=s[11],t[0]=i,t[1]=r,t[2]=n,t[3]=h,t[4]=o,t[5]=a,t[6]=l,t[7]=c,t[8]=u,t[9]=f,t[10]=d,t[11]=p,t[12]=i*C+o*m+u*e+s[12],t[13]=r*C+a*m+f*e+s[13],t[14]=n*C+l*m+d*e+s[14],t[15]=h*C+c*m+p*e+s[15]),t},scale$52=function(t,s,e){var i=e[0],r=e[1],e=e[2];return t[0]=s[0]*i,t[1]=s[1]*i,t[2]=s[2]*i,t[3]=s[3]*i,t[4]=s[4]*r,t[5]=s[5]*r,t[6]=s[6]*r,t[7]=s[7]*r,t[8]=s[8]*e,t[9]=s[9]*e,t[10]=s[10]*e,t[11]=s[11]*e,t[12]=s[12],t[13]=s[13],t[14]=s[14],t[15]=s[15],t},rotate$12=function(t,s,e,i){var r,n,h,o,a,l,c,u,f,d,p,C,m,g,S,y,_,T,A,E,I=i[0],w=i[1],i=i[2],R=Math.hypot(I,w,i);return R<EPSILON?null:(I*=R=1/R,w*=R,i*=R,R=Math.sin(e),e=Math.cos(e),n=s[0],h=s[1],o=s[2],a=s[3],c=s[5],u=s[6],f=s[7],p=s[9],C=s[10],m=s[11],S=I*w*(r=1-e)-i*R,y=w*w*r+e,_=i*w*r+I*R,T=I*i*r+w*R,A=w*i*r-I*R,E=i*i*r+e,t[0]=n*(e=I*I*r+e)+(l=s[4])*(g=w*I*r+i*R)+(d=s[8])*(i=i*I*r-w*R),t[1]=h*e+c*g+p*i,t[2]=o*e+u*g+C*i,t[3]=a*e+f*g+m*i,t[4]=n*S+l*y+d*_,t[5]=h*S+c*y+p*_,t[6]=o*S+u*y+C*_,t[7]=a*S+f*y+m*_,t[8]=n*T+l*A+d*E,t[9]=h*T+c*A+p*E,t[10]=o*T+u*A+C*E,t[11]=a*T+f*A+m*E,s!==t&&(t[12]=s[12],t[13]=s[13],t[14]=s[14],t[15]=s[15]),t)},rotateX$32=function(t,s,e){var i=Math.sin(e),e=Math.cos(e),r=s[4],n=s[5],h=s[6],o=s[7],a=s[8],l=s[9],c=s[10],u=s[11];return s!==t&&(t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[12]=s[12],t[13]=s[13],t[14]=s[14],t[15]=s[15]),t[4]=r*e+a*i,t[5]=n*e+l*i,t[6]=h*e+c*i,t[7]=o*e+u*i,t[8]=a*e-r*i,t[9]=l*e-n*i,t[10]=c*e-h*i,t[11]=u*e-o*i,t},rotateY$32=function(t,s,e){var i=Math.sin(e),e=Math.cos(e),r=s[0],n=s[1],h=s[2],o=s[3],a=s[8],l=s[9],c=s[10],u=s[11];return s!==t&&(t[4]=s[4],t[5]=s[5],t[6]=s[6],t[7]=s[7],t[12]=s[12],t[13]=s[13],t[14]=s[14],t[15]=s[15]),t[0]=r*e-a*i,t[1]=n*e-l*i,t[2]=h*e-c*i,t[3]=o*e-u*i,t[8]=r*i+a*e,t[9]=n*i+l*e,t[10]=h*i+c*e,t[11]=o*i+u*e,t},rotateZ$32=function(t,s,e){var i=Math.sin(e),e=Math.cos(e),r=s[0],n=s[1],h=s[2],o=s[3],a=s[4],l=s[5],c=s[6],u=s[7];return s!==t&&(t[8]=s[8],t[9]=s[9],t[10]=s[10],t[11]=s[11],t[12]=s[12],t[13]=s[13],t[14]=s[14],t[15]=s[15]),t[0]=r*e+a*i,t[1]=n*e+l*i,t[2]=h*e+c*i,t[3]=o*e+u*i,t[4]=a*e-r*i,t[5]=l*e-n*i,t[6]=c*e-h*i,t[7]=u*e-o*i,t},fromTranslation$12=function(t,s){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t},fromScaling2=function(t,s){return t[0]=s[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=s[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation$12=function(t,s,e){var i,r=e[0],n=e[1],e=e[2],h=Math.hypot(r,n,e);return h<EPSILON?null:(r*=h=1/h,n*=h,e*=h,h=Math.sin(s),s=Math.cos(s),t[0]=r*r*(i=1-s)+s,t[1]=n*r*i+e*h,t[2]=e*r*i-n*h,t[3]=0,t[4]=r*n*i-e*h,t[5]=n*n*i+s,t[6]=e*n*i+r*h,t[7]=0,t[8]=r*e*i+n*h,t[9]=n*e*i-r*h,t[10]=e*e*i+s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation2=function(t,s){var e=Math.sin(s),s=Math.cos(s);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation2=function(t,s){var e=Math.sin(s),s=Math.cos(s);return t[0]=s,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation2=function(t,s){var e=Math.sin(s),s=Math.cos(s);return t[0]=s,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation$12=function(t,s,e){var i=s[0],r=s[2],n=r+r,h=i*(c=i+i),o=i*(u=(l=s[1])+l),i=i*n,a=l*u,l=l*n,c=(s=s[3])*c,u=s*u,s=s*n;return t[0]=1-(a+(r=r*n)),t[1]=o+s,t[2]=i-u,t[3]=0,t[4]=o-s,t[5]=1-(h+r),t[6]=l+c,t[7]=0,t[8]=i+u,t[9]=l-c,t[10]=1-(h+a),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},fromQuat22=function(t,s){var e=new ARRAY_TYPE(3),i=-s[0],r=-s[1],n=-s[2],h=s[3],o=s[4],a=s[5],l=s[6],c=s[7],u=i*i+r*r+n*n+h*h;return 0<u?(e[0]=2*(o*h+c*i+a*n-l*r)/u,e[1]=2*(a*h+c*r+l*i-o*n)/u,e[2]=2*(l*h+c*n+o*r-a*i)/u):(e[0]=2*(o*h+c*i+a*n-l*r),e[1]=2*(a*h+c*r+l*i-o*n),e[2]=2*(l*h+c*n+o*r-a*i)),fromRotationTranslation$12(t,s,e),t},getTranslation$12=function(t,s){return t[0]=s[12],t[1]=s[13],t[2]=s[14],t},getScaling2=function(t,s){var e=s[0],i=s[4],r=s[5],n=s[6],h=s[8],o=s[9],a=s[10];return t[0]=Math.hypot(e,s[1],s[2]),t[1]=Math.hypot(i,r,n),t[2]=Math.hypot(h,o,a),t},getRotation2=function(t,s){var e=new ARRAY_TYPE(3),i=(getScaling2(e,s),1/e[0]),r=1/e[1],e=1/e[2],n=s[0]*i,h=s[1]*r,o=s[2]*e,a=s[4]*i,l=s[5]*r,c=s[6]*e,i=s[8]*i,r=s[9]*r,u=0;return 0<(e=n+l+(s=s[10]*e))?(u=2*Math.sqrt(1+e),t[3]=.25*u,t[0]=(c-r)/u,t[1]=(i-o)/u,t[2]=(h-a)/u):l<n&&s<n?(u=2*Math.sqrt(1+n-l-s),t[3]=(c-r)/u,t[0]=.25*u,t[1]=(h+a)/u,t[2]=(i+o)/u):s<l?(u=2*Math.sqrt(1+l-n-s),t[3]=(i-o)/u,t[0]=(h+a)/u,t[1]=.25*u,t[2]=(c+r)/u):(u=2*Math.sqrt(1+s-n-l),t[3]=(h-a)/u,t[0]=(i+o)/u,t[1]=(c+r)/u,t[2]=.25*u),t},decompose2=function(t,s,e,i){s[0]=i[12],s[1]=i[13],s[2]=i[14];var s=i[0],r=i[1],n=i[2],h=i[4],o=i[5],a=i[6],l=i[8],c=i[9],i=i[10],u=(e[0]=Math.hypot(s,r,n),e[1]=Math.hypot(h,o,a),e[2]=Math.hypot(l,c,i),1/e[0]),f=1/e[1],s=s*u,r=r*f,n=n*(e=1/e[2]),h=h*u,a=a*e,l=l*u,u=c*f,c=i*e,i=0;return 0<(f=s+(o=o*f)+c)?(i=2*Math.sqrt(1+f),t[3]=.25*i,t[0]=(a-u)/i,t[1]=(l-n)/i,t[2]=(r-h)/i):o<s&&c<s?(i=2*Math.sqrt(1+s-o-c),t[3]=(a-u)/i,t[0]=.25*i,t[1]=(r+h)/i,t[2]=(l+n)/i):c<o?(i=2*Math.sqrt(1+o-s-c),t[3]=(l-n)/i,t[0]=(r+h)/i,t[1]=.25*i,t[2]=(a+u)/i):(i=2*Math.sqrt(1+c-s-o),t[3]=(r-h)/i,t[0]=(l+n)/i,t[1]=(a+u)/i,t[2]=.25*i),t},fromRotationTranslationScale2=function(t,s,e,i){var r=(h=s[0])*(c=h+h),n=h*(u=(a=s[1])+a),h=h*(f=(l=s[2])+l),o=a*u,a=a*f,l=l*f,c=(s=s[3])*c,u=s*u,s=s*f,f=i[0],d=i[1],i=i[2];return t[0]=(1-(o+l))*f,t[1]=(n+s)*f,t[2]=(h-u)*f,t[3]=0,t[4]=(n-s)*d,t[5]=(1-(r+l))*d,t[6]=(a+c)*d,t[7]=0,t[8]=(h+u)*i,t[9]=(a-c)*i,t[10]=(1-(r+o))*i,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},fromRotationTranslationScaleOrigin2=function(t,s,e,i,r){var n=(o=s[0])*(u=o+o),h=o*(f=(l=s[1])+l),o=o*(d=(c=s[2])+c),a=l*f,l=l*d,c=c*d,u=(s=s[3])*u,f=s*f,s=s*d,d=i[0],p=i[1],i=i[2],C=r[0],m=r[1],r=r[2],g=(1-(a+c))*d,S=(h+s)*d,d=(o-f)*d,h=(h-s)*p,s=(1-(n+c))*p,c=(l+u)*p,p=(o+f)*i,o=(l-u)*i,f=(1-(n+a))*i;return t[0]=g,t[1]=S,t[2]=d,t[3]=0,t[4]=h,t[5]=s,t[6]=c,t[7]=0,t[8]=p,t[9]=o,t[10]=f,t[11]=0,t[12]=e[0]+C-(g*C+h*m+p*r),t[13]=e[1]+m-(S*C+s*m+o*r),t[14]=e[2]+r-(d*C+c*m+f*r),t[15]=1,t},fromQuat3=function(t,s){var e=s[0],i=s[2],r=i+i,e=e*(l=e+e),n=(h=s[1])*l,h=h*(c=h+h),o=i*l,a=i*c,l=(s=s[3])*l,c=s*c,s=s*r;return t[0]=1-h-(i=i*r),t[1]=n+s,t[2]=o-c,t[3]=0,t[4]=n-s,t[5]=1-e-i,t[6]=a+l,t[7]=0,t[8]=o+c,t[9]=a-l,t[10]=1-e-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum2=function(t,s,e,i,r,n,h){var o=1/(e-s),a=1/(r-i),l=1/(n-h);return t[0]=2*n*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*n*a,t[6]=0,t[7]=0,t[8]=(e+s)*o,t[9]=(r+i)*a,t[10]=(h+n)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=h*n*2*l,t[15]=0,t},perspectiveNO2=function(t,s,e,i,r){return s=1/Math.tan(s/2),t[0]=s/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=r&&r!==1/0?(t[10]=(r+i)*(e=1/(i-r)),t[14]=2*r*i*e):(t[10]=-1,t[14]=-2*i),t},perspectiveZO2=function(t,s,e,i,r){return s=1/Math.tan(s/2),t[0]=s/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=r&&r!==1/0?(t[10]=r*(e=1/(i-r)),t[14]=r*i*e):(t[10]=-1,t[14]=-i),t},perspectiveFromFieldOfView2=function(t,s,e,i){var r=Math.tan(s.upDegrees*Math.PI/180),n=Math.tan(s.downDegrees*Math.PI/180),h=Math.tan(s.leftDegrees*Math.PI/180),o=2/(h+(s=Math.tan(s.rightDegrees*Math.PI/180))),a=2/(r+n);return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=-(h-s)*o*.5,t[9]=(r-n)*a*.5,t[10]=i/(e-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*e/(e-i),t[15]=0,t},orthoNO2=function(t,s,e,i,r,n,h){var o=1/(s-e),a=1/(i-r),l=1/(n-h);return t[0]=-2*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(s+e)*o,t[13]=(r+i)*a,t[14]=(h+n)*l,t[15]=1,t},orthoZO2=function(t,s,e,i,r,n,h){var o=1/(s-e),a=1/(i-r),h=1/(n-h);return t[0]=-2*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=h,t[11]=0,t[12]=(s+e)*o,t[13]=(r+i)*a,t[14]=n*h,t[15]=1,t},lookAt2=function(t,s,e,i){var r,n,h,o,a=s[0],l=s[1],s=s[2],c=i[0],u=i[1],i=i[2],f=e[0],d=e[1],e=e[2];return Math.abs(a-f)<EPSILON&&Math.abs(l-d)<EPSILON&&Math.abs(s-e)<EPSILON?identity$22(t):(f=a-f,d=l-d,e=s-e,r=u*(e*=o=1/Math.hypot(f,d,e))-i*(d*=o),i=i*(f*=o)-c*e,c=c*d-u*f,(o=Math.hypot(r,i,c))?(r*=o=1/o,i*=o,c*=o):c=i=r=0,u=d*c-e*i,n=e*r-f*c,h=f*i-d*r,(o=Math.hypot(u,n,h))?(u*=o=1/o,n*=o,h*=o):h=n=u=0,t[0]=r,t[1]=u,t[2]=f,t[3]=0,t[4]=i,t[5]=n,t[6]=d,t[7]=0,t[8]=c,t[9]=h,t[10]=e,t[11]=0,t[12]=-(r*a+i*l+c*s),t[13]=-(u*a+n*l+h*s),t[14]=-(f*a+d*l+e*s),t[15]=1,t)},targetTo2=function(t,s,e,i){var r=s[0],n=s[1],s=s[2],h=i[0],o=i[1],i=i[2],a=r-e[0],l=n-e[1],c=a*a+l*l+(e=s-e[2])*e,u=(0<c&&(a*=c=1/Math.sqrt(c),l*=c,e*=c),o*e-i*l);return 0<(c=u*u+(i=i*a-h*e)*i+(h=h*l-o*a)*h)&&(u*=c=1/Math.sqrt(c),i*=c,h*=c),t[0]=u,t[1]=i,t[2]=h,t[3]=0,t[4]=l*h-e*i,t[5]=e*u-a*h,t[6]=a*i-l*u,t[7]=0,t[8]=a,t[9]=l,t[10]=e,t[11]=0,t[12]=r,t[13]=n,t[14]=s,t[15]=1,t},str$52=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob2=function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add$52=function(t,s,e){return t[0]=s[0]+e[0],t[1]=s[1]+e[1],t[2]=s[2]+e[2],t[3]=s[3]+e[3],t[4]=s[4]+e[4],t[5]=s[5]+e[5],t[6]=s[6]+e[6],t[7]=s[7]+e[7],t[8]=s[8]+e[8],t[9]=s[9]+e[9],t[10]=s[10]+e[10],t[11]=s[11]+e[11],t[12]=s[12]+e[12],t[13]=s[13]+e[13],t[14]=s[14]+e[14],t[15]=s[15]+e[15],t},subtract$32=function(t,s,e){return t[0]=s[0]-e[0],t[1]=s[1]-e[1],t[2]=s[2]-e[2],t[3]=s[3]-e[3],t[4]=s[4]-e[4],t[5]=s[5]-e[5],t[6]=s[6]-e[6],t[7]=s[7]-e[7],t[8]=s[8]-e[8],t[9]=s[9]-e[9],t[10]=s[10]-e[10],t[11]=s[11]-e[11],t[12]=s[12]-e[12],t[13]=s[13]-e[13],t[14]=s[14]-e[14],t[15]=s[15]-e[15],t},multiplyScalar2=function(t,s,e){return t[0]=s[0]*e,t[1]=s[1]*e,t[2]=s[2]*e,t[3]=s[3]*e,t[4]=s[4]*e,t[5]=s[5]*e,t[6]=s[6]*e,t[7]=s[7]*e,t[8]=s[8]*e,t[9]=s[9]*e,t[10]=s[10]*e,t[11]=s[11]*e,t[12]=s[12]*e,t[13]=s[13]*e,t[14]=s[14]*e,t[15]=s[15]*e,t},multiplyScalarAndAdd2=function(t,s,e,i){return t[0]=s[0]+e[0]*i,t[1]=s[1]+e[1]*i,t[2]=s[2]+e[2]*i,t[3]=s[3]+e[3]*i,t[4]=s[4]+e[4]*i,t[5]=s[5]+e[5]*i,t[6]=s[6]+e[6]*i,t[7]=s[7]+e[7]*i,t[8]=s[8]+e[8]*i,t[9]=s[9]+e[9]*i,t[10]=s[10]+e[10]*i,t[11]=s[11]+e[11]*i,t[12]=s[12]+e[12]*i,t[13]=s[13]+e[13]*i,t[14]=s[14]+e[14]*i,t[15]=s[15]+e[15]*i,t},exactEquals$52=function(t,s){return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]&&t[3]===s[3]&&t[4]===s[4]&&t[5]===s[5]&&t[6]===s[6]&&t[7]===s[7]&&t[8]===s[8]&&t[9]===s[9]&&t[10]===s[10]&&t[11]===s[11]&&t[12]===s[12]&&t[13]===s[13]&&t[14]===s[14]&&t[15]===s[15]},equals$52=function(t,s){var e=t[0],i=t[1],r=t[2],n=t[3],h=t[4],o=t[5],a=t[6],l=t[7],c=t[8],u=t[9],f=t[10],d=t[11],p=t[12],C=t[13],m=t[14],t=t[15],g=s[0],S=s[1],y=s[2],_=s[3],T=s[4],A=s[5],E=s[6],I=s[7],w=s[8],R=s[9],M=s[10],b=s[11],G=s[12],v=s[13],P=s[14],s=s[15];return Math.abs(e-g)<=EPSILON*Math.max(1,Math.abs(e),Math.abs(g))&&Math.abs(i-S)<=EPSILON*Math.max(1,Math.abs(i),Math.abs(S))&&Math.abs(r-y)<=EPSILON*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(n-_)<=EPSILON*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(h-T)<=EPSILON*Math.max(1,Math.abs(h),Math.abs(T))&&Math.abs(o-A)<=EPSILON*Math.max(1,Math.abs(o),Math.abs(A))&&Math.abs(a-E)<=EPSILON*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(l-I)<=EPSILON*Math.max(1,Math.abs(l),Math.abs(I))&&Math.abs(c-w)<=EPSILON*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(u-R)<=EPSILON*Math.max(1,Math.abs(u),Math.abs(R))&&Math.abs(f-M)<=EPSILON*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(d-b)<=EPSILON*Math.max(1,Math.abs(d),Math.abs(b))&&Math.abs(p-G)<=EPSILON*Math.max(1,Math.abs(p),Math.abs(G))&&Math.abs(C-v)<=EPSILON*Math.max(1,Math.abs(C),Math.abs(v))&&Math.abs(m-P)<=EPSILON*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(t-s)<=EPSILON*Math.max(1,Math.abs(t),Math.abs(s))},create$42=function(){var t=new ARRAY_TYPE(3);return ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t},clone$42=function(t){var s=new ARRAY_TYPE(3);return s[0]=t[0],s[1]=t[1],s[2]=t[2],s},length$42=function(t){var s=t[0];return Math.hypot(s,t[1],t[2])},fromValues$42=function(t,s,e){var i=new ARRAY_TYPE(3);return i[0]=t,i[1]=s,i[2]=e,i},copy$42=function(t,s){return t[0]=s[0],t[1]=s[1],t[2]=s[2],t},set$42=function(t,s,e,i){return t[0]=s,t[1]=e,t[2]=i,t},add$42=function(t,s,e){return t[0]=s[0]+e[0],t[1]=s[1]+e[1],t[2]=s[2]+e[2],t},subtract$22=function(t,s,e){return t[0]=s[0]-e[0],t[1]=s[1]-e[1],t[2]=s[2]-e[2],t},multiply$42=function(t,s,e){return t[0]=s[0]*e[0],t[1]=s[1]*e[1],t[2]=s[2]*e[2],t},divide$22=function(t,s,e){return t[0]=s[0]/e[0],t[1]=s[1]/e[1],t[2]=s[2]/e[2],t},ceil$22=function(t,s){return t[0]=Math.ceil(s[0]),t[1]=Math.ceil(s[1]),t[2]=Math.ceil(s[2]),t},floor$22=function(t,s){return t[0]=Math.floor(s[0]),t[1]=Math.floor(s[1]),t[2]=Math.floor(s[2]),t},min$22=function(t,s,e){return t[0]=Math.min(s[0],e[0]),t[1]=Math.min(s[1],e[1]),t[2]=Math.min(s[2],e[2]),t},max$22=function(t,s,e){return t[0]=Math.max(s[0],e[0]),t[1]=Math.max(s[1],e[1]),t[2]=Math.max(s[2],e[2]),t},round$22=function(t,s){return t[0]=Math.round(s[0]),t[1]=Math.round(s[1]),t[2]=Math.round(s[2]),t},scale$42=function(t,s,e){return t[0]=s[0]*e,t[1]=s[1]*e,t[2]=s[2]*e,t},scaleAndAdd$22=function(t,s,e,i){return t[0]=s[0]+e[0]*i,t[1]=s[1]+e[1]*i,t[2]=s[2]+e[2]*i,t},distance$22=function(t,s){var e=s[0]-t[0];return Math.hypot(e,s[1]-t[1],s[2]-t[2])},squaredDistance$22=function(t,s){var e=s[0]-t[0],i=s[1]-t[1];return e*e+i*i+(s=s[2]-t[2])*s},squaredLength$42=function(t){var s=t[0],e=t[1];return s*s+e*e+(t=t[2])*t},negate$22=function(t,s){return t[0]=-s[0],t[1]=-s[1],t[2]=-s[2],t},inverse$22=function(t,s){return t[0]=1/s[0],t[1]=1/s[1],t[2]=1/s[2],t},normalize$42=function(t,s){var e=s[0],i=s[1],r=s[2];return 0<(e=e*e+i*i+r*r)&&(e=1/Math.sqrt(e)),t[0]=s[0]*e,t[1]=s[1]*e,t[2]=s[2]*e,t},dot$42=function(t,s){return t[0]*s[0]+t[1]*s[1]+t[2]*s[2]},cross$22=function(t,s,e){var i=s[0],r=s[1],s=s[2],n=e[0],h=e[1],e=e[2];return t[0]=r*e-s*h,t[1]=s*n-i*e,t[2]=i*h-r*n,t},lerp$42=function(t,s,e,i){var r=s[0],n=s[1],s=s[2];return t[0]=r+i*(e[0]-r),t[1]=n+i*(e[1]-n),t[2]=s+i*(e[2]-s),t},slerp$12=function(t,s,e,i){var r=Math.acos(Math.min(Math.max(dot$42(s,e),-1),1)),n=Math.sin(r),h=Math.sin((1-i)*r)/n,i=Math.sin(i*r)/n;return t[0]=h*s[0]+i*e[0],t[1]=h*s[1]+i*e[1],t[2]=h*s[2]+i*e[2],t},hermite2=function(t,s,e,i,r,n){var h=n*n,o=h*(2*n-3)+1,a=h*(n-2)+n,l=h*(n-1);return t[0]=s[0]*o+e[0]*a+i[0]*l+r[0]*(h=h*(3-2*n)),t[1]=s[1]*o+e[1]*a+i[1]*l+r[1]*h,t[2]=s[2]*o+e[2]*a+i[2]*l+r[2]*h,t},bezier2=function(t,s,e,i,r,n){var h=1-n,o=h*h,a=n*n,l=o*h;return t[0]=s[0]*l+e[0]*(o=3*n*o)+i[0]*(h=3*a*h)+r[0]*(a=a*n),t[1]=s[1]*l+e[1]*o+i[1]*h+r[1]*a,t[2]=s[2]*l+e[2]*o+i[2]*h+r[2]*a,t},random$32=function(t,s){s=s||1;var e=2*RANDOM()*Math.PI,i=2*RANDOM()-1,r=Math.sqrt(1-i*i)*s;return t[0]=Math.cos(e)*r,t[1]=Math.sin(e)*r,t[2]=i*s,t},transformMat4$22=function(t,s,e){var i=s[0],r=s[1],s=s[2],n=e[3]*i+e[7]*r+e[11]*s+e[15];return t[0]=(e[0]*i+e[4]*r+e[8]*s+e[12])/(n=n||1),t[1]=(e[1]*i+e[5]*r+e[9]*s+e[13])/n,t[2]=(e[2]*i+e[6]*r+e[10]*s+e[14])/n,t},transformMat3$12=function(t,s,e){var i=s[0],r=s[1],s=s[2];return t[0]=i*e[0]+r*e[3]+s*e[6],t[1]=i*e[1]+r*e[4]+s*e[7],t[2]=i*e[2]+r*e[5]+s*e[8],t},transformQuat$12=function(t,s,e){var i=e[0],r=e[1],n=s[0],h=s[1],o=r*(s=s[2])-(u=e[2])*h,a=u*n-i*s,l=i*h-r*n,c=r*l-u*a,u=u*o-i*l,i=i*a-r*o;return a*=r=2*e[3],l*=r,u*=2,i*=2,t[0]=n+(o*=r)+(c*=2),t[1]=h+a+u,t[2]=s+l+i,t},rotateX$22=function(t,s,e,i){var r=[],n=[];return r[0]=s[0]-e[0],r[1]=s[1]-e[1],r[2]=s[2]-e[2],n[0]=r[0],n[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),n[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t},rotateY$22=function(t,s,e,i){var r=[],n=[];return r[0]=s[0]-e[0],r[1]=s[1]-e[1],r[2]=s[2]-e[2],n[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),n[1]=r[1],n[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t},rotateZ$22=function(t,s,e,i){var r=[],n=[];return r[0]=s[0]-e[0],r[1]=s[1]-e[1],r[2]=s[2]-e[2],n[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),n[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),n[2]=r[2],t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t},angle$12=function(t,s){var e=t[0],i=t[1],r=t[2],n=s[0],h=s[1],o=s[2],i=(e=Math.sqrt((e*e+i*i+r*r)*(n*n+h*h+o*o)))&&dot$42(t,s)/e;return Math.acos(Math.min(Math.max(i,-1),1))},zero$22=function(t){return t[0]=0,t[1]=0,t[2]=0,t},str$42=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},exactEquals$42=function(t,s){return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]},equals$42=function(t,s){var e=t[0],i=t[1],t=t[2],r=s[0],n=s[1],s=s[2];return Math.abs(e-r)<=EPSILON*Math.max(1,Math.abs(e),Math.abs(r))&&Math.abs(i-n)<=EPSILON*Math.max(1,Math.abs(i),Math.abs(n))&&Math.abs(t-s)<=EPSILON*Math.max(1,Math.abs(t),Math.abs(s))},create$32=function(){var t=new ARRAY_TYPE(4);return ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t},clone$32=function(t){var s=new ARRAY_TYPE(4);return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s},fromValues$32=function(t,s,e,i){var r=new ARRAY_TYPE(4);return r[0]=t,r[1]=s,r[2]=e,r[3]=i,r},copy$32=function(t,s){return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t},set$32=function(t,s,e,i,r){return t[0]=s,t[1]=e,t[2]=i,t[3]=r,t},add$32=function(t,s,e){return t[0]=s[0]+e[0],t[1]=s[1]+e[1],t[2]=s[2]+e[2],t[3]=s[3]+e[3],t},subtract$12=function(t,s,e){return t[0]=s[0]-e[0],t[1]=s[1]-e[1],t[2]=s[2]-e[2],t[3]=s[3]-e[3],t},multiply$32=function(t,s,e){return t[0]=s[0]*e[0],t[1]=s[1]*e[1],t[2]=s[2]*e[2],t[3]=s[3]*e[3],t},divide$12=function(t,s,e){return t[0]=s[0]/e[0],t[1]=s[1]/e[1],t[2]=s[2]/e[2],t[3]=s[3]/e[3],t},ceil$12=function(t,s){return t[0]=Math.ceil(s[0]),t[1]=Math.ceil(s[1]),t[2]=Math.ceil(s[2]),t[3]=Math.ceil(s[3]),t},floor$12=function(t,s){return t[0]=Math.floor(s[0]),t[1]=Math.floor(s[1]),t[2]=Math.floor(s[2]),t[3]=Math.floor(s[3]),t},min$12=function(t,s,e){return t[0]=Math.min(s[0],e[0]),t[1]=Math.min(s[1],e[1]),t[2]=Math.min(s[2],e[2]),t[3]=Math.min(s[3],e[3]),t},max$12=function(t,s,e){return t[0]=Math.max(s[0],e[0]),t[1]=Math.max(s[1],e[1]),t[2]=Math.max(s[2],e[2]),t[3]=Math.max(s[3],e[3]),t},round$12=function(t,s){return t[0]=Math.round(s[0]),t[1]=Math.round(s[1]),t[2]=Math.round(s[2]),t[3]=Math.round(s[3]),t},scale$32=function(t,s,e){return t[0]=s[0]*e,t[1]=s[1]*e,t[2]=s[2]*e,t[3]=s[3]*e,t},scaleAndAdd$12=function(t,s,e,i){return t[0]=s[0]+e[0]*i,t[1]=s[1]+e[1]*i,t[2]=s[2]+e[2]*i,t[3]=s[3]+e[3]*i,t},distance$12=function(t,s){var e=s[0]-t[0];return Math.hypot(e,s[1]-t[1],s[2]-t[2],s[3]-t[3])},squaredDistance$12=function(t,s){var e=s[0]-t[0],i=s[1]-t[1],r=s[2]-t[2];return e*e+i*i+r*r+(s=s[3]-t[3])*s},length$32=function(t){var s=t[0];return Math.hypot(s,t[1],t[2],t[3])},squaredLength$32=function(t){var s=t[0],e=t[1],i=t[2];return s*s+e*e+i*i+(t=t[3])*t},negate$12=function(t,s){return t[0]=-s[0],t[1]=-s[1],t[2]=-s[2],t[3]=-s[3],t},inverse$12=function(t,s){return t[0]=1/s[0],t[1]=1/s[1],t[2]=1/s[2],t[3]=1/s[3],t},normalize$32=function(t,s){var e=s[0],i=s[1],r=s[2],n=e*e+i*i+r*r+(s=s[3])*s;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e*n,t[1]=i*n,t[2]=r*n,t[3]=s*n,t},dot$32=function(t,s){return t[0]*s[0]+t[1]*s[1]+t[2]*s[2]+t[3]*s[3]},cross$12=function(t,s,e,i){var r=e[0]*i[1]-e[1]*i[0],n=e[0]*i[2]-e[2]*i[0],h=e[0]*i[3]-e[3]*i[0],o=e[1]*i[2]-e[2]*i[1],a=e[1]*i[3]-e[3]*i[1],e=e[2]*i[3]-e[3]*i[2],i=s[0],l=s[1],c=s[2],s=s[3];return t[0]=l*e-c*a+s*o,t[1]=-i*e+c*h-s*n,t[2]=i*a-l*h+s*r,t[3]=-i*o+l*n-c*r,t},lerp$32=function(t,s,e,i){var r=s[0],n=s[1],h=s[2],s=s[3];return t[0]=r+i*(e[0]-r),t[1]=n+i*(e[1]-n),t[2]=h+i*(e[2]-h),t[3]=s+i*(e[3]-s),t},random$22=function(t,s){var e,i,r,n,h,o;for(s=s||1;1<=(h=(e=2*RANDOM()-1)*e+(i=2*RANDOM()-1)*i););for(;1<=(o=(r=2*RANDOM()-1)*r+(n=2*RANDOM()-1)*n););var a=Math.sqrt((1-h)/o);return t[0]=s*e,t[1]=s*i,t[2]=s*r*a,t[3]=s*n*a,t},transformMat4$12=function(t,s,e){var i=s[0],r=s[1],n=s[2],s=s[3];return t[0]=e[0]*i+e[4]*r+e[8]*n+e[12]*s,t[1]=e[1]*i+e[5]*r+e[9]*n+e[13]*s,t[2]=e[2]*i+e[6]*r+e[10]*n+e[14]*s,t[3]=e[3]*i+e[7]*r+e[11]*n+e[15]*s,t},transformQuat2=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=e[0],o=e[1],a=e[2],l=(e=e[3])*i+o*n-a*r,c=e*r+a*i-h*n,u=e*n+h*r-o*i;return t[0]=l*e+(i=-h*i-o*r-a*n)*-h+c*-a-u*-o,t[1]=c*e+i*-o+u*-h-l*-a,t[2]=u*e+i*-a+l*-o-c*-h,t[3]=s[3],t},zero$12=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},str$32=function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals$32=function(t,s){return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]&&t[3]===s[3]},equals$32=function(t,s){var e=t[0],i=t[1],r=t[2],t=t[3],n=s[0],h=s[1],o=s[2],s=s[3];return Math.abs(e-n)<=EPSILON*Math.max(1,Math.abs(e),Math.abs(n))&&Math.abs(i-h)<=EPSILON*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(r-o)<=EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(t-s)<=EPSILON*Math.max(1,Math.abs(t),Math.abs(s))},create$22=function(){var t=new ARRAY_TYPE(4);return ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t},identity$12=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},setAxisAngle2=function(t,s,e){e*=.5;var i=Math.sin(e);return t[0]=i*s[0],t[1]=i*s[1],t[2]=i*s[2],t[3]=Math.cos(e),t},getAxisAngle2=function(t,s){var e=2*Math.acos(s[3]),i=Math.sin(e/2);return EPSILON<i?(t[0]=s[0]/i,t[1]=s[1]/i,t[2]=s[2]/i):(t[0]=1,t[1]=0,t[2]=0),e},getAngle2=function(t,s){return t=dot$2(t,s),Math.acos(2*t*t-1)},multiply$22=function(t,s,e){var i=s[0],r=s[1],n=s[2],s=s[3],h=e[0],o=e[1],a=e[2],e=e[3];return t[0]=i*e+s*h+r*a-n*o,t[1]=r*e+s*o+n*h-i*a,t[2]=n*e+s*a+i*o-r*h,t[3]=s*e-i*h-r*o-n*a,t},rotateX$12=function(t,s,e){e*=.5;var i=s[0],r=s[1],n=s[2],s=s[3],h=Math.sin(e),e=Math.cos(e);return t[0]=i*e+s*h,t[1]=r*e+n*h,t[2]=n*e-r*h,t[3]=s*e-i*h,t},rotateY$12=function(t,s,e){e*=.5;var i=s[0],r=s[1],n=s[2],s=s[3],h=Math.sin(e),e=Math.cos(e);return t[0]=i*e-n*h,t[1]=r*e+s*h,t[2]=n*e+i*h,t[3]=s*e-r*h,t},rotateZ$12=function(t,s,e){e*=.5;var i=s[0],r=s[1],n=s[2],s=s[3],h=Math.sin(e),e=Math.cos(e);return t[0]=i*e+r*h,t[1]=r*e-i*h,t[2]=n*e+s*h,t[3]=s*e-n*h,t},calculateW2=function(t,s){var e=s[0],i=s[1],s=s[2];return t[0]=e,t[1]=i,t[2]=s,t[3]=Math.sqrt(Math.abs(1-e*e-i*i-s*s)),t},exp2=function(t,s){var e=s[0],i=s[1],r=s[2],s=s[3],n=Math.sqrt(e*e+i*i+r*r),s=Math.exp(s),h=0<n?s*Math.sin(n)/n:0;return t[0]=e*h,t[1]=i*h,t[2]=r*h,t[3]=s*Math.cos(n),t},ln2=function(t,s){var e=s[0],i=s[1],r=s[2],s=s[3],n=0<(n=Math.sqrt(e*e+i*i+r*r))?Math.atan2(n,s)/n:0;return t[0]=e*n,t[1]=i*n,t[2]=r*n,t[3]=.5*Math.log(e*e+i*i+r*r+s*s),t},pow2=function(t,s,e){return ln2(t,s),scale$2(t,t,e),exp2(t,t),t},slerp2=function(t,s,e,i){var r,n,h=s[0],o=s[1],a=s[2],s=s[3],l=e[0],c=e[1],u=e[2],f=h*l+o*c+a*u+s*(e=e[3]);return f<0&&(f=-f,l=-l,c=-c,u=-u,e=-e),f=EPSILON<1-f?(f=Math.acos(f),r=Math.sin(f),n=Math.sin((1-i)*f)/r,Math.sin(i*f)/r):(n=1-i,i),t[0]=n*h+f*l,t[1]=n*o+f*c,t[2]=n*a+f*u,t[3]=n*s+f*e,t},random$12=function(t){var s=RANDOM(),e=RANDOM(),i=RANDOM(),r=Math.sqrt(1-s),s=Math.sqrt(s);return t[0]=r*Math.sin(2*Math.PI*e),t[1]=r*Math.cos(2*Math.PI*e),t[2]=s*Math.sin(2*Math.PI*i),t[3]=s*Math.cos(2*Math.PI*i),t},invert$12=function(t,s){var e=s[0],i=s[1],r=s[2],n=e*e+i*i+r*r+(s=s[3])*s;return t[0]=-e*(n=n?1/n:0),t[1]=-i*n,t[2]=-r*n,t[3]=s*n,t},conjugate$12=function(t,s){return t[0]=-s[0],t[1]=-s[1],t[2]=-s[2],t[3]=s[3],t},fromMat32=function(t,s){var e,i,r,n=s[0]+s[4]+s[8];return 0<n?(r=Math.sqrt(n+1),t[3]=.5*r,t[0]=(s[5]-s[7])*(r=.5/r),t[1]=(s[6]-s[2])*r,t[2]=(s[1]-s[3])*r):(e=(1+(n=s[3*(n=s[4]>s[0]?1:0)+n]<s[8]?2:n))%3,i=(2+n)%3,r=Math.sqrt(s[3*n+n]-s[3*e+e]-s[3*i+i]+1),t[n]=.5*r,t[3]=(s[3*e+i]-s[3*i+e])*(r=.5/r),t[e]=(s[3*e+n]+s[3*n+e])*r,t[i]=(s[3*i+n]+s[3*n+i])*r),t},fromEuler2=function(t,s,e,i){var r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:ANGLE_ORDER,n=Math.PI/360,h=(i*=n,e*=n,Math.sin(s*=n)),o=Math.cos(s),a=Math.sin(e),l=Math.cos(e),c=Math.sin(i),u=Math.cos(i);switch(r){case"xyz":t[0]=h*l*u+o*a*c,t[1]=o*a*u-h*l*c,t[2]=o*l*c+h*a*u,t[3]=o*l*u-h*a*c;break;case"xzy":t[0]=h*l*u-o*a*c,t[1]=o*a*u-h*l*c,t[2]=o*l*c+h*a*u,t[3]=o*l*u+h*a*c;break;case"yxz":t[0]=h*l*u+o*a*c,t[1]=o*a*u-h*l*c,t[2]=o*l*c-h*a*u,t[3]=o*l*u+h*a*c;break;case"yzx":t[0]=h*l*u+o*a*c,t[1]=o*a*u+h*l*c,t[2]=o*l*c-h*a*u,t[3]=o*l*u-h*a*c;break;case"zxy":t[0]=h*l*u-o*a*c,t[1]=o*a*u+h*l*c,t[2]=o*l*c+h*a*u,t[3]=o*l*u-h*a*c;break;case"zyx":t[0]=h*l*u-o*a*c,t[1]=o*a*u+h*l*c,t[2]=o*l*c-h*a*u,t[3]=o*l*u+h*a*c;break;default:throw new Error("Unknown angle order "+r)}return t},str$22=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},equals$22=function(t,s){return Math.abs(dot$32(t,s))>=1-EPSILON},create$12=function(){var t=new ARRAY_TYPE(8);return ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0),t[3]=1,t},clone$12=function(t){var s=new ARRAY_TYPE(8);return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s[4]=t[4],s[5]=t[5],s[6]=t[6],s[7]=t[7],s},fromValues$12=function(t,s,e,i,r,n,h,o){var a=new ARRAY_TYPE(8);return a[0]=t,a[1]=s,a[2]=e,a[3]=i,a[4]=r,a[5]=n,a[6]=h,a[7]=o,a},fromRotationTranslationValues2=function(t,s,e,i,r,n,h){var o=new ARRAY_TYPE(8),r=(o[0]=t,o[1]=s,o[2]=e,o[3]=i,.5*r),n=.5*n,h=.5*h;return o[4]=r*i+n*e-h*s,o[5]=n*i+h*t-r*e,o[6]=h*i+r*s-n*t,o[7]=-r*t-n*s-h*e,o},fromRotationTranslation2=function(t,s,e){var i=.5*e[0],r=.5*e[1],e=.5*e[2],n=s[0],h=s[1],o=s[2],s=s[3];return t[0]=n,t[1]=h,t[2]=o,t[3]=s,t[4]=i*s+r*o-e*h,t[5]=r*s+e*n-i*o,t[6]=e*s+i*h-r*n,t[7]=-i*n-r*h-e*o,t},fromTranslation2=function(t,s){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=.5*s[0],t[5]=.5*s[1],t[6]=.5*s[2],t[7]=0,t},fromRotation2=function(t,s){return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[4]=0,t[5]=0,t[6]=0,t[7]=0,t},fromMat42=function(t,s){var e=create$22(),i=(getRotation2(e,s),new ARRAY_TYPE(3));return getTranslation$12(i,s),fromRotationTranslation2(t,e,i),t},copy$12=function(t,s){return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[4]=s[4],t[5]=s[5],t[6]=s[6],t[7]=s[7],t},identity2=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t},set$12=function(t,s,e,i,r,n,h,o,a){return t[0]=s,t[1]=e,t[2]=i,t[3]=r,t[4]=n,t[5]=h,t[6]=o,t[7]=a,t},getDual2=function(t,s){return t[0]=s[4],t[1]=s[5],t[2]=s[6],t[3]=s[7],t},setDual2=function(t,s){return t[4]=s[0],t[5]=s[1],t[6]=s[2],t[7]=s[3],t},getTranslation2=function(t,s){var e=s[4],i=s[5],r=s[6],n=s[7],h=-s[0],o=-s[1],a=-s[2],s=s[3];return t[0]=2*(e*s+n*h+i*a-r*o),t[1]=2*(i*s+n*o+r*h-e*a),t[2]=2*(r*s+n*a+e*o-i*h),t},translate2=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=s[3],o=.5*e[0],a=.5*e[1],e=.5*e[2],l=s[4],c=s[5],u=s[6],s=s[7];return t[0]=i,t[1]=r,t[2]=n,t[3]=h,t[4]=h*o+r*e-n*a+l,t[5]=h*a+n*o-i*e+c,t[6]=h*e+i*a-r*o+u,t[7]=-i*o-r*a-n*e+s,t},rotateX2=function(t,s,e){var i=-s[0],r=-s[1],n=-s[2],h=s[3],o=s[4],a=s[5],l=s[6],c=o*h+(d=s[7])*i+a*n-l*r,u=a*h+d*r+l*i-o*n,f=l*h+d*n+o*r-a*i,d=d*h-o*i-a*r-l*n;return rotateX$12(t,s,e),i=t[0],t[4]=c*(h=t[3])+d*i+u*(n=t[2])-f*(r=t[1]),t[5]=u*h+d*r+f*i-c*n,t[6]=f*h+d*n+c*r-u*i,t[7]=d*h-c*i-u*r-f*n,t},rotateY2=function(t,s,e){var i=-s[0],r=-s[1],n=-s[2],h=s[3],o=s[4],a=s[5],l=s[6],c=o*h+(d=s[7])*i+a*n-l*r,u=a*h+d*r+l*i-o*n,f=l*h+d*n+o*r-a*i,d=d*h-o*i-a*r-l*n;return rotateY$12(t,s,e),i=t[0],t[4]=c*(h=t[3])+d*i+u*(n=t[2])-f*(r=t[1]),t[5]=u*h+d*r+f*i-c*n,t[6]=f*h+d*n+c*r-u*i,t[7]=d*h-c*i-u*r-f*n,t},rotateZ2=function(t,s,e){var i=-s[0],r=-s[1],n=-s[2],h=s[3],o=s[4],a=s[5],l=s[6],c=o*h+(d=s[7])*i+a*n-l*r,u=a*h+d*r+l*i-o*n,f=l*h+d*n+o*r-a*i,d=d*h-o*i-a*r-l*n;return rotateZ$12(t,s,e),i=t[0],t[4]=c*(h=t[3])+d*i+u*(n=t[2])-f*(r=t[1]),t[5]=u*h+d*r+f*i-c*n,t[6]=f*h+d*n+c*r-u*i,t[7]=d*h-c*i-u*r-f*n,t},rotateByQuatAppend2=function(t,s,e){var i=e[0],r=e[1],n=e[2],e=e[3],h=s[0],o=s[1],a=s[2],l=s[3];return t[0]=h*e+l*i+o*n-a*r,t[1]=o*e+l*r+a*i-h*n,t[2]=a*e+l*n+h*r-o*i,t[3]=l*e-h*i-o*r-a*n,t[4]=(h=s[4])*e+(l=s[7])*i+(o=s[5])*n-(a=s[6])*r,t[5]=o*e+l*r+a*i-h*n,t[6]=a*e+l*n+h*r-o*i,t[7]=l*e-h*i-o*r-a*n,t},rotateByQuatPrepend2=function(t,s,e){var i=s[0],r=s[1],n=s[2],s=s[3],h=e[0],o=e[1],a=e[2],l=e[3];return t[0]=i*l+s*h+r*a-n*o,t[1]=r*l+s*o+n*h-i*a,t[2]=n*l+s*a+i*o-r*h,t[3]=s*l-i*h-r*o-n*a,t[4]=i*(l=e[7])+s*(h=e[4])+r*(a=e[6])-n*(o=e[5]),t[5]=r*l+s*o+n*h-i*a,t[6]=n*l+s*a+i*o-r*h,t[7]=s*l-i*h-r*o-n*a,t},rotateAroundAxis2=function(t,s,e,i){var r,n,h,o,a,l;return Math.abs(i)<EPSILON?copy$12(t,s):(l=Math.hypot(e[0],e[1],e[2]),i*=.5,r=(h=Math.sin(i))*e[0]/l,n=h*e[1]/l,h=h*e[2]/l,e=Math.cos(i),l=s[0],t[0]=l*e+(i=s[3])*r+(o=s[1])*h-(a=s[2])*n,t[1]=o*e+i*n+a*r-l*h,t[2]=a*e+i*h+l*n-o*r,t[3]=i*e-l*r-o*n-a*h,t[4]=(i=s[4])*e+(l=s[7])*r+(o=s[5])*h-(a=s[6])*n,t[5]=o*e+l*n+a*r-i*h,t[6]=a*e+l*h+i*n-o*r,t[7]=l*e-i*r-o*n-a*h,t)},add$12=function(t,s,e){return t[0]=s[0]+e[0],t[1]=s[1]+e[1],t[2]=s[2]+e[2],t[3]=s[3]+e[3],t[4]=s[4]+e[4],t[5]=s[5]+e[5],t[6]=s[6]+e[6],t[7]=s[7]+e[7],t},multiply$12=function(t,s,e){var i=s[0],r=s[1],n=s[2],h=s[3],o=e[4],a=e[5],l=e[6],c=e[7],u=s[4],f=s[5],d=s[6],s=s[7],p=e[0],C=e[1],m=e[2],e=e[3];return t[0]=i*e+h*p+r*m-n*C,t[1]=r*e+h*C+n*p-i*m,t[2]=n*e+h*m+i*C-r*p,t[3]=h*e-i*p-r*C-n*m,t[4]=i*c+h*o+r*l-n*a+u*e+s*p+f*m-d*C,t[5]=r*c+h*a+n*o-i*l+f*e+s*C+d*p-u*m,t[6]=n*c+h*l+i*a-r*o+d*e+s*m+u*C-f*p,t[7]=h*c-i*o-r*a-n*l+s*e-u*p-f*C-d*m,t},scale$12=function(t,s,e){return t[0]=s[0]*e,t[1]=s[1]*e,t[2]=s[2]*e,t[3]=s[3]*e,t[4]=s[4]*e,t[5]=s[5]*e,t[6]=s[6]*e,t[7]=s[7]*e,t},lerp$12=function(t,s,e,i){var r=1-i;return dot$1(s,e)<0&&(i=-i),t[0]=s[0]*r+e[0]*i,t[1]=s[1]*r+e[1]*i,t[2]=s[2]*r+e[2]*i,t[3]=s[3]*r+e[3]*i,t[4]=s[4]*r+e[4]*i,t[5]=s[5]*r+e[5]*i,t[6]=s[6]*r+e[6]*i,t[7]=s[7]*r+e[7]*i,t},invert2=function(t,s){var e=squaredLength$1(s);return t[0]=-s[0]/e,t[1]=-s[1]/e,t[2]=-s[2]/e,t[3]=s[3]/e,t[4]=-s[4]/e,t[5]=-s[5]/e,t[6]=-s[6]/e,t[7]=s[7]/e,t},conjugate2=function(t,s){return t[0]=-s[0],t[1]=-s[1],t[2]=-s[2],t[3]=s[3],t[4]=-s[4],t[5]=-s[5],t[6]=-s[6],t[7]=s[7],t},normalize$12=function(t,s){var e,i,r,n,h,o,a,l,c=squaredLength$1(s);return 0<c&&(c=Math.sqrt(c),l=(e=s[0]/c)*(h=s[4])+(i=s[1]/c)*(o=s[5])+(r=s[2]/c)*(a=s[6])+(n=s[3]/c)*(s=s[7]),t[0]=e,t[1]=i,t[2]=r,t[3]=n,t[4]=(h-e*l)/c,t[5]=(o-i*l)/c,t[6]=(a-r*l)/c,t[7]=(s-n*l)/c),t},str$12=function(t){return"quat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+")"},exactEquals$12=function(t,s){return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]&&t[3]===s[3]&&t[4]===s[4]&&t[5]===s[5]&&t[6]===s[6]&&t[7]===s[7]},equals$12=function(t,s){var e=t[0],i=t[1],r=t[2],n=t[3],h=t[4],o=t[5],a=t[6],t=t[7],l=s[0],c=s[1],u=s[2],f=s[3],d=s[4],p=s[5],C=s[6],s=s[7];return Math.abs(e-l)<=EPSILON*Math.max(1,Math.abs(e),Math.abs(l))&&Math.abs(i-c)<=EPSILON*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(r-u)<=EPSILON*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-f)<=EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(h-d)<=EPSILON*Math.max(1,Math.abs(h),Math.abs(d))&&Math.abs(o-p)<=EPSILON*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-C)<=EPSILON*Math.max(1,Math.abs(a),Math.abs(C))&&Math.abs(t-s)<=EPSILON*Math.max(1,Math.abs(t),Math.abs(s))},create2=function(){var t=new ARRAY_TYPE(2);return ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t},clone2=function(t){var s=new ARRAY_TYPE(2);return s[0]=t[0],s[1]=t[1],s},fromValues2=function(t,s){var e=new ARRAY_TYPE(2);return e[0]=t,e[1]=s,e},copy2=function(t,s){return t[0]=s[0],t[1]=s[1],t},set2=function(t,s,e){return t[0]=s,t[1]=e,t},add2=function(t,s,e){return t[0]=s[0]+e[0],t[1]=s[1]+e[1],t},subtract2=function(t,s,e){return t[0]=s[0]-e[0],t[1]=s[1]-e[1],t},multiply2=function(t,s,e){return t[0]=s[0]*e[0],t[1]=s[1]*e[1],t},divide2=function(t,s,e){return t[0]=s[0]/e[0],t[1]=s[1]/e[1],t},ceil2=function(t,s){return t[0]=Math.ceil(s[0]),t[1]=Math.ceil(s[1]),t},floor2=function(t,s){return t[0]=Math.floor(s[0]),t[1]=Math.floor(s[1]),t},min2=function(t,s,e){return t[0]=Math.min(s[0],e[0]),t[1]=Math.min(s[1],e[1]),t},max2=function(t,s,e){return t[0]=Math.max(s[0],e[0]),t[1]=Math.max(s[1],e[1]),t},round2=function(t,s){return t[0]=Math.round(s[0]),t[1]=Math.round(s[1]),t},scale2=function(t,s,e){return t[0]=s[0]*e,t[1]=s[1]*e,t},scaleAndAdd2=function(t,s,e,i){return t[0]=s[0]+e[0]*i,t[1]=s[1]+e[1]*i,t},distance2=function(t,s){var e=s[0]-t[0];return Math.hypot(e,s[1]-t[1])},squaredDistance2=function(t,s){var e=s[0]-t[0];return e*e+(s=s[1]-t[1])*s},length2=function(t){var s=t[0];return Math.hypot(s,t[1])},squaredLength2=function(t){var s=t[0];return s*s+(t=t[1])*t},negate2=function(t,s){return t[0]=-s[0],t[1]=-s[1],t},inverse2=function(t,s){return t[0]=1/s[0],t[1]=1/s[1],t},normalize2=function(t,s){var e=s[0],i=s[1];return 0<(e=e*e+i*i)&&(e=1/Math.sqrt(e)),t[0]=s[0]*e,t[1]=s[1]*e,t},dot2=function(t,s){return t[0]*s[0]+t[1]*s[1]},cross2=function(t,s,e){return s=s[0]*e[1]-s[1]*e[0],t[0]=t[1]=0,t[2]=s,t},lerp2=function(t,s,e,i){var r=s[0],s=s[1];return t[0]=r+i*(e[0]-r),t[1]=s+i*(e[1]-s),t},random2=function(t,s){s=s||1;var e=2*RANDOM()*Math.PI;return t[0]=Math.cos(e)*s,t[1]=Math.sin(e)*s,t},transformMat22=function(t,s,e){var i=s[0],s=s[1];return t[0]=e[0]*i+e[2]*s,t[1]=e[1]*i+e[3]*s,t},transformMat2d2=function(t,s,e){var i=s[0],s=s[1];return t[0]=e[0]*i+e[2]*s+e[4],t[1]=e[1]*i+e[3]*s+e[5],t},transformMat32=function(t,s,e){var i=s[0],s=s[1];return t[0]=e[0]*i+e[3]*s+e[6],t[1]=e[1]*i+e[4]*s+e[7],t},transformMat42=function(t,s,e){var i=s[0],s=s[1];return t[0]=e[0]*i+e[4]*s+e[12],t[1]=e[1]*i+e[5]*s+e[13],t},rotate2=function(t,s,e,i){var r=s[0]-e[0],s=s[1]-e[1],n=Math.sin(i),i=Math.cos(i);return t[0]=r*i-s*n+e[0],t[1]=r*n+s*i+e[1],t},angle2=function(t,s){var e=t[0],t=t[1],i=s[0],s=s[1],r=Math.sqrt((e*e+t*t)*(i*i+s*s));return Math.acos(Math.min(Math.max(r&&(e*i+t*s)/r,-1),1))},zero2=function(t){return t[0]=0,t[1]=0,t},str2=function(t){return"vec2("+t[0]+", "+t[1]+")"},exactEquals2=function(t,s){return t[0]===s[0]&&t[1]===s[1]},equals2=function(t,s){var e=t[0],t=t[1],i=s[0],s=s[1];return Math.abs(e-i)<=EPSILON*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(t-s)<=EPSILON*Math.max(1,Math.abs(t),Math.abs(s))};setMatrixArrayType=setMatrixArrayType2,toRadian=toRadian2,equals$9=equals$92,create$8=create$82,clone$8=clone$82,copy$8=copy$82,identity$5=identity$52,fromValues$8=fromValues$82,set$8=set$82,transpose$2=transpose$22,invert$5=invert$52,adjoint$2=adjoint$22,determinant$3=determinant$32,multiply$8=multiply$82,rotate$4=rotate$42,scale$8=scale$82,fromRotation$4=fromRotation$42,fromScaling$3=fromScaling$32,str$8=str$82,frob$3=frob$32,LDU=LDU2,add$8=add$82,subtract$6=subtract$62,exactEquals$8=exactEquals$82,equals$8=equals$82,multiplyScalar$3=multiplyScalar$32,multiplyScalarAndAdd$3=multiplyScalarAndAdd$32,create$7=create$72,clone$7=clone$72,copy$7=copy$72,identity$4=identity$42,fromValues$7=fromValues$72,set$7=set$72,invert$4=invert$42,determinant$2=determinant$22,multiply$7=multiply$72,rotate$3=rotate$32,scale$7=scale$72,translate$3=translate$32,fromRotation$3=fromRotation$32,fromScaling$2=fromScaling$22,fromTranslation$3=fromTranslation$32,str$7=str$72,frob$2=frob$22,add$7=add$72,subtract$5=subtract$52,multiplyScalar$2=multiplyScalar$22,multiplyScalarAndAdd$2=multiplyScalarAndAdd$22,exactEquals$7=exactEquals$72,equals$7=equals$72,create$6=create$62,fromMat4$1=fromMat4$12,clone$6=clone$62,copy$6=copy$62,fromValues$6=fromValues$62,set$6=set$62,identity$3=identity$32,transpose$1=transpose$12,invert$3=invert$32,adjoint$1=adjoint$12,determinant$1=determinant$12,multiply$6=multiply$62,translate$2=translate$22,rotate$2=rotate$22,scale$6=scale$62,fromTranslation$2=fromTranslation$22,fromRotation$2=fromRotation$22,fromScaling$1=fromScaling$12,fromMat2d=fromMat2d2,fromQuat$1=fromQuat$12,normalFromMat4=normalFromMat42,projection=projection2,str$6=str$62,frob$1=frob$12,add$6=add$62,subtract$4=subtract$42,multiplyScalar$1=multiplyScalar$12,multiplyScalarAndAdd$1=multiplyScalarAndAdd$12,exactEquals$6=exactEquals$62,equals$6=equals$62,create$5=create$52,clone$5=clone$52,copy$5=copy$52,fromValues$5=fromValues$52,set$5=set$52,identity$2=identity$22,transpose=transpose2,invert$2=invert$22,adjoint=adjoint2,determinant=determinant2,multiply$5=multiply$52,translate$1=translate$12,scale$5=scale$52,rotate$1=rotate$12,rotateX$3=rotateX$32,rotateY$3=rotateY$32,rotateZ$3=rotateZ$32,fromTranslation$1=fromTranslation$12,fromScaling=fromScaling2,fromRotation$1=fromRotation$12,fromXRotation=fromXRotation2,fromYRotation=fromYRotation2,fromZRotation=fromZRotation2,fromRotationTranslation$1=fromRotationTranslation$12,fromQuat2=fromQuat22,getTranslation$1=getTranslation$12,getScaling=getScaling2,getRotation=getRotation2,decompose=decompose2,fromRotationTranslationScale=fromRotationTranslationScale2,fromRotationTranslationScaleOrigin=fromRotationTranslationScaleOrigin2,fromQuat=fromQuat3,frustum=frustum2,perspectiveNO=perspectiveNO2,perspectiveZO=perspectiveZO2,perspectiveFromFieldOfView=perspectiveFromFieldOfView2,orthoNO=orthoNO2,orthoZO=orthoZO2,lookAt=lookAt2,targetTo=targetTo2,str$5=str$52,frob=frob2,add$5=add$52,subtract$3=subtract$32,multiplyScalar=multiplyScalar2,multiplyScalarAndAdd=multiplyScalarAndAdd2,exactEquals$5=exactEquals$52,equals$5=equals$52,create$4=create$42,clone$4=clone$42,length$4=length$42,fromValues$4=fromValues$42,copy$4=copy$42,set$4=set$42,add$4=add$42,subtract$2=subtract$22,multiply$4=multiply$42,divide$2=divide$22,ceil$2=ceil$22,floor$2=floor$22,min$2=min$22,max$2=max$22,round$2=round$22,scale$4=scale$42,scaleAndAdd$2=scaleAndAdd$22,distance$2=distance$22,squaredDistance$2=squaredDistance$22,squaredLength$4=squaredLength$42,negate$2=negate$22,inverse$2=inverse$22,normalize$4=normalize$42,dot$4=dot$42,cross$2=cross$22,lerp$4=lerp$42,slerp$1=slerp$12,hermite=hermite2,bezier=bezier2,random$3=random$32,transformMat4$2=transformMat4$22,transformMat3$1=transformMat3$12,transformQuat$1=transformQuat$12,rotateX$2=rotateX$22,rotateY$2=rotateY$22,rotateZ$2=rotateZ$22,angle$1=angle$12,zero$2=zero$22,str$4=str$42,exactEquals$4=exactEquals$42,equals$4=equals$42,create$3=create$32,clone$3=clone$32,fromValues$3=fromValues$32,copy$3=copy$32,set$3=set$32,add$3=add$32,subtract$1=subtract$12,multiply$3=multiply$32,divide$1=divide$12,ceil$1=ceil$12,floor$1=floor$12,min$1=min$12,max$1=max$12,round$1=round$12,scale$3=scale$32,scaleAndAdd$1=scaleAndAdd$12,distance$1=distance$12,squaredDistance$1=squaredDistance$12,length$3=length$32,squaredLength$3=squaredLength$32,negate$1=negate$12,inverse$1=inverse$12,normalize$3=normalize$32,dot$3=dot$32,cross$1=cross$12,lerp$3=lerp$32,random$2=random$22,transformMat4$1=transformMat4$12,transformQuat=transformQuat2,zero$1=zero$12,str$3=str$32,exactEquals$3=exactEquals$32,equals$3=equals$32,create$2=create$22,identity$1=identity$12,setAxisAngle=setAxisAngle2,getAxisAngle=getAxisAngle2,getAngle=getAngle2,multiply$2=multiply$22,rotateX$1=rotateX$12,rotateY$1=rotateY$12,rotateZ$1=rotateZ$12,calculateW=calculateW2,exp=exp2,ln=ln2,pow=pow2,slerp=slerp2,random$1=random$12,invert$1=invert$12,conjugate$1=conjugate$12,fromMat3=fromMat32,fromEuler=fromEuler2,str$2=str$22,equals$2=equals$22,create$1=create$12,clone$1=clone$12,fromValues$1=fromValues$12,fromRotationTranslationValues=fromRotationTranslationValues2,fromRotationTranslation=fromRotationTranslation2,fromTranslation=fromTranslation2,fromRotation=fromRotation2,fromMat4=fromMat42,copy$1=copy$12,identity=identity2,set$1=set$12,getDual=getDual2,setDual=setDual2,getTranslation=getTranslation2,translate=translate2,rotateX=rotateX2,rotateY=rotateY2,rotateZ=rotateZ2,rotateByQuatAppend=rotateByQuatAppend2,rotateByQuatPrepend=rotateByQuatPrepend2,rotateAroundAxis=rotateAroundAxis2,add$1=add$12,multiply$1=multiply$12,scale$1=scale$12,lerp$1=lerp$12,invert=invert2,conjugate=conjugate2,normalize$1=normalize$12,str$1=str$12,exactEquals$1=exactEquals$12,equals$1=equals$12,create=create2,clone=clone2,fromValues=fromValues2,copy=copy2,set=set2,add=add2,subtract=subtract2,multiply=multiply2,divide=divide2,ceil=ceil2,floor=floor2,min=min2,max=max2,round=round2,scale=scale2,scaleAndAdd=scaleAndAdd2,distance=distance2,squaredDistance=squaredDistance2,length=length2,squaredLength=squaredLength2,negate=negate2,inverse=inverse2,normalize=normalize2,dot=dot2,cross=cross2,lerp=lerp2,random=random2,transformMat2=transformMat22,transformMat2d=transformMat2d2,transformMat3=transformMat32,transformMat4=transformMat42,rotate=rotate2,angle=angle2,zero=zero2,str=str2,exactEquals=exactEquals2,equals=equals2,EPSILON=1e-6,ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,RANDOM=Math.random,ANGLE_ORDER="zyx",degree=Math.PI/180,Math.hypot||(Math.hypot=function(){for(var t=0,s=arguments.length;s--;)t+=arguments[s]*arguments[s];return Math.sqrt(t)}),common={__proto__:null,EPSILON:EPSILON,get C(){return ARRAY_TYPE},S:RANDOM,_:ANGLE_ORDER,T:setMatrixArrayType2,A:toRadian2,equals:equals$92},mul$8=multiply$82,sub$6=subtract$62,mat2=Object.freeze({__proto__:null,create:create$82,clone:clone$82,I:copy$82,identity:identity$52,R:fromValues$82,set:set$82,M:transpose$22,G:invert$52,P:adjoint$22,O:determinant$32,multiply:multiply$82,rotate:rotate$42,scale:scale$82,L:fromRotation$42,D:fromScaling$32,N:str$82,F:frob$32,$:LDU2,add:add$82,B:subtract$62,W:exactEquals$82,equals:equals$82,H:multiplyScalar$32,V:multiplyScalarAndAdd$32,mul:mul$8,sub:sub$6}),mul$7=multiply$72,sub$5=subtract$52,mat2d=Object.freeze({__proto__:null,create:create$72,clone:clone$72,I:copy$72,identity:identity$42,R:fromValues$72,set:set$72,G:invert$42,O:determinant$22,multiply:multiply$72,rotate:rotate$32,scale:scale$72,translate:translate$32,L:fromRotation$32,D:fromScaling$22,U:fromTranslation$32,N:str$72,F:frob$22,add:add$72,B:subtract$52,H:multiplyScalar$22,V:multiplyScalarAndAdd$22,W:exactEquals$72,equals:equals$72,mul:mul$7,sub:sub$5}),mul$6=multiply$62,sub$4=subtract$42,mat3=Object.freeze({__proto__:null,create:create$62,j:fromMat4$12,clone:clone$62,I:copy$62,R:fromValues$62,set:set$62,identity:identity$32,M:transpose$12,G:invert$32,P:adjoint$12,O:determinant$12,multiply:multiply$62,translate:translate$22,rotate:rotate$22,scale:scale$62,U:fromTranslation$22,L:fromRotation$22,D:fromScaling$12,X:fromMat2d2,Y:fromQuat$12,K:normalFromMat42,J:projection2,N:str$62,F:frob$12,add:add$62,B:subtract$42,H:multiplyScalar$12,V:multiplyScalarAndAdd$12,W:exactEquals$62,equals:equals$62,mul:mul$6,sub:sub$4}),perspective=perspectiveNO2,ortho=orthoNO2,mul$5=multiply$52,sub$3=subtract$32,mat4=Object.freeze({__proto__:null,create:create$52,clone:clone$52,I:copy$52,R:fromValues$52,set:set$52,identity:identity$22,M:transpose2,G:invert$22,P:adjoint2,O:determinant2,multiply:multiply$52,translate:translate$12,scale:scale$52,rotate:rotate$12,Z:rotateX$32,tt:rotateY$32,et:rotateZ$32,U:fromTranslation$12,D:fromScaling2,L:fromRotation$12,it:fromXRotation2,nt:fromYRotation2,ht:fromZRotation2,ot:fromRotationTranslation$12,lt:fromQuat22,ct:getTranslation$12,ut:getScaling2,Ct:getRotation2,gt:decompose2,St:fromRotationTranslationScale2,_t:fromRotationTranslationScaleOrigin2,Y:fromQuat3,Tt:frustum2,At:perspectiveNO2,perspective:perspective,Et:perspectiveZO2,It:perspectiveFromFieldOfView2,Rt:orthoNO2,ortho:ortho,Mt:orthoZO2,bt:lookAt2,Gt:targetTo2,N:str$52,F:frob2,add:add$52,B:subtract$32,H:multiplyScalar2,V:multiplyScalarAndAdd2,W:exactEquals$52,equals:equals$52,mul:mul$5,sub:sub$3}),sub$2=subtract$22,mul$4=multiply$42,div$2=divide$22,dist$2=distance$22,sqrDist$2=squaredDistance$22,len$4=length$42,sqrLen$4=squaredLength$42,forEach$2=(()=>{var a=create$42();return function(t,s,e,i,r,n){var h,o;for(s=s||3,e=e||0,o=i?Math.min(i*s+e,t.length):t.length,h=e;h<o;h+=s)a[0]=t[h],a[1]=t[h+1],a[2]=t[h+2],r(a,a,n),t[h]=a[0],t[h+1]=a[1],t[h+2]=a[2];return t}})(),vec3=Object.freeze({__proto__:null,create:create$42,clone:clone$42,length:length$42,R:fromValues$42,I:copy$42,set:set$42,add:add$42,B:subtract$22,multiply:multiply$42,vt:divide$22,ceil:ceil$22,floor:floor$22,min:min$22,max:max$22,round:round$22,scale:scale$42,Pt:scaleAndAdd$22,Ot:distance$22,xt:squaredDistance$22,Lt:squaredLength$42,Dt:negate$22,inverse:inverse$22,normalize:normalize$42,Nt:dot$42,Ft:cross$22,$t:lerp$42,kt:slerp$12,Bt:hermite2,Wt:bezier2,random:random$32,Ht:transformMat4$22,Vt:transformMat3$12,Ut:transformQuat$12,Z:rotateX$22,tt:rotateY$22,et:rotateZ$22,angle:angle$12,jt:zero$22,N:str$42,W:exactEquals$42,equals:equals$42,sub:sub$2,mul:mul$4,div:div$2,Xt:dist$2,Yt:sqrDist$2,qt:len$4,Kt:sqrLen$4,forEach:forEach$2}),sub$1=subtract$12,mul$3=multiply$32,div$1=divide$12,dist$1=distance$12,sqrDist$1=squaredDistance$12,len$3=length$32,sqrLen$3=squaredLength$32,forEach$1=(()=>{var a=create$32();return function(t,s,e,i,r,n){var h,o;for(s=s||4,e=e||0,o=i?Math.min(i*s+e,t.length):t.length,h=e;h<o;h+=s)a[0]=t[h],a[1]=t[h+1],a[2]=t[h+2],a[3]=t[h+3],r(a,a,n),t[h]=a[0],t[h+1]=a[1],t[h+2]=a[2],t[h+3]=a[3];return t}})(),vec4=Object.freeze({__proto__:null,create:create$32,clone:clone$32,R:fromValues$32,I:copy$32,set:set$32,add:add$32,B:subtract$12,multiply:multiply$32,vt:divide$12,ceil:ceil$12,floor:floor$12,min:min$12,max:max$12,round:round$12,scale:scale$32,Pt:scaleAndAdd$12,Ot:distance$12,xt:squaredDistance$12,length:length$32,Lt:squaredLength$32,Dt:negate$12,inverse:inverse$12,normalize:normalize$32,Nt:dot$32,Ft:cross$12,$t:lerp$32,random:random$22,Ht:transformMat4$12,Ut:transformQuat2,jt:zero$12,N:str$32,W:exactEquals$32,equals:equals$32,sub:sub$1,mul:mul$3,div:div$1,Xt:dist$1,Yt:sqrDist$1,qt:len$3,Kt:sqrLen$3,forEach:forEach$1}),clone$2=clone$32,fromValues$2=fromValues$32,copy$2=copy$32,set$2=set$32,add$2=add$32,mul$2=multiply$22,scale$2=scale$32,dot$2=dot$32,lerp$2=lerp$32,length$2=length$32,len$2=length$2,squaredLength$2=squaredLength$32,sqrLen$2=squaredLength$2,normalize$2=normalize$32,exactEquals$2=exactEquals$32,rotationTo=(()=>{var r=create$42(),n=fromValues$42(1,0,0),h=fromValues$42(0,1,0);return function(t,s,e){var i=dot$42(s,e);return i<-.999999?(cross$22(r,n,s),len$4(r)<1e-6&&cross$22(r,h,s),normalize$42(r,r),setAxisAngle2(t,r,Math.PI),t):.999999<i?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(cross$22(r,s,e),t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=1+i,normalize$2(t,t))}})(),sqlerp=(()=>{var h=create$22(),o=create$22();return function(t,s,e,i,r,n){return slerp2(h,s,r,n),slerp2(o,e,i,n),slerp2(t,h,o,2*n*(1-n)),t}})(),setAxes=(()=>{var r=create$62();return function(t,s,e,i){return r[0]=e[0],r[3]=e[1],r[6]=e[2],r[1]=i[0],r[4]=i[1],r[7]=i[2],r[2]=-s[0],r[5]=-s[1],r[8]=-s[2],normalize$2(t,fromMat32(t,r))}})(),quat=Object.freeze({__proto__:null,create:create$22,identity:identity$12,zt:setAxisAngle2,Jt:getAxisAngle2,Qt:getAngle2,multiply:multiply$22,Z:rotateX$12,tt:rotateY$12,et:rotateZ$12,Zt:calculateW2,exp:exp2,ts:ln2,pow:pow2,kt:slerp2,random:random$12,G:invert$12,ss:conjugate$12,es:fromMat32,rs:fromEuler2,N:str$22,clone:clone$2,R:fromValues$2,I:copy$2,set:set$2,add:add$2,mul:mul$2,scale:scale$2,Nt:dot$2,$t:lerp$2,length:length$2,qt:len$2,Lt:squaredLength$2,Kt:sqrLen$2,normalize:normalize$2,W:exactEquals$2,equals:equals$22,ns:rotationTo,hs:sqlerp,os:setAxes}),getReal=copy$2,setReal=copy$2,mul$1=multiply$12,dot$1=dot$2,length$1=length$2,len$1=length$1,squaredLength$1=squaredLength$2,sqrLen$1=squaredLength$1,quat2=Object.freeze({__proto__:null,create:create$12,clone:clone$12,R:fromValues$12,ls:fromRotationTranslationValues2,ot:fromRotationTranslation2,U:fromTranslation2,L:fromRotation2,j:fromMat42,I:copy$12,identity:identity2,set:set$12,us:getReal,ds:getDual2,Cs:setReal,gs:setDual2,ct:getTranslation2,translate:translate2,Z:rotateX2,tt:rotateY2,et:rotateZ2,Ss:rotateByQuatAppend2,ys:rotateByQuatPrepend2,_s:rotateAroundAxis2,add:add$12,multiply:multiply$12,mul:mul$1,scale:scale$12,Nt:dot$1,$t:lerp$12,G:invert2,ss:conjugate2,length:length$1,qt:len$1,Lt:squaredLength$1,Kt:sqrLen$1,normalize:normalize$12,N:str$12,W:exactEquals$12,equals:equals$12}),len=length2,sub=subtract2,mul=multiply2,div=divide2,dist=distance2,sqrDist=squaredDistance2,sqrLen=squaredLength2,forEach=(()=>{var a=create2();return function(t,s,e,i,r,n){var h,o;for(s=s||2,e=e||0,o=i?Math.min(i*s+e,t.length):t.length,h=e;h<o;h+=s)a[0]=t[h],a[1]=t[h+1],r(a,a,n),t[h]=a[0],t[h+1]=a[1];return t}})(),vec2=Object.freeze({__proto__:null,create:create2,clone:clone2,R:fromValues2,I:copy2,set:set2,add:add2,B:subtract2,multiply:multiply2,vt:divide2,ceil:ceil2,floor:floor2,min:min2,max:max2,round:round2,scale:scale2,Pt:scaleAndAdd2,Ot:distance2,xt:squaredDistance2,length:length2,Lt:squaredLength2,Dt:negate2,inverse:inverse2,normalize:normalize2,Nt:dot2,Ft:cross2,$t:lerp2,random:random2,Ts:transformMat22,As:transformMat2d2,Vt:transformMat32,Ht:transformMat42,rotate:rotate2,angle:angle2,jt:zero2,N:str2,W:exactEquals2,equals:equals2,qt:len,sub:sub,mul:mul,div:div,Xt:dist,Yt:sqrDist,Kt:sqrLen,forEach:forEach}),globalThis.Es=common,globalThis.Es.Is=mat2,globalThis.Es.ws=mat2d,globalThis.Es.Rs=mat3,globalThis.Es.Ms=mat4,globalThis.Es.bs=quat,globalThis.Es.Gs=quat2,globalThis.Es.vs=vec2,globalThis.Es.Ps=vec3,globalThis.Es.Os=vec4}var EPSILON,ARRAY_TYPE,RANDOM,ANGLE_ORDER,degree,common,mul$8,sub$6,mat2,mul$7,sub$5,mat2d,mul$6,sub$4,mat3,perspective,ortho,mul$5,sub$3,mat4,sub$2,mul$4,div$2,dist$2,sqrDist$2,len$4,sqrLen$4,forEach$2,vec3,sub$1,mul$3,div$1,dist$1,sqrDist$1,len$3,sqrLen$3,forEach$1,vec4,clone$2,fromValues$2,copy$2,set$2,add$2,mul$2,scale$2,dot$2,lerp$2,length$2,len$2,squaredLength$2,sqrLen$2,normalize$2,exactEquals$2,rotationTo,sqlerp,setAxes,quat,getReal,setReal,mul$1,dot$1,length$1,len$1,squaredLength$1,sqrLen$1,quat2,len,sub,mul,div,dist,sqrDist,sqrLen,forEach,vec2,setMatrixArrayType,toRadian,equals$9,create$8,clone$8,copy$8,identity$5,fromValues$8,set$8,transpose$2,invert$5,adjoint$2,determinant$3,multiply$8,rotate$4,scale$8,fromRotation$4,fromScaling$3,str$8,frob$3,LDU,add$8,subtract$6,exactEquals$8,equals$8,multiplyScalar$3,multiplyScalarAndAdd$3,create$7,clone$7,copy$7,identity$4,fromValues$7,set$7,invert$4,determinant$2,multiply$7,rotate$3,scale$7,translate$3,fromRotation$3,fromScaling$2,fromTranslation$3,str$7,frob$2,add$7,subtract$5,multiplyScalar$2,multiplyScalarAndAdd$2,exactEquals$7,equals$7,create$6,fromMat4$1,clone$6,copy$6,fromValues$6,set$6,identity$3,transpose$1,invert$3,adjoint$1,determinant$1,multiply$6,translate$2,rotate$2,scale$6,fromTranslation$2,fromRotation$2,fromScaling$1,fromMat2d,fromQuat$1,normalFromMat4,projection,str$6,frob$1,add$6,subtract$4,multiplyScalar$1,multiplyScalarAndAdd$1,exactEquals$6,equals$6,create$5,clone$5,copy$5,fromValues$5,set$5,identity$2,transpose,invert$2,adjoint,determinant,multiply$5,translate$1,scale$5,rotate$1,rotateX$3,rotateY$3,rotateZ$3,fromTranslation$1,fromScaling,fromRotation$1,fromXRotation,fromYRotation,fromZRotation,fromRotationTranslation$1,fromQuat2,getTranslation$1,getScaling,getRotation,decompose,fromRotationTranslationScale,fromRotationTranslationScaleOrigin,fromQuat,frustum,perspectiveNO,perspectiveZO,perspectiveFromFieldOfView,orthoNO,orthoZO,lookAt,targetTo,str$5,frob,add$5,subtract$3,multiplyScalar,multiplyScalarAndAdd,exactEquals$5,equals$5,create$4,clone$4,length$4,fromValues$4,copy$4,set$4,add$4,subtract$2,multiply$4,divide$2,ceil$2,floor$2,min$2,max$2,round$2,scale$4,scaleAndAdd$2,distance$2,squaredDistance$2,squaredLength$4,negate$2,inverse$2,normalize$4,dot$4,cross$2,lerp$4,slerp$1,hermite,bezier,random$3,transformMat4$2,transformMat3$1,transformQuat$1,rotateX$2,rotateY$2,rotateZ$2,angle$1,zero$2,str$4,exactEquals$4,equals$4,create$3,clone$3,fromValues$3,copy$3,set$3,add$3,subtract$1,multiply$3,divide$1,ceil$1,floor$1,min$1,max$1,round$1,scale$3,scaleAndAdd$1,distance$1,squaredDistance$1,length$3,squaredLength$3,negate$1,inverse$1,normalize$3,dot$3,cross$1,lerp$3,random$2,transformMat4$1,transformQuat,zero$1,str$3,exactEquals$3,equals$3,create$2,identity$1,setAxisAngle,getAxisAngle,getAngle,multiply$2,rotateX$1,rotateY$1,rotateZ$1,calculateW,exp,ln,pow,slerp,random$1,invert$1,conjugate$1,fromMat3,fromEuler,str$2,equals$2,create$1,clone$1,fromValues$1,fromRotationTranslationValues,fromRotationTranslation,fromTranslation,fromRotation,fromMat4,copy$1,identity,set$1,getDual,setDual,getTranslation,translate,rotateX,rotateY,rotateZ,rotateByQuatAppend,rotateByQuatPrepend,rotateAroundAxis,add$1,multiply$1,scale$1,lerp$1,invert,conjugate,normalize$1,str$1,exactEquals$1,equals$1,create,clone,fromValues,copy,set,add,subtract,multiply,divide,ceil,floor,min,max,round,scale,scaleAndAdd,distance,squaredDistance,length,squaredLength,negate,inverse,normalize,dot,cross,lerp,random,transformMat2,transformMat2d,transformMat3,transformMat4,rotate,angle,zero,str,exactEquals,equals,tmpPoint1,tmpPoint2,tmpLine1,tmpLine2,lineInt,lineSegmentsIntersect,triangleArea,isLeft,isLeftOn,isRight,isRightOn,collinear,sqdist,polygonAt,polygonClear,polygonAppend,polygonMakeCCW,polygonReverse,polygonIsReflex,polygonCanSee,polygonCanSee2,polygonCopy,polygonGetCutEdges,polygonDecomp,polygonSlice,polygonIsSimple,getIntersectionPoint,polygonQuickDecomp,polygonRemoveCollinearPoints,polygonRemoveDuplicatePoints,scalar_eq,points_eq,ReadBrandList,RunTest,GetWindowsNTVersionName,asyncifyRequest,asyncifyTransaction,openReadOnlyTransaction,openWriteTransaction,lazyOpenDatabase,RequireString,getEntriesFromCursor,NOT_IMPLEMENTED,DISALLOW_CALLBACK,StructuredClone,arrayFlat,assertFail,isValidTypeChange,logDefendedObjectWarning,CheckDefendedObjectsUsedCorrectly,getObjectPropertySet,VerifyObjectPropertiesConsistent,isNegativeZero,padTwoDigits,hueToRGB,RequireStringOrNumber,SetNewCallback,DoAsyncifiedWork,DoNextAsyncifiedJob,ClearTimeCache,CheckActiveIdleTimeouts,lookupHtmlEntity,bbToHtmlReplacerFunc,IsWordBreakWhiteSpace,IsOpeningCJKPunctiationChar,IsContinuingCJKPunctuationChar,WordBreakTrimEnd,IsNewline,PlaneFromPoints,IsInFrontOfPlane,IsPointInFrontOfPlane,interpolateQuad,GetFormatSpecifiers,fillOrStrokeRect,ptToPx,getOffsetParam,CheckPendingPolls,SortZOrderList,GetDispatcher,MakeIWorldInstanceClass,GetDispatcher,GetTimelineState,GetTimelineState,GetTweenState,getActual,GetTypeFromFileExtension,AddScript,SortByInstLastCachedZIndex,SortByInstLastCachedZIndex,SortByInstZElevation,vec3EqualsXYZ,MaybePrepareLayerDraw,SortSolArray,IsSolArrayIdentical,NoActions,WrapIndex,GetExpressionFunc,EvalParams,EvalParams,GetInst,GetWorldInfo,GetInst_SDKv2,GetWorldInfo_SDKv2,GetObjectClass,GetLayer,CollMemory_Add,CollMemory_Remove,CollMemory_RemoveInstance,CollMemory_Get,DoOverlapCondition,FinishCollisionConditionPicking,FinishCollisionCondition,PickByUID_Normal,PickByUID_Inverted,GetNextParamMap,ValidateInternalAPIToken,ForEachOrdered_SortInstances,SortZOrderList,SortInstancesByValue,CloneDrawable,getOffsetParam,normalizeCssColorString,GetParticleEngine,randomOffset,WrapModeToStr,GetTouchSdkInstance,GetKeyboardSdkInstance,StringFromCharCode,ResizeArray,DoForEachTrigger,CompareValues,IsExpressionType,GetAudioSdkInstance,GetAudioDOMInterface,Log,getIndexForEase,ValidateTags,SetObjectTypeCollisionsEnabled,UnwrapIWorldInstance,CloneVec2,SplitConvexPolysOver8Points,SplitConvexPoly,unaryminus,bothNumbers,add,subtract,multiply,divide,mod,pow,and,or;{let lineInt2=function(t,s,e){var i=[0,0],r=t[1][1]-t[0][1],n=t[0][0]-t[1][0],t=r*t[0][0]+n*t[0][1],h=s[1][1]-s[0][1],o=s[0][0]-s[1][0],s=h*s[0][0]+o*s[0][1],a=r*o-h*n;return scalar_eq2(a,0,e=e||0)||(i[0]=(o*t-n*s)/a,i[1]=(r*s-h*t)/a),i},lineSegmentsIntersect2=function(t,s,e,i){var r,n=s[0]-t[0],s=s[1]-t[1],h=i[0]-e[0];return h*s-(i=i[1]-e[1])*n!=0&&(r=(h*(t[1]-e[1])+i*(e[0]-t[0]))/(i*n-h*s),0<=(t=(n*(e[1]-t[1])+s*(t[0]-e[0]))/(h*s-i*n)))&&t<=1&&0<=r&&r<=1},triangleArea2=function(t,s,e){return(s[0]-t[0])*(e[1]-t[1])-(e[0]-t[0])*(s[1]-t[1])},isLeft2=function(t,s,e){return 0<triangleArea2(t,s,e)},isLeftOn2=function(t,s,e){return 0<=triangleArea2(t,s,e)},isRight2=function(t,s,e){return triangleArea2(t,s,e)<0},isRightOn2=function(t,s,e){return triangleArea2(t,s,e)<=0},collinear2=function(t,s,e,i){var r,n,h;return i?(h=tmpPoint2,(n=tmpPoint1)[0]=s[0]-t[0],n[1]=s[1]-t[1],h[0]=e[0]-s[0],h[1]=e[1]-s[1],r=n[0]*h[0]+n[1]*h[1],n=Math.sqrt(n[0]*n[0]+n[1]*n[1]),h=Math.sqrt(h[0]*h[0]+h[1]*h[1]),Math.acos(r/(n*h))<i):0===triangleArea2(t,s,e)},sqdist2=function(t,s){var e=s[0]-t[0];return e*e+(s=s[1]-t[1])*s},polygonAt2=function(t,s){var e=t.length;return t[s<0?s%e+e:s%e]},polygonClear2=function(t){t.length=0},polygonAppend2=function(t,s,e,i){for(var r=e;r<i;r++)t.push(s[r])},polygonMakeCCW2=function(t){for(var s=0,e=t,i=1;i<t.length;++i)(e[i][1]<e[s][1]||e[i][1]===e[s][1]&&e[i][0]>e[s][0])&&(s=i);return!isLeft2(polygonAt2(t,s-1),polygonAt2(t,s),polygonAt2(t,s+1))&&(polygonReverse2(t),!0)},polygonReverse2=function(t){for(var s=[],e=t.length,i=0;i!==e;i++)s.push(t.pop());for(i=0;i!==e;i++)t[i]=s[i]},polygonIsReflex2=function(t,s){return isRight2(polygonAt2(t,s-1),polygonAt2(t,s),polygonAt2(t,s+1))},polygonCanSee3=function(t,s,e){var i,r=tmpLine1,n=tmpLine2;if(isLeftOn2(polygonAt2(t,s+1),polygonAt2(t,s),polygonAt2(t,e))&&isRightOn2(polygonAt2(t,s-1),polygonAt2(t,s),polygonAt2(t,e)))return!1;for(var h=sqdist2(polygonAt2(t,s),polygonAt2(t,e)),o=0;o!==t.length;++o)if((o+1)%t.length!==s&&o!==s&&isLeftOn2(polygonAt2(t,s),polygonAt2(t,e),polygonAt2(t,o+1))&&isRightOn2(polygonAt2(t,s),polygonAt2(t,e),polygonAt2(t,o))&&(r[0]=polygonAt2(t,s),r[1]=polygonAt2(t,e),n[0]=polygonAt2(t,o),n[1]=polygonAt2(t,o+1),i=lineInt2(r,n),sqdist2(polygonAt2(t,s),i)<h))return!1;return!0},polygonCanSee22=function(t,s,e){for(var i=0;i!==t.length;++i)if(i!==s&&i!==e&&(i+1)%t.length!==s&&(i+1)%t.length!==e&&lineSegmentsIntersect2(polygonAt2(t,s),polygonAt2(t,e),polygonAt2(t,i),polygonAt2(t,i+1)))return!1;return!0},polygonCopy2=function(t,s,e,i){var r=i||[];if(polygonClear2(r),s<e)for(var n=s;n<=e;n++)r.push(t[n]);else{for(n=0;n<=e;n++)r.push(t[n]);for(n=s;n<t.length;n++)r.push(t[n])}return r},polygonGetCutEdges2=function(t){for(var s=[],e=[],i=[],r=Number.MAX_VALUE,n=0;n<t.length;++n)if(polygonIsReflex2(t,n))for(var h=0;h<t.length;++h)if(polygonCanSee3(t,n,h)){for(var e=polygonGetCutEdges2(polygonCopy2(t,n,h,i)),o=polygonGetCutEdges2(polygonCopy2(t,h,n,i)),a=0;a<o.length;a++)e.push(o[a]);e.length<r&&(r=(s=e).length,s.push([polygonAt2(t,n),polygonAt2(t,h)]))}return s},polygonDecomp2=function(t){var s=polygonGetCutEdges2(t);return 0<s.length?polygonSlice2(t,s):[t]},polygonSlice2=function(t,s){if(0===s.length)return[t];if(s instanceof Array&&s.length&&s[0]instanceof Array&&2===s[0].length&&s[0][0]instanceof Array){for(var e=[t],i=0;i<s.length;i++)for(var r=s[i],n=0;n<e.length;n++){var h=polygonSlice2(e[n],r);if(h){e.splice(n,1),e.push(h[0],h[1]);break}}return e}return i=t.indexOf((r=s)[0]),n=t.indexOf(r[1]),-1!==i&&-1!==n&&[polygonCopy2(t,i,n),polygonCopy2(t,n,i)]},polygonIsSimple2=function(t){for(var s=t,e=0;e<s.length-1;e++)for(var i=0;i<e-1;i++)if(lineSegmentsIntersect2(s[e],s[e+1],s[i],s[i+1]))return!1;for(e=1;e<s.length-2;e++)if(lineSegmentsIntersect2(s[0],s[s.length-1],s[e],s[e+1]))return!1;return!0},getIntersectionPoint2=function(t,s,e,i,r){var n=s[1]-t[1],s=t[0]-s[0],t=n*t[0]+s*t[1],h=i[1]-e[1],i=e[0]-i[0],e=h*e[0]+i*e[1],o=n*i-h*s;return scalar_eq2(o,0,r=r||0)?[0,0]:[(i*t-s*e)/o,(n*e-h*t)/o]},polygonQuickDecomp2=function(t,s,e,i,r,n,h){n=n||100,h=h||0,r=r||25,s=void 0!==s?s:[],e=e||[],i=i||[];var o=[0,0],a=[0,0],l=[0,0],c=0,u=0,f=0,d=0,p=0,C=0,m=0,g=[],S=[],y=t,_=t;if(!(_.length<3))if(n<++h)console.warn("quickDecomp: max level ("+n+") reached.");else{for(var T=0;T<t.length;++T)if(polygonIsReflex2(y,T)){e.push(y[T]);for(var c=u=Number.MAX_VALUE,A=0;A<t.length;++A)isLeft2(polygonAt2(y,T-1),polygonAt2(y,T),polygonAt2(y,A))&&isRightOn2(polygonAt2(y,T-1),polygonAt2(y,T),polygonAt2(y,A-1))&&(l=getIntersectionPoint2(polygonAt2(y,T-1),polygonAt2(y,T),polygonAt2(y,A),polygonAt2(y,A-1)),isRight2(polygonAt2(y,T+1),polygonAt2(y,T),l))&&(f=sqdist2(y[T],l))<u&&(u=f,a=l,C=A),isLeft2(polygonAt2(y,T+1),polygonAt2(y,T),polygonAt2(y,A+1))&&isRightOn2(polygonAt2(y,T+1),polygonAt2(y,T),polygonAt2(y,A))&&(l=getIntersectionPoint2(polygonAt2(y,T+1),polygonAt2(y,T),polygonAt2(y,A),polygonAt2(y,A+1)),isLeft2(polygonAt2(y,T-1),polygonAt2(y,T),l))&&(f=sqdist2(y[T],l))<c&&(c=f,o=l,p=A);if(C===(p+1)%t.length)l[0]=(a[0]+o[0])/2,l[1]=(a[1]+o[1])/2,i.push(l),T<p?(polygonAppend2(g,y,T,p+1),g.push(l),S.push(l),0!==C&&polygonAppend2(S,y,C,y.length),polygonAppend2(S,y,0,T+1)):(0!==T&&polygonAppend2(g,y,T,y.length),polygonAppend2(g,y,0,p+1),g.push(l),S.push(l),polygonAppend2(S,y,C,T+1));else{if(p<C&&(p+=t.length),d=Number.MAX_VALUE,p<C)return s;for(A=C;A<=p;++A)isLeftOn2(polygonAt2(y,T-1),polygonAt2(y,T),polygonAt2(y,A))&&isRightOn2(polygonAt2(y,T+1),polygonAt2(y,T),polygonAt2(y,A))&&(f=sqdist2(polygonAt2(y,T),polygonAt2(y,A)))<d&&polygonCanSee22(y,T,A)&&(d=f,m=A%t.length);T<m?(polygonAppend2(g,y,T,m+1),0!==m&&polygonAppend2(S,y,m,_.length),polygonAppend2(S,y,0,T+1)):(0!==T&&polygonAppend2(g,y,T,_.length),polygonAppend2(g,y,0,m+1),polygonAppend2(S,y,m,T+1))}return g.length<S.length?(polygonQuickDecomp2(g,s,e,i,r,n,h),polygonQuickDecomp2(S,s,e,i,r,n,h)):(polygonQuickDecomp2(S,s,e,i,r,n,h),polygonQuickDecomp2(g,s,e,i,r,n,h)),s}s.push(t)}return s},polygonRemoveCollinearPoints2=function(t,s){for(var e=0,i=t.length-1;3<t.length&&0<=i;--i)collinear2(polygonAt2(t,i-1),polygonAt2(t,i),polygonAt2(t,i+1),s)&&(t.splice(i%t.length,1),e++);return e},polygonRemoveDuplicatePoints2=function(t,s){for(var e=t.length-1;1<=e;--e)for(var i=t[e],r=e-1;0<=r;--r)points_eq2(i,t[r],s)&&t.splice(e,1)},scalar_eq2=function(t,s,e){return e=e||0,Math.abs(t-s)<=e},points_eq2=function(t,s,e){return scalar_eq2(t[0],s[0],e)&&scalar_eq2(t[1],s[1],e)};lineInt=lineInt2,lineSegmentsIntersect=lineSegmentsIntersect2,triangleArea=triangleArea2,isLeft=isLeft2,isLeftOn=isLeftOn2,isRight=isRight2,isRightOn=isRightOn2,collinear=collinear2,sqdist=sqdist2,polygonAt=polygonAt2,polygonClear=polygonClear2,polygonAppend=polygonAppend2,polygonMakeCCW=polygonMakeCCW2,polygonReverse=polygonReverse2,polygonIsReflex=polygonIsReflex2,polygonCanSee=polygonCanSee3,polygonCanSee2=polygonCanSee22,polygonCopy=polygonCopy2,polygonGetCutEdges=polygonGetCutEdges2,polygonDecomp=polygonDecomp2,polygonSlice=polygonSlice2,polygonIsSimple=polygonIsSimple2,getIntersectionPoint=getIntersectionPoint2,polygonQuickDecomp=polygonQuickDecomp2,polygonRemoveCollinearPoints=polygonRemoveCollinearPoints2,polygonRemoveDuplicatePoints=polygonRemoveDuplicatePoints2,scalar_eq=scalar_eq2,points_eq=points_eq2,tmpPoint1=[],tmpPoint2=[],tmpLine1=[],tmpLine2=[],self.xs={Ls:polygonDecomp2,Ds:polygonQuickDecomp2,Ns:polygonIsSimple2,Fs:polygonRemoveCollinearPoints2,$s:polygonRemoveDuplicatePoints2,ks:polygonMakeCCW2}}{let isReady=!1,hasAppStarted=!1,buildMode="dev",internalApiToken=Symbol("Construct internal API token"),internalApiTokenAccessesRemaining=14,C33=self.Bs=class{constructor(){throw TypeError("static class can't be instantiated")}static Ws(){if(internalApiTokenAccessesRemaining<=0)throw new Error("cannot obtain internal API token");return--internalApiTokenAccessesRemaining,internalApiToken}static Hs(){isReady=!0}static Vs(){return isReady}static Us(){hasAppStarted=!0}static js(){return hasAppStarted}static Xs(t){buildMode=t}static Ys(){return buildMode}static qs(){return"final"===buildMode}};C33.isDebug=!1,C33.Ks=!1,C33.hardwareConcurrency=navigator.hardwareConcurrency||2,self.zs={}}{const C33=self.Bs;C33.Js=class{constructor(t){this.Qs=t,this.Zs=new Map,this.te()}te(){let t=this.Qs,s=(t=t.startsWith("?")||t.startsWith("#")?t.substr(1):t).split("&");for(const e of s)this.ie(e)}ie(t){if(t)if(t.includes("=")){const s=t.indexOf("="),e=decodeURIComponent(t.substring(0,s)),i=decodeURIComponent(t.substring(s+1));this.Zs.set(e,i)}else this.Zs.set(t,null)}ne(){for(const t of this.Zs)console.log("[QueryParser] Parameter '"+t[0]+"' = "+(null===t[1]?"null":"'"+t[1]+"'"))}he(t){return this.Zs.has(t)}oe(t){const s=this.Zs.get(t);return void 0===s?null:s}ae(){history.replaceState("",document.title,location.pathname+location.search)}le(t){this.Qs=t,this.Zs.clear(),this.te()}},C33.ue=new C33.Js(location.search),C33.fe=new C33.Js(location.hash),C33.ue.he("perf")&&(C33.de=!0),"dev"!==C33.ue.oe("mode")&&C33.Xs("final")}{let GetWindowsNTVersionName2=function(t){const s=parseFloat(t),e=windowsNTVerMap.get(s);return e||(13<=s?"11":"NT "+t)};GetWindowsNTVersionName=GetWindowsNTVersionName2;const C33=self.Bs,UNKNOWN="(unknown)",windowsNTVerMap=(C33.pe={Ce:UNKNOWN,me:UNKNOWN,ge:UNKNOWN,Se:UNKNOWN,ye:NaN,_e:UNKNOWN,Te:"browser",Ae:!0,Ee:!1,Ie:!1,we:!1,Re:async()=>{}},new Map([[5,"2000"],[5.1,"XP"],[5.2,"XP"],[6,"Vista"],[6.1,"7"],[6.2,"8"],[6.3,"8.1"],[10,"10"]])),uaStr=navigator.userAgent,uaData=navigator.userAgentData;if(uaData&&0<uaData.brands.length){let ReadBrandList2=function(t){let s="",i="",r="",n="";for(const h of t){const o=d.get(h.brand),a=(!s&&o&&(s=o,i=h.version),e.get(h.brand));!r&&a&&(r=a,n=h.version)}s||"Chromium"!==r||(C33.pe.ge="Chromium",C33.pe.Se=n),C33.pe.ge=s||UNKNOWN,C33.pe.Se=i||UNKNOWN,C33.pe._e=r||UNKNOWN};ReadBrandList=ReadBrandList2,C33.pe.Ce=uaData.platform,C33.pe.Ee=uaData.mobile,C33.pe.Ae=!C33.pe.Ee;const d=new Map([["Google Chrome","Chrome"],["Microsoft Edge","Edge"],["Opera","Opera"],["Opera GX","Opera GX"],["Mozilla Firefox","Firefox"],["Apple Safari","Safari"],["NW.js","NW.js"]]),e=new Map([["Chromium","Chromium"],["Gecko","Gecko"],["WebKit","WebKit"]]);ReadBrandList2(uaData.brands);let o=!1;C33.pe.Re=async()=>{if(!o)try{const t=await navigator.userAgentData.getHighEntropyValues(["platformVersion","fullVersionList"]);ReadBrandList2(t.fullVersionList),"Windows"===C33.pe.Ce?C33.pe.me=GetWindowsNTVersionName2(t.platformVersion):C33.pe.me=t.platformVersion,o=!0}catch(t){console.warn("Failed to get detailed user agent information: ",t)}}}else{let RunTest2=function(t,s){const e=Array.isArray(t)?t:[t];for(const i of e){const r=i.exec(uaStr);if(r){s(r);break}}};RunTest=RunTest2,RunTest2(/windows\s+nt\s+([\d\.]+)/i,t=>{C33.pe.Ce="Windows";const s=t[1];C33.pe.me=GetWindowsNTVersionName2(s)}),RunTest2(/mac\s+os\s+x\s+([\d\._]+)/i,t=>{C33.pe.Ce="macOS",C33.pe.me=t[1].replace(/_/g,".")}),RunTest2(/CrOS/,()=>{C33.pe.Ce="Chrome OS"}),RunTest2(/linux|openbsd|freebsd|netbsd/i,()=>{C33.pe.Ce="Linux"}),RunTest2(/android/i,()=>{C33.pe.Ce="Android"}),RunTest2(/android\s+([\d\.]+)/i,t=>{C33.pe.Ce="Android",C33.pe.me=t[1]}),C33.pe.Ce===UNKNOWN&&(RunTest2(/(iphone|ipod|ipad)/i,t=>{C33.pe.Ce="iOS"}),RunTest2([/iphone\s+os\s+([\d\._]+)/i,/ipad[^)]*os\s+([\d\._]+)/i],t=>{C33.pe.Ce="iOS",C33.pe.me=t[1].replace(/_/g,".")}));const q=/chrome\//i.test(uaStr),r=/chromium\//i.test(uaStr),s=/edg\//i.test(uaStr),t=/OPR\//.test(uaStr),u=/nwjs/i.test(uaStr),v=/safari\//i.test(uaStr),w=/webkit/i.test(uaStr),x=(s||t||RunTest2(/chrome\/([\d\.]+)/i,t=>{C33.pe.ge="Chrome",C33.pe.Se=t[1],C33.pe._e="Chromium"}),RunTest2(/edg\/([\d\.]+)/i,t=>{C33.pe.ge="Edge",C33.pe.Se=t[1],C33.pe._e="Chromium"}),RunTest2(/OPR\/([\d\.]+)/,t=>{C33.pe.ge="Opera",C33.pe.Se=t[1],C33.pe._e="Chromium"}),RunTest2(/chromium\/([\d\.]+)/i,t=>{C33.pe.ge="Chromium",C33.pe.Se=t[1],C33.pe._e="Chromium"}),RunTest2(/nwjs\/[0-9.]+/i,t=>{C33.pe.ge="NW.js",C33.pe.Se=t[1],C33.pe._e="Chromium",C33.pe.Te="nwjs"}),RunTest2(/firefox\/([\d\.]+)/i,t=>{C33.pe.ge="Firefox",C33.pe.Se=t[1],C33.pe._e="Gecko"}),!v||q||r||s||t||u||(C33.pe.ge="Safari",C33.pe._e="WebKit",RunTest2(/version\/([\d\.]+)/i,t=>{C33.pe.Se=t[1]}),RunTest2(/crios\/([\d\.]+)/i,t=>{C33.pe.ge="Chrome for iOS",C33.pe.Se=t[1]}),RunTest2(/fxios\/([\d\.]+)/i,t=>{C33.pe.ge="Firefox for iOS",C33.pe.Se=t[1]}),RunTest2(/edgios\/([\d\.]+)/i,t=>{C33.pe.ge="Edge for iOS",C33.pe.Se=t[1]})),C33.pe._e===UNKNOWN&&w&&(C33.pe._e="WebKit"),"Android"===C33.pe.Ce&&"Safari"===C33.pe.ge&&(C33.pe.ge="Stock"),new Set(["Windows","macOS","Linux","Chrome OS"])),y=x.has(C33.pe.Ce)||"nwjs"===C33.pe.Te;C33.pe.Ae=y,C33.pe.Ee=!y}"Chrome"===C33.pe.ge&&"browser"===C33.pe.Te&&/wv\)/.test(uaStr)&&(C33.pe.Te="webview"),"nwjs"!==C33.pe.Te&&"undefined"!=typeof window&&(window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches||navigator.standalone)&&(C33.pe.Te="webapp"),C33.pe.ye=parseFloat(C33.pe.Se);const looksLikeIPadOS="macOS"===C33.pe.Ce&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints;looksLikeIPadOS&&(C33.pe.Ce="iOS",C33.pe.me=C33.pe.Se,C33.pe.Ae=!1,C33.pe.Ee=!0,C33.pe.we=!0),C33.pe.Ie="macOS"===C33.pe.Ce||"iOS"===C33.pe.Ce}{let asyncifyRequest2=function(e){return new Promise((t,s)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>s(e.error)})},asyncifyTransaction2=function(e){return new Promise((t,s)=>{e.oncomplete=()=>t(),e.onerror=()=>s(e.error),e.onabort=()=>s(e.error)})},openReadOnlyTransaction2=function(t,s){return openTransaction(t,s)},openWriteTransaction2=function(t,s){return openTransaction(t,s,!0)},lazyOpenDatabase2=function(s){RequireString2(s);let t=c.get(s);return t instanceof Promise||(t=openDatabase(s),c.set(s,t),t.catch(t=>c.delete(s))),t},RequireString2=function(t){if("string"!=typeof t)throw new TypeError("expected string")},getEntriesFromCursor2=function(t,r){const s=t.objectStore(b).openCursor();return new Promise(e=>{const i=[];s.onsuccess=t=>{const s=t.target.result;if(s){switch(r){case"entries":i.push([s.key,s.value]);break;case"keys":i.push(s.key);break;case"values":i.push(s.value)}s.continue()}else e(i)}})};asyncifyRequest=asyncifyRequest2,asyncifyTransaction=asyncifyTransaction2,openReadOnlyTransaction=openReadOnlyTransaction2,openWriteTransaction=openWriteTransaction2,lazyOpenDatabase=lazyOpenDatabase2,RequireString=RequireString2,getEntriesFromCursor=getEntriesFromCursor2;const a=2,b="keyvaluepairs",c=new Map,d="undefined"!=typeof IDBObjectStore&&"function"==typeof IDBObjectStore.prototype.getAll,e="undefined"!=typeof IDBObjectStore&&"function"==typeof IDBObjectStore.prototype.getAllKeys;async function openTransaction(s,e,i=!1,r=!0){const t=await lazyOpenDatabase2(s);try{const n=t.transaction([b],i?"readwrite":"readonly");return e(n)}catch(t){if(r&&"InvalidStateError"===t.name)return c.delete(s),openTransaction(s,e,i,!1);throw t}}async function openDatabase(e){RequireString2(e);const t=indexedDB.open(e,a);return t.addEventListener("upgradeneeded",t=>{try{const s=t.target.result;s.createObjectStore(b)}catch(t){console.error("Failed to create objectstore for database "+e,t)}}),asyncifyRequest2(t)}class f{constructor(t){RequireString2(t),this.name=t}async ready(){await lazyOpenDatabase2(this.name)}set(r,n){return RequireString2(r),openWriteTransaction2(this.name,async t=>{const s=t.objectStore(b).put(n,r),e=asyncifyRequest2(s),i=asyncifyTransaction2(t);await Promise.all([i,e])})}get(n){return RequireString2(n),openReadOnlyTransaction2(this.name,async t=>{const s=t.objectStore(b).get(n),e=asyncifyRequest2(s),i=asyncifyTransaction2(t),[,r]=await Promise.all([i,e]);return r})}delete(r){return RequireString2(r),openWriteTransaction2(this.name,async t=>{const s=t.objectStore(b).delete(r),e=asyncifyRequest2(s),i=asyncifyTransaction2(t);await Promise.all([i,e])})}clear(){return openWriteTransaction2(this.name,async t=>{const s=t.objectStore(b).clear(),e=asyncifyRequest2(s),i=asyncifyTransaction2(t);await Promise.all([i,e])})}keys(){return openReadOnlyTransaction2(this.name,async t=>{let s;if(e){const n=t.objectStore(b).getAllKeys();s=asyncifyRequest2(n)}else s=getEntriesFromCursor2(t,"keys");const i=asyncifyTransaction2(t),[,r]=await Promise.all([i,s]);return r})}values(){return openReadOnlyTransaction2(this.name,async t=>{let s;if(d){const r=t.objectStore(b).getAll();s=asyncifyRequest2(r)}else s=getEntriesFromCursor2(t,"values");const e=asyncifyTransaction2(t),[,i]=await Promise.all([e,s]);return i})}entries(){return openReadOnlyTransaction2(this.name,async t=>{const s=getEntriesFromCursor2(t,"entries"),e=asyncifyTransaction2(t),[,i]=await Promise.all([e,s]);return i})}}self.Me=f}{let NOT_IMPLEMENTED2=function(t){throw new Error(`"${t}" is not implemented`)},DISALLOW_CALLBACK2=function(t){if("function"==typeof t)throw new Error("localforage callback API is not implemented; please use the promise API instead")},StructuredClone2=function(i){return"object"==typeof i?new Promise(s=>{const{port1:t,port2:e}=new MessageChannel;e.onmessage=t=>s(t.data),t.postMessage(i)}):Promise.resolve(i)};NOT_IMPLEMENTED=NOT_IMPLEMENTED2,DISALLOW_CALLBACK=DISALLOW_CALLBACK2,StructuredClone=StructuredClone2;const a=self.Me,b=[/no available storage method found/i,/an attempt was made to break through the security policy of the user agent/i,/the user denied permission to access the database/i,/a mutation operation was attempted on a database that did not allow mutations/i,/idbfactory\.open\(\) called in an invalid security context/i],c=new WeakMap;class d{constructor(t){this.Ge=t,this.ve=!this.Ge,this.ve||"undefined"!=typeof indexedDB||(this.ve=!0,console.warn("Unable to use local storage because IndexedDB API is not available")),this.Pe=new Map}Oe(t){if(!this.ve)for(const s of b)if(t&&s.test(t.message)){console.error("Unable to use local storage, reverting to in-memory store: ",t,t.message),this.ve=!0;break}}async xe(t){const s=this.Pe.get(t),e=await StructuredClone2(s);return void 0===e?null:e}async Le(t,s){s=await StructuredClone2(s),this.Pe.set(t,s)}De(t){this.Pe.delete(t)}Ne(){this.Pe.clear()}Fe(){return Array.from(this.Pe.keys())}$e(){return this.ve}ke(){return this.Pe}Be(t){this.Pe=t}async getItem(s,t){if(DISALLOW_CALLBACK2(t),this.ve)return this.xe(s);let e;try{e=await this.Ge.get(s)}catch(t){return this.Oe(t),this.ve?this.xe(s):(console.error(`Error reading '${s}' from storage, returning null: `,t),null)}return void 0===e?null:e}async setItem(s,e,t){if(DISALLOW_CALLBACK2(t),void 0===e&&(e=null),this.ve)await this.Le(s,e);else try{await this.Ge.set(s,e)}catch(t){if(this.Oe(t),!this.ve)throw t;await this.Le(s,e)}}async removeItem(s,t){if(DISALLOW_CALLBACK2(t),this.ve)this.De(s);else try{await this.Ge.delete(s)}catch(t){this.Oe(t),this.ve?this.De(s):console.error(`Error removing '${s}' from storage: `,t)}}async clear(t){if(DISALLOW_CALLBACK2(t),this.ve)this.Ne();else try{await this.Ge.clear()}catch(t){this.Oe(t),this.ve?this.Ne():console.error("Error clearing storage: ",t)}}async keys(t){if(DISALLOW_CALLBACK2(t),this.ve)return this.Fe();let s=[];try{s=await this.Ge.keys()}catch(t){if(this.Oe(t),this.ve)return this.Fe();console.error("Error getting storage keys: ",t)}return s}ready(t){return DISALLOW_CALLBACK2(t),this.ve?Promise.resolve(!0):this.Ge.ready()}We(t){if(t.He)return new d(null);{const s=t.name;if("string"!=typeof s)throw new TypeError("invalid store name");const e=new a(s);return new d(e)}}length(t){NOT_IMPLEMENTED2("localforage.length()")}key(t,s){NOT_IMPLEMENTED2("localforage.key()")}iterate(t,s){NOT_IMPLEMENTED2("localforage.iterate()")}Ve(t){NOT_IMPLEMENTED2("localforage.setDriver()")}config(t){NOT_IMPLEMENTED2("localforage.config()")}Ue(t){NOT_IMPLEMENTED2("localforage.defineDriver()")}je(){NOT_IMPLEMENTED2("localforage.driver()")}supports(t){NOT_IMPLEMENTED2("localforage.supports()")}dropInstance(){NOT_IMPLEMENTED2("localforage.dropInstance()")}}self.localforage=new d(new a("localforage"))}{const C33=self.Bs;if(C33.Xe={},C33.Xe.Ye=(()=>{try{if("undefined"==typeof document)return!1;const t=document.createElement("div");if(void 0===t.animate)return!1;const s=t.animate([{opacity:"0"},{opacity:"1"}],1e3);return void 0!==s.reverse}catch(t){return!1}})(),C33.Xe.qe="undefined"!=typeof HTMLDialogElement,C33.Xe.Ke=!!self.requestIdleCallback,C33.Xe.ImageBitmap=!!self.createImageBitmap,C33.Xe.ImageBitmapOptions=!1,C33.Xe.Je=!1,C33.Xe.ImageBitmap){try{self.createImageBitmap(new ImageData(32,32),{premultiplyAlpha:"none"}).then(()=>{C33.Xe.ImageBitmapOptions=!0}).catch(()=>{C33.Xe.ImageBitmapOptions=!1})}catch(e){C33.Xe.ImageBitmapOptions=!1}try{self.createImageBitmap(new ImageData(32,32),{resizeWidth:10,resizeHeight:10}).then(t=>{C33.Xe.Je=10===t.width&&10===t.height}).catch(()=>{C33.Xe.Je=!1})}catch(e){C33.Xe.Je=!1}}if(C33.Xe.Qe=!(!navigator.clipboard||!navigator.clipboard.readText),C33.Xe.Ze=!(!navigator.permissions||!navigator.permissions.query),C33.Xe.ti=!1,C33.Xe.Ze){const g={name:"clipboard-read"};navigator.permissions.query(g).then(()=>{C33.Xe.ti=!0}).catch(()=>{C33.Xe.ti=!1})}C33.Xe.si=!!(navigator.permissions&&navigator.clipboard&&self.ClipboardItem),C33.Xe.ei="undefined"!=typeof Proxy,C33.Xe.ii=(()=>{if("undefined"==typeof document)return!1;const t=document.createElement("a");return void 0!==t.download})(),C33.Xe.ri="function"==typeof fetch,C33.Xe.ni=!!(self.isSecureContext&&"Opera"!==C33.pe.ge&&navigator.storage&&navigator.storage.persist),C33.Xe.hi=!!(self.isSecureContext&&navigator.storage&&navigator.storage.estimate),C33.Xe.oi=(()=>{if("undefined"==typeof document)return!1;if("iOS"===C33.pe.Ce)return!1;const t=document.documentElement;return!!(t.requestFullscreen||t.msRequestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen)})(),C33.Xe.ImageDecoder=void 0!==self.ImageDecoder,C33.Xe.ai=!!self.VideoEncoder,C33.Xe.li=!!self.showOpenFilePicker,C33.Xe.ci=!!self.queryLocalFonts,C33.Xe.UserActivation=!!navigator.userActivation,C33.Xe.fi=!1,(async()=>{let s;"undefined"==typeof document?s=new OffscreenCanvas(32,32):((s=document.createElement("canvas")).width=32,s.height=32);const t=s.getContext("2d");t.fillStyle="blue",t.fillRect(0,0,32,32);let e=null;try{s.convertToBlob?e=await s.convertToBlob({type:"image/webp",quality:1}):s.toBlob&&(e=await new Promise(t=>s.toBlob(t,"image/webp",1))),C33.Xe.fi=e&&"image/webp"===e.type}catch(t){C33.Xe.fi=!1}})()}{let arrayFlat2=function(t,e){return t.reduce((t,s)=>(0<e&&Array.isArray(s)?Array.prototype.push.apply(t,arrayFlat2(s,e-1)):t.push(s),t),[])};arrayFlat=arrayFlat2;const C33=self.Bs;if(!String.prototype.trimStart){const a=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*/;String.prototype.trimStart=function(){return this.replace(a,"")}}if(!String.prototype.trimEnd){const c=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*$/;String.prototype.trimEnd=function(){return this.replace(c,"")}}String.prototype.replaceAll||(String.prototype.replaceAll=function(t,s){return this.replace(new RegExp(C33.di(t),"g"),s)}),Array.prototype.values||(Array.prototype.values=function*(){for(const t of this)yield t}),Array.prototype.flat||(Array.prototype.flat=function(t=1){return arrayFlat2(this,t)}),Array.prototype.at||(Array.prototype.at=function(t){if((t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),String.prototype.at||(String.prototype.at=function(t){if((t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),RegExp.escape||(RegExp.escape=function(t){return String(t).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}),Set.prototype.isSubsetOf||(Set.prototype.isSubsetOf=function(t){if(!(t instanceof Set))throw new TypeError("argument must be a Set");for(const s of this)if(!t.has(s))return!1;return!0}),navigator.storage&&!navigator.storage.estimate&&navigator.webkitTemporaryStorage&&navigator.webkitTemporaryStorage.queryUsageAndQuota&&(navigator.storage.estimate=function(){return new Promise((e,t)=>navigator.webkitTemporaryStorage.queryUsageAndQuota((t,s)=>e({usage:t,quota:s}),t))}),void 0===self.isSecureContext&&(self.isSecureContext="https:"===location.protocol),void 0===self.globalThis&&(self.globalThis=self)}{let assertFail2=function(t){let s=C33.Ci(),e="Assertion failure: "+t+"\n\nStack trace:\n"+s;console.error(e)};assertFail=assertFail2;const C33=self.Bs;self.assert=function(t,s){t||assertFail2(s)}}{const C33=self.Bs,C3X=self.zs,TypedArray=(C33.mi=function(t){return"number"==typeof t},C33.gi=function(t){return C33.mi(t)&&isFinite(t)},C33.Si=function(t){if(!C33.mi(t))throw new TypeError("expected number")},C33.yi=function(t){C33._i(t)},C33.Ti=function(t,s,e){if(!C33.mi(t)||isNaN(t)||t<s||e<t)throw new RangeError("number outside of range")},C33.Ai=function(...s){for(let t of s);},C33.Ei=function(t){if(!C33.gi(t))throw new TypeError("expected finite number")},C33.Ii=function(t){C33._i(t)},C33.wi=function(...s){for(let t of s);},C33.Ri=function(t){return"string"==typeof t},C33.Mi=function(t){if(!C33.Ri(t))throw new TypeError("expected string")},C33.bi=function(t){C33._i(t)},C33.Gi=function(...s){for(let t of s);},C33.vi=function(t){if("object"!=typeof t||null===t)return!1;let s=Object.getPrototypeOf(t);return s?s.constructor===Object:null===s},C33.Pi=function(t){if(!C33.vi(t))throw new TypeError("expected simple object")},C33.Oi=function(t){if(!C33._i(t)&&!C33.vi(t))throw new TypeError("expected simple object")},C33.xi=function(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)},C33.Li=function(t){if(!C33.xi(t))throw new TypeError("expected object")},C33.Di=function(t){C33._i(t)},C33.Ni=function(...s){for(let t of s);},C33.Fi=function(t){return C33.$i(t,Blob)&&"string"==typeof t.name},C33.ki=function(t){if(!C33.Fi(t))throw new TypeError("expected file")},C33.Bi=function(t){C33._i(t)},C33.Wi=function(t){return Array.isArray(t)},C33.Hi=function(t){if(!C33.Wi(t))throw new TypeError("expected array")},C33.Vi=function(t){C33._i(t)},C33.Ui=function(...s){for(let t of s);},C33.ji=function(t){return!(!C33.Wi(t)||t.length&&!C33.Wi(t[0]))},C33.Xi=function(s){if(!C33.ji(s))throw new TypeError("expected 2d array");for(let t of s)if(!C33.Wi(t))throw new TypeError("expected 2d array")},C33.Yi=function(t){C33._i(t)},C33.Ki=function(t){return"function"==typeof t},C33.Ji=function(t,s){if(!C33.Ki(t))throw new TypeError("expected function");if(!C33._i(s)&&t!==s)throw new TypeError("expected same function reference")},C33.Qi=function(t){C33._i(t)},C33.Zi=function(...s){for(let t of s);},C33.er=function(s,...e){if(!C33.Ki(s))throw new TypeError("expected function");if(!e.length)throw new Error("missing comparison functions");for(let t of e)if(!C33._i(t)&&s===t)return;throw new TypeError("expected same function reference")},C33.ir=function(...s){if(!C33._i(s))for(let t of s);},C33.rr=function(t,s){return t instanceof s},C33.nr=function(s,...e){for(let t of e)if(C33.rr(s,t))return!0;return!1},C33.hr=function(t,s){if(!C33.rr(t,s))throw new TypeError("unexpected type")},C33.lr=function(t,s){C33._i(t)},C33.cr=function(t,...s){for(let t of s);},C33.ur=function(t,...s){if(!C33.nr(t,...s))throw new TypeError("unexpected type")},C33.dr=function(t,...s){if(!C33._i(t)&&!C33.nr(t,...s))throw new TypeError("unexpected type")},C33.Cr=function(s,e){for(let t of s)if(!C33.rr(t,e))return!1;return!0},C33.mr=function(s){for(let t of s)if(!C33.gi(t))return!1;return!0},C33.Sr=function(s,t){for(let t of s);},C33._r=function(s,t){if(!C33._i(s))for(let t of s);},C33.Tr=function(s,t){if(!C33._i(s))for(let t of s);},C33.Ar=function(s){for(let t of s);},C33.Er=function(s){if(!C33._i(s))for(let t of s);},C33.Ir=function(t,s){return!(C33._i(t)||!C33.Ri(t.nodeName))&&(!s||C33.wr(t.nodeName,s))},C33.Rr=function(t,s){if(C33._i(t)||!C33.Ri(t.nodeName))throw new TypeError("expected DOM node");if(s&&!C33.wr(t.nodeName,s))throw new TypeError(`expected DOM '${s}' node`)},C33.Mr=function(t,s){C33._i(t)},C33.br=function(t,s){return!(C33._i(t)||!C33.Ri(t.tagName))&&(!s||C33.wr(t.tagName,s))},C33.Gr=function(t,s){if(C33._i(t)||!C33.Ri(t.tagName))throw new TypeError("expected HTML element");if(s&&!C33.wr(t.tagName,s))throw new TypeError(`expected HTML '${s}' element`)},C33.vr=function(t,s){C33._i(t)},C33.Pr=function(t){return C33.br(t,"img")||C33.br(t,"canvas")||C33.br(t,"video")||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap},C33.Or=function(t){if(!C33.Pr(t))throw new TypeError("expected drawable")},C33.Lr=function(t){C33._i(t)},C33.Dr=function(t){return t instanceof ImageData||C33.Pr(t)},C33.Nr=function(t){if(!C33.Dr(t))throw new TypeError("expected drawable or image data")},C33.Fr=function(t){if(!C33._i(t)&&!C33.Dr(t))throw new TypeError("expected drawable or image data")},C33.$r=function(t){return"string"==typeof t||C33.HtmlString&&t instanceof C33.HtmlString||t instanceof C33.kr},C33.Br=function(t){if(!C33.$r(t))throw new TypeError("expected string-like")},C33.Wr=function(t){C33._i(t)},C33.Hr=function(...s){for(let t of s);},C33.Vr=function(){throw new Error("must be overridden")},C33.Ur=function(){throw new Error("not yet implemented")},C33.jr=function(t){return t.constructor===function*(){}.constructor},C33.Xr=function(t){if(!C33.jr(t))throw new Error("expected generator function")},C33.Yr=function(t){return"function"===t[Symbol.iterator]},C33.qr=function(t){if(!C33.Yr(t))throw new Error("expected iterable")},C33.Kr=function(t){return!C33._i(t)},C33._i=function(t){return null==t},C33.zr=function(s){let e=s[0].constructor;for(let t of s)if(t.constructor!==e)return!1;return e},C33.Jr=function(s,e){for(let t of s)if(!(t instanceof e))return!1;return!0},Object.getPrototypeOf(Uint8Array));C33.Qr=function(t){return C33.rr(t,TypedArray)},C33.Zr=function(t){},C33.tn=function(t){C33.sn(t,TypedArray)},C33.rn=function(t,...s){if(!C33.nn(t,...s))throw new TypeError("unexpected type")},C33.nn=function(t,...s){for(const e of s)if(C33.$i(t,e))return!0;return!1},C33.sn=function(t,s){if(!C33.$i(t,s))throw new TypeError("unexpected type")},C33.$i=function(t,s){for(;t=Object.getPrototypeOf(t);)if(t.constructor.name===s.name)return!0;return!1},C3X.Si=C33.Si,C3X.yi=C33.yi,C3X.Ei=C33.Ei,C3X.Ii=C33.Ii,C3X.Mi=C33.Mi,C3X.bi=C33.bi,C3X.Li=C33.Li,C3X.Di=C33.Di,C3X.Hi=C33.Hi,C3X.Vi=C33.Vi,C3X.Ji=C33.Ji,C3X.Qi=C33.Qi,C3X.hr=C33.hr,C3X.lr=C33.lr,C3X._i=C33._i}{let isValidTypeChange2=function(t,s){let e=C33.getType(t),i=C33.getType(s);return"null"===e||"null"===i||"undefined"!==e&&"undefined"!==i&&e===i},logDefendedObjectWarning2=function(t){console.warn("[Defence] "+t+" @",C33.Ci())},CheckDefendedObjectsUsedCorrectly2=function(){if(checkRafId=-1,0<ctorObjectToProxy.size||0<ctorProxyToObject.size){let t=new Set([...ctorObjectToProxy.keys()].map(t=>C33.hn(t))),s=[...t].join(",");console.warn("An object derived from DefendedBase was not protected with debugDefend(). This will disable some checks. See the coding guidelines! Possible affected class names: "+s),ctorObjectToProxy.clear(),ctorProxyToObject.clear()}},getObjectPropertySet2=function(s){let e=new Set;for(let t in s)e.add(t);return e},VerifyObjectPropertiesConsistent2=function(t,s){let e=getObjectPropertySet2(s),i=typeProperties.get(t);if(i){let s=[];for(let t of i.values())e.has(t)?e.delete(t):s.push(t);C33.an(s,[...e]),s.length&&console.warn(`[Defence] '${C33.hn(t)}' constructor creates inconsistent properties: `+s.join(", "))}else typeProperties.set(t,e)};isValidTypeChange=isValidTypeChange2,logDefendedObjectWarning=logDefendedObjectWarning2,CheckDefendedObjectsUsedCorrectly=CheckDefendedObjectsUsedCorrectly2,getObjectPropertySet=getObjectPropertySet2,VerifyObjectPropertiesConsistent=VerifyObjectPropertiesConsistent2;const C33=self.Bs,logRafIds=new Map;C33.ln=function(t,s){console.log("%c"+t,"font-weight: bold; color:"+s)},C33.cn=function(t,...s){logRafIds.has(t)||logRafIds.set(t,-1),-1===logRafIds.get(t)&&logRafIds.set(t,requestAnimationFrame(()=>{console.log("%c"+t,"font-weight: bold",...s),logRafIds.set(t,-1)}))};let measures,ctorObjectToProxy=(C33.un=function(t){performance.mark(t),(measures=measures||new Map).has(t)||measures.set(t,{current:0,total:0,fn:0,dn:1,toString:function(){return`${t} :: current => ${this.current.toPrecision(3)} :: average => ${this.fn.toPrecision(3)} :: calls => `+this.dn}})},C33.pn=function(t){performance.measure("measure-"+t,t);const s=performance.getEntriesByName("measure-"+t)[0],e=measures.get(t);e.current=s.duration,e.total+=e.current,e.fn=e.total/e.dn,console.log(e.toString()),e.dn++,performance.clearMarks(t),performance.clearMeasures("measure-"+t)},C33.Ci=function(){return(new Error).stack},C33.Cn=function(){},C33.cast=function(t,s){return t&&t instanceof s?t:null},C33.hn=function(t){return void 0===t?"undefined":null===t?"null":"boolean"==typeof t?"<boolean>":C33.mi(t)?"<number>":C33.Ri(t)?"<string>":C33.Wi(t)?"<array>":"symbol"==typeof t?"<"+t.toString()+">":C33.Ki(t)?t.name&&"Function"!==t.name?t.name:"<anonymous function>":"object"==typeof t?t.constructor&&t.constructor.name&&"Object"!==t.constructor.name?t.constructor.name:"<anonymous object>":"<unknown>"},C33.getType=function(t){return null===t?"null":Array.isArray(t)?"array":typeof t},C33.range=function*(s,e){if(!isFinite(Math.abs(s-e)))throw new Error("Invalid parameters");if(e<s)for(let t=s-1;t>=e;t--)yield t;else for(let t=s;t<e;t++)yield t},new Map),ctorProxyToObject=new Map,proxyToObject=new WeakMap,releasedObjects=new WeakMap;C33.mn={};const VALID_GET_MISSING_KEYS=new Set(["then","splice"]);C33.mn.get=function(t,s){return s in t||"symbol"==typeof s||VALID_GET_MISSING_KEYS.has(s)||logDefendedObjectWarning2(`Accessed missing property '${s}' from defended object '${C33.hn(t)}', returning undefined`),releasedObjects.has(t)&&"symbol"!=typeof s&&!VALID_GET_MISSING_KEYS.has(s)&&logDefendedObjectWarning2(`Accessed property '${s}' on a released object '${C33.hn(t)}' Object was originally released at: ${releasedObjects.get(t)}) Call stack at access: `),t[s]},C33.mn.set=function(t,s,e){return s in t||ctorObjectToProxy.has(t)||logDefendedObjectWarning2(`Set non-existent property '${s}' to '${e}' on defended object '${C33.hn(t)}'`),isValidTypeChange2(t[s],e)||ctorObjectToProxy.has(t)||logDefendedObjectWarning2(`Set '${C33.getType(t[s])}' property '${s}' to type '${C33.getType(e)}' on defended object '${C33.hn(t)}'`),releasedObjects.has(t)&&logDefendedObjectWarning2(`Set property '${s}' on a released object '${C33.hn(t)}' Object was originally released at: ${releasedObjects.get(t)}) Call stack at access: `),t[s]=e,!0},C33.mn.deleteProperty=function(t,s){throw new ReferenceError(`Cannot delete property '${s}' from defended object '${C33.hn(t)}'`)},C33.mn.defineProperty=function(t,s,e){throw new ReferenceError(`Cannot define property '${s}' on defended object '${C33.hn(t)}'`)},C33.mn.enumerate=function(t){throw new ReferenceError(`Cannot enumerate defended object '${C33.hn(t)}'`)};let checkRafId=-1,typeProperties=(C33.gn=class{constructor(){if(C33.Ks&&C33.Xe.ei){let t=Object.create(new.target.prototype),s=new Proxy(t,C33.mn);return ctorObjectToProxy.set(t,s),ctorProxyToObject.set(s,t),proxyToObject.set(s,t),-1===checkRafId&&(checkRafId=requestAnimationFrame(CheckDefendedObjectsUsedCorrectly2)),s}}},C33.Sn=function(s){if(C33.Ks&&C33.Xe.ei&&s instanceof C33.gn){if(ctorProxyToObject.has(s)){let t=ctorProxyToObject.get(s);ctorProxyToObject.delete(s),ctorObjectToProxy.delete(t)}return s}return C33.isDebug?Object.seal(s):s},C33.yn=function(t,...s){let e;try{e=new t(...s)}catch(t){throw ctorProxyToObject.clear(),ctorObjectToProxy.clear(),t}return C33.Ks&&VerifyObjectPropertiesConsistent2(t,e),C33.Sn(e)},C33._n=function(t){let s=proxyToObject.get(t);s&&releasedObjects.set(s,C33.Ci())},C33.Tn=function(t){let s=proxyToObject.get(t);return!!s&&!!releasedObjects.get(s)},new Map);C33.An=class{constructor(t){this.En="",t&&this.start(t)}start(t){C33.de&&(this.En=t,performance.mark(this.En+"-Start"))}end(){C33.de&&(performance.mark(this.En+"-End"),performance.measure(this.En,this.En+"-Start",this.En+"-End"))}next(t){C33.de&&(this.end(),this.En=t,performance.mark(this.En+"-Start"))}}}{let isNegativeZero2=function(t){return 0===t&&1/t<0};isNegativeZero=isNegativeZero2;const C33=self.Bs,TWO_PI=2*Math.PI,D_TO_R=Math.PI/180,R_TO_D=180/Math.PI,ALPHAEX_SHIFT=(C33.wrap=function(t,s,e){t=Math.floor(t),s=Math.floor(s);const i=(e=Math.floor(e))-s;if(0==i)return e;if(t<s){const r=e-(s-t)%i;return r===e?0:r}return s+(t-s)%i},C33.In=function(t,s,e,i,r){const n=e-s;if(0==n&&0===i)return t;const h=r-i;return(t-s)*h/n+i},C33.normalize=function(t,s,e){return s-e==0?1:(t-s)/(e-s)},C33.wn=function(t,s,e){return t<s?s:e<t?e:t},C33.Rn=function(t){return(t%=TWO_PI)<0&&(t+=TWO_PI),t},C33.Mn=function(t){return t*D_TO_R},C33.bn=function(t){return t*R_TO_D},C33.Gn=function(t,s){return Math.sqrt(t*t+s*s)},C33.vn=function(t,s,e){return Math.sqrt(t*t+s*s+e*e)},C33.Pn=function(t,s,e,i){return C33.Gn(e-t,i-s)},C33.On=function(t,s,e,i){const r=e-t,n=i-s;return r*r+n*n},C33.xn=function(t,s,e,i){return Math.atan2(i-s,e-t)},C33.Ln=function(t,s){if(t===s)return 0;let e=Math.sin(t),i=Math.cos(t),r=Math.sin(s),n=Math.cos(s),h=e*r+i*n;return 1<=h?0:h<=-1?Math.PI:Math.acos(h)},C33.Dn=function(t,s,e){let i=Math.sin(t),r=Math.cos(t),n=Math.sin(s),h=Math.cos(s);return Math.acos(i*n+r*h)>e?0<r*n-i*h?C33.Rn(t+e):C33.Rn(t-e):C33.Rn(s)},C33.Nn=function(t,s){let e=Math.sin(t),i=Math.cos(t),r=Math.sin(s),n=Math.cos(s);return i*r-e*n<=0},C33.Fn=function(t,s,e,i=0){let r=C33.Ln(t,s),n=TWO_PI*i;return C33.Nn(s,t)?C33.Rn(t+(r+n)*e):C33.Rn(t-(r+n)*e)},C33.$n=function(t,s,e,i=0){const r=C33.Ln(t,s),n=TWO_PI*i;return C33.Nn(s,t)?C33.Rn(t+(r+n)*e):C33.Rn(t+(TWO_PI-r+n)*e)},C33.kn=function(t,s,e,i=0){const r=C33.Ln(t,s),n=TWO_PI*i;return C33.Nn(s,t)?C33.Rn(t-(-TWO_PI+r-n)*e):C33.Rn(t-(r+n)*e)},C33.Bn=function(t,s){const e=C33.Ln(t,s);return C33.Nn(t,s)?C33.Rn(s-e):C33.Rn(s+e)},C33.$t=function(t,s,e){return t+e*(s-t)},C33.Wn=function(t,s,e){return t===s?0:(e-t)/(s-t)},C33.Hn=function(t,s,e,i,r){return C33.$t(i,r,C33.Wn(t,s,e))},C33.Vn=function(t,s,e,i){return C33.$t(C33.$t(t,s,i),C33.$t(s,e,i),i)},C33.Un=function(t,s,e,i,r){return C33.$t(C33.Vn(t,s,e,r),C33.Vn(s,e,i,r),r)},C33.jn=function(t,s,e){return(t+s+(t-s)*Math.cos(e*Math.PI))/2},C33.Xn=function(t){return 0<t&&0==(t-1&t)},C33.Yn=function(s){--s;for(let t=1;t<32;t<<=1)s|=s>>t;return s+1},C33.qn=function(t,s){return Math.round(t*s)/s},C33.Kn=function(t,s){return Math.floor(t*s)/s},C33.zn=function(t,s){s=Math.max(Math.floor(s),0);const e=Math.pow(10,s);return Math.round(t*e)/e},C33.Jn=function(t){return Math.floor(t)!==t&&t.toString().split(".")[1].length||0},C33.toFixed=function(t,s){let e=t.toFixed(s),i=e.length-1;for(;0<=i&&"0"===e.charAt(i);--i);return 0<=i&&"."===e.charAt(i)&&--i,i<0?e:e.substr(0,i+1)},C33.Qn=function(t,s,e){return C33.wn(t,0,255)|C33.wn(s,0,255)<<8|C33.wn(e,0,255)<<16},1024),ALPHAEX_MAX=1023,RGBEX_SHIFT=16384,RGBEX_MAX=8191,RGBEX_MIN=-8192,COMMON_ASPECT_RATIOS=(C33.Zn=function(t,s,e,i){return t=C33.wn(Math.floor(1024*t),RGBEX_MIN,RGBEX_MAX),s=C33.wn(Math.floor(1024*s),RGBEX_MIN,RGBEX_MAX),e=C33.wn(Math.floor(1024*e),RGBEX_MIN,RGBEX_MAX),i=C33.wn(Math.floor(i*ALPHAEX_MAX),0,ALPHAEX_MAX),t<0&&(t+=RGBEX_SHIFT),s<0&&(s+=RGBEX_SHIFT),e<0&&(e+=RGBEX_SHIFT),-(t*RGBEX_SHIFT*RGBEX_SHIFT*ALPHAEX_SHIFT+s*RGBEX_SHIFT*ALPHAEX_SHIFT+e*ALPHAEX_SHIFT+i)},C33.th=function(t,s,e){return C33.Zn(t,s,e,1)},C33.eh=function(s){if(0<=s)return(255&s)/255;{let t=Math.floor(-s/(RGBEX_SHIFT*RGBEX_SHIFT*ALPHAEX_SHIFT));return t>RGBEX_MAX&&(t-=RGBEX_SHIFT),t/1024}},C33.ih=function(s){if(0<=s)return((65280&s)>>8)/255;{let t=Math.floor(-s%(RGBEX_SHIFT*RGBEX_SHIFT*ALPHAEX_SHIFT)/(RGBEX_SHIFT*ALPHAEX_SHIFT));return t>RGBEX_MAX&&(t-=RGBEX_SHIFT),t/1024}},C33.rh=function(s){if(0<=s)return((16711680&s)>>16)/255;{let t=Math.floor(-s%(RGBEX_SHIFT*ALPHAEX_SHIFT)/ALPHAEX_SHIFT);return t>RGBEX_MAX&&(t-=RGBEX_SHIFT),t/1024}},C33.nh=function(t){if(isNegativeZero2(t))return 0;if(0<=t)return 1;{const s=Math.floor(-t%ALPHAEX_SHIFT);return s/ALPHAEX_MAX}},C33.hh=function(s,e){for(s=Math.floor(s),e=Math.floor(e);0!==e;){let t=e;e=s%e,s=t}return s},[[3,2],[4,3],[5,4],[5,3],[6,5],[14,9],[16,9],[16,10],[21,9]]),NO_HIT=(C33.oh=function(e,i){if((e=Math.floor(e))===(i=Math.floor(i)))return[1,1];for(let s of COMMON_ASPECT_RATIOS){let t=e/s[0]*s[1];if(Math.abs(i-t)<1)return s.slice(0);if(t=e/s[1]*s[0],Math.abs(i-t)<1)return[s[1],s[0]]}let t=C33.hh(e,i);return[e/t,i/t]},C33.ah=function(t,s,e,i,r,n,h,o){const a=Math.min(t,e),l=Math.max(t,e),c=Math.min(r,h),u=Math.max(r,h);if(l<c||u<a)return!1;const f=Math.min(s,i),d=Math.max(s,i),p=Math.min(n,o),C=Math.max(n,o);if(d<p||C<f)return!1;const m=r-t+h-e,g=n-s+o-i,S=e-t,y=i-s,_=h-r,T=o-n,A=Math.abs(y*_-T*S),E=_*g-T*m;if(Math.abs(E)>A)return!1;const I=S*g-y*m;return Math.abs(I)<=A},C33.uh=function(t,s,e,i,r,n,h,o,a,l,c,u){const f=Math.min(a,c),d=Math.max(a,c);if(n<f||d<r)return!1;const p=Math.min(l,u),C=Math.max(l,u);if(o<p||C<h)return!1;const m=a-t+c-e,g=l-s+u-i,S=e-t,y=i-s,_=c-a,T=u-l,A=Math.abs(y*_-T*S),E=_*g-T*m;if(Math.abs(E)>A)return!1;const I=S*g-y*m;return Math.abs(I)<=A},C33.fh=function(t,s,e,i,r){const n=Math.min(t,e),h=Math.max(t,e),o=Math.min(s,i),a=Math.max(s,i),l=r.ph(),c=r.Ch(),u=r.mh(),f=r.gh(),d=r.Sh(),p=r.yh(),C=r._h(),m=r.Th();return C33.uh(t,s,e,i,n,h,o,a,l,c,u,f)||C33.uh(t,s,e,i,n,h,o,a,u,f,d,p)||C33.uh(t,s,e,i,n,h,o,a,d,p,C,m)||C33.uh(t,s,e,i,n,h,o,a,C,m,l,c)},C33.Ah=function(s,e,i,r,n){let h=Math.min(s,i),o=Math.max(s,i),a=Math.min(e,r),l=Math.max(e,r),c=0;for(let t=n.length-4;c<=t;c+=2)if(C33.uh(s,e,i,r,h,o,a,l,n[c],n[c+1],n[c+2],n[c+3]))return!0;return C33.uh(s,e,i,r,h,o,a,l,n[c],n[c+1],n[0],n[1])},2),PADDING=1e-6;C33.Eh=function(t,s,e,i,r,n,h,o){const a=e-t,l=i-s,c=h-r,u=o-n,f=a*u-l*c;if(0==f)return NO_HIT;const d=((s-i)*(h-t)+a*(o-s))/f;return 0<d&&d<1+PADDING?(u*(h-t)+(r-h)*(o-s))/f:NO_HIT},C33.Ih=function(t,s,e,i,r,n,h,o,a){const l=(h-r)*a,c=(o-n)*a;return C33.Eh(t,s,e,i,r-l,n-c,h+l,o+c)},C33.wh=function(t,s,e,i,r,n,h,o){const a=r-e,l=n-i,c=h-e,u=o-i,f=t-e,d=s-i,p=a*a+l*l,C=a*c+l*u,m=a*f+l*d,g=c*c+u*u,S=c*f+u*d,y=1/(p*g-C*C),_=(g*m-C*S)*y,T=(p*S-C*m)*y;return 0<=_&&0<=T&&_+T<=1},C33.Rh=function(t,s,e,i,r,n,h,o){const a=r-e,l=n-i,c=h-e,u=o-i,f=t-e,d=s-i,p=a*a+l*l,C=a*c+l*u,m=c*c+u*u,g=f*a+d*l,S=f*c+d*u,y=p*m-C*C,_=(m*g-C*S)/y,T=(p*S-C*g)/y,A=1-_-T;return[A,_,T]},C33.Mh=function(t,s,e,i,r,n,h,o,a,l,c,u){return[t*i+s*h+e*l,t*r+s*o+e*c,t*n+s*a+e*u]}}{let C33=self.Bs,mainDocument=null,baseHref="";if("undefined"!=typeof document){const a=(mainDocument=document).querySelector("base");(baseHref=a&&a.hasAttribute("href")?a.getAttribute("href"):"")&&!(baseHref=baseHref.startsWith("/")?baseHref.substr(1):baseHref).endsWith("/")&&(baseHref+="/")}C33.bh=function(){return baseHref},C33.Gh=function(){if(!mainDocument)return"";const t=mainDocument.location;return C33.Ph(t.origin+t.pathname)+baseHref},C33.Ph=function(t){if(!t.length)return t;if(t.endsWith("/")||t.endsWith("\\"))return t;const s=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return-1===s?"":t.substr(0,s+1)},C33.Oh=function(t){if(!t.length)return t;if(t.endsWith("/")||t.endsWith("\\"))return"";const s=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return-1===s?t:t.substr(s+1)},C33.xh=function(t){let s=t.lastIndexOf(".");return s<1?"":t.substr(s)},C33.Lh=function(t,s){const e=t.lastIndexOf(".");return-1===e?t+"."+s:t.substr(0,e+1)+s},C33.Dh=function(t){let s=t.lastIndexOf(".");return s<1?t:t.substr(0,s)},C33.Nh=function(t){return t.replace(/\\/g,"/")},C33.Fh=function(t,s){const e=t?C33.xh(t).slice(1):"";return s===e},C33.$h=function(t,s){let e,i;return C33.Fi(t)&&(e=C33.Dh(t.name)),C33.Ri(t)&&(e=C33.Dh(t)),C33.Fi(s)&&(i=C33.Dh(s.name)),C33.Ri(s)&&(i=C33.Dh(s)),e===i},C33.kh=function(t){t=C33.Nh(t);let s=/^\w\:\//.exec(t),e=(s?(s=s[0],"/"!==(t=t.slice(3))[0]&&(t="/"+t)):s="",(t=1<(t=t.replace(/\/{2,}/g,"/")).length&&"/"===t.slice(-1)?t.slice(0,-1):t).lastIndexOf("/")+1),i="",r=t,n,h="";0<e&&(i=t.slice(0,e),r=t.slice(e));const o=(n=r).lastIndexOf("."),a=(0<o&&(h=r.slice(o),n=r.slice(0,-h.length)),s+i+r);return{dir:i,Bh:r,name:n,root:s,ext:h,Wh:a}},C33.Hh=function(e,i){return new Promise((t,s)=>{self.setTimeout(t,e,i)})},C33.Vh=function(t){try{t()}catch(t){C33.isDebug&&console.warn("Swallowed exception: ",t)}},C33.Uh=function(){},C33.wr=function(t,s){return"string"==typeof t&&"string"==typeof s&&(t===s||t.normalize().toLowerCase()===s.normalize().toLowerCase())},C33.jh=function(t,s){return"string"==typeof t&&"string"==typeof s&&(t===s||t.normalize()===s.normalize())},C33.Xh=function(t,s,e){t[e++]=s[0],t[e++]=s[1],t[e++]=s[2],t[e++]=s[3],t[e++]=s[4],t[e++]=s[5],t[e++]=s[6],t[e++]=s[7],t[e++]=s[8],t[e++]=s[9],t[e++]=s[10],t[e++]=s[11],t[e++]=s[12],t[e++]=s[13],t[e++]=s[14],t[e]=s[15]},C33.Yh=function(t,s){t.length=s},C33.qh=function(t){t&&0!==t.length&&C33.Yh(t,0)},C33.Kh=function(e){if(e){for(let s=0;s<e.length;s++){let t=e[s];C33.Yh(t,0)}C33.Yh(e,0)}},C33.zh=function(s,e,i){const r=s.length;if(!((e|=0)<=r))for(let t=r;t<e;++t)s.push(i)},C33.Jh=function(t,s,e){const i=t.length;(s|=0)<i?C33.Yh(t,s):i<s&&C33.zh(t,s,e)},C33.Qh=function(t,s){C33.qh(t),C33.an(t,s)},C33.an=function(e,i){if(i.length<1e4)e.push(...i);else for(let t=0,s=i.length;t<s;++t)e.push(i[t])},C33.Zh=function(e,i){if(!((i=Math.floor(i))<0||i>=e.length)){let s=e.length-1;for(let t=i;t<s;++t)e[t]=e[t+1];C33.Yh(e,s)}},C33.eo=function(t,s){let e=t.indexOf(s);0<=e&&t.splice(e,1)},C33.ro=function(s,e){let i=s.length;if(e.length!==i)return!1;for(let t=0;t<i;++t)if(s[t]!==e[t])return!1;return!0},C33.no=function(e,i){let r=[],n=0;for(let s=0,t=e.length;s<t;++s){let t=e[s];i(t)?r.push(t):(e[n]=t,++n)}return C33.Yh(e,n),r},C33.ho=function(e,i){let t=e.length,r=0;for(let s=0,t=e.length;s<t;++s){let t=e[s];i.has(t)||(e[r++]=t)}return C33.Yh(e,r),t-r},C33.ao=function(t,s){return t===Math.floor(t)&&0<=t&&t<s.length},C33.lo=function(t,s){if(!C33.ao(t,s))throw new RangeError("array index out of bounds")},C33.co=function(t){return t.slice()},C33.uo=function(t,e){let i=[];for(let s of t)if(C33.xi(s)){let t=e(s);if(!t)throw new Error("missing clone");if(t.constructor!==s.constructor)throw new Error("object is not a clone");i.push(t)}else C33.Wi(s)?i.push(C33.uo(s,e)):i.push(s);return i},C33.fo=function(s){let e=[];for(let t of s)e.push(t.slice());return e},C33.do=function(t,s=" "){return t?t.split(s).map(t=>t.trim()).filter(t=>!!t):[]},C33.po=function(t,s,e){const i=new Set;for(const r of t.values())s(r)&&(e?i.add(e(r)):i.add(r));return i},C33.Co=function(t,s){return t.union?t.union(s):new Set([...t,...s])},C33.mo=function(t,s){for(const e of s)t.add(e);return t},C33.first=function(s){for(let t of s)return t;return null},C33.xor=function(t,s){return!t!=!s},C33.compare=function(t,s,e){switch(s){case 0:return t===e;case 1:return t!==e;case 2:return t<e;case 3:return t<=e;case 4:return e<t;case 5:return e<=t;default:return!1}},C33.So=function(s){for(let t in s)if(s.hasOwnProperty(t))return!0;return!1},C33.yo=function(o,a){return o.length?new Promise((e,i)=>{let r=[],n=0,h=!1;for(let s=0,t=o.length;s<t;++s)r.push(void 0),o[s].then(t=>{h||(r[s]=t,++n===o.length?e(r):a(n,o.length))}).catch(t=>{h=!0,i(t)})}):Promise.resolve([])};let memoryCallbacks=[],nextTaskId=(C33._o=function(t){memoryCallbacks.push(t)},C33.To=function(){let e=0;for(let s of memoryCallbacks){let t=s();e+=t}return Math.floor(e)},1),activeTaskIds=new Map,taskMessageChannel=new MessageChannel,activeRPAFids=(taskMessageChannel.port2.onmessage=function(t){const s=t.data,e=activeTaskIds.get(s);activeTaskIds.delete(s),e&&e(performance.now())},C33.Ao=function(t){const s=nextTaskId++;return activeTaskIds.set(s,t),taskMessageChannel.port1.postMessage(s),s},C33.Eo=function(t){activeTaskIds.delete(t)},C33.Io=C33.Ao,C33.wo=function(){return new Promise(t=>C33.Io(t))},new Set);C33.Ro=function(s){const e=self.requestAnimationFrame(async t=>{await C33.wo(),activeRPAFids.has(e)&&(activeRPAFids.delete(e),s(t))});return activeRPAFids.add(e),e},C33.Mo=function(t){activeRPAFids.has(t)&&(self.cancelAnimationFrame(t),activeRPAFids.delete(t))}}{const C33=self.Bs;C33.bo=function(t){return/^(?:[a-z\-]+:)?\/\//.test(t)||"data:"===t.substr(0,5)||"blob:"===t.substr(0,5)},C33.Go=function(t){return!C33.bo(t)},C33.vo=function(t){if(!t.ok)throw new Error(`fetch '${t.url}' response returned ${t.status} `+t.statusText)},C33.Po=function(t,s){return fetch(t,s).then(t=>(C33.vo(t),t))},C33.Oo=function(t){return C33.Po(t).then(t=>t.text())},C33.xo=function(t){return C33.Po(t).then(t=>t.json())},C33.Lo=function(t){return C33.Po(t).then(t=>t.blob())},C33.Do=function(t){return C33.Po(t).then(t=>t.arrayBuffer())},C33.No=function(i){return new Promise((t,s)=>{const e=new Image;e.onload=()=>t(e),e.onerror=t=>s(t),e.src=i})},C33.Fo=function(i){return"function"==typeof i.arrayBuffer?i.arrayBuffer():new Promise((t,s)=>{const e=new FileReader;e.onload=()=>t(e.result),e.onerror=()=>s(e.error),e.readAsArrayBuffer(i)})},C33.$o=function(i){return"function"==typeof i.text?i.text():new Promise((t,s)=>{const e=new FileReader;e.onload=()=>t(e.result),e.onerror=()=>s(e.error),e.readAsText(i)})},C33.ko=function(t){return C33.$o(t).then(t=>JSON.parse(t))},C33.Bo=async function(t,s){let e=URL.createObjectURL(t);try{const i=await C33.No(e);return URL.revokeObjectURL(e),e="",s&&"function"==typeof i.decode&&await i.decode(),i}finally{e&&URL.revokeObjectURL(e)}},C33.Wo=function(t,s){if("undefined"==typeof document||"function"!=typeof document.createElement)return new OffscreenCanvas(t,s);{const e=document.createElement("canvas");return e.width=t,e.height=s,e}},C33.Ho=function(s,e,i){if("number"!=typeof i&&(i=1),e=e||"image/png",i=C33.wn(i,0,1),s.convertToBlob)return s.convertToBlob({type:e,quality:i});if(s.toBlob)return new Promise(t=>s.toBlob(t,e,i));throw new Error("could not convert canvas to blob")},C33.Vo=function(t,s,e){const i=C33.Wo(t.width,t.height),r=i.getContext("2d");return r.drawImage(t,0,0),C33.Ho(i,s,e)},C33.Uo=function(t,s,e){if(C33.Xe.ImageBitmapOptions)return createImageBitmap(t,{premultiplyAlpha:"none"}).then(t=>C33.Vo(t,s,e));if(C33.Xe.ImageBitmap)return createImageBitmap(t).then(t=>C33.Vo(t,s,e));{const i=C33.Wo(t.width,t.height),r=i.getContext("2d");return r.putImageData(t,0,0),C33.Ho(i,s,e)}},C33.jo=function(t,s){t.clear();for(const e of s)t.add(e)},C33.Xo=function(t){const s=Object.create(null);for(const[e,i]of t.entries())s[e]=i;return s},C33.Yo=function(t,s){s.clear();for(const[e,i]of Object.entries(t))s.set(e,i)},C33.qo=function s(t){if("object"!=typeof t||null===t)return t;if(t instanceof Set)return{_c3type_:"set",data:[...t].map(t=>s(t))};if(t instanceof Map)return{_c3type_:"map",data:[...t].map(t=>[t[0],s(t[1])])};{const e=Object.create(null);for(const[i,r]of Object.entries(t))e[i]=s(r);return e}},C33.Ko=function s(t){if("object"==typeof t&null!==t){if("set"===t._c3type_)return new Set(t.data.map(t=>s(t)));if("map"===t._c3type_)return new Map(t.data.map(t=>[t[0],s(t[1])]));{const e=Object.create(null);for(const[i,r]of Object.entries(t))e[i]=s(r);return e}}return t},C33.zo=function(t){if(t.startsWith("--"))return t;let s="",e=!1,i=0;for(const r of t)"-"===r?0<i&&(e=!0):e?(s+=r.toUpperCase(),e=!1):s+=r,++i;return s},C33.Jo=function(t){return"object"==typeof t&&"function"==typeof t.next},C33.Qo=function(s,e){const i=[];if("function"==typeof e)for(let t=0;t<s;++t)i.push(e());else for(let t=0;t<s;++t)i.push(e);return i}}{let padTwoDigits2=function(t){return 0===t.length?"00":1===t.length?"0"+t:t},hueToRGB2=function(t,s,e){return e<0&&(e+=1),1<e&&--e,e<1/6?t+6*(s-t)*e:e<.5?s:e<2/3?t+(s-t)*(2/3-e)*6:t};padTwoDigits=padTwoDigits2,hueToRGB=hueToRGB2;const C33=self.Bs,HSL_TEST=/([0-9.]+),([0-9.]+)\%?,([0-9.]+)\%?/i,HSLA_TEST=/([0-9.]+),([0-9.]+)\%?,([0-9.]+)\%?,([0-9.])/i;C33.Zo=class{constructor(t,s,e,i){this.ta=NaN,this.ea=NaN,this.ra=NaN,this.na=NaN,this.ta=0,this.ea=0,this.ra=0,this.na=0,t instanceof C33.Zo?this.set(t):this.oa(t||0,s||0,e||0,i||0)}aa(t,s,e){return this.ta=+t,this.ea=+s,this.ra=+e,this.wn(),this}oa(t,s,e,i){return this.ta=+t,this.ea=+s,this.ra=+e,this.na=+i,this.wn(),this}set(t){return this.ta=t.ta,this.ea=t.ea,this.ra=t.ra,this.na=t.na,this}I(t){return this.set(t)}add(t){this.ta+=t.ta,this.ea+=t.ea,this.ra+=t.ra,this.na+=t.na,this.wn()}la(t,s,e,i=0){this.ta+=+t,this.ea+=+s,this.ra+=+e,this.na+=+i,this.wn()}ca(t){this.ua(Math.max(this.ta,t.ta)-Math.min(this.ta,t.ta)),this.fa(Math.max(this.ea,t.ea)-Math.min(this.ea,t.ea)),this.Ca(Math.max(this.ra,t.ra)-Math.min(this.ra,t.ra)),this.ma(Math.max(this.na,t.na)-Math.min(this.na,t.na)),this.wn()}ga(t){this.ta=t.ta,this.ea=t.ea,this.ra=t.ra}ua(t){this.ta=C33.wn(+t,0,1)}Sa(){return this.ta}fa(t){this.ea=C33.wn(+t,0,1)}ya(){return this.ea}Ca(t){this.ra=C33.wn(+t,0,1)}_a(){return this.ra}ma(t){this.na=C33.wn(+t,0,1)}Ta(){return this.na}clone(){return C33.yn(C33.Zo,this.ta,this.ea,this.ra,this.na)}toArray(){return[this.ta,this.ea,this.ra,this.na]}Aa(){return new Float64Array(this.toArray())}Ea(t,s){t[s++]=this.ta,t[s++]=this.ea,t[s++]=this.ra,t[s]=this.na}Ia(t,s){t[s++]=this.ta,t[s++]=this.ea,t[s]=this.ra}equals(t){return this.ta===t.ta&&this.ea===t.ea&&this.ra===t.ra&&this.na===t.na}wa(t){return this.ta===t.ta&&this.ea===t.ea&&this.ra===t.ra}Ra(t,s,e){return this.ta===t&&this.ea===s&&this.ra===e}Ma(t,s,e,i){return this.ta===t&&this.ea===s&&this.ra===e&&this.na===i}ba(t,s){return t[s]===Math.fround(this.ta)&&t[s+1]===Math.fround(this.ea)&&t[s+2]===Math.fround(this.ra)&&t[s+3]===Math.fround(this.na)}Ga(t,s){return t[s]===Math.fround(this.ta)&&t[s+1]===Math.fround(this.ea)&&t[s+2]===Math.fround(this.ra)}multiply(t){this.ta*=t.ta,this.ea*=t.ea,this.ra*=t.ra,this.na*=t.na}Pa(t){this.ta*=t,this.ea*=t,this.ra*=t,this.na*=t}Oa(){return this.ta*=this.na,this.ea*=this.na,this.ra*=this.na,this}xa(){return this.ta/=this.na,this.ea/=this.na,this.ra/=this.na,this}wn(){return this.ta=C33.wn(this.ta,0,1),this.ea=C33.wn(this.ea,0,1),this.ra=C33.wn(this.ra,0,1),this.na=C33.wn(this.na,0,1),this}La(t){this.ta=C33.eh(t),this.ea=C33.ih(t),this.ra=C33.rh(t),this.na=C33.nh(t)}Da(t,s,e){const i=C33.gi(t)?t:this.Sa(),r=C33.gi(s)?s:this.ya(),n=C33.gi(e)?e:this._a();return`rgb(${100*i}%, ${100*r}%, ${100*n}%)`}Na(t,s,e,i){const r=C33.gi(t)?t:this.Sa(),n=C33.gi(s)?s:this.ya(),h=C33.gi(e)?e:this._a(),o=C33.gi(i)?i:this.Ta();return`rgba(${100*r}%, ${100*n}%, ${100*h}%, ${o})`}Fa(){const t=Math.round(255*this.Sa()),s=Math.round(255*this.ya()),e=Math.round(255*this._a());return"#"+padTwoDigits2(t.toString(16))+padTwoDigits2(s.toString(16))+padTwoDigits2(e.toString(16))}$a(t){if("string"!=typeof t)return!1;let s,e,i;if(3===(t="#"===(t=t.trim()).charAt(0)?t.substr(1):t).length)s=parseInt(t[0],16)/15,e=parseInt(t[1],16)/15,i=parseInt(t[2],16)/15;else{if(6!==t.length)return!1;s=parseInt(t.substr(0,2),16)/255,e=parseInt(t.substr(2,2),16)/255,i=parseInt(t.substr(4,2),16)/255}return isFinite(s)&&this.ua(s),isFinite(e)&&this.fa(e),isFinite(i)&&this.Ca(i),this.ma(1),!0}ka(){const t=Math.round(255*this.Sa()),s=Math.round(255*this.ya()),e=Math.round(255*this._a());return t+`, ${s}, `+e}Ba(){const t=Math.round(255*this.Sa()),s=Math.round(255*this.ya()),e=Math.round(255*this._a());return[t,s,e]}Wa(t){if("string"!=typeof t)return!1;const s=(t=t.replace(/^rgb\(|\)|%/,"")).split(",");if(s.length<3)return!1;const e=parseInt(s[0].trim(),10)/255,i=parseInt(s[1].trim(),10)/255,r=parseInt(s[2].trim(),10)/255;return isFinite(e)&&this.ua(e),isFinite(i)&&this.fa(i),isFinite(r)&&this.Ca(r),this.ma(1),!0}Ha(t){if("string"!=typeof t)return!1;const s=(t=t.replace(/^rgb\(|\)|%/,"")).split(",");if(s.length<3)return!1;const e=parseInt(s[0].trim(),10)/100,i=parseInt(s[1].trim(),10)/100,r=parseInt(s[2].trim(),10)/100;return isFinite(e)&&this.ua(e),isFinite(i)&&this.fa(i),isFinite(r)&&this.Ca(r),this.ma(1),!0}Va(t){if("string"!=typeof t)return!1;const s=(t=t.replace(/^rgba\(|\)|%/,"")).split(",");if(s.length<4)return!1;const e=parseInt(s[0].trim(),10)/255,i=parseInt(s[1].trim(),10)/255,r=parseInt(s[2].trim(),10)/255,n=parseFloat(s[3].trim());return isFinite(e)&&this.ua(e),isFinite(i)&&this.fa(i),isFinite(r)&&this.Ca(r),isFinite(n)&&this.ma(n),!0}Ua(t){if("string"!=typeof t)return!1;const s=(t=t.replace(/^rgba\(|\)|%/,"")).split(",");if(s.length<4)return!1;const e=parseInt(s[0].trim(),10)/100,i=parseInt(s[1].trim(),10)/100,r=parseInt(s[2].trim(),10)/100,n=parseFloat(s[3].trim());return isFinite(e)&&this.ua(e),isFinite(i)&&this.fa(i),isFinite(r)&&this.Ca(r),isFinite(n)&&this.ma(n),!0}ja(t){if("string"!=typeof t)return!1;if((t=t.replace(/\s+/,"")).includes(",")){if(t.startsWith("rgb("))return t.includes("%")?this.Ha(t):this.Wa(t);if(t.startsWith("rgba("))return t.includes("%")?this.Ua(t):this.Va(t);if(t.startsWith("hsl(")||t.startsWith("hsla("))return this.Xa(t);{const s=t.split(",");return t.includes("%")?3===s.length?this.Ha(t):4===s.length&&this.Ua(t):3===s.length?this.Wa(t):4===s.length&&this.Va(t)}}return this.$a(t)}toJSON(){return[this.ta,this.ea,this.ra,this.na]}Ya(t,s,e,i){let r,n,h;if(t%=360,s=C33.wn(s,0,100),e=C33.wn(e,0,100),i=C33.wn(i,0,1),t/=360,e/=100,0==(s/=100))r=n=h=e;else{const o=e<.5?e*(1+s):e+s-e*s,a=2*e-o;r=hueToRGB2(a,o,t+1/3),n=hueToRGB2(a,o,t),h=hueToRGB2(a,o,t-1/3)}return this.ua(r),this.fa(n),this.Ca(h),this.ma(i),this}Xa(t){const s=t.replace(/ |hsl|hsla|\(|\)|;/gi,""),e=HSL_TEST.exec(s),i=HSLA_TEST.exec(s);return e&&4===e.length?(this.Ya(+e[1],+e[2],+e[3],1),!0):!(!i||5!==i.length||(this.Ya(+e[1],+e[2],+e[3],+e[4]),0))}qa(){const t=this.ta,s=this.ea,e=this.ra,i=this.na,r=C33.Zo.Ka(t,s,e),n=C33.Zo.za(t,s,e),h=C33.Zo.Ja(t,s,e);return`hsla(${r}, ${n}%, ${h}%, ${i})`}Qa(){const t=this.ta,s=this.ea,e=this.ra;return[C33.Zo.Ka(t,s,e),C33.Zo.za(t,s,e),C33.Zo.Ja(t,s,e),this.na]}Za(t){!Array.isArray(t)||t.length<3||(this.ta=t[0],this.ea=t[1],this.ra=t[2],this.na=4<=t.length?t[3]:1)}set r(t){this.ua(t)}get r(){return this.Sa()}set g(t){this.fa(t)}get g(){return this.ya()}set b(t){this.Ca(t)}get b(){return this._a()}set a(t){this.ma(t)}get a(){return this.Ta()}sl(t,s){switch(t){case 0:this.ua(s);break;case 1:this.fa(s);break;case 2:this.Ca(s);break;case 3:this.ma(s);break;default:throw new RangeError("invalid color index")}}el(t){switch(t){case 0:return this.Sa();case 1:return this.ya();case 2:return this._a();case 3:return this.Ta();default:throw new RangeError("invalid color index")}}static il(t,s){let e,i;if(Array.isArray(t))(e=new C33.Zo).Za(t);else{if(!(t instanceof C33.Zo))throw new Error("unexpected type");e=t}if(Array.isArray(s))(i=new C33.Zo).Za(s);else{if(!(s instanceof C33.Zo))throw new Error("unexpected type");i=s}return e.equals(i)}static rl(t,s){return C33.wn(Math.max(t,s)-Math.min(t,s),0,1)}static nl(t,s){const e=new C33.Zo;return e.ua(Math.max(t.ta,s.ta)-Math.min(t.ta,s.ta)),e.fa(Math.max(t.ea,s.ea)-Math.min(t.ea,s.ea)),e.Ca(Math.max(t.ra,s.ra)-Math.min(t.ra,s.ra)),e.ma(Math.max(t.na,s.na)-Math.min(t.na,s.na)),e}static hl(t,s){const e=new C33.Zo(0,0,0,1);return e.ua(Math.max(t.ta,s.ta)-Math.min(t.ta,s.ta)),e.fa(Math.max(t.ea,s.ea)-Math.min(t.ea,s.ea)),e.Ca(Math.max(t.ra,s.ra)-Math.min(t.ra,s.ra)),e}static Ka(t,s,e){const i=Math.max(t,s,e),r=Math.min(t,s,e);if(i===r)return 0;let n=0;switch(i){case t:n=(s-e)/(i-r)+(s<e?6:0);break;case s:n=(e-t)/(i-r)+2;break;case e:n=(t-s)/(i-r)+4}return Math.round(n/6*360)}static za(t,s,e){const i=Math.max(t,s,e),r=Math.min(t,s,e);if(i===r)return 0;const n=(i+r)/2,h=i-r,o=.5<n?h/(2-i-r):h/(i+r);return Math.round(100*o)}static Ja(t,s,e){const i=Math.max(t,s,e),r=Math.min(t,s,e),n=(i+r)/2;return i?Math.round(100*n):0}},C33.Zo.ol=Object.freeze(C33.yn(C33.Zo,1,1,1,1)),C33.Zo.ll=Object.freeze(C33.yn(C33.Zo,0,0,0,1)),C33.Zo.cl=Object.freeze(C33.yn(C33.Zo,0,0,0,0))}{const C33=self.Bs;C33.ul=class{constructor(t,s){this.fl=0,this.dl=0,t instanceof C33.ul?this.I(t):this.set(t||0,s||0)}set(t,s){this.fl=+t,this.dl=+s}I(t){this.fl=t.fl,this.dl=t.dl}equals(t){return this.fl===t.fl&&this.dl===t.dl}pl(t,s){return this.fl===t&&this.dl===s}ba(t,s){return t[s]===Math.fround(this.fl)&&t[s+1]===Math.fround(this.dl)}Cl(t){this.fl=+t}ml(){return this.fl}gl(t){this.dl=+t}Sl(){return this.dl}toArray(){return[this.fl,this.dl]}Aa(){return new Float64Array(this.toArray())}Ea(t,s){t[s++]=this.fl,t[s]=this.dl}offset(t,s){this.fl+=+t,this.dl+=+s}scale(t,s){this.fl*=t,this.dl*=s}vt(t,s){this.fl/=t,this.dl/=s}round(){this.fl=Math.round(this.fl),this.dl=Math.round(this.dl)}floor(){this.fl=Math.floor(this.fl),this.dl=Math.floor(this.dl)}ceil(){this.fl=Math.ceil(this.fl),this.dl=Math.ceil(this.dl)}angle(){return C33.xn(0,0,this.fl,this.dl)}yl(){return this.fl*this.fl+this.dl*this.dl}length(){return C33.Gn(this.fl,this.dl)}_l(t,s){const e=this.fl*s-this.dl*t;this.dl=this.dl*s+this.fl*t,this.fl=e}rotate(t){0!==t&&this._l(Math.sin(t),Math.cos(t))}Tl(t,s,e){0===t||s===this.fl&&e===this.dl||(this.fl-=s,this.dl-=e,this._l(Math.sin(t),Math.cos(t)),this.fl+=+s,this.dl+=+e)}move(t,s){0!==s&&(this.fl+=Math.cos(t)*s,this.dl+=Math.sin(t)*s)}normalize(){const t=this.length();0!==t&&1!==t&&(this.fl/=t,this.dl/=t)}wn(t,s){this.fl=C33.wn(this.fl,t,s),this.dl=C33.wn(this.dl,t,s)}Nt(t){return this.fl*t.fl+this.dl*t.dl}reverse(){this.fl=-this.fl,this.dl=-this.dl}Al(){let t=this.fl;return this.fl=this.dl,this.dl=-t,this}}}{const C33=self.Bs;C33.Rect=class{constructor(t,s,e,i){this.El=NaN,this.Il=NaN,this.wl=NaN,this.Rl=NaN,this.El=0,this.Il=0,this.wl=0,this.Rl=0,t instanceof C33.Rect?this.I(t):this.set(t||0,s||0,e||0,i||0)}set(t,s,e,i){this.El=+t,this.Il=+s,this.wl=+e,this.Rl=+i}Ml(t,s,e,i){s=+s,this.El=t=+t,this.Il=s,this.wl=t+ +e,this.Rl=s+ +i}I(t){this.El=+t.El,this.Il=+t.Il,this.wl=+t.wl,this.Rl=+t.Rl}clone(){return new C33.Rect(this.El,this.Il,this.wl,this.Rl)}static bl(t,s){const e=new C33.Rect;return e.Gl(Math.min(t.El,s.El)),e.vl(Math.min(t.Il,s.Il)),e.Pl(Math.max(t.wl,s.wl)),e.Ol(Math.max(t.Rl,s.Rl)),e}static Ll(t){return new C33.Rect(t.left,t.top,t.right,t.bottom)}equals(t){return this.El===t.El&&this.Il===t.Il&&this.wl===t.wl&&this.Rl===t.Rl}Dl(t,s,e,i){return this.El===t&&this.Il===s&&this.width()===e&&this.height()===i}ba(t,s){return t[s]===Math.fround(this.El)&&t[s+1]===Math.fround(this.Il)&&t[s+2]===Math.fround(this.wl)&&t[s+3]===Math.fround(this.Rl)}Gl(t){this.El=+t}Nl(){return this.El}vl(t){this.Il=+t}Fl(){return this.Il}Pl(t){this.wl=+t}$l(){return this.wl}Ol(t){this.Rl=+t}kl(){return this.Rl}toArray(){return[this.El,this.Il,this.wl,this.Rl]}Aa(){return new Float64Array(this.toArray())}Bl(){return new DOMRect(this.El,this.Il,this.width(),this.height())}static Wl(t){return C33.yn(C33.Rect,t.left,t.top,t.right,t.bottom)}Ea(t,s){t[s++]=this.El,t[s++]=this.Il,t[s++]=this.wl,t[s]=this.Rl}Hl(t,s){t[s++]=this.El,t[s++]=this.Il,t[s++]=this.wl,t[s++]=this.Il,t[s++]=this.wl,t[s++]=this.Rl,t[s++]=this.El,t[s]=this.Rl}Vl(t,s,e){t[s++]=this.El,t[s++]=this.Il,t[s++]=e,t[s++]=this.wl,t[s++]=this.Il,t[s++]=e,t[s++]=this.wl,t[s++]=this.Rl,t[s++]=e,t[s++]=this.El,t[s++]=this.Rl,t[s]=e}width(){return this.wl-this.El}height(){return this.Rl-this.Il}Ul(){return(this.El+this.wl)/2}jl(){return(this.Il+this.Rl)/2}offset(t,s){s=+s,this.El+=t=+t,this.Il+=s,this.wl+=t,this.Rl+=s}offsetLeft(t){this.El+=+t}offsetTop(t){this.Il+=+t}Xl(t){this.wl+=+t}Yl(t){this.Rl+=+t}ql(t){if("x"!==t)throw new Error("invalid axis, only 'x' supported");this.Il<this.Rl?this.El<this.wl?this.Rl=this.Il+this.width():this.Rl=this.Il-this.width():this.El<this.wl?this.Rl=this.Il-this.width():this.Rl=this.Il+this.width()}Kl(t,s){s=+s,this.El-=t=+t,this.Il-=s,this.wl+=t,this.Rl+=s}zl(t,s){s=+s,this.El+=t=+t,this.Il+=s,this.wl-=t,this.Rl-=s}multiply(t,s){this.El*=t,this.Il*=s,this.wl*=t,this.Rl*=s}vt(t,s){this.El/=t,this.Il/=s,this.wl/=t,this.Rl/=s}Jl(t){this.El=+t-this.El,this.wl=+t-this.wl}Ql(t){this.Il=+t-this.Il,this.Rl=+t-this.Rl}Zl(t,s){const e=this.width(),i=this.height(),r=this.Nl()+e*t,n=this.Fl()+i*s;this.Ml(r-i*s,n-e*t,i,e)}tc(){const t=this.El;this.El=this.wl,this.wl=t}ec(){const t=this.Il;this.Il=this.Rl,this.Rl=t}ic(t){const s=this.Il;this.Il=+t-this.Rl,this.Rl=+t-s}round(){this.El=Math.round(this.El),this.Il=Math.round(this.Il),this.wl=Math.round(this.wl),this.Rl=Math.round(this.Rl)}rc(){this.El=Math.ceil(this.El),this.Il=Math.ceil(this.Il),this.wl=Math.floor(this.wl),this.Rl=Math.floor(this.Rl)}nc(){this.El=Math.floor(this.El),this.Il=Math.floor(this.Il),this.wl=Math.ceil(this.wl),this.Rl=Math.ceil(this.Rl)}floor(){this.El=Math.floor(this.El),this.Il=Math.floor(this.Il),this.wl=Math.floor(this.wl),this.Rl=Math.floor(this.Rl)}ceil(){this.El=Math.ceil(this.El),this.Il=Math.ceil(this.Il),this.wl=Math.ceil(this.wl),this.Rl=Math.ceil(this.Rl)}wn(t,s,e,i){this.El=Math.max(this.El,+t),this.Il=Math.max(this.Il,+s),this.wl=Math.min(this.wl,+e),this.Rl=Math.min(this.Rl,+i)}hc(t,s,e,i){t=+t,s=+s,e=+e,i=+i,this.El=C33.wn(this.El,t,e),this.Il=C33.wn(this.Il,s,i),this.wl=C33.wn(this.wl,t,e),this.Rl=C33.wn(this.Rl,s,i)}normalize(){this.El>this.wl&&this.tc(),this.Il>this.Rl&&this.ec()}oc(t){return!(t.wl<this.El||t.Rl<this.Il||t.El>this.wl||t.Il>this.Rl)}ac(t,s,e){return!(t.wl+s<this.El||t.Rl+e<this.Il||t.El+s>this.wl||t.Il+e>this.Rl)}lc(t,s){return t>=this.El&&t<=this.wl&&s>=this.Il&&s<=this.Rl}cc(t){return t.El>=this.El&&t.Il>=this.Il&&t.wl<=this.wl&&t.Rl<=this.Rl}uc(t){t.El<this.El&&(this.El=+t.El),t.Il<this.Il&&(this.Il=+t.Il),t.wl>this.wl&&(this.wl=+t.wl),t.Rl>this.Rl&&(this.Rl=+t.Rl)}fc(t){this.El=C33.$t(t.El,t.wl,this.El),this.Il=C33.$t(t.Il,t.Rl,this.Il),this.wl=C33.$t(t.El,t.wl,this.wl),this.Rl=C33.$t(t.Il,t.Rl,this.Rl)}}}{const C33=self.Bs;C33.dc=class{constructor(t,s,e,i,r,n,h,o){this.Cc=NaN,this.mc=NaN,this.Sc=NaN,this.yc=NaN,this._c=NaN,this.Tc=NaN,this.Ac=NaN,this.Ec=NaN,this.Cc=0,this.mc=0,this.Sc=0,this.yc=0,this._c=0,this.Tc=0,this.Ac=0,this.Ec=0,t instanceof C33.dc?this.I(t):this.set(t||0,s||0,e||0,i||0,r||0,n||0,h||0,o||0)}set(t,s,e,i,r,n,h,o){this.Cc=+t,this.mc=+s,this.Sc=+e,this.yc=+i,this._c=+r,this.Tc=+n,this.Ac=+h,this.Ec=+o}Ic(t,s,e,i){this.set(t,s,e,s,e,i,t,i)}I(t){this.Cc=t.Cc,this.mc=t.mc,this.Sc=t.Sc,this.yc=t.yc,this._c=t._c,this.Tc=t.Tc,this.Ac=t.Ac,this.Ec=t.Ec}equals(t){return this.Cc===t.Cc&&this.mc===t.mc&&this.Sc===t.Sc&&this.yc===t.yc&&this._c===t._c&&this.Tc===t.Tc&&this.Ac===t.Ac&&this.Ec===t.Ec}wc(t){this.Cc=+t}ph(){return this.Cc}Rc(t){this.mc=+t}Ch(){return this.mc}Mc(t){this.Sc=+t}mh(){return this.Sc}Gc(t){this.yc=+t}gh(){return this.yc}vc(t){this._c=+t}Sh(){return this._c}Pc(t){this.Tc=+t}yh(){return this.Tc}Oc(t){this.Ac=+t}_h(){return this.Ac}xc(t){this.Ec=+t}Th(){return this.Ec}Lc(){return new DOMQuad(new DOMPoint(this.Cc,this.mc),new DOMPoint(this.Sc,this.yc),new DOMPoint(this._c,this.Tc),new DOMPoint(this.Ac,this.Ec))}static Dc(t){return C33.yn(C33.dc,t.p1.x,t.p1.y,t.p2.x,t.p2.y,t.p3.x,t.p3.y,t.p4.x,t.p4.y)}toArray(){return[this.Cc,this.mc,this.Sc,this.yc,this._c,this.Tc,this.Ac,this.Ec]}Aa(){return new Float64Array(this.toArray())}Ea(t,s){t[s++]=this.Cc,t[s++]=this.mc,t[s++]=this.Sc,t[s++]=this.yc,t[s++]=this._c,t[s++]=this.Tc,t[s++]=this.Ac,t[s]=this.Ec}Nc(t,s,e){t[s++]=this.Cc,t[s++]=this.mc,t[s++]=e,t[s++]=this.Sc,t[s++]=this.yc,t[s++]=e,t[s++]=this._c,t[s++]=this.Tc,t[s++]=e,t[s++]=this.Ac,t[s++]=this.Ec,t[s]=e}offset(t,s){s=+s,this.Cc+=t=+t,this.mc+=s,this.Sc+=t,this.yc+=s,this._c+=t,this.Tc+=s,this.Ac+=t,this.Ec+=s}round(){this.Cc=Math.round(this.Cc),this.mc=Math.round(this.mc),this.Sc=Math.round(this.Sc),this.yc=Math.round(this.yc),this._c=Math.round(this._c),this.Tc=Math.round(this.Tc),this.Ac=Math.round(this.Ac),this.Ec=Math.round(this.Ec)}floor(){this.Cc=Math.floor(this.Cc),this.mc=Math.floor(this.mc),this.Sc=Math.floor(this.Sc),this.yc=Math.floor(this.yc),this._c=Math.floor(this._c),this.Tc=Math.floor(this.Tc),this.Ac=Math.floor(this.Ac),this.Ec=Math.floor(this.Ec)}ceil(){this.Cc=Math.ceil(this.Cc),this.mc=Math.ceil(this.mc),this.Sc=Math.ceil(this.Sc),this.yc=Math.ceil(this.yc),this._c=Math.ceil(this._c),this.Tc=Math.ceil(this.Tc),this.Ac=Math.ceil(this.Ac),this.Ec=Math.ceil(this.Ec)}Fc(t){this.Cc=t.El,this.mc=t.Il,this.Sc=t.wl,this.yc=t.Il,this._c=t.wl,this.Tc=t.Rl,this.Ac=t.El,this.Ec=t.Rl}$c(t,s){0===s?this.Fc(t):this.kc(t,Math.sin(s),Math.cos(s))}kc(t,s,e){const i=t.El*s,r=t.Il*s,n=t.wl*s,h=t.Rl*s,o=t.El*e,a=t.Il*e,l=t.wl*e,c=t.Rl*e;this.Cc=o-r,this.mc=a+i,this.Sc=l-r,this.yc=a+n,this._c=l-h,this.Tc=c+n,this.Ac=o-h,this.Ec=c+i}Bc(t){t.set(Math.min(this.Cc,this.Sc,this._c,this.Ac),Math.min(this.mc,this.yc,this.Tc,this.Ec),Math.max(this.Cc,this.Sc,this._c,this.Ac),Math.max(this.mc,this.yc,this.Tc,this.Ec))}lc(t,s){let e=this.Sc-this.Cc,i=this.yc-this.mc,r=this._c-this.Cc,n=this.Tc-this.mc,h=t-this.Cc,o=s-this.mc,a=e*e+i*i,l=e*r+i*n,c=e*h+i*o,u=r*r+n*n,f=r*h+n*o,d=1/(a*u-l*l),p=(u*c-l*f)*d,C=(a*f-l*c)*d;return 0<=p&&0<C&&p+C<1||(C=((a=(e=this.Ac-this.Cc)*e+(i=this.Ec-this.mc)*i)*f-(l=e*r+i*n)*(c=e*h+i*o))*(d=1/(a*u-l*l)),0<=(p=(u*c-l*f)*d)&&0<C&&p+C<1)}Ul(){return(this.Cc+this.Sc+this._c+this.Ac)/4}jl(){return(this.mc+this.yc+this.Tc+this.Ec)/4}Wc(t,s,e,i){return!(!this.lc(t,s)&&!this.lc(e,i))||C33.fh(t,s,e,i,this)}Hc(t){let s=t.Ul(),e=t.jl();if(this.lc(s,e))return!0;if(s=this.Ul(),e=this.jl(),t.lc(s,e))return!0;const i=this.Cc,r=this.mc,n=this.Sc,h=this.yc,o=this._c,a=this.Tc,l=this.Ac,c=this.Ec;return C33.fh(i,r,n,h,t)||C33.fh(n,h,o,a,t)||C33.fh(o,a,l,c,t)||C33.fh(l,c,i,r,t)}Vc(){const t=this.Cc,s=this.mc;this.Cc=this.Sc,this.mc=this.yc,this.Sc=this._c,this.yc=this.Tc,this._c=this.Ac,this.Tc=this.Ec,this.Ac=t,this.Ec=s}Uc(){this.jc(0,2),this.jc(1,3),this.jc(6,4),this.jc(7,5)}Xc(){this.jc(0,6),this.jc(1,7),this.jc(2,4),this.jc(3,5)}Yc(){this.jc(2,6),this.jc(3,7)}jc(t,s){const e=this.qc(t);this.Kc(t,this.qc(s)),this.Kc(s,e)}qc(t){switch(t){case 0:return this.Cc;case 1:return this.mc;case 2:return this.Sc;case 3:return this.yc;case 4:return this._c;case 5:return this.Tc;case 6:return this.Ac;case 7:return this.Ec;default:throw new RangeError("invalid quad point index")}}Kc(t,s){switch(s=+s,t){case 0:this.Cc=s;break;case 1:this.mc=s;break;case 2:this.Sc=s;break;case 3:this.yc=s;break;case 4:this._c=s;break;case 5:this.Tc=s;break;case 6:this.Ac=s;break;case 7:this.Ec=s;break;default:throw new RangeError("invalid quad point index")}}}}{const C33=self.Bs,assert=self.assert,DEFAULT_POLY_POINTS=[0,0,1,0,1,1,0,1],tempQuad=C33.yn(C33.dc);C33.zc=class extends C33.gn{constructor(t,s=!0){super(),t=t||DEFAULT_POLY_POINTS,this.Jc=Float64Array.from(t),this.Qc=new C33.Rect,this.Zc=!0,this.tu=s}_n(){}su(){return this.Jc}eu(){return this.Jc.length/2}iu(t){this.Jc.length===t.length?this.Jc.set(t):this.Jc=Float64Array.from(t),this.Zc=!0}ru(){this.iu(DEFAULT_POLY_POINTS)}I(t){this.iu(t.Jc)}nu(){this.Zc=!0}hu(){if(this.Zc){let e=this.Jc,i=e[0],r=e[1],n=i,h=r;for(let t=0,s=e.length;t<s;t+=2){const o=e[t],a=e[t+1];o<i&&(i=o),o>n&&(n=o),a<r&&(r=a),a>h&&(h=a)}this.Qc.set(i,r,n,h),this.Zc=!1}}Fc(t,s,e){let i=this.Jc;8!==i.length&&(i=new Float64Array(8),this.Jc=i),i[0]=t.Nl()-s,i[1]=t.Fl()-e,i[2]=t.$l()-s,i[3]=t.Fl()-e,i[4]=t.$l()-s,i[5]=t.kl()-e,i[6]=t.Nl()-s,i[7]=t.kl()-e,this.Qc.I(t),0===s&&0===e||this.Qc.offset(-s,-e),this.Zc=!1}ou(t,s,e){tempQuad.I(t),tempQuad.offset(s,e),this.iu(tempQuad.toArray()),this.Zc=!0}transform(t,s,e){let i=0,r=1;0!==e&&(i=Math.sin(e),r=Math.cos(e)),this.au(t,s,i,r)}au(e,i,r,n){const h=this.Jc;for(let t=0,s=h.length;t<s;t+=2){const o=t+1,a=h[t]*e,l=h[o]*i;h[t]=a*n-l*r,h[o]=l*n+a*r}this.Zc=!0}offset(e,i){const r=this.Jc;for(let t=0,s=r.length;t<s;t+=2)r[t]+=e,r[t+1]+=i}lc(e,i){const r=this.Jc;if(e===r[0]&&i===r[1])return!0;this.hu();let t=this.Qc,n=t.Nl()-110,h=t.Fl()-101,o=t.$l()+131,a=t.kl()+120,l=0,c=0,u,f,d=0,p=0,C,m,g=(u=n<e?(l=n,e):(l=e,n),f=h<i?(c=h,i):(c=i,h),C=o<e?(d=o,e):(d=e,o),m=a<i?(p=a,i):(p=i,a),0),S=0;for(let t=0,s=r.length;t<s;t+=2){const y=(t+2)%s,_=r[t],T=r[t+1],A=r[y],E=r[1+y];C33.uh(n,h,e,i,l,u,c,f,_,T,A,E)&&++g,C33.uh(o,a,e,i,d,C,p,m,_,T,A,E)&&++S}return g%2==1||S%2==1}lu(t,u,f){const d=t.Jc,p=this.Jc;if(this.lc(d[0]+u,d[1]+f))return!0;if(t.lc(p[0]-u,p[1]-f))return!0;for(let s=0,c=p.length;s<c;s+=2){let t=(s+2)%c,e=p[s],i=p[s+1],r=p[t],n=p[1+t],h=0,o=0,a,l;a=e<r?(h=e,r):(h=r,e),l=i<n?(o=i,n):(o=n,i);for(let t=0,s=d.length;t<s;t+=2){const C=(t+2)%s,m=d[t]+u,g=d[t+1]+f,S=d[C]+u,y=d[1+C]+f;if(C33.uh(e,i,r,n,h,a,o,l,m,g,S,y))return!0}}return!1}Wc(e,i,r,n,h,o){if(this.lc(r-e,n-i))return!0;if(this.lc(h-e,o-i))return!0;let a=0,l=0,c,u;c=r<h?(a=r,h):(a=h,r),u=n<o?(l=n,o):(l=o,n);const f=this.Jc;for(let t=0,s=f.length;t<s;t+=2){const d=(t+2)%s,p=f[t]+e,C=f[t+1]+i,m=f[d]+e,g=f[1+d]+i;if(C33.uh(r,n,h,o,a,c,l,u,p,C,m,g))return!0}return!1}Uc(e){const i=this.Jc;for(let t=0,s=i.length;t<s;t+=2)i[t]=2*e-i[t];this.Zc=!0}Xc(e){const i=this.Jc;for(let t=0,s=i.length;t<s;t+=2){const r=t+1;i[r]=2*e-i[r]}this.Zc=!0}Yc(){const e=this.Jc;for(let t=0,s=e.length;t<s;t+=2){const i=t+1,r=e[t];e[t]=e[i],e[i]=r}this.Zc=!0}cu(){let e=this.Jc,i=0;for(let t=0,s=e.length;t<s;t+=2)i+=e[t];return i/this.eu()}uu(){let e=this.Jc,i=0;for(let t=0,s=e.length;t<s;t+=2)i+=e[t+1];return i/this.eu()}fu(){return this.Jc}du(){return this.eu()}pu(){return this.tu}}}{const C33=self.Bs;C33.Cu=class extends C33.gn{constructor(t){if(super(),this.mu=new Map,t)for(const[s,e,i]of t)this.Set(s,e,i)}_n(){this.gu(),this.mu=null}Su(){return 0===this.mu.size}gu(){const t=this.mu;for(const s of t.values())s.clear();t.clear()}Set(t,s,e){let i=this.mu,r=i.get(t);r||(r=new Map,i.set(t,r)),r.set(s,e)}oe(t,s){const e=this.mu.get(t);return e&&e.get(s)}he(t,s){const e=this.mu.get(t);return!!e&&e.has(s)}yu(t,s){const e=this.mu,i=e.get(t);if(!i)return!1;const r=i.delete(s);return r&&0===i.size&&e.delete(t),r}_u(t){const s=this.mu,e=s.get(t);e&&(e.clear(),s.delete(t));for(const[i,r]of s.entries())r.delete(t)&&0===r.size&&s.delete(i)}Tu(){let t=0;for(const s of this.mu.values())t+=s.size;return t}*values(){for(const t of this.mu.values())yield*t.values()}*Au(){for(const[t,s]of this.mu.entries())for(const e of s.keys())yield[t,e]}*entries(){for(const[t,s]of this.mu.entries())for(const[e,i]of s.entries())yield[t,e,i]}}}{const C33=self.Bs;C33.Eu=class extends C33.gn{constructor(){super(),this.Iu=new Set,this.wu=[],this.Ru=!1}_n(){this.gu()}gu(){this.Iu.clear(),C33.qh(this.wu),this.Ru=!1}Mu(t){this.Iu.has(t)||(this.Iu.add(t),this.Ru)||this.wu.push(t)}he(t){return this.Iu.has(t)}yu(t){this.Iu.delete(t)&&(this.Ru=!0)}Tu(){return this.Iu.size}Su(){return 0===this.Iu.size}bu(){return this.Ru&&(this.Gu(),this.Ru=!1),this.wu}Gu(){const t=this.wu;C33.qh(t);for(const s of this.Iu)t.push(s)}}}{const C33=self.Bs,EASE_MAP=new Map,PREDEFINED_EASE_MAP=new Map,CUSTOM_EASE_EDITOR_MAP=new Map,CUSTOM_EASE_DATA_EDITOR_MAP=new Map,CUSTOM_EASE_RUNTIME_MAP=new Map,CUSTOM_EASE_DATA_RUNTIME_MAP=new Map,PRIVATE_EASE_MAP=new Map,BUILT_IN_TRANSITION_MAP=new Map,ALIAS_MAP=new Map,EASE_TRANSLATION_KEYS=(ALIAS_MAP.set("linear","noease"),ALIAS_MAP.set("default","noease"),["default","noease","easeinquad","easeoutquad","easeinoutquad","easeincubic","easeoutcubic","easeinoutcubic","easeinquart","easeoutquart","easeinoutquart","easeinquint","easeoutquint","easeinoutquint","easeinsine","easeoutsine","easeinoutsine","easeinexpo","easeoutexpo","easeinoutexpo","easeincirc","easeoutcirc","easeinoutcirc","easeinelastic","easeoutelastic","easeinoutelastic","easeinback","easeoutback","easeinoutback","easeinbounce","easeoutbounce","easeinoutbounce"]),SHORT_EASE_TRANSLATION_KEYS=["default","noease","quad","cubic","quart","quint","sine","expo","circ","elastic","back","bounce"],EASE_API2INTERNAL_NAMES=new Map([["linear","noease"],["in-sine","easeinsine"],["out-sine","easeoutsine"],["in-out-sine","easeinoutsine"],["in-elastic","easeinelastic"],["out-elastic","easeoutelastic"],["in-out-elastic","easeinoutelastic"],["in-back","easeinback"],["out-back","easeoutback"],["in-out-back","easeinoutback"],["in-bounce","easeinbounce"],["out-bounce","easeoutbounce"],["in-out-bounce","easeinoutbounce"],["in-cubic","easeincubic"],["out-cubic","easeoutcubic"],["in-out-cubic","easeinoutcubic"],["in-quadratic","easeinquad"],["out-quadratic","easeoutquad"],["in-out-quadratic","easeinoutquad"],["in-quartic","easeinquart"],["out-quartic","easeoutquart"],["in-out-quartic","easeinoutquart"],["in-quintic","easeinquint"],["out-quintic","easeoutquint"],["in-out-quintic","easeinoutquint"],["in-circular","easeincirc"],["out-circular","easeoutcirc"],["in-out-circular","easeinoutcirc"],["in-exponential","easeinexpo"],["out-exponential","easeoutexpo"],["in-out-exponential","easeinoutexpo"]]),SAMPLE_COUNT=(self.vu=class d{constructor(){}static Pu(){return"default"}static Ou(){return"noease"}static xu(t){return EASE_API2INTERNAL_NAMES.get(t)}static Lu(s,...e){this.Du();let t,i=(s?(CUSTOM_EASE_EDITOR_MAP.has(s)||CUSTOM_EASE_EDITOR_MAP.set(s,new Map),[...(t=CUSTOM_EASE_EDITOR_MAP.get(s)).keys()].filter(t=>!d.Nu(t,s)||d.Nu(t,s).transition.IsForAnyPurpose())):[...(t=CUSTOM_EASE_RUNTIME_MAP).keys()]).sort();return[...PREDEFINED_EASE_MAP.keys()].concat(i).filter(t=>!e.includes(t))}static Fu(){this.Du();const t=[...CUSTOM_EASE_RUNTIME_MAP.keys()];return t.sort(),[...PREDEFINED_EASE_MAP.keys()].concat(t)}static $u(){this.Du();const t=[...CUSTOM_EASE_RUNTIME_MAP.keys()];return t.sort(),t}static ku(t){for(const s of EASE_TRANSLATION_KEYS){const e=self.lang("ui.bars.timeline.eases."+s);if(e===t)return!0}for(const i of SHORT_EASE_TRANSLATION_KEYS){const r=self.lang("ui.bars.timeline.short-eases."+i);if(r===t)return!0}}static Bu(t){return this.Du(),[...PREDEFINED_EASE_MAP.keys()].includes(t)}static Wu(t){const s=ALIAS_MAP.get(t);return s?EASE_MAP.get(s):d.Bu(t)?EASE_MAP.get(t):PRIVATE_EASE_MAP.has(t)?PRIVATE_EASE_MAP.get(t):void 0}static Hu(t){return this.Du(),BUILT_IN_TRANSITION_MAP.get(t)}static Vu(t,s){this.Du();const e=d.Wu(t);if(e)return e;if(s)return CUSTOM_EASE_EDITOR_MAP.get(s).get(t);throw new Error("missing ease function")}static Nu(t,s){this.Du();const e=CUSTOM_EASE_DATA_EDITOR_MAP.get(s);if(e)return e.get(t)}static Uu(t,s){this.Du();const e=d.Wu(t);return!!e||!!CUSTOM_EASE_EDITOR_MAP.get(s).get(t)}static ju(t){this.Du();const s=d.Wu(t);return s||CUSTOM_EASE_RUNTIME_MAP.get(t)}static Xu(t){return this.Du(),CUSTOM_EASE_DATA_RUNTIME_MAP.get(t)}static Yu(t){this.Du();const s=this.Fu();return s[t]}static qu(t,s){this.Du();const e=this.Lu(s);return e.indexOf(t)}static Ku(t){return this.qu(t)}static Du(){0===EASE_MAP.size&&(this.zu("default",()=>{}),this.zu("noease",[{x:0,y:0,sax:.336,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.336,eay:0,se:!1,ee:!0}],!0),this.zu("easeinsine",[{x:0,y:0,sax:.485,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.038,eay:0,se:!1,ee:!0}]),this.zu("easeoutsine",[{x:0,y:0,sax:.038,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.485,eay:0,se:!1,ee:!0}]),this.zu("easeinoutsine",[{x:0,y:0,sax:.336,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.336,eay:0,se:!1,ee:!0}]),this.zu("easeinelastic",[{x:0,y:0,sax:.018,say:0,eax:0,eay:0,se:!0,ee:!1},{x:.116,y:.002,sax:.025,say:0,eax:-.025,eay:0,se:!0,ee:!0},{x:.266,y:-.005,sax:.024,say:0,eax:-.021,eay:0,se:!0,ee:!0},{x:.416,y:.016,sax:.024,say:0,eax:-.026,eay:0,se:!0,ee:!0},{x:.566,y:-.045,sax:.061,say:0,eax:-.025,eay:0,se:!0,ee:!0},{x:.716,y:.132,sax:.072,say:-.004,eax:-.045,eay:0,se:!0,ee:!0},{x:.866,y:-.373,sax:.06,say:0,eax:-.049,eay:-.002,se:!0,ee:!0},{x:1,y:1,sax:0,say:0,eax:-.038,eay:-.263,se:!1,ee:!0}]),this.zu("easeoutelastic",[{x:0,y:0,sax:.038,say:.263,eax:0,eay:0,se:!0,ee:!1},{x:.136,y:1.373,sax:.049,say:.002,eax:-.06,eay:0,se:!0,ee:!0},{x:.286,y:.868,sax:.045,say:0,eax:-.072,eay:.004,se:!0,ee:!0},{x:.436,y:1.045,sax:.025,say:0,eax:-.061,eay:0,se:!0,ee:!0},{x:.586,y:.984,sax:.026,say:0,eax:-.024,eay:0,se:!0,ee:!0},{x:.736,y:1.005,sax:.021,say:0,eax:-.024,eay:0,se:!0,ee:!0},{x:.886,y:.998,sax:.025,say:0,eax:-.025,eay:0,se:!0,ee:!0},{x:1,y:1,sax:0,say:0,eax:-.018,eay:0,se:!1,ee:!0}]),this.zu("easeinoutelastic",[{x:0,y:0,sax:.025,say:0,eax:0,eay:0,se:!0,ee:!1},{x:.067,y:.001,sax:.025,say:0,eax:-.025,eay:0,se:!0,ee:!0},{x:.18,y:-.005,sax:.025,say:0,eax:-.025,eay:0,se:!0,ee:!0},{x:.292,y:.025,sax:.053,say:0,eax:-.025,eay:0,se:!0,ee:!0},{x:.405,y:-.118,sax:.069,say:0,eax:-.027,eay:0,se:!0,ee:!0},{x:.597,y:1.118,sax:.027,say:0,eax:-.069,eay:0,se:!0,ee:!0},{x:.71,y:.975,sax:.025,say:0,eax:-.053,eay:0,se:!0,ee:!0},{x:.822,y:1.005,sax:.025,say:0,eax:-.025,eay:0,se:!0,ee:!0},{x:.935,y:.999,sax:.025,say:0,eax:-.025,eay:0,se:!0,ee:!0},{x:1,y:1,sax:0,say:0,eax:-.025,eay:0,se:!1,ee:!0}]),this.zu("easeinback",[{x:0,y:0,sax:.35,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.34,eay:-1.579,se:!1,ee:!0}]),this.zu("easeoutback",[{x:0,y:0,sax:.34,say:1.579,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.35,eay:0,se:!1,ee:!0}]),this.zu("easeinoutback",[{x:0,y:0,sax:.035,say:0,eax:0,eay:0,se:!0,ee:!1},{x:.242,y:-.1,sax:.258,say:0,eax:-.025,eay:0,se:!0,ee:!0},{x:.76,y:1.1,sax:.025,say:0,eax:-.26,eay:0,se:!0,ee:!0},{x:1,y:1,sax:0,say:0,eax:-.035,eay:0,se:!1,ee:!0}]),this.zu("easeinbounce",[{x:0,y:0,sax:.033,say:.025,eax:0,eay:0,se:!0,ee:!1},{x:.092,y:0,sax:.026,say:.078,eax:-.033,eay:.025,se:!0,ee:!0},{x:.274,y:0,sax:.097,say:.319,eax:-.026,eay:.078,se:!0,ee:!0},{x:.637,y:0,sax:.105,say:.625,eax:-.097,eay:.319,se:!0,ee:!0},{x:1,y:1,sax:0,say:0,eax:-.125,eay:-.004,se:!1,ee:!0}]),this.zu("easeoutbounce",[{x:0,y:0,sax:.125,say:.004,eax:0,eay:0,se:!0,ee:!1},{x:.365,y:1,sax:.097,say:-.319,eax:-.105,eay:-.625,se:!0,ee:!0},{x:.728,y:1,sax:.026,say:-.078,eax:-.097,eay:-.319,se:!0,ee:!0},{x:.91,y:1,sax:.033,say:-.025,eax:-.026,eay:-.078,se:!0,ee:!0},{x:1,y:1,sax:0,say:0,eax:-.033,eay:-.025,se:!1,ee:!0}]),this.zu("easeinoutbounce",[{x:0,y:0,sax:.01,say:.006,eax:0,eay:0,se:!0,ee:!1},{x:.046,y:0,sax:.021,say:.038,eax:-.01,eay:.006,se:!0,ee:!0},{x:.137,y:0,sax:.059,say:.158,eax:-.021,eay:.038,se:!0,ee:!0},{x:.319,y:0,sax:.117,say:.744,eax:-.059,eay:.158,se:!0,ee:!0},{x:.683,y:1,sax:.059,say:-.158,eax:-.117,eay:-.744,se:!0,ee:!0},{x:.865,y:1,sax:.021,say:-.038,eax:-.059,eay:-.158,se:!0,ee:!0},{x:.956,y:1,sax:.01,say:-.006,eax:-.021,eay:-.038,se:!0,ee:!0},{x:1,y:1,sax:0,say:0,eax:-.01,eay:-.006,se:!1,ee:!0}]),this.zu("easeincubic",[{x:0,y:0,sax:.75,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.138,eay:-.321,se:!1,ee:!0}]),this.zu("easeoutcubic",[{x:0,y:0,sax:.138,say:.321,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.75,eay:0,se:!1,ee:!0}]),this.zu("easeinoutcubic",[{x:0,y:0,sax:.285,say:0,eax:0,eay:0,se:!0,ee:!1},{x:.5,y:.5,sax:.081,say:.272,eax:-.081,eay:-.272,se:!0,ee:!0},{x:1,y:1,sax:0,say:0,eax:-.285,eay:0,se:!1,ee:!0}]),this.zu("easeinquad",[{x:0,y:0,sax:.4,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.178,eay:-.392,se:!1,ee:!0}]),this.zu("easeoutquad",[{x:0,y:0,sax:.178,say:.392,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.4,eay:0,se:!1,ee:!0}]),this.zu("easeinoutquad",[{x:0,y:0,sax:.25,say:0,eax:0,eay:0,se:!0,ee:!1},{x:.5,y:.5,sax:.03,say:.065,eax:-.03,eay:-.065,se:!0,ee:!0},{x:1,y:1,sax:0,say:0,eax:-.25,eay:0,se:!1,ee:!0}]),this.zu("easeinquart",[{x:0,y:0,sax:.25,say:1,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.5,eay:0,se:!1,ee:!0}]),this.zu("easeoutquart",[{x:0,y:0,sax:.5,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.25,eay:-1,se:!1,ee:!0}]),this.zu("easeinoutquart",[{x:0,y:0,sax:.765,say:.03,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.765,eay:-.03,se:!1,ee:!0}]),this.zu("easeinquint",[{x:0,y:0,sax:.6,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.2,eay:-1,se:!1,ee:!0}]),this.zu("easeoutquint",[{x:0,y:0,sax:.2,say:1,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.6,eay:0,se:!1,ee:!0}]),this.zu("easeinoutquint",[{eax:0,eay:0,ee:!1,sax:.84,say:0,se:!0,x:0,y:0},{eax:-.84,eay:0,ee:!0,sax:0,say:0,se:!1,x:1,y:1}]),this.zu("easeincirc",[{x:0,y:0,sax:.25,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.024,eay:-.808,se:!1,ee:!0}]),this.zu("easeoutcirc",[{x:0,y:0,sax:.024,say:.808,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.25,eay:0,se:!1,ee:!0}]),this.zu("easeinoutcirc",[{x:0,y:0,sax:.125,say:0,eax:0,eay:0,se:!0,ee:!1},{x:.5,y:.5,sax:.02,say:.428,eax:-.02,eay:-.428,se:!0,ee:!0},{x:1,y:1,sax:0,say:0,eax:-.125,eay:0,se:!1,ee:!0}]),this.zu("easeinexpo",[{x:0,y:0,sax:.66,say:0,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.14,eay:-1,se:!1,ee:!0}]),this.zu("easeoutexpo",[{x:0,y:0,sax:.14,say:1,eax:0,eay:0,se:!0,ee:!1},{x:1,y:1,sax:0,say:0,eax:-.66,eay:0,se:!1,ee:!0}]),this.zu("easeinoutexpo",[{eax:0,eay:0,ee:!1,sax:.345,say:0,se:!0,x:0,y:0},{eax:-.06,eay:-.5,ee:!0,sax:.06,say:.5,se:!0,x:.5,y:.5},{eax:-.335,eay:0,ee:!0,sax:0,say:0,se:!1,x:1,y:1}]),this.Ju("cubicbezier",this.Qu),this.Ju("spline",this.Zu))}static zu(t,s,e=!1){if("function"==typeof s)d.tf(t,s,"predefined");else{if(!C33.Wi(s))throw new Error("unexpected arguments");if(self.BuiltInTransition){const r=C33.yn(self.BuiltInTransition,t,e);r.SetFromJson(s),d.tf(t,(t,s,e,i)=>r.ef(t,s,e,i),"predefined"),BUILT_IN_TRANSITION_MAP.set(t,r)}else{const n=C33.yn(C33.if,[t,s.map(t=>[t.x,t.y,t.sax,t.say,t.eax,t.eay,t.se,t.ee])],!1);n.rf(e),d.tf(t,(t,s,e,i)=>n.ef(t,s,e,i),"predefined")}}}static Ju(t,s){d.tf(t,s,"private")}static nf(t,s,e,i){this.Du(),d.tf(t,s,"custom",e,i)}static hf(t,s){if(!this.Bu(t)&&![...PRIVATE_EASE_MAP.keys()].includes(t)){const e=CUSTOM_EASE_EDITOR_MAP.get(s),i=(e&&e.delete(t),CUSTOM_EASE_DATA_EDITOR_MAP.get(s));i&&i.delete(t)}}static tf(t,s,e,i,r){switch(e){case"predefined":EASE_MAP.set(t,s),PREDEFINED_EASE_MAP.set(t,s);break;case"custom":if(i){CUSTOM_EASE_EDITOR_MAP.has(i)||CUSTOM_EASE_EDITOR_MAP.set(i,new Map),CUSTOM_EASE_DATA_EDITOR_MAP.has(i)||CUSTOM_EASE_DATA_EDITOR_MAP.set(i,new Map);const n=CUSTOM_EASE_EDITOR_MAP.get(i),h=(n.set(t,s),CUSTOM_EASE_DATA_EDITOR_MAP.get(i));h.set(t,r)}else CUSTOM_EASE_RUNTIME_MAP.set(t,s),CUSTOM_EASE_DATA_RUNTIME_MAP.set(t,r);break;case"private":EASE_MAP.set(t,s),PRIVATE_EASE_MAP.set(t,s);break;default:throw new Error("unexpected ease mode")}}static lf(t,s,e,i){return 0===i?s:e*t/i+s}static Qu(t,s,e,i,r){const n=s,h=3*t*(e-s),o=3*t**2*(s+i-2*e),a=t**3*(r-s+3*e-3*i);return n+h+o+a}static Zu(t,s,e,i,r,n,h,o,l,u){if(i===r&&n===h)return t;const f=get_t_for_x(t,s,i,n,o,u),d=a(e,r,h,l),p=b(e,r,h,l),C=c(e,r,h,l);return calc_bezier(f,d,p,C)}static cf(t,s,e,i){const r=[],n=a(t,s,e,i),h=b(t,s,e,i),o=c(t,s,e,i);for(let t=0;t<SAMPLE_COUNT;++t){const l=calc_bezier(t*SAMPLE_STEP,n,h,o);r.push(l)}return r}},11),SAMPLE_STEP=1/(SAMPLE_COUNT-1),NEWTON_RAPHSON_ITERATIONS=4,NEWTON_RAPHSON_MIN_SLOPE=.01,SUBDIVISION_PRECISION=1e-7,SUBDIVISION_MAX_ITERATIONS=10,a=(t,s,e,i)=>i-3*e+3*s-t,b=(t,s,e,i)=>3*e-6*s+3*t,c=(t,s,e,i)=>3*(s-t),calc_bezier=(t,s,e,i)=>((s*t+e)*t+i)*t,get_slope=(t,s,e,i)=>3*s*t*t+2*e*t+i,get_t_for_x=(h,t,s,e,i,r)=>{if(1==h)return 1;let o=0,n=1,l=r[n],u=SAMPLE_COUNT-1;for(SAMPLE_COUNT;n!=u&&l<=h;)n++,l=r[n],o+=SAMPLE_STEP;n--;let f=(h-(l=r[n]))/(r[n+1]-l),d=o+f*SAMPLE_STEP,p=a(t,s,e,i),C=b(t,s,e,i),m=c(t,s,e,i),g=get_slope(d,p,C,m);if(0===g)return d;if(g>=NEWTON_RAPHSON_MIN_SLOPE){for(let t=0;t<NEWTON_RAPHSON_ITERATIONS;++t){const S=calc_bezier(d,p,C,m)-h,y=get_slope(d,p,C,m);d-=S/y}return d}{let s=o,e=o+SAMPLE_STEP,i=0,r,n;do{d=s+(e-s)/2;let t=calc_bezier(d,p,C,m)-h;0<t?e=d:s=d,r=Math.abs(t)>SUBDIVISION_PRECISION,n=++i<SUBDIVISION_MAX_ITERATIONS}while(r&&n);return d}}}{let RequireStringOrNumber2=function(t){C33.Ri(t)};RequireStringOrNumber=RequireStringOrNumber2;const C33=self.Bs;C33.uf=class{constructor(t){this.ff=[],this.En=t||"",this.df=0}_n(){this.gu(),this.ff=null}pf(){return this.En}gu(){C33.Kh(this.ff),this.df=0}Cf(){return this.df}mf(t=Math.random()*this.Cf()){let s=0;for(const[e,i]of this.ff)if(t<(s+=e))return i;return 0}gf(t,s){RequireStringOrNumber2(s),this.df+=t,this.ff.push([t,s])}Sf(s,e){RequireStringOrNumber2(e);const i=0===s;for(let t=0;t<this.ff.length;t++){const r=this.ff[t],n=i||r[0]===s,h=r[1]===e;if(n&&h){this.ff.splice(t,1),this.df-=r[0];break}}}yf(){return JSON.stringify(this.ff)}static _f(t,s){const e=new C33.uf(s),i=JSON.parse(t);for(const r of i){const n=r[0],h=r[1];e.gf(n,h)}return e}}}{let C33=self.Bs,nextId=0;C33.Tf=class{constructor(t,s){this.Af=t,this.Ef=s,this.If=nextId++,this.Af.wf("runtime","screen-reader-text",{type:"create",id:this.If,text:this.Ef})}_n(){this.Af.wf("runtime","screen-reader-text",{type:"release",id:this.If}),this.Af=null,this.Ef="",this.If=-1}Rf(t){this.Ef!==t&&(this.Ef=t,this.Af.wf("runtime","screen-reader-text",{type:"update",id:this.If,text:this.Ef}))}}}{const C33=self.Bs;C33.Event=class{constructor(t,s){this.type=t,this.cancelable=!!s,this.defaultPrevented=!1,this.Mf=!1,this.bf=!1}preventDefault(){if(!this.cancelable)throw new Error(`event '${this.type}' is not cancelable`);this.defaultPrevented=!0}stopPropagation(){if(!this.cancelable)throw new Error(`event '${this.type}' cannot be stopped`);if(this.bf)throw new Error(`cannot stop async event '${this.type}' propagation`);this.Mf=!0}}}{const C33=self.Bs,assert=self.assert;C33.Event.Gf=class extends C33.gn{constructor(t){super(),this.vf=t,this.Pf=[],this.Of=new Set,this.xf=[],this.Lf=new Set,this.Df=0,this.Nf=[]}_n(){0<this.Df||(C33.qh(this.Pf),this.Of.clear(),C33.qh(this.xf),this.Lf.clear(),C33.qh(this.Nf),C33._n(this))}Ff(t,s){this.$f()?this.Nf.push({kf:"add",Bf:t,capture:s}):s?this.Of.has(t)||(this.Pf.push(t),this.Of.add(t)):this.Lf.has(t)||(this.xf.push(t),this.Lf.add(t))}Wf(t,s){this.$f()?this.Nf.push({kf:"remove",Bf:t,capture:s}):s?this.Of.has(t)&&(this.Of.delete(t),C33.eo(this.Pf,t)):this.Lf.has(t)&&(this.Lf.delete(t),C33.eo(this.xf,t))}Hf(){return!this.Pf.length&&!this.xf.length}$f(){return 0<this.Df}Vf(){const t=new Set,s=new Set;for(const e of this.Nf)if("add"===e.kf)this.Ff(e.Bf,e.capture),(e.capture?s:t).delete(e.Bf);else{if("remove"!==e.kf)throw new Error("invalid op");(e.capture?(this.Of.delete(e.Bf),s):(this.Lf.delete(e.Bf),t)).add(e.Bf)}C33.ho(this.xf,t),C33.ho(this.Pf,s),C33.qh(this.Nf)}Uf(e){this.jf();let i=!1;for(let t=0,s=this.Pf.length;t<s;++t)if(this.Pf[t](e),e.Mf){i=!0;break}if(!i)for(let t=0,s=this.xf.length;t<s&&(this.xf[t](e),!e.Mf);++t);return this.Xf(),!e.defaultPrevented}Yf(e){this.jf();for(let t=0,s=this.Pf.length;t<s;++t)this.Pf[t](e);for(let t=0,s=this.xf.length;t<s;++t)this.xf[t](e);return this.Xf(),!0}jf(){this.Df++}Xf(){this.Df--,0===this.Df&&0<this.Nf.length&&this.Vf()}qf(t){t?this.jf():this.Xf()}Kf(e){let i=[];for(let s=0,t=this.Pf.length;s<t;++s){let t=this.Pf[s];i.push(C33.zf(()=>t(e)))}for(let s=0,t=this.xf.length;s<t;++s){let t=this.xf[s];i.push(C33.zf(()=>t(e)))}return Promise.all(i).then(()=>!e.defaultPrevented)}Jf(e){const i=[];this.jf();for(let t=0,s=this.Pf.length;t<s;++t){const r=this.Pf[t](e);r instanceof Promise&&i.push(r)}for(let t=0,s=this.xf.length;t<s;++t){const n=this.xf[t](e);n instanceof Promise&&i.push(n)}return this.Xf(),i.length?Promise.all(i).then(()=>!e.defaultPrevented):!e.defaultPrevented}async Qf(t){return this.Jf(t)}async Zf(e){this.jf();for(let t=0,s=this.Pf.length;t<s;++t){const i=this.Pf[t](e);i instanceof Promise&&await i}for(let t=0,s=this.xf.length;t<s;++t){const r=this.xf[t](e);r instanceof Promise&&await r}return this.Xf(),!e.defaultPrevented}*td(e){this.jf();for(let t=0,s=this.Pf.length;t<s;++t){const i=this.Pf[t](e);C33.Jo(i)&&(yield*i)}for(let t=0,s=this.xf.length;t<s;++t){const r=this.xf[t](e);C33.Jo(r)&&(yield*r)}this.Xf()}}}{const C33=self.Bs;C33.Event.ed=class extends C33.gn{constructor(){super(),this.nd=new Map,this.hd=!1}_n(){if(this.hd)throw new Error("already released");this.od(),this.hd=!0,C33._n(this)}Tn(){return this.hd}od(){if(this.nd){for(let t of this.nd.values())t._n();this.nd.clear()}}ud(t,s){let e=this.nd.get(t);return e||(s?(e=C33.yn(C33.Event.Gf,t),this.nd.set(t,e),e):null)}fd(t){return this.nd.has(t)}addEventListener(t,s,e){let i=this.ud(t,!0);i.Ff(s,!!e)}removeEventListener(t,s,e){let i=this.ud(t,!1);i&&(i.Wf(s,!!e),i.Hf())&&this.nd.delete(t)}dispatchEvent(t){const s=this.ud(t.type,!1);return!s||(t.cancelable?s.Uf(t):s.Yf(t))}dd(t){const s=this.ud(t.type,!1);return s?(t.bf=!0,s.Kf(t)):Promise.resolve(!0)}async Cd(t){const s=this.ud(t.type,!1);if(!s)return!0;this.nd.delete(t.type),t.bf=!0;const e=await s.Kf(t);return s._n(),e}async md(t){const s=this.ud(t.type,!1);return!s||s.Qf(t)}gd(t){const s=this.ud(t.type,!1);return!s||s.Jf(t)}async Sd(t){const s=this.ud(t.type,!1);return!s||s.Zf(t)}yd(t){const s=this.ud(t.type,!1);if(!s)return null;if(t.cancelable)throw new Error("not supported");return s.td(t)}qf(t){for(const s of this.nd.values())s.qf(t)}}}{let SetNewCallback2=function(t){callbackId=SUPPORTS_RIC&&0===highThroughputMode?requestIdleCallback(DoAsyncifiedWork2,{timeout:IDLECALLBACK_TIMEOUT}):setTimeout(DoAsyncifiedWork2,0<highThroughputMode?1:t)},DoAsyncifiedWork2=function(r){if(callbackId=-1,workQueue.length){let e=performance.now(),i=e,t=0,s;for(;DoNextAsyncifiedJob2(workQueue.shift()),i=performance.now(),++t,s=(i-e)/t*1.1,workQueue.length&&(SUPPORTS_RIC&&0===highThroughputMode&&void 0!==r?s<r.timeRemaining():i-e+s<SETTIMEOUT_WORK_DURATION););if(-1===callbackId&&workQueue.length){let t=i-e,s=Math.max(SETTIMEOUT_INTERVAL-t,4);SetNewCallback2(s)}}},DoNextAsyncifiedJob2=function(s){let t;try{t=s.Bf()}catch(t){return void s.reject(t)}s.resolve(t)},C33=(SetNewCallback=SetNewCallback2,DoAsyncifiedWork=DoAsyncifiedWork2,DoNextAsyncifiedJob=DoNextAsyncifiedJob2,self.Bs),SETTIMEOUT_WORK_DURATION=12,SETTIMEOUT_INTERVAL=16,IDLECALLBACK_TIMEOUT=35,SUPPORTS_RIC="undefined"!=typeof requestIdleCallback,workQueue=[],callbackId=-1,highThroughputMode=0,asyncifyDisabled=C33.ue.he("disable-asyncify");asyncifyDisabled&&console.warn("[Asyncify] Asyncify has been disabled due to disable-asyncify in the query string. Some work will now be done synchronously."),C33.zf=function(e){let i=null;return C33.isDebug&&(i=C33.Ci()),new Promise((t,s)=>{workQueue.push({Bf:e,resolve:t,reject:s,stack:i}),asyncifyDisabled?DoNextAsyncifiedJob2(workQueue.pop()):-1===callbackId&&SetNewCallback2(SETTIMEOUT_INTERVAL)})},C33.zf._d=function(t){if(t)++highThroughputMode;else if(--highThroughputMode<0)throw new Error("already turned off high throughput mode")}}{let ClearTimeCache2=function(){cachedNowTime=-1},CheckActiveIdleTimeouts2=function(){timerId=-1,nextDeadline=-1;let e=Date.now();for(let s of activeIdleTimeouts)if(s.Td(e)){let t=s.Ad();(-1===nextDeadline||t<nextDeadline)&&(nextDeadline=t)}else activeIdleTimeouts.delete(s);if(-1!==nextDeadline){let t=Math.max(nextDeadline-e+IDLE_CHECK_TIMER_OVERSHOOT,IDLE_CHECK_MIN_INTERVAL);timerId=self.setTimeout(CheckActiveIdleTimeouts2,t)}},C33=(ClearTimeCache=ClearTimeCache2,CheckActiveIdleTimeouts=CheckActiveIdleTimeouts2,self.Bs),IDLE_CHECK_MIN_INTERVAL=1e3,IDLE_CHECK_TIMER_OVERSHOOT=100,cachedNowTime=-1,timerId=(C33.Ed=function(){return-1===cachedNowTime&&(cachedNowTime=Date.now(),self.setTimeout(ClearTimeCache2,16)),cachedNowTime},-1),nextDeadline=-1,activeIdleTimeouts=new Set;C33.Id=class{constructor(t,s){this.wd=t,this.Rd=1e3*s,this.Md=0,this.Gd=!1}vd(){let t=C33.Ed();this.Md=t+this.Rd,this.Gd||(activeIdleTimeouts.add(this),this.Gd=!0),-1===timerId?(nextDeadline=this.Md,timerId=self.setTimeout(CheckActiveIdleTimeouts2,this.Rd+IDLE_CHECK_TIMER_OVERSHOOT)):this.Md<nextDeadline&&nextDeadline>t+IDLE_CHECK_MIN_INTERVAL&&(self.clearTimeout(timerId),nextDeadline=this.Md,timerId=self.setTimeout(CheckActiveIdleTimeouts2,this.Rd+IDLE_CHECK_TIMER_OVERSHOOT))}Td(t){return!(t>=this.Md)||(this.wd()?(this.Md=t+this.Rd,!0):this.Gd=!1)}Ad(){return this.Md}Pd(){this.Gd&&(activeIdleTimeouts.delete(this),this.Gd=!1,0===activeIdleTimeouts.size)&&-1!==timerId&&(self.clearTimeout(timerId),timerId=-1,nextDeadline=-1)}_n(){this.Pd(),this.wd=null}}}{const C33=self.Bs;C33.Od=class a{constructor(t){this.xd=!1,this.Ld=t}Dd(){this.xd||(this.xd=!0,this.Ld&&(this.Ld(),this.Ld=null))}Nd(){return this.xd}_n(){this.Dd()}static _n(t){return new a(()=>t._n())}static Fd(s,e,i,r,t){if(null==r)r=!1;else if("boolean"!=typeof r&&"object"!=typeof r)throw new TypeError("invalid event listener options");if(t&&(i=i.bind(t)),e.includes(" ")){e=e.split(" ");const n=new C33.$d;for(let t of e)s.addEventListener(t,i,r),n.Mu(C33.yn(C33.Od,()=>s.removeEventListener(t,i,r)));return n}return s.addEventListener(e,i,r),C33.yn(C33.Od,()=>s.removeEventListener(e,i,r))}},C33.kd=class extends C33.Od{Bd(t){this.Ld=t}},C33.$d=class extends C33.Od{constructor(...s){super(),this.Wd=new Set;for(let t of s)this.Mu(t)}Mu(...s){if(this.xd)throw new Error("already disposed");for(let t of s)this.Wd.add(t)}Hd(t){if(this.xd)throw new Error("already disposed");this.Wd.delete(t)}Vd(){if(this.xd)throw new Error("already disposed");if(this.Wd){for(let t of this.Wd)t.Dd();this.Wd.clear()}}Nd(){return this.xd}Dd(){if(this.xd)throw new Error("already disposed");this.xd=!0;for(let t of this.Wd)t.Dd();this.Wd.clear(),this.Wd=null}_n(){this.Dd()}}}{const C33=self.Bs;C33.Ud=class extends C33.gn{constructor(){super(),this.jd=0,this.dl=0,this.Xd=0,this.Yd=0}Mu(t){this.dl=(t=+t)-this.jd,this.Xd=this.Yd+this.dl,this.jd=this.Xd-this.Yd-this.dl,this.Yd=this.Xd}qd(t){this.Yd-=+t}oe(){return this.Yd}vd(){this.jd=0,this.dl=0,this.Xd=0,this.Yd=0}Set(t){this.jd=0,this.dl=0,this.Xd=0,this.Yd=+t}Kd(t){this.jd=t.jd,this.dl=t.dl,this.Xd=t.Xd,this.Yd=t.Yd}_n(){}}}{const C33=self.Bs,js_cols={},RED=!0,BLACK=!1;js_cols.zd=function(t){this.Jd=t,this.right=this.Jd.Qd,this.left=this.Jd.Qd,this.parent=null,this.color=!1,this.key=null},js_cols.Zd=function(t){this.size=0,this.Qd=new js_cols.zd(this),this.Qd.color=BLACK,this.root=this.Qd,this.root.parent=this.Qd,this.compare=t||this.t0},js_cols.Zd.prototype.t0=function(t,s){return t<s?-1:s<t?1:0},js_cols.Zd.prototype.clone=function(){var t=new js_cols.Zd(this.compare);return t.s0(this),t},js_cols.Zd.prototype.clear=function(){this.size=0,this.Qd=new js_cols.zd(this),this.Qd.color=BLACK,this.root=this.Qd,this.root.parent=this.Qd},js_cols.Zd.prototype.e0=function(t){var s=t.right;t.right=s.left,s.left!=this.Qd&&(s.left.parent=t),s.parent=t.parent,t.parent==this.Qd?this.root=s:t==t.parent.left?t.parent.left=s:t.parent.right=s,(s.left=t).parent=s},js_cols.Zd.prototype.i0=function(t){var s=t.left;t.left=s.right,s.right!=this.Qd&&(s.right.parent=t),s.parent=t.parent,t.parent==this.Qd?this.root=s:t==t.parent.right?t.parent.right=s:t.parent.left=s,(s.right=t).parent=s},js_cols.Zd.prototype.r0=function(t){if(this.contains(t))this.n0(t).key=t;else{for(var s=new js_cols.zd(this),e=(s.key=t,this.Qd),i=this.root;i!=this.Qd;)e=i,i=this.compare(s.key,i.key)<0?i.left:i.right;(s.parent=e)==this.Qd?this.root=s:this.compare(s.key,e.key)<0?e.left=s:e.right=s,s.left=this.Qd,s.right=this.Qd,s.color=RED,this.h0(s),this.size++}},js_cols.Zd.prototype.h0=function(t){for(;t!=this.Qd&&t!=this.root&&t.parent.color==RED;){var s;t.parent==t.parent.parent.left?(s=t.parent.parent.right).color==RED?(t.parent.color=BLACK,s.color=BLACK,t.parent.parent.color=RED,t=t.parent.parent):(t==t.parent.right&&(t=t.parent,this.e0(t)),t.parent.color=BLACK,t.parent.parent.color=RED,t.parent.parent!=this.Qd&&this.i0(t.parent.parent)):(s=t.parent.parent.left).color==RED?(t.parent.color=BLACK,s.color=BLACK,t.parent.parent.color=RED,t=t.parent.parent):(t==t.parent.left&&(t=t.parent,this.i0(t)),t.parent.color=BLACK,t.parent.parent.color=RED,t.parent.parent!=this.Qd&&this.e0(t.parent.parent))}this.root.color=BLACK},js_cols.Zd.prototype.o0=function(t){var s=t.left==this.Qd||t.right==this.Qd?t:this.a0(t),e=s.left!=this.Qd?s.left:s.right;e.parent=s.parent,s.parent==this.Qd?this.root=e:s==s.parent.left?s.parent.left=e:s.parent.right=e,s!=t&&(t.key=s.key),s.color==BLACK&&this.l0(e),this.size--},js_cols.Zd.prototype.l0=function(t){for(;t!=this.root&&t.color==BLACK;){var s;t=t==t.parent.left?((s=t.parent.right).color==RED&&(s.color=BLACK,t.parent.color=RED,this.e0(t.parent),s=t.parent.right),s.left.color==BLACK&&s.right.color==BLACK?(s.color=RED,t.parent):(s.right.color==BLACK&&(s.left.color=BLACK,s.color=RED,this.i0(s),s=t.parent.right),s.color=t.parent.color,t.parent.color=BLACK,s.right.color=BLACK,this.e0(t.parent),this.root)):((s=t.parent.left).color==RED&&(s.color=BLACK,t.parent.color=RED,this.i0(t.parent),s=t.parent.left),s.right.color==BLACK&&s.left.color==BLACK?(s.color=RED,t.parent):(s.left.color==BLACK&&(s.right.color=BLACK,s.color=RED,this.e0(s),s=t.parent.left),s.color=t.parent.color,t.parent.color=BLACK,s.left.color=BLACK,this.i0(t.parent),this.root))}t.color=BLACK},js_cols.Zd.prototype.remove=function(t){var s;return(t=this.n0(t))!=this.Qd?(s=t.key,this.o0(t),s):null},js_cols.Zd.prototype.c0=function(t,s){this.remove(s)},js_cols.Zd.prototype.min=function(t){for(;t.left!=this.Qd;)t=t.left;return t},js_cols.Zd.prototype.max=function(t){for(;t.right!=this.Qd;)t=t.right;return t},js_cols.Zd.prototype.a0=function(t){if(t.right!=this.Qd)return this.min(t.right);for(var s=t.parent;s!=this.Qd&&t==s.right;)s=(t=s).parent;return s},js_cols.Zd.prototype.u0=function(t){if(t.left!=this.Qd)return this.max(t.left);for(var s=t.parent;s!=this.Qd&&t==s.left;)s=(t=s).parent;return s},js_cols.Zd.prototype.f0=function(t){if(0<this.size){var s=this.n0(t);if(s==this.Qd)return null;if(s.right!=this.Qd)return this.min(s.right).key;for(var e=s.parent;e!=this.Qd&&s==e.right;)e=(s=e).parent;return e!=this.Qd?e.key:null}return null},js_cols.Zd.prototype.d0=function(t){if(0<this.size){var s=this.n0(t);if(s==this.Qd)return null;if(s.left!=this.Qd)return this.max(s.left).key;for(var e=s.parent;e!=this.Qd&&s==e.left;)e=(s=e).parent;return e!=this.Qd?e.key:null}return null},js_cols.Zd.prototype.p0=function(){return this.min(this.root).key},js_cols.Zd.prototype.C0=function(){return this.max(this.root).key},js_cols.Zd.prototype.n0=function(t){for(var s=this.root;s!=this.Qd&&0!=this.compare(s.key,t);)s=this.compare(t,s.key)<0?s.left:s.right;return s},js_cols.Zd.prototype.contains=function(t){return null!=this.n0(t).key},js_cols.Zd.prototype.getValues=function(){var s=[];return this.forEach(function(t){s.push(t)}),s},js_cols.Zd.prototype.s0=function(t){if("array"==js_cols.typeOf(t))for(var s=0;s<t.length;s++)this.r0(t[s]);else if("function"==js_cols.typeOf(t.forEach))t.forEach(this.r0,this);else if("function"==js_cols.typeOf(t.getValues))for(var e=t.getValues(),s=0;s<e.length;s++)this.r0(e[s]);else if("object"==js_cols.typeOf(t))for(var i in t)this.r0(t[i])},js_cols.Zd.prototype.m0=function(t){if("array"==js_cols.typeOf(t))for(var s=0;s<t.length;s++)this.remove(t[s]);else if("function"==js_cols.typeOf(t.forEach))t.forEach(this.c0,this);else if("function"==js_cols.typeOf(t.getValues))for(var e=t.getValues(),s=0;s<e.length;s++)this.remove(e[s]);else if("object"==js_cols.typeOf(t))for(var i in t)this.remove(t[i])},js_cols.Zd.prototype.g0=function(t){if("array"==js_cols.typeOf(t)){for(var s=0;s<t.length;s++)if(!this.contains(t[s]))return!1;return!0}if("function"==js_cols.typeOf(t.forEach))return t.every(this.contains,this);if("function"==js_cols.typeOf(t.getValues)){for(var e=t.getValues(),s=0;s<e.length;s++)if(!this.contains(e[s]))return!1;return!0}if("object"==js_cols.typeOf(t)){for(var i in t)if(!this.contains(t[i]))return!1;return!0}},js_cols.Zd.prototype.range=function(t,s){var e=[];return this.S0(function(t){e.push(t)},t,s),e},js_cols.Zd.prototype.y0=function(t,s){if(!this._0())for(var e=this.min(this.root);e!=this.Qd;){if(t.call(s,e.key,this))return;e=this.a0(e)}},js_cols.Zd.prototype.T0=function(t,s,e){if(!this._0())for(var i=this.n0(s);i!=this.Qd;){if(t.call(e,i.key,this))return;i=this.a0(i)}},js_cols.Zd.prototype.A0=function(t,s,e){if(!this._0())for(var i=this.min(this.root),r=this.n0(s);i!=r;){if(t.call(e,i.key,this))return;i=this.a0(i)}},js_cols.Zd.prototype.S0=function(t,s,e,i){if(!this._0())for(var r=this.n0(s),n=this.n0(e);r!=n;){if(t.call(i,r.key,this))return;r=this.a0(r)}},js_cols.Zd.prototype.E0=function(t,s){if(!this._0())for(var e=this.max(this.root);e!=this.Qd;){if(t.call(s,e.key,this))return;e=this.u0(e)}},js_cols.Zd.prototype.forEach=function(t,s){if(!this._0())for(var e=this.min(this.root);e!=this.Qd;e=this.a0(e))t.call(s,e.key,e.key,this)},js_cols.Zd.prototype.some=function(t,s){if(!this._0())for(var e=this.min(this.root);e!=this.Qd;e=this.a0(e))if(t.call(s,e.key,e.key,this))return!0;return!1},js_cols.Zd.prototype.every=function(t,s){if(this._0())return!1;for(var e=this.min(this.root);e!=this.Qd;e=this.a0(e))if(!t.call(s,e.key,e.key,this))return!1;return!0},js_cols.Zd.prototype.map=function(t,s){var e=[];if(!this._0())for(var i=this.min(this.root);i!=this.Qd;i=this.a0(i))e.push(t.call(s,i.key,i.key,this));return e},js_cols.Zd.prototype.filter=function(t,s){var e=[];if(!this._0())for(var i=this.min(this.root);i!=this.Qd;i=this.a0(i))t.call(s,i.key,i.key,this)&&e.push(i.key);return e},js_cols.Zd.prototype.getCount=function(){return this.size},js_cols.Zd.prototype._0=function(){return 0==this.size},js_cols.Zd.prototype.isSubsetOf=function(t){var s=js_cols.getCount(t);if(this.getCount()>s)return!1;var e=0;if(this._0())return!0;for(var i=this.min(this.root);i!=this.Qd;i=this.a0(i))js_cols.contains.call(t,t,i.key)&&e++;return e==this.getCount()},js_cols.Zd.prototype.intersection=function(t){var s=new js_cols.Zd(this.compare);if(!this._0())for(var e=this.min(this.root);e!=this.Qd;e=this.a0(e))t.contains.call(t,e.key,e.key,this)&&s.r0(e.key);return s},C33.Zd=class extends C33.gn{constructor(t){super(),this.I0=new js_cols.Zd(t),this.w0=!1,this.R0=new Set,this.M0=new Set}Mu(t){this.w0?this.I0.contains(t)?this.M0.delete(t):this.R0.add(t):this.I0.r0(t)}Hd(t){this.w0?this.I0.contains(t)?this.M0.add(t):this.R0.delete(t):this.I0.remove(t)}he(t){return this.w0?!!this.R0.has(t)||!this.M0.has(t)&&this.I0.contains(t):this.I0.contains(t)}gu(){this.I0.clear(),this.R0.clear(),this.M0.clear()}toArray(){if(this.w0)throw new Error("cannot be used in queueing mode");return this.I0.getValues()}Tu(){return this.I0.getCount()+this.R0.size-this.M0.size}Su(){return 0===this.Tu()}b0(){if(this.Su())throw new Error("empty set");if(this.w0)throw new Error("cannot be used in queueing mode");const t=this.I0,s=t.min(t.root);return s.key}G0(){if(this.Su())throw new Error("empty set");if(this.w0)throw new Error("cannot be used in queueing mode");const t=this.b0();return this.Hd(t),t}v0(t){if(this.w0!==(t=!!t)&&!(this.w0=t)){for(const s of this.M0)this.I0.remove(s);this.M0.clear();for(const e of this.R0)this.I0.r0(e);this.R0.clear()}}P0(t){this.I0.forEach(t)}*values(){if(!this.Su()){const s=this.I0;for(let t=s.min(s.root);t!=s.Qd;t=s.a0(t))yield t.key}}[Symbol.iterator](){return this.values()}}}{const C33=self.Bs;C33.O0=class{constructor(t=C33.hardwareConcurrency){this.x0=t,this.L0=[],this.D0=0}Mu(e){return new Promise((t,s)=>{this.L0.push({Bf:e,resolve:t,reject:s}),this.N0()})}F0(e){for(let t=0,s=this.L0.length;t<s;++t)if(this.L0[t].Bf===e)return t;return-1}$0(t,s){const e=this.F0(t);if(-1===e)throw new Error("cannot find promise to resolve");this.L0[e].resolve(s),this.L0.splice(e,1)}k0(t,s){const e=this.F0(t);if(-1===e)throw new Error("cannot find promise to reject");this.L0[e].reject(s),this.L0.splice(e,1)}async N0(){if(this.L0.length&&!(this.D0>=this.x0)){this.D0++;const s=this.L0.shift();try{const t=await s.Bf();s.resolve(t)}catch(t){s.reject(t)}this.D0--,this.N0()}}static async B0(t,s){let e=[],i=!1,r=[];for(;t--;)r.push((async()=>{let t;for(;t=s.pop();){if(i)return;try{e.push(await t())}catch(t){throw i=!0,t}}})());return await Promise.all(r),e}}}{const C33=self.Bs;C33.W0=class{constructor(t,s,e){this.wd=t,this.H0=s,this.V0=e||2*s,this.U0=-1,this.j0=-1/0,this.X0=()=>this.Y0(),this.q0=!1,this.K0=!1,this.z0=null}J0(t){this.K0=!!t}Q0(){return void 0!==C33.Battery&&C33.Battery.IsOnBatteryPower()?this.V0:this.H0}Z0(...i){if(-1===this.U0){this.z0=i;let t=C33.Ed(),s=t-this.j0,e=this.Q0();e<=s&&this.K0?(this.j0=t,this.t3()):this.U0=self.setTimeout(this.X0,Math.max(e-s,4))}}t3(){this.q0=!0;const t=this.z0;this.z0=null,t?this.wd(...t):this.wd(),this.q0=!1}vd(){this.q0||(this.s3(),this.z0=null,this.j0=C33.Ed())}Y0(){this.U0=-1,this.j0=C33.Ed(),this.t3()}s3(){-1!==this.U0&&(self.clearTimeout(this.U0),this.U0=-1)}_n(){this.s3(),this.wd=null,this.z0=null,this.X0=null}}}{const C33=self.Bs;C33.e3=class{constructor(){this.i3=new Map,this.r3=!1,this.n3=null,this.h3=null,this.o3=null,this.a3=null}l3(t){this.r3=!!t}u3(){return this.r3}f3(t){this.n3=t}d3(t){if(this.n3)return this.n3(t);throw new Error("no get base size callback set")}C3(t){this.h3=t}m3(t,s,e,i,r,n){if(this.h3)return this.h3(t,s,e,i,r,n);throw new Error("no raster at size callback set")}g3(t){this.o3=t}S3(t){if(!this.o3)throw new Error("no release result callback set");this.o3(t)}y3(t){this.a3=t}_3(){if(!this.a3)throw new Error("no redraw callback set");this.a3()}T3(t){let s=this.i3.get(t);return s||(s=C33.yn(C33.A3,this,t),this.i3.set(t,s)),s.E3(),s}I3(t){this.i3.delete(t.w3())}R3(){for(const t of this.i3.values())t.M3(),t.b3()}}}{const C33=self.Bs,MAX_SURFACE_SIZE=4096;C33.A3=class{constructor(t,s){this.G3=t,this.v3=s,this.P3=0,this.O3=0,this.x3=0,this.L3=this.G3.d3(s).then(t=>{this.G3&&(this.O3=t[0],this.x3=t[1],this.G3._3())}).catch(t=>{console.error("[SVG] Error loading SVG: ",t),this.D3=!0,this.G3&&this.G3._3()}),this.N3=0,this.F3=0,this.B3=0,this.W3=0,this.H3=!1,this.V3=null,this.U3=!1,this.D3=!1}_n(){if(this.P3<=0)throw new Error("already released");this.P3--,0===this.P3&&this.j3()}M3(){this.V3&&(this.G3.S3(this.V3),this.V3=null)}j3(){this.M3(),this.G3.I3(this),this.G3=null}w3(){return this.v3}E3(){this.P3++}X3(){return 0<this.P3}Y3(){return this.V3}b3(){this.U3=!0}async q3(i,r,n){if(0!==r&&0!==n&&!this.D3&&!this.H3){let t=C33.Yn(Math.ceil(r)),s=C33.Yn(Math.ceil(n)),e=Math.max(t,s);if(e>MAX_SURFACE_SIZE){const h=MAX_SURFACE_SIZE/e;r*=h,n*=h,t=Math.min(Math.ceil(t*h),MAX_SURFACE_SIZE),s=Math.min(Math.ceil(s*h),MAX_SURFACE_SIZE)}if(r<t&&n<s){const o=r/n,a=t/s;n=o<a?(r=s*o,s):(r=t)/o}if(this.G3.u3()&&(t=Math.ceil(r),s=Math.ceil(n)),!(t<=this.N3&&s<=this.F3)||this.U3){this.H3=!0,this.N3=t,this.F3=s;const l=await this.G3.m3(this.v3,i,this.N3,this.F3,r,n);this.G3&&(this.M3(),this.V3=l,this.B3=r,this.W3=n,this.H3=!1,this.U3=!1,this.G3._3())}}}K3(){return this.L3}z3(){return this.O3}J3(){return this.x3}Q3(){return this.B3}Z3(){return this.W3}tp(){return this.D3}}}{let lookupHtmlEntity2=function(t){return HTML_ENTITY_MAP.get(t)};lookupHtmlEntity=lookupHtmlEntity2;const C33=self.Bs,NUMERIC_CHARS=(C33.sp="\ufeff",new Set("0123456789")),WHITESPACE_CHARS=(C33.ep=function(t){return NUMERIC_CHARS.has(t)},new Set(" \t\n\r \u2028\u2029 "));C33.rp=function(t){return WHITESPACE_CHARS.has(t)},C33.np=function(t){return[...t].filter(t=>!C33.rp(t)).join("")},C33.hp=function(t){for(const s of t)if(!C33.rp(s))return!1;return!0},C33.op=function(t){for(const s of t)if(!C33.rp(s))return!1;return!0},C33.lp=function(t){return 1===t.length&&t.charCodeAt(0)<32},C33.cp=function(t){return[...t].filter(t=>!C33.lp(t)).join("")};let cjkPunctuationRegex=null;try{cjkPunctuationRegex=new RegExp("\\p{P}(?<=[\\u3000-\\u303F\\uFF00-\\uFFEF])","u")}catch(t){console.warn("Unable to detect CJK punctuation: ",t)}C33.up=function(t){return!C33.rp(t)&&cjkPunctuationRegex&&cjkPunctuationRegex.test(t)};const NUMERIC_STRING_CHARS=new Set("0123456789.+-e"),HTML_ENTITY_MAP=(C33.fp=function(s){if(!(s=s.trim()).length)return!1;let t=s.charAt(0);if("-"!==t&&!NUMERIC_CHARS.has(t))return!1;for(let t of s)if(!NUMERIC_STRING_CHARS.has(t))return!1;return!0},C33.pp=function(s){let e=s.length;for(;0<e;){let t=s.charAt(e-1);if(!C33.ep(t))break;--e}return s.substr(0,e)},C33.Cp=function(t){let s=C33.pp(t),e=t.substr(s.length);return s+(e?(parseInt(e,10)+1).toString():"2")},new Map([["&","&"],["<","<"],[">",">"],['"',"""],["'","'"]])),HTML_ENTITY_REGEX=/[&<>"']/g,ESCAPE_REGEX=(C33.mp=function(t){return t.replace(HTML_ENTITY_REGEX,lookupHtmlEntity2)},C33.gp=function(t){let s=C33.Sp(t,"\\","\\\\");return s=C33.Sp(s,'"','\\"'),s=C33.Sp(s,"\t","\\t"),s=C33.Sp(s,"\r",""),C33.Sp(s,"\n","\\n")},C33.yp=function(t){let s=C33.Sp(t,"&","&");return s=C33.Sp(s,"<","<"),s=C33.Sp(s,">",">"),C33.Sp(s,'"',""")},/[-[\]{}()*+?.,\\^$|#\s]/g),intlSegmenter=(C33.di=function(t){return t.replace(ESCAPE_REGEX,"\\$&")},C33._p=function(t,s){let e=0;for(const i of t)i===s&&++e;return e},C33.Tp=function(t,s,e=!1){if(!s)return[];e||(t=t.toLowerCase(),s=s.toLowerCase());let i=s.length,r=0,n,h=[];for(;-1<(n=t.indexOf(s,r));)h.push(n),r=n+i;return h},C33.Sp=function(t,s,e){return t.replaceAll(s,()=>e)},C33.Ap=function(t,s,e){return t.replace(new RegExp(C33.di(s),"gi"),()=>e)},C33.Ep=function(t,s){"string"==typeof s?t.textContent=s:s.Ip()?t.textContent=s.toString():(t.innerHTML=s.wp(),s instanceof C33.kr&&s.Rp(t))},C33.Mp=function(t,s){return t instanceof C33.HtmlString||t instanceof C33.kr?t.equals(s):s instanceof C33.HtmlString||s instanceof C33.kr?s.equals(t):t===s},C33.bp=function(e,...i){let r=e;for(let t=0,s=i.length;t<s;++t){const n=`{${t}}`;if(!e.includes(n))throw new Error(`missing placeholder '${n}' in string substitution`);r=r.replace(n,i[t].toString())}return r},C33.Gp=function(e,...i){let r=e,n=-1,h=-1;for(let t=0,s=i.length;t<s;++t){const o=`{${t}}`;e.includes(o)?(h=t,r=r.replace(o,i[t].toString())):-1===n&&(n=t)}if(0<=n&&0<=h&&n<h)throw new Error(`missing placeholder '${n}' in string substitution`);return r},C33.vp=function(t,e){let i=t;for(let[t,s]of Object.entries(e))i=i.replaceAll(t,s.toString());return i},C33.Pp=function(t,s){return s<t?1:t<s?-1:0},C33.Op=function(t,s){let e=t.toLowerCase(),i=s.toLowerCase();return i<e?1:e<i?-1:0},new self.Intl.Segmenter),KILOBYTE=(C33.xp=function(t){const s=[];for(const e of intlSegmenter.segment(t))s.push(e.segment);return s},C33.Lp=function*(t){for(const s of intlSegmenter.segment(t))yield s.segment},C33.Dp=function(t){let s=0;for(const e of intlSegmenter.segment(t))++s;return s},1024),MEGABYTE=1024*KILOBYTE,GIGABYTE=1024*MEGABYTE,TERABYTE=1024*GIGABYTE,DEFAULT_FORMATTIME_OPTS={Np:(C33.Fp=function(s,t){let e="common."+(t?"dataRates":"dataSizes")+".",i=self.langSub;if(s<KILOBYTE)return i(e+"bytes",s);if(s<MEGABYTE){let t=s/KILOBYTE;return t=t<10?Math.round(10*t)/10:Math.round(t),i(e+"kilobytes",t)}if(s<GIGABYTE){let t=s/MEGABYTE;return t=t<10?Math.round(10*t)/10:Math.round(t),i(e+"megabytes",t)}if(s<TERABYTE){let t=s/GIGABYTE;return t=t<10?Math.round(10*t)/10:Math.round(t),i(e+"gigabytes",t)}{let t=s/TERABYTE;return t=t<10?Math.round(10*t)/10:Math.round(t),i(e+"terabytes",t)}},!1),$p:!0,kp:!0,Bp:!0,Wp:!0};C33.Hp=function(t,s){s=Object.assign({},DEFAULT_FORMATTIME_OPTS,s),C33.Lang.PushContext("common.time");const e=[],i=self.lang,r=self.langPluralSub;if(s.$p){const h=Math.floor(t/86400);0<h&&(t-=24*h*3600,e.push(r(".days",null,h)))}if(s.kp){const o=Math.floor(t/3600);(0<o||e.length)&&(t-=3600*o,e.push(r(".hours",null,o)))}if(s.Bp){const a=Math.floor(t/60);(0<a||e.length||!s.Wp)&&(t-=60*a,e.push(r(".minutes",null,a)))}if(s.Wp){const l=Math.floor(t%60);e.push(r(".seconds",null,l))}const n=(s.Np?i(".approx-prefix"):"")+e.join(i(".separator"));return C33.Lang.PopContext(),n},C33.Vp=function(t,s){let e=t<0?"-":"",i=(t=Math.abs(t)).toString(),r=s-i.length;for(let t=0;t<r;++t)e+="0";return e+i},C33.Up=function(t){return t.toLowerCase().replace(/\b\w/g,t=>t.toUpperCase())},C33.jp=function(t,s){let e=t.split(".").map(t=>t.trim()),i=s.split(".").map(t=>t.trim());C33.Jh(e,4,"0"),C33.Jh(i,4,"0"),e=e.map(t=>parseInt(t,10)),i=i.map(t=>parseInt(t,10));for(let t=0;t<4;++t){const r=e[t]-i[t];if(0!=r)return r<0?-1:1}return 0},C33.Xp=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const s=Math.floor(16*Math.random()),e="x"===t?s:3&s|8;return e.toString(16)})},C33.Yp=function(e,i){if(e.length!==i.length)throw new Error("strings must be same length");let r=0;for(let t=0,s=e.length;t<s;++t)e.charAt(t)!==i.charAt(t)&&++r;return r},C33.qp=function(t,s){if(0===t.length)return s.length;if(0===s.length)return t.length;let e,i,r,n,h,o;for(s.length<t.length&&(e=t,t=s,s=e),o=Array(t.length+1),i=0;i<=t.length;i++)o[i]=i;for(i=1;i<=s.length;i++){for(n=i,r=1;r<=t.length;r++)h=s[i-1]===t[r-1]?o[r-1]:Math.min(o[r-1]+1,Math.min(n+1,o[r]+1)),o[r-1]=n,n=h;o[t.length]=n}return o[t.length]}}{let bbToHtmlReplacerFunc2=function(t,e,i){const r=BB_CODE_MAP.get(i);if(!r)return"class"===i?e?"</span>":`<span class="bbclass${classIndex++}">`:t;if("string"==typeof r){if("a"===r&&0===linkActions.length||"abbr"===r&&0===tipList.length)return t;if("a"!==r||e){if("abbr"!==r||e)return"<"+e+r+">";{const n=parseInt(i.substring(3),10)-1;if(n<0||n>=tipList.length)throw new Error("invalid bbcode tip substitution");let t=tipList[n],s="";if("string"==typeof t?s=t:"function"==typeof t&&(s=t()),"string"!=typeof s)throw new TypeError("invalid bbcode tip");return`<abbr title="${C33.Sp(s,'"',""")}">`}}{const s=parseInt(i.substring(1),10)-1;if(s<0||s>=linkActions.length)throw new Error("invalid bbcode link substitution");const h=linkActions[s];if("string"==typeof h)return`<a href="${linkActions[s]}">`;if("function"==typeof h)return`<a class="bblink${s}">`;throw new TypeError("invalid bbcode link action")}}if(Array.isArray(r)){let t=r[0],s=r[1];return e?"</"+t+">":`<${t} class="${s}">`}},C33=(bbToHtmlReplacerFunc=bbToHtmlReplacerFunc2,self.Bs),assert=self.assert,BB_CODE_MAP=new Map([["b","strong"],["i","em"],["s","s"],["u","u"],["sub","sub"],["sup","sup"],["small","small"],["mark","mark"],["code","code"],["a1","a"],["a2","a"],["a3","a"],["a4","a"],["a5","a"],["a6","a"],["a7","a"],["a8","a"],["a9","a"],["tip1","abbr"],["tip2","abbr"],["tip3","abbr"],["tip4","abbr"],["tip5","abbr"],["tip6","abbr"],["tip7","abbr"],["tip8","abbr"],["tip9","abbr"],["bad",["span","bbCodeBad"]],["good",["span","bbCodeGood"]],["info",["span","bbCodeInfo"]],["h1",["span","bbCodeH1"]],["h2",["span","bbCodeH2"]],["h3",["span","bbCodeH3"]],["h4",["span","bbCodeH4"]],["item",["span","bbCodeItem"]]]),SELF_CLOSING_TAGS=new Set(["icon"]),BBREGEX=/\[(\/?)([a-zA-Z0-9]+)\]/g,CUSTOM_BBREGEX=/\[(\/?)([^\[\n]*?)\]/g,linkActions=null,tipList=null,classIndex=0,LINEBREAK_REGEX=/\n/g;C33.kr=class{constructor(t,s){if(this.Kp=s&&s.zp?t:C33.mp(t),this.Jp="",this.Qp=!1,this.Zp=[],this.tC=[],s){if(this.Qp=!!s.convertLineBreaks,s.links){if(9<s.links.length)throw new Error("too many links");this.Zp=s.links}if(s.tips){if(9<s.tips.length)throw new Error("too many tips");this.tC=s.tips}}this.sC=this.Kp.includes("["),this.eC=this.Qp&&this.Kp.includes("\n"),this.iC=!this.sC&&!this.eC&&!this.Kp.includes("&"),this.rC=!1,this.nC=[]}toString(){return this.Kp}valueOf(){return this.Kp}Ip(){return this.iC}hC(){return this.sC?this.Kp.replace(BBREGEX,""):this.Kp}wp(){if(this.iC)return this.Kp;if(!this.Jp&&this.Kp){let t=this.Kp;this.sC&&(classIndex=0,linkActions=this.Zp,tipList=this.tC,t=t.replace(BBREGEX,bbToHtmlReplacerFunc2),linkActions=null,tipList=null),this.eC&&(t=t.replace(LINEBREAK_REGEX,"<br>")),this.Jp=t}return this.Jp}Rp(e){if(this.Zp.length)for(let t=0,s=this.Zp.length;t<s;++t){const i=this.Zp[t];if("function"==typeof i){const r=e.querySelector(".bblink"+t);if(!r)throw new Error("unable to attach BBString link handler");r.onclick=i}}}equals(t){return t instanceof C33.HtmlString?this.wp()===t.wp():t instanceof C33.kr?this.Kp===t.Kp:this.Kp===t}oC(){if(!this.rC){let i=[],t=this.Kp,r=[],s=CUSTOM_BBREGEX.lastIndex=0,e;for(;null!==(e=CUSTOM_BBREGEX.exec(t));){const n=e.index;if(!(0<n&&"\\"===t.charAt(n-1))){const h=e[0],o=e[1],a=e[2],l=t.substring(s,n);if(s=n+h.length,l&&i.push({text:l,aC:r.slice(0)}),a)if(o){const c=a.toLowerCase();for(let t=r.length-1;0<=t;--t)if(r[t].tag===c){r.splice(t,1);break}}else{let t=a,s=null,e=a.indexOf("=");if(-1!==e?(t=a.substring(0,e).toLowerCase(),s=a.substring(e+1)):t=t.toLowerCase(),SELF_CLOSING_TAGS.has(t)){if("icon"!==t)throw new Error("unknown self-closing tag "+t);i.push({icon:s,aC:r.slice(0)})}else r.push({tag:t,param:s})}}}s<t.length&&i.push({text:t.substring(s),aC:r.slice(0)});for(const u of i)u.text&&(u.text=this.lC(u.text));this.nC=i.map(t=>t.icon?C33.yn(C33.cC,{icon:t.icon,aC:t.aC}):C33.yn(C33.uC,{fC:C33.xp(t.text),aC:t.aC})),this.rC=!0}return this.nC}lC(t){return t=C33.Sp(t,"\\[","["),C33.Sp(t,"\\\\","\\")}static dC(t){return C33.yn(C33.kr,t,{zp:!0}).hC()}static pC(t){return t.replace(CUSTOM_BBREGEX,"")}}}{let IsWordBreakWhiteSpace2=function(t){return" "!==t&&" "!==t&&C33.rp(t)},IsOpeningCJKPunctiationChar2=function(t){return CJK_OPEN_PUNCTUATION.has(t)},IsContinuingCJKPunctuationChar2=function(t){return C33.up(t)&&!IsOpeningCJKPunctiationChar2(t)},WordBreakTrimEnd2=function(t){for(;0<t.length&&IsWordBreakWhiteSpace2(t.at(-1));)t.pop()},IsNewline2=function(t){return"\n"===t||"\r\n"===t};IsWordBreakWhiteSpace=IsWordBreakWhiteSpace2,IsOpeningCJKPunctiationChar=IsOpeningCJKPunctiationChar2,IsContinuingCJKPunctuationChar=IsContinuingCJKPunctuationChar2,WordBreakTrimEnd=WordBreakTrimEnd2,IsNewline=IsNewline2;const C33=self.Bs,CJK_OPEN_PUNCTUATION=new Set("〈《「『【〔〖〘〚〝");C33.CC=class{constructor(){this.mC=[],this.gC=null}SC(){return this.mC}yC(){return this.mC.length}_C(t){this.gC=t}TC(t,s){let e=0,i=0,r=0,n=0,h=0;for(const o of t){if(-1===o.AC()){const a=s(o);o.EC(a.height),o.IC(a.fontBoundingBoxAscent||0),o.wC(a.fontBoundingBoxDescent||0),o.RC(a.MC||0),o.bC()?o.GC(a.width):o.vC()&&o.PC(this.gC)}e+=o.AC(),i=Math.max(i,o.OC()),r=Math.max(r,o.xC()),n=Math.max(n,o.LC()),h=Math.max(h,o.DC())}return{width:e,height:i,fontBoundingBoxAscent:r,fontBoundingBoxDescent:n,MC:h}}NC(t,s,e,i,r,n){this.mC.push(C33.yn(C33.CC.FC,{$C:t,width:s,height:e,fontBoundingBoxAscent:i,fontBoundingBoxDescent:r,MC:n}))}CC(s,n,h,e,o){if("string"==typeof s&&(s=[C33.yn(C33.uC,{fC:C33.xp(s)})]),C33.qh(this.mC),!(!s.length||1===s.length&&s[0].bC()&&s[0].Su()||h<2)){if(1===s.length){const a=s[0];if(a.bC()&&a.kC()<=100&&!a.BC()){let{width:t,height:s,fontBoundingBoxAscent:e,fontBoundingBoxDescent:i,MC:r}=n(a);if(t+=o,a.GC(t),a.EC(s),a.IC(e||0),a.wC(i||0),a.RC(r||0),t<=h)return void this.NC([a],t,s,e,i,r)}}let t;t="word"===e?this.WC(s):"cjk"===e?this.HC(s):this.VC(s),this.UC(t,n,h,o)}}WC(t){let s=[],e=[],i=!1;for(const r of t){const n=r.jC();if(r.vC())0<e.length&&s.push(e),s.push([r]),e=[];else for(const h of r.XC())if(IsNewline2(h))0<e.length&&s.push(e),s.push([C33.yn(C33.uC,{fC:["\n"],aC:n})]),e=[];else if(0===e.length)e.push(C33.yn(C33.uC,{fC:[h],aC:n})),i=IsWordBreakWhiteSpace2(h);else{const o=IsWordBreakWhiteSpace2(h);if(o===i){const a=e.at(-1);a.jC()===n?a.YC(h):e.push(C33.yn(C33.uC,{fC:[h],aC:n}))}else s.push(e),e=[C33.yn(C33.uC,{fC:[h],aC:n})],i=o}}return 0<e.length&&s.push(e),s}HC(t){let s=[],e=[],i=!1;for(const r of t){const n=r.jC();if(r.vC())0<e.length&&s.push(e),s.push([r]),e=[];else for(const h of r.XC())if(IsNewline2(h))0<e.length&&s.push(e),s.push([C33.yn(C33.uC,{fC:["\n"],aC:n})]),e=[];else{if(0===e.length)e.push(C33.yn(C33.uC,{fC:[h],aC:n}));else if(i||IsContinuingCJKPunctuationChar2(h)){const o=e.at(-1);o.jC()===n?o.YC(h):e.push(C33.yn(C33.uC,{fC:[h],aC:n}))}else s.push(e),e=[C33.yn(C33.uC,{fC:[h],aC:n})];i=IsOpeningCJKPunctiationChar2(h)}}return 0<e.length&&s.push(e),s}VC(t){const s=[];for(const e of t)if(e.bC()){const i=e.XC();C33.an(s,i.map(t=>[C33.yn(C33.uC,{fC:[t],aC:e.jC()})]))}else s.push([e]);return s}qC(t){return t.map(t=>t.KC())}zC(s,e){let t=s.length?s.at(-1):null,i=0;t&&t.bC()&&e[0].bC()&&e[0].jC()===t.jC()&&(t.JC(e[0].XC()),i=1);for(let t=e.length;i<t;++i){const r=e[i];s.push(r.KC())}}UC(t,s,e,i){let r=[],n=0,h=0,o=0,a=0,l=0;for(const c of t)if(1===c.length&&c[0].bC()&&1===c[0].kC()&&IsNewline2(c[0].XC()[0])){if(0===h){const u=C33.yn(C33.uC,{fC:[" "],aC:c[0].jC()}),f=s(u);h=f.height,o=f.fontBoundingBoxAscent||0,a=f.fontBoundingBoxDescent||0,l=f.MC||0}this.NC(r,n,h,o,a,l),r=[],n=0,h=0,o=0,a=0,l=0}else{const d=this.qC(r),p=(this.zC(d,c),this.TC(d,s)),C=p.width;if(e<=C)if(0<r.length&&this.NC(r,n,h,o,a,l),r=[],c[0].bC()&&C33.op(c[0].XC()))n=0,h=0,o=0,a=0,l=0;else{this.zC(r,c);const m=this.TC(r,s);n=m.width,h=m.height,o=m.fontBoundingBoxAscent,a=m.fontBoundingBoxDescent,l=m.MC}else r=d,n=C,h=p.height,o=p.fontBoundingBoxAscent,a=p.fontBoundingBoxDescent,l=p.MC}0<r.length&&this.NC(r,n,h,o,a,l),this.QC(s,i)}QC(s,e){for(const i of this.mC){const r=i.ZC();if(r.length){let t=r.at(-1);if(t.bC()){const n=t.XC(),h=n.slice(0);if(WordBreakTrimEnd2(h),0===h.length)i.tm(-t.AC()),r.pop();else if(h.length<n.length){t.rm(h);const o=s(t).width,a=t.AC()-o;t.GC(o),i.tm(-a)}0!==e&&0<r.length&&((t=r.at(-1)).tm(e),i.tm(e))}}}}gu(){C33.qh(this.mC)}nm(){return this.mC.reduce((t,s)=>Math.max(t,s.AC()),0)}hm(){return this.mC.reduce((t,s)=>t+s.OC(),0)}}}{const C33=self.Bs;C33.CC.FC=class{constructor(t){this.nC=t.$C||[],this.am=t.width||-1,this.lm=t.height||-1,this.um=t.fontBoundingBoxAscent||-1,this.fm=t.fontBoundingBoxDescent||-1,this.pm=t.MC||-1,this.Cm=0,this.gm=0}$C(){return this.nC.values()}*Sm(){const s=this.nC;for(let t=s.length-1;0<=t;--t)yield s[t]}ZC(){return this.nC}tm(t){this.am+=t}AC(){return this.am}OC(){return this.lm}ym(){return this.um}LC(){return this.fm}DC(){return this.pm}_m(t){this.Cm=t}Tm(){return this.Cm}Am(t){this.gm=t}Em(){return this.gm}}}{const C33=self.Bs;C33.Im=class{constructor(t){this.wm=t.aC||[],this.am=t.width||-1,this.lm=t.height||-1,this.um=t.fontBoundingBoxAscent||-1,this.fm=t.fontBoundingBoxDescent||-1,this.pm=t.MC||-1,this.Cm=0,this.gm=0}bC(){return!1}vC(){return!1}jC(){return this.wm}Rm(s){const e=this.wm;for(let t=e.length-1;0<=t;--t){const i=e[t];if(i.tag===s)return i}return null}Mm(t){return!!this.Rm(t)}Gm(){const t=new Map;for(const s of this.wm)t.set(s.tag,s.param);return t}tm(t){this.am+=t}GC(t){this.am=t}AC(){return this.am}EC(t){this.lm=t}OC(){return this.lm}IC(t){this.um=t}xC(){return this.um}wC(t){this.fm=t}LC(){return this.fm}RC(t){this.pm=t}DC(){return this.pm}_m(t){this.Cm=t}Tm(){return this.Cm}Am(t){this.gm=t}Em(){return this.gm}}}{const C33=self.Bs;C33.uC=class extends C33.Im{constructor(t){super(t),this.vm=t.fC}bC(){return!0}JC(t){C33.an(this.vm,t),this.am=-1,this.lm=-1,this.um=-1,this.fm=-1,this.pm=-1}YC(t){this.vm.push(t)}KC(){return C33.yn(C33.uC,{fC:this.vm.slice(0),aC:this.wm,width:this.am,height:this.lm,fontBoundingBoxAscent:this.um,fontBoundingBoxDescent:this.fm,MC:this.pm})}XC(){return this.vm}rm(t){this.vm=t}kC(){return this.vm.length}Su(){return 0===this.vm.length}BC(){return this.vm.includes("\n")}}}{const C33=self.Bs;C33.cC=class extends C33.Im{constructor(t){super(t),this.Pm=t.icon}vC(){return!0}Om(){return this.Pm}KC(){return C33.yn(C33.cC,{icon:this.Pm,aC:this.wm,width:this.am,height:this.lm,fontBoundingBoxAscent:this.um,fontBoundingBoxDescent:this.fm,MC:this.pm})}xm(t){if(!t)return null;let s=Number(this.Pm);return String(s)===this.Pm?(s=Math.floor(s),t.Lm(s)):t.Dm(this.Pm)}PC(t){const s=this.xm(t);this.am=s?this.lm*s.AC()/s.OC():0}Nm(t){const s=this.xm(t);return s?s.Nm():null}kC(){return 1}}}{const C33=self.Bs;C33.Fm=class{constructor(t){this.$m=new Map,this.km=t.Bm,this.Wm=t.Hm}_n(){for(const t of this.$m.values())t._n();this.$m.clear()}Vm(t){let s=this.$m.get(t);if(!s){const e=this.km(t);s=C33.yn(C33.Um,this,{source:t,jm:e}),this.$m.set(t,s)}return s}Xm(t){return this.$m.has(t)}Ym(t){const s=this.$m.get(t);s&&s._n(),this.$m.delete(t)}async qm(t){return this.Wm(t)}}}{const C33=self.Bs;C33.Um=class{constructor(t,s){this.Km=t,this.zm=s.source,this.Jm=[],this.Qm=new Map,this.Zm=!1,this.t1=!1,this.s1=null;const e=s.jm.e1;for(let t=0,s=e.length;t<s;++t){const i=e[t],r=C33.yn(C33.i1,this,{index:t,tag:i.tag,source:i.source,width:i.width,height:i.height});this.Jm.push(r),i.tag&&this.Qm.set(i.tag.toLowerCase(),r)}}_n(){for(const t of this.Jm)t._n();C33.qh(this.Jm),this.Qm.clear(),this.Km=null,this.zm=null}n1(){return this.Zm}h1(){return this.t1}o1(){return this.s1||(this.s1=this.a1()),this.s1}async a1(){if(!this.Zm){this.Zm=!0,this.t1=!0;const t=await this.Km.qm(this.zm);if(this.Km){const e=t.e1;for(let t=0,s=Math.min(e.length,this.Jm.length);t<s;++t){const i=e[t].l1;this.Jm[t].c1(i)}this.t1=!1}}}Lm(t){return(t=Math.floor(t))<0||t>=this.Jm.length?null:this.Jm[t]}Dm(t){return this.Qm.get(t.toLowerCase())||null}}}{const C33=self.Bs;C33.i1=class{constructor(t,s){this.u1=t,this.zm=s.source||null,this.f1=s.index,this.d1=s.tag,this.am=s.width,this.lm=s.height,this.C1=null}_n(){this.am=0,this.lm=0,this.u1=null}m1(){return this.zm}AC(){return this.am}OC(){return this.lm}c1(t){this.C1=t}Nm(){return this.C1}}}{let PlaneFromPoints2=function(t,s,e,i){const r=tempVec3c;vec32.B(tempVec3a,e,s),vec32.B(tempVec3b,t,s),vec32.Ft(r,tempVec3a,tempVec3b),vec32.normalize(r,r),i.set(r[0],r[1],r[2],vec32.Nt(t,r))},IsInFrontOfPlane2=function(t,s,e,i,r,n,h){const o=h.x,a=h.y,l=h.z,c=h.w,u=h.g1,f=h.S1,d=h._1,p=1-u,C=1-f,m=1-d,g=o*t*u+o*i*p+a*s*f+a*r*C+l*e*d+l*n*m;if(c<=g)return!0;const S=o*i*u+o*t*p+a*r*f+a*s*C+l*n*d+l*e*m;return c<S},IsPointInFrontOfPlane2=function(t,s,e,i){const r=i.x,n=i.y,h=i.z,o=i.w,a=r*t+n*s+h*e;return o<=a};PlaneFromPoints=PlaneFromPoints2,IsInFrontOfPlane=IsInFrontOfPlane2,IsPointInFrontOfPlane=IsPointInFrontOfPlane2;const C33=self.Bs,glMatrix=self.Es,vec32=glMatrix.Ps,vec42=glMatrix.Os,mat42=glMatrix.Ms,tempVec3a=vec32.create(),tempVec3b=vec32.create(),tempVec3c=vec32.create(),tempVec4=vec42.create(),tempMat4=mat42.create(),neartl=vec32.create(),neartr=vec32.create(),nearbl=vec32.create(),nearbr=vec32.create(),fartl=vec32.create(),fartr=vec32.create(),farbl=vec32.create(),farbr=vec32.create(),unitViewport=vec42.R(0,0,1,1);C33.T1={A1(t,s,e,i,r,n,h){let o=i[0]*t+i[4]*s+i[8]*e+i[12],a=i[1]*t+i[5]*s+i[9]*e+i[13],l=i[2]*t+i[6]*s+i[10]*e+i[14],c=i[3]*t+i[7]*s+i[11]*e+i[15],u=r[0]*o+r[4]*a+r[8]*l+r[12]*c,f=r[1]*o+r[5]*a+r[9]*l+r[13]*c,d=r[2]*o+r[6]*a+r[10]*l+r[14]*c,p=r[3]*o+r[7]*a+r[11]*l+r[15]*c;return 0!=p&&(f*=p=1/p,d*=p,h[0]=(.5*(u*=p)+.5)*n[2]+n[0],h[1]=(.5*f+.5)*n[3]+n[1],h[2]=.5*(1+d),!0)},E1(t,s,e,i,r,n,h){const o=tempMat4,a=tempVec4;return mat42.multiply(o,r,i),null!==mat42.G(o,o)&&(a[0]=(t-n[0])/n[2]*2-1,a[1]=(s-n[1])/n[3]*2-1,a[2]=2*e-1,a[3]=1,vec42.Ht(a,a,o),0!==a[3])&&(a[3]=1/a[3],h[0]=a[0]*a[3],h[1]=a[1]*a[3],h[2]=a[2]*a[3],!0)},I1(t,s,e,i,r,n,h){const o=tempVec3a,a=tempVec3b;if(!C33.T1.E1(t,s,0,i,r,n,o))return!1;if(!C33.T1.E1(t,s,1,i,r,n,a))return!1;let l=tempVec3b,c=(vec32.B(l,a,o),tempVec3c),u=(vec32.set(c,0,0,1),-e),f=vec32.Nt(c,l),d=0;if(0===f){const p=vec32.Nt(c,o)+u;if(0!==p)return!1}else if((d=-(vec32.Nt(o,c)+u)/f)<0)return!1;return vec32.Pt(h,o,l,d),!0}};class Plane{constructor(){this.x=NaN,this.y=NaN,this.z=NaN,this.w=NaN,this.g1=NaN,this.S1=NaN,this._1=NaN}set(t,s,e,i){this.x=t,this.y=s,this.z=e,this.w=i,this.g1=0<t?1:0,this.S1=0<s?1:0,this._1=0<e?1:0}}C33.T1.w1=class{constructor(){this.R1=new Plane,this.M1=new Plane,this.b1=new Plane,this.G1=new Plane,this.v1=new Plane,this.P1=new Plane}O1(t,s){const e=unitViewport;C33.T1.E1(0,1,0,t,s,e,neartl),C33.T1.E1(1,1,0,t,s,e,neartr),C33.T1.E1(0,0,0,t,s,e,nearbl),C33.T1.E1(1,0,0,t,s,e,nearbr),C33.T1.E1(0,1,1,t,s,e,fartl),C33.T1.E1(1,1,1,t,s,e,fartr),C33.T1.E1(0,0,1,t,s,e,farbl),C33.T1.E1(1,0,1,t,s,e,farbr),PlaneFromPoints2(nearbl,neartl,fartl,this.R1),PlaneFromPoints2(neartl,neartr,fartr,this.M1),PlaneFromPoints2(neartr,nearbr,farbr,this.b1),PlaneFromPoints2(nearbr,nearbl,farbl,this.G1),PlaneFromPoints2(farbl,fartl,fartr,this.P1),PlaneFromPoints2(nearbr,neartr,neartl,this.v1)}L1(t,s,e,i,r,n){return IsInFrontOfPlane2(t,s,e,i,r,n,this.R1)&&IsInFrontOfPlane2(t,s,e,i,r,n,this.M1)&&IsInFrontOfPlane2(t,s,e,i,r,n,this.b1)&&IsInFrontOfPlane2(t,s,e,i,r,n,this.G1)&&IsInFrontOfPlane2(t,s,e,i,r,n,this.v1)&&IsInFrontOfPlane2(t,s,e,i,r,n,this.P1)}D1(t,s,e){return!IsPointInFrontOfPlane2(t,s,e,this.v1)}}}{const C33=self.Bs,glMatrix=self.Es,vec32=glMatrix.Ps,vec42=glMatrix.Os,mat42=glMatrix.Ms,tempMat4=mat42.create(),tmpVec3a=vec32.R(0,0,0),tmpVec3b=vec32.R(0,0,0),tmpVec3c=vec32.R(0,0,0),defaultUpVector=vec32.R(0,1,0),tmpVec4=vec42.R(0,0,0,0),tmpQuad=new C33.dc,tmpRect=new C33.Rect,defaultTexCoordsQuad=new C33.dc(0,0,1,0,1,1,0,1),DEFAULT_RENDERERBASE_OPTS={N1:1,F1:1e4},matWebGLtoWebGPU=mat42.R(1,0,0,0,0,1,0,0,0,0,.5,0,0,0,.5,1);C33.T1.B1=class{constructor(t){t=Object.assign({},DEFAULT_RENDERERBASE_OPTS,t),this.am=0,this.lm=0,this.W1=C33.Mn(45),this.H1=Math.tan(this.W1/2),this.V1=mat42.create(),this.U1=mat42.create(),this.j1=!1,this.X1=t.N1,this.Y1=t.F1,this.q1=[],this.K1=new Map,this.z1=null,this.J1=null,this.Q1=null,this.Z1=null,this.t2=null,this.s2=null,this.e2=null,this.i2=null,this.n2=null,this.h2=null,this.o2=null,this.a2=null,this.l2=new Map,this.c2=null,this.u2=[],this.f2=new Map,this.d2=0,this.C2=0,this.m2=1,this.g2=[this.m2],this.S2=1,this._2=[this.S2],this.T2=.5,this.A2=[this.T2],this.E2=0,this.I2=!0,this.w2=!1}R2(t){let s=0,e=t.length,i=0;for(;s<e;)t[s++]=i,t[s++]=i+1,t[s++]=i+2,t[s++]=i,t[s++]=i+2,t[s++]=i+3,i+=4}M2(){this.d2=0,this.C2=0,this.z1=null,this.J1=null,this.Q1=null,this.Z1=null,this.t2=null,this.s2=null,this.e2=null,this.i2=null,this.n2=null,this.h2=null,this.o2=null,this.a2=null,this.b2()}G2(){this.M2(),this.c2=null}v2(){for(const t of this.q1)t._n();this.M2()}AC(){return this.am}OC(){return this.lm}P2(t){return this.O2()?100:t/(2*this.L2())}D2(t){if(this.O2()){const s=t/(2*this.L2());return s/this.P2(t)}return 1}N2(t){this.X1=t}F2(){return this.X1}B2(t){this.Y1=t}W2(){return this.Y1}H2(t){this.W1=t,this.H1=Math.tan(this.W1/2)}V2(){return this.W1}L2(){return this.H1}U2(){this.j1=!1}j2(){this.j1=!0}O2(){return!this.j1}X2(){return this.j1}Y2(t,s,e=.5,i=.5){const r=this.F2(),n=this.W2(),h=this.V2();if(.5===e&&.5===i)this.q2()?mat42.Et(t,h,s,r,n):mat42.perspective(t,h,s,r,n);else{const o=2*(e=1-e)-2,a=2*e,l=2*i-2,c=2*i,u=this.L2()*r,f=u*s;mat42.Tt(t,o*f,a*f,l*u,c*u,r,n),this.q2()&&mat42.mul(t,matWebGLtoWebGPU,t)}}K2(t,s,e,i=1){const r=self.devicePixelRatio,n=2*this.P2(e)*r*this.L2()/e,h=s*n/(2*r*i),o=e*n/(2*r*i),a=-h,l=h,c=-o,u=o;this.q2()?mat42.Mt(t,a,l,c,u,this.F2(),this.W2()):mat42.ortho(t,a,l,c,u,this.F2(),this.W2())}z2(t,s,e,i,r,n=1){let h=1;this.O2()&&(h=200*this.L2()/r);const o=tmpVec3c,a=(vec32.set(o,h,-h,1),tmpVec3a),l=tmpVec3b;vec32.multiply(a,s,o),vec32.multiply(l,e,o),mat42.bt(t,a,l,i||defaultUpVector),o[2]=n,mat42.scale(t,t,o)}J2(t,s,e,i,r,n,h,o){return vec32.set(tmpVec3a,t,s,e),vec32.set(tmpVec3b,i,r,n),this.z2(tempMat4,tmpVec3a,tmpVec3b,defaultUpVector,h,o),tempMat4}Q2(t){this.q1.push(t),this.K1.set(t.pf(),t)}Z2(t){const s=this.q1.indexOf(t);-1!==s&&this.q1.splice(s,1),this.K1.delete(t.pf())}b2(){C33.qh(this.q1),this.K1.clear()}tg(t){return this.K1.get(t)||null}sg(){return this.z1}eg(){this.ig(this.z1)}rg(){return this.J1}ng(){this.ig(this.J1)}hg(){this.ig(this.Q1)}og(){this.ig(this.Z1)}ag(){this.ig(this.t2)}lg(){this.ig(this.s2)}ug(){this.ig(this.e2)}fg(){this.ig(this.i2)}dg(){this.ig(this.n2)}pg(){this.ig(this.h2)}Cg(){this.ig(this.o2)}mg(){this.ig(this.a2)}gg(t){this.c2=t}Sg(){return this.c2}yg(t,s,e,i){let r=C33.T1.Tg._g(t,s,e,i),n=this.l2.get(r);return n||(n=C33.yn(C33.T1.Tg,this,t,s,e,i),this.l2.set(r,n)),n.Ag(),n}Eg(t){t.Ig(),0===t.wg()&&(this.c2===t&&(this.c2=null),this.l2.delete(t.Rg()),t._n())}Mg(t){C33.qh(this.u2),this.f2.clear();let s=0;for(const e of t){const i=e[0],r=e[1],n=e[2];this.u2.push([r,n]),this.f2.set(i,{number:s,bg:r,Gg:n}),s++}}vg(t){return this.u2[t]}Pg(t){return this.vg(t)[0]}Og(t){return this.vg(t)[1]}xg(t){const s=this.f2.get(t);if(void 0===s)throw new Error("invalid blend name");return s}Lg(t){const s=this.f2.get(t);if(void 0===s)throw new Error("invalid blend name");return s.number}Dg(t){this.d2=t}Ng(){return this.d2}Fg(t){this.C2=t,this.c2=null}$g(){return this.C2}FC(t,s,e,i){const r=C33.xn(t,s,e,i),n=Math.sin(r),h=Math.cos(r),o=.5*this.m2,a=n*o,l=h*o,c=this.S2;2===c?this.kg(t,s,0,e,i,0,a,l):1===c?this.Bg(t,s,0,e,i,0,a,l):this.Wg(t,s,0,e,i,0,a,l)}Hg(t,s,e,i,r,n){const h=C33.xn(t,s,i,r),o=Math.sin(h),a=Math.cos(h),l=.5*this.m2,c=o*l,u=a*l,f=this.S2;2===f?this.kg(t,s,e,i,r,n,c,u):1===f?this.Bg(t,s,e,i,r,n,c,u):this.Wg(t,s,e,i,r,n,c,u)}kg(t,s,e,i,r,n,h,o){const a=this.T2,l=t+a-o,c=s+a-h,u=i+a+o,f=r+a+h,d=2*o,p=2*h,C=l+h,m=c-o,g=l-h+d,S=c+o+p,y=u+h,_=f-o,T=u-h-d,A=f+o-p;this.Vg(C,m,e,y,_,n,T,A,n,g,S,e,defaultTexCoordsQuad)}Bg(t,s,e,i,r,n,h,o){const a=this.T2,l=t+a-o,c=s+a-h,u=i+a+o,f=r+a+h,d=l+h,p=c-o,C=l-h,m=c+o,g=u+h,S=f-o,y=u-h,_=f+o;this.Vg(d,p,e,g,S,n,y,_,n,C,m,e,defaultTexCoordsQuad)}Wg(t,s,e,i,r,n,h,o){const a=this.T2,l=t+a,c=s+a,u=i+a,f=r+a,d=l+h,p=c-o,C=l-h,m=c+o,g=u+h,S=f-o,y=u-h,_=f+o;this.Vg(d,p,e,g,S,n,y,_,n,C,m,e,defaultTexCoordsQuad)}Ug(t,s,e,i,r,n){const h=C33.xn(t,s,e,i),o=Math.sin(h),a=Math.cos(h),l=.5*this.m2,c=o*l,u=a*l,f=this.S2;2===f?this.jg(t,s,e,i,c,u,r,n):1===f?this.Xg(t,s,e,i,c,u,r,n):this.Yg(t,s,e,i,c,u,r,n)}jg(t,s,e,i,r,n,h,o){const a=this.T2,l=t+a-n,c=s+a-r,u=e+a+n,f=i+a+r,d=2*n,p=2*r,C=l+r,m=c-n,g=l-r+d,S=c+n+p,y=u+r,_=f-n,T=u-r-d,A=f+n-p;tmpQuad.set(C,m,y,_,T,A,g,S),tmpRect.set(h,0,o,0),this.qg(tmpQuad,tmpRect)}Xg(t,s,e,i,r,n,h,o){const a=this.T2,l=t+a-n,c=s+a-r,u=e+a+n,f=i+a+r,d=l+r,p=c-n,C=l-r,m=c+n,g=u+r,S=f-n,y=u-r,_=f+n;tmpQuad.set(d,p,g,S,y,_,C,m),tmpRect.set(h,0,o,0),this.qg(tmpQuad,tmpRect)}Yg(t,s,e,i,r,n,h,o){const a=this.T2,l=t+a,c=s+a,u=e+a,f=i+a,d=l+r,p=c-n,C=l-r,m=c+n,g=u+r,S=f-n,y=u-r,_=f+n;tmpQuad.set(d,p,g,S,y,_,C,m),tmpRect.set(h,0,o,0),this.qg(tmpQuad,tmpRect)}Kg(t,s,e,i){const r=.5*this.m2,n=this.S2;2===n?this.zg(t,s,e,i,r):1===n?this.Jg(t,s,e,i,r):this.Qg(t,s,e,i,r)}zg(t,s,e,i,r){this.kg(t,s,0,e,s,0,0,r),this.kg(e,s,0,e,i,0,r,0),this.kg(e,i,0,t,i,0,0,-r),this.kg(t,i,0,t,s,0,-r,0)}Jg(t,s,e,i,r){this.Bg(t,s,0,e,s,0,0,r),this.Bg(e,s,0,e,i,0,r,0),this.Bg(e,i,0,t,i,0,0,-r),this.Bg(t,i,0,t,s,0,-r,0)}Qg(t,s,e,i,r){this.Wg(t,s,0,e,s,0,0,r),this.Wg(e,s,0,e,i,0,r,0),this.Wg(e,i,0,t,i,0,0,-r),this.Wg(t,i,0,t,s,0,-r,0)}Zg(t){this.Kg(t.Nl(),t.Fl(),t.$l(),t.kl())}tS(t){const s=C33.xn(t.ph(),t.Ch(),t.mh(),t.gh()),e=Math.sin(s),i=Math.cos(s),r=.5*this.m2,n=e*r,h=i*r,o=this.S2;2===o?this.sS(t,n,h):1===o?this.eS(t,n,h):this.iS(t,n,h)}sS(t,s,e){this.kg(t.ph(),t.Ch(),0,t.mh(),t.gh(),0,s,e),this.kg(t.mh(),t.gh(),0,t.Sh(),t.yh(),0,e,-s),this.kg(t.Sh(),t.yh(),0,t._h(),t.Th(),0,-s,-e),this.kg(t._h(),t.Th(),0,t.ph(),t.Ch(),0,-e,s)}eS(t,s,e){this.Bg(t.ph(),t.Ch(),0,t.mh(),t.gh(),0,s,e),this.Bg(t.mh(),t.gh(),0,t.Sh(),t.yh(),0,e,-s),this.Bg(t.Sh(),t.yh(),0,t._h(),t.Th(),0,-s,-e),this.Bg(t._h(),t.Th(),0,t.ph(),t.Ch(),0,-e,s)}iS(t,s,e){this.Wg(t.ph(),t.Ch(),0,t.mh(),t.gh(),0,s,e),this.Wg(t.mh(),t.gh(),0,t.Sh(),t.yh(),0,e,-s),this.Wg(t.Sh(),t.yh(),0,t._h(),t.Th(),0,-s,-e),this.Wg(t._h(),t.Th(),0,t.ph(),t.Ch(),0,-e,s)}rS(t){this.m2=t,this.g2[this.g2.length-1]=t}nS(){return this.m2}hS(t){if(100<=this.g2.length)throw new Error("pushed too many line widths - check push/pop pairs");this.g2.push(t),this.m2=t}oS(){if(this.g2.length<=1)throw new Error("cannot pop last line width - check push/pop pairs");this.g2.pop(),this.m2=this.g2.at(-1)}aS(){this.S2=0,this._2[this._2.length-1]=0}lS(){this.S2=1,this._2[this._2.length-1]=0}cS(){this.S2=2,this._2[this._2.length-1]=0}uS(t){if("butt"===t)this.fS();else if("square"===t)this.dS();else{if("zag"!==t)throw new Error("invalid line cap");this.pS()}}fS(){if(100<=this._2.length)throw new Error("pushed too many line caps - check push/pop pairs");this._2.push(0),this.S2=0}dS(){if(100<=this._2.length)throw new Error("pushed too many line caps - check push/pop pairs");this._2.push(1),this.S2=1}pS(){if(100<=this._2.length)throw new Error("pushed too many line caps - check push/pop pairs");this._2.push(2),this.S2=2}CS(){if(this._2.length<=1)throw new Error("cannot pop last line cap - check push/pop pairs");this._2.pop(),this.S2=this._2.at(-1)}mS(t){this.T2=t,this.A2[this.A2.length-1]=t}gS(){return this.T2}SS(t){if(100<=this.A2.length)throw new Error("pushed too many line offsets - check push/pop pairs");this.A2.push(t),this.T2=t}yS(){if(this.A2.length<=1)throw new Error("cannot pop last line offset - check push/pop pairs");this.A2.pop(),this.T2=this.A2.at(-1)}_S(s){const t=s.length/2;if(t<3)throw new Error("need at least 3 points");const e=t-2,i=e-1,r=s[0],n=s[1];for(let t=0;t<e;t+=2){const h=2*t,o=s[2+h],a=s[3+h],l=s[4+h],c=s[5+h];if(t===i)this.TS(r,n,o,a,l,c,l,c);else{const u=s[6+h],f=s[7+h];this.TS(r,n,o,a,l,c,u,f)}}}AS(){return 3}ES(){this.IS(!0),this.E2++}wS(){return this.E2}RS(){this.E2++}MS(t){this.I2=!!t}bS(){return this.I2}GS(t){this.w2=!!t}vS(){return this.w2}PS(){return!1}q2(){return!1}OS(){}xS(){}LS(){}DS(){return this.OS()+this.xS()+this.LS()}NS(){return C33.yn(C33.T1.FS,this)}}}{const C33=self.Bs;C33.T1.$S=class{constructor(t,s){this.En=s.name,this.kS=t,this.BS=s.extendBoxHorizontal||0,this.WS=s.extendBoxVertical||0,this.HS=!!s.crossSampling,this.VS=!!s.mustPreDraw,this.US=!!s.preservesOpaqueness,this.jS=!!s.supports3dDirectRendering,this.XS=!!s.animated,this.YS=!!s.blendsBackground,this.qS=!!s.usesDepth,this.KS=!1,this.zS=this.HS||this.YS||0!==this.BS||0!==this.WS}_n(){this.kS=null}JS(){return this.kS}pf(){return this.En}QS(){return 0!==this.BS||0!==this.WS}ZS(){return this.BS}ty(){return this.WS}ey(){return this.HS}iy(){return this.VS}ny(){return this.US}hy(){return this.jS}oy(){return this.XS}ly(){return this.YS}uy(){return this.qS}Cy(){return this.KS}my(){return this.zS}gy(){return!1}}}{const C33=self.Bs;C33.T1.Tg=class{constructor(t,s,e,i,r){this.kS=t,this.P3=0,this.Sy=null,this.yy="",this._y=e,this.Ty=C33.yn(C33.Zo),this.Ty.set(i),this.Ay=r,"string"==typeof s?this.yy=s:(this.Sy=s,this.yy=this.Sy.pf())}_n(){if(0<this.P3)throw new Error("releasing state group still in use");this.kS=null,this.Sy=null,this.yy=""}Ey(){const t=this.kS;t.ig(this.Sy),t.Iy(this._y),t.wy(this.Ty),t.Fg(this.Ay),t.gg(this)}Rg(){return C33.T1.Tg._g(this.yy,this._y,this.Ty,this.Ay)}Ag(){++this.P3}Ig(){--this.P3}wg(){return this.P3}Ry(){this.Sy=null}My(t){if(this.Sy=t.tg(this.yy),!this.Sy)throw new Error("failed to restore shader program")}static _g(t,s,e,i){const r="string"==typeof t?t:t.pf();return r+","+s+","+e.Sa()+","+e.ya()+","+e._a()+","+e.Ta()+","+i}}}{let interpolateQuad2=function(t,s,e){const i=e.ph(),r=e.Ch(),n=e.mh()-i,h=e.gh()-r,o=e._h()-i,a=e.Th()-r,l=n*t,c=h*t,u=o*s,f=a*s;return[i+l+u,r+c+f]};interpolateQuad=interpolateQuad2;const C33=self.Bs,tempQuadTex=C33.yn(C33.dc);C33.T1.by=class{constructor(t,s,e){this.Gy=t,this.Py=s,this.Oy=e,this.fl=NaN,this.dl=NaN,this.Ay=NaN,this.xy=NaN,this.Ly=NaN,this.fl=0,this.dl=0,this.Ay=0,this.xy=0,this.Ly=0}Dy(t,s,e,i){this.fl=t,this.dl=s,this.xy=e,this.Ly=i}Ny(){return this.fl}Fy(t){this.fl!==t&&(this.fl=t,this.Gy.$y())}ky(){return this.dl}By(t){this.dl!==t&&(this.dl=t,this.Gy.$y())}Wy(){return this.Ay}Hy(t){this.Ay!==t&&(this.Ay=Math.max(t,0),this.Gy.$y())}Vy(){return this.xy}Uy(t){this.xy=t}jy(){return this.Ly}Xy(t){this.Ly=t}Yy(t,s,e){[this.fl,this.dl]=interpolateQuad2(t.fl,t.dl,s),this.Ay=t.Ay,this.xy=C33.$t(e.Nl(),e.$l(),t.xy),this.Ly=C33.$t(e.Fl(),e.kl(),t.Ly)}qy(t,s,e){[this.fl,this.dl]=interpolateQuad2(t.fl,t.dl,s),this.Ay=t.Ay,[this.xy,this.Ly]=interpolateQuad2(t.xy,t.Ly,e)}Ky(){return{x:this.Ny(),y:this.ky(),z:this.Wy(),u:this.Vy(),v:this.jy()}}zy(t){this.Fy(t.x),this.By(t.y),t.hasOwnProperty("z")&&this.Hy(t.z),this.Uy(t.u),this.Xy(t.v)}Jy(){return this.Gy}Qy(){return this.Py}Zy(){return this.Oy}},C33.T1.t_=class{constructor(e,t,s){if(e<2||t<2)throw new Error("invalid mesh size");this.s_=e,this.e_=t,this.i_=s||null,this.r_=[],this.n_=0,this.h_=0,this.o_=1,this.a_=1,this.l_=0,this.c_=!1;const i=e-1,r=t-1;for(let s=0;s<t;++s){const n=[];for(let t=0;t<e;++t){const h=C33.yn(C33.T1.by,this,t,s),o=t/i,a=s/r;h.Dy(o,a,o,a),n.push(h)}this.r_.push(n)}}_n(){C33.qh(this.r_)}u_(){return this.s_}f_(){return this.e_}d_(){return this.i_}p_(){return this.r_}$y(){this.c_=!0}C_(){if(this.c_){let t=1/0,s=1/0,e=-1/0,i=-1/0,r=0;for(const n of this.r_)for(const h of n){const o=h.Ny(),a=h.ky();t=Math.min(t,o),s=Math.min(s,a),e=Math.max(e,o),i=Math.max(i,a),r=Math.max(r,h.Wy())}this.n_=t,this.h_=s,this.o_=e,this.a_=i,this.l_=r,this.c_=!1}}m_(){return this.C_(),this.n_}g_(){return this.C_(),this.h_}S_(){return this.C_(),this.o_}y_(){return this.C_(),this.a_}__(){return this.C_(),this.l_}T_(){return 0<this.__()}A_(t,s){return t=Math.floor(t),s=Math.floor(s),t<0||t>=this.s_||s<0||s>=this.e_?null:this.r_[s][t]}E_(t,e,i){const r=i instanceof C33.Rect;if(t.u_()!==this.u_()||t.f_()!==this.f_())throw new Error("source mesh wrong size");const n=t.r_,h=this.r_;for(let t=0,s=h.length;t<s;++t){const o=n[t],a=h[t];for(let t=0,s=a.length;t<s;++t){const l=o[t],c=a[t];r?c.Yy(l,e,i):c.qy(l,e,i)}}}I_(n){let h=this.r_,o=h[0];for(let t=1,s=h.length;t<s;++t){let e=h[t],i=o[0],r=e[0];for(let t=1,s=e.length;t<s;++t){const a=o[t],l=e[t];tempQuadTex.set(i.Vy(),i.jy(),a.Vy(),a.jy(),l.Vy(),l.jy(),r.Vy(),r.jy()),n.Vg(i.Ny(),i.ky(),i.Wy(),a.Ny(),a.ky(),a.Wy(),l.Ny(),l.ky(),l.Wy(),r.Ny(),r.ky(),r.Wy(),tempQuadTex),i=a,r=l}o=e}}w_(o,a){a=a||((t,s,e)=>[t,s,e]);let t=this.r_,l=t[0];for(let n=1,h=t.length;n<h;++n){let e=t[n],i=l[0],r=e[0];for(let t=1,s=e.length;t<s;++t){const c=l[t],u=e[t],[f,d,p]=a(i.Ny(),i.ky(),i.Wy()),[C,m,g]=a(c.Ny(),c.ky(),c.Wy()),[S,y,_]=a(u.Ny(),u.ky(),u.Wy()),[T,A,E]=a(r.Ny(),r.ky(),r.Wy());o.Hg(f,d,p,C,m,g),o.Hg(f,d,p,S,y,_),o.Hg(f,d,p,T,A,E),t===s-1&&o.Hg(C,m,g,S,y,_),n===h-1&&o.Hg(T,A,E,S,y,_),i=c,r=u}l=e}}R_(t){let e=.99999999,i=t.su(),r=[],n=this.u_()-1,h=this.f_()-1,o=1/n,a=1/h,l=n-1,c=h-1,u=i[0],f=i[1],d=C33.wn(Math.floor(u*n),0,l),p=C33.wn(Math.floor(f*h),0,c),C=!0,m=0,g=0,S=0,y=-1,_=()=>{u=C33.wn(C33.$t(u,m,S),0,1),f=C33.wn(C33.$t(f,g,S),0,1),r.push(u,f)};for(let t=0,s=i.length;t<s;t+=2){u=i[t],f=i[t+1],r.push(u,f),d=C33.wn(Math.floor(u*n),0,l),p=C33.wn(Math.floor(f*h),0,c);const T=(t+2)%s;for(m=i[T],g=i[1+T],y=-1;;){if(1e6<r.length)throw new Error("Too many mesh poly points");const A=d*o,E=p*a,I=(d+1)*o,w=(p+1)*a;if(C=C33.wh(u,f,A,E,I,E,I,w),0!==y&&0<=(S=C33.Ih(u,f,m,g,A,E,I,w,-.001))&&S<=e)_(),C=!C,y=0;else if(0<p&&2!==y&&0<=(S=C33.Ih(u,f,m,g,A,E,I,E,.001))&&S<=e)_(),p--,C=!1,y=4;else if(d<l&&3!==y&&0<=(S=C33.Ih(u,f,m,g,I,E,I,w,.001))&&S<=e)_(),d++,C=!1,y=1;else if(0<d&&1!==y&&0<=(S=C33.Ih(u,f,m,g,A,E,A,w,.001))&&S<=e)_(),d--,C=!0,y=3;else{if(!(p<c&&4!==y&&0<=(S=C33.Ih(u,f,m,g,A,w,I,w,.001))&&S<=e))break;_(),p++,C=!0,y=2}}}return C33.yn(C33.zc,r)}M_(t,s){const e=this.b_(t);this.G_(e),s.iu(e)}b_(t){const e=[],i=t.su();for(let t=0,s=i.length;t<s;t+=2){const r=i[t],n=i[t+1],[h,o]=this.v_(r,n);e.push(h,o)}return e}v_(t,s){const e=this.u_()-1,i=this.f_()-1,r=1/e,n=1/i,h=C33.wn(Math.floor(t*e),0,e-1),o=C33.wn(Math.floor(s*i),0,i-1),a=h*r,l=o*n,c=(h+1)*r,u=(o+1)*n,f=this.A_(h,o),d=this.A_(h+1,o+1),p=C33.wh(t,s,a,l,c,l,c,u),C=p?a+r:a,m=p?l:l+n,g=this.A_(h+(p?1:0),o+(p?0:1)),[S,y,_]=C33.Rh(t,s,a,l,C,m,c,u);return C33.Mh(S,y,_,f.Ny(),f.ky(),f.Wy(),g.Ny(),g.ky(),g.Wy(),d.Ny(),d.ky(),d.Wy())}G_(e){let i=[],r=e[0],n=e[1],h=r-e.at(-2),o=n-e.at(-1);for(let t=0,s=e.length;t<s;t+=2){const a=(t+2)%s,l=e[a],c=e[1+a],u=l-r,f=c-n,d=Math.abs(u)<1e-7&&Math.abs(h)<1e-7&&Math.sign(f)===Math.sign(o),p=Math.abs(f)<1e-7&&Math.abs(o)<1e-7&&Math.sign(u)===Math.sign(h);(!d&&!p&&.001<Math.abs(u/h-f/o)||0==u&&0==f)&&i.push(r,n),r=l,n=c,h=u,o=f}6<=i.length&&i.length<e.length&&C33.Qh(e,i)}Ky(){return{cols:this.u_(),rows:this.f_(),points:this.r_.map(t=>t.map(t=>t.Ky()))}}zy(t){const e=this.u_(),i=this.f_();if(t.cols!==e||t.rows!==i)throw new Error("mesh data wrong size");const r=t.points;for(let s=0;s<i;++s){const n=r[s];for(let t=0;t<e;++t){const h=this.A_(t,s);h.zy(n[t])}}}}}{let GetFormatSpecifiers2=function(t,s){let e,i,r,n;switch(t){case"rgba8":e=s.RGBA8,i=s.RGBA,r=s.RGBA,n=s.UNSIGNED_BYTE;break;case"rgb8":e=s.RGB8,i=s.RGB,r=s.RGB,n=s.UNSIGNED_BYTE;break;case"rgba4":e=s.RGBA4,i=s.RGBA,r=s.RGBA,n=s.UNSIGNED_SHORT_4_4_4_4;break;case"rgb5_a1":e=s.RGB5_A1,i=s.RGBA,r=s.RGBA,n=s.UNSIGNED_SHORT_5_5_5_1;break;case"rgb565":e=s.RGB565,i=s.RGB,r=s.RGB,n=s.UNSIGNED_SHORT_5_6_5;break;default:throw new Error("invalid pixel format")}return{P_:e,O_:i,format:r,type:n}};GetFormatSpecifiers=GetFormatSpecifiers2;const C33=self.Bs,VALID_PIXEL_FORMATS=new Set(["rgba8","rgb8","rgba4","rgb5_a1","rgb565"]),VALID_SAMPLINGS=new Set(["nearest","bilinear","trilinear"]),VALID_MIPMAP_QUALITIES=new Set(["default","low","high"]),VALID_WRAP_MODES=new Set(["clamp-to-edge","repeat","mirror-repeat"]),CREATEFROM_DEFAULT_OPTIONS={x_:"clamp-to-edge",L_:"clamp-to-edge",D_:"trilinear",N_:0,F_:"rgba8",k_:!0,B_:"default",premultiplyAlpha:!0,W_:!1,width:-1,height:-1},UPDATE_DEFAULT_OPTIONS={premultiplyAlpha:!0,flipY:!1},allTextures=new Set;C33.T1.H_=class{constructor(t){this.kS=t,this.V_=null,this.am=0,this.lm=0,this.U_=!0,this.j_="clamp-to-edge",this.X_="clamp-to-edge",this.Y_="trilinear",this.q_=0,this.K_="rgba8",this.z_=!1,this.J_="default",this.P3=0}Q_(s,t){if(!("undefined"!=typeof HTMLImageElement&&s instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&s instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&s instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&s instanceof OffscreenCanvas||s instanceof ImageData||s instanceof ArrayBuffer||null===s))throw new Error("invalid texture source");if(t=Object.assign({},CREATEFROM_DEFAULT_OPTIONS,t),this.V_)throw new Error("already created texture");if(this.j_=t.x_,this.X_=t.L_,this.Y_=t.D_,this.q_=t.N_,this.K_=t.F_,this.z_=!!t.k_&&this.kS.bS(),this.J_=t.B_,!VALID_WRAP_MODES.has(this.j_)||!VALID_WRAP_MODES.has(this.X_))throw new Error("invalid wrap mode");if(!VALID_SAMPLINGS.has(this.Y_))throw new Error("invalid sampling");if(!VALID_PIXEL_FORMATS.has(this.K_))throw new Error("invalid pixel format");if(!VALID_MIPMAP_QUALITIES.has(this.J_))throw new Error("invalid mipmap quality");if(this.U_=!0,s instanceof ArrayBuffer||null===s||t.W_){if(this.am=t.width,this.lm=t.height,s instanceof ArrayBuffer&&s.byteLength!==this.am*this.lm*4)throw new Error("ArrayBuffer wrong size")}else this.am=s.width,this.lm=s.height;if(this.am<=0||this.lm<=0)throw new Error("invalid texture data size");if(t.W_){const o=C33.Wo(this.am,this.lm),a=o.getContext("2d");a.drawImage(s,0,0,this.am,this.lm),s=o}const e=C33.Xn(this.am)&&C33.Xn(this.lm),i=this.kS.Z_();if(this.am>i||this.lm>i)throw new Error("texture data exceeds maximum texture size");const r=this.kS.tT(),n=this.kS.sT(),h=(this.V_=r.createTexture(),r.bindTexture(r.TEXTURE_2D,this.V_),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),GetFormatSpecifiers2(this.K_,r));if(this.kS.eT()||e||!this.iT())if(2<=n){let t;t=this.z_?Math.floor(Math.log2(Math.max(this.am,this.lm))+1):1,r.texStorage2D(r.TEXTURE_2D,t,h.P_,this.am,this.lm),s instanceof ArrayBuffer?r.texSubImage2D(r.TEXTURE_2D,0,0,0,this.am,this.lm,h.format,h.type,new Uint8Array(s)):null!==s&&r.texSubImage2D(r.TEXTURE_2D,0,0,0,h.format,h.type,s)}else s instanceof ArrayBuffer?r.texImage2D(r.TEXTURE_2D,0,h.O_,this.am,this.lm,0,h.format,h.type,new Uint8Array(s)):null===s?r.texImage2D(r.TEXTURE_2D,0,h.O_,this.am,this.lm,0,h.format,h.type,null):r.texImage2D(r.TEXTURE_2D,0,h.O_,h.format,h.type,s);else{if(null===s)throw new Error("cannot pass null data when creating a NPOT tiled texture without NPOT support");if((s=s instanceof ArrayBuffer?new ImageData(new Uint8ClampedArray(s),this.am,this.lm):s)instanceof ImageData){const u=C33.Wo(this.am,this.lm),f=u.getContext("2d");f.putImageData(s,0,0),s=u}const l=C33.Wo(C33.Yn(this.am),C33.Yn(this.lm)),c=l.getContext("2d");c.imageSmoothingEnabled="nearest"!==this.Y_,c.drawImage(s,0,0,this.am,this.lm,0,0,l.width,l.height),r.texImage2D(r.TEXTURE_2D,0,h.O_,h.format,h.type,l)}null!==s&&this.rT(r),r.bindTexture(r.TEXTURE_2D,null),this.kS.nT(),this.P3=1,allTextures.add(this)}hT(t,s,e){if(e=Object.assign({},CREATEFROM_DEFAULT_OPTIONS,e),this.V_)throw new Error("already created texture");if(this.j_=e.x_,this.X_=e.L_,this.Y_=e.D_,this.K_=e.F_,this.z_=!!e.k_&&this.kS.bS(),this.J_=e.B_,!VALID_WRAP_MODES.has(this.j_)||!VALID_WRAP_MODES.has(this.X_))throw new Error("invalid wrap mode");if(!VALID_SAMPLINGS.has(this.Y_))throw new Error("invalid sampling");if(!VALID_PIXEL_FORMATS.has(this.K_))throw new Error("invalid pixel format");if(!VALID_MIPMAP_QUALITIES.has(this.J_))throw new Error("invalid mipmap quality");this.U_=!1,this.am=Math.floor(t),this.lm=Math.floor(s);const i=C33.Xn(this.am)&&C33.Xn(this.lm),r=this.kS.Z_();if(this.am<=0||this.lm<=0)throw new Error("invalid texture size");if(this.am>r||this.lm>r)throw new Error("texture exceeds maximum texture size");if(!this.kS.eT()&&this.iT()&&!i)throw new Error("non-power-of-two tiled textures not supported");const n=this.kS.tT(),h=this.kS.sT(),o=(this.V_=n.createTexture(),n.bindTexture(n.TEXTURE_2D,this.V_),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),GetFormatSpecifiers2(this.K_,n)),a=2<=h?o.P_:o.O_;n.texImage2D(n.TEXTURE_2D,0,a,this.am,this.lm,0,o.format,o.type,null),this.rT(n),n.bindTexture(n.TEXTURE_2D,null),this.kS.nT(),this.P3=1,allTextures.add(this)}oT(t){if("default"===this.J_)return this.U_?t.NICEST:t.FASTEST;if("low"===this.J_)return t.FASTEST;if("high"===this.J_)return t.NICEST;throw new Error("invalid mipmap quality")}iT(){return"clamp-to-edge"!==this.j_||"clamp-to-edge"!==this.X_}aT(t,s){if("clamp-to-edge"===s)return t.CLAMP_TO_EDGE;if("repeat"===s)return t.REPEAT;if("mirror-repeat"===s)return t.MIRRORED_REPEAT;throw new Error("invalid wrap mode")}rT(t){const s=C33.Xn(this.am)&&C33.Xn(this.lm);if(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,this.aT(t,this.j_)),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,this.aT(t,this.X_)),"nearest"===this.Y_)t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),this.z_=!1;else if(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),(s||this.kS.eT())&&this.z_){t.hint(t.GENERATE_MIPMAP_HINT,this.oT(t)),t.generateMipmap(t.TEXTURE_2D);const i="trilinear"===this.Y_&&!this.kS.vS();t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,i?t.LINEAR_MIPMAP_LINEAR:t.LINEAR_MIPMAP_NEAREST)}else t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),this.z_=!1;const e=this.kS.lT();e&&0<this.q_&&"nearest"!==this.Y_&&t.texParameterf(t.TEXTURE_2D,e.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(this.q_,this.kS.cT()))}uT(t,s){if(!("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas||t instanceof ImageData))throw new Error("invalid texture source");if(!this.V_||this.P3<=0)throw new Error("texture not created");if(this.U_)throw new Error("cannot update static texture");s=Object.assign({},UPDATE_DEFAULT_OPTIONS,s);const e=t.width||t.videoWidth,i=t.height||t.videoHeight,r=this.kS.sT(),n=this.kS.tT(),h=(n.bindTexture(n.TEXTURE_2D,this.V_),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!!s.flipY),GetFormatSpecifiers2(this.K_,n)),o=2<=r?h.P_:h.O_;try{if(this.am===e&&this.lm===i){const a=C33.Xn(this.am)&&C33.Xn(this.lm);n.texSubImage2D(n.TEXTURE_2D,0,0,0,h.format,h.type,t),(a||this.kS.eT())&&this.z_&&(n.hint(n.GENERATE_MIPMAP_HINT,this.oT(n)),n.generateMipmap(n.TEXTURE_2D))}else{this.am=e,this.lm=i;const l=C33.Xn(this.am)&&C33.Xn(this.lm);if(!this.kS.eT()&&this.iT()&&!l)throw new Error("non-power-of-two tiled textures not supported");n.texImage2D(n.TEXTURE_2D,0,o,h.format,h.type,t),(l||this.kS.eT())&&this.z_&&(n.hint(n.GENERATE_MIPMAP_HINT,this.oT(n)),n.generateMipmap(n.TEXTURE_2D))}}catch(t){console.error("Error updating WebGL texture: ",t)}n.bindTexture(n.TEXTURE_2D,null),this.kS.nT()}fT(){if(0<this.P3)throw new Error("texture still has references");if(!this.V_)throw new Error("already deleted texture");allTextures.delete(this);const t=this.kS.tT();t.deleteTexture(this.V_),this.V_=null}dT(){return!!this.V_}pT(){return this.V_}JS(){return this.kS}CT(){this.P3++}mT(){if(this.P3<=0)throw new Error("no more references");this.P3--}gT(){return this.P3}AC(){return this.am}OC(){return this.lm}ST(){return this.U_}yT(){let t=this.am*this.lm;switch(this.K_){case"rgba8":t*=4;break;case"rgb8":t*=3;break;case"rgba4":case"rgb5_a1":case"rgb565":t*=2}return this.z_&&(t+=Math.floor(t/3)),t}static Ry(){allTextures.clear()}static _T(){return allTextures.values()}}}{const C33=self.Bs,assert=self.assert,glMatrix=self.Es,vec32=glMatrix.Ps,mat42=glMatrix.Ms,VALID_SAMPLINGS=new Set(["nearest","bilinear","trilinear"]),DEFAULT_RENDERTARGET_OPTIONS={D_:"trilinear",alpha:!0,depth:!1,TT:!0,AT:!0,ET:0},allRenderTargets=new Set;C33.T1.IT=class{constructor(t){this.kS=t,this.wT=null,this.RT=null,this.V_=null,this.MT=null,this.am=0,this.lm=0,this.bT=!0,this.Y_="trilinear",this.GT=!0,this.vT=!1,this.PT=!0,this.OT=0,this.xT=mat42.create(),this.LT=0,this.DT=0,this.NT=0}FT(t,s,e){e=Object.assign({},DEFAULT_RENDERTARGET_OPTIONS,e);const i=this.kS.sT();if(this.V_||this.MT)throw new Error("already created render target");if(this.Y_=e.D_,this.GT=!!e.alpha,this.vT=!!e.depth,this.PT=!!e.TT,this.bT=!!e.AT,this.OT=e.ET,!VALID_SAMPLINGS.has(this.Y_))throw new Error("invalid sampling");if(0<this.OT&&(i<2||this.PT))throw new Error("invalid use of multisampling");if(i<2&&(this.PT=!0),this.am=t,this.lm=s,this.am<=0||this.lm<=0)throw new Error("invalid render target size");this.$T();const r=this.kS.tT();if(this.wT=r.createFramebuffer(),this.vT&&(this.RT=r.createFramebuffer()),this.PT){this.V_=this.kS.kT(this.am,this.lm,{D_:this.Y_,F_:this.GT?"rgba8":"rgb8",k_:!1});const h=this.V_.pT();r.bindFramebuffer(r.FRAMEBUFFER,this.wT),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,h,0),this.vT&&(r.bindFramebuffer(r.FRAMEBUFFER,this.RT),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,h,0))}else{this.MT=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,this.MT);const o=this.GT?r.RGBA8:r.RGB8;if(0<this.OT){const a=r.getInternalformatParameter(r.RENDERBUFFER,o,r.SAMPLES);if(a&&a[0]){const l=a[0];this.OT>l&&(this.OT=l)}else this.OT=0}0===this.OT?r.renderbufferStorage(r.RENDERBUFFER,o,this.am,this.lm):r.renderbufferStorageMultisample(r.RENDERBUFFER,this.OT,o,this.am,this.lm),r.bindFramebuffer(r.FRAMEBUFFER,this.wT),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,this.MT),this.vT&&(r.bindFramebuffer(r.FRAMEBUFFER,this.RT),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,this.MT)),r.bindRenderbuffer(r.RENDERBUFFER,null)}const n=this.kS.BT();this.vT&&n&&(r.bindFramebuffer(r.FRAMEBUFFER,this.wT),this.kS.WT()?r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,n,0):r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,n)),r.bindFramebuffer(r.FRAMEBUFFER,null),allRenderTargets.add(this)}HT(t,s){if(this.am!==t||this.lm!==s){this.am=t,this.lm=s,this.$T();const e=this.kS.tT(),i=(e.bindFramebuffer(e.FRAMEBUFFER,this.wT),this.V_?this.V_.uT(new ImageData(this.am,this.lm)):(e.bindRenderbuffer(e.RENDERBUFFER,this.MT),e.renderbufferStorage(e.RENDERBUFFER,this.GT?e.RGBA8:e.RGB8,this.am,this.lm),e.bindRenderbuffer(e.RENDERBUFFER,null)),this.kS.BT());this.vT&&i&&(this.kS.WT()?e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,i,0):e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,i)),e.bindFramebuffer(e.FRAMEBUFFER,null)}}fT(){if(!this.V_&&!this.MT)throw new Error("already deleted render target");allRenderTargets.delete(this);const t=this.kS.tT(),s=(this.V_?(t.bindFramebuffer(t.FRAMEBUFFER,this.wT),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,null,0),this.vT&&(t.bindFramebuffer(t.FRAMEBUFFER,this.RT),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,null,0)),this.kS.VT(this.V_),this.V_=null):this.MT&&(t.bindFramebuffer(t.FRAMEBUFFER,this.wT),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,null),this.vT&&(t.bindFramebuffer(t.FRAMEBUFFER,this.RT),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,null)),t.deleteRenderbuffer(this.MT),this.MT=null),t.bindFramebuffer(t.FRAMEBUFFER,null),2<=this.kS.sT()&&(t.bindFramebuffer(t.READ_FRAMEBUFFER,null),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null)),t.deleteFramebuffer(this.wT),this.vT&&t.deleteFramebuffer(this.RT),this.kS.UT());s.jT=null,this.wT=s.XT=null}$T(){this.kS.Y2(this.xT,this.am/this.lm),this.LT=this.kS.V2(),this.DT=this.kS.F2(),this.NT=this.kS.W2()}YT(){return this.wT}qT(){return this.RT}JS(){return this.kS}KT(){return this.V_}zT(){return this.kS.V2()===this.LT&&this.kS.F2()===this.DT&&this.kS.W2()===this.NT||this.$T(),this.xT}JT(){return"nearest"!==this.Y_}QT(){return this.GT}ZT(){return this.PT}tA(){return this.vT}AC(){return this.am}OC(){return this.lm}sA(){return this.bT}eA(){return this.OT}iA(){const t={D_:this.Y_,alpha:this.GT,TT:this.PT};return this.bT||(t.width=this.am,t.height=this.lm),t}rA(t){return"nearest"!==(t=Object.assign({},DEFAULT_RENDERTARGET_OPTIONS,t)).D_===this.JT()&&!!t.alpha===this.QT()&&!!t.depth===this.tA()&&!(2<=this.kS.sT()&&!!t.TT!==this.ZT())&&("number"==typeof t.width||"number"==typeof t.height?!this.sA()&&this.AC()===Math.floor(t.width)&&this.OC()===Math.floor(t.height):this.sA())}nA(){return this.V_?this.V_.pT():null}yT(){return this.V_?this.V_.yT():this.am*this.lm*(this.GT?4:3)}static async hA(t,s){const e=await t.oA(s,!0);return C33.Uo(e)}static Ry(){allRenderTargets.clear()}static aA(){return allRenderTargets.values()}static lA(t,s){for(const e of allRenderTargets)e.sA()&&e.HT(t,s)}}}{const C33=self.Bs,glMatrix=self.Es,vec32=glMatrix.Ps,mat42=glMatrix.Ms,RESERVED_UNIFORM_NAMES=new Set(["aPos","aTex","aPoints","matP","matMV","samplerFront","samplerBack","samplerDepth","destStart","destEnd","srcStart","srcEnd","srcOriginStart","srcOriginEnd","pixelSize","seconds","devicePixelRatio","layerScale","layerAngle","layoutStart","layoutEnd","color","color2_","pointTexStart","pointTexEnd","zElevation","tileSize","tileSpacing","outlineThickness","zNear","zFar"]);C33.T1.cA=class extends C33.T1.$S{static async uA(t,s){const e=t.tT(),i=s.src,r=s.fA,n=s.name,h=e.createShader(e.FRAGMENT_SHADER),o=(e.shaderSource(h,i),e.compileShader(h),e.createShader(e.VERTEX_SHADER)),a=(e.shaderSource(o,r),e.compileShader(o),e.createProgram()),l=(e.attachShader(a,h),e.attachShader(a,o),e.bindAttribLocation(a,0,"aPos"),e.bindAttribLocation(a,1,"aTex"),e.bindAttribLocation(a,2,"aPoints"),e.linkProgram(a),t.dA());if(l?await t.pA(()=>e.getProgramParameter(a,l.COMPLETION_STATUS_KHR)):await C33.Hh(5),!e.getShaderParameter(h,e.COMPILE_STATUS)){const u=e.getShaderInfoLog(h);throw e.deleteShader(h),e.deleteShader(o),e.deleteProgram(a),new Error("Error compiling fragment shader: "+u)}if(!e.getShaderParameter(o,e.COMPILE_STATUS)){const f=e.getShaderInfoLog(o);throw e.deleteShader(h),e.deleteShader(o),e.deleteProgram(a),new Error("Error compiling vertex shader: "+f)}if(!e.getProgramParameter(a,e.LINK_STATUS)){const d=e.getProgramInfoLog(a);throw e.deleteShader(h),e.deleteShader(o),e.deleteProgram(a),new Error("Error linking shader program: "+d)}const c=C33.cp(e.getProgramInfoLog(a)||"").trim();return c&&!C33.hp(c)&&console.info(`[WebGL] Shader program '${n}' compilation log: `,c),e.deleteShader(h),e.deleteShader(o),a}static async CA(t,s){const e=await C33.T1.cA.uA(t,s);return new C33.T1.cA(t,e,s)}constructor(t,s,e){super(t,e);const i=t.tT(),r=t.UT(),n=(t.IS(),i.useProgram(s),this.mA=i,this.Sy=s,this.gA="<default-device-transform>"===e.name,i.getAttribLocation(s,"aPos")),h=i.getAttribLocation(s,"aTex"),o=(this.SA=i.getAttribLocation(s,"aPoints"),-1!==n&&(i.bindBuffer(i.ARRAY_BUFFER,t.yA),i.vertexAttribPointer(n,t.AS(),i.FLOAT,!1,0,0),i.enableVertexAttribArray(n)),-1!==h&&(i.bindBuffer(i.ARRAY_BUFFER,t._A),i.vertexAttribPointer(h,2,i.FLOAT,!1,0,0),i.enableVertexAttribArray(h)),-1!==this.SA&&(i.bindBuffer(i.ARRAY_BUFFER,t.TA),i.vertexAttribPointer(this.SA,4,i.FLOAT,!1,0,0),i.enableVertexAttribArray(this.SA)),i.bindBuffer(i.ARRAY_BUFFER,null),this.AA=new C33.T1.EA(this,"matP","mat4"),this.IA=new C33.T1.EA(this,"matMV","mat4"),this.wA=new C33.T1.EA(this,"color","vec4"),this.RA=new C33.T1.EA(this,"samplerFront","sampler"),this.MA=new C33.T1.EA(this,"pointTexStart","vec2"),this.bA=new C33.T1.EA(this,"pointTexEnd","vec2"),this.GA=new C33.T1.EA(this,"zElevation","float"),this.vA=new C33.T1.EA(this,"tileSize","vec2"),this.PA=new C33.T1.EA(this,"tileSpacing","vec2"),this.OA=new C33.T1.EA(this,"color2_","vec4"),this.xA=new C33.T1.EA(this,"outlineThickness","float"),this.LA=new C33.T1.EA(this,"samplerBack","sampler"),this.DA=new C33.T1.EA(this,"samplerDepth","sampler"),this.NA=new C33.T1.EA(this,"destStart","vec2"),this.FA=new C33.T1.EA(this,"destEnd","vec2"),this.$A=new C33.T1.EA(this,"srcStart","vec2"),this.kA=new C33.T1.EA(this,"srcEnd","vec2"),this.BA=new C33.T1.EA(this,"srcOriginStart","vec2"),this.WA=new C33.T1.EA(this,"srcOriginEnd","vec2"),this.HA=new C33.T1.EA(this,"pixelSize","vec2"),this.VA=new C33.T1.EA(this,"seconds","float"),this.UA=new C33.T1.EA(this,"devicePixelRatio","float"),this.jA=new C33.T1.EA(this,"layerScale","float"),this.XA=new C33.T1.EA(this,"layerAngle","float"),this.YA=new C33.T1.EA(this,"layoutStart","vec2"),this.qA=new C33.T1.EA(this,"layoutEnd","vec2"),this.KA=new C33.T1.EA(this,"zNear","float"),this.zA=new C33.T1.EA(this,"zFar","float"),this.JA=!!(this.HA.QA()||this.VA.QA()||this.LA.QA()||this.NA.QA()||this.FA.QA()||this.$A.QA()||this.kA.QA()||this.BA.QA()||this.WA.QA()||this.UA.QA()||this.jA.QA()||this.XA.QA()||this.YA.QA()||this.qA.QA()),e.parameters||[]);this.ZA=[],this.KS=this.HA.QA()||this.$A.QA()||this.kA.QA()||this.BA.QA()||this.WA.QA(),this.tE=!1,this.sE=!1,this.wA.eE(1,1,1,1),this.OA.eE(1,1,1,1),this.RA.iE(0),this.LA.iE(1),this.DA.iE(2),this.MA.rE(0,0),this.bA.rE(1,1),this.GA.nE(0),this.vA.rE(0,0),this.PA.rE(0,0),this.NA.rE(0,0),this.FA.rE(1,1),this.$A.rE(0,0),this.kA.rE(0,0),this.BA.rE(0,0),this.WA.rE(0,0),this.HA.rE(0,0),this.UA.nE(1),this.KA.nE(t.F2()),this.zA.nE(t.W2()),this.jA.nE(1),this.XA.nE(0),this.VA.nE(0),this.YA.rE(0,0),this.qA.rE(0,0),this.xA.nE(1);for(const l of o){const c=l[0],u=l[2],f=new C33.T1.EA(this,c,u);"color"===u?f.hE(0,0,0):f.nE(0),this.ZA.push(f)}this.gA?this.oE(r.aE):(this.lE(r.aE,!0),this.cE(r.uE,!0));const a=r.fE;i.useProgram(a?a.Sy:null)}_n(){this.mA.deleteProgram(this.Sy),this.Sy=null,this.kS.Z2(this),this.mA=null,super._n()}dE(){return this.mA}pE(){return this.Sy}CE(){return this.ZA.length}mE(t){return t<0||t>=this.ZA.length?null:this.ZA[t].gE()}SE(e){for(let t=0,s=e.length;t<s;++t)if(!this.ZA[t].yE(e[t]))return!1;return!0}_E(e){for(let t=0,s=e.length;t<s;++t)this.ZA[t].TE(e[t])}AE(t,s,e,i,r,n,h,o,a,l){return!this.LA.QA()&&!(this.HA.QA()&&!this.HA.EE(r,n)||this.NA.QA()&&!this.NA.EE(t.Nl(),t.Fl())||this.FA.QA()&&!this.FA.EE(t.$l(),t.kl())||this.UA.QA()&&!this.UA.IE(h)||this.jA.QA()&&!this.jA.IE(o)||this.XA.QA()&&!this.XA.IE(a)||this.$A.QA()&&!this.$A.EE(s.Nl(),s.Fl())||this.kA.QA()&&!this.kA.EE(s.$l(),s.kl())||this.BA.QA()&&!this.BA.EE(e.Nl(),e.Fl())||this.WA.QA()&&!this.WA.EE(e.$l(),e.kl())||this.YA.QA()&&!this.YA.EE(i.Nl(),i.Fl())||this.qA.QA()&&!this.qA.EE(i.Fl(),i.kl())||this.VA.QA()&&!this.VA.IE(l))}wE(t,s,e,i,r,n,h,o,a,l){this.LA.QA()||(this.HA.QA()&&this.HA.RE(r,n),this.NA.QA()&&this.NA.RE(t.Nl(),t.Fl()),this.FA.QA()&&this.FA.RE(t.$l(),t.kl()),this.UA.QA()&&this.UA.ME(h),this.jA.QA()&&this.jA.ME(o),this.XA.QA()&&this.XA.ME(a),this.$A.QA()&&this.$A.RE(s.Nl(),s.Fl()),this.kA.QA()&&this.kA.RE(s.$l(),s.kl()),this.BA.QA()&&this.BA.RE(e.Nl(),e.Fl()),this.WA.QA()&&this.WA.RE(e.$l(),e.kl()),this.YA.QA()&&this.YA.RE(i.Nl(),i.Fl()),this.qA.QA()&&this.qA.RE(i.Fl(),i.kl()),this.VA.QA()&&this.VA.ME(l))}lE(t,s){this.tE&&!s||this.gA||(this.AA.QA()&&this.AA.bE(t),this.tE=!0)}GE(){this.tE=!1}cE(t,s){this.sE&&!s||this.gA||(this.IA.QA()&&this.IA.bE(t),this.sE=!0)}vE(){this.sE=!1}oE(t){if(!this.gA)throw new Error("not device transform shader");this.AA.bE(t);const s=this.kS,e=s.AC()/2,i=s.OC()/2,r=s.J2(e,i,s.P2(s.OC()),e,i,0,s.OC());this.IA.bE(r)}PE(t){this.wA.QA()&&this.wA.OE(t[0],t[1],t[2],t[3])}static xE(){return RESERVED_UNIFORM_NAMES}static LE(t){const s=t?"highmedp":"mediump";return["#ifdef GL_FRAGMENT_PRECISION_HIGH","#define highmedp highp","#else","#define highmedp mediump","#endif","attribute highp vec3 aPos;",`attribute ${s} vec2 aTex;`,`varying ${s} vec2 vTex;`,"uniform highp mat4 matP;","uniform highp mat4 matMV;","void main(void) {",` gl_Position = matP * matMV * vec4(aPos, 1.0);`,` vTex = aTex;`,"}"].join("\n")}static DE(t){const s=t?"highp":"mediump";return["#version 300 es","in highp vec3 aPos;",`in ${s} vec2 aTex;`,`out ${s} vec2 vTex;`,"uniform highp mat4 matP;","uniform highp mat4 matMV;","void main(void) {",` gl_Position = matP * matMV * vec4(aPos, 1.0);`,` vTex = aTex;`,"}"].join("\n")}static NE(){return["varying mediump vec2 vTex;","uniform lowp vec4 color;","uniform lowp sampler2D samplerFront;","void main(void) {","\tgl_FragColor = texture2D(samplerFront, vTex) * color;","}"].join("\n")}static FE(){return["#extension GL_EXT_frag_depth : enable","varying mediump vec2 vTex;","uniform lowp vec4 color;","uniform lowp sampler2D samplerFront;","void main(void) {","\tgl_FragColor = texture2D(samplerFront, vTex) * color;","\tgl_FragDepthEXT = (gl_FragColor.a == 0.0 ? 1.0 : gl_FragCoord.z);","}"].join("\n")}static $E(){return["#version 300 es","in mediump vec2 vTex;","out lowp vec4 outColor;","uniform lowp vec4 color;","uniform lowp sampler2D samplerFront;","void main(void) {","\toutColor = texture(samplerFront, vTex) * color;","\tgl_FragDepth = (outColor.a == 0.0 ? 1.0 : gl_FragCoord.z);","}"].join("\n")}static kE(){return["#ifdef GL_FRAGMENT_PRECISION_HIGH","#define highmedp highp","#else","#define highmedp mediump","#endif","varying highmedp vec2 vTex;","uniform lowp vec4 color;","uniform lowp sampler2D samplerFront;","uniform highmedp vec2 srcStart;","uniform highmedp vec2 pixelSize;","uniform highmedp vec2 tileSize;","uniform highmedp vec2 tileSpacing;","void main(void) {","\thighmedp vec2 tile = floor(vTex);","\thighmedp vec2 tex = fract(vTex);","\thighmedp vec2 tileOrigin = srcStart + tile * (tileSize + tileSpacing);","\thighmedp vec2 lowerBound = tileOrigin + pixelSize / 2.0;","\thighmedp vec2 upperBound = tileOrigin + tileSize - pixelSize / 2.0;","\tgl_FragColor = texture2D(samplerFront, clamp(tex, lowerBound, upperBound), -16.0) * color;","}"].join("\n")}static BE(){return["#extension GL_EXT_frag_depth : enable","#ifdef GL_FRAGMENT_PRECISION_HIGH","#define highmedp highp","#else","#define highmedp mediump","#endif","varying highmedp vec2 vTex;","uniform lowp vec4 color;","uniform lowp sampler2D samplerFront;","uniform highmedp vec2 srcStart;","uniform highmedp vec2 pixelSize;","uniform highmedp vec2 tileSize;","uniform highmedp vec2 tileSpacing;","void main(void) {","\thighmedp vec2 tile = floor(vTex);","\thighmedp vec2 tex = fract(vTex);","\thighmedp vec2 tileOrigin = srcStart + tile * (tileSize + tileSpacing);","\thighmedp vec2 lowerBound = tileOrigin + pixelSize / 2.0;","\thighmedp vec2 upperBound = tileOrigin + tileSize - pixelSize / 2.0;","\tgl_FragColor = texture2D(samplerFront, clamp(tex, lowerBound, upperBound), -16.0) * color;","\tgl_FragDepthEXT = (gl_FragColor.a == 0.0 ? 1.0 : gl_FragCoord.z);","}"].join("\n")}static WE(){return["#version 300 es","in highp vec2 vTex;","out lowp vec4 outColor;","uniform lowp vec4 color;","uniform lowp sampler2D samplerFront;","uniform highp vec2 srcStart;","uniform highp vec2 pixelSize;","uniform highp vec2 tileSize;","uniform highp vec2 tileSpacing;","void main(void) {","\thighp vec2 tile = floor(vTex);","\thighp vec2 tex = fract(vTex);","\thighp vec2 tileOrigin = srcStart + tile * (tileSize + tileSpacing);","\thighp vec2 lowerBound = tileOrigin + pixelSize / 2.0;","\thighp vec2 upperBound = tileOrigin + tileSize - pixelSize / 2.0;","\toutColor = texture(samplerFront, clamp(tex, lowerBound, upperBound), -16.0) * color;","\tgl_FragDepth = (outColor.a == 0.0 ? 1.0 : gl_FragCoord.z);","}"].join("\n")}static HE(t,s,e){let i="";return 2<=t?i="#version 300 es\n":(s&&(i="#extension GL_EXT_frag_depth : enable\n"),e&&(i+="#extension GL_EXT_shader_texture_lod : enable\n#extension GL_OES_standard_derivatives : enable\n")),i+` #ifdef GL_FRAGMENT_PRECISION_HIGH #define highmedp highp #else #define highmedp mediump #endif precision highmedp float; ${2<=t?"in":"varying"} vec2 vTex; ${2<=t?"out lowp vec4 outColor;":""} uniform lowp vec4 color; uniform lowp sampler2D samplerFront; uniform vec2 pixelSize; uniform vec2 tileSize; uniform vec2 tileSpacing; uniform float outlineThickness; const float PI = 3.1415926; lowp vec4 cospVec4(lowp vec4 a, lowp vec4 b, float x) { return (a + b + (a - b) * cos(x * PI)) / 2.0; } vec3 randVec3(vec2 seed) { return vec3(fract(sin(dot(seed.xy + vec2(0.1, 0.1), vec2(12.9898,78.233))) * 43758.5453), fract(sin(dot(seed.yx + vec2(0.1, 0.1), vec2(12.9898,-78.233))) * 43758.5453), fract(sin(dot(seed.xy + vec2(0.1, 0.1), vec2(-12.9898,-78.233))) * 43758.5453)); } lowp vec4 sampleTile(vec2 tile, vec2 uv, vec2 ddx, vec2 ddy) { vec2 posRandom = tileSize; float angleRandom = outlineThickness; vec3 rand = (randVec3(floor(tile + 0.5)) - 0.5) * 2.0; float angle = angleRandom * rand.z * PI; float sin_a = sin(angle); float cos_a = cos(angle); float aspect = pixelSize.x / pixelSize.y; vec2 mid = tile + vec2(0.5, 0.5); vec2 dp = uv - mid; dp.x /= aspect; vec2 r = vec2(dp.x * cos_a - dp.y * sin_a, dp.y * cos_a + dp.x * sin_a); r.x *= aspect; vec2 p = mid + r + (posRandom * rand.xy / 2.0); ${2<=t?"return textureGrad(samplerFront, p, ddx, ddy);":""} ${t<2&&e?"return texture2DGradEXT(samplerFront, p, ddx, ddy);":""} ${t<2&&!e?"return texture2D(samplerFront, p);":""} } void main(void) { ${t<2?"lowp vec4 outColor;":""} float blendMarginX = tileSpacing.x; float blendMarginY = tileSpacing.y; vec2 tile = floor(vTex); vec2 tex = fract(vTex); vec2 ddx = ${2<=t||e?"dFdx(vTex)":"vec2(0.0, 0.0)"}; vec2 ddy = ${2<=t||e?"dFdy(vTex)":"vec2(0.0, 0.0)"}; vec4 curTile = sampleTile(tile, vTex, ddx, ddy); bool inLeftMargin = (tex.x < blendMarginX); bool inRightMargin = (tex.x > 1.0 - blendMarginX); bool inTopMargin = (tex.y < blendMarginY); bool inBottomMargin = (tex.y > 1.0 - blendMarginY); if (inLeftMargin) { lowp vec4 leftTile = sampleTile(tile + vec2(-1.0, 0.0), vTex, ddx, ddy); float leftMix = (tex.x / (blendMarginX * 2.0)) + 0.5; lowp vec4 leftMixedTile = cospVec4(leftTile, curTile, leftMix); if (inTopMargin) { lowp vec4 topTile = sampleTile(tile + vec2(0.0, -1.0), vTex, ddx, ddy); lowp vec4 topLeftTile = sampleTile(tile + vec2(-1.0, -1.0), vTex, ddx, ddy); lowp vec4 topLeftMixedTile = cospVec4(topLeftTile, topTile, leftMix); outColor = cospVec4(topLeftMixedTile, leftMixedTile, (tex.y / (blendMarginY * 2.0)) + 0.5); } else if (inBottomMargin) { lowp vec4 bottomTile = sampleTile(tile + vec2(0.0, 1.0), vTex, ddx, ddy); lowp vec4 bottomLeftTile = sampleTile(tile + vec2(-1.0, 1.0), vTex, ddx, ddy); lowp vec4 bottomLeftMixedTile = cospVec4(bottomLeftTile, bottomTile, leftMix); outColor = cospVec4(leftMixedTile, bottomLeftMixedTile, (tex.y - (1.0 - blendMarginY)) / (blendMarginY * 2.0)); } else { outColor = leftMixedTile; } } else if (inRightMargin) { lowp vec4 rightTile = sampleTile(tile + vec2(1.0, 0.0), vTex, ddx, ddy); float rightMix = (tex.x - (1.0 - blendMarginX)) / (blendMarginX * 2.0); lowp vec4 rightMixedTile = cospVec4(curTile, rightTile, rightMix); if (inTopMargin) { lowp vec4 topTile = sampleTile(tile + vec2(0.0, -1.0), vTex, ddx, ddy); lowp vec4 topRightTile = sampleTile(tile + vec2(1.0, -1.0), vTex, ddx, ddy); lowp vec4 topRightMixedTile = cospVec4(topTile, topRightTile, rightMix); outColor = cospVec4(topRightMixedTile, rightMixedTile, (tex.y / (blendMarginY * 2.0)) + 0.5); } else if (inBottomMargin) { lowp vec4 bottomTile = sampleTile(tile + vec2(0.0, 1.0), vTex, ddx, ddy); lowp vec4 bottomRightTile = sampleTile(tile + vec2(1.0, 1.0), vTex, ddx, ddy); lowp vec4 bottomRightMixedTile = cospVec4(bottomTile, bottomRightTile, rightMix); outColor = cospVec4(rightMixedTile, bottomRightMixedTile, (tex.y - (1.0 - blendMarginY)) / (blendMarginY * 2.0)); } else { outColor = rightMixedTile; } } else if (inTopMargin) { lowp vec4 topTile = sampleTile(tile + vec2(0.0, -1.0), vTex, ddx, ddy); outColor = cospVec4(topTile, curTile, (tex.y / (blendMarginY * 2.0)) + 0.5); } else if (inBottomMargin) { lowp vec4 bottomTile = sampleTile(tile + vec2(0.0, 1.0), vTex, ddx, ddy); outColor = cospVec4(curTile, bottomTile, (tex.y - (1.0 - blendMarginY)) / (blendMarginY * 2.0)); } else { outColor = curTile; } outColor *= color; ${t<2?"gl_FragColor = outColor;":""} ${2<=t?"gl_FragDepth = (outColor.a == 0.0 ? 1.0 : gl_FragCoord.z);":""} ${t<2&&s?"gl_FragDepthEXT = (outColor.a == 0.0 ? 1.0 : gl_FragCoord.z);":""} } `}static VE(){return["attribute vec4 aPoints;","varying float pointOpacity;","uniform float zElevation;","uniform mat4 matP;","uniform mat4 matMV;","void main(void) {","\tgl_Position = matP * matMV * vec4(aPoints.xy, zElevation, 1.0);","\tgl_PointSize = aPoints.z;","\tpointOpacity = aPoints.w;","}"].join("\n")}static UE(){return["#version 300 es","in vec4 aPoints;","out float pointOpacity;","uniform float zElevation;","uniform mat4 matP;","uniform mat4 matMV;","void main(void) {","\tgl_Position = matP * matMV * vec4(aPoints.xy, zElevation, 1.0);","\tgl_PointSize = aPoints.z;","\tpointOpacity = aPoints.w;","}"].join("\n")}static jE(){return["uniform lowp sampler2D samplerFront;","varying lowp float pointOpacity;","uniform mediump vec2 pointTexStart;","uniform mediump vec2 pointTexEnd;","uniform lowp vec4 color;","void main(void) {","\tmediump vec2 pointTexMin = min(pointTexStart, pointTexEnd);","\tmediump vec2 pointTexMax = max(pointTexStart, pointTexEnd);","\tmediump vec2 pointCoord = (pointTexEnd.x > pointTexStart.x ? gl_PointCoord : vec2(1.0 - gl_PointCoord.y, gl_PointCoord.x));","\tgl_FragColor = texture2D(samplerFront, mix(pointTexMin, pointTexMax, pointCoord)) * color * pointOpacity;","}"].join("\n")}static XE(){return["#extension GL_EXT_frag_depth : enable","uniform lowp sampler2D samplerFront;","varying lowp float pointOpacity;","uniform mediump vec2 pointTexStart;","uniform mediump vec2 pointTexEnd;","uniform lowp vec4 color;","void main(void) {","\tmediump vec2 pointTexMin = min(pointTexStart, pointTexEnd);","\tmediump vec2 pointTexMax = max(pointTexStart, pointTexEnd);","\tmediump vec2 pointCoord = (pointTexEnd.x > pointTexStart.x ? gl_PointCoord : vec2(1.0 - gl_PointCoord.y, gl_PointCoord.x));","\tgl_FragColor = texture2D(samplerFront, mix(pointTexMin, pointTexMax, pointCoord)) * color * pointOpacity;","\tgl_FragDepthEXT = (gl_FragColor.a == 0.0 ? 1.0 : gl_FragCoord.z);","}"].join("\n")}static YE(){return["#version 300 es","uniform lowp sampler2D samplerFront;","in lowp float pointOpacity;","uniform mediump vec2 pointTexStart;","uniform mediump vec2 pointTexEnd;","uniform lowp vec4 color;","out lowp vec4 outColor;","void main(void) {","\tmediump vec2 pointTexMin = min(pointTexStart, pointTexEnd);","\tmediump vec2 pointTexMax = max(pointTexStart, pointTexEnd);","\tmediump vec2 pointCoord = (pointTexEnd.x > pointTexStart.x ? gl_PointCoord : vec2(1.0 - gl_PointCoord.y, gl_PointCoord.x));","\toutColor = texture(samplerFront, mix(pointTexMin, pointTexMax, pointCoord)) * color * pointOpacity;","\tgl_FragDepth = (outColor.a == 0.0 ? 1.0 : gl_FragCoord.z);","}"].join("\n")}static qE(){return["uniform lowp vec4 color;","void main(void) {","\tgl_FragColor = color;","}"].join("\n")}static KE(){return["precision lowp float;","varying mediump vec2 vTex;","uniform vec4 color;","uniform vec4 color2_;","vec3 fromLinear(vec3 linearRGB)","{","\tbvec3 cutoff = lessThan(linearRGB, vec3(0.0031308));","\tvec3 higher = vec3(1.055) * pow(abs(linearRGB), vec3(1.0/2.4)) - vec3(0.055);","\tvec3 lower = linearRGB * vec3(12.92);","\treturn mix(higher, lower, vec3(cutoff));","}","vec3 toLinear(vec3 sRGB)","{","\tbvec3 cutoff = lessThan(sRGB, vec3(0.04045));","\tvec3 higher = pow(abs((sRGB + vec3(0.055))/vec3(1.055)), vec3(2.4));","\tvec3 lower = sRGB/vec3(12.92);","\treturn mix(higher, lower, vec3(cutoff));","}","void main(void) {","\tvec3 linearGrad = mix(toLinear(color.rgb), toLinear(color2_.rgb), vTex.x);","\tfloat a = mix(color.a, color2_.a, vTex.x);","\tgl_FragColor = vec4(fromLinear(linearGrad) * a, a);","}"].join("\n")}static zE(){return["#ifdef GL_FRAGMENT_PRECISION_HIGH","#define highmedp highp","#else","#define highmedp mediump","#endif","precision lowp float;","varying highmedp vec2 vTex;","uniform vec4 color;","void main(void) {",` highmedp float grad = vTex.x / (1.0 - vTex.y);`,` gl_FragColor = color * (1.0 - (cos(grad * 3.141592653589793) + 1.0) / 2.0);`,"}"].join("\n")}static JE(){return["varying mediump vec2 vTex;","uniform lowp vec4 color;","void main(void) {","\tlowp float f = 1.0 - abs(vTex.y - 0.5) * 2.0;","\tgl_FragColor = color * f;","}"].join("\n")}static QE(){return["varying mediump vec2 vTex;","uniform lowp vec4 color;","void main(void) {","\tmediump vec2 diff = vTex - vec2(0.5, 0.5);","\tmediump vec2 diffSq = diff * diff;","\tmediump float f = step(diffSq.x + diffSq.y, 0.25);","\tgl_FragColor = color * f;","}"].join("\n")}static ZE(){return["varying mediump vec2 vTex;","uniform lowp vec4 color;","uniform mediump vec2 pixelSize;","uniform mediump float outlineThickness;","void main(void) {","\tmediump vec2 diff = vTex - vec2(0.5, 0.5);","\tmediump vec2 diffSq = diff * diff;","\tmediump float distSq = diffSq.x + diffSq.y;","\tmediump vec2 norm = normalize(diff);","\tmediump vec2 halfNorm = norm * 0.5;","\tmediump float innerF = step(distSq, 0.25);","\tmediump vec2 innerEdge = halfNorm - pixelSize * norm * outlineThickness;","\tmediump vec2 innerEdgeSq = innerEdge * innerEdge;","\tmediump float outerF = step(innerEdgeSq.x + innerEdgeSq.y, distSq);","\tgl_FragColor = color * innerF * outerF;","}"].join("\n")}static tI(){return["varying mediump vec2 vTex;","uniform lowp vec4 color;","uniform mediump vec2 pixelSize;","void main(void) {","\tmediump vec2 diff = vTex - vec2(0.5, 0.5);","\tmediump vec2 diffSq = diff * diff;","\tmediump vec2 norm = normalize(diff);","\tmediump vec2 halfNorm = norm * 0.5;","\tmediump vec2 halfNormSq = halfNorm * halfNorm;","\tmediump vec2 innerEdge = halfNorm - pixelSize * norm;","\tmediump vec2 innerEdgeSq = innerEdge * innerEdge;","\tmediump float f = smoothstep(halfNormSq.x + halfNormSq.y, innerEdgeSq.x + innerEdgeSq.y, diffSq.x + diffSq.y);","\tgl_FragColor = color * f;","}"].join("\n")}static sI(){return["varying mediump vec2 vTex;","uniform lowp vec4 color;","uniform mediump vec2 pixelSize;","uniform mediump float outlineThickness;","void main(void) {","\tmediump vec2 diff = vTex - vec2(0.5, 0.5);","\tmediump vec2 diffSq = diff * diff;","\tmediump float distSq = diffSq.x + diffSq.y;","\tmediump vec2 norm = normalize(diff);","\tmediump vec2 halfNorm = norm * 0.5;","\tmediump vec2 halfNormSq = halfNorm * halfNorm;","\tmediump vec2 pxNorm = pixelSize * norm;","\tmediump vec2 innerEdge1 = halfNorm - pxNorm;","\tmediump vec2 innerEdge1Sq = innerEdge1 * innerEdge1;","\tmediump float innerF = smoothstep(halfNormSq.x + halfNormSq.y, innerEdge1Sq.x + innerEdge1Sq.y, distSq);","\tmediump vec2 innerEdge2 = halfNorm - pxNorm * outlineThickness;","\tmediump vec2 innerEdge2Sq = innerEdge2 * innerEdge2;","\tmediump vec2 innerEdge3 = halfNorm - pxNorm * (outlineThickness + 1.0);","\tmediump vec2 innerEdge3Sq = innerEdge3 * innerEdge3;","\tmediump float outerF = smoothstep(innerEdge3Sq.x + innerEdge3Sq.y, innerEdge2Sq.x + innerEdge2Sq.y, distSq);","\tgl_FragColor = color * innerF * outerF;","}"].join("\n")}}}{const C33=self.Bs,glMatrix=self.Es,mat42=glMatrix.Ms,TYPE_SIZES=new Map([["float",1],["percent",1],["sampler",1],["vec2",2],["vec3",3],["color",3],["vec4",4],["mat4",16]]);C33.T1.EA=class{constructor(t,s,e){if(!TYPE_SIZES.has(e))throw new Error("invalid uniform type");this.i_=t,this.mA=this.i_.dE(),this.En=s,this.vf=e,this.eI="color"===this.vf,this.iI=this.mA.getUniformLocation(this.i_.pE(),s),this.rI=!!this.iI;const i=TYPE_SIZES.get(e);this.nI=new Float32Array(i),this.hI=new Float32Array(i)}_n(){this.i_=null,this.mA=null,this.iI=null}QA(){return this.rI}gE(){return this.vf}oI(){return this.eI}nE(t){this.QA()&&(this.nI[0]=t,this.hI.set(this.nI),this.mA.uniform1f(this.iI,t))}iE(t){this.QA()&&(this.nI[0]=t,this.hI.set(this.nI),this.mA.uniform1i(this.iI,t))}rE(t,s){this.QA()&&(this.nI[0]=t,this.nI[1]=s,this.hI.set(this.nI),this.mA.uniform2f(this.iI,t,s))}hE(t,s,e){this.QA()&&(this.nI[0]=t,this.nI[1]=s,this.nI[2]=e,this.hI.set(this.nI),this.mA.uniform3f(this.iI,t,s,e))}eE(t,s,e,i){this.QA()&&(this.nI[0]=t,this.nI[1]=s,this.nI[2]=e,this.nI[3]=i,this.hI.set(this.nI),this.mA.uniform4f(this.iI,t,s,e,i))}aI(t){t=Math.fround(t);const s=this.nI;s[0]!==t&&(s[0]=t,this.mA.uniform1f(this.iI,t))}lI(t){const s=this.nI;s[0]!==t&&this.mA.uniform1i(this.iI,s[0]=t)}cI(t,s){t=Math.fround(t),s=Math.fround(s);const e=this.nI;e[0]===t&&e[1]===s||(e[0]=t,e[1]=s,this.mA.uniform2f(this.iI,t,s))}uI(t,s,e){t=Math.fround(t),s=Math.fround(s),e=Math.fround(e);const i=this.nI;i[0]===t&&i[1]===s&&i[2]===e||(i[0]=t,i[1]=s,i[2]=e,this.mA.uniform3f(this.iI,t,s,e))}OE(t,s,e,i){t=Math.fround(t),s=Math.fround(s),e=Math.fround(e),i=Math.fround(i);const r=this.nI;r[0]===t&&r[1]===s&&r[2]===e&&r[3]===i||(r[0]=t,r[1]=s,r[2]=e,r[3]=i,this.mA.uniform4f(this.iI,t,s,e,i))}bE(t){const s=this.nI;mat42.W(s,t)||(C33.Xh(s,t,0),this.mA.uniformMatrix4fv(this.iI,!1,t))}yE(t){const s=this.hI;return this.oI()?s[0]===Math.fround(t.Sa())&&s[1]===Math.fround(t.ya())&&s[2]===Math.fround(t._a()):s[0]===Math.fround(t)}TE(t){const s=this.hI;this.oI()?(s[0]=t.Sa(),s[1]=t.ya(),s[2]=t._a()):s[0]=t}IE(t){return this.hI[0]===Math.fround(t)}EE(t,s){const e=this.hI;return e[0]===Math.fround(t)&&e[1]===Math.fround(s)}ME(t){this.hI[0]=t}RE(t,s){const e=this.hI;e[0]=t,e[1]=s}}}{const C33=self.Bs,glMatrix=self.Es,vec42=glMatrix.Os,mat42=glMatrix.Ms,BATCH_NULL=0,BATCH_QUAD=1,BATCH_SETTEXTURE=2,BATCH_SETCOLOR=3,BATCH_SETBLEND=4,BATCH_SETVIEWPORT=5,BATCH_SETPROJECTION=6,BATCH_SETMODELVIEW=7,BATCH_SETRENDERTARGET=8,BATCH_CLEARSURFACE=9,BATCH_POINTS=10,BATCH_SETPROGRAM=11,BATCH_SETPROGRAMPARAMETERS=12,BATCH_SETPROGRAMCUSTOMPARAMETERS=13,BATCH_INVALIDATEFRAMEBUFFER=14,BATCH_SETPOINTTEXCOORDS=15,BATCH_SETTILEMAPINFO=16,BATCH_BLITFRAMEBUFFER=17,BATCH_STARTQUERY=18,BATCH_ENDQUERY=19,BATCH_SETELLIPSEPARAMS=20,BATCH_SETGRADIENTCOLOR=21,BATCH_CLEARDEPTH=22,BATCH_SETDEPTHENABLED=23,BATCH_SETDEPTHSAMPLINGENABLED=24,BATCH_COPLANAR_STARTSTENCILPASS=25,BATCH_COPLANAR_STARTCOLORPASS=26,BATCH_COPLANAR_RESTORE=27,BATCH_SET_SCISSOR=28,BATCH_SETTILERANDOMIZATIONINFO=29;C33.T1.fI=class{constructor(t){this.renderer=t,this.uE=mat42.create(),this.aE=mat42.create(),this.jT=null,this.XT=null,this.dI=!1,this.pI=vec42.R(1,1,1,1),this.fE=null,this.CI=new C33.Rect,this.clearColor=C33.yn(C33.Zo,0,0,0,0)}},C33.T1.mI=class{constructor(t){const s=new ArrayBuffer(96);this.vf=0,this.gI=t,this.mA=t.renderer.tT(),this.SI=0,this.yI=0,this._I=null,this.TI=new Float32Array(s,0,16),this.AI=new Float32Array(s,64,4),this.EI=new Float32Array(s,80,4),this.II=[]}wI(t,s){this.vf=BATCH_QUAD,this.SI=t,this.yI=s}RI(){const t=this.mA;t.drawElements(t.TRIANGLES,this.yI,t.UNSIGNED_SHORT,this.SI)}MI(t){this.vf=BATCH_SETTEXTURE,this._I=t}bI(){const t=this.mA,s=this._I;t.bindTexture(t.TEXTURE_2D,s?s.pT():null)}GI(t){this.vf=BATCH_SETCOLOR,t.Ea(this.AI,0)}vI(){const t=this.AI,s=this.gI;vec42.I(s.pI,t),s.fE.PE(t)}OI(t){this.vf=BATCH_SETGRADIENTCOLOR,t.Ea(this.AI,0)}xI(){const t=this.AI,s=this.gI.fE;s.OA.QA()&&s.OA.OE(t[0],t[1],t[2],t[3])}LI(t,s){this.vf=BATCH_SETBLEND,this.SI=t,this.yI=s}DI(){this.mA.blendFunc(this.SI,this.yI)}NI(t,s,e,i){this.vf=BATCH_SETVIEWPORT;const r=this.AI;r[0]=t,r[1]=s,r[2]=e,r[3]=i}FI(){const t=this.AI;this.mA.viewport(t[0],t[1],t[2],t[3])}$I(t){this.vf=BATCH_SETPROJECTION,mat42.I(this.TI,t)}kI(){const t=this.gI,e=t.renderer.q1,i=t.fE,r=this.TI;for(let t=0,s=e.length;t<s;++t){const n=e[t];n===i?n.lE(r,!0):n.GE()}mat42.I(t.aE,r)}BI(t){this.vf=BATCH_SETMODELVIEW,mat42.I(this.TI,t)}WI(){const t=this.gI,e=t.renderer.q1,i=t.fE,r=this.TI;for(let t=0,s=e.length;t<s;++t){const n=e[t];n===i?n.cE(r,!0):n.vE()}mat42.I(t.uE,r)}HI(t){this.vf=BATCH_SETRENDERTARGET,this._I=t}VI(){const t=this.mA,s=this._I,e=this.gI;s?(e.jT=s.YT(),e.XT=s.qT(),e.dI&&e.XT?t.bindFramebuffer(t.FRAMEBUFFER,e.XT):t.bindFramebuffer(t.FRAMEBUFFER,e.jT)):(e.jT=null,e.XT=null,t.bindFramebuffer(t.FRAMEBUFFER,null))}UI(t){this.vf=BATCH_CLEARSURFACE,t.Ea(this.TI,0)}jI(t,s,e,i){this.vf=BATCH_CLEARSURFACE;const r=this.TI;r[0]=t,r[1]=s,r[2]=e,r[3]=i}XI(){const t=this.mA,s=this.TI,e=this.gI,i=e.clearColor,r=s[0],n=s[1],h=s[2],o=s[3];i.Ma(r,n,h,o)||(t.clearColor(r,n,h,o),i.oa(r,n,h,o)),t.clear(t.COLOR_BUFFER_BIT)}YI(t){this.vf=BATCH_SETPOINTTEXCOORDS,t.Ea(this.TI,0)}qI(){const t=this.TI;this.gI.CI.set(t[0],t[1],t[2],t[3])}KI(t,s){this.vf=BATCH_POINTS,this.SI=t,this.yI=1,this.TI[0]=s}zI(){const t=this.mA,s=this.gI,e=s.renderer,i=e.J1,r=(t.useProgram(i.Sy),i.lE(s.aE,!1),i.cE(s.uE,!1),s.CI),n=(i.MA.QA()&&i.MA.cI(r.Nl(),r.Fl()),i.bA.QA()&&i.bA.cI(r.$l(),r.kl()),this.TI[0]);if(i.GA.QA()&&i.GA.aI(n),i.wA.QA()){const h=s.pI;i.wA.OE(h[0],h[1],h[2],h[3])}t.drawArrays(t.POINTS,this.SI/4,this.yI),t.useProgram(s.fE.Sy)}JI(t){this.vf=BATCH_SETPROGRAM,this._I=t}QI(){const t=this.mA,s=this.gI,e=this._I;if(s.fE=e,t.useProgram(e.Sy),e.lE(s.aE,!1),e.cE(s.uE,!1),e.wA.QA()){const i=s.pI;e.wA.OE(i[0],i[1],i[2],i[3])}}ZI(){this.vf=BATCH_SETPROGRAMPARAMETERS}ew(){const t=this.gI.fE,s=this.mA,e=this.TI,i=this.AI,r=this.EI;if(t.LA.QA()){const n=this.gI.renderer,h=this._I;n.iw!==h&&(s.activeTexture(s.TEXTURE1),s.bindTexture(s.TEXTURE_2D,h?h.pT():null),n.iw=h,s.activeTexture(s.TEXTURE0))}t.HA.QA()&&t.HA.cI(e[0],e[1]),t.NA.QA()&&t.NA.cI(e[2],e[3]),t.FA.QA()&&t.FA.cI(e[4],e[5]),t.UA.QA()&&t.UA.aI(this.yI),t.jA.QA()&&t.jA.aI(e[6]),t.XA.QA()&&t.XA.aI(e[7]),t.$A.QA()&&t.$A.cI(e[12],e[13]),t.kA.QA()&&t.kA.cI(e[14],e[15]),t.BA.QA()&&t.BA.cI(r[0],r[1]),t.WA.QA()&&t.WA.cI(r[2],r[3]),t.YA.QA()&&t.YA.cI(i[0],i[1]),t.qA.QA()&&t.qA.cI(i[2],i[3]),t.VA.QA()&&t.VA.aI(this.SI)}rw(){this.vf=BATCH_SETPROGRAMCUSTOMPARAMETERS}hw(){const t=this.gI.fE,e=t.ZA,i=this.II;for(let t=0,s=e.length;t<s;++t){const r=e[t],n=i[t];r.oI()?r.uI(n.Sa(),n.ya(),n._a()):r.aI(n)}}ow(t){this.vf=BATCH_INVALIDATEFRAMEBUFFER,this._I=t}aw(){const t=this.mA,s=this._I,e=this.gI.jT;s!==e&&t.bindFramebuffer(t.FRAMEBUFFER,s),t.invalidateFramebuffer(t.FRAMEBUFFER,[t.COLOR_ATTACHMENT0]),s!==e&&t.bindFramebuffer(t.FRAMEBUFFER,e)}lw(t,s,e){this.vf=BATCH_BLITFRAMEBUFFER;const i=this.TI,r=this.gI.renderer,n=(i[0]=t.AC(),i[1]=t.OC(),i[2]=(s||r).AC(),i[3]=(s||r).OC(),i[4]=t.JT()?1:0,i[5]="stretch"===e,this.II);C33.qh(n),n.push(t.YT()),n.push(s?s.YT():null)}uw(){const t=this.TI,s=this.II,e=this.mA,i=t[0],r=t[1],n=t[2],h=t[3],o=0!==t[4],a=0!==t[5],l=s[0],c=s[1];if(e.bindFramebuffer(e.READ_FRAMEBUFFER,l),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,c),a)e.blitFramebuffer(0,0,i,r,0,0,n,h,e.COLOR_BUFFER_BIT,o?e.LINEAR:e.NEAREST);else{const u=Math.min(i,n),f=Math.min(r,h),d=Math.max(r-h,0),p=Math.max(h-r,0);e.blitFramebuffer(0,d,u,f+d,0,p,u,f+p,e.COLOR_BUFFER_BIT,e.NEAREST)}}fw(t){this.vf=BATCH_STARTQUERY,this._I=t}pw(){this._I.Cw(),this._I=null}mw(t){this.vf=BATCH_ENDQUERY,this._I=t}gw(){this._I.Sw(),this._I=null}yw(t,s,e){this.vf=BATCH_SETELLIPSEPARAMS;const i=this.TI;i[0]=t,i[1]=s,i[2]=e}_w(){const t=this.gI.fE,s=this.TI;t.HA.QA()&&t.HA.cI(s[0],s[1]),t.xA.QA()&&t.xA.aI(s[2])}Tw(t,s,e,i,r,n,h){this.vf=BATCH_SETTILEMAPINFO;const o=this.TI;t.Ea(o,0),o[4]=1/s,o[5]=1/e,o[6]=i/s,o[7]=r/e,o[8]=n/s,o[9]=h/e}Aw(){const t=this.gI.fE,s=this.TI;t.$A.QA()&&t.$A.cI(s[0],s[1]),t.HA.QA()&&t.HA.cI(s[4],s[5]),t.vA.QA()&&t.vA.cI(s[6],s[7]),t.PA.QA()&&t.PA.cI(s[8],s[9])}Ew(t,s,e,i,r,n,h){this.vf=BATCH_SETTILERANDOMIZATIONINFO;const o=this.TI;o[0]=1/t,o[1]=1/s,o[2]=e,o[3]=i,o[4]=r,o[5]=n,o[6]=h}Iw(){const t=this.gI.fE,s=this.TI;t.HA.QA()&&t.HA.cI(s[0],s[1]),t.vA.QA()&&t.vA.cI(s[2],s[3]),t.xA.QA()&&t.xA.aI(s[4]),t.PA.QA()&&t.PA.cI(s[5],s[6])}ww(t){this.vf=BATCH_CLEARDEPTH,this.SI=t?1:0}Rw(){const t=this.mA,s=0!==this.SI;s||t.depthMask(!0),t.clear(t.DEPTH_BUFFER_BIT),s||t.depthMask(!1)}Mw(t){this.vf=BATCH_SETDEPTHENABLED,this.SI=t?1:0}bw(){const t=this.mA;0===this.SI?(t.disable(t.DEPTH_TEST),t.depthMask(!1)):(t.enable(t.DEPTH_TEST),t.depthMask(!0))}Gw(t){this.vf=BATCH_SETDEPTHSAMPLINGENABLED,this.SI=t?1:0}Pw(){const t=this.mA,s=this.gI,e=s.renderer,i=0!==this.SI;s.dI=i,t.activeTexture(t.TEXTURE2),i?(s.XT&&t.bindFramebuffer(t.FRAMEBUFFER,s.XT),t.bindTexture(t.TEXTURE_2D,e.BT())):(t.bindTexture(t.TEXTURE_2D,null),s.XT&&t.bindFramebuffer(t.FRAMEBUFFER,s.jT)),t.activeTexture(t.TEXTURE0)}Ow(){this.vf=BATCH_COPLANAR_STARTSTENCILPASS}xw(){const t=this.mA;t.clear(t.STENCIL_BUFFER_BIT),t.enable(t.STENCIL_TEST),t.stencilFunc(t.ALWAYS,1,1),t.stencilOp(t.KEEP,t.KEEP,t.REPLACE),t.colorMask(!1,!1,!1,!1)}Lw(){this.vf=BATCH_COPLANAR_STARTCOLORPASS}Dw(){const t=this.mA;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,1,1),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}Nw(){this.vf=BATCH_COPLANAR_RESTORE}Fw(){const t=this.mA;t.disable(t.STENCIL_TEST)}$w(t,s,e,i,r){this.vf=BATCH_SET_SCISSOR,this.SI=t?1:0;const n=this.TI;n[0]=s,n[1]=e,n[2]=i,n[3]=r}kw(){const t=this.mA,s=this.TI;1===this.SI?(t.enable(t.SCISSOR_TEST),t.scissor(s[0],s[1],s[2],s[3])):t.disable(t.SCISSOR_TEST)}Bw(){switch(this.vf){case 1:return void this.RI();case 2:return void this.bI();case 3:return void this.vI();case 4:return void this.DI();case 5:return void this.FI();case 6:return void this.kI();case 7:return void this.WI();case 8:return void this.VI();case 9:return void this.XI();case 10:return void this.zI();case 11:return void this.QI();case 12:return void this.ew();case 13:return void this.hw();case 14:return void this.aw();case 15:return void this.qI();case 16:return void this.Aw();case 17:return void this.uw();case 18:return void this.pw();case 19:return void this.gw();case 20:return void this._w();case 21:return void this.xI();case 22:return void this.Rw();case 23:return void this.bw();case 24:return void this.Pw();case 25:return void this.xw();case 26:return void this.Dw();case 27:return void this.Fw();case 28:return void this.kw();case 29:return void this.Iw()}}}}{let fillOrStrokeRect2=function(t,s,e,i,r,n){s?t.strokeRect(e,i,r,n):t.fillRect(e,i,r,n)},ptToPx2=function(t){return t*(4/3)},getOffsetParam2=function(t,s){t=t.trim();const e=parseFloat(t);return isFinite(e)?t.endsWith("%")?s*e/100:e:0};fillOrStrokeRect=fillOrStrokeRect2,ptToPx=ptToPx2,getOffsetParam=getOffsetParam2;const C33=self.Bs,MAX_TEXTURE_SIZE=4096,EXTRA_LINE_HEIGHT=4,GENERIC_FONT_FAMILIES=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]),DEFAULT_OPTS={timeout:60},tempColor=new C33.Zo(0,0,0,1),VALID_HORIZ_ALIGNMENTS=new Set(["left","center","right"]),VALID_VERT_ALIGNMENTS=new Set(["top","center","bottom"]),VALID_WORD_WRAP_MODES=new Set(["word","cjk","character"]),VALID_TEXT_DIRECTIONS=new Set(["ltr","rtl"]),allRendererTexts=new Set;C33.FontManager&&C33.FontManager.addEventListener("fontload",t=>{const s=t.font.pf();for(const e of allRendererTexts)(e.Ww()||C33.wr(e.Hw(),s))&&e.Vw()});let didCheckFoundBoundingBoxSupport=!1,supportsFontBoundingBoxMeasurements=!1;C33.T1.FS=class{constructor(t,s){s=Object.assign({},DEFAULT_OPTS,s),this.kS=t,this.Uw="Arial",this.jw=16,this.Xw=1,this.Yw=0,this.qw=!1,this.Kw=!1,this.zw="black",this.Jw=!1,this.gC=null,this.Qw=!0,this.Zw=null,this.tR=new Set,this.sR="left",this.eR="top",this.Ef="",this.iR=null,this.rR=C33.yn(C33.CC),this.nR="word",this.hR="ltr",this.oR=!1,this.aR=!1,this.lR=!1,this.cR=-1,this.uR=0,this.fR=0,this.dR=0,this.am=0,this.lm=0,this.pR=1,this.CR=null,this.mR=null,this.gR=null,this.SR=null,this.yR=-1,this._R=-1,this.TR="",this.AR="",this.ER="",this.IR=1,this.wR=1,this.RR=t=>this.MR(t),this.V_=null,this.bR=new C33.Rect,this.GR=1,this.vR=new C33.Id(()=>{this.PR(),this.OR(8,8)},s.timeout),this.xR=null,this.LR=!1,allRendererTexts.add(this)}_n(){this.Zw=null,this.tR.clear(),this.gC=null,this.iR=null,this.CR=null,this.mR=null,this.gR=null,this.SR=null,this.RR=null,this.vR._n(),this.xR=null,this.PR(),this.rR.gu(),this.rR=null,this.kS=null,this.LR=!0,allRendererTexts.delete(this)}DR(){this.lR=!0}NR(){this.DR(),this.aR=!0}Vw(){this.NR(),this.oR=!0}FR(t){if(this.Jw!==(t=!!t)){this.Jw=t;const s=this.Jw?"alphabetic":"top";this.mR&&(this.mR.textBaseline=s),this.gR&&(this.gR.textBaseline=s),this.Vw()}}Ww(){return this.Jw}_C(t){this.gC!==t&&(this.gC=t,this.rR._C(t),this.gC&&this.gC.h1()&&this.gC.o1().then(()=>this.DR()),this.Vw())}$R(t){this.Qw!==(t=!!t)&&(this.Qw=t,this.DR())}kR(t){this.Uw!==(t=t||"serif")&&(this.Uw=t,this.Vw())}Hw(){return this.Uw}BR(t){this.jw!==(t=t<.1?.1:t)&&(this.jw=t,this.Vw())}WR(){return this.jw}HR(t){this.Xw!==t&&(this.Xw=t,this.Vw())}VR(t){this.Yw!==t&&(this.Yw=t,this.NR())}UR(){return this.Yw}jR(t){this.qw!==(t=!!t)&&(this.qw=t,this.Vw())}YR(){return this.qw}qR(t){this.Kw!==(t=!!t)&&(this.Kw=t,this.Vw())}KR(){return this.Kw}zR(t){t=Math.floor(t),this.cR!==t&&(this.cR=t,this.DR())}JR(){return this.cR}QR(t,s){let e=[];(this.qw||s.Mm("b"))&&e.push("bold"),(this.Kw||s.Mm("i"))&&e.push("italic");const i=s.Rm("size"),r=(i?parseFloat(i.param):this.jw)*this.Xw;e.push(t?r+"pt":r*this.ZR()+"pt");let n=this.Uw,h=s.Rm("font");return h&&h.param&&(n=h.param,this.Zw)&&!this.tR.has(n)&&(this.Zw(n),this.tR.add(n)),n&&(GENERIC_FONT_FAMILIES.has(n)?e.push(n):e.push('"'+n+'"')),e.join(" ")}wy(t){t instanceof C33.Zo&&(t=t.Da()),this.zw!==t&&(this.zw=t,this.DR())}tM(t,s,e){tempColor.aa(t,s,e),this.wy(tempColor)}sM(t){if(!VALID_HORIZ_ALIGNMENTS.has(t))throw new Error("invalid horizontal alignment");this.sR!==t&&(this.sR=t,this.NR())}eM(){return this.sR}iM(t){if(!VALID_VERT_ALIGNMENTS.has(t))throw new Error("invalid vertical alignment");this.eR!==t&&(this.eR=t,this.NR())}rM(){return this.eR}nM(t){if(!VALID_WORD_WRAP_MODES.has(t))throw new Error("invalid word wrap mode");this.nR!==t&&(this.nR=t,this.Vw())}hM(){return this.nR}oM(t){if(!VALID_TEXT_DIRECTIONS.has(t))throw new Error("invalid text direction");this.hR!==t&&(this.hR=t,this.mR&&(this.mR.direction=this.hR),this.gR&&(this.gR.direction=this.hR),this.Vw())}aM(){return this.hR}Rf(t){this.Ef!==t&&(this.Ef=t,this.Vw())}lM(){return this.Ef}ZR(){return this.GR*this.pR*self.devicePixelRatio}cM(n,h,o){if(void 0===o&&(o=1),!(n<=0||this.fR===n&&this.dR===h&&this.pR===o)){let t=this.fR,s=(this.fR=n,this.dR=h,this.pR=o,self.devicePixelRatio),e=(this.am=this.fR*this.pR*s,this.lm=this.dR*this.pR*s,Math.max(this.am,this.lm)),i=Math.min(this.kS.Z_(),MAX_TEXTURE_SIZE),r=1;i<e&&(r=i/e,this.am=Math.min(this.am*r,i),this.lm=Math.min(this.lm*r,i)),this.GR=r,this.fR!==t?this.Vw():this.NR()}}AC(){return this.am}OC(){return this.lm}uM(){return this.pR}fM(){return this.dM(),this.rR.nm()}pM(){return this.dM(),this.rR.hm()+this.rR.yC()*(this.Yw+EXTRA_LINE_HEIGHT)-this.Yw}CM(){this.dM();let t=0;for(const s of this.rR.SC())for(const e of s.$C())t+=e.kC();return t}KT(){return this.vR.vd(),this.mM(),this.V_}gM(t,s){this.dM();const e=this.ZR(),i=this.rR.SC();for(const r of i){const n=r.LC()*e;if(s>=r.Em()-r.OC()*e+n&&s<r.Em()+n)for(const h of r.$C())if(t>=h.Tm()&&t<h.Tm()+h.AC()*e)return h}return null}*SM(t){this.dM();const s=this.rR.SC();for(const e of s)for(const i of e.$C()){const r=i.Rm("tag");r&&C33.wr(r.param,t)&&(yield i)}}yM(t,s){for(const e of this.SM(t)){if(0===s)return e;--s}return null}_M(t){let s=0;for(const e of this.SM(t))++s;return s}mM(){this.V_&&!this.lR&&!this.aR&&!this.oR||this.LR||this.am<=0||this.lm<=0||(this.lR=!1,this.TM())}TM(){this.LR||(this.dM(),this.OR(Math.max(C33.Yn(Math.ceil(this.am)),128),Math.max(C33.Yn(Math.ceil(this.lm)),64)),this.AM(),this.EM(),this.vR.vd())}OR(t,s){this.CR||(this.CR=C33.Wo(16,16));let e=!1;this.yR===t&&this._R===s||(this.yR=t,this._R=s,this.CR.width=t,this.CR.height=s,e=!0),this.mR||(this.mR=this.CR.getContext("2d"),e=!0),e?(this.mR.textBaseline=this.Jw?"alphabetic":"top",this.mR.direction=this.hR,this.mR.font=this.TR,this.mR.fillStyle=this.ER,this.mR.strokeStyle=this.ER,this.mR.globalAlpha=this.IR,this.mR.lineWidth=this.wR):this.mR.clearRect(0,0,t,s)}IM(){this.gR||(this.gR=C33.Wo(16,16).getContext("2d"),this.SR=C33.Wo(16,16).getContext("2d"),this.gR.textBaseline=this.Jw?"alphabetic":"top",this.SR.textBaseline="top",this.gR.direction=this.hR,this.SR.direction=this.hR)}wM(t){this.AR!==t&&(this.AR=t,this.gR.font=t,this.SR.font=t)}RM(){if(!didCheckFoundBoundingBoxSupport){didCheckFoundBoundingBoxSupport=!0,this.IM();const t=this.gR.measureText("test");supportsFontBoundingBoxMeasurements="number"==typeof t.fontBoundingBoxAscent&&"number"==typeof t.fontBoundingBoxDescent}return supportsFontBoundingBoxMeasurements}dM(){this.MM(),this.bM()}MM(){this.oR&&(this.IM(),!this.Jw||this.iR&&this.iR.toString()===this.Ef||(this.iR=new C33.kr(this.Ef,{zp:!0})),this.rR.CC(this.Jw?this.iR.oC():this.Ef,this.RR,this.fR,this.nR,0),this.oR=!1)}bM(){this.aR&&(this.GM(),this.aR=!1)}MR(t){let s=t.bC()?t.XC().join(""):" ",e=(this.wM(this.QR(!0,t)),t.Rm("size")),i=(e?parseFloat(e.param):this.jw)*this.Xw,r=this.gR.measureText(s),n=0;if(this.Jw&&this.RM()){const h=this.SR.measureText(s);n=r.fontBoundingBoxAscent-h.fontBoundingBoxAscent}return{width:r.width,height:ptToPx2(i),fontBoundingBoxAscent:r.fontBoundingBoxAscent||0,fontBoundingBoxDescent:r.fontBoundingBoxDescent||0,MC:n}}vM(t){this.TR!==t&&(this.TR=t,this.mR.font=t)}PM(t){this.ER!==t&&(this.ER=t,this.mR.fillStyle=t,this.mR.strokeStyle=t)}OM(t){this.IR!==t&&(this.IR=t,this.mR.globalAlpha=t)}xM(t){this.wR!==t&&(this.wR=t,this.mR.lineWidth=t)}GM(){let i=this.ZR(),r=(EXTRA_LINE_HEIGHT+this.Yw)*i,n=0,h=this.rR.SC();if(0!==h.length){for(const s of h){s._m(NaN),s.Am(NaN);for(const o of s.$C())o._m(NaN),o.Am(NaN)}let t=this.Jw&&this.RM(),e=h[0].OC()*i;if("center"===this.eR){const a=h.reduce((t,s)=>t+s.OC()*i+r,0)-r;n=Math.max(this.lm/2-a/2,0),t&&(e=h[0].DC()*i)}else if("bottom"===this.eR){const l=h.reduce((t,s)=>t+s.OC()*i+r,0)-this.Yw*i,c=t?h.at(-1).LC()*i:0;n=this.lm-l-c-2}for(let t=0,s=h.length;t<s;++t){const u=h[t],f=u.OC()*i,d=n;if(this.Jw){if(n+=0===t?e:f,0<t&&n>this.lm-EXTRA_LINE_HEIGHT*i)break}else if(0<t&&n>=this.lm-f)break;0<=d&&this.LM(u,n,i),this.Jw||(n+=f),n+=r}}}LM(t,s,e){let i=0;"center"===this.sR?i=Math.floor((this.am-t.AC()*e)/2):"right"===this.sR&&(i=this.am-t.AC()*e),t._m(i),t.Am(s);for(const r of"ltr"===this.hR?t.$C():t.Sm())this.DM(r,i,s,e),i+=r.AC()*e}DM(t,s,e,i){const r=t.Rm("offsetx"),n=(s+=r?getOffsetParam2(r.param,t.OC())*i:0,t.Rm("offsety"));if(e+=n?getOffsetParam2(n.param,t.OC())*i:0,t.vC()){const h=t.Rm("iconoffsety");e+=h?getOffsetParam2(h.param,t.OC())*i:.2*t.OC()*i}t._m(s),t.Am(e)}AM(){this.mR.imageSmoothingEnabled=this.Qw,this.mR.imageSmoothingQuality="high",this.uR=0;const t=this.ZR(),s=this.rR.SC();for(const e of s)this.NM(e,t)}NM(t,s){const e=t.Tm(),i=t.Em();if(Number.isFinite(e)&&Number.isFinite(i))for(const r of"ltr"===this.hR?t.$C():t.Sm())this.FM(r,s,t.OC())}FM(h,o,a){const l=this.mR,c=h.Tm(),u=h.Em();if(Number.isFinite(c)&&Number.isFinite(u)){let t=a/16,s=h.AC()*o,e=h.OC()*o,i=h.OC()/16,r=(EXTRA_LINE_HEIGHT+this.Yw)*o,n=h.bC()?h.XC():null;if(-1!==this.cR){if(this.uR>=this.cR)return;h.bC()&&this.uR+n.length>this.cR&&(n=n.slice(0,this.cR-this.uR),s=this.MR(h).width*o),this.uR+=h.kC()}const f=h.Rm("background"),d=h.Mm("u"),p=h.Mm("s");if((!h.bC()||!C33.op(n)||f||d||p)&&!h.Mm("hide")){const C=h.Rm("color"),m=h.Rm("opacity"),g=(this.OM(m?parseFloat(m.param)/100:1),f&&(this.PM(f.param),l.fillRect(c,u-e,s,e+r)),h.Rm("linethickness")),S=g?parseFloat(g.param):1,y=h.Mm("stroke");if(y&&this.xM(.5*i*S*this.ZR()),h.bC()){const _=n.join("");if(this.vM(this.QR(!1,h)),!y){this.xM(.5*i*S*this.ZR());const T=h.Rm("outlineback");T&&(this.PM(T.param),this.$M(!0,_,c,u,s))}if(this.PM(C?C.param:this.zw),this.$M(y,_,c,u,s),!y){this.xM(.5*i*S*this.ZR());const A=h.Rm("outline");A&&(this.PM(A.param),this.$M(!0,_,c,u,s))}}else if(h.vC()&&0<h.AC()){const E=h.Nm(this.gC);E&&l.drawImage(E,c,u-e,s,e)}if(this.PM(C?C.param:this.zw),d&&fillOrStrokeRect2(l,y,c,u+o*t,s,o*t*S),p){const I=u-e/4,w=o*i,R=I+w/2;l.fillRect(c,R-w*S/2,s,w*S)}}}}$M(t,s,e,i,r){"rtl"===this.hR&&(e+=r),t?"Gecko"===C33.pe._e?this.mR.strokeText(s,e,i,r):this.mR.strokeText(s,e,i):"Gecko"===C33.pe._e?this.mR.fillText(s,e,i,r):this.mR.fillText(s,e,i)}EM(){this.kS.kM()||(this.V_||(this.V_=this.kS.kT(this.CR.width,this.CR.height,{k_:!0,B_:"high"})),this.kS.BM(this.CR,this.V_),this.bR.set(0,0,this.am/this.V_.AC(),this.lm/this.V_.OC()),this.xR&&this.xR())}WM(){return this.bR}PR(){this.V_&&(this.kS.kM()||this.kS.VT(this.V_),this.V_=null)}static Ry(){for(const t of allRendererTexts)t.PR()}static HM(){return allRendererTexts.values()}}}{const C33=self.Bs;class WebGLRealTimeElapsedQuery{constructor(t){this.mA=t.tT(),this.VM=t.sT(),this.UM=t.jM(),this.XM=null,this.Gd=!1,this.YM=!1,this.qM=0,1===this.VM?this.XM=this.UM.createQueryEXT():this.XM=this.mA.createQuery()}_n(){this.KM(),this.mA=null,this.UM=null,this.YM=!1}KM(){this.XM&&(1===this.VM?this.UM.deleteQueryEXT(this.XM):this.mA.deleteQuery(this.XM),this.XM=null)}Cw(){if(this.Gd)throw new Error("query already active");1===this.VM?this.UM.beginQueryEXT(this.UM.TIME_ELAPSED_EXT,this.XM):this.mA.beginQuery(this.UM.TIME_ELAPSED_EXT,this.XM),this.Gd=!0}Sw(){if(!this.Gd)throw new Error("query not active");1===this.VM?this.UM.endQueryEXT(this.UM.TIME_ELAPSED_EXT):this.mA.endQuery(this.UM.TIME_ELAPSED_EXT),this.Gd=!1}zM(){if(this.XM&&!this.YM&&!this.Gd){let t;t=1===this.VM?this.UM.getQueryObjectEXT(this.XM,this.UM.QUERY_RESULT_AVAILABLE_EXT):this.mA.getQueryParameter(this.XM,this.mA.QUERY_RESULT_AVAILABLE);const s=this.mA.getParameter(this.UM.GPU_DISJOINT_EXT);t&&!s&&(1===this.VM?this.qM=this.UM.getQueryObjectEXT(this.XM,this.UM.QUERY_RESULT_EXT):this.qM=this.mA.getQueryParameter(this.XM,this.mA.QUERY_RESULT),this.qM/=1e9,this.YM=!0),(t||s)&&this.KM()}}JM(){return this.YM}QM(){if(this.YM)return this.qM;throw new Error("no result available")}}C33.T1.ZM=class{constructor(t){this.kS=t,this.E2=t.wS(),this.Gd=!1,this.tb=null,this.sb=!1,this.eb=null,this.ib=[]}_n(){for(const t of this.ib)t instanceof WebGLRealTimeElapsedQuery&&t._n();C33.qh(this.ib),this.tb=null,this.eb=null,this.kS=null}Cw(){if(this.Gd)throw new Error("query already active");const t=this.kS.rb();0<t.length?(this.sb=!0,this.tb=t.at(-1),this.tb.nb(),this.tb.ib.push(this)):(this.sb=!1,this.tb=null),this.Gd=!0,t.push(this),this.hb()}Sw(){if(!this.Gd)throw new Error("query not active");const t=this.kS.rb().pop();if(t!==this)throw new Error("can only end most nested query");this.Gd=!1,this.nb(),this.tb&&(this.tb.hb(),this.tb=null)}hb(){this.eb=C33.yn(WebGLRealTimeElapsedQuery,this.kS),this.ib.push(this.eb),this.eb.Cw()}nb(){this.eb.Sw(),this.eb=null}zM(){for(const t of this.ib)t.zM()}ob(){return this.sb}JM(){return this.ib.every(t=>t.JM())}QM(){return this.ib.reduce((t,s)=>t+s.QM(),0)}wS(){return this.E2}}}{const C33=self.Bs;C33.T1.lb=class{constructor(t,s=1e3){this.kS=t,this.cb=s,this.ub=[],this.kS.fb(this)}_n(){this.gu(),this.kS.pb(this),this.kS=null}gu(){for(const t of this.ub)t._n();C33.qh(this.ub)}Cb(){const t=new C33.T1.ZM(this.kS);if(this.ub.push(t),this.ub.length>this.cb){const s=this.ub.shift();s._n()}return t}mb(t){for(const s of this.ub){if(s.wS()>=t)return;if(s.ob())return;s.zM()}}gb(t,s){if(s<=t)return NaN;let e=0;for(const i of this.ub){if(i.wS()>=s)break;if(!(i.wS()<t)){if(!i.JM())return NaN;e+=i.QM()}}return e}Sb(e){for(let t=0,s=this.ub.length;t<s;++t){const i=this.ub[t];if(!(i.wS()<e))return void(0<t&&this.ub.splice(0,t));i._n()}}}}{let CheckPendingPolls2=function(){pollRafId=-1;for(const t of pendingPolls)t._b()&&(t.resolve(),pendingPolls.delete(t));0<pendingPolls.size&&(pollRafId=self.requestAnimationFrame(CheckPendingPolls2))},C33=(CheckPendingPolls=CheckPendingPolls2,self.Bs),assert=self.assert,glMatrix=self.Es,vec32=glMatrix.Ps,vec42=glMatrix.Os,mat42=glMatrix.Ms,DEFAULT_WEBGLRENDERER_OPTS={powerPreference:"default",Tb:!0,alpha:!1,depth:!1,Ab:!1,Eb:2,failIfMajorPerformanceCaveat:!1},VALID_POWER_PREFERENCES=new Set(["default","low-power","high-performance"]),MAX_VERTICES=8e3,MAX_INDICES=MAX_VERTICES/2*3,MAX_POINTS=8e3,LAST_POINT=MAX_POINTS-4,PARTIAL_TEXTURE_UPLOAD_CHUNK_SIZE=262144,defaultTexCoordsQuad=new C33.dc(0,0,1,0,1,1,0,1),tmpProjection=mat42.create(),tmpModelView=mat42.create(),tmpQuad=new C33.dc,tmpRect=new C33.Rect,loseContextExtension=null,pendingPolls=(C33.isDebug&&(self.Ib=function(){loseContextExtension?loseContextExtension.loseContext():console.warn("WEBGL_lose_context not supported")},self.wb=function(){loseContextExtension?loseContextExtension.restoreContext():console.warn("WEBGL_lose_context not supported")}),new Set),pollRafId=-1;C33.T1.Rb=class extends C33.T1.B1{constructor(t,s){if(super(s),s=Object.assign({},DEFAULT_WEBGLRENDERER_OPTS,s),!VALID_POWER_PREFERENCES.has(s.powerPreference))throw new Error("invalid power preference");let e={alpha:!!s.alpha,depth:!1,antialias:!1,powerPreference:s.powerPreference,failIfMajorPerformanceCaveat:!!s.failIfMajorPerformanceCaveat},i=null,r=0;if(2<=s.Eb&&(i=t.getContext("webgl2",e),r=2),i||(i=t.getContext("webgl",e),r=1),!i)throw new Error("renderer-unavailable (could not get WebGL context)");this.mA=i,this.Mb=i.getContextAttributes(),this.bb=i.getParameter(i.VERSION),this.VM=r,this.Gb=vec42.create(),this.vb=!1,this.Pb=mat42.create(),this.Ob=!!s.depth,this.xb=!(!s.depth||!s.Ab),this.Lb=this.Ob,this.Db=!1,this.Nb=null,this.Fb=!0,this.$b=0,this.kb=0,this.yA=null,this._A=null,this.Bb=null,this.TA=null,this.Wb=new Float32Array(MAX_VERTICES*this.AS()),this.Hb=new Uint16Array(MAX_INDICES),this.Vb=new Float32Array(2*MAX_VERTICES),this.Ub=new Float32Array(4*MAX_POINTS),this.jb=0,this.Xb=0,this.Yb=0,this.qb=0,this.Kb=null,this.zb=null,this.Jb=[],this.Qb=0,this.Zb=0,this.tG=null,this.sG=0,this.gI=C33.yn(C33.T1.fI,this),this.eG=C33.yn(C33.Zo,1,1,1,1),this.iG=null,this.iw=null,this.rG=0,this.nG=0,this.hG=new C33.Rect,this.oG=C33.yn(C33.Rect,0,0,-1,-1),this.aG=0,this.lG=-1,this.cG=0,this.uG=0,this.fG=0,this.dG="(unavailable)",this.pG="(unavailable)",this.CG=[],this.mG=!1,this.gG=null,this.SG=null,this.yG=null,this._G=null,this.TG=null,this.AG=null,this.EG=0,this.IG=!!s.Tb,this.UM=null,this.wG=new Set,this.MG=[],this.R2(this.Hb)}PS(){return!0}async G2(){super.G2();const t=this.mA,s=this.AS(),e=(this.eG.oa(1,1,1,1),this.iG=null,this.iw=null,this.jb=0,this.Yb=0,this.qb=MAX_VERTICES*s-4*s,C33.qh(this.Jb),this.Qb=0,this.Zb=0,this.Kb=null,this.tG=null,this.hG.set(0,0,1,1),this.sG=0,this.gI),i=(e.fE=null,e.jT=null,e.XT=null,vec42.set(e.pI,1,1,1,1),e.clearColor.oa(0,0,0,0),e.CI.set(0,0,1,1),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.rG=t.ONE,this.nG=t.ONE_MINUS_SRC_ALPHA,this.bG(t),t.disable(t.CULL_FACE),t.disable(t.STENCIL_TEST),t.disable(t.DITHER),this.Ob?(t.enable(t.DEPTH_TEST),t.depthMask(!0),t.depthFunc(t.LEQUAL)):(t.disable(t.DEPTH_TEST),t.depthMask(!1)),this.Lb=this.Ob,this.Db=!1,this.TA=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.TA),t.bufferData(t.ARRAY_BUFFER,this.Ub.byteLength,t.DYNAMIC_DRAW),this.yA=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.yA),t.bufferData(t.ARRAY_BUFFER,this.Wb.byteLength,t.DYNAMIC_DRAW),this._A=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this._A),t.bufferData(t.ARRAY_BUFFER,this.Vb.byteLength,t.DYNAMIC_DRAW),this.Bb=t.createBuffer(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.Bb),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.Hb,t.STATIC_DRAW),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),this.lG=t.getParameter(t.MAX_TEXTURE_SIZE),t.getParameter(t.ALIASED_POINT_SIZE_RANGE)),r=(this.cG=i[0],this.uG=i[1],t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT)),n=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT),h=(this.fG=r&&n?Math.min(r.precision,n.precision):0,2048<this.uG&&(this.uG=2048),this.CG=t.getSupportedExtensions(),t.getExtension("WEBGL_debug_renderer_info"));if(h&&(this.dG=t.getParameter(h.UNMASKED_VENDOR_WEBGL),this.pG=t.getParameter(h.UNMASKED_RENDERER_WEBGL)),this.gG=t.getExtension("KHR_parallel_shader_compile"),C33.isDebug&&(loseContextExtension=t.getExtension("WEBGL_lose_context")),this.IG&&(1===this.sT()?this.UM=t.getExtension("EXT_disjoint_timer_query"):this.UM=t.getExtension("EXT_disjoint_timer_query_webgl2")||t.getExtension("EXT_disjoint_timer_query")),this.SG=t.getExtension("EXT_texture_filter_anisotropic"),this.SG?this.EG=t.getParameter(this.SG.MAX_TEXTURE_MAX_ANISOTROPY_EXT):this.EG=0,this.sT()<2&&this.Ob&&this.xb&&(this.yG=t.getExtension("WEBGL_depth_texture"),!this.yG))throw new Error("no depth texture support");this.sT()<2&&(this._G=t.getExtension("EXT_frag_depth"),this.TG=t.getExtension("OES_standard_derivatives"),this.AG=t.getExtension("EXT_shader_texture_lod"));let o=C33.T1.cA,a=o.LE(!1),l=o.NE(),c=a,u=o.jE(),f=o.VE(),d=o.kE(),p=o.LE(!0),C=!1;this.Ob&&(this.sT()<2?this._G&&(l=o.FE(),u=o.XE(),d=o.BE(),C=!0):(c=o.DE(),l=o.$E(),u=o.YE(),f=o.UE(),d=o.WE(),p=o.DE(!0)));const m=o.HE(this.sT(),C,this.TG&&this.AG),g=2<=this.sT()?o.DE():a,S=[[l,c,"<default>"],[l,c,"<default-device-transform>"],[u,f,"<point>"],[o.qE(),a,"<fill>"],[o.KE(),a,"<lineargradient>"],[o.zE(),a,"<penumbra>"],[o.QE(),a,"<hardellipse>"],[o.ZE(),a,"<hardellipseoutline>"],[o.tI(),a,"<smoothellipse>"],[o.sI(),a,"<smoothellipseoutline>"],[o.JE(),a,"<smoothline>"],[d,p,"<tilemap>"],[m,g,"<tilerandomization>"]],y=await Promise.all(S.map(t=>this.GG({src:t[0],fA:t[1],name:t[2]})));this.z1=y[0],this.zb=y[1],this.J1=y[2],this.t2=y[3],this.s2=y[4],this.e2=y[5],this.i2=y[6],this.n2=y[7],this.h2=y[8],this.o2=y[9],this.a2=y[10],this.Q1=y[11],this.Z1=y[12],this.eg()}async GG(t){const s=await C33.T1.cA.CA(this,t);return this.Q2(s),s}vG(){this.Kb=null}cM(t,s,e){if(this.am!==t||this.lm!==s||e){this.IS();const i=this.mA,r=this.gI;this.am=t,this.lm=s,this.PG(0,0,t,s),this.Y2(this.Pb,t/s),this.OG(this.Pb),this.zb&&(i.useProgram(this.zb.pE()),this.zb.oE(this.V1),this.Kb=this.zb,this.gI.fE=this.zb),i.bindTexture(i.TEXTURE_2D,null),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,null),i.activeTexture(i.TEXTURE0),this.iG=null,this.iw=null,this.Ob&&this.Fb&&this.xG(this.am,this.lm),this.tG&&this.tG.HT(this.am,this.lm),i.bindFramebuffer(i.FRAMEBUFFER,null),this.tG=null,r.jT=null,r.XT=null}}xG(t,s){const e=this.mA;this.Nb&&this.$b===t&&this.kb===s||(this.xb?(this.Nb&&e.deleteTexture(this.Nb),this.Nb=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.Nb),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),2<=this.sT()?e.texImage2D(e.TEXTURE_2D,0,e.DEPTH24_STENCIL8,t,s,0,e.DEPTH_STENCIL,e.UNSIGNED_INT_24_8,null):this.yG&&e.texImage2D(e.TEXTURE_2D,0,e.DEPTH_STENCIL,t,s,0,e.DEPTH_STENCIL,this.yG.UNSIGNED_INT_24_8_WEBGL,null),e.bindTexture(e.TEXTURE_2D,null)):(this.Nb&&e.deleteRenderbuffer(this.Nb),this.Nb=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,this.Nb),e.renderbufferStorage(e.RENDERBUFFER,2<=this.VM?e.DEPTH24_STENCIL8:e.DEPTH_STENCIL,t,s),e.bindRenderbuffer(e.RENDERBUFFER,null)),this.$b=t,this.kb=s)}LG(t,s){this.Ob&&(this.Fb=!1,this.xG(t,s))}DG(){this.Ob&&(this.Fb=!0,this.xG(this.am,this.lm))}PG(t,s,e,i){const r=this.Gb;if(r[0]!==t||r[1]!==s||r[2]!==e||r[3]!==i){const n=this.NG();n.NI(t,s,e,i),vec42.set(r,t,s,e,i),this.Zb=0}}H2(t){super.H2(t),this.Y2(this.Pb,this.am/this.lm)}N2(t){super.N2(t),this.Y2(this.Pb,this.am/this.lm)}B2(t){super.B2(t),this.Y2(this.Pb,this.am/this.lm)}OG(t){if(!mat42.W(this.V1,t)){const s=this.NG();s.$I(t),mat42.I(this.V1,t),this.Zb=0,this.vb=!0}}FG(){let t,s,e,i=this.tG;e=(null===i?(t=this.Pb,s=this.AC(),this):(t=i.zT(),s=i.AC(),i)).OC(),this.OG(t),this.PG(0,0,s,e)}$G(t){if(!mat42.W(this.U1,t)){const s=this.NG();s.BI(t),mat42.I(this.U1,t),this.Zb=0,this.vb=!0}}kG(){this.vb=!1}BG(){return this.vb}UT(){return this.gI}NG(){const t=this.Jb;return this.Qb===t.length&&t.push(new C33.T1.mI(this.gI)),t[this.Qb++]}IS(){0===this.Qb||this.kM()||(this.WG(),this.HG(),this.Qb=0,this.jb=0,this.Xb=0,this.Yb=0,this.Zb=0)}WG(){const t=this.mA;0<this.Yb&&(t.bindBuffer(t.ARRAY_BUFFER,this.TA),t.bufferSubData(t.ARRAY_BUFFER,0,this.Ub.subarray(0,this.Yb))),0<this.jb&&(t.bindBuffer(t.ARRAY_BUFFER,this.yA),t.bufferSubData(t.ARRAY_BUFFER,0,this.Wb.subarray(0,this.jb)),t.bindBuffer(t.ARRAY_BUFFER,this._A),t.bufferSubData(t.ARRAY_BUFFER,0,this.Vb.subarray(0,this.Xb)))}HG(){const e=this.Jb;for(let t=0,s=this.Qb;t<s;++t)e[t].Bw()}VG(){return this.eG.Ta()}UG(t,s,e,i){const r=this.eG;if(!r.Ma(t,s,e,i)){r.oa(t,s,e,i);const n=this.NG();n.GI(r),this.Zb=0,this.c2=null}}jG(t){const s=this.eG;if(s.Ta()!==t){s.ma(t);const e=this.NG();e.GI(s),this.Zb=0,this.c2=null}}wy(t){const s=this.eG;if(!s.equals(t)){s.set(t);const e=this.NG();e.GI(s),this.Zb=0,this.c2=null}}XG(){this.UG(1,1,1,1)}YG(){return this.eG}qG(t){if(t!==this.iG){const s=this.NG();s.MI(t),this.iG=t,this.Zb=0}}nT(){this.iG=null}Iy(t){const s=this.vg(t);this.KG(s[0],s[1])}zG(t){const s=this.xg(t);this.KG(s.bg,s.Gg)}KG(t,s){if(t!==this.rG||s!==this.nG){const e=this.NG();e.LI(t,s),this.rG=t,this.nG=s,this.Zb=0,this.c2=null}}JG(){return this.rG===this.mA.ONE&&this.nG===this.mA.ONE_MINUS_SRC_ALPHA}QG(){this.KG(this.mA.ONE,this.mA.ONE_MINUS_SRC_ALPHA)}ZG(){this.KG(this.mA.SRC_ALPHA,this.mA.ONE_MINUS_SRC_ALPHA)}tv(){this.KG(this.mA.ONE,this.mA.ZERO)}Rect(t){this.sv(t.Nl(),t.Fl(),t.$l(),t.kl())}sv(t,s,e,i){this.TS(t,s,e,s,e,i,t,i)}rv(){let t=this.jb;if(t>=this.qb&&(this.IS(),t=0),1===this.Zb)this.Jb[this.Qb-1].yI+=6;else{const s=this.NG();s.wI(t,6),this.Zb=1}}nv(t){t.Nc(this.Wb,this.jb,this.d2+this.C2),this.jb+=12}dc(t){this.rv(),this.nv(t),defaultTexCoordsQuad.Ea(this.Vb,this.Xb),this.Xb+=8}TS(t,s,e,i,r,n,h,o){this.rv();let a=this.Wb,l=this.jb,c=this.d2+this.C2;a[l++]=t,a[l++]=s,a[l++]=c,a[l++]=e,a[l++]=i,a[l++]=c,a[l++]=r,a[l++]=n,a[l++]=c,a[l++]=h,a[l++]=o,a[l++]=c,this.jb=l,defaultTexCoordsQuad.Ea(this.Vb,this.Xb),this.Xb+=8}qg(t,s){this.rv(),this.nv(t),s.Hl(this.Vb,this.Xb),this.Xb+=8}hv(t,s){this.rv(),this.nv(t),s.Ea(this.Vb,this.Xb),this.Xb+=8}ov(t,s,e,i,r,n,h,o,a,l,c,u,f){this.rv();let d=this.Wb,p=this.jb,C=this.d2+this.C2;d[p++]=t,d[p++]=s,d[p++]=C+e,d[p++]=i,d[p++]=r,d[p++]=C+n,d[p++]=h,d[p++]=o,d[p++]=C+a,d[p++]=l,d[p++]=c,d[p++]=C+u,this.jb=p,f.Hl(this.Vb,this.Xb),this.Xb+=8}Vg(t,s,e,i,r,n,h,o,a,l,c,u,f){this.rv();let d=this.Wb,p=this.jb,C=this.d2+this.C2;d[p++]=t,d[p++]=s,d[p++]=C+e,d[p++]=i,d[p++]=r,d[p++]=C+n,d[p++]=h,d[p++]=o,d[p++]=C+a,d[p++]=l,d[p++]=c,d[p++]=C+u,this.jb=p,f.Ea(this.Vb,this.Xb),this.Xb+=8}av(i,r,n){const h=this.Wb,o=this.Vb;if(n.length%3!=0)throw new Error("invalid index buffer length");for(let e=0,t=n.length;e<t;){const a=n[e++],l=n[e++],c=n[e++],u=3*a,f=3*l,d=3*c,p=2*a,C=2*l,m=2*c;this.rv();let t=this.jb,s=this.Xb;h[t++]=i[0+u],h[t++]=i[1+u],h[t++]=i[2+u],h[t++]=i[0+f],h[t++]=i[1+f],h[t++]=i[2+f],h[t++]=i[0+d],h[t++]=i[1+d],h[t++]=i[2+d],h[t++]=i[0+d],h[t++]=i[1+d],h[t++]=i[2+d],o[s++]=r[0+p],o[s++]=r[1+p],o[s++]=r[0+C],o[s++]=r[1+C],o[s++]=r[0+m],o[s++]=r[1+m],o[s++]=r[0+m],o[s++]=r[1+m],this.jb=t,this.Xb=s}}lv(t,s){this.Fg(0),mat42.I(tmpProjection,this.V1),mat42.I(tmpModelView,this.U1),this.FG();const[e,i]=this.cv(this.tG),r=this.J2(0,0,this.P2(i),0,0,0,i);if(this.$G(r),"crop"===t&&this.tG&&s){const n=this.am/2,h=this.lm/2,o=s.AC(),a=s.OC(),l=this.tG.AC(),c=this.tG.OC(),u=Math.min(l,o),f=Math.min(c,a),d=Math.max(a-c,0),p=Math.max(c-a,0);tmpRect.set(-n,h-p,-n+u,h-f-p),tmpQuad.Fc(tmpRect),tmpRect.set(0,d,u,f+d),tmpRect.vt(o,a),this.qg(tmpQuad,tmpRect)}else{const C=e/2,m=i/2;this.sv(-C,m,C,-m)}this.OG(tmpProjection),this.$G(tmpModelView)}uv(t){if(!this.hG.equals(t)){this.hG.I(t);const s=this.NG();s.YI(t),this.Zb=0}}dv(){}pv(t,s,e,i){this.Yb>=LAST_POINT&&this.IS();let r=this.Yb,n=this.d2+this.C2;if(2===this.Zb&&this.sG===n)this.Jb[this.Qb-1].yI++;else{const o=this.NG();o.KI(r,n),this.Zb=2,this.sG=n}const h=this.Ub;h[r++]=t,h[r++]=s,h[r++]=e,h[r++]=i,this.Yb=r}ig(t){if(this.Kb!==t){const s=this.NG();s.JI(t),this.Kb=t,this.Zb=0,this.c2=null}}Cv(){return this.Kb}gv(){this.ig(this.zb)}Sv(t){const s=this.NG();s.OI(t),this.Zb=0}yv(t,s,e=1){const i=this.NG();i.yw(t,s,e),this.Zb=0}_v(t,s,e,i,r,n,h){if(this.Kb!==this.Q1)throw new Error("must set tilemap fill mode first");const o=this.NG();o.Tw(t,s,e,i,r,n,h),this.Zb=0}Tv(t,s,e,i,r,n,h){if(this.Kb!==this.Z1)throw new Error("must set tile randomization mode first");const o=this.NG();o.Ew(t,s,e,i,r,n,h),this.Zb=0}Av(t,s,e,i,r,n,h,o,a,l,c){const u=this.Kb;if(c%=10800,u.JA&&!u.AE(s,e,i,r,n,h,o,a,l,c)){const f=this.NG(),d=(f.ZI(),u.wE(s,e,i,r,n,h,o,a,l,c),f.TI),p=(d[0]=n,d[1]=h,s.Ea(d,2),d[6]=a,d[7]=l,e.Ea(d,12),f.AI),C=(r.Ea(p,0),p[1]);p[1]=p[3],p[3]=C,i.Ea(f.EI,0),f.SI=c,f.yI=o,u.LA.QA()?f._I=t?t.KT():null:f._I=null,this.Zb=0}}Ev(t){const s=this.Kb;if(0!==t.length&&!s.SE(t)){const e=this.NG();e.rw(),s._E(t),C33.Qh(e.II,t),this.Zb=0}}Iv(t,s,e,i){const r=this.NG();r.jI(t,s,e,i),this.Zb=0}gu(t){const s=this.NG();s.UI(t),this.Zb=0}wv(){}ES(){super.ES(),this.mA.flush()}Rv(){if(this.Ob&&this.tG&&this.tG.tA()){const t=this.NG();t.ww(this.Lb),this.Zb=0}}Mv(t){if(this.Lb!==(t=!!t)&&this.Ob){this.Lb=t;const s=this.NG();s.Mw(t),this.Zb=0}}bv(){return this.Lb}BT(){return this.Nb}WT(){return this.xb}Gv(t){if(t=!!t,this.xb&&this.Db!==t){if(t&&this.bv())throw new Error("depth still enabled");this.Db=t;const s=this.NG();s.Gw(t),this.Zb=0}}vv(t,s,e,i,r=0){if(t=Math.floor(t),s=Math.floor(s),e=Math.floor(e),i=Math.floor(i),!this.oG.Dl(t,s,e,i)){this.oG.Ml(t,s,e,i);const n=r||this.cv(this.Pv())[1],h=(s=n-s-i,this.NG());h.$w(!0,t,s,e,i),this.Zb=0}}Ov(){if(-1!==this.oG.$l()){this.oG.set(0,0,-1,-1);const t=this.NG();t.$w(!1,0,0,0,0),this.Zb=0}}xv(){for(const t of this.wG)t.mb(this.E2)}kM(){return!this.mA||this.mA.isContextLost()||this.mG}Ry(){super.v2(),C33.T1.H_.Ry(),C33.T1.IT.Ry(),C33.T1.FS.Ry();for(const t of this.wG)t.gu();this.CG=[],this.UM=null,this.gG=null,this.SG=null,this.yG=null,this._G=null,this.TG=null,this.AG=null,this.EG=0,this.dG="(unavailable)",this.pG="(unavailable)",this.Kb=null,this.zb=null,this.Nb=null;for(const s of this.l2.values())s.Ry()}async My(){this.mG=!0,await this.G2(),this.mG=!1;for(const t of this.l2.values())t.My(this);this.cM(this.am,this.lm,!0)}Lv(t,s){if(this.kM())throw new Error("context lost");this.IS();const e=C33.yn(C33.T1.H_,this);return e.Q_(t,s),e}async Dv(i,r){if(this.kM())throw new Error("context lost");if(r=Object.assign({},r),C33.Xe.ImageBitmapOptions){let t=await createImageBitmap(i,{premultiplyAlpha:"premultiply"}),s=r.x_&&"clamp-to-edge"!==r.x_||r.L_&&"clamp-to-edge"!==r.L_,e=C33.Xn(t.width)&&C33.Xn(t.height);return this.eT()||e||!s?r.premultiplyAlpha=!1:C33.Xe.Je?(t=await createImageBitmap(i,{premultiplyAlpha:"premultiply",resizeWidth:C33.Yn(t.width),resizeHeight:C33.Yn(t.height)}),r.premultiplyAlpha=!1):t=await createImageBitmap(i,{premultiplyAlpha:"none"}),C33.zf(()=>this.Lv(t,r))}if(i instanceof Blob){if("undefined"==typeof Image)throw new Error("texture upload variant not supported in worker");const t=await C33.Bo(i);i=t}return C33.zf(()=>this.Lv(i,r))}kT(t,s,e){this.IS();const i=C33.yn(C33.T1.H_,this);return i.hT(t,s,e),i}BM(t,s,e){this.IS(),s.uT(t,e)}VT(t){t&&(t.mT(),0<t.gT()||(this.IS(),t===this.iG&&(this.mA.bindTexture(this.mA.TEXTURE_2D,null),this.iG=null),t===this.iw&&(this.mA.activeTexture(this.mA.TEXTURE1),this.mA.bindTexture(this.mA.TEXTURE_2D,null),this.mA.activeTexture(this.mA.TEXTURE0),this.iw=null),t.fT()))}Nv(t){let s=this.am,e=this.lm,i=!0;if(t&&("number"==typeof t.width&&(s=Math.floor(t.width),i=!1),"number"==typeof t.height)&&(e=Math.floor(t.height),i=!1),s<=0||e<=0)throw new Error("invalid size");this.IS();const r=C33.yn(C33.T1.IT,this);return r.FT(s,e,Object.assign({AT:i},t)),this.tG=null,this.gI.jT=null,this.gI.XT=null,r}Fv(t,s=!0){if(t!==this.tG){t&&t.sA()&&t.HT(this.am,this.lm);const e=this.NG();e.HI(t),this.tG=t,this.Zb=0,s&&this.FG()}}Pv(){return this.tG}cv(t){return t?[t.AC(),t.OC()]:[this.am,this.lm]}$v(t,s="stretch"){if(this.VM<2||this.tG&&0<this.tG.eA())this.tv(),this.XG(),this.kv(t,s);else{const e=this.NG();e.lw(t,this.tG,s),this.Zb=0}}kv(t,s="stretch"){const e=t.KT();if(!e)throw new Error("not a texture-backed render target");this.qG(e),this.lv(s,e)}Bv(t){if(!(this.VM<2)){const s=this.NG();s.ow(t.YT()),this.Zb=0}}Wv(t){this.Fv(null),this.IS();const s=t.KT();s===this.iG&&(this.mA.bindTexture(this.mA.TEXTURE_2D,null),this.iG=null),s===this.iw&&(this.mA.activeTexture(this.mA.TEXTURE1),this.mA.bindTexture(this.mA.TEXTURE_2D,null),this.mA.activeTexture(this.mA.TEXTURE0),this.iw=null),t.fT()}async oA(t,s,e){this.IS();let i=this.tG,r,n,h,o=(h=t?(r=t.AC(),n=t.OC(),t.YT()):(r=this.AC(),n=this.OC(),null),0),a=0,l=r,c=n;if(e){o=C33.wn(Math.floor(e.Nl()),0,r-1),a=C33.wn(Math.floor(e.Fl()),0,n-1);let t=e.width(),s=(t=0===t?r-o:C33.wn(Math.floor(t),0,r-o),e.height());s=0===s?n-a:C33.wn(Math.floor(s),0,n-a),l=t,c=s,a=n-(a+c)}let u=this.mA,f=(u.bindFramebuffer(u.FRAMEBUFFER,h),()=>{u.bindFramebuffer(u.FRAMEBUFFER,null),this.tG=null,this.gI.jT=null,this.gI.XT=null,this.Fv(i)}),d;if(!s&&2<=this.sT()){u.bindFramebuffer(u.READ_FRAMEBUFFER,h);const p=u.createBuffer(),C=l*c*4,m=u.PIXEL_PACK_BUFFER,g=(u.bindBuffer(m,p),u.bufferData(m,C,u.STREAM_READ),u.readPixels(o,a,l,c,u.RGBA,u.UNSIGNED_BYTE,0),u.bindFramebuffer(u.READ_FRAMEBUFFER,null),u.bindBuffer(m,null),f(),u.fenceSync(u.SYNC_GPU_COMMANDS_COMPLETE,0));await this.pA(()=>u.getSyncParameter(g,u.SYNC_STATUS)===u.SIGNALED),u.deleteSync(g),d=new ImageData(l,c),u.bindBuffer(m,p),u.getBufferSubData(m,0,new Uint8Array(d.data.buffer),0,C),u.bindBuffer(m,null),u.deleteBuffer(p)}else d=new ImageData(l,c),u.readPixels(o,a,l,c,u.RGBA,u.UNSIGNED_BYTE,new Uint8Array(d.data.buffer)),f();return d}Hv(){this.Mv(!0);const t=this.NG();t.Ow(),this.Zb=0,this.aG=1}Vv(){this.Mv(!1);const t=this.NG();t.Lw(),this.Zb=0,this.aG=2}Uv(){return 2===this.aG}jv(){this.Mv(!0);const t=this.NG();t.Nw(),this.Zb=0,this.aG=0}Xv(t){if(this.Yv()){const s=this.NG();s.fw(t),this.Zb=0}}qv(t){if(this.Yv()){const s=this.NG();s.mw(t),this.Zb=0}}pA(s){const t=new Promise(t=>pendingPolls.add({resolve:t,_b:s}));return-1===pollRafId&&(pollRafId=self.requestAnimationFrame(CheckPendingPolls2)),t}OS(){return this.am*this.lm*(this.Mb.alpha?4:3)}xS(){let t=0;for(const s of C33.T1.IT.aA())s.KT()||(t+=s.yT());return t}LS(){let t=0;for(const s of C33.T1.H_._T())t+=s.yT();return t}Kv(){return this.bb}sT(){return this.VM}zv(){return"webgl"+this.sT()}eT(){return 2<=this.sT()}Z_(){return this.lG}Jv(){return this.cG}Qv(){return this.uG}Zv(){return 0!==this.fG}tP(){return this.fG}sP(){return this.dG}eP(){return this.pG}iP(){if(2<=this.sT())return"webgl2";{const t=[];return this._G&&t.push("EXT_frag_depth"),this.TG&&t.push("OES_standard_derivatives"),this.AG&&t.push("EXT_shader_texture_lod"),0<t.length?"webgl1:"+t.join(","):"webgl1:none"}}rP(){return this.CG}Yv(){return!!this.UM}jM(){return this.UM}dA(){return this.gG}lT(){return this.SG}cT(){return this.EG}fb(t){this.wG.add(t)}pb(t){this.wG.delete(t)}rb(){return this.MG}tT(){return this.mA}bG(t){this.Mg([["normal",t.ONE,t.ONE_MINUS_SRC_ALPHA],["additive",t.ONE,t.ONE],["xor",t.ONE,t.ONE_MINUS_SRC_ALPHA],["copy",t.ONE,t.ZERO],["destination-over",t.ONE_MINUS_DST_ALPHA,t.ONE],["source-in",t.DST_ALPHA,t.ZERO],["destination-in",t.ZERO,t.SRC_ALPHA],["source-out",t.ONE_MINUS_DST_ALPHA,t.ZERO],["destination-out",t.ZERO,t.ONE_MINUS_SRC_ALPHA],["source-atop",t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],["destination-atop",t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA]])}nP(){return this.NS()}}}{const C33=self.Bs,DEFAULT_CTOR_OPTS={hP:null,oP:null,aP:null,getTime:null,lP:null};C33.T1.cP=class{constructor(t){t=Object.assign({},DEFAULT_CTOR_OPTS,t),this.uP=t.hP,this.fP=t.oP,this.dP=t.aP,this.pP=t.getTime,this.CP=t.lP,this.mP=null,this.gP=new Set}SP(t){this.gP.add(t)}yP(t){this.gP.delete(t)}Ry(){this.mP=null;for(const t of this.gP)t.Ry()}_P(t){return this.uP?this.uP(t):[t.AC(),t.OC()]}Pv(t){return this.fP(t)}TP(t,s){this.dP(t,s)}AP(){return this.pP()}_3(t){this.CP(t)}EP(t,s,e){return s=Math.floor(s),e=Math.floor(e),!this.mP||this.mP.AC()===s&&this.mP.OC()===e||(t.VT(this.mP),this.mP=null),null===this.mP&&(this.mP=t.Lv(null,{width:s,height:e,D_:"nearest",k_:!1})),this.mP}}}{const C33=self.Bs,assert=self.assert,glMatrix=self.Es,mat42=glMatrix.Ms,tempRect=C33.yn(C33.Rect),tempRect2=C33.yn(C33.Rect),tempRect3=C33.yn(C33.Rect),tempRect4=C33.yn(C33.Rect),tempMat4a=mat42.create(),tempMat4b=mat42.create(),DEFAULT_CTOR_OPTS={IP:null,wP:null,RP:null,MP:!1},DEFAULT_BUILDSTEPS_OPTS={bP:null,GP:!1,vP:!1,PP:!1,OP:!1,xP:!1,LP:!1};C33.T1.DP=class{constructor(t,s){s=Object.assign({},DEFAULT_CTOR_OPTS,s),this.G3=t,this.NP=s.IP,this.FP=s.wP,this.$P=s.RP,this.kP=null,this.BP=[],this.WP=[],this.HP=[],this.VP=!1,this._y=0,this.UP=!1,this.jP=!1,this.XP=!1,this.YP=!1,this.qP=!1,this.KP=!1,this.vb=!1,this.zP=!1,this.JP=!1,this.QP=!1,this.ZP=!1,this.tO=!1,this.sO=0,this.eO=[null,null,null],this.iO=!!s.MP,this.rO=0,this.nO=0,this.hO=0,this.oO=0,this.aO=null,this.lO=null,this.cO=C33.yn(C33.Rect),this.uO=C33.yn(C33.Rect),this.fO=C33.yn(C33.Rect),this.dO=C33.yn(C33.Rect),this.pO=C33.yn(C33.Rect),this.CO=1,this.mO=1,this.gO=0,this.SO=0,this.yO=null,this._O=null,this.TO=0,this.AO=0,this.EO=!1,this.xT=mat42.create(),this.IO=mat42.create(),this.G3.SP(this)}_n(){this.G3.yP(this),C33.qh(this.HP),C33.qh(this.BP),C33.qh(this.WP),this.aO=null,this.lO=null,this.NP=null,this.FP=null,this.$P=null}Ry(){this.VP=!0,C33.qh(this.HP),C33.qh(this.BP),C33.qh(this.WP)}wO(){return this.VP}RO(r,t){if(t=Object.assign({},DEFAULT_BUILDSTEPS_OPTS,t),C33.qh(this.HP),this.rO=0,this.nO=0,this.UP=!1,this.jP=!1,this.XP=!1,this.YP=!1,this.qP=!1,this.KP=!1,this.sO=0,this.tO=!!t.OP,this.ZP=!!t.LP,this.VP=!1,C33.Qh(this.BP,r),0!==r.length){if(t.bP){if(t.bP.length!==r.length)throw new Error("incorrect indexMap length");C33.Qh(this.WP,t.bP)}else{C33.qh(this.WP);for(let t=0,s=r.length;t<s;++t)this.WP.push(t)}for(const s of r)this.rO+=s.ZS(),this.nO+=s.ty(),s.oy()&&(this.UP=!0),s.uy()&&(this.jP=!0),s.ly()&&(this.XP=!0),s.ey()&&(this.YP=!0),s.gy()&&(this.qP=!0);this.KP=this.MO(r[0].JS());const n=this.bO(r[0],t),h=this.GO(r.at(-1),t);if(1!==r.length||n||h){this.QP=!1;let i=0;n&&(this.sO=1,this.HP.push(C33.yn(C33.T1.DP.Step.vO,this,-1,1)),i=1);for(let s=0,e=r.length;s<e;++s)if(0!==s||n){let t=1===i?2:1;s!==e-1||h||(t=0),this.sO=Math.max(this.sO,t),this.HP.push(C33.yn(C33.T1.DP.Step.PO,this,i,t,s)),i=t}else this.sO=1,this.HP.push(C33.yn(C33.T1.DP.Step.OO,this,-1,1,s)),i=1;h&&this.HP.push(C33.yn(C33.T1.DP.Step.xO,this,i,0))}else this.QP=!0}}bO(t,s){return!!(s.GP||t.iy()||s.PP&&!t.hy()||t.uy()&&!this.ZP||0!==this.rO||0!==this.nO)||(t.JS().PS()?t.ly()&&(s.xP||s.OP)||t.Cy()&&s.OP:t.ly()&&!this.KP&&s.xP)}GO(t,s){return!!s.vP||(t.JS().PS()?t.ly()||t.ey():(t.ly()||t.ey())&&this.LO())}MO(t){return t.q2()&&this.XP&&!this.YP}DO(t,s,e){t.q2()&&null===s&&(s=t.GetBackbufferRenderTarget()),this.yO=s,this.aO=e.NO||null,this.lO=e.contextObject||null,this._y=e.FO||0,this.CO=e.devicePixelRatio||1,this.mO=e.$O||1,this.gO=e.kO||0,this.SO="number"==typeof e.time?e.time:this.G3.AP(),this.vb=!1,t.kG(),this.UP&&this.BO();let i=!1;if(this.WO()&&(this.HO(t,e),i=!0,this._O=this.G3.EP(t,this.hO,this.oO),tempRect.I(this.uO),tempRect.nc(),t.q2()&&t._MaybeDoPendingClearRenderPass(this.yO),t.CopyTextureToTexture(this.yO.KT(),this._O,tempRect.Nl(),tempRect.Fl(),tempRect.width(),tempRect.height())),this.QP)this.VO(t,e);else if(i||this.HO(t,e),0!==this.fO.width()||0!==this.fO.height()){t.QG(),t.XG(),t.Dg(0),t.Fg(0),this.kP=e.UO||null,this.TO=e.jO||0,this.AO=e.XO||0,this.EO=!!e.YO,this.qO(t),this.eO[0]=s,this.eO[1]=1<=this.sO?this.KO():null,this.eO[2]=2===this.sO?this.KO():null;for(const r of this.HP){const n=this.zO(r.JO()),h=this.zO(r.QO());t.q2()?r.ZO(t,n,h):r.tx(t,n,h)}t.qG(null),this.eO[1]&&this.ix(this.eO[1]),this.eO[2]&&this.ix(this.eO[2]),this.eO.fill(null),this.nx(t),this.yO=null,this._O=null,this.aO=null,this.lO=null,this.kP=null}}HO(t,s){const[e,i]=this.G3._P(t);this.hx(t,e,i),this.ox(s)}hx(t,s,e){if(s<=0||e<=0)throw new Error("invalid draw size");this.hO===s&&this.oO===e||this.lx(t,s,e,0,0,this.xT,this.IO),this.hO=s,this.oO=e}lx(t,s,e,i,r,n,h){const o=s/2+i,a=e/2+r,l=(t.Y2(n,s/e),t.J2(o,a,t.P2(e),o,a,0,e));mat42.I(h,l)}ox(t){this.cO.I(t.ux),t.Cx?this.uO.I(t.Cx):this.uO.set(0,0,this.hO,this.oO),this.fO.I(this.uO),this.fO.vt(this.hO,this.oO);const s=this.mO*this.CO;this.uO.Kl(this.rO*s,this.nO*s),this.pO.I(this.uO),this.pO.vt(this.hO,this.oO),this.uO.hc(0,0,this.hO,this.oO),this.dO.I(this.uO),this.dO.vt(this.hO,this.oO)}qO(t){if(this.zP=t.bv(),this.JP=t.Uv(),this.ZP)t.Mv(!1),this.jP&&t.Gv(!0);else{if(tempRect.I(this.uO),t.PS()){const s=this.mO*this.CO;tempRect.Kl(Math.max(this.rO,1)*s,Math.max(this.nO,1)*s),tempRect.nc(),tempRect.wn(0,0,this.hO,this.oO)}else tempRect.nc();t.vv(tempRect.Nl(),tempRect.Fl(),tempRect.width(),tempRect.height(),this.oO)}}mx(t){t.XG(),this.ZP||(this.JP&&t.jv(),t.Mv(!1),this.jP&&t.Gv(!0)),t.q2()&&t.SetNormalizedCoordsProgramVariant(!0)}nx(t){t.Gv(!1),this.JP&&t.Vv(),t.Mv(this.zP),this.ZP||t.Ov(),t.q2()&&t.SetNormalizedCoordsProgramVariant(!1),this.vb=t.BG()}gx(){this.pO.wn(0,0,1,1)}zO(t){return t<0?null:this.eO[t]}KO(){return this.G3.Pv(this)}Sx(){return this.yO}ix(t){this.G3.TP(t,this)}yx(t){return this.BP[t]}_x(t){this.kP?this.kP(this,t,()=>this.NP(t,this)):this.NP(t,this),this.QP||this.mx(t)}Tx(t){if(this.ZP)return!0;if(0!==this.TO||0!==this.AO)return!1;const[s,e]=t.cv(t.Pv());return s===this.hO&&e===this.oO}Ax(t,s){let e=this.xT,i=this.IO;if(s&&!this.Tx(t)){e=tempMat4a,i=tempMat4b;const[r,n]=t.cv(t.Pv());this.lx(t,r,n,this.TO,this.AO,e,i),this.ZP||t.Ov()}t.OG(e),t.$G(i)}BO(){this.G3._3(this)}Ex(t,s){return this.$P(this.WP[t],s)}Ix(t,s){let e=this.pO,i=this.dO,r=this.fO;t.PS()&&(tempRect2.I(e),tempRect2.Ql(1),e=tempRect2,tempRect3.I(i),tempRect3.Ql(1),i=tempRect3,tempRect4.I(r),tempRect4.Ql(1),r=tempRect4),this.wx(t,s,i,r,e,1/this.hO,1/this.oO)}Rx(t,s){let i=this.dO,r=this.fO,n=1/this.hO,h=1/this.oO;if(this.FP){let{Mx:t,bx:s,Gx:e}=this.FP(this.aO);t||(tempRect.set(0,0,0,0),t=tempRect),s=s||this.hO,e=e||this.oO,i=t,r=t,n=1/s,h=1/e}else t.PS()&&(tempRect3.I(i),tempRect3.Ql(1),i=tempRect3,tempRect4.I(r),tempRect4.Ql(1),r=tempRect4);let e=this.pO;t.PS()&&((e=tempRect2).I(this.pO),e.Ql(1)),this.wx(t,s,i,r,e,n,h),t.q2()&&this.qP&&t.SetProgramParameter_IsSrcTexRotated(this.tO)}Px(t){return this.XP?t.q2()?this.WO()?this._O:this.yO.KT():this.yO:null}wx(t,s,e,i,r,n,h){t.Av(this.Px(t),r,e,i,this.cO,n,h,this.CO,this.mO,this.gO,this.SO),t.Ev(this.Ex(s,t))}VO(t,s){const e=this.BP[0],i=t.bv(),r=e.uy();r&&(t.Mv(!1),t.Gv(!0),this.pO.set(0,0,1,1),this.fO.set(0,0,1,1)),t.ig(e),t.Iy(this._y),t.Fv(this.yO);let n=0,h=1;if(this.fO.set(0,0,1,1),e.Cy()&&this.FP){const{Mx:o,bx:a,Gx:l}=this.FP(this.aO);o&&this.fO.I(o),n=Number.isFinite(a)?1/a:0,h=Number.isFinite(l)?1/l:0}else{const[c,u]=this.G3._P(t);n=1/c,h=1/u}s.ux?this.cO.I(s.ux):this.cO.set(0,0,0,0),t.Av(this.Px(t),this.pO,this.fO,this.fO,this.cO,n,h,this.CO,this.mO,this.gO,this.SO),t.Ev(this.Ex(0,t)),t.q2()&&this.qP&&t.SetProgramParameter_IsSrcTexRotated(this.tO),t.Dg(0),this._x(t),r&&(t.Gv(!1),t.Mv(i))}WO(){return this.KP}LO(){return!this.KP}Ox(){return this.XP}xx(){return!!this.QP&&!this.WO()}Lx(){return this.ZP}Dx(){return this.aO}Nx(){return this.lO}Fx(){return this._y}$x(){return this.EO}BG(){return this.vb}kx(){return this.uO}Bx(){return this.dO}Wx(){return this.iO}async Hx(t,s,e){}}}{const C33=self.Bs;C33.T1.DP.Step=class{constructor(t,s,e,i=-1){this.Vx=t,this.Ux=s,this.jx=e,this.f1=i}Xx(){return this.Vx}JO(){return this.Ux}QO(){return this.jx}Yx(){return this.f1}pE(){return this.Xx().yx(this.Yx())}tx(t,s,e){}ZO(t,s,e){}}}{const C33=self.Bs;C33.T1.DP.Step.vO=class extends C33.T1.DP.Step{constructor(t,s,e,i){super(t,s,e,i)}tx(t,s,e){const i=this.Xx();t.QG(),t.eg(),t.Fv(e,i.$x()),t.Iv(0,0,0,0),i._x(t),i.gx()}ZO(t,s,e){const i=this.Xx();t.QG(),t.eg(),t.Fv(e,!1),t.Iv(0,0,0,0),i._x(t),i.gx()}}}{const C33=self.Bs,tempRect=C33.yn(C33.Rect),tempQuad=C33.yn(C33.dc);C33.T1.DP.Step.xO=class extends C33.T1.DP.Step{constructor(t,s,e,i){super(t,s,e,i)}tx(t,s,e){const i=this.Xx();t.eg(),t.Fv(e),i.Ax(t,!0),t.Iy(i.Fx()),t.qG(s.KT()),tempQuad.Fc(i.kx()),tempRect.I(i.Bx()),tempRect.Ql(1),t.qg(tempQuad,tempRect),i.Wx()&&t.Bv(s)}ZO(t,s,e){const i=this.Xx();t.eg(),t.Fv(e,!1),i.Tx(t)?tempQuad.Fc(i.Bx()):(t.SetNormalizedCoordsProgramVariant(!1),i.Ax(t,!0),tempQuad.Fc(i.kx())),t.SetBackTexture(null),t.Iy(i.Fx()),t.qG(s.KT()),i.Lx()?t.lv():t.qg(tempQuad,i.Bx())}}}{const C33=self.Bs;C33.T1.DP.Step.OO=class extends C33.T1.DP.Step{constructor(t,s,e,i){super(t,s,e,i)}tx(t,s,e){const i=this.Xx();t.Fv(e,i.$x()),t.Iv(0,0,0,0),t.tv(),t.ig(this.pE()),i.Rx(t,this.Yx()),i._x(t),i.gx()}ZO(t,s,e){const i=this.Xx();t.Fv(e,!1),t.Iv(0,0,0,0),t.tv(),t.ig(this.pE()),i.Rx(t,this.Yx()),i._x(t),i.gx()}}}{const C33=self.Bs,tempRect=C33.yn(C33.Rect),tempQuad=C33.yn(C33.dc);C33.T1.DP.Step.PO=class extends C33.T1.DP.Step{constructor(t,s,e,i){super(t,s,e,i)}tx(t,s,e){const i=this.Xx(),r=(t.Fv(e),0===this.QO());r?t.Iy(i.Fx()):(t.Iv(0,0,0,0),t.tv()),t.ig(this.pE()),i.Ix(t,this.Yx()),t.qG(s.KT()),i.Ax(t,r),tempQuad.Fc(i.kx()),tempRect.I(i.Bx()),tempRect.Ql(1),t.qg(tempQuad,tempRect),i.Wx()&&t.Bv(s)}ZO(t,s,e){const i=this.Xx(),r=(t.Fv(e,!1),0===this.QO());r?(t.Iy(i.Fx()),t.SetBackTexture(null),i.Tx(t)?tempQuad.Fc(i.Bx()):(t.SetNormalizedCoordsProgramVariant(!1),i.Ax(t,!0),tempQuad.Fc(i.kx()))):(t.Iv(0,0,0,0),t.tv(),tempQuad.Fc(i.Bx())),t.ig(this.pE()),i.Ix(t,this.Yx()),t.qG(s.KT()),i.Lx()?t.lv():t.qg(tempQuad,i.Bx())}}}{let SortZOrderList2=function(t,s){const e=t[0],i=s[0],r=e-i;if(0!=r)return r;const n=t[1],h=s[1];return n-h},C33=(SortZOrderList=SortZOrderList2,self.Bs),C3X=self.zs,runtime=null,keysDownByKey=new Set,tempZOrderList=[],tempInstances=[],didWarnInAlertPolyfill=!1,didWarnFpsDeprecated=!1,VALID_FRAMERATE_MODES=new Set(["vsync","unlimited-tick","unlimited-frame"]);self.qx=class{constructor(t){runtime=t,Object.defineProperties(this,{Kx:{value:runtime.Jx().zx(),writable:!1},Qx:{value:runtime.tL().Zx(),writable:!1},sL:{value:{},writable:!1},eL:{value:{},writable:!1},iL:{value:runtime.rL(),writable:!1},nL:{value:runtime.hL(),writable:!1},oL:{value:new Date(runtime.aL()),writable:!1},storage:{value:new self.lL(runtime),writable:!1},isInWorker:{value:runtime.cL(),writable:!1},uL:{value:runtime.fL(),writable:!1},dL:{value:runtime.pL(),writable:!1},D_:{value:runtime.CL(),writable:!1},mL:{value:runtime.gL(),writable:!1},SL:{value:new self.yL(t),writable:!1},_L:{value:new self.TL(t),writable:!1}}),runtime.AL().addEventListener("keydown",t=>{keysDownByKey.has(t.key)?t.stopPropagation():keysDownByKey.add(t.key)}),runtime.AL().addEventListener("keyup",t=>keysDownByKey.delete(t.key)),runtime.ed().addEventListener("window-blur",()=>keysDownByKey.clear()),runtime.cL()&&(self.alert=t=>(didWarnInAlertPolyfill||(didWarnInAlertPolyfill=!0,console.warn("[Construct] alert() was called from a Web Worker, because the project 'Use worker' setting is enabled. This method is not normally available in a Web Worker. Construct has implemented the alert for you, but note that other features may be missing in worker mode. You may wish to disable 'Use worker', or use a more convenient function like console.log(). For more information please refer to the scripting section of the manual.")),this.alert(t)))}EL(t){Object.defineProperties(this.sL,t)}IL(t){Object.defineProperties(this.eL,t)}addEventListener(t,s){runtime.AL().addEventListener(t,s)}removeEventListener(t,s){runtime.AL().removeEventListener(t,s)}wL(t,...s){C3X.Mi(t);const e=runtime.RL(),i=e.ML(t);if(!i)throw new Error(`cannot find function name '${t}'`);if(!i.pu())return i.bL();if(s.length<i.GL())throw new Error(`not enough function parameters passed for '${t}' (${s.length} passed, ${i.GL()} expected)`);let r=i.vL(),n=r.PL(),h=e.OL();if(h){n=n.slice(0);const a=new Set(n);for(const l of h.PL())a.has(l)||(n.push(l),a.add(l));for(const c of e.xL())a.has(c)||(n.push(c),a.add(c))}const o=r.LL(n,i.DL(),i.NL(),i.bL(),...s);return o}FL(t){const s=runtime.kL().$L();if(!s)throw new Error("not in a function which returns a value");switch(s.BL()){case 1:"number"==typeof t&&s.WL(t);break;case 2:"string"==typeof t&&s.WL(t);break;case 3:"number"!=typeof t&&"string"!=typeof t||s.WL(t)}}signal(t){C3X.Mi(t),runtime.RL().HL(t)}VL(t){return C3X.Mi(t),runtime.RL().UL(t)}jL(){return[runtime.fL(),runtime.pL()]}get isSuspended(){return runtime.XL()}get dt(){return runtime.YL()}get qL(){return runtime.KL()}get gameTime(){return runtime.zL()}get JL(){return runtime.QL()}get timeScale(){return runtime.ZL()}set timeScale(t){C3X.Ei(t),runtime.tD(t)}get fps(){return didWarnFpsDeprecated||(console.warn("IRuntime.fps is deprecated. Use IRuntime.framesPerSecond instead."),didWarnFpsDeprecated=!0),runtime.sD()}get framesPerSecond(){return runtime.sD()}get eD(){return runtime.iD()}get rD(){return runtime.nD()}get hD(){return runtime.oD()}get aD(){return runtime.lD()}set aD(t){if(!VALID_FRAMERATE_MODES.has(t))throw new Error("invalid framerate mode");runtime.cD(t)}get uD(){return runtime.fD()}set uD(t){C3X.Ei(t),runtime.dD(t)}get pD(){return runtime.CD()}set pD(t){runtime.mD(t)}get gD(){return runtime.Jx().SD()}get yD(){return runtime.Jx()._D()}random(){return runtime.TD()}get layout(){const t=runtime.AD();if(t)return t.ED();throw new Error("no layout is running - make sure a layout is loaded before accessing")}ID(t){let s=runtime.wD(),e=null;if("number"!=typeof t&&"string"!=typeof t)throw new TypeError("expected string or number");if(e=s.RD(t))return e.ED();throw new Error("invalid layout")}MD(){return runtime.wD().bD().map(t=>t.ED())}GD(t){let s=runtime.wD(),e;if("number"!=typeof t&&"string"!=typeof t)throw new TypeError("expected string or number");if(!(e=s.RD(t)))throw new Error("invalid layout");s.vD()||s.PD(e)}get keyboard(){const t=runtime.OD().keyboard;if(t)return t;throw new Error("runtime.keyboard used but Keyboard object missing - add it to your project first")}get xD(){const t=runtime.OD().xD;if(t)return t;throw new Error("runtime.mouse used but Mouse object missing - add it to your project first")}get LD(){const t=runtime.OD().LD;if(t)return t;throw new Error("runtime.touch used but Touch object missing - add it to your project first")}get DD(){const t=runtime.OD().DD;if(t)return t;throw new Error("runtime.timelineController used but Timeline Controller object missing - add it to your project first")}ND(t,s){C3X.Mi(t),C3X.Mi(s),runtime.FD(t,s)}$D(t){C3X.Ei(t);const s=runtime.kD(t);return s?s.BD():null}WD(t,i){C3X.Ji(i);const r=runtime.HD();for(const s of t){const e=runtime.VD(s),n=e.UD();tempZOrderList.push([n.jD().Yx(),n.XD()]),tempInstances.push(e)}if(0!==tempZOrderList.length){tempZOrderList.sort(SortZOrderList2),tempInstances.sort((t,s)=>i(t.BD(),s.BD()));let e=!1;for(let t=0,s=tempZOrderList.length;t<s;++t){const h=tempInstances[t],o=r.YD(tempZOrderList[t][0]),a=tempZOrderList[t][1],l=o.qD();l[a]!==h&&((l[a]=h).UD().KD(o,!0),o.zD(h),e=!0)}e&&runtime.JD(),C33.qh(tempZOrderList),C33.qh(tempInstances)}}async QD(t,s){const e=new MessageChannel,i=e.port1,r=e.port2;return await runtime.ZD("runtime","script-create-worker",{url:t,opts:s,port2:r},[r]),i}alert(t){return runtime.ZD("runtime","alert",{message:t+(runtime.cL()?" [via Web Worker]":"")})}tN(t){return C3X.Ei(t),runtime.sN(t)}eN(t){runtime.iN(t)}}}{let C33=self.Bs,C3X=self.zs,assetManager=null;self.rN=class{constructor(t){assetManager=t,Object.defineProperties(this,{nN:{value:!0,writable:!1}})}hN(t){const s=self.aN.oN(t);if(!s)throw new Error("invalid IImageInfo");s.lN(assetManager.cN())}uN(t){return assetManager.Oo(t)}fN(t){return assetManager.xo(t)}dN(t){return assetManager.Lo(t)}pN(t){return assetManager.Do(t)}CN(t){return assetManager.mN(t)}gN(t){return"flat"===assetManager.SN()&&C33.Go(t)&&(t=t.toLowerCase()),assetManager.yN(t)}get _N(){return assetManager.TN()}async AN(t,s){throw new Error("decodeWebMOpus() is no longer supported - use Web Audio's decodeAudioData() directly as all supported platforms now support WebM Opus")}EN(...t){return assetManager.IN(...t)}wN(t){return assetManager.RN(t)}MN(t){return assetManager.bN(t)}}}{let C33=self.Bs,C3X=self.zs,collisionEngine=null;self.GN=class{constructor(t){collisionEngine=t,Object.defineProperties(this,{runtime:{value:collisionEngine.cN(),writable:!1}})}vN(t,s){const e=collisionEngine.cN(),i=e.VD(t),r=e.VD(s);return collisionEngine.PN(i,r)}ON(t,s){const e=collisionEngine.cN(),i=e.VD(t);for(const r of s){const n=e.VD(r);if(collisionEngine.PN(i,n))return r}return null}xN(t){const s=collisionEngine.cN().VD(t),e=collisionEngine.LN(s);return e?e.BD():null}DN(t,s){if(C3X.Ei(t),C3X.Ei(s),t=Math.floor(t),s=Math.floor(s),t<=0||s<=0)throw new Error("invalid cell size");collisionEngine.NN(t,s)}FN(){return collisionEngine.$N()}kN(t,s){let e=collisionEngine.cN(),i;i=Array.isArray(t)?t.map(t=>e.BN(t)):[e.BN(t)];const r=C33.Rect.Ll(s),n=[];return collisionEngine.WN(null,i,r,n),n.map(t=>t.BD())}}}{let C33=self.Bs,C3X=self.zs,runtime=null,osMap=new Map([["Windows","windows"],["macOS","macos"],["Linux","linux"],["Chrome OS","chrome-os"],["Android","android"],["iOS","ios"]]),browserMap=new Map([["Chrome","chrome"],["Chromium","chromium"],["Edge","edge"],["Opera","opera"],["NW.js","nwjs"],["Firefox","firefox"],["Safari","safari"]]),browserEngineMap=new Map([["Chromium","chromium"],["Gecko","gecko"],["WebKit","webkit"]]);self.yL=class{constructor(t){runtime=t,Object.defineProperties(this,{HN:{value:C33.pe.Ee,writable:!1},VN:{value:osMap.get(C33.pe.Ce)||"unknown",writable:!1},UN:{value:C33.pe.me,writable:!1},jN:{value:browserMap.get(C33.pe.ge)||"unknown",writable:!1},XN:{value:C33.pe.Se,writable:!1},YN:{value:browserEngineMap.get(C33.pe._e)||"unknown",writable:!1}})}get exportType(){let t=runtime.qN();return runtime.KN()?t="nwjs":runtime.zN()?t="windows-webview2":"cordova"===t?t="Android"===C33.pe.Ce?"cordova-android":"cordova-ios":"playable-ad-single-file"!==t&&"playable-ad-zip"!==t||(t="playable-ad"),t}get renderer(){return runtime.QN().JN()}get ZN(){return runtime.QN().tF()}get sF(){return runtime.QN().eF()}get iF(){return runtime.QN().rF()}get nF(){return runtime.QN().hF()}get oF(){return runtime.QN().aF()}get devicePixelRatio(){return runtime.lF()}}}{const C33=self.Bs,C3X=self.zs;self.lL=class{constructor(t){this.cF=t.uF()}getItem(t){return C3X.Mi(t),this.cF.getItem(t)}setItem(t,s){return C3X.Mi(t),this.cF.setItem(t,s)}removeItem(t){return C3X.Mi(t),this.cF.removeItem(t)}clear(){return this.cF.clear()}keys(){return this.cF.keys()}}}{const C33=self.Bs,C3X=self.zs,internalApiToken=C33.Ws();self.fF=class{#dF;constructor(){const t=C33.CF.pF(internalApiToken);this.#dF=t,Object.defineProperties(this,{runtime:{value:t.cN().mF(),writable:!1},gF:{value:t.SF(),writable:!1},yF:{value:t._F(),writable:!1},TF:{value:t.AF(),writable:!1},EF:{value:t.IF(),writable:!1},wF:{value:t.RF(),writable:!1},MF:{value:t.bF(),writable:!1},GF:{value:t.vF(),writable:!1},PF:{value:t.OF(),writable:!1}}),t.cN().xF(this,t)}static LF(t){if(!t)return null;const s=C33.CF.DF(t);return s?s.NF():null}FF(){return this.#dF.kF().$F()}BF(){return this.#dF.WF().BD()}}}{const C33=self.Bs,C3X=self.zs,internalApiToken=C33.Ws();self.HF=class{#dF;constructor(){const t=C33.CF.pF(internalApiToken);this.#dF=t,Object.defineProperties(this,{name:{value:t.pf(),writable:!1},runtime:{value:t.cN().mF(),writable:!1},VF:{value:t.UF().NF(),writable:!1}}),t.cN().xF(this,t)}addEventListener(t,s){C3X.Mi(t),C3X.Ji(s),this.#dF.AL().addEventListener(t,s)}removeEventListener(t,s){C3X.Mi(t),C3X.Ji(s),this.#dF.AL().removeEventListener(t,s)}jF(){return[...this.instances()]}XF(){return C33.first(this.instances())}YF(){return[...this.qF()]}KF(){return C33.first(this.qF())}zF(t){const s=this.#dF,e=s.cN().JF(t),i=s.QF(e);return i?i.BD():null}*instances(){for(const t of this.#dF.ZF())yield t.BD()}*qF(){for(const t of this.#dF.s$().t$())yield t.BD()}e$(t){C3X.Ji(t);const s=this.#dF;if(0<s.i$())throw new Error("setInstanceClass() called too late, because instances have already been created - call in runOnStartup");s.r$(t)}We(t,s,e,i,r){if(C3X.Si(s),C3X.Si(e),"number"!=typeof t&&"string"!=typeof t)throw new TypeError("invalid layer parameter");const n=this.#dF,h=n.cN(),o=h.AD().jD(t);if(!o)throw new Error("invalid layer");const a=h.n$(n,o,s,e,i,r),l=(i&&o.h$(a),h.RL());return l.o$(!0),a.a$(),l.o$(!1),l.l$()||h.wD().c$()||h.u$(),a.BD()}}}{const C33=self.Bs,C3X=self.zs,map=new WeakMap,VALID_WHERE_STRINGS=["above","below","top-sublayer","bottom-sublayer"];self.f$=class{constructor(t){map.set(this,t);const s=[],e=t.d$(),i=e.p$().length;for(let t=0;t<i;++t)s.push(new self.C$(e,t));Object.defineProperties(this,{name:{value:t.pf(),writable:!1},index:{value:t.Yx(),writable:!1},effects:{value:s,writable:!1}})}addEventListener(t,s){C3X.Mi(t),C3X.Ji(s),map.get(this).AL().addEventListener(t,s)}removeEventListener(t,s){C3X.Mi(t),C3X.Ji(s),map.get(this).AL().removeEventListener(t,s)}get width(){return map.get(this).AC()}set width(t){C3X.Ei(t),map.get(this).GC(t)}get height(){return map.get(this).OC()}set height(t){C3X.Ei(t),map.get(this).EC(t)}m$(t,s){C3X.Ei(t),C3X.Ei(s);const e=map.get(this);e.GC(t),e.EC(s)}getSize(){const t=map.get(this);return[t.AC(),t.OC()]}set scale(t){C3X.Ei(t),map.get(this).g$(t)}get scale(){return map.get(this).S$()}set angle(t){C3X.Ei(t),map.get(this).y$(t)}get angle(){return map.get(this).GetAngle()}set scrollX(t){C3X.Si(t),map.get(this)._$(t)}get scrollX(){return map.get(this).T$()}set scrollY(t){C3X.Si(t),map.get(this).A$(t)}get scrollY(){return map.get(this).E$()}scrollTo(t,s){C3X.Si(t),C3X.Si(s);const e=map.get(this);e._$(t),e.A$(s)}I$(){const t=map.get(this);return[t.T$(),t.E$()]}w$(t){let s=map.get(this),e=null;if("number"!=typeof t&&"string"!=typeof t)throw new TypeError("expected string or number");return(e=s.jD(t))?e.R$():null}M$(){return map.get(this).b$().map(t=>t.R$())}*G$(){for(const t of map.get(this).G$())yield t.R$()}v$(t,s,e){const i=map.get(this),r=self.P$,n=(C3X.Mi(t),C3X.lr(s,r),s?i.cN().O$(s):null),h=VALID_WHERE_STRINGS.indexOf(e);if(h<0)throw new Error("invalid location");i.x$(t,n,h)}L$(t,s,e){const i=map.get(this),r=i.cN(),n=self.P$,h=(C3X.hr(t,n),r.O$(t));if(!h)throw new Error("invalid layer");C3X.lr(s,n);const o=s?r.O$(s):null,a=VALID_WHERE_STRINGS.indexOf(e);if(a<0)throw new Error("invalid location");i.D$(h,o,a)}N$(t){const s=map.get(this),e=self.P$,i=(C3X.hr(t,e),s.cN().O$(t));if(!i)throw new Error("invalid layer");const r=i.cN();s.F$(i),r.RL().l$()||r.u$()}$$(){const t=map.get(this),s=t.cN();t.k$(),s.RL().l$()||s.u$()}B$(t,s){C3X.Ei(t),C3X.Ei(s),map.get(this).W$(t,s)}H$(){return map.get(this).V$()}set J(t){C3X.Mi(t);const s=map.get(this);if("perspective"===t)s.U$();else{if("orthographic"!==t)throw new Error("invalid projection");s.j$()}}get J(){return map.get(this).X$()?"orthographic":"perspective"}}}{const C33=self.Bs,C3X=self.zs,map=new WeakMap,BLEND_MODE_TO_INDEX=new Map([["normal",0],["additive",1],["copy",3],["destination-over",4],["source-in",5],["destination-in",6],["source-out",7],["destination-out",8],["source-atop",9],["destination-atop",10]]),INDEX_TO_BLEND_MODE=new Map([...BLEND_MODE_TO_INDEX.entries()].map(t=>[t[1],t[0]])),tempColor=C33.yn(C33.Zo);self.P$=class{constructor(t){map.set(this,t);const s=[],e=t.d$(),i=e.p$().length;for(let t=0;t<i;++t)s.push(new self.C$(e,t));Object.defineProperties(this,{name:{value:t.pf(),writable:!1},layout:{value:t.RD().ED(),writable:!1},effects:{value:s,writable:!1}}),t.cN().xF(this,t)}get Y$(){const t=map.get(this).q$();return t?t.R$():null}*K$(){for(const t of map.get(this).K$())yield t.R$()}*z$(){for(const t of map.get(this).J$())yield t.R$()}*Q$(){for(const t of map.get(this).J$())for(const s of t.Z$())yield s.R$()}get index(){return map.get(this).Yx()}get isVisible(){return map.get(this).sk()}set isVisible(t){map.get(this).ek(t)}get ik(){return map.get(this).rk()}get isInteractive(){return map.get(this).nk()}set isInteractive(t){map.get(this).hk(t)}get ak(){return map.get(this).lk()}set ak(t){map.get(this).ck(!!t)}get uk(){return map.get(this).fk()}get opacity(){return map.get(this).VG()}set opacity(t){t=C33.wn(+t,0,1),isNaN(t)||map.get(this).jG(t)}set scale(t){C3X.Ei(t),map.get(this).dk(t)}get scale(){return map.get(this).pk()}set scaleRate(t){C3X.Ei(t),map.get(this).Ck(t)}get scaleRate(){return map.get(this).mk()}set angle(t){C3X.Ei(t),map.get(this).y$(t)}get angle(){return map.get(this).gk()}set parallaxX(t){C3X.Ei(t),map.get(this).Sk(t)}get parallaxX(){return map.get(this).yk()}set parallaxY(t){C3X.Ei(t),map.get(this)._k(t)}get parallaxY(){return map.get(this).Tk()}set Ak(t){C3X.Ei(t),map.get(this).Hy(t)}get Ak(){return map.get(this).Wy()}set Ek(t){map.get(this).Ik(t)}get Ek(){return map.get(this).wk()}set Rk(t){map.get(this).Mk(t)}get Rk(){return map.get(this).bk()}set FO(t){C3X.Mi(t);const s=BLEND_MODE_TO_INDEX.get(t);if("number"!=typeof s)throw new Error("invalid blend mode");map.get(this).Iy(s)}get FO(){return INDEX_TO_BLEND_MODE.get(map.get(this).Gk())}set backgroundColor(t){if(C3X.Hi(t),t.length<3)throw new Error("expected 3 elements");tempColor.aa(t[0],t[1],t[2]);const s=map.get(this),e=s.vk();e.wa(tempColor)||(e.ga(tempColor),s.cN().JD())}get backgroundColor(){const t=map.get(this).vk();return[t.Sa(),t.ya(),t._a()]}set scrollX(t){C3X.Si(t);const s=map.get(this);s.Pk(!0),s._$(t)}get scrollX(){return map.get(this).T$()}set scrollY(t){C3X.Si(t);const s=map.get(this);s.Pk(!0),s.A$(t)}get scrollY(){return map.get(this).E$()}scrollTo(t,s){C3X.Si(t),C3X.Si(s);const e=map.get(this);e.Pk(!0),e._$(t),e.A$(s)}I$(){const t=map.get(this);return[t.T$(),t.E$()]}Ok(){map.get(this).Pk(!1)}getViewport(){return map.get(this).xk().Bl()}Lk(t,s,e=0){C3X.Si(t),C3X.Si(s),C3X.Si(e);const i=map.get(this),r=i.cN();return i.Dk(t-r.Nk(),s-r.Fk(),e)}$k(t,s,e=0){C3X.Si(t),C3X.Si(s),C3X.Si(e);const i=map.get(this),r=i.cN(),[n,h]=i.kk(t,s,e);return[n+r.Nk(),h+r.Fk()]}Bk(t,s,e=0){return C3X.Si(t),C3X.Si(s),C3X.Si(e),map.get(this).Wk(t,s,e)}Hk(t,s,e=0){return C3X.Si(t),C3X.Si(s),C3X.Si(e),map.get(this).Vk(t,s,e)}get Uk(){return map.get(this).jk()}}}{let GetDispatcher2=function(t){let s=dispatchers.get(t);return s||(s=C33.yn(C33.Event.ed),dispatchers.set(t,s)),s};GetDispatcher=GetDispatcher2;const C33=self.Bs,C3X=self.zs,dispatchers=new WeakMap,internalApiToken=C33.Ws();self.Xk=class{#dF;constructor(){const t=C33.CF.pF(internalApiToken),s={runtime:{value:(this.#dF=t).cN().mF(),writable:!1},Yk:{value:t.qk().$F(),writable:!1},VF:{value:t.UF().NF(),writable:!1}};t.Kk(s),t.zk(s),Object.defineProperties(this,s),t.cN().xF(this,t)}static Jk(){return C33.CF.Qk()}Zk(){const t=dispatchers.get(this);t&&(t._n(),dispatchers.delete(this))}addEventListener(t,s,e){C3X.Mi(t),C3X.Ji(s),GetDispatcher2(this).addEventListener(t,s,e)}removeEventListener(t,s,e){C3X.Mi(t),C3X.Ji(s),GetDispatcher2(this).removeEventListener(t,s,e)}dispatchEvent(t){GetDispatcher2(this).dispatchEvent(t)}destroy(){const t=this.#dF,s=t.cN();s.tB(t),s.RL().l$()||s.wD().c$()||s.RL().sB()||s.u$()}eB(){const t=this.#dF.iB();return t?t.map(t=>t.BD()):[]}*rB(){const t=this.#dF;if(t.nB())for(const s of t.hB())yield s.BD()}get uid(){return this.#dF.oB()}get aB(){return this.#dF.lB()}get cB(){return this.#dF.uB()}set timeScale(t){C3X.Ei(t),this.#dF.tD(t)}get timeScale(){return this.#dF.fB()}dB(){this.#dF.pB()}get dt(){const t=this.#dF;return t.cN().YL(t)}CB(...t){C3X.Hi(t);const s=new Set(t),e=this.#dF.mB();return s.isSubsetOf(e)}gB(t){C3X.hr(t,Set),this.#dF.SB(t)}yB(){return new Set(this.#dF.mB())}signal(t){C3X.Mi(t);const s=this.#dF;s.cN().RL()._B(s,t)}VL(t){C3X.Mi(t);const s=this.#dF;return s.cN().RL().TB(s,t)}}}{const C33=self.Bs,C3X=self.zs,internalApiToken=C33.Ws();self.AB=class extends self.Xk{#dF;#EB=!1;#IB=null;#wB=!1;#RB=null;#MB;#bB;constructor(t){super(),this.#dF=C33.CF.pF(internalApiToken),this.#EB=!1,this.#IB=null,this.#wB=!1,this.#RB=null,this.#MB=t?.domComponentId,this.#bB=t?.wrapperComponentId}Zk(){this.GB(!1),this.vB(!1),super.Zk()}PB(){return C33.CF.OB()}xB(t){const s=this.#dF;s.cN().LB(t,s)}DB(t){const s=this.#dF;return s.cN().NB(t,s)}$B(t,s){if(C3X.Mi(t),C3X.Ji(s),!this.#MB)throw new Error("no DOM component id set");const e=this.#dF.cN();e.kB(this.#MB,t,s)}BB(t){C3X.Hi(t);for(const[s,e]of t)this.$B(s,e)}WB(t,s){if(C3X.Mi(t),!this.#MB)throw new Error("no DOM component id set");const e=this.#dF.cN();e.wf(this.#MB,t,s)}HB(t,s){if(C3X.Mi(t),!this.#MB)throw new Error("no DOM component id set");const e=this.#dF.cN();return e.ZD(this.#MB,t,s)}VB(t,s){const e=this.#dF.cN();if(!e.cL())return window.c3_runtimeInterface._OnMessageFromRuntime({type:"event",component:this.#MB,handler:t,data:s,responseId:null});this.WB(t,s)}GB(t){if(this.#EB!==(t=!!t)){this.#EB=t;const s=this.#dF.cN();if(t){if(!this.#IB)if(this.#dF.cN().UB()){const e=globalThis.C3Debugger,i=this.VF;this.#IB=()=>{const t=performance.now();this.jB(),e.AddIndividualPluginTickTime(i,performance.now()-t)}}else this.#IB=()=>this.jB();s.ed().addEventListener("tick",this.#IB)}else s.ed().removeEventListener("tick",this.#IB)}}XB(){return this.#EB}jB(){}vB(t){if(this.#wB!==(t=!!t)){this.#wB=t;const s=this.#dF.cN();if(t){if(!this.#RB)if(this.#dF.cN().UB()){const e=globalThis.C3Debugger,i=this.VF;this.#RB=()=>{const t=performance.now();this.YB(),e.AddIndividualPluginTickTime(i,performance.now()-t)}}else this.#RB=()=>this.YB();s.ed().addEventListener("tick2",this.#RB)}else s.ed().removeEventListener("tick2",this.#RB)}}qB(){return this.#wB}YB(){}KB(){return[]}zB(){return null}JB(t){}QB(){if(!this.#bB)throw new Error("no wrapper component id set");const t=this.#dF.cN();return t.ZB(this.#bB)}t4(t,s){if(C3X.Mi(t),C3X.Ji(s),!this.#bB)throw new Error("no wrapper component id set");const e=this.#dF.cN();e.s4(this.#bB,t,s)}e4(t){C3X.Hi(t);for(const[s,e]of t)this.t4(s,e)}i4(t,s){if(!this.#bB)throw new Error("no wrapper component id set");this.runtime._L.r4(this.#bB,t,s)}n4(t,s){if(this.#bB)return this.runtime._L.h4(this.#bB,t,s);throw new Error("no wrapper component id set")}}}{let MakeIWorldInstanceClass2=function(t){return class r extends t{#o4;#a4;constructor(t){super(t);const s=C33.CF.pF(internalApiToken),e=s.UD(),i=(this.#o4=s,this.#a4=e,map.set(this,s),[]),r=e.l4();if(r){const h=e.qk().d$().p$().length;for(let t=0;t<h;++t)i.push(new self.C$(r,t))}const n={effects:{value:i,writable:!1}};Object.defineProperties(this,n)}get layout(){return this.#a4.RD().ED()}get c4(){return this.#a4.jD().R$()}get x(){return this.#a4.Ny()}set x(t){t=+t;const s=this.#a4;isNaN(t)||s.Ny()===t||(s.Fy(t),s.u4())}get y(){return this.#a4.ky()}set y(t){t=+t;const s=this.#a4;isNaN(t)||s.ky()===t||(s.By(t),s.u4())}setPosition(t,s){t=+t,s=+s;const e=this.#a4;isNaN(t)||isNaN(s)||e.Ny()===t&&e.ky()===s||(e.f4(t,s),e.u4())}d4(){const t=this.#a4;return[t.Ny(),t.ky()]}C4(t,s){if(t=+t,s=+s,!(isNaN(t)||isNaN(s)||0===t&&0===s)){const e=this.#a4;e.m4(t,s),e.u4()}}get Ak(){return this.#a4.Wy()}set Ak(t){t=+t;const s=this.#o4,e=this.#a4;isNaN(t)||e.Wy()===t||(e.Hy(t),s.cN().JD())}get g4(){return this.#a4.S4()}get width(){return this.#a4.AC()}set width(t){t=+t;const s=this.#a4;isNaN(t)||s.AC()===t||(s.GC(t),s.u4())}get height(){return this.#a4.OC()}set height(t){t=+t;const s=this.#a4;isNaN(t)||s.OC()===t||(s.EC(t),s.u4())}m$(t,s){t=+t,s=+s;const e=this.#a4;isNaN(t)||isNaN(s)||e.AC()===t&&e.OC()===s||(e.cM(t,s),e.u4())}getSize(){const t=this.#a4;return[t.AC(),t.OC()]}get angle(){return this.#a4.GetAngle()}set angle(t){t=C33.Rn(+t);const s=this.#a4;isNaN(t)||s.GetAngle()===t||(s.y$(t),s.u4())}get y4(){return C33.bn(this.angle)}set y4(t){this.angle=C33.Mn(t)}Bc(){return this.#a4._4().Bl()}T4(){return this.#a4.A4().Lc()}E4(){return this.#a4.I4()}get isVisible(){return this.#a4.rk()}set isVisible(t){t=!!t;const s=this.#o4,e=this.#a4;e.rk()!==t&&(e.ek(t),s.cN().JD())}get opacity(){return this.#a4.VG()}set opacity(t){t=C33.wn(+t,0,1);const s=this.#o4,e=this.#a4;isNaN(t)||e.VG()===t||(e.jG(t),s.cN().JD())}set w4(t){if(C3X.Hi(t),t.length<3)throw new Error("expected 3 elements");tempColor.aa(t[0],t[1],t[2]);const s=this.#o4,e=this.#a4;e.R4().wa(tempColor)||(e.M4(tempColor),s.cN().JD())}get w4(){const t=this.#a4.R4();return[t.Sa(),t.ya(),t._a()]}set FO(t){C3X.Mi(t);const s=BLEND_MODE_TO_INDEX.get(t);if("number"!=typeof s)throw new Error("invalid blend mode");const e=this.#o4,i=this.#a4;i.Iy(s),e.cN().JD()}get FO(){return INDEX_TO_BLEND_MODE.get(this.#a4.Gk())}b4(){this.#a4.G4()}v4(){this.#a4.P4()}O4(t){C3X.hr(t,ILayer);const s=this.#o4,e=s.cN().O$(t);if(!e)throw new Error("invalid layer");s.UD().x4(e)}L4(t,s){C3X.hr(t,r),this.#a4.D4(map.get(t),s)}get zIndex(){return this.#a4.XD()}get N4(){return this.#a4.F4()}set N4(t){this.#a4.B4(!!t)}lc(t,s){return C3X.Si(t),C3X.Si(s),this.#a4.W4(+t,+s)}vN(t){C3X.hr(t,r);const s=this.#o4,e=map.get(t);return s.cN().tL().PN(s,e)}xN(){const t=this.#o4,s=t.cN().tL().LN(t);return s?s.BD():null}getParent(){const t=this.#o4.H4();return t?t.BD():null}V4(){const t=this.#o4.U4();return t?t.BD():null}*j4(){for(const t of this.#o4.j4())yield t.BD()}X4(){return this.#o4.Y4()}q4(t){const s=this.#o4.K4(t);return s?s.BD():null}*children(){for(const t of this.#o4.children())yield t.BD()}*z4(){for(const t of this.#o4.z4())yield t.BD()}J4(t,s){C3X.hr(t,r),C3X.Di(s),s=s||{};const e=this.#o4,i=map.get(t);e.Q4(i,s)}removeChild(t){C3X.hr(t,r);const s=this.#o4,e=map.get(t);s.Z4(e)}t5(){const t=this.#o4;if(t.s5()){const s=t.H4();s.Z4(t)}}e5(){const t=this.#a4;return{i5:t.r5(),n5:t.h5(),o5:t.a5(),l5:t.c5(),u5:t.f5(),d5:t.p5(),C5:t.m5(),g5:t.S5(),y5:t._5()}}T5(t,s){C3X.Ei(t),C3X.Ei(s),this.#a4.A5(t,s)}E5(){const t=this.#a4;t.I5(),t.u4()}w5(t,s,e){C3X.Ei(t),C3X.Ei(s),C3X.Li(e);const i=this.#a4;i.R5(t,s,e)&&i.u4()}M5(t,s){let e=NaN,i=NaN,r=NaN,n=NaN,h=NaN,o=this.#a4;if(o.b5()){const a=o.G5(),l=a.A_(t,s);null!==l&&(e=l.Ny(),i=l.ky(),r=l.Wy(),n=l.Vy(),h=l.jy())}return{x:e,y:i,Ak:r,u:n,v:h}}v5(){const t=this.#a4;if(!t.b5())return[0,0];const s=t.G5();return[s.u_(),s.f_()]}}};MakeIWorldInstanceClass=MakeIWorldInstanceClass2;const C33=self.Bs,C3X=self.zs,IInstance=self.Xk,ILayer=self.P$,map=new WeakMap,internalApiToken=C33.Ws(),BLEND_MODE_TO_INDEX=new Map([["normal",0],["additive",1],["copy",3],["destination-over",4],["source-in",5],["destination-in",6],["source-out",7],["destination-out",8],["source-atop",9],["destination-atop",10]]),INDEX_TO_BLEND_MODE=new Map([...BLEND_MODE_TO_INDEX.entries()].map(t=>[t[1],t[0]])),tempColor=C33.yn(C33.Zo);self.P5=MakeIWorldInstanceClass2(self.Xk),self.O5=MakeIWorldInstanceClass2(self.AB)}{const C33=self.Bs,C3X=self.zs;self.x5=class extends self.P5{#dF;constructor(){super(),this.#dF=self.Xk.Jk()}L5(){return this.#dF.N5().D5()}focus(){this.#dF.N5().F5()}blur(){this.#dF.N5().k5()}B5(t,s){C3X.Mi(t),this.#dF.N5().W5(t,s)}}}{let GetDispatcher2=function(t){let s=dispatchers.get(t);return s||(s=C33.yn(C33.Event.ed),dispatchers.set(t,s)),s};GetDispatcher=GetDispatcher2;const C33=self.Bs,C3X=self.zs,dispatchers=new WeakMap,internalApiToken=C33.Ws();self.H5=class{#dF;constructor(){const t=C33.CF.pF(internalApiToken),s={runtime:{value:(this.#dF=t).cN().mF(),writable:!1},behavior:{value:t.U5().V5(),writable:!1},j5:{value:t.Y5().X5(),writable:!1}};Object.defineProperties(this,s),t.cN().xF(this,t)}static Jk(){return C33.CF.Qk()}get q5(){return this.#dF.K5().BD()}Zk(){const t=dispatchers.get(this);t&&(t._n(),dispatchers.delete(this))}addEventListener(t,s,e){C3X.Mi(t),C3X.Ji(s),GetDispatcher2(this).addEventListener(t,s,e)}removeEventListener(t,s,e){C3X.Mi(t),C3X.Ji(s),GetDispatcher2(this).removeEventListener(t,s,e)}dispatchEvent(t){GetDispatcher2(this).dispatchEvent(t)}}}{const C33=self.Bs,C3X=self.zs,internalApiToken=C33.Ws();self.z5=class{constructor(){const t=C33.CF.pF(internalApiToken),s={runtime:{value:t.cN().mF(),writable:!1},behavior:{value:t.U5().V5(),writable:!1},name:{value:t.pf(),writable:!1}};Object.defineProperties(this,s)}}}{const C33=self.Bs,C3X=self.zs,internalApiToken=C33.Ws();self.J5=class{#dF;constructor(){const t=C33.CF.pF(internalApiToken),s={runtime:{value:(this.#dF=t).cN().mF(),writable:!1}};Object.defineProperties(this,s),t.cN().xF(this,t)}jF(){return this.#dF.t$().map(t=>t.BD())}static LF(t){if(!t)return null;const s=C33.CF.Q5(t);return s?s.V5():null}}}{const C33=self.Bs,C3X=self.zs,tempColor=C33.yn(C33.Zo);self.C$=class{#dF;constructor(t,s){this.#dF=t;const e={index:{value:s,writable:!1}};Object.defineProperties(this,e)}get name(){const t=this.#dF.p$();return t[this.index].pf()}get isActive(){return this.#dF.Z5(this.index)}set isActive(t){t=!!t;const s=this.#dF;s.Z5(this.index)!==t&&(s.tW(this.index,t),s.sW(),s.cN().JD())}setParameter(t,s){C3X.Ei(t),t=Math.floor(+t);const e=this.#dF,i=e.eW(this.index,t);if(null===i)throw new RangeError("invalid index");if(i instanceof C33.Zo){if(!Array.isArray(s)||s.length<3)throw new TypeError("expected array with 3 elements");tempColor.aa(s[0],s[1],s[2]),s=tempColor}else if("number"!=typeof s)throw new TypeError("expected number");const r=e.iW(this.index,t,s);r&&e.Z5(this.index)&&e.cN().JD()}getParameter(t){C3X.Ei(t),t=Math.floor(+t);const s=this.#dF,e=s.eW(this.index,t);if(null===e)throw new RangeError("invalid index");return e instanceof C33.Zo?[e.Sa(),e.ya(),e._a()]:e}}}{const C33=self.Bs,C3X=self.zs;self.rW=class{#dF;constructor(t){this.#dF=t,Object.defineProperties(this,{name:{value:t.pf(),writable:!1}})}get speed(){return this.#dF.nW()}get isLooping(){return this.#dF.hW()}get repeatCount(){return this.#dF.oW()}get aW(){return this.#dF.lW()}get cW(){return this.#dF.uW()}get frameCount(){return this.#dF.fW()}dW(){return this.#dF.pW().map(t=>t.mW())}*frames(){for(const t of this.#dF.pW())yield t.mW()}}}{const C33=self.Bs,C3X=self.zs;self.aN=class{#dF;constructor(t){this.#dF=t}static oN(t){return t.#dF}get width(){return this.#dF.AC()}get height(){return this.#dF.OC()}getSize(){const t=this.#dF;return[t.AC(),t.OC()]}gW(t){return t.SW(this)}yW(){return this.#dF.WM().Bl()}}}{const C33=self.Bs,C3X=self.zs;self._W=class extends self.aN{#dF;constructor(t){super(t.TW()),this.#dF=t,Object.defineProperties(this,{duration:{value:t.AW(),writable:!1},EW:{value:t.IW(),writable:!1},wW:{value:t.RW(),writable:!1}})}MW(){const t=this.#dF;return[t.IW(),t.RW()]}bW(){return this.#dF.GW()}vW(t){return this.PW(t)[0]}OW(t){return this.PW(t)[1]}PW(t){let s=this.#dF,e=null;if("number"==typeof t)e=s.xW(Math.floor(t));else{if("string"!=typeof t)throw new TypeError("expected string or number");e=s.LW(t)}return e?[e.Ny(),e.ky()]:this.MW()}DW(){const t=this.#dF.NW();return t?t.eu():0}FW(t){return this.$W(t)[0]}kW(t){return this.$W(t)[1]}$W(t){C3X.Ei(t),t=Math.floor(t);const s=this.#dF.NW();if(!s||t<0||t>=s.eu())return[0,0];const e=s.su(),i=e[2*t],r=e[2*t+1];return[i,r]}get tag(){return this.#dF.BW()}}}{let GetTimelineState2=function(t){const s=map.get(t);if(s.WW())throw new Error("timeline/tween was released and is no longer valid");return s};GetTimelineState=GetTimelineState2;const C33=self.Bs,C3X=self.zs,map=new WeakMap;self.HW=class{constructor(t){map.set(this,t),t.cN().xF(this,t)}pause(){GetTimelineState2(this).VW()}resume(){GetTimelineState2(this).UW()}stop(){GetTimelineState2(this).vd()}CB(t){return GetTimelineState2(this).jW(t)}set time(t){C3X.Ei(t),GetTimelineState2(this).XW(t)}get time(){return GetTimelineState2(this).AP()}set totalTime(t){C3X.Ei(t),GetTimelineState2(this).YW(t)}get totalTime(){return GetTimelineState2(this).qW()}set isLooping(t){GetTimelineState2(this).KW(!!t)}get isLooping(){return GetTimelineState2(this).zW()}set cW(t){GetTimelineState2(this).JW(!!t)}get cW(){return GetTimelineState2(this).QW()}set playbackRate(t){C3X.Ei(t),GetTimelineState2(this).ZW(t)}get playbackRate(){return GetTimelineState2(this).tH()}get progress(){const t=GetTimelineState2(this);return t.AP()/t.qW()}get tags(){return GetTimelineState2(this).sH()}get finished(){return GetTimelineState2(this).eH()}get isPlaying(){return GetTimelineState2(this).IsPlaying()}get iH(){return GetTimelineState2(this).rH()}get nH(){return map.get(this).WW()}}}{let GetTimelineState2=function(t){const s=map.get(t);if(s.WW())throw new Error("timeline was released and is no longer valid");return s},C33=(GetTimelineState=GetTimelineState2,self.Bs),C3X=self.zs,map=new WeakMap,easeToIndexFunc=null;self.hH=class extends self.HW{constructor(t){super(t),map.set(this,t);const s={name:{value:t.pf(),writable:!1}};Object.defineProperties(this,s)}}}{let GetTweenState2=function(t){const s=map.get(t);if(s.WW())throw new Error("tween was released and is no longer valid");return s},C33=(GetTweenState=GetTweenState2,self.Bs),C3X=self.zs,map=new WeakMap,behInstMap=new WeakMap,easeToIndexFunc=null;self.oH=class extends self.HW{constructor(t,s,e){super(t),easeToIndexFunc=easeToIndexFunc||e.aH,map.set(this,t),s&&behInstMap.set(this,s)}stop(){const t=GetTweenState2(this),s=behInstMap.get(this);s.lH(t)}cH(t){C3X.Mi(t);const s=self.vu.Yu(easeToIndexFunc(t));GetTweenState2(this).uH(s)}get q5(){const t=GetTweenState2(this).fH();return t?t.BD():null}get dH(){return GetTweenState2(this).pH()}set dH(t){GetTweenState2(this).CH(!!t)}get value(){const t=GetTweenState2(this);if("value"!==t.mH())throw new Error("not a value tween");return t.SH("value").gH()}}}{const C33=self.Bs,C3X=self.zs;self.yH=class extends self.fF{constructor(){super()}}}{const C33=self.Bs,C3X=self.zs,internalApiToken=C33.Ws();self._H=class extends self.yH{#dF;#MB;#TH=0;#AH=new Map;constructor(t){if(super(),this.#dF=C33.CF.pF(internalApiToken),!t?.domComponentId)throw new Error("no DOM component ID specified");this.#MB=t.domComponentId,this.EH("elem-focused",t=>t.IH()),this.EH("elem-blurred",t=>{t&&t.wH()})}RH(t){const s=this.#TH++;return this.#AH.set(s,t),s}MH(t){this.#AH.delete(t)}EH(t,e){const s=this.#dF.cN();s.kB(this.#MB,t,t=>{const s=this.#AH.get(t.elementId);e(s,t)})}bH(t){C3X.Hi(t);for(const[s,e]of t)this.bH(s,e)}}}{const C33=self.Bs,C3X=self.zs,map=new WeakMap,internalApiToken=C33.Ws();self.GH=class extends self.HF{#dF;constructor(){super(),this.#dF=C33.CF.pF(internalApiToken)}vH(){}PH(){return this.#dF.TW().OH()}xH(t){}LH(t){}DH(){}NH(t){}}}{const C33=self.Bs,C3X=self.zs,map=new WeakMap,internalApiToken=C33.Ws();self.FH=class extends self.O5{#dF;#$H=null;#kH=null;constructor(t){super(t),this.#dF=C33.CF.pF(internalApiToken)}Zk(){if(super.Zk(),this.#$H){const t=this.#dF.cN().ed();t.removeEventListener("renderercontextlost",this.#$H),t.removeEventListener("renderercontextrestored",this.#kH),this.#$H=null,this.#kH=null}}BH(){if(!this.#$H){this.#$H=()=>this.WH(),this.#kH=()=>this.HH();const t=this.#dF.cN().ed();t.addEventListener("renderercontextlost",this.#$H),t.addEventListener("renderercontextrestored",this.#kH)}}WH(){}HH(){}VH(t){}}}{const C33=self.Bs,C3X=self.zs,tempRect=C33.yn(C33.Rect),map=new WeakMap,internalApiToken=C33.Ws();self.UH=class extends self.FH{#jH=-1;#XH=!0;#YH=!1;#qH=!1;#KH=-.2;#zH=C33.yn(C33.Rect,0,0,-1,-1);#JH=0;#QH=0;#ZH=-1;#tV=-1;#sV=!1;constructor(t){if(!t?.domComponentId)throw new Error("no DOM component ID specified");super(t);const s=C33.CF.pF(internalApiToken),e=(map.set(this,s),this.#jH=this.VF.RH(this),s.cN().QN());this.#JH=e.eV(),this.#QH=e.iV(),this.GB(!0)}Zk(){super.Zk(),this.VF.MH(this.#jH),this.rV("destroy"),this.#jH=-1,map.delete(this)}nV(){const t=map.get(this).cN();if(t.cL())throw new Error("not valid in worker mode");return this.hV("get-element")}rV(t,s){(s=s||{}).elementId=this.#jH,this.WB(t,s)}hV(t,s){return(s=s||{}).elementId=this.#jH,this.VB(t,s)}oV(t,s){return(s=s||{}).elementId=this.#jH,this.HB(t,s)}aV(t){t=t||{};const s=map.get(this).UD();t.elementId=this.#jH,t.isVisible=s.rk(),t.htmlIndex=s.jD().lV(),t.htmlZIndex=s.cV(),Object.assign(t,this.uV()),this.#XH=!!t.isVisible,this.VB("create",t),this.fV(!0)}dV(t){this.#XH!==(t=!!t)&&(this.#XH=t,this.rV("set-visible",{isVisible:t}))}jB(){this.fV(!1)}pV(){const t=map.get(this).cN(),s=t.QN().CV();return"Android"===C33.pe.Ce&&("scale-inner"===s||"scale-outer"===s||"crop"===s)}fV(c){const u=map.get(this);if(!u.mV()){let t=u.UD(),s=t.jD(),e=t._4(),[i,r]=s.kk(e.Nl(),e.Fl()),[n,h]=s.kk(e.$l(),e.kl()),o=u.cN().QN(),a=o.eF(),l=o.rF();if(t.rk()&&s.rk())if(!this.pV()&&(n<=0||h<=0||a<=i||l<=r))this.dV(!1);else{tempRect.set(i,r,n,h);const f=o.eV(),d=o.iV(),p=s.lV(),C=t.cV();if(!c&&tempRect.equals(this.#zH)&&this.#JH===f&&this.#QH===d&&this.#ZH===p&&this.#tV===C)this.dV(!0);else{this.#zH.I(tempRect),this.#JH=f,this.#QH=d,this.#ZH=p,this.#tV=C,this.dV(!0);let t=null;this.#qH&&(t=s.gV()+this.#KH),this.rV("update-position",{left:Math.round(this.#zH.Nl()),top:Math.round(this.#zH.Fl()),width:Math.round(this.#zH.width()),height:Math.round(this.#zH.height()),htmlIndex:p,htmlZIndex:C,fontSize:t})}}else this.dV(!1)}}SV(){this.hV("focus",{focus:!0})}yV(){this.hV("focus",{focus:!1})}IH(){this.#YH=!0}wH(){this.#YH=!1}_V(){return this.#YH}TV(t,s){this.postToDOMElement("set-css-style",{prop:C33.zo(t),val:s})}AV(t,s){this.postToDOMElement("set-attribute",{name:t,val:s})}EV(t){this.postToDOMElement("remove-attribute",{name:t})}IV(){this.#sV||(this.#sV=!0,Promise.resolve().then(()=>{this.#sV=!1,this.rV("update-state",this.uV())}))}uV(){}wV(){return this.#jH}}}{const C33=self.Bs,C3X=self.zs;self.RV=class extends self.J5{constructor(){super()}}}{const C33=self.Bs,C3X=self.zs;self.MV=class extends globalThis.z5{constructor(){super()}vH(){}}}{const C33=self.Bs,C3X=self.zs,map=new WeakMap,internalApiToken=C33.Ws();self.bV=class extends self.H5{#EB=!1;#wB=!1;#GV=!1;constructor(){super(),map.set(this,C33.CF.pF(internalApiToken))}Zk(){super.Zk(),this.GB(!1),this.vB(!1),this.vV(!1),map.delete(this)}PB(){return C33.CF.OB()}PV(){}xB(t){const s=map.get(this);s.cN().LB(t,s.K5(),s.Y5())}DB(t){const s=map.get(this);return s.cN().NB(t,s.K5(),s.Y5())}GB(t){if(this.#EB!==(t=!!t)){this.#EB=t;const s=map.get(this).cN();t?s.OV(this):s.xV(this)}}XB(){return this.#EB}jB(){}vB(t){if(this.#wB!==(t=!!t)){this.#wB=t;const s=map.get(this).cN();t?s.LV(this):s.DV(this)}}qB(){return this.#wB}YB(){}vV(t){if(this.#GV!==(t=!!t)){this.#GV=t;const s=map.get(this).cN();t?s.NV(this):s.FV(this)}}$V(){return this.#GV}kV(){}KB(){return[]}zB(){return null}JB(t){}}}{let C33=self.Bs,C3X=self.zs,runtime=null;self.TL=class{constructor(t){runtime=t}eN(t){runtime.iN(t)}r4(t,s,e){C3X.Mi(t),C3X.Mi(s),C3X.Vi(e),runtime.BV(t,s,e)}h4(t,s,e){return C3X.Mi(t),C3X.Mi(s),C3X.Vi(e),runtime.WV(t,s,e)}HV(t){return C3X.bi(t),new self.VV(runtime,t)}set UV(t){runtime.jV(!!t)}get UV(){return runtime.XV()}YV(t){runtime.qV(!!t)}KV(t){C3X.Si(t);const s=runtime.zV(t);return s?s.$F():null}}}{const C33=self.Bs,C3X=self.zs;self.VV=class{#JV;#QV;#ZV;#tU;#sU;#eU;constructor(t,s){const e=(this.#JV=t).RL(),i=t.OL(),r=(this.#QV=i,this.#ZV=i.iU(),t.kL()),n=(this.#tU=r.rU(),this.#sU=r.nU(i),e.hU()),h=n.nU();this.#eU=h,s&&h.oU(s),t.aU(!1)}lU(){const t=this.#JV.RL(),s=this.#ZV,e=this.#eU;t.cU(s),this.#QV.uU(this.#tU,this.#sU),t.fU(s),e.dU(e.Yx()+1)}get pU(){return this.#eU.CU()}release(){const t=this.#JV,s=t.kL(),e=t.RL().hU();t.aU(!0),e.mU(),s.mU()}}}{let C33=self.Bs,C3X=self.zs,renderer=null,runtime=null;self.gU=class{constructor(t,s){runtime=t,renderer=s}SU(){renderer.QG()}yU(t){renderer.zG(t)}_U(){renderer.ag()}TU(){renderer.eg()}AU(){renderer.mg()}setColor(t){renderer.UG(t[0],t[1],t[2],t[3])}EU(t,s,e,i){renderer.UG(t,s,e,i)}IU(){renderer.XG()}wU(t){renderer.jG(t)}RU(t){renderer.Fg(t)}MU(){renderer.$g()}rect(t){renderer.sv(t.left,t.top,t.right,t.bottom)}bU(t,s,e,i){renderer.sv(t,s,e,i)}GU(t){renderer.dc(C33.dc.Dc(t))}vU(t,s,e,i,r,n,h,o){renderer.TS(t,s,e,i,r,n,h,o)}PU(t,s){renderer.qg(C33.dc.Dc(t),C33.Rect.Wl(s))}OU(t,s){renderer.hv(C33.dc.Dc(t),C33.dc.Dc(s))}xU(t,s,e,i,r,n,h,o,a,l,c,u,f){renderer.ov(t,s,e,i,r,n,h,o,a,l,c,u,C33.Rect.Wl(f))}LU(t,s,e,i,r,n,h,o,a,l,c,u,f){renderer.Vg(t,s,e,i,r,n,h,o,a,l,c,u,C33.dc.Dc(f))}DU(t,s,e){renderer.av(t,s,e)}NU(t){renderer._S(t)}line(t,s,e,i){renderer.FC(t,s,e,i)}FU(t,s,e,i,r,n){renderer.Ug(t,s,e,i,r,n)}$U(t,s,e,i){renderer.Kg(t,s,e,i)}kU(t){renderer.Zg(C33.Rect.Wl(t))}BU(t){renderer.tS(C33.dc.Dc(t))}WU(t){renderer.hS(t)}HU(){renderer.oS()}VU(t){renderer.uS(t)}UU(){renderer.CS()}jU(t){C3X.lr(t,self.XU);const s=t?runtime.O$(t):null;renderer.qG(s)}YU(t,s){const e=self.aN.oN(t);if(e)return e.qU(renderer,{x_:s?.x_??"clamp-to-edge",L_:s?.L_??"clamp-to-edge",D_:s?.D_??"trilinear",k_:s?.k_??!0});throw new Error("invalid IImageInfo")}KU(t){const s=self.aN.oN(t);if(!s)throw new Error("invalid IImageInfo");s.PR()}SW(t){const s=self.aN.oN(t);if(!s)throw new Error("invalid IImageInfo");const e=s.KT();return self.XU.zU(runtime,e)}JU(t,s,e){C3X.Ei(t),C3X.Ei(s);const i=renderer.kT(t,s,{x_:e?.x_??"clamp-to-edge",L_:e?.L_??"clamp-to-edge",D_:e?.D_??"trilinear",k_:e?.k_??!0});return self.XU.zU(runtime,i)}QU(t,s,e){C3X.hr(s,self.XU);const i=runtime.O$(s);renderer.BM(t,i,{premultiplyAlpha:e?.premultiplyAlpha??!0})}deleteTexture(t){C3X.hr(t,self.XU);const s=runtime.O$(t);renderer.VT(s)}ZU(){const t=renderer.NS();return new self.tj(runtime,t)}sj(){runtime.QN().ej(renderer)}ij(t){C3X.hr(t,globalThis.P$);const s=runtime.O$(t);s.rj(renderer)}}}{const C33=self.Bs,C3X=self.zs,map=new WeakMap,reverseMap=new WeakMap;self.XU=class{constructor(t,s){map.set(this,{runtime:t,nj:s}),reverseMap.set(s,this),t.xF(this,s),Object.defineProperties(this,{width:{value:s.AC(),writable:!1},height:{value:s.OC(),writable:!1}})}static zU(t,s){if(!s)return null;const e=reverseMap.get(s);return e||new self.XU(t,s)}}}{let getActual2=function(t){return map.get(t).hj};getActual=getActual2;const C33=self.Bs,C3X=self.zs,map=new WeakMap;self.tj=class{constructor(t,s){map.set(this,{runtime:t,hj:s}),t.xF(this,s)}release(){getActual2(this)._n()}set oj(t){C3X.Mi(t),getActual2(this).kR(t)}get oj(){return getActual2(this).Hw()}set aj(t){C3X.Ei(t),getActual2(this).BR(t)}get aj(){return getActual2(this).WR()}set lineHeight(t){C3X.Ei(t),getActual2(this).VR(t)}get lineHeight(){return getActual2(this).UR()}set lj(t){getActual2(this).jR(t)}get lj(){return getActual2(this).YR()}set cj(t){getActual2(this).qR(t)}get cj(){return getActual2(this).KR()}setColor(t){C3X.Hi(t),this.uj(t[0],t[1],t[2])}uj(t,s,e){getActual2(this).tM(t,s,e)}fj(t){C3X.Mi(t),getActual2(this).wy(t)}set dj(t){getActual2(this).sM(t)}get dj(){return getActual2(this).eM()}set verticalAlign(t){getActual2(this).iM(t)}get verticalAlign(){return getActual2(this).rM()}set pj(t){getActual2(this).nM(t)}get pj(){return getActual2(this).hM()}set Cj(t){getActual2(this).oM(t)}get Cj(){return getActual2(this).aM()}set text(t){C3X.Mi(t),getActual2(this).Rf(t)}get text(){return getActual2(this).lM()}m$(t,s,e){C3X.Ei(t),C3X.Ei(s),C3X.Ei(e),getActual2(this).cM(t,s,e)}gW(){const{runtime:t,hj:s}=map.get(this),e=s.KT();return self.XU.zU(t,e)}yW(){return getActual2(this).WM().Bl()}mj(t){C3X.Ji(t),getActual2(this).xR=t}gj(){getActual2(this).PR()}get Sj(){return getActual2(this).fM()}get yj(){return getActual2(this).pM()}}}{let GetTypeFromFileExtension2=function(t){if(!t)return"";const s=t.split(".");if(s.length<2)return"";const e=s.at(-1).toLowerCase();return EXT_TO_TYPE.get(e)||""},AddScript2=function(i){return new Promise((t,s)=>{const e=document.createElement("script");e.onload=t,e.onerror=s,e.async=!1,e.type="module",e.src=i,document.head.appendChild(e)})};GetTypeFromFileExtension=GetTypeFromFileExtension2,AddScript=AddScript2;const C33=self.Bs,VALID_LOAD_POLICIES=new Set(["local","remote"]),EXT_TO_TYPE=new Map([["mp4","video/mp4"],["webm","video/webm"],["m4a","audio/mp4"],["mp3","audio/mpeg"],["js","application/javascript"],["wasm","application/wasm"],["svg","image/svg+xml"],["html","text/html"]]);C33._j=class extends C33.gn{constructor(t,s){super();const e=s.exportType,i=(this.Af=t,this.Tj="folders",this.Aj=new Map,this.Ej="cordova"===e,this.Ij=!!s.isiOSCordova,this.wj=!!s.isFileProtocol,this.Rj=s.swClientId,this.Mj=s.supportedAudioFormats||{},this.bj=new Map,this.Gj=!1,this.vj=s.scriptFolder,this.Pj="",this.Oj="",this.xj="",this.Lj=s.fileMap||new Map,this.Dj=new Map,"html5"===e||"scirra-arcade"===e||"instant-games"===e);this.Nj=i?"remote":"local",this.Fj=new Map,this.$j=[],this.kj=[],this.Bj=!1,this.Wj=0,this.Hj=0,this.Vj=0,this.Uj=!1,this.jj=C33.yn(C33.W0,()=>this.Xj(),50),this.Yj=C33.yn(C33.O0,Math.max(C33.hardwareConcurrency,8)),this.qj=C33.yn(C33.O0,20),this.Kj=new self.rN(this)}_n(){for(const t of this.Fj.values())t._n();this.Fj.clear(),C33.qh(this.kj),this.Af=null}cN(){return this.Af}zj(t){this.Tj=t}SN(){return this.Tj}Jj(){return this.vj}Qj(t){this.Pj=t}TN(){return this.Pj}Zj(t){this.Oj=t}tX(){return this.Oj}sX(t){this.xj=t}eX(){return this.xj}iX(){return this.wj}Lo(t,s){return s=s||this.Nj,C33.Go(t)?("flat"===this.Tj&&(t=t.toLowerCase()),this.Ej&&this.wj?this.rX(t):"playable-ad-single-file"===this.Af.qN()?self.c3_runtimeInterface._PlayableAdFetchBlob(t):("local"===s?this.Yj:this.qj).Mu(()=>C33.Lo(t))):C33.Lo(t)}Do(t){return C33.Go(t)?("flat"===this.Tj&&(t=t.toLowerCase()),this.Ej&&this.wj?this.nX(t):"playable-ad-single-file"===this.Af.qN()?C33.Fo(self.c3_runtimeInterface._PlayableAdFetchBlob(t)):("local"===this.Nj?this.Yj:this.qj).Mu(()=>C33.Do(t))):C33.Do(t)}Oo(t){return C33.Go(t)?("flat"===this.Tj&&(t=t.toLowerCase()),this.Ej&&this.wj?this.hX(t):"playable-ad-single-file"===this.Af.qN()?C33.$o(self.c3_runtimeInterface._PlayableAdFetchBlob(t)):("local"===this.Nj?this.Yj:this.qj).Mu(()=>C33.Oo(t))):C33.Oo(t)}async xo(t){const s=await this.Oo(t);return JSON.parse(s)}aX(t,s){return"flat"===this.Tj&&(t=t.toLowerCase()),this.Af.ZD("runtime","cordova-fetch-local-file",{filename:t,as:s})}hX(t){return this.aX(t,"text")}async rX(t){const s=await this.aX(t,"buffer"),e=GetTypeFromFileExtension2(t);return new Blob([s],{type:e})}async lX(t){"flat"===this.Tj&&(t=t.toLowerCase());let s=this.Aj.get(t);if(!s){const e=await this.rX(t);s=URL.createObjectURL(e),this.Aj.set(t,s)}return s}nX(t){return this.aX(t,"buffer")}yN(t){"flat"===this.Tj&&(t=t.toLowerCase());let s=this.Pj+t;return"Gecko"===C33.pe._e&&"preview"===this.Af.qN()?this.cX(s):s}mN(t){return C33.bo(t)?Promise.resolve(t):this.Ej&&this.wj?this.lX(t):"playable-ad-single-file"===this.Af.qN()?URL.createObjectURL(self.c3_runtimeInterface._PlayableAdFetchBlob(t)):("flat"===this.Tj&&(t=t.toLowerCase()),Promise.resolve(t))}uX(s){if(C33.bo(s)||"preview"!==this.Af.qN()||!this.Rj||!s)return s;try{const t=new URL(s,location.href);return t.searchParams.set("__c3_client_id",this.Rj),t.toString()}catch(t){return console.warn("Invalid iframe URL: "+s),s}}fX(t){return this.mN(t)}dX(t){if(t.pX&&!VALID_LOAD_POLICIES.has(t.pX))throw new Error("invalid load policy");let s=this.Fj.get(t.url);return s||(s=C33.yn(C33.CX,this,{url:t.url,size:t.size||0,pX:t.pX||this.Nj}),this.Fj.set(s.mX(),s),this.Bj)||(this.Wj+=s.Tu(),this.kj.push(s.gX().then(()=>this.SX(s.Tu())))),s}yX(t){this.Fj.delete(t.mX())}async _X(){try{await Promise.all(this.kj),this.Vj=1}catch(t){console.error("Error loading: ",t),this.Uj=!0,this.Xj()}}TX(){this.Bj=!0}AX(){return this.Uj}SX(t){this.Hj+=t,this.jj.Z0()}Xj(){const t=C33.yn(C33.Event,"loadingprogress");this.Vj=C33.wn(this.Hj/this.Wj,0,1),t.progress=this.Vj,this.Af.ed().dispatchEvent(t)}SD(){return this.Vj}_D(){return this.Af.IX().EX()}wX(t){C33.Qh(this.$j,t),this.$j.length&&this.kj.push(this.RX())}async RX(){const t=[],s=[];for(const[e,i,r]of this.$j)this.Wj+=r,t.push(this.MX(e,i,s).then(()=>this.SX(r)));await Promise.all(t),this.Af.cL()&&0<s.length&&await this.Af.ZD("runtime","load-webfonts",{webfonts:s})}async MX(s,e,i){try{let t=await this.mN(e);"Gecko"===C33.pe._e&&(s=`'${s}'`),("Gecko"===C33.pe._e&&"preview"===this.Af.qN()||"playable-ad-single-file"===this.Af.qN())&&(t=this.cX(t));const r=new FontFace(s,`url('${t}')`);(this.Af.cL()?self:document).fonts.add(r),await r.load(),this.Af.cL()&&i.push({name:s,url:t})}catch(t){console.warn(`[C3 runtime] Failed to load web font '${s}': `,t)}}bX(t){return!!this.Mj[t]}GX(t,s){this.Gj=!!s;for(const[e,i,r]of t)this.bj.set(e,{fileName:e,vX:i.map(t=>({type:t[0],PX:t[1],OX:e+t[1],fileSize:t[2]})),isMusic:r})}xX(t){"flat"===this.Tj&&(t=t.toLowerCase());const s=this.bj.get(t);if(!s)return null;let e=null;for(const i of s.vX)if(e||"audio/webm; codecs=opus"!==i.type||(e=i),this.bX(i.type))return i;return e}LX(t){const s=this.xX(t);return s?{url:this.yN(s.OX),type:s.type}:null}DX(){if(this.Gj){const t=[];for(const s of this.bj.values())if(!s.isMusic){const e=this.xX(s.fileName);e&&t.push({originalUrl:s.fileName,url:this.yN(e.OX),type:e.type,fileSize:e.fileSize})}return t}return[]}NX(t){return"preview"===this.Af.qN()&&(t=new URL(t,location.href).toString()),this.Lj.get(t)||null}cX(t){let s=this.Dj.get(t);if(!s){const e=this.NX(t);if(!e)return t;s=URL.createObjectURL(e),this.Dj.set(t,s)}return s}zx(){return this.Kj}async IN(...t){const s=await Promise.all(t.map(t=>this.mN(t)));if(this.Af.cL())if(1===t.length){const e=t[0];await import((C33.Go(e)?"./":"")+e)}else{const i=t.map(t=>`import "${C33.Go(t)?"./":""}${t}";`).join("\n"),r=URL.createObjectURL(new Blob([i],{type:"application/javascript"}));await import(r)}else await Promise.all(s.map(t=>AddScript2(t)))}async RN(t){if(WebAssembly.compileStreaming){const s=await this.mN(t);return WebAssembly.compileStreaming(fetch(s))}{const e=await C33.Do(t);return WebAssembly.compile(e)}}async bN(t){const s=await this.mN(t);return this.Af.ZD("runtime","add-stylesheet",{url:s})}}}{const C33=self.Bs;C33.FX=class extends C33.gn{constructor(t,s){super(),this.$X=t,this.Af=t.cN(),this.kX=s.url||"",this.BX=s.size,this.WX=s.pX,this.HX=s.blob||null,this.VX=!!this.HX,this.s1=null}_n(){this.s1=null,this.$X=null,this.Af=null,this.HX=null}mX(){return this.kX}Tu(){return this.BX}gX(){return"local"===this.WX||this.HX?(this.VX=!0,Promise.resolve()):(this.s1||(this.s1=this.$X.Lo(this.kX,this.WX).then(t=>(this.VX=!0,this.s1=null,this.HX=t)).catch(t=>{console.error("Error loading resource: ",t),this.s1=null})),this.s1)}UX(){return this.VX}jX(){return this.HX?Promise.resolve(this.HX):this.s1||this.$X.Lo(this.kX,this.WX)}}}{const C33=self.Bs,promiseThrottle=new C33.O0,allImageAssets=new Set;C33.CX=class extends C33.FX{constructor(t,s){super(t,s),this.XX=null,this.YX=null,this.P3=0,this.qX=-1,this.KX=-1,allImageAssets.add(this)}_n(){if(0!==this.P3)throw new Error("released image asset which still has texture references");this.$X.yX(this),this.XX=null,allImageAssets.delete(this),super._n()}static zX(){for(const t of allImageAssets)t.XX=null,t.YX=null,t.P3=0}qU(t,s){return s=s||{},this.P3++,this.YX?Promise.resolve(this.YX):(this.XX||(s.N_=this.Af.QN().JX(),this.XX=this.QX(t,s)),this.XX)}async QX(s,e){try{const i=await this.jX();return 0===this.P3?this.XX=null:await promiseThrottle.Mu(async()=>{const t=await s.Dv(i,e);return this.XX=null,0===this.P3?(s.VT(t),null):(this.YX=t,this.qX=t.AC(),this.KX=t.OC(),this.YX)})}catch(t){throw console.error("Failed to load texture: ",t),t}}PR(){if(this.P3<=0)throw new Error("texture released too many times");if(this.P3--,0===this.P3&&this.YX){const t=this.YX.JS();t.VT(this.YX),this.YX=null}}ZX(){return this.P3}KT(){return this.YX}AC(){return this.qX}OC(){return this.KX}async t6(){const t=await this.jX();return C33.Xe.ImageBitmap?createImageBitmap(t):C33.Bo(t)}}}{let SortByInstLastCachedZIndex2=function(t,s){return t.UD().s6()-s.UD().s6()};SortByInstLastCachedZIndex=SortByInstLastCachedZIndex2;const C33=self.Bs,assert=self.assert;C33.e6=class extends C33.gn{constructor(t,s,e){super(),this.i6=t,this.fl=s,this.dl=e,this.r6=[],this.n6=!0,this.h6=new Set,this.o6=!1}_n(){C33.qh(this.r6),this.h6.clear(),this.i6=null}vd(){C33.qh(this.r6),this.n6=!0,this.h6.clear(),this.o6=!1}a6(){this.n6=!1}Su(){if(this.r6.length){if(this.r6.length>this.h6.size)return!1;this.l6()}return!0}c6(t){this.h6.has(t)?(this.h6.delete(t),0===this.h6.size&&(this.o6=!1)):(this.r6.push(t),this.n6=1===this.r6.length)}Hd(t){this.h6.add(t),this.o6=!0,50<=this.h6.size&&this.l6()}l6(){this.o6&&(this.r6.length===this.h6.size?this.vd():(C33.ho(this.r6,this.h6),this.h6.clear(),this.o6=!1))}u6(){this.n6||(this.r6.sort(SortByInstLastCachedZIndex2),this.n6=!0)}f6(t){this.l6(),this.u6(),this.r6.length&&t.push(this.r6)}}}{const C33=self.Bs;C33.d6=class extends C33.gn{constructor(t,s){super(),this.p6=t,this.C6=s,this.m6=C33.yn(C33.Cu)}_n(){this.m6._n(),this.m6=null}g6(t,s,e){let i=this.m6.oe(t,s);return i||(e?(i=C33.yn(C33.e6,this,t,s),this.m6.Set(t,s,i),i):null)}S6(t){return Math.floor(t/this.p6)}y6(t){return Math.floor(t/this.C6)}_6(i,r,n){if(r)for(let e=r.Nl(),t=r.$l();e<=t;++e)for(let t=r.Fl(),s=r.kl();t<=s;++t)if(!n||!n.lc(e,t)){const h=this.g6(e,t,!1);h&&(h.Hd(i),h.Su())&&this.m6.yu(e,t)}if(n)for(let e=n.Nl(),t=n.$l();e<=t;++e)for(let t=n.Fl(),s=n.kl();t<=s;++t)r&&r.lc(e,t)||this.g6(e,t,!0).c6(i)}T6(t,s){let e=this.S6(t.Nl()),i=this.y6(t.Fl()),r=this.S6(t.$l()),n=this.y6(t.kl());for(;e<=r;++e)for(let t=i;t<=n;++t){const h=this.g6(e,t,!1);h&&h.f6(s)}}A6(t){let s=t.Nl(),e=t.Fl(),i=t.$l(),r=t.kl();for(;s<=i;++s)for(let t=e;t<=r;++t){const n=this.g6(s,t,!1);n&&n.a6()}}}}{let SortByInstLastCachedZIndex2=function(t,s){return t.UD().s6()-s.UD().s6()},SortByInstZElevation2=function(t,s){return t.UD().Wy()-s.UD().Wy()};SortByInstLastCachedZIndex=SortByInstLastCachedZIndex2,SortByInstZElevation=SortByInstZElevation2;const C33=self.Bs,assert=self.assert,tmpRect=new C33.Rect,tmpQuad=new C33.dc,renderCellArr=[],tmpDestRect=new C33.Rect,tmpSrcRect=new C33.Rect,glMatrix=self.Es,vec32=glMatrix.Ps,vec42=glMatrix.Os,mat42=glMatrix.Ms,tempMat4=mat42.create(),tempVec3=vec32.create(),tempVec4=vec42.create(),camVector=vec32.create(),lookVector=vec32.create(),upVector=vec32.create(),tempVec2=C33.yn(C33.ul),tempRect=C33.yn(C33.Rect),tempInstanceList1=[],tempInstanceList2=[],tempInstancesByCameraDist=[],DEFAULT_LAYER_OPTIONS={name:"",sid:-1,E6:!1,isVisible:!0,isInteractive:!0,ak:!1,backgroundColor:[1,1,1,1],Ek:!0,I6:[1,1],opacity:1,Rk:!1,w6:!1,R6:!1,M6:!1,scaleRate:1,FO:0,Ak:0,b6:[],G6:[],v6:[]};C33.P6=class extends C33.gn{constructor(t,s,e){super(),e=Object.assign({},DEFAULT_LAYER_OPTIONS,e),this.O6=t,this.Af=t.cN(),this.x6=s,this.En=e.name,this.f1=-1,this.L6=!!e.ak,this.D6=-1,this.N6=e.sid,this.F6=!!e.E6,this.k6=!!e.isVisible,this.B6=!!e.isInteractive,this.W6=C33.yn(C33.Zo),this.W6.Za(e.backgroundColor),this.H6=!!e.Ek,this.V6=e.I6[0],this.U6=e.I6[1],this.Ty=C33.yn(C33.Zo,1,1,1,e.opacity),this.j6=C33.yn(C33.Zo),this.X6=!!e.Rk,this.Y6=!!e.w6,this.q6=!!e.R6,this.K6=!!e.M6,this.z6=e.scaleRate,this._y=e.FO,this.J6=null,this.Q6=1,this.Ay=e.Ak,this.Z6=0,this.tY=0,this.sY=0,this.eY=!1,this.Gb=C33.yn(C33.Rect),this.iY=C33.yn(C33.Rect),this.rY=C33.yn(C33.Rect),this.nY=!0,this.xT=mat42.create(),this.hY=!0,this.IO=mat42.create(),this.aY=!0,this.lY=C33.yn(C33.T1.w1),this.cY=!0,this.uY=[],this.fY=e.b6,this.dY=[],this.pY=[],this.CY=new Map,this.r6=[],this.mY=!1,this.gY=!1,this.SY=!1;const r=this.Af.QN();this.yY=C33.yn(C33._Y,this,e.G6),this.Vx=C33.yn(C33.T1.DP,r.TY(),{IP:(t,s)=>{const e=s.Dx(),i=e.Pv();t.wy(e.AY()),t.kv(i),t.Bv(i),r.EY(i)},RP:t=>this.d$().IY(t)}),this.wY=!0,this.RY=!0,this.MY=null,this.bY=[],this.GY=!1,this.vY=C33.yn(C33.Rect,0,0,-1,-1),this.PY=C33.yn(C33.Rect,0,0,-1,-1),this.OY=new self.P$(this),this.xY(),this.LY()&&(this.MY=C33.yn(C33.d6,this.Af.fL(),this.Af.pL())),this.DY=e.v6.map(t=>C33.P6.NY(this.O6,this,t))}FY(){for(const t of this.fY){const s=this.Af.$Y(t[1]);this.O6.kY(s),s.BY()||(s.WY(t),s.HY(this.f1)),this.dY.push(t),this.CY.set(t[2],t)}C33.Qh(this.uY,this.dY),this.fY=null}static NY(t,s,e){return C33.yn(C33.P6,t,s,{name:e[0],sid:e[2],isVisible:e[3],isInteractive:e[13],ak:e[19],backgroundColor:e[4].map(t=>t/255),Ek:e[5],I6:[e[6],e[7]],opacity:e[8],Rk:e[9],w6:e[17],R6:e[18],M6:e[10],scaleRate:e[11],FO:e[12],Ak:e[16],b6:e[14],G6:e[15],v6:e[20]})}_n(){for(const t of this.DY)t._n();C33.qh(this.DY);for(const s of this.r6)this.Af.tB(s);C33.qh(this.r6),this.yY._n(),this.yY=null,this.Vx._n(),this.Vx=null,this.OY=null,this.x6=null,this.O6=null,this.Af=null}VY(t){return this.CY.get(t)}UY(r){let n=this.O6.jY(),h=0,o=this.dY;for(let i=0,t=o.length;i<t;++i){let t=o[i],s=this.Af.$Y(t[1]),e=!0;if(!s.XY()||n){const a=this.Af.YY(t,this,!0);r.push(a),s.qY()&&(e=!1,this.pY.push(a.oB()))}e&&(o[h]=o[i],++h)}C33.Yh(o,h),this.Af.u$(),this.zD()}KY(t,s){if(!t.UF()._F())throw new Error("instance is not of world type");const e=t.UD();if(e.jD()!==this)throw new Error("instance added to wrong layer");this.r6.push(t),0!==e.Wy()&&(this.SY=!0),s&&this.LY()&&t.UD().u4(),this.zD(t)}zY(t){this.r6.includes(t)||(this.r6.push(t),0!==t.UD().Wy()&&(this.SY=!0),this.zD(t))}JY(t,s){const e=t.UD();if(e.jD()!==this)throw new Error("instance added to wrong layer");this.r6.unshift(t),0!==e.Wy()&&(this.SY=!0),this.zD(t),s&&this.LY()&&t.UD().u4()}QY(t,s){const e=this.r6.indexOf(t);e<0||(s&&this.LY()&&t.UD().ZY(),this.r6.splice(e,1),this.zD(t),this.tq())}sq(){this.SY=!0}tq(){0===this.r6.length&&(this.SY=!1)}eq(t){if(t){const s=new Set;for(const e of this.r6){const i=e.UD().s6();0<=i&&s.add(i)}let t=-1;for(const r of this.r6){const n=r.UD();if(!(0<=n.s6())){for(++t;s.has(t);)++t;n.iq(t)}}}this.r6.sort(SortByInstLastCachedZIndex2)}rq(){}nq(){for(const t of this.r6)t.qk().qY()||this.Af.tB(t);this.Af.u$(),C33.qh(this.r6),this.SY=!1,this.zD()}hq(s,t,e,i,r,n){const h=this.Af.RL(),o=this.Af.oq(),a=s.aq(),l=[];for(const c of this.dY){const u=c[0],f=u[0],d=u[1];if(t.lc(f,d)){const p=o[c[1]];if(p!==s){if(!a)continue;if(!s.lq(p))continue}let t=r;if(!t){const g=this.Af.HD();t=this.RD()===g?this:(t=g.cq(this.pf()))||g.YD(this.Yx())}const C=this.Af.YY(c,t,!1,void 0,void 0,!1,n),m=(t.h$(C),C.UD());m.m4(e,i),m.u4(),h.o$(!0),C.a$(),h.o$(!1),l.push(C)}}return l}i$(){return this.r6.length}RD(){return this.O6}pf(){return this.En}uq(t){this.f1=t}Yx(){return this.f1}fq(t){this.D6=t}lV(){return this.D6}lk(){return this.L6}ck(t){this.L6!==(t=!!t)&&(this.L6=t,this.O6.pq(),this.Af.JD())}Cq(){let t=this.q$();return(t?t.J$():this.RD().mq()).indexOf(this)}gq(){return this.N6}cN(){return this.Af}Sq(){return this.F6}yq(){for(const t of this.K$())if(t.Sq())return!0;return!1}lF(){return this.Af.lF()}d$(){return this.yY}Xx(){return this._q(),this.Vx}_q(){const t=this.Tq();if(this.wY||t!==this.RY||this.Vx.wO()){const s=this.d$().Aq();this.Vx.RO(s.map(t=>t.pE()),{bP:s.map(t=>t.Yx()),GP:!t,LP:!0}),this.wY=!1,this.RY=t}}sW(){this.d$().sW(),this.wY=!0}LY(){return this.K6&&!this.q6}Eq(){return this.MY}Iq(){this.GY=!1}rk(){for(const t of this.wq())if(!t.sk())return!1;return!0}sk(){return this.k6}ek(t){this.k6!==(t=!!t)&&(this.k6=t,this.Af.JD())}hk(t){this.B6=!!t}nk(){return this.B6}fk(){for(const t of this.wq())if(!t.nk())return!1;return!0}Pk(t){if(this.eY!==(t=!!t)){if(this.eY=t){const s=this.RD();this.tY=s.T$(),this.sY=s.E$()}this.Rq(),this.Af.JD()}}Mq(){return this.eY}_$(t){const s=this.RD(),e=s.bq(),i=s.Gq();this.tY!==(t=(t=i<t?i:t)<e?e:t)&&(this.tY=t,this.Mq())&&(this.Rq(),this.Af.JD())}A$(t){const s=this.RD(),e=s.vq(),i=s.Pq();this.sY!==(t=(t=i<t?i:t)<e?e:t)&&(this.sY=t,this.Mq())&&(this.Rq(),this.Af.JD())}T$(){return this.Mq()?this.tY:this.RD().T$()}E$(){return this.Mq()?this.sY:this.RD().E$()}xk(){return this.Oq(),this.Gb}xq(){return this.Oq(),this.iY}Lq(){return this.Oq(),this.rY}V$(){const t=this.RD();return[t.Dq(),t.Nq()]}P2(t){return this.Af.P2(t)}Fq(u,i){const r=this.xq();if(0===u)i.I(r);else{let o=r.Ul(),a=r.jl(),t=this.$q(u),s=r.width()/t,e=r.height()/t,[l,c]=this.V$();if(.5!==l||.5!==c){let t=this.kq(),s=this.Af,e=this.P2()/t,i=(l-.5)*s.Bq()/e,r=(c-.5)*s.Wq()/e,n=this.GetAngle(),h=(0!==n&&(tempVec2.set(i,r),tempVec2.rotate(n),i=tempVec2.ml(),r=tempVec2.Sl()),C33.Wn(t,0,u));o+=C33.$t(i,0,h),a+=C33.$t(r,0,h)}i.set(o-s/2,a-e/2,o+s/2,a+e/2)}}VG(){return this.Ty.Ta()}jG(t){t=C33.wn(t,0,1),this.Ty.Ta()!==t&&(this.Ty.ma(t),this.xY(),this.Af.JD())}xY(){this.j6.I(this.Ty),this.j6.Oa()}AY(){return this.j6}Tq(){return this.Ty.Ma(1,1,1,1)}mk(){return this.z6}Ck(t){this.z6!==t&&(this.z6=t,this.Rq(),this.Af.JD())}yk(){return this.V6}Tk(){return this.U6}Hq(t,s){this.V6===t&&this.U6===s||(this.V6=t,this.U6=s,this.Rq(),this.Af.JD())}Sk(t){this.Hq(t,this.Tk())}_k(t){this.Hq(this.yk(),t)}Hy(t){this.Ay!==t&&(this.Ay=t,this.Af.JD())}Wy(){return this.Ay}y$(t){t=C33.Rn(t),this.Z6!==t&&(this.Z6=t,this.Rq(),this.Af.JD())}GetAngle(){return C33.Rn(this.O6.GetAngle()+this.Z6)}gk(){return this.Z6}Vq(){return 0<this.r6.length}qD(){return this.r6}Uq(){return this.jq()&&this.q6?(C33.Qh(tempInstancesByCameraDist,this.qD()),tempInstancesByCameraDist.sort((t,s)=>this.Xq(t,s)),tempInstancesByCameraDist):this.qD()}Yq(t){C33.an(t,this.Uq());for(const s of this.DY)s.rk()&&0<s.VG()&&s.Yq(t)}Xq(t,s){const e=this.RD().qq(),i=e[0],r=e[1],n=e[2],h=t.UD(),o=s.UD(),a=h.Ny()-i,l=h.ky()-r,c=h.Wy()-n,u=o.Ny()-i,f=o.ky()-r,d=o.Wy()-n;return u*u+f*f+d*d-(a*a+l*l+c*c)}vk(){return this.W6}wk(){return this.H6}Ik(t){this.H6!==(t=!!t)&&(this.H6=t,this.Af.JD())}bk(){return this.X6}Mk(t){this.X6!==(t=!!t)&&(this.X6=t,this.Af.JD())}Kq(){return!this.cN().zq()||!this.Y6}jq(){return!this.Kq()}Jq(){return this.jq()&&this.RD().Qq()}Zq(){if(!this.Jq())return!1;for(const t of this.DY)if(!t.Zq())return!1;return!0}Iy(t){this._y!==t&&(this._y=t,this.Af.JD())}Gk(){return this._y}tK(){return!this.x6}q$(){return this.x6}sK(t){this.x6=t}J$(){return this.DY}eK(){return 0<this.DY.length}iK(t,s=!0){s?this.DY.push(t):this.DY.unshift(t)}rK(t,s,e){let i=this.DY.indexOf(s);if(-1===i)throw new Error("cannot find layer to insert by");e&&++i,this.DY.splice(i,0,t)}nK(t){const s=this.DY.indexOf(t);if(-1===s)throw new Error("cannot find layer to remove");this.DY.splice(s,1)}hK(){for(const t of this.DY)if(t.oK())return!0;return!1}*Z$(){for(const t of this.DY)yield*t.Z$();yield this}*K$(){let t=this.q$();for(;t;)yield t,t=t.q$()}*wq(){yield this,yield*this.K$()}aK(t){for(const s of this.K$())if(s===t)return!0;return!1}lK(t){return this===t||this.V6===t.V6&&this.U6===t.U6&&this.Q6===t.Q6&&this.z6===t.z6&&this.Z6===t.Z6&&this.T$()===t.T$()&&this.E$()===t.E$()}cK(){return{parallaxX:this.yk(),parallaxY:this.Tk(),scale:this.pk(),scaleRate:this.mk(),angle:this.gk(),hasOwnScroll:this.Mq(),scrollX:this.T$(),scrollY:this.E$()}}uK(t){this.Hq(t.parallaxX,t.parallaxY),this.dk(t.scale),this.Ck(t.scaleRate),this.y$(t.angle),this.Pk(t.hasOwnScroll),this._$(t.scrollX),this.A$(t.scrollY),this.Oq()}fK(t){if(0!==t.size){const s=C33.ho(this.r6,t);0<s&&(this.tq(),this.zD())}}zD(t){this.mY=!1,this.GY=!1,t&&!t.qk().UF().AF()||(this.gY=!1)}dK(){if(!this.mY){if(this.r6.sort(SortByInstZElevation2),this.LY())for(let t=0,s=this.r6.length;t<s;++t){const e=this.r6[t].UD();e.iq(t),this.MY.A6(e.pK())}else for(let t=0,s=this.r6.length;t<s;++t)this.r6[t].UD().iq(t);this.mY=!0}}CK(){if(!this.gY){let t=this.O6.mK(this.lV()),s=t.map(t=>[...t.Z$()]).flat(),e=0;for(const i of s){for(const r of i.qD())r.qk().UF().AF()&&r.UD().gK(e++);i.SK()}}}SK(){this.gY=!0}yK(){return{isVisible:this.rk(),opacity:this.VG(),isInteractive:this.nk()}}_K(t,s,e){const i=t.UD(),r=s.UD();if(i.jD()!==this||r.jD()!==this)throw new Error("can't arrange Z order unless both objects on this layer");let n=i.XD(),h=r.XD();return n!==h+(e?1:-1)&&(C33.Zh(this.r6,n),n<h&&h--,e&&h++,h===this.r6.length?this.r6.push(t):this.r6.splice(h,0,t),this.zD(t),!0)}TK(t,s){let e=[],i=0,r=0,n=t.length,h=s.length;for(;i<n&&r<h;){const o=t[i],a=s[r];o.UD().s6()<a.UD().s6()?(e.push(o),++i):(e.push(a),++r)}for(;i<n;++i)e.push(t[i]);for(;r<h;++r)e.push(s[r]);return e}AK(s){const e=[],i=s.length;for(let t=0;t<i-1;t+=2){const r=s[t],n=s[t+1];e.push(this.TK(r,n))}return i%2==1&&e.push(s[i-1]),e}EK(t){for(;1<t.length;)t=this.AK(t);return t[0]}IK(){return this.dK(),C33.qh(renderCellArr),this.MY.T6(this.xk(),renderCellArr),renderCellArr.length?1===renderCellArr.length?renderCellArr[0]:this.EK(renderCellArr):[]}oK(){return this.rk()&&0<this.VG()&&this.wK()}wK(){if(this.Vq()||!this.wk())return!0;for(const t of this.DY)if(t.wK())return!0;return!1}RK(){return this.bk()||!this.Tq()||0!==this.Gk()||this.yY.MK()}bK(){if(this.RK())return!0;for(const t of this.DY)if(t.bK())return!0;return!1}Pv(){return this.J6}$q(t){if(this.O6.X$())return 1;{const s=this.GK();return s/(s-t)}}vK(t){const s=this.Af.jk();if(this.O6.X$())return s;{const e=this.GK(),i=this.P2();return i/Math.abs(e-t)*s}}Rq(){this.aY=!0,this.cY=!0,this.nY=!0}PK(t){return this.aY&&(this.xK(t,this.IO,0,0,null),this.aY=!1),this.IO}kq(t){return this.P2(t)/this.LK()}GK(){return this.Jq()?this.RD().qq()[2]:this.kq()}DK(){if(this.Jq()){const t=this.RD().qq();return[t[0],t[1],t[2]]}return this.NK()}NK(t=0,s=0,r=0){let n=this.Af,e=this.RD(),i=n.FK(),h=n.$K(),o=(this.T$()-i)*this.V6+i,a=(this.E$()-h)*this.U6+h,l=(n.gL()&&(o=Math.round(o),a=Math.round(a)),o+t),c=a+s,u=e.X$()?this.P2(r):this.kq(r),[f,d]=this.V$();if(.5!==f||.5!==d){let t=this.P2(r)/u,s=(f-.5)*n.Bq()/t,e=(d-.5)*n.Wq()/t,i=this.GetAngle();0!==i&&(tempVec2.set(s,e),tempVec2.rotate(i),s=tempVec2.ml(),e=tempVec2.Sl()),l+=s,c+=e}return[l,c,u]}xK(t,s,e,i,r){const n=this.Af,h=this.RD();if(this.Jq()){vec32.I(camVector,h.qq()),vec32.I(lookVector,h.kK()),vec32.I(upVector,h.BK());const o=n.FK(),a=n.$K(),l=lookVector[0]-camVector[0],c=lookVector[1]-camVector[1],u=lookVector[2]-camVector[2];camVector[0]=(camVector[0]-o)*this.V6+o,camVector[1]=(camVector[1]-a)*this.U6+a,camVector[2]*=Math.max(this.V6,this.U6),lookVector[0]=camVector[0]+l,lookVector[1]=camVector[1]+c,lookVector[2]=camVector[2]+u}else{const[f,d,p]=this.NK(e,i,r),C=(vec32.set(camVector,f,d,p),vec32.set(lookVector,f,d,p-100),this.GetAngle());0===C?vec32.set(upVector,0,1,0):vec32.set(upVector,Math.sin(C),Math.cos(C),0)}t.z2(s,camVector,lookVector,upVector,r||n.Wq())}WK(){this.hY=!0,this.cY=!0,this.nY=!0}HK(t){return this.hY&&(this.VK(t),this.hY=!1),this.xT}VK(t){const s=this.Af.QN(),[e,i]=this.V$();if(this.O6.X$())t.K2(this.xT,s.UK(),s.jK());else if(.5===e&&.5===i)mat42.I(this.xT,s.XK());else{const r=s.UK(),n=s.jK();t.Y2(this.xT,r/n,e,i)}}rj(t,s=!0,e=0,i=0,r=0){s&&t.OG(this.HK(t));let n;n=0===e&&0===i&&0===r?this.PK(t):(this.xK(t,tempMat4,e,i,r),tempMat4),t.$G(n)}YK(t){this.rj(t),t.Dg(this.Wy())}qK(t){let s=null;if(t.PS()&&this.Af.KK()){const e=this.Af.QN().zK(this);e&&(s=e.Cb(),t.Xv(s))}return s}JK(t){if(t.q2()&&this.Af.KK()){const s=2*(this.Yx()+1);t.StartMeasuringRenderPassTime(s,1+s)}}I_(t,s,e){let i=this.Af.QN(),r=this.RK(),n=null,h=this.qK(t);if(this.JK(t),r){const o={D_:this.Af.CL(),TT:!0,QK:!!t.q2()&&this.Af.ZK()};"low"===i.t8()&&(o.width=i.UK(),o.height=i.jK()),n=this.Af.s8(o),this.J6=n,t.Fv(n),this.wk()&&t.Iv(0,0,0,0)}else this.J6=s,t.Fv(s);if(this.wk()||t.gu(this.W6),this.O6.e8(t,this.J6,this.DY,r&&this.wk()),this.JK(t),this.rj(t),t.Dg(this.Wy()),t.Mv(this.jq()),this.LK()>Number.EPSILON){this.dK();const a=this.LY()&&0===this.Wy()&&!this.SY;this.Jq()?this.i8(t):a?this.r8(t):this.n8(t,this.Uq())}t.Dg(0),t.Fg(0),r&&(t.Mv(!1),this.h8(t,n,s,e)),h&&t.qv(h),this.J6=null}n8(e,i){let r=this.xk(),n=this.J6,h=this.RD().X$(),o=this.RD().o8(),a=null;for(let t=0,s=i.length;t<s;++t){const l=i[t];if(l!==a){const c=(a=l).UD();c.rk()&&c.a8(r,o,h)&&this.l8(l,c,e,n)}}}i8(i){const r=this.J6,n=this.c8(),h=tempInstanceList1,o=tempInstanceList2,a=this.Uq();for(let s=0,e=a.length;s<e;){const l=a[s],c=l.UD();if(c.rk()&&c.u8(n)){(!l.f8()||0<c.d8())&&o.push(l);const u=l.UD().S4();h.push(l);let t=s+1;for(;t<e;++t){const f=a[t],d=f.UD();if(d.rk()&&d.u8(n)){if(d.S4()!==u)break;(f.f8()?(0<d.d8()&&o.push(f),h):o).push(f)}}if(1!==h.length||h[0].p8()){this.C8(i,h);for(let t=0,s=o.length;t<s;++t){const p=o[t],C=p.UD();C.m8(!0),this.l8(p,C,i,r),C.m8(!1)}}else{this.l8(l,c,i,r);for(let t=0,s=o.length;t<s;++t){const m=o[t];if(m!==l){const g=m.UD(),S=g.jD();S.l8(m,g,i,r)}}}s=t,C33.qh(h),C33.qh(o)}else++s}}C8(e,i){const r=this.J6;e.Hv();for(let t=0,s=i.length;t<s;++t){const n=i[t],h=n.UD();h.g8(!0),this.S8(n,h,e)}e.Vv();for(let t=0,s=i.length;t<s;++t){const o=i[t],a=o.UD();this.l8(o,a,e,r),a.g8(!1)}e.jv()}r8(t){let s=this.MY,e=this.PY,i=this.vY,r=this.xk(),n;e.set(s.S6(r.Nl()),s.y6(r.Fl()),s.S6(r.$l()),s.y6(r.kl())),this.GY&&e.equals(i)?n=this.bY:(n=this.IK(),this.GY=!0,i.I(e)),this.n8(t,n),n!==this.bY&&C33.Qh(this.bY,n)}l8(t,s,e,i){s.MK()?this.y8(t,s,e,i):this.S8(t,s,e)}S8(t,s,e){const i=s._8();e.Sg()!==i&&i.Ey(),t.I_(e)}y8(t,s,e,i){this.T8(t,s,e,i,null)&&this.rj(e)}T8(t,s,e,i,r){const n=s.l4().Xx();return n.DO(e,i,{NO:t,FO:s.Gk(),devicePixelRatio:this.Af.A8(),time:t.E8(),$O:this.Af.I8()*this.LK(),kO:this.GetAngle(),ux:s._4(),Cx:n.xx()?null:this.w8(s),UO:r&&r.UO,jO:r&&r.jO,XO:r&&r.XO,YO:r&&r.YO}),e.Dg(this.Wy()),n.BG()}h8(t,s,e,i){const r=this.yY.Aq(),n=this.Af;0===r.length?(t.Fv(e),t.eg(),i&&0===this._y&&this.Tq()?t.$v(s):(t.Iy(this._y),t.wy(this.j6),t.kv(s)),t.Bv(s),n.EY(s)):this.Xx().DO(t,e,{NO:this,FO:this.Gk(),devicePixelRatio:n.A8(),$O:n.I8()*this.LK(),kO:this.GetAngle(),ux:this.xk(),Cx:null,MP:!0})}pk(){return this.Q6}dk(t){this.Q6!==t&&(this.Q6=t,this.O6.M8(),this.Rq(),this.Af.JD())}jk(){return this.LK()*this.Af.jk()}gV(){return this.LK()*this.Af.gV()}LK(){return(this.Q6*this.O6.S$()-1)*this.z6+1}Oq(){if(this.nY){this.nY=!1;let t=this.Af.FK(),s=this.Af.$K(),e=(this.T$()-t)*this.V6+t,i=(this.E$()-s)*this.U6+s,r=this.LK(),n=this.Af.Bq()/r,h=this.Af.Wq()/r,o=e-n/2,a=i-h/2;this.Af.gL()&&(o=Math.round(o),a=Math.round(a));const l=this.iY,c=(l.set(o,a,o+n,a+h),this.GetAngle()),u=(0!==c&&(tmpRect.I(l),tmpRect.offset(-l.Ul(),-l.jl()),tmpQuad.$c(tmpRect,c),tmpQuad.Bc(tmpRect),tmpRect.offset(l.Ul(),l.jl()),l.I(tmpRect)),this.Ay);this.Fq(u,this.Gb),this.Jq()?this.b8(u,this.rY):this.rY.I(this.Gb)}}b8(t,s){let e=this.Af.QN(),i=e.eF(),r=e.rF(),[n,h]=this.Dk(0,0,t),[o,a]=this.Dk(i,0,t),[l,c]=this.Dk(i,r,t),[u,f]=this.Dk(0,r,t),d=Math.min(n,o,l,u),p=Math.min(h,a,c,f),C=Math.max(n,o,l,u),m=Math.max(h,a,c,f);isFinite(d)||(d=-1/0),isFinite(p)||(p=-1/0),isFinite(C)||(C=1/0),isFinite(m)||(m=1/0),s.set(d,p,C,m)}Dk(t,s,e=0){return this.G8(t,s,e,this.gV())}Wk(t,s,e=0){return this.G8(t,s,e,this.jk()*this.lF())}G8(t,s,e,i){const r=this.Af,n=r.JS(),h=this.LK(),o=r.Bq()/h,a=r.Wq()/h,l=tempVec4,c=(vec42.set(l,0,0,o,a),t/=i,s=l[3]-s/i,this.HK(n)),u=this.PK(n),f=tempVec3,d=C33.T1.I1(t,s,e,u,c,l,f);return d?[f[0],f[1]]:[NaN,NaN]}v8(t,s){const e=this.Q6,i=this.z6,r=this.V6,n=this.U6,h=this.Z6,o=(this.Q6=1,this.z6=1,this.V6=1,this.U6=1,this.Z6=0,this.Rq(),this.Dk(t,s));return this.Q6=e,this.z6=i,this.V6=r,this.U6=n,this.Z6=h,this.Rq(),o}kk(t,s,e=0){return this.P8(t,s,e,this.gV())}Vk(t,s,e=0){return this.P8(t,s,e,this.jk()*this.lF())}P8(t,s,e,i){const r=this.Af,n=r.JS(),h=this.LK(),o=r.Bq()/h,a=r.Wq()/h,l=tempVec4,c=(vec42.set(l,0,0,o,a),this.HK(n)),u=this.PK(n),f=tempVec3,d=C33.T1.A1(t,s,e,u,c,l,f);return d?[f[0]*i,(l[3]-f[1])*i]:[NaN,NaN]}O8(t,s){return t*=this.jk()*this.lF(),0!==s&&(t*=this.$q(s)),t}w8(t){const s=t._4(),e=t.S4(),i=t.d8(),l=e+i,c=s.Nl(),u=s.Fl(),f=s.$l(),d=s.kl();if(this.Jq()){if(this.x8(c,u,e)||this.x8(f,u,e)||this.x8(f,d,e)||this.x8(c,d,e))return null;if(0<i&&(this.x8(c,u,l)||this.x8(f,u,l)||this.x8(f,d,l)||this.x8(c,d,l)))return null}else if(l>=this.kq())return null;let[p,C]=this.Vk(c,u,e),[m,g]=this.Vk(f,d,e);if(0!==this.GetAngle()||0<i||this.Jq()){const[S,y]=this.Vk(f,u,e),[_,T]=this.Vk(c,d,e);if(0<i){let[t,s]=this.Vk(c,u,l),[e,i]=this.Vk(f,u,l),[r,n]=this.Vk(f,d,l),[h,o]=this.Vk(c,d,l),a=Math.min(p,m,S,_,t,e,r,h);m=Math.max(p,m,S,_,t,e,r,h),p=a,a=Math.min(C,g,y,T,s,i,n,o),g=Math.max(C,g,y,T,s,i,n,o),C=a}else{let t=Math.min(p,m,S,_);m=Math.max(p,m,S,_),p=t,t=Math.min(C,g,y,T),g=Math.max(C,g,y,T),C=t}}return tmpRect.set(p,C,m,g),tmpRect}c8(){return this.cY&&(this.L8(),this.cY=!1),this.lY}L8(){const t=this.Af.JS(),s=this.HK(t),e=this.PK(t);this.lY.O1(e,s)}x8(t,s,e){return this.c8().D1(t,s,e)}D8(){const t={d:this.Sq(),s:this.pk(),a:this.gk(),v:this.sk(),i:this.nk(),html:this.lk(),bc:this.W6.toJSON(),t:this.wk(),sx:this.tY,sy:this.sY,hosp:this.eY,px:this.yk(),py:this.Tk(),c:this.Ty.toJSON(),sr:this.mk(),fx:this.yY.Ky(),cg:this.pY};return t}N8(t){this.F6=!!t.d,this.Q6=t.s,this.Z6=t.a,this.k6=!!t.v,this.B6=!t.hasOwnProperty("i")||t.i,this.L6=!!t.html,this.W6.Za(t.bc),this.H6=!!t.t,t.hasOwnProperty("sx")&&(this.tY=t.sx),t.hasOwnProperty("sy")&&(this.sY=t.sy),t.hasOwnProperty("hosp")&&(this.eY=!!t.hosp),this.V6=t.px,this.U6=t.py,this.Ty.Za(t.c),this.xY(),this.z6=t.sr,C33.Qh(this.pY,t.cg),C33.Qh(this.dY,this.uY);let e=new Set(this.pY),i=0;for(let t=0,s=this.dY.length;t<s;++t)e.has(this.dY[t][2])||(this.dY[i]=this.dY[t],++i);C33.Yh(this.dY,i),this.yY.zy(t.fx),this.wY=!0}F8(){this.eq(!1),this.zD(),this.Rq(),this.WK()}R$(){return this.OY}h$(t,s=!1){if(this.r6.includes(t))s&&this.r6.sort((t,s)=>{const e=t.UD().k8(),i=s.UD().k8();return e-i});else if(t.B8()){const e=[...t.z4()];e.push(t),e.sort((t,s)=>{const e=t.UD().k8(),i=s.UD().k8();return e-i});for(const i of e)if(i.nB())for(const r of i.hB())if(!e.includes(r)){const n=[...r.z4()];n.push(r),n.sort((t,s)=>{const e=t.UD().k8(),i=s.UD().k8();return e-i}),n&&n.length&&e.splice(e.length,0,...n)}for(const h of e)h.UF()._F()&&this.KY(h,!0)}else if(t.UF()._F()&&this.KY(t,!0),t.nB())for(const o of t.hB()){const a=[...o.z4()];if(a.push(o),a.sort((t,s)=>{const e=t.UD().k8(),i=s.UD().k8();return e-i}),a&&a.length)for(const l of a)l.UF()._F()&&this.KY(l,!0)}}}}{let vec3EqualsXYZ2=function(t,s,e,i){return t[0]===Math.fround(s)&&t[1]===Math.fround(e)&&t[2]===Math.fround(i)},MaybePrepareLayerDraw2=function(t,s){lastLayerPreparedForDrawing!==t&&(t.YK(s),lastLayerPreparedForDrawing=t)},C33=(vec3EqualsXYZ=vec3EqualsXYZ2,MaybePrepareLayerDraw=MaybePrepareLayerDraw2,self.Bs),C3Debugger=self.C3Debugger,assert=self.assert,tempDestRect=C33.yn(C33.Rect),tempSrcRect=C33.yn(C33.Rect),tempLayoutRect=C33.yn(C33.Rect),tempColor=C33.yn(C33.Zo),glMatrix=self.Es,vec32=glMatrix.Ps,tempRender3dList=[],tempInstanceList1=[],tempInstanceList2=[],tempInstanceList3=[],lastLayerPreparedForDrawing=null;C33.W8=class extends C33.gn{constructor(t,s,e){super(),this.H8=t,this.Af=t.cN(),this.En=e[0],this.V8=e[1],this.U8=e[2],this.am=e[1],this.lm=e[2],this.j8=!!e[3],this.X8=!!e[4],this.Y8=e[5],this.q8=e[6],this.K8=e[7],this.z8=null,this.N6=e[8],this.f1=s,this.tY=0,this.sY=0,this.Q6=1,this.Z6=0,this.J8=new Set,this.Q8=new Set,this.Z8=new Set,this.sz=[],this.ez=[],this.iz=new Map,this.rz=new Map,this.nz=[],this.hz=!1,this.oz=vec32.create(),this.az=vec32.create(),this.lz=vec32.create(),this.cz=[],this.uz=[],this.fz=new Map,this.pz=new Map,this.Cz=-1;const r=this.Af.QN();this.yY=C33.yn(C33._Y,this,e[11]),this.Vx=C33.yn(C33.T1.DP,r.TY(),{IP:(t,s)=>{const e=s.Dx(),i=e.Pv();t.XG(),t.kv(i),t.Bv(i),r.EY(i)},RP:t=>this.d$().IY(t)}),this.wY=!0,this.mz=!1,this.J6=null,this.gz={},this.Sz=new Map,this.yz=!0,this._z=new self.f$(this),this.Tz=C33.yn(C33.Event.ed);for(const i of e[9])this.cz.push(C33.P6.NY(this,null,i));this.Az();for(const n of this.G$())n.FY();for(const h of e[10]){const o=this.Af.$Y(h[1]);if(!o)throw new Error("missing nonworld object class");o.BY()||o.WY(h),this.nz.push(h),this.kY(o)}}_n(){for(const t of this.uz)t._n();C33.qh(this.uz),this.Z8.clear(),this.z8=null,this.H8=null,this.Af=null}cN(){return this.Af}pf(){return this.En}gq(){return this.N6}Yx(){return this.f1}d$(){return this.yY}Xx(){return this._q(),this.Vx}_q(){const t="low"===this.Af.QN().t8();if(this.wY||this.mz!==t||this.Vx.wO()){const s=this.d$().Aq();this.Vx.RO(s.map(t=>t.pE()),{bP:s.map(t=>t.Yx()),vP:t,LP:!0}),this.wY=!1,this.mz=t}}sW(){this.d$().sW(),this.wY=!0}Ez(){let e=this.uz[0].LK();for(let t=1,s=this.uz.length;t<s;++t){const i=this.uz[t];0===i.yk()&&0===i.Tk()||(e=Math.min(e,i.LK()))}return e}Iz(){return.5*this.Af.Bq()/this.Ez()}wz(){return.5*this.Af.Wq()/this.Ez()}bq(){return this.Rz()?-1/0:this.Iz()}Gq(){return this.Rz()?1/0:this.AC()-this.Iz()}vq(){return this.Rz()?-1/0:this.wz()}Pq(){return this.Rz()?1/0:this.OC()-this.wz()}_$(t){const s=this.bq(),e=this.Gq();this.tY!==(t=(t=e<t?e:t)<s?s:t)&&(this.tY=t,this.Mz(),this.Af.JD())}T$(){return this.tY}A$(t){const s=this.vq(),e=this.Pq();this.sY!==(t=(t=e<t?e:t)<s?s:t)&&(this.sY=t,this.Mz(),this.Af.JD())}E$(){return this.sY}Rz(){return this.j8}M8(){this._$(this.T$()),this.A$(this.E$());for(const t of this.uz)t.Mq()&&(t._$(t.T$()),t.A$(t.E$()))}W$(t,s){this.Y8===t&&this.q8===s||(this.Y8=t,this.q8=s,this.bz()&&(this.Gz(),this.Mz(),this.Af.JD()))}Dq(){return this.X$()?.5:this.Y8}Nq(){return this.X$()?.5:this.q8}o8(){const t=this.Dq(),s=this.Nq();return t<0||1<t||s<0||1<s}U$(){this.X8&&(this.X8=!1,this.Gz(),this.Mz(),this.Af.JD())}j$(){this.X8||(this.X8=!0,this.Gz(),this.Mz(),this.Af.JD())}X$(){return this.X8}bz(){return!this.X$()}vz(t){this.hz!==(t=!!t)&&(this.hz=t,this.Mz(),this.Af.JD())}Qq(){return this.hz}Pz(t,s,e,i,r,n,h,o,a){vec3EqualsXYZ2(this.oz,t,s,e)&&vec3EqualsXYZ2(this.az,i,r,n)&&vec3EqualsXYZ2(this.lz,h,o,a)||(vec32.set(this.oz,t,s,e),vec32.set(this.az,i,r,n),vec32.set(this.lz,h,o,a),this.Oz())}Oz(){this.Mz(),this.Af.JD()}qq(){return this.oz}kK(){return this.az}BK(){return this.lz}S$(){return this.Q6}g$(t){this.Q6!==t&&(this.Q6=t,this.Mz(),this.M8(),this.Af.JD())}y$(t){t=C33.Rn(t),this.Z6!==t&&(this.Z6=t,this.Mz(),this.Af.JD())}GetAngle(){return this.Z6}AC(){return this.am}GC(t){!isFinite(t)||t<1||(this.am=t)}OC(){return this.lm}EC(t){!isFinite(t)||t<1||(this.lm=t)}xz(){return this.z8}mq(){return this.cz}*G$(){for(const t of this.cz)yield*t.Z$()}b$(){return this.uz}Lz(){return this.uz.length}jD(t){return"number"==typeof t?this.YD(t):this.cq(t.toString())}YD(t){return t=C33.wn(Math.floor(t),0,this.uz.length-1),this.uz[t]}cq(t){return this.fz.get(t.toLowerCase())||null}Dz(t){return!!this.cq(t)}Nz(t){return this.pz.get(t)||null}Gz(){for(const t of this.uz)t.WK()}Mz(){for(const t of this.uz)t.Rq()}x$(t,s,e){if(this.Dz(t))throw new Error(`layer name '${t}' already in use`);if(!s&&e<2)throw new Error("invalid insert position");const i=2<=e?s:s.q$(),r=C33.yn(C33.P6,this,i,{name:t,sid:Math.floor(1e15*Math.random()),E6:!0});this.Fz(r,s,e),this.cN().JD(),this.pq()}D$(t,s,e){if(!s&&e<2)throw new Error("invalid insert position");t===s&&e<2||(this.$z(t),this.Fz(t,s,e),this.cN().JD(),this.pq())}F$(t){if(this.$z(t)){const s=this.Af.RL();s.o$(!0),t._n(),s.o$(!1),this.cN().JD(),this.pq()}}k$(){const t=new Set;for(const s of this.G$())s.Sq()&&!s.yq()&&t.add(s);if(0!==t.size){const e=this.Af.RL();e.o$(!0);for(const i of t)this.$z(i),i._n();e.o$(!1),this.cN().JD(),this.pq()}}Fz(s,e,i){if(2<=i)if(e){if(e===s||e.aK(s))throw new Error(`cannot move layer '${s.pf()}' to sub-layer of itself`);e.iK(s,2===i),s.sK(e)}else 2===i?this.cz.push(s):this.cz.unshift(s),s.sK(null);else{const t=e.q$();if(t){if(e.aK(s))throw new Error(`cannot move layer '${s.pf()}' to sub-layer of itself`);t.rK(s,e,0===i),s.sK(t)}else{let t=this.cz.indexOf(e);if(-1===t)throw new Error("cannot find layer to insert by");0===i&&++t,this.cz.splice(t,0,s),s.sK(null)}}}$z(t){const s=t.q$();if(s)return s.nK(t),!0;if(1<this.cz.length){const e=this.cz.indexOf(t);if(-1===e)throw new Error("cannot find layer to remove");return this.cz.splice(e,1),!0}return!1}Az(){this.uz=[...this.G$()],this.fz.clear(),this.pz.clear();for(let t=0,s=this.uz.length;t<s;++t){const e=this.uz[t];e.uq(t),this.fz.set(e.pf().toLowerCase(),e),this.pz.set(e.gq(),e)}}kz(){let t=0;for(const s of this.cz){for(const e of s.Z$())e.fq(t);s.lk()&&t++}}Bz(){return this.cz.at(-1).lV()+1}async pq(){this.Az(),this.kz(),this.Cz=this.Bz()}Wz(){return this.Cz}Vz(){this.Cz=-1}mK(t){const s=[];for(const e of this.cz){const i=e.lV();if(i===t)s.push(e);else if(t<i)break}return s}cK(){return{scrollX:this.T$(),scrollY:this.E$(),scale:this.S$(),angle:this.GetAngle(),vpX:this.Dq(),vpY:this.Nq()}}uK(t){this._$(t.scrollX),this.A$(t.scrollY),this.g$(t.scale),this.y$(t.angle),this.W$(t.vpX,t.vpY)}Uz(){let t=this.cz.filter(t=>t.oK())[0];for(;t;){if(!t.wk())return tempColor.ga(t.vk()),tempColor.ma(1),tempColor;if(t.RK())return tempColor.oa(0,0,0,0),tempColor;t=t.J$().filter(t=>t.oK())[0]}return tempColor.oa(0,0,0,0),tempColor}jY(){return this.yz}jz(){return[...this.J8]}kY(t){if(t.nB())for(const s of t.Yz().Xz())this.J8.add(s);else this.J8.add(t)}qz(){return[...this.Q8]}Kz(t,s){if(t===this||!s)return Promise.resolve();t&&(C33.jo(this.Q8,t.Q8),t.Q8.clear());const e=[];for(const i of this.J8)this.Q8.has(i)||(e.push(i.zz(s)),this.Q8.add(i));return Promise.all(e)}async Jz(t){if(t.aq())throw new Error("cannot load textures for family");const s=this.Af.JS();if(s&&!s.kM()&&!this.Q8.has(t)){this.Q8.add(t);const e=t.zz(s);this.Qz(e),await e,t.Zz(),this.Af.JD()}}Qz(t){this.Z8.add(t),t.then(()=>this.Z8.delete(t)).catch(()=>this.Z8.delete(t))}tJ(){return Promise.all([...this.Z8])}sJ(t){if(t.aq()||0<t.i$())throw new Error("cannot unload textures");const s=this.Af.JS();s&&this.Q8.has(t)&&(this.Q8.delete(t),t.eJ(s))}iJ(t,s){if(t!==this&&s)for(const e of this.Q8)e.qY()||t.J8.has(e)||(e.eJ(),this.Q8.delete(e))}rJ(){this.Q8.clear()}async nJ(t){const s=this.Af,e=this.H8,i=s.RL(),r=(this.K8&&(this.z8=i.hJ(this.K8),this.z8.oJ()),e.aJ(this),this.am=this.V8,this.lm=this.U8,this.tY=s.fL()/2,this.sY=s.pL()/2,this.M8(),this.Gz(),this.Mz(),this.kz(),await this.Af.QN().lJ(this.Bz(),!0),this.cJ(t),this.Af.uJ(!0),this.fJ(),this.yz||this.dJ(),this.pJ(this.sz),this.pJ(this.ez),this.CJ(),e.mJ(),s.u$(),this.Af.uJ(!1),this.Af.gJ());if(await Promise.all(r),C33.qh(r),!s.SJ()){for(const n of this.sz)n.yJ();for(const h of this.ez)h._J(this.iz,this.rz);for(const[o,a]of Object.entries(this.gz)){const l=this.Af.zV(parseInt(o,10));l&&!l.aq()&&l.XY()&&C33.qh(a)}for(const c of this.sz)c.TJ();for(const u of this.ez)u.TJ();for(const f of this.sz)f.s5()||f.AJ();for(const d of this.ez)d.s5()||d.AJ()}C33.qh(this.sz),C33.qh(this.ez),this.iz.clear(),this.rz.clear(),await Promise.all([...this.J8].map(t=>t.EJ(this.Af.JS()))),t&&(s.ed().dispatchEvent(new C33.Event("beforefirstlayoutstart")),await s.IJ(new C33.Event("beforeprojectstart"))),await this.wJ(new C33.Event("beforeanylayoutstart")),s.ed().dispatchEvent(new C33.Event("beforelayoutstart")),await this.IJ(new C33.Event("beforelayoutstart")),s.SJ()||await s.NB(C33.GJ.bJ.MJ.RJ,null,null),s.ed().dispatchEvent(new C33.Event("afterlayoutstart")),await this.IJ(new C33.Event("afterlayoutstart")),await this.wJ(new C33.Event("afteranylayoutstart")),t&&(s.ed().dispatchEvent(new C33.Event("afterfirstlayoutstart")),await s.IJ(new C33.Event("afterprojectstart"))),i.vJ(e),await this.tJ(),this.yz=!1}cJ(t){for(const s of this.Af.oq())if(!s.aq()&&s._F())for(const e of s.t$()){const i=e.UD(),r=i.jD(),n=C33.wn(r.Yx(),0,this.uz.length-1),h=this.uz[n];i.KD(h,!0),h.zY(e)}if(!t)for(const o of this.uz)o.eq(!1)}fJ(){for(const t of this.uz)t.UY(this.sz),t.rq()}dJ(){let s=!1;for(const[t,e]of Object.entries(this.gz)){const i=this.Af.zV(parseInt(t,10));if(i&&!i.aq()&&i.XY())for(const r of e){let t=null;if(!i._F()||(t=r.hasOwnProperty("instJson")?this.Nz(r.instJson.w.l):this.Nz(r.w.l))){const n=this.Af.YY(i,t,!1,0,0,!0);r.hasOwnProperty("instJson")?n.zy(r.instJson):n.zy(r),s=!0,this.ez.push(n),r.hasOwnProperty("instJson")&&(this.iz.set(n,r),this.rz.set(r.index,n))}}}for(const h of this.uz)h.eq(!0),h.zD();s&&(this.Af.u$(),this.Af.PJ())}pJ(s){for(const e of s)if(e.nB()){const i=e.UD(),t=e.lB();for(const r of e.qk().Yz().OJ())if(r!==e.qk()){const n=r.t$();if(n.length>t)e.xJ(n[t]);else{let t;t=i?this.Af.YY(r,i.jD(),!0,i.Ny(),i.ky(),!0):this.Af.YY(r,null,!0,0,0,!0),this.Af.u$(),r.LJ(),e.xJ(t),s.push(t)}}}}CJ(){for(const t of this.nz){const s=this.Af.$Y(t[1]);s.nB()||this.Af.YY(t,null,!0)}}DJ(){let e=[],i=this.nz,r=0;for(let t=0,s=i.length;t<s;++t){const n=i[t],h=this.Af.$Y(n[1]);h.qY()?h.nB()&&h.Yz().NJ()||e.push(this.Af.YY(n,null,!0)):(i[r]=n,++r)}C33.Yh(i,r),this.Af.u$(),this.pJ(e)}hq(t,s,e,i,r,n,h){if(e)return e.hq(t,s,r,n,i,h);{const o=[];for(const a of this.uz)o.push(a.hq(t,s,r,n,i,h));return o.flat()}}async FJ(){const t=this.H8;this.Af.SJ()||(await this.wJ(new C33.Event("beforeanylayoutend")),await this.IJ(new C33.Event("beforelayoutend")),await this.Af.NB(C33.GJ.bJ.MJ.$J,null,null),await this.IJ(new C33.Event("afterlayoutend")),await this.wJ(new C33.Event("afteranylayoutend"))),t.kJ(!0),this.Af.RL().BJ(),this.yz||this.WJ();for(const s of this.uz)s.nq();for(const e of this.Af.oq())if(!(e.qY()||e._F()||e.UF().SF()||e.aq())){for(const i of e.t$())this.Af.tB(i);this.Af.u$()}t.kJ(!1),t.AD()===this&&t.aJ(null)}HJ(t,s){const e=t.qk().gq().toString(),i=(this.gz.hasOwnProperty(e)||(this.gz[e]=[]),this.gz[e]),r={index:s,instJson:t.Ky(),sceneGraphJson:{children:[]}};i.push(r),this.Sz.set(t,r)}VJ(t){const s=this.Sz.get(t);for(const e of t.UJ()){const i=this.Sz.get(e);i&&s.sceneGraphJson.children.push({index:i.index,flags:C33.XJ.jJ(e.UD())})}}WJ(){this.Sz.clear();let t=0;for(const s of this.uz){s.dK();for(const e of s.qD()){const i=e.qk();!i.qY()&&i.XY()&&(this.HJ(e,t),t++)}}for(const r of this.uz)for(const n of r.qD()){const h=n.qk();!h.qY()&&h.XY()&&this.VJ(n)}this.Sz.clear()}YJ(){this.gz={},this.yz=!0}Pv(){return this.J6}RK(){const t=this.Af,s=t.JS().PS();return"low"===t.QN().t8()||s&&t.ZK()||this.yY.MK()||s&&t.zq()}qJ(t){const s=this.Af.QN();if(this.RK()){t.Fv(null),t.Iv(0,0,0,0);const e={D_:this.Af.CL(),TT:t.q2()||this.Af.ZK()||this.yY.MK(),QK:!!t.q2()&&this.Af.ZK()};"low"===s.t8()&&(e.width=s.UK(),e.height=s.jK()),this.J6=this.Af.s8(e)}else this.J6=null}KJ(t){this.Af.zJ(t)&&(t.Mv(!1),t.Fv(null),t.eg(),t.$v(this.J6))}JJ(t){this.RK()&&(t.Mv(!1),this.QJ(t,this.J6))}ZJ(t){t.Fv(this.J6),t.gu(this.Uz()),this.Af.zq()&&t.Rv();const s=this.mK(0);this.e8(t,this.J6,s,!0),t.q2()&&t.StartMeasuringRenderPassTime(0,1),this.JJ(t),this.J6=null}t7(t,s){let e=null;this.Af.zJ(t)&&(e=this.J6),t.Fv(e),t.Iv(0,0,0,0),this.Af.zq()&&t.Rv();const i=this.mK(s);this.e8(t,e,i,!0),this.KJ(t),t.IS(),this.Af.QN().s7(s)}e8(t,i,s,r){const n=s.filter(t=>t.oK());for(let s=0,e=n.length;s<e;){const h=n[s];if(h.Zq()&&!h.bK()){tempRender3dList.push(h);for(let t=s+1;t<e;++t){const o=n[t];if(!o.Zq()||o.bK())break;tempRender3dList.push(n[t])}if(2<=tempRender3dList.length||1===tempRender3dList.length&&tempRender3dList[0].hK()){this.e7(t,i,tempRender3dList),s+=tempRender3dList.length,C33.qh(tempRender3dList);continue}C33.qh(tempRender3dList)}h.I_(t,i,r&&0===s),++s}}QJ(t,s){const e=this.yY.Aq(),i=this.Af;0===e.length?(t.Fv(null),t.eg(),t.$v(s),t.Bv(s),i.EY(s)):(tempLayoutRect.set(0,0,i.Bq(),i.Wq()),this.Xx().DO(t,null,{NO:this,FO:3,devicePixelRatio:this.Af.A8(),$O:this.Af.I8()*this.S$(),kO:this.GetAngle(),ux:tempLayoutRect,Cx:null,MP:!0}))}e7(i,r,t){t[0].wk()||(tempColor.ga(t[0].vk()),tempColor.ma(1),i.gu(tempColor)),this.Af.QN(),i.Mv(!0);const n=tempInstanceList1,h=tempInstanceList2,o=tempInstanceList3;for(const a of t)a.dK(),a.Yq(n);const s=t[0],e=s.qK(i);s.JK(i);for(let s=0,e=n.length;s<e;){const l=n[s],c=l.UD(),u=c.jD();if(c.rk()&&c.u8(u.c8())){(!l.f8()||0<c.d8())&&o.push(l);const f=l.UD().S4();h.push(l);let t=s+1;for(;t<e;++t){const d=n[t],p=d.UD();if(p.rk()&&p.u8(p.jD().c8())){if(p.S4()!==f)break;(d.f8()?(0<p.d8()&&o.push(d),h):o).push(d)}}if(1!==h.length||h[0].p8()){this.i7(i,r,h);for(let t=0,s=o.length;t<s;++t){const C=o[t],m=C.UD(),g=m.jD();m.m8(!0),MaybePrepareLayerDraw2(g,i),g.l8(C,m,i,r),m.m8(!1)}}else{MaybePrepareLayerDraw2(u,i),u.l8(l,c,i,r);for(let t=0,s=o.length;t<s;++t){const S=o[t];if(S!==l){const y=S.UD(),_=y.jD();MaybePrepareLayerDraw2(_,i),_.l8(S,y,i,r)}}}s=t,C33.qh(h),C33.qh(o)}else++s}e&&i.qv(e),C33.qh(n),lastLayerPreparedForDrawing=null}i7(e,i,r){e.Hv();for(let t=0,s=r.length;t<s;++t){const n=r[t],h=n.UD(),o=h.jD();h.g8(!0),MaybePrepareLayerDraw2(o,e),o.S8(n,h,e)}e.Vv();for(let t=0,s=r.length;t<s;++t){const a=r[t],l=a.UD(),c=l.jD();MaybePrepareLayerDraw2(c,e),c.l8(a,l,e,i),l.g8(!1)}e.jv()}D8(){const t={sx:this.T$(),sy:this.E$(),s:this.S$(),a:this.GetAngle(),w:this.AC(),h:this.OC(),ortho:this.X$(),vpX:this.Dq(),vpY:this.Nq(),fv:this.yz,persist:this.gz,fx:this.yY.Ky(),layers:{},dynamicLayers:[]};for(const s of this.uz)if(s.Sq()){const e=s.q$();t.dynamicLayers.push({sid:s.gq(),name:s.pf(),parentSid:e?e.gq():null,siblingIndex:s.Cq(),data:s.D8()})}else t.layers[s.gq().toString()]=s.D8();return t}N8(t){this.tY=t.sx,this.sY=t.sy,this.Q6=t.s,this.Z6=t.a,this.am=t.w,this.lm=t.h,this.X8=!!t.ortho,t.hasOwnProperty("vpX")&&(this.Y8=t.vpX),t.hasOwnProperty("vpY")&&(this.q8=t.vpY),this.yz=!!t.fv,this.gz=t.persist,this.yY.zy(t.fx),this.wY=!0;for(const[s,e]of Object.entries(t.layers)){const i=parseInt(s,10),r=this.Nz(i);r&&r.N8(e)}if(t.hasOwnProperty("dynamicLayers")){this.k$(),this.Af.u$();const n=new Map,h=t.dynamicLayers;for(let t=h.length-1;0<=t;--t){const o=h[t],a=o.sid,l=o.name,c=o.parentSid,u=o.siblingIndex,f=o.data;if(this.Az(),!this.Dz(l)&&!this.Nz(a)){let t,s;if(null===c)t=null,s=this.cz;else{if(!(t=this.Nz(c)))continue;s=t.J$()}const d=C33.yn(C33.P6,this,t,{name:l,sid:a,E6:!0});s.push(d);let e=n.get(s);e||(e=[],n.set(s,e)),e.push({c4:d,siblingIndex:u}),d.N8(f)}}for(const[p,C]of n){C.sort((t,s)=>t.siblingIndex-s.siblingIndex);for(const m of C){let t=m.c4,s=m.siblingIndex,e=p.indexOf(t);p.splice(e,1),p.splice(s,0,t)}}}this.pq(),this.Gz(),this.Mz()}ED(){return this._z}AL(){return this.Tz}r7(t){t.layout=this.ED();const s=this.Af,e=s.UB()&&!s.RL().l$();e&&C3Debugger.StartMeasuringScriptTime(),this.Tz.dispatchEvent(t),e&&C3Debugger.AddScriptTime()}IJ(t){return t.layout=this.ED(),this.Tz.md(t)}wJ(t){return t.layout=this.ED(),this.Af.IJ(t)}n7(){this.h7(this.cz)}h7(t,s=0){const e=t.slice(0);e.reverse();for(const i of e)console.log("\t".repeat(s)+"- "+i.pf()),this.h7(i.J$(),s+1)}}}{const C33=self.Bs;C33.o7=class extends C33.gn{#JV;#a7=[];#l7=new Map;#c7=new Map;#u7=null;#f7=[];#d7=null;#p7=0;#C7=null;constructor(t){super(),this.#JV=t}_n(){this.#JV=null,this.#u7=null,this.#d7=null,this.#C7=null,C33.qh(this.#a7),this.#l7.clear(),this.#c7.clear(),C33.qh(this.#f7)}CA(t){const s=C33.yn(C33.W8,this,this.#a7.length,t);this.#a7.push(s),this.#l7.set(s.pf().toLowerCase(),s),this.#c7.set(s.gq(),s)}cN(){return this.#JV}m7(t){this.#d7=t}g7(){if(this.#d7)return this.#d7;if(this.#a7.length)return this.#a7[0];throw new Error("no first layout")}S7(t){return this.#l7.get(t.toLowerCase())||null}y7(t){return this.#c7.get(t)||null}_7(t){return t=C33.wn(Math.floor(t),0,this.#a7.length-1),this.#a7[t]}RD(t){return"number"==typeof t?this._7(t):this.S7(t.toString())}bD(){return this.#a7}aJ(t){this.#u7=t}AD(){return this.#u7}T7(t){if(this.#f7.includes(t))throw new Error("layout already running");this.#f7.push(t)}A7(t){const s=this.#f7.indexOf(t);if(-1===s)throw new Error("layout not running");this.#f7.splice(s,1)}*E7(){this.#u7&&(yield this.#u7),this.#f7.length&&(yield*this.#f7)}I7(t){return this.#u7===t||this.#f7.includes(t)}kJ(t){if(t)this.#p7++;else{if(this.#p7<=0)throw new Error("already unset");this.#p7--}}c$(){return 0<this.#p7}PD(t){this.#C7=t}mJ(){this.#C7=null}vD(){return!!this.#C7}w7(){return this.#C7}R7(){const t=this.AD();t&&t.Gz()}M7(){const t=this.AD();t&&t.Mz()}}}{const C33=self.Bs,NAMES_REGEXP=new RegExp("<(.+?)>","g");C33.b7=class extends C33.gn{constructor(t){super(),this.Af=t,this.G7=C33.yn(C33.v7),this.P7=null,this.O7=[],this.x7=new Map,this.L7=new Map,this.D7=new Map,this.N7=[],this.F7=[],this.k7=[],this.B7=!1,this.W7=!1,this.H7=!1,this.V7=()=>this.U7(),this.j7=()=>this.X7(),this.Y7=()=>this.q7(),this.K7=()=>this.z7(),this.J7=t=>this.Q7(t.q5),this.Z7=t=>this.t9(),this.s9=t=>this.e9(),this.i9=t=>this.r9(),this.n9=[],this.h9=0}_n(){this.o9(),this.V7=null,this.j7=null,this.Y7=null,this.K7=null,this.J7=null,this.s9=null;for(const t of this.O7)t.VW(),t._n();C33.qh(this.O7),this.O7=null,this.G7._n(),this.G7=null,C33.qh(this.N7),this.N7=null,C33.qh(this.F7),this.F7=null,C33.qh(this.k7),this.k7=null,this.x7.clear(),this.x7=null,this.L7.clear(),this.L7=null,this.D7.clear(),this.D7=null,C33.qh(this.n9),this.n9=null,this.Af=null}a9(){const t=this.Af.ed();t.addEventListener("pretick",this.V7),t.addEventListener("tick2",this.j7),t.addEventListener("beforelayoutchange",this.Y7),t.addEventListener("layoutchange",this.K7),t.addEventListener("instancedestroy",this.J7),t.addEventListener("beforeload",this.Z7),t.addEventListener("afterload",this.s9),t.addEventListener("afterlayoutstart",this.i9)}o9(){const t=this.Af.ed();t.removeEventListener("pretick",this.V7),t.removeEventListener("tick2",this.j7),t.removeEventListener("beforelayoutchange",this.Y7),t.removeEventListener("layoutchange",this.K7),t.removeEventListener("instancedestroy",this.J7),t.removeEventListener("beforeload",this.Z7),t.removeEventListener("afterload",this.s9),t.removeEventListener("afterlayoutstart",this.i9)}CA(t){this.G7.Mu(t);const s=C33.c9.l9(t,this);this.Mu(s),this.u9(s),this.D7.set(s.pf(),0)}f9(t){const s=this.d9(),e=t.uB(),i=s.oe(e),r=C33.c9.f9(e+":"+this.D7.get(e),i,this);return this.p9(e),this.Mu(r),r}p9(t){this.D7.set(t,this.D7.get(t)+1)}C9(){for(const t of this.O7)if(!t.m9()){const s=t.uB();this.p9(s)}}g9(){for(const t of this.D7.keys())this.D7.set(t,0)}Mu(t){this.O7.push(t),this.x7.set(t.pf().toLowerCase(),t)}Hd(t){t.S9(),t.m9()||(C33.eo(this.O7,t),C33.eo(this.N7,t),C33.eo(this.F7,t),C33.eo(this.k7,t),this.x7.delete(t.pf().toLowerCase()),this.y9(t),t.WW())||t._n()}LB(t){this.Af.LB(t,this.P7,null)}cN(){return this.Af}d9(){return this.G7}_9(t){this.P7=t}T9(){return this.P7}*A9(){for(const t of this.O7)yield t}*E9(){for(const t of this.F7)yield t}I9(t,s){this.L7.has(t)||this.L7.set(t,new Set),this.L7.get(t).add(s)}u9(t){for(const s of t.w9())this.I9(s,t)}y9(t){for(const[s,e]of this.L7.entries())e.has(t)&&(e.delete(t),0===e.size)&&this.L7.delete(s)}R9(t){if(this.L7.has(t))return this.L7.get(t)}M9(t,s){if(s)for(const e of this.O7){const i=s.every(t=>e.b9(t.q5,t.trackId));if(i&&e.pf().includes(t.pf()))return e}}G9(t){return this.x7.get(t.toLowerCase())||null}v9(t){for(const s of this.N7)if(s.pf()===t)return s;for(const e of this.F7)if(e.pf()===t)return e;return null}*P9(e){if(NAMES_REGEXP.test(e)){NAMES_REGEXP.lastIndex=0;let t,s=new Set;do{if(t=NAMES_REGEXP.exec(e)){const i=t[1].split(",");for(const r of i)s.add(r)}}while(t);for(const n of s.values()){const h=this.G9(n);h&&(yield h)}s.clear()}else{const t=this.G9(e);t&&(yield t)}}*O9(t){for(const s of this.O7)s.jW(t)&&(yield s)}x9(t){this.N7.includes(t)||this.N7.push(t),this.L9()}D9(t){C33.eo(this.F7,t),this.N9()}F9(t){this.F7.includes(t)?(t.k9(!0),t.B9(!1),t.W9(!1)):(t.k9(!1),t.B9(!0),t.W9(!1),this.N7.includes(t)||this.N7.push(t)),this.L9()}H9(t){t.k9(!1),t.B9(!1),t.V9(),C33.eo(this.N7,t),this.N9()}U9(t){t.k9(!1),t.B9(!1),this.F7.includes(t)&&(t.W9(!0),this.k7.push(t),C33.eo(this.F7,t)),this.N7.includes(t)&&t.W9(!0)}j9(t){t.k9(!1),t.B9(!1),t.W9(!1),t.ZW(1),C33.eo(this.F7,t)}X9(t){this.U9(t),t.V9()}U7(){if(!this.cN().SJ()&&this.B7&&!this.W7){for(this.H7=!0;this.N7.length;){const t=this.N7.pop();(t.Y9()?(t.q9(),this.k7):(t.K9(),this.F7)).push(t),0!==t.z9()&&(this.h9=1)}const s=this.Af.J9(),e=this.Af.Q9(),i=this.Af.ZL();for(let t=this.F7.length-1;0<=t;t--){const r=this.F7[t];r&&r.Z9(s,i,e)}this.H7=!1,0!==this.h9&&this.cN().JD()}}X7(){if(!this.cN().SJ()&&this.B7&&!this.W7){let e;for(let t=0,s=this.k7.length;t<s;t++){const i=this.k7[t];e=e||new Set,i.S9(),this.tQ(i),e.add(i)}if(e){C33.ho(this.k7,e);for(let t=this.h9=0,s=this.F7.length;t<s;t++)if(0!==this.F7[t].z9()){this.h9=1;break}}this.N9()}}tQ(t){t.WW()||t.sQ()&&t.eQ()&&t.iQ()&&t.rQ()}L9(){this.B7||(this.B7=!0)}N9(){this.k7.length||this.F7.length||this.N7.length||this.H7||(this.B7=!1)}q7(){for(this.W7=!0;this.N7.length;)this.H9(this.N7.pop());const t=new Set;for(const s of this.F7){const e=s.q7();e&&(s.S9(),t.add(s))}C33.ho(this.F7,t),t.clear();for(const i of this.k7){const r=i.q7();r&&(i.S9(),t.add(i))}C33.ho(this.k7,t),this.N9();for(const n of this.O7)n.nQ()}z7(){this.W7=!1}Q7(t){const s=t.qk(),e=this.R9(s);if(e)if(this.Af.SJ())this.n9.push(t);else for(const i of e)i.m9()||(i.WW()?this.Hd(i):i.sQ()||(this.tQ(i),this.Hd(i)))}t9(){for(const t of this.N7.map(t=>t))this.tQ(t),this.Hd(t);for(const s of this.F7.map(t=>t))this.tQ(s),this.Hd(s)}e9(){for(const t of this.n9)this.Q7(t);C33.qh(this.n9);for(const s of this.O7)s.e9()}r9(){const t=this.Af.wD(),s=t.AD();if(s)for(const e of this.O7){const i=e.hQ();i&&s.pf()===i&&this.F9(e)}}D8(){return{timelinesJson:this.oQ(),scheduledTimelinesJson:this.aQ(),playingTimelinesJson:this.lQ(),markedForRemovalTimelinesJson:this.cQ(),hasRuntimeListeners:this.B7,changingLayout:this.W7,isTickingTimelines:this.H7}}N8(t){t&&(this.g9(),this.uQ(t.timelinesJson),this.fQ(t.scheduledTimelinesJson),this.dQ(t.playingTimelinesJson),this.pQ(t.markedForRemovalTimelinesJson),this.B7=!t.hasRuntimeListeners,this.W7=!!t.changingLayout,this.H7=!!t.isTickingTimelines,this.C9(),this.L9(),this.N9())}oQ(){return this.O7.map(t=>t.D8())}uQ(t){for(const s of t){let t=this.G9(s.name);if(t)t.N8(s);else{const e=this.CQ(s);if(!e)continue;const i=this.G9(e);(t=this.f9(i)).N8(s)}t.mQ()||this.Hd(t)}}CQ(t){const s=t.name,e=s.split(":");return e&&2===e.length?e[0]:null}aQ(){return this.gQ(this.N7)}fQ(t){this.SQ(t,this.N7)}lQ(){return this.gQ(this.F7)}dQ(t){this.SQ(t,this.F7)}cQ(){return this.gQ(this.k7)}pQ(t){this.SQ(t,this.k7)}yQ(t,s){if(s)for(const e of s)if(e===t.pf())return!0;return!1}gQ(t){return t.map(t=>t.pf())}SQ(t,s){const e=new Set;for(const i of s)this.yQ(i,t)||e.add(i);if(C33.ho(s,e),t)for(const r of t){const n=this.G9(r);if(n){const h=s.find((s=>t=>t.pf()===s)(r));h||s.push(n)}}}}}{const C33=self.Bs,STEPS=100,LENGTH_STEP_SIZE=.01,BEZIER_STEP_SIZE=25,REFINE_ITERATIONS=20,LOOKUP_STEPS_FROM_LAST=5,TANGENT_RESULT=[0,0],MAP_RESULT=[0,0],SHORT_PROJECTION_RESULT=[0,0],PROJECTION_RESULT=[0,0,0,0,0],REFINE_LUT=new Array(4),REFINE_LUT_OBJECTS=[{x:0,y:0,t:0,Ot:0},{x:0,y:0,t:0,Ot:0},{x:0,y:0,t:0,Ot:0}],REFINE_RESULT={x:0,y:0,t:0,Ot:0};C33._Q=class{constructor(t,s){this.TQ=!1,this.AQ=t,this.EQ=[];let e=null;if(e=s?this.AQ.IQ(s):C33.first(this.AQ.wQ())){const i=e.SH("offsetX"),r=e.SH("offsetY");if(i&&r){this.RQ=i,this.MQ=r;const n=i.bQ(),h=r.bQ();for(let t=1,s=Math.min(n.length,h.length);t<s;++t){const o=n[t],a=(o.GQ(),o.vQ()),l=h[t],c=(l.GQ(),l.vQ());a&&"cubic-bezier"===a.PQ()&&c&&"cubic-bezier"===c.PQ()?this.EQ.push(C33.yn(C33.OQ,a,c,o,l,this.EQ.length)):(a&&"line"===a.PQ()&&c&&c.PQ(),this.EQ.push(C33.yn(C33.xQ,o,l,this.EQ.length)))}this.TQ=!0}}}_n(){for(const t of this.EQ)t._n();C33.qh(this.EQ),this.EQ=null,this.AQ=null,this.RQ=null,this.MQ=null}LQ(){return this.TQ}DQ(){return this.EQ}NQ(t){const s="relative"===this.RQ.FQ()?t.Ny():0,e="relative"===this.MQ.FQ()?t.ky():0;for(const i of this.EQ)i.NQ(s,e)}A1(s,e,t){let i=NaN,r=this.EQ.length;for(let t=0;t<r;t++){const n=this.EQ[t];if("cubic-bezier"===n.gE()){const h=n.A1(s,e);(isNaN(i)||h[3]<i)&&(i=h[3],SHORT_PROJECTION_RESULT[0]=h[2],SHORT_PROJECTION_RESULT[1]=n.Yx())}}return SHORT_PROJECTION_RESULT}$Q(s,e,t){const i=t.tRange;C33.gi(i[0])||(i[0]=0),C33.gi(i[1])||(i[1]=1);let r=NaN,n=this.EQ.length;for(let t=0;t<n;t++){const h=this.EQ[t];if("cubic-bezier"===h.gE()){const o=h.kQ(s,e,i);(isNaN(r)||o[3]<r)&&(r=o[3],SHORT_PROJECTION_RESULT[0]=o[2],SHORT_PROJECTION_RESULT[1]=h.Yx())}}return SHORT_PROJECTION_RESULT}BQ(t,s){return this.EQ[s].BQ(t)}WQ(t,s){return this.EQ[s].WQ(t)}},C33.OQ=class{constructor(t,s,e,i,r){this.f1=r;const n=t.HQ("cubic-bezier"),h=e.HQ("cubic-bezier"),o=s.HQ("cubic-bezier"),a=i.HQ("cubic-bezier");this.VQ=t.UQ(),this.jQ=s.UQ(),this.XQ=t.UQ()+n.YQ(),this.qQ=s.UQ()+o.YQ(),this.KQ=e.UQ()+h.zQ(),this.JQ=i.UQ()+a.zQ(),this.QQ=e.UQ(),this.ZQ=i.UQ(),this.tZ=0,this.sZ=0,this.eZ=0,this.iZ=0,this.rZ=0,this.nZ=0,this.hZ=0,this.oZ=0,this.aZ=0,this.lZ=0,this.cZ=0,this.uZ=0,this.fZ=0,this.dZ=0,this.pZ=0,this.CZ=0,this.mZ=0,this.gZ=0,this.SZ=0,this.yZ=0,this._Z=NaN,this.TQ=!1,this.TZ=STEPS,this.AZ=new Array(this.TZ+1),this.AZ[0]=0,this.EZ=0,this.IZ=[],this.wZ=[];for(let t=0;t<STEPS;t++)this.wZ.push({x:0,y:0,t:0,Ot:0});this.RZ()}_n(){C33.qh(this.AZ),this.AZ=null,C33.qh(this.IZ),this.IZ=null,C33.qh(this.wZ),this.wZ=null}gE(){return"cubic-bezier"}Yx(){return this.f1}MZ(){return Math.floor(this.EZ/BEZIER_STEP_SIZE)}bZ(){return 1/this.MZ()}NQ(t,s){this.GZ=t,this.vZ=s,this.AZ=new Array(this.TZ+1),this.AZ[0]=0,this.RZ(),this.tZ=this.VQ+this.GZ,this.sZ=this.jQ+this.vZ,this.eZ=this.XQ+this.GZ,this.iZ=this.qQ+this.vZ,this.rZ=this.KQ+this.GZ,this.nZ=this.JQ+this.vZ,this.hZ=this.QQ+this.GZ,this.oZ=this.ZQ+this.vZ,this.aZ=3*(this.eZ-this.tZ),this.lZ=3*(this.iZ-this.sZ),this.cZ=3*(this.rZ-this.eZ),this.uZ=3*(this.nZ-this.iZ),this.fZ=3*(this.hZ-this.rZ),this.dZ=3*(this.oZ-this.nZ),this.pZ=3*(this.eZ-this.tZ),this.CZ=3*(this.tZ+this.rZ-2*this.eZ),this.mZ=this.hZ-this.tZ+3*(this.eZ-this.rZ),this.gZ=3*(this.iZ-this.sZ),this.SZ=3*(this.sZ+this.nZ-2*this.iZ),this.yZ=this.oZ-this.sZ+3*(this.iZ-this.nZ)}Map(t){if(!this.TQ)return NaN;const s=this.PZ(t);return MAP_RESULT[0]=this.OZ(s),MAP_RESULT[1]=this.xZ(s),MAP_RESULT}A1(t,s){const e=this.LZ(STEPS),i=this.DZ(t,s,e),r=this.NZ(t,s,e,i);return PROJECTION_RESULT[0]=r.x,PROJECTION_RESULT[1]=r.y,PROJECTION_RESULT[2]=r.t,PROJECTION_RESULT[3]=r.Ot,PROJECTION_RESULT}kQ(t,s,e){const i=this.LZ(STEPS),r=this.FZ(t,s,i,e),n=this.NZ(t,s,i,r);return PROJECTION_RESULT[0]=n.x,PROJECTION_RESULT[1]=n.y,PROJECTION_RESULT[2]=n.t,PROJECTION_RESULT[3]=n.Ot,PROJECTION_RESULT}BQ(t){const s=1-t,e=s*s,i=2*s*t,r=t*t,n=e*this.aZ+i*this.cZ+r*this.fZ,h=e*this.lZ+i*this.uZ+r*this.dZ,o=C33.Gn(n,h);return TANGENT_RESULT[0]=n/o,TANGENT_RESULT[1]=h/o,TANGENT_RESULT}WQ(t){const s=1-t,e=s*s,i=2*s*t,r=t*t,n=e*this.aZ+i*this.cZ+r*this.fZ,h=e*this.lZ+i*this.uZ+r*this.dZ;return Math.atan2(h,n)}PZ(r){if(this.TQ){let t=r*this.AZ[this.TZ],s=0,e=this.TZ,i=0;for(;s<e;)i=s+((e-s)/2|0),this.AZ[i]<t?s=i+1:e=i;this.AZ[i]>t&&i--;const n=this.AZ[i];return n===t?i/this.TZ:(i+(t-n)/(this.AZ[i+1]-n))/this.TZ}}OZ(t){return this.TQ?self.vu.ju("cubicbezier")(t,this.VQ+this.GZ,this.XQ+this.GZ,this.KQ+this.GZ,this.QQ+this.GZ):NaN}xZ(t){return this.TQ?self.vu.ju("cubicbezier")(t,this.jQ+this.vZ,this.qQ+this.vZ,this.JQ+this.vZ,this.ZQ+this.vZ):NaN}LZ(s){if(s=s||STEPS,!(this.IZ.length>=s)){this.IZ=new Array(s),s++;for(let t=0;t<s-1;t++){const e=t/(s-1),i=e**2,r=e**3,n=this.pZ*e,h=this.CZ*i,o=this.mZ*r,a=this.gZ*e,l=this.SZ*i,c=this.yZ*r,u=this.tZ+n+h+o,f=this.sZ+a+l+c;this.wZ[t].x=u,this.wZ[t].y=f,this.wZ[t].t=e,this.wZ[t].Ot=0,this.IZ[t]=this.wZ[t]}}return this.IZ}DZ(s,e,i,t=0,r=Number.MAX_SAFE_INTEGER){let n=0;if(isNaN(this._Z))for(let t=0;t<STEPS;t++){const h=i[t],o=h.x-s,a=h.y-e;h.Ot=o*o+a*a,h.Ot<r&&(r=h.Ot,n=t)}else{for(let t=this._Z;t<this._Z+LOOKUP_STEPS_FROM_LAST&&!(t>=i.length);t++){const l=i[t],c=l.x-s,u=l.y-e;l.Ot=c*c+u*u,l.Ot<r&&(r=l.Ot,n=t)}for(let t=this._Z;t>this._Z-LOOKUP_STEPS_FROM_LAST&&!(t<0);t--){const f=i[t],d=f.x-s,p=f.y-e;f.Ot=d*d+p*p,f.Ot<r&&(r=f.Ot,n=t)}}return this._Z=n}FZ(s,e,i,r,n=Number.MAX_SAFE_INTEGER){let h=0;if(isNaN(this._Z))for(let t=0;t<STEPS;t++){const o=i[t],a=o.x-s,l=o.y-e;o.Ot=a*a+l*l,o.t>=r[0]&&o.t<=r[1]&&o.Ot<n&&(n=o.Ot,h=t)}else{for(let t=this._Z;t<this._Z+LOOKUP_STEPS_FROM_LAST&&!(t>=i.length);t++){const c=i[t],u=c.x-s,f=c.y-e;c.Ot=u*u+f*f,c.t>=r[0]&&c.t<=r[1]&&c.Ot<n&&(n=c.Ot,h=t)}for(let t=this._Z;t>this._Z-LOOKUP_STEPS_FROM_LAST&&!(t<0);t--){const d=i[t],p=d.x-s,C=d.y-e;d.Ot=p*p+C*C,d.t>=r[0]&&d.t<=r[1]&&d.Ot<n&&(n=d.Ot,h=t)}}return this._Z=h}NZ(h,o,a,l){let c=a[l],t=1,u=Number.MAX_SAFE_INTEGER;t:do{let t=a.length,s=0===l?0:l-1,e=l===t-1?t-1:l+1,i=a[s].t,r=a[e].t,n=(r-i)/4;if(n<.001)break;REFINE_LUT[0]=a[s];for(let t=1;t<=2;t++){const f=i+t*n,d=f**2,p=f**3,C=this.pZ*f,m=this.CZ*d,g=this.mZ*p,S=this.gZ*f,y=this.SZ*d,_=this.yZ*p,T=this.tZ+C+m+g,A=this.sZ+S+y+_,E=T-h,I=A-o,w=E*E+I*I;if(w<u){u=w,l=t,REFINE_RESULT.x=T,REFINE_RESULT.y=A,REFINE_RESULT.t=f,REFINE_RESULT.Ot=w,c=REFINE_RESULT;break t}const R=REFINE_LUT_OBJECTS[t-1];R.x=T,R.y=A,R.t=f,R.Ot=w,REFINE_LUT[t]=R}REFINE_LUT[3]=a[e],a=REFINE_LUT}while(t++<REFINE_ITERATIONS);return c}RZ(){this.TQ=!0;let s=this.OZ(0),e=this.xZ(0),i=0;for(let t=1;t<=this.TZ;t++){const r=this.OZ(t*LENGTH_STEP_SIZE),n=this.xZ(t*LENGTH_STEP_SIZE),h=s-r,o=e-n;i+=C33.Gn(h,o),this.AZ[t]=i,s=r,e=n}this.EZ=i}},C33.xQ=class{constructor(t,s,e){this.f1=e,this.$Z=t.UQ(),this.kZ=s.UQ(),this.GZ=0,this.vZ=0}_n(){}gE(){return"line"}Yx(){return this.f1}NQ(t,s){this.GZ=t,this.vZ=s}Ny(){return this.$Z+this.GZ}ky(){return this.kZ+this.vZ}}}{const C33=self.Bs,PING_PONG_BEGIN=0,PING_PONG_END=1;C33.c9=class extends C33.gn{constructor(t,s,e){super(),this.Af=e.cN(),this.BZ=e,this.WZ=s,this.En=t,this.HZ=[],this.VZ=0,this.UZ=null,this.jZ=0,this.XZ(),this.YZ=null,this.qZ=null,this.KZ=0,this.zZ=0,this.JZ=1,this.QZ=PING_PONG_BEGIN,this.ZZ=1,this.ttt=!1,this.stt=!1,this.ett=!1,this.itt=!0,this.ntt=!1,this.htt=!1,this.ott=-1,this.att=!1,this.ltt=!1,this.ctt=!1,this.utt=!1,this.ftt=NaN,this.dtt=[""],this.ptt="",this.Ctt=!1,this.h9=0,this.mtt=0,this.gtt=null}static l9(t,s){const e=s.d9(),i=e.Stt(),r=e.oe(t[i]),n=C33.yn(C33.c9,t[i],r,s);return n.ytt(!0),n}static f9(t,s,e){return C33.yn(C33.c9,t,s,e)}_n(){if(!this.WW()){const t=this.Af.ed();this.BZ.H9(this),this.BZ.X9(this);for(const s of this.HZ)s._n();C33.qh(this.HZ),this.HZ=null,this.Af=null,this.BZ=null,this.WZ=null,this.ntt=!0,this.YZ=null,this.qZ=null,this._tt(t)}}_tt(t){const s=C33.yn(C33.Event,"timelinestatereleased");s.Ttt=this,t.dispatchEvent(s)}gE(){return 0}XZ(){for(const t of this.WZ.Ett().Att())this.VZ=this.HZ.push(C33.Itt.CA(this,t))}wtt(){return this.BZ}cN(){return this.Af}wQ(){return this.HZ}Rtt(i,r,n,h){if(this.mtt){let e;for(let s=0;s<this.HZ.length;s++){let t=this.HZ[s];if(i===t.fH()){const o=t.SH(n);o&&r.constructor===o.Mtt().constructor&&o.FQ()===h.FQ()&&(e=e||[]).push(o)}}return e}}mQ(){return!!this.HZ.length}IQ(t){for(const s of this.HZ)if(C33.wr(s.mH(),t))return s;return null}btt(t){for(const s of this.HZ)if(!s.Gtt()&&C33.wr(s.pf(),t))return s;return null}oU(t){this.En=t}pf(){return this.En}vtt(){return this.WZ}uB(){return this.WZ.pf()}qW(){return this.WZ.qW()}YW(t){this.WZ.YW(t)}Ptt(){return this.WZ.Ptt()}Ott(t){this.WZ.Ott(t)}xtt(){return this.WZ.xtt()}Ltt(t){this.WZ.Ltt(t)}FQ(){return this.WZ.FQ()}Dtt(t){this.WZ.FQ(t)}uH(t){for(const s of this.wQ())s.uH(t)}zW(){return this.WZ.zW()}KW(t){return this.WZ.KW(t)}QW(){return this.WZ.QW()}JW(t){return this.WZ.JW(t)}oW(){return this.WZ.oW()}Ntt(t){return this.WZ.Ntt(t)}ZW(t){return this.JZ=t}tH(){return this.JZ}hQ(){return this.WZ.hQ()}Ftt(){return this.WZ.Ftt()}$tt(){return this.WZ.$tt()}ktt(){return this.QZ}Btt(){return!this.IsPlaying()||0<this.JZ}eH(){return this.YZ||(this.YZ=new Promise(t=>{this.qZ=t})),this.YZ}V9(){this.YZ&&(this.qZ(),this.YZ=null,this.qZ=null)}Wtt(t){this.dtt=C33.c9.Htt(t),this.Ctt=!0}sH(){return this.dtt}Vtt(){return this.Ctt&&(this.ptt=this.dtt.join(" ")),this.Ctt=!1,this.ptt}jW(t){if(!this.dtt)return!1;if(!this.dtt.length)return!1;const s=C33.c9.Htt(t);return!!s&&!!s.length&&s.every(C33.c9.Utt,this)}jtt(){C33.GJ.Timeline&&this.constructor===C33.c9&&(C33.GJ.Timeline.MJ.PushTriggerTimeline(this),this.BZ.LB(C33.GJ.Timeline.MJ.OnTimelineStarted),this.BZ.LB(C33.GJ.Timeline.MJ.OnTimelineStartedByName),this.BZ.LB(C33.GJ.Timeline.MJ.OnTimelineStartedByTags),this.BZ.LB(C33.GJ.Timeline.MJ.OnAnyTimelineStarted),C33.GJ.Timeline.MJ.PopTriggerTimeline())}Xtt(){this.ott=this.Af.Ytt()}rQ(){this.ctt||(this.ctt=!0,C33.GJ.Timeline&&this.constructor===C33.c9&&(C33.GJ.Timeline.MJ.PushTriggerTimeline(this),this.BZ.LB(C33.GJ.Timeline.MJ.OnTimelineFinished),this.BZ.LB(C33.GJ.Timeline.MJ.OnTimelineFinishedByName),this.BZ.LB(C33.GJ.Timeline.MJ.OnTimelineFinishedByTags),this.BZ.LB(C33.GJ.Timeline.MJ.OnAnyTimelineFinished),C33.GJ.Timeline.MJ.PopTriggerTimeline()))}k9(t){this.ttt=t}qtt(){return this.ott===this.Af.Ytt()}IsPlaying(t=!1){return!!this.qtt()||!(!this.Ktt()||t)||this.ttt}ztt(){return this.IsPlaying(!0)}rH(){return this.Jtt()}Jtt(){return!(this.WW()||this.Ktt()||this.ztt()||this.eQ())}B9(t){this.stt=t}Ktt(){return this.stt}Qtt(t){this.itt=t;const s=this.AP();(s<=0||s>=this.qW())&&(this.itt=!0)}eQ(){return this.itt}WW(){return this.ntt}W9(t){this.htt=t}Y9(){return this.htt}Ztt(t){this.att=t}tst(){return this.att}ytt(t){this.ltt=!!t}m9(){return this.ltt}iQ(){return this.ett}AP(){return this.KZ}XW(t){const s=this.AP();this.sst(t),this.Qtt(!1),this.eQ()||this.Ztt(!0),!this.ztt()&&!this.Ktt()&&this.ett||(this.ztt()||this.Ktt()||this.ett?this.ztt()?this.VW():this.Ktt()&&(this.BZ.H9(this),this.est()):this.est()),this.ist(),this.rst(this.AP(),!1,!0,!0,s),this.nst(),this.h9&&this.cN().JD(),this.hst()}sst(t){(t=C33.gi(t)?t:this.qW())<0?this.KZ=0:t>=this.qW()?this.KZ=this.qW():this.KZ=t}ost(t){(t=C33.gi(t)?t:this.qW())<0?this.KZ=0:t>=this.qW()?this.KZ=this.qW():this.KZ=t;for(const s of this.HZ)s.ast()}hst(){C33.GJ.Timeline&&this.constructor===C33.c9&&(C33.GJ.Timeline.MJ.PushTriggerTimeline(this),this.BZ.LB(C33.GJ.Timeline.MJ.OnTimeSet),this.BZ.LB(C33.GJ.Timeline.MJ.OnTimeSetByName),this.BZ.LB(C33.GJ.Timeline.MJ.OnTimeSetByTags),C33.GJ.Timeline.MJ.PopTriggerTimeline())}lst(){if(!this.zW())if(this.QW()&&this.QZ===PING_PONG_END){if(this.Btt()){if(this.AP()>=this.qW())return!1}else if(this.AP()<=0)return!1}else if(!this.zW()&&!this.QW())if(this.Btt()){if(this.AP()>=this.qW())return!1}else if(this.AP()<=0)return!1;return!0}UW(){this.WW()||this.lst()&&this.Play(!0)}Play(t=!1){return!this.WW()&&!this.Ktt()&&(this.ztt()&&this.qtt()?this.cst():!this.ztt()&&!!(this.eQ()||t||this.tst())&&this.ust())}cst(){return this.Ztt(!1),this.BZ.D9(this),this.BZ.F9(this),this.eH(),!0}ust(){return this.Ztt(!1),this.BZ.F9(this),this.eH(),!0}VW(t=!1){this.WW()||(this.Qtt(t),this.BZ.U9(this),this.eQ()&&this.V9())}vd(t=!0,s=!1){if(!this.WW()){if(!this.ztt()&&this.Ktt())return this.BZ.H9(this);if(!this.eQ()){this.VW(!0),this.Btt()?this.sst(0):this.sst(this.qW());const e=this.AP();this.ist(),s?this.fst(e):this.rst(e,!1,!1,!0),t&&this.hst(),this.nst(),this.h9&&t&&this.cN().JD()}}}dst(){this.vd(!1,!0)}fst(t){this.rst(t,!1,!1,!0,NaN,!1,!0)}q7(){if(!this.WW()){if(!this.cN().SJ()&&this.pst())return!1;this.BZ.j9(this),this.cN().SJ()||this.dst()}return!0}est(){this.K9(!0)}q9(){this.K9(!1,!0),this.k9(!1),this.B9(!1)}K9(t=!1,s=!1){if(!this.Y9()||s){if(t){this.ctt=!1,this.ett=!0,this.utt=!0,this.ist();for(const e of this.HZ)e.K9()}else if(this.k9(!0),this.B9(!1),this.jtt(),this.eQ()){this.ott=-1,this.QZ!==PING_PONG_BEGIN&&(this.JZ=Math.abs(this.JZ)),this.QZ=PING_PONG_BEGIN,this.ZZ=1,this.itt=!1,this.ctt=!1,this.ett=!0,this.utt=!0,this.Btt()?this.sst(0):this.sst(this.qW()),this.ist();for(const i of this.HZ)i.K9()}else{this.utt=!0,this.ctt=!1,this.ist();for(const r of this.HZ)r.Cst()}this.nst()}}z9(){return this.h9}ist(){this.mtt=0;for(const t of this.HZ)t.ob()&&(this.mtt=1)}nst(){this.h9=0;for(const t of this.HZ)t.mst(),0===this.h9&&1===t.z9()&&(this.h9=1),this.UZ||1!==t.gst()||(this.UZ||(this.UZ=[]),this.jZ=this.UZ.push(t))}Z9(t,s,e){if(this.$tt()){if(0===t&&0===this.ftt)return;this.ftt=t,t=e}else{if(0===e&&0===this.ftt)return;t=this.ftt=e,s=1}const i=this.KZ+this.zZ,r=t*s*this.JZ,n=i+r,h=this.WZ.Sst;n<0?(this.KZ=0,this.zZ=-n):h<=n?(this.KZ=h,this.zZ=this.KZ-n):(this.KZ=n,this.zZ=0);let o=!1,a=!1,l=this.zW(),c=this.QW();l||c?l&&!c?0<this.JZ?this.KZ>=h&&(this.ost(0),a=!0):this.KZ<=0&&(this.ost(h),a=!0):!l&&c?0<this.JZ?this.KZ>=h&&(this.sst(h),this.ZW(-1*this.tH()),a=!0,this.QZ===PING_PONG_END?this.ZZ<this.oW()?(this.ZZ++,this.QZ=PING_PONG_BEGIN):o=!0:this.QZ===PING_PONG_BEGIN&&(this.QZ=PING_PONG_END)):this.KZ<=0&&(this.sst(0),this.ZW(-1*this.tH()),a=!0,this.QZ===PING_PONG_END?this.ZZ<this.oW()?(this.ZZ++,this.QZ=PING_PONG_BEGIN):o=!0:this.QZ===PING_PONG_BEGIN&&(this.QZ=PING_PONG_END)):l&&c&&(0<this.JZ?this.KZ>=h&&(this.sst(h),this.ZW(-1*this.tH()),a=!0,this.QZ++,C33.wrap(this.QZ,0,2)):this.KZ<=0&&(this.sst(0),this.ZW(-1*this.tH()),a=!0,this.QZ++,C33.wrap(this.QZ,0,2))):0<this.JZ?this.KZ>=h&&(this.ZZ<this.oW()?(this.ZZ++,this.ost(0),a=!0):(this.sst(h),o=!0)):this.KZ<=0&&(this.ZZ<this.oW()?(this.ZZ++,this.ost(h),a=!0):(this.sst(0),o=!0));let u,f=this.VZ;if(o){for(u=0;u<f;u++)this.HZ[u].yst();this.VW(!0),this.Xtt()}else{const d=this.jZ;for(u=0;u<d;u++)this.UZ[u]._st();if(1===this.mtt)for(u=0;u<f;u++){const p=this.HZ[u],C=p.Tst(),m=this.KZ-C,g=i-C;m<0&&0<g?(this.KZ=C<0?0:h<=C?h:C,p.ef(C,!0,!1,a,this.utt,!1)):p.ef(this.KZ,!0,!1,a,this.utt,!1)}else for(u=0;u<f;u++)this.HZ[u].ef(this.KZ,!0,!1,a,this.utt,!1);for(u=0;u<d;u++)this.UZ[u].Ast();this.utt&&(this.utt=!1)}}rst(s,e=!1,i=!1,r=!1,n=NaN,t=!1,h=!1){for(const o of this.HZ)o._st();for(const a of this.HZ){let t=s;if("number"==typeof n&&!isNaN(n)){const l=this.AP(),c=l-a.Tst(),u=n-a.Tst();c<0&&0<u&&(t=a.Tst(),this.sst(t))}a.ef(t,e,i,r,this.utt,h)}for(const f of this.HZ)f.Ast();this.utt&&t&&(this.utt=!1)}Est(){const t=this.WZ.Ett().Ist(),s=C33.Itt.CA(this,t);return this.VZ=this.HZ.push(s),s}S9(){if(!this.WW())for(const t of this.HZ)t.wst()}nQ(){for(const t of this.HZ)t.nQ()}Rst(){for(const t of this.HZ)t.Mst()}bst(t,s,e){if(s){if("number"==typeof e&&0<=e){const i=this.HZ[e];return i?(i.Gst(s),void this.BZ.I9(s.qk(),this)):void 0}for(const r of this.HZ)if(r.Gtt())if(t){if(r.mH()===t){r.Gst(s),this.BZ.I9(s.qk(),this);break}}else if(!r.vst()){r.Gst(s),this.BZ.I9(s.qk(),this);break}}}b9(t,s){for(const e of this.HZ)if(e.Gtt())if(s){if(s===e.mH()&&t===e.fH())return!0}else if(t===e.fH())return!0;return!1}sQ(){return this.HZ.some(t=>!t.Gtt()||t.Pst())}pst(){return this.HZ.some(t=>{if(t.Gtt()){if(!t.Pst())return!1;const s=t.qk();return!!s&&s.qY()}return!1})}SH(t){for(const s of this.wQ())for(const e of s.Ost())if(e.xst()===t)return e}Lst(t){for(const s of this.HZ)if(t===s.fH())return s;return null}Dst(t){let s=t?t.split(" "):[],e=new Set(s.map(t=>t.toLowerCase().trim()));s=[...e.values()];for(const i of this.wQ())for(const r of i.Nst()){const n=s.every(t=>r.Fst(t));if(n)return r}}w9(){const t=[];for(const s of this.wQ())t.push(s.qk());return t.filter(t=>t)}e9(){for(const t of this.wQ())t.e9()}D8(){return{tracksJson:this.$st(),name:this.En,playheadTime:this.AP(),playbackRate:this.JZ,pingPongState:this.QZ,currentRepeatCount:this.ZZ,isPlaying:this.ttt,isScheduled:this.stt,initialStateSet:this.ett,finishedTriggers:this.ctt,complete:this.itt,released:this.ntt,markedForRemoval:this.htt,completedTick:this.ott,implicitPause:this.att,isTemplate:this.ltt,tags:this.dtt.join(" "),stringTags:this.ptt,tagsChanged:this.Ctt,firstTick:this.utt}}N8(t){t&&(this.kst(t.tracksJson),this.En=t.name,this.KZ=t.playheadTime,this.JZ=t.playbackRate,this.QZ=t.pingPongState,this.ZZ=t.currentRepeatCount,this.ttt=!!t.isPlaying,this.stt=!!t.isScheduled,this.ett=!!t.initialStateSet,this.ctt=!!t.hasOwnProperty("finishedTriggers")&&!!t.finishedTriggers,this.itt=!!t.complete,this.ntt=!!t.released,this.htt=!!t.markedForRemoval,this.ott=t.completedTick,this.att=!!t.implicitPause,this.ltt=!!t.isTemplate,this.dtt=t.tags.split(" "),this.ptt=t.stringTags,this.Ctt=!!t.tagsChanged,this.utt=!!t.firstTick)}$st(){return this.HZ.map(t=>t.D8())}kst(t){this.Rst(),t.forEach((t,s)=>{const e=this.HZ[s];e.N8(t)}),this.HZ.filter(t=>t.Pst())}static Utt(t){const s=this.sH();return""===t?1===s.length&&""===s[0]:s.map(t=>t.toLowerCase()).includes(t.toLowerCase())}static Htt(t){if(C33.Wi(t))return t.slice(0);if(C33.Ri(t))return t.split(" ");throw new Error("invalid tags")}Bst(){return this.gtt||(this.gtt=C33.yn(self.hH,this)),this.gtt}}}{const C33=self.Bs,INSTANCE_TRACK=0,VALUE_TRACK=1,AUDIO_TRACK=2;C33.Itt=class extends C33.gn{constructor(t,s){super(),this.AQ=t,this.Wst=s,this.Hst=s.Ett(),this.Vst=NaN,this.Ust=NaN,this.jst=null,this.Xst=null,this.Yst=!1,this.sb=0<s.Tst(),this.qst=!1,this.Kst=!1,this.zst=NaN,this.Jst=null,this.Qst=this.Wst.tet().Zst(),this.eet=[],this.iet(),this.ret=0,this.h9=0,this.net=0}static CA(t,s){return C33.yn(C33.Itt,t,s)}_n(){this.Qst=null;for(const t of this.eet)t._n();C33.qh(this.eet),this.eet=null,this.AQ=null,this.jst=null,this.Xst=null,this.Wst=null,this.Jst=null}iet(){for(const t of this.Wst.oet().het())this.eet.push(C33.aet.CA(this,t))}wst(){for(const t of this.eet)t.wst()}nQ(){for(const t of this.eet)t.nQ();this.jst=null,this.Xst=null}let(){return this.AQ}cN(){return this.AQ.cN()}Nst(){return this.Qst||(this.Qst=this.Wst.tet().Zst()),this.Qst}Ost(){return this.eet}SH(s){for(let t=0;t<this.eet.length;t++){const e=this.eet[t];if(e.xst()===s)return e}}cet(){this.jst||this.fH()}uet(){return!!this.jst&&!this.jst.mV()}Pst(){if(!this.Gtt())return!1;const t=this.fet(),s=this.cN().kD(t);return!!s&&!s.mV()}qk(){if(this.Gtt()){const t=this.det();if(-1!==t)return this.cN().$Y(t)}}pet(){return this.AQ.wQ().indexOf(this)}Mst(){this.jst=null,this.Vst=NaN,this.Xst=null,this.Ust=NaN,this.Yst=!0}vst(){return!!this.jst}fH(){if(!this.Yst){if(!this.jst||!this.uet()){const t=this.fet();this.jst=this.cN().kD(t)}return this.jst}}Gst(t){if(this.Yst=!1,this.jst!==t){this.nQ(),this.jst=t,this.Ust=t.qk().Yx(),this.Vst=t.oB(),this.Xst=t.UD();for(const s of this.Cet()){const e=s.met,i=s.yet,r=e._et();switch(r){case"instance-variable":{i.Tet();const n=t.qk(),h=n.Aet(s.name),o=n.Eet(h),a=n.Iet(h);o===s.name&&a===s.type&&i.wet(h);break}case"behavior":{const l=s.j5,c=this.qk(),u=t.qk(),f=i.Y5(u);if(l&&f){const d=l.pf();c.Ret(d),u.Ret(d),i.Tet(),i.Met(f.gq())}break}}}}}*Cet(){for(const t of this.eet){const s=t.Mtt(),e=this.qk(),i={met:t,yet:s};switch(t._et()){case"world-instance":i.property=t.xst();break;case"instance-variable":{const r=s.Tet();i.name=e.Eet(r),i.type=e.Iet(r);break}case"effect":{const n=e.d$(),h=s.bet(n);i.Get=h;break}case"behavior":{const o=s.Y5(e);i.j5=o;break}case"plugin":i.VF=e.UF()}yield i}}UD(){if(!this.Xst||!this.uet()){const t=this.fH();t&&(this.Xst=t.UD())}return this.Xst}vet(){return this.Wst}fet(){return isNaN(this.Vst)?this.Wst.fet():this.Vst}Pet(t){this.Wst.Pet(t)}xtt(){return this.Wst.xtt()}Ltt(t){this.Wst.Ltt(t)}FQ(){return this.Wst.FQ()}mH(){return this.Wst.mH()}Tst(){return this.Wst.Tst()}Oet(){return this.Wst.Oet()}xet(t){this.Wst.xet(t)}Dtt(t){this.Wst.Dtt(t)}uH(t){for(const s of this.Nst())s.uH(t);for(const e of this.Ost())e.uH(t)}Let(){return this.Wst.Let()}Det(t){this.Wst.Det(t)}det(){return isNaN(this.Ust)?this.Wst.det():this.Ust}Net(t){this.Wst.Net(t)}Fet(t){this.Wst.Fet(t)}$et(){const t=this.fH();if(t){const s=t.N5();if(s.ket())return t.N5().$et()}return this.Wst.$et()}Bet(t){this.Wst.Bet(t)}Wet(){const t=this.fH();if(t){const s=t.N5();if(s.ket())return t.N5().Wet()}return this.Wst.Wet()}gE(){return this.Wst.gE()}pf(){return this.Wst.pf()}Gtt(){return this.gE()===INSTANCE_TRACK}Het(){return this.gE()===VALUE_TRACK}Vet(){return this.gE()===AUDIO_TRACK}Uet(){return this.ret}z9(){return this.h9}gst(){return this.net}ob(){return this.sb}ast(){for(const t of this.eet)t.ast()}K9(){if(this.cet(),this.uet()||!this.Gtt()){const t=this.let(),s=t.Btt(),e=s?0:this.Oet();for(const r of this.eet)r.K9(e),0===this.ret&&1===r.Uet()&&(this.ret=1),0===this.h9&&1===r.z9()&&(this.h9=1);this.net=0;const i=this.eet.some(t=>t.gst());i&&(this.net=1),this.Jst=this.jet(e),this.qst=!1,this.Kst=!1,this.ef(e),this.Xet(this.jet(e))}}Cst(){if(this.cet(),this.uet()||!this.Gtt()){this.AQ.Btt();const t=this.AQ.AP()-this.Tst();this.Jst=this.jet(t);for(const s of this.eet)s.Cst(t)}}yst(){if(!this.let().eQ()&&(this.cet(),this.uet()||!this.Gtt())&&!this.sb){const t=this.AQ.AP(),s=this.Tst()+this.Oet();s<=t?this.ef(this.Oet(),!0,!1,!0,!1,!1,!0):t<=0&&this.ef(0,!0,!1,!0,!1,!1,!0)}}mst(){for(let t=0,s=this.eet.length;t<s;t++){const e=this.eet[t];e.mst(),0===this.ret&&1===e.Uet()&&(this.ret=1),0===this.h9&&1===e.z9()&&(this.h9=1)}}_st(){const s=this.eet.length;for(let t=0;t<s;t++)this.eet[t]._st()}ef(e,t=!1,i=!1,r=!1,s=!1,n=!1,h=!1){this.jst||this.fH();const o=this.jst&&!this.jst.mV(),a=this.Wst.vf===INSTANCE_TRACK;if((o||!a)&&!(n&&a&&this.qk().qY()||(e-=this.Tst())<0)){this.Yet(e,t),this.qet(e,t,s);for(let t=0,s=this.eet.length;t<s;t++)this.eet[t].ef(e,i,r,h);this.Ket(e,t),0!==this.ret&&(this.Xst||(this.Xst=this.jst.UD()),this.Xst)&&this.Xst.u4()}}Ast(){const s=this.eet.length;for(let t=0;t<s;t++)this.eet[t].Ast()}Yet(t,s){if(s&&this.sb&&!this.qst){const e=this.let();if(e.Btt()){if(t<0)return}else if(t>this.Oet())return;for(const i of this.eet)i.K9();this.qst=!0}}Ket(t,s){if(s&&this.sb&&!this.Kst){const e=this.let();if(e.Btt()){if(t>=this.Oet()){for(const i of this.eet)i.ef(this.Oet(),!1,!0);this.Kst=!0}}else if(t<=0){for(const r of this.eet)r.ef(0,!1,!0);this.Kst=!0}}}qet(t,s,e){if(!e&&s&&C33.GJ.Timeline){const i=this.let(),r=this.Jst.GQ(),n=this.Jst.AP(),h=r?r.AP():i.qW();if(t<=n||h<=t)if(this.Jst=this.Hst.zet(t,this.Wst),i.Btt())r&&this.Xet(this.Jst);else{const o=this.Jst.GQ();o&&this.Xet(o)}}}jet(t){const s=this.Hst.Jet(t,this.Wst);return s||this.Hst.zet(t,this.Wst)}Xet(t){if(C33.GJ.Timeline){const s=this.let(),e=s.wtt();C33.GJ.Timeline.MJ.PushTriggerTimeline(s),C33.GJ.Timeline.MJ.PushTriggerKeyframe(t),e.LB(C33.GJ.Timeline.MJ.OnAnyKeyframeReached),e.LB(C33.GJ.Timeline.MJ.Xet),C33.GJ.Timeline.MJ.PopTriggerTimeline(s),C33.GJ.Timeline.MJ.PopTriggerKeyframe(t)}}Qet(){const t=this.Wst.tet(),s=t.Zet();return s}tit(){const t=this.Wst.oet(),s=t.sit(),e=C33.aet.CA(this,s);return this.eet.push(e),e}eit(t){const s=this.Wst.tet();s.iit(t)}rit(t){for(const s of this.eet)s.rit(t)}nit(){for(const t of this.eet)t.nit()}hit(){if(this.cet(),this.uet()||!this.Gtt())for(const t of this.eet)t.hit()}oit(){if(this.cet(),this.uet()||!this.Gtt()){let t=!1;for(const s of this.eet){const e=s.oit();!t&&e&&(t=!0)}if(t){const i=this.Qet();i.XW(this.let().AP()),i.uH("noease"),i.Det(!0),i.Wtt("")}}}e9(){isNaN(this.zst)||this.ait(this.zst),this.zst=NaN}D8(){const t=this.fH(),s=t?t.oB():this.fet();return{propertyTracksJson:this.lit(),lastKeyframeDataItemJson:this.cit(),initialStateOfNestedSet:this.qst,endStateOfNestedSet:this.Kst,instanceUid:s,cleared:this.Yst}}N8(t){if(t){this.uit(t.propertyTracksJson),this.fit(t.lastKeyframeDataItemJson),this.zst=t.instanceUid,this.qst=!1,t.hasOwnProperty.initialStateOfNestedSet&&(this.qst=t.initialStateOfNestedSet),this.Kst=!1,t.hasOwnProperty.endStateOfNestedSet&&(this.Kst=t.endStateOfNestedSet),this.Yst=!!t.hasOwnProperty("cleared")&&t.cleared;for(const s of this.eet)0===this.ret&&1===s.Uet()&&(this.ret=1),0===this.h9&&1===s.z9()&&(this.h9=1);this.net=0,this.eet.some(t=>t.gst())&&(this.net=1)}}cit(){const t=this.Wst.tet();return t.dit(this.Jst)}lit(){return this.eet.map(t=>t.D8())}uit(t){t.forEach((t,s)=>{const e=this.eet[s];e.N8(t)})}ait(t){if(C33.gi(t)){const s=this.cN().kD(t);if(s){const e=this.let();e.bst(this.Wst.mH(),s,this.pet())}}}fit(t){const s=this.Wst.tet();this.Jst=s.pit(t)}}}{const C33=self.Bs;C33.aet=class extends C33.gn{constructor(t,s){super(),this.Cit=t,this.mit=s,this.git=s.oet(),this.ret=0,this.h9=0,this.net=0,this.Sit=this.Mtt(),this.yit=this.mit.Tit()._it(),this.Ait=null,this.Eit=null}static CA(t,s){return C33.yn(C33.aet,t,s)}_n(){this.Cit=null,this.Sit&&(this.Sit._n(),this.Sit=null),this.yit=null,this.mit=null,this.git=null}Uet(){return this.ret}z9(){return this.h9}gst(){return this.net}Iit(){return!!this.Eit}wit(t){this.Eit=t}Rit(){return this.Eit}Mit(){return this.Cit}bit(){return this.mit}oet(){return this.git}let(){return this.Cit.let()}cN(){return this.Cit.cN()}fH(){return this.Cit.fH()}Mtt(){if(!this.Sit){let t=this.mit._et(),s;switch(t){case"behavior":s=new C33.aet.Git(this);break;case"effect":s=new C33.aet.vit(this),this.h9=1;break;case"instance-variable":s=new C33.aet.Pit(this);break;case"plugin":s=new C33.aet.Oit(this),this.h9=1;break;case"world-instance":s=new C33.aet.xit(this),this.h9=1,this.ret=1;break;case"value":s=new C33.aet.Lit(this);break;case"audio":s=new C33.aet.Dit(this)}this.Sit=s}return this.Sit}_et(){return this.mit._et()}Nit(t){this.mit.Nit(t)}Fit(){return this.mit.$it()}kit(t){this.mit.Bit(t)}gH(){return this.Mtt().Wit()}xst(){return this.mit.Hit()}Vit(t){this.mit.Uit(t)}jit(){return this.mit.gE()}Xit(t){this.mit.SetType(t)}Yit(){return this.oet().qit(this.mit).gE()}Kit(){return this.mit.Kit()}zit(t){this.mit.zit(t)}Jit(){return this.mit.Jit()}Qit(t){this.mit.Qit(t)}Let(){return this.mit.Let()}Det(t){this.mit.Det(t)}xtt(){return this.mit.xtt()}Ltt(t){this.mit.Ltt(t)}FQ(){return this.mit.FQ()}Dtt(t){this.mit.Dtt(t)}uH(t){for(const s of this.Zit())s.uH(t)}trt(){return this.mit.trt()}Zit(){return this.yit||(this.yit=this.mit.Tit()._it()),this.yit}bQ(){return this.mit.Tit().bQ()}srt(t){return this.git.srt(t,this.mit)}ert(t){return this.git.ert(t,this.mit)}irt(t){let s=this.git.srt(t,this.mit),e;return e=s?this.git.rrt(t,this.mit):(s=this.git.ert(t,this.mit),this.git.nrt(t,this.mit)),{start:s,end:e}}*hrt(){for(const t of this.Zit())yield t.UQ()}*ort(){for(const t of this.Zit())yield t.AP()}wst(){this.Mtt().wst()}nQ(){this.Mtt().nQ()}art(){return this.Mtt().art()}ast(){this.Mtt().ast()}K9(t){this.Mtt().K9(),this.Ait=this.lrt(t),this.mst()}Cst(t){this.Mtt().Cst(),this.Ait=this.lrt(t)}mst(){const t=this.Mit();if(this.net=0,t.Gtt()){const s=this.let(),e=t.fH(),i=this.Mtt(),r=this.xst(),n=i.crt();if(n){const h=s.Rtt(e,i,r,this);h&&h.length&&(this.net=1)}else this.net=0}}lrt(t){const s=this.let(),e=this.git.srt(t,this.mit);return e||(s.Btt()?this.git.ert(t,this.mit):this.git.nrt(t,this.mit))}_st(){this.Sit._st()}ef(t,s=!1,e=!1,i=!1){let r,n,h=!1;if(s)r=this.git.ert(t,this.mit);else{if(this.Ait){const o=this.let(),a=this.Ait.GQ(),l=this.Ait.AP(),c=a?a.AP():o.qW();(t<=l||c<=t)&&(this.Ait=this.git.ert(t,this.mit),h=!0)}else this.Ait=this.git.ert(t,this.mit),h=!0;r=this.Ait}r&&(n=r.GQ()),this.Sit.ef(t,r,n,s,e,i,h)}urt(t){if(this.Ait){const i=this.let(),r=this.Ait.GQ(),n=this.Ait.AP(),h=r?r.AP():i.qW();(t<=n||h<=t)&&(this.Ait=this.git.ert(t,this.mit))}else this.Ait=this.git.ert(t,this.mit);const s=this.Ait,e=s.GQ();return this.Sit.urt(t,s,e)}frt(t,s,e){return this.Sit.urt(t,s,e)}Ast(){this.Sit.Ast()}static drt(t,s){const e=s.bit(),i=s.git;return i.ert(t,e)}static prt(t,s){const e=s.bit(),i=s.git;return i.nrt(t,e)}Crt(){const t=this.mit.Tit(),s=t.mrt();return this.Ait=null,s}rit(t){this.Ait=null;const s=this.mit.Tit();s.grt(t)}nit(){this.Mtt().nit()}hit(){const t=this.Mtt().hit();if(t){const s=this.git.qit(this.mit),e=this.Mtt().art();s.Srt(e)}}oit(){const t=this.Mtt().oit();return t&&this.yrt(),this.Mtt()._rt(),t}yrt(){const t=this.let().AP(),s=this.Mtt(),e=C33.aet.drt(t,this),i=this.Crt();i.SetType(e.gE()),i.XW(t),i.uH(e.Trt()),i.Det(!0),i.Art(s.Ert()),i.Srt(s.art())}D8(){return{sourceAdapterJson:this.Mtt().D8()}}N8(t){t&&this.Mtt().N8(t.sourceAdapterJson)}}}{const C33=self.Bs,NS=C33.aet;NS.xit=class{constructor(t){this.Irt=t,this.wrt=null,this.Rrt()}_n(){this.wrt&&(this.wrt._n(),this.wrt=null),this.Irt=null}crt(){return this.wrt.crt()}SH(){return this.Irt}wst(){this.wrt&&this.wrt.wst()}nQ(){this.wrt&&this.wrt.nQ()}Rrt(){return this.wrt||(this.wrt=this.Mrt()),this.wrt}Tet(){}Yx(){return this.Tet()}brt(){}ast(){this.Rrt().ast()}K9(){this.Rrt().K9()}Cst(){this.Rrt().Cst()}_st(){this.wrt.Grt()}ef(t,s,e,i,r,n,h){let o=this.Irt.Yit(),a;switch(o){case"numeric":a=NS.vrt.ef(t,s,e,this.Irt);break;case"angle":a=NS.Prt.ef(t,s,e,this.Irt);break;case"boolean":a=NS.Ort.ef(t,s,e,this.Irt);break;case"color":a=NS.xrt.ef(t,s,e,this.Irt);break;case"text":a=NS.Lrt.ef(t,s,e,this.Irt)}this.wrt.Drt(t,a,s,e,i,r,n,h)}urt(t,s,e){switch(this.Irt.Yit()){case"numeric":return NS.vrt.ef(t,s,e,this.Irt);case"angle":return NS.Prt.ef(t,s,e,this.Irt);case"boolean":return NS.Ort.ef(t,s,e,this.Irt);case"color":return NS.xrt.ef(t,s,e,this.Irt);case"text":return NS.Lrt.ef(t,s,e,this.Irt)}}Ast(){this.wrt.Nrt()}nit(){this.Rrt().Frt()}_rt(){this.Rrt()._rt()}art(){return this.Rrt().art()}hit(){return this.Rrt().hit()}oit(){return this.Rrt().oit()}Ert(){const t=this.Irt,s=t.Mit(),e=s.let().AP(),i=NS.drt(e,t),r=i.GQ(),n=t.Yit();switch(n){case"numeric":return NS.vrt.ef(e,i,r,t);case"angle":return NS.Prt.ef(e,i,r,t);case"boolean":return NS.Ort.ef(e,i,r,t);case"color":return NS.xrt.ef(e,i,r,t);case"text":return NS.Lrt.ef(e,i,r,t)}}Mrt(){const t=this.Irt,s=t.trt()?t.Yit():"";switch(s){case"combo":case"boolean":case"text":case"string":return new NS.krt.$rt(this);case"numeric":case"number":case"angle":return new("combo"===this.Irt.jit()?NS.krt.$rt:NS.krt.Brt)(this);case"color":case"offsetColor":return new NS.krt.Wrt(this);default:return new NS.krt.Brt(this)}}D8(){return{propertyAdapterJson:this.Rrt().D8()}}N8(t){t&&this.Rrt().N8(t.propertyAdapterJson)}}}{const C33=self.Bs,INDEX=0;class InstanceVariableSourceAdapter extends C33.aet.xit{constructor(t){super(t),this.Hrt=NaN}Tet(){return this.Irt.bit().$it()[INDEX]}Yx(){return this.Hrt||super.Yx()}brt(){return this.Irt.Mit().fH()}wet(t){const s=this.Irt.bit().$it()[INDEX];s!==t&&(this.Hrt=t)}ef(t,s,e,i,r,n,h){this.Rrt().Vrt(s.Wit())&&super.ef(t,s,e,i,r,n,h)}urt(t,s,e){if(this.Rrt().Vrt(s.Wit()))return super.urt(t,s,e)}D8(){return Object.assign(super.D8(),{index:this.Hrt})}N8(t){t&&(super.N8(t),this.Hrt=t.index)}}C33.aet.Pit=InstanceVariableSourceAdapter}{const C33=self.Bs,SID=0,INDEX=1,NAME=2;class BehaviorSourceAdapter extends C33.aet.xit{constructor(t){super(t),this.N6=NaN}Tet(){const t=this.Irt.bit();return t.$it()[INDEX]}brt(){const t=this.Irt.bit(),s=this.Irt.Mit(),e=this.N6||t.$it()[SID],i=s.fH(),r=i.Urt(e),n=i.jrt()[r];return n.N5()}Y5(t){const s=this.Irt.bit(),e=s.$it()[NAME];return t.Xrt(e)}Met(t){const s=this.Irt.bit();s.$it()[SID]!==t&&(this.N6=t)}ef(t,s,e,i,r,n,h){const o=this.Irt.Mit(),a=o.fH();this.Y5(a.qk())&&super.ef(t,s,e,i,r,n,h)}urt(t,s,e){const i=this.Irt.Mit(),r=i.fH();if(this.Y5(r.qk()))return super.urt(t,s,e)}D8(){return Object.assign(super.D8(),{sid:this.N6})}N8(t){t&&(super.N8(t),this.N6=t.sid)}}C33.aet.Git=BehaviorSourceAdapter}{const C33=self.Bs,NAME=0,INDEX=1;class EffectSourceAdapter extends C33.aet.xit{constructor(t){super(t)}Tet(){return this.Irt.bit().$it()[INDEX]}brt(){const t=this.Irt,s=t.Mit(),e=s.UD(),i=e.l4(),r=i.d$(),n=this.bet(r),h=n.Yx();return i.Z5(h)?i.Yrt(h):null}bet(t){const s=this.Irt,e=s.bit().$it()[NAME];return t.qrt(e)}ef(t,s,e,i,r,n,h){this.Krt()&&super.ef(t,s,e,i,r,n,h)}urt(t,s,e){if(this.Krt())return super.urt(t,s,e)}Krt(){const t=this.Irt,s=t.Mit(),e=s.UD(),i=e.l4(),r=i.d$(),n=this.bet(r);if(n){const h=n.Yx();return i.Z5(h)}}}C33.aet.vit=EffectSourceAdapter}{const C33=self.Bs,INDEX=0;class PluginSourceAdapter extends C33.aet.xit{constructor(t){super(t)}Tet(){return this.Irt.bit().$it()[INDEX]}brt(){return this.Irt.Mit().fH().N5()}ef(t,s,e,i,r,n,h){const o=this.Irt.Mit(),a=o.qk().UF(),l=o.fH().qk().UF();a===l&&super.ef(t,s,e,i,r,n,h)}urt(t,s,e){const i=this.Irt.Mit(),r=i.qk().UF(),n=i.fH().qk().UF();if(r===n)return super.urt(t,s,e)}zrt(){const t=this.Irt.Mit(),s=t.qk().UF();if(C33.GJ.Jrt&&s instanceof C33.GJ.Jrt&&("initial-frame"===this.Irt.xst()||"initial-animation"===this.Irt.xst()))switch(this.Irt.FQ()){case"relative":case"absolute":return null}}}C33.aet.Oit=PluginSourceAdapter}{const C33=self.Bs;class ValueSourceAdapter extends C33.aet.xit{constructor(t){super(t),this.Qrt=0,this.Zrt=!1}crt(){return!1}K9(){let t=this.Irt.oet(),s=this.Irt.bit();s=t.qit(s),this.Qrt=s.UQ()}Cst(){}Wit(){return this.Zrt||this.Irt.ef(0),this.Qrt}ef(t,s,e,i,r,n,h){this.Qrt=C33.aet.vrt.ef(t,s,e,this.Irt),this.Zrt=!0}nit(){}_rt(){}art(){return this.Qrt}hit(){return!1}oit(){return!1}D8(){return{value:this.Qrt,init:this.Zrt}}N8(t){t&&(this.Qrt=t.value,this.Zrt=!t.hasOwnProperty("init")||t.init)}}C33.aet.Lit=ValueSourceAdapter}{const C33=self.Bs,PROJECT_FILE=0,PROJECT_FILE_NAME=0,PROJECT_FILE_TYPE=1,START_OFFSET=1,AUDIO_DURATION=2,AUDIO_TAG=3;class AudioSourceAdapter extends C33.aet.xit{constructor(t){super(t),this.tnt=!1,this.snt=null,this.ent=null,this.int=null,this.AQ=this.Irt.let(),this.Cit=this.Irt.Mit(),this.rnt=this.Irt.Fit(),this.nnt=this.rnt[PROJECT_FILE],this.hnt=this.rnt[START_OFFSET],this.rnt[AUDIO_TAG]?this.ont=this.rnt[AUDIO_TAG]:this.ont=Math.random().toString(36).slice(2),this.ant=NaN,this.lnt=NaN,this.cnt=NaN,this.unt=null,this.fnt()}_n(){super._n(),this.snt=null,this.ent=null,this.int=null,this.AQ=null,this.Cit=null,this.rnt=null,this.nnt=null,this.unt=null}fnt(){if(self.Bs.GJ.Audio){const t=this.Irt.cN(),s=t.dnt(self.Bs.GJ.Audio);s&&(this.snt=s.WF().N5()),this.ent=self.Bs.GJ.Audio.pnt,this.int=self.Bs.GJ.Audio.Cnt}}mnt(){if(!this.unt){const t=this.Irt.Mit(),s=t.SH("audioSource");s&&(this.unt=s.Mtt())}}gnt(){const t=this.Irt.Mit(),s=t.SH("volume");return(s?s.Mtt():this).lnt}wst(){super.wst(),this.tnt=!1,this.snt&&(this.int&&(this.ant=this.int.Snt.call(this.snt,this.ont),this.lnt=this.int.ynt.call(this.snt,this.ont)),this.ent)&&this.ent.VW.call(this.snt,this.ont)}_nt(){return this.ont}Tnt(){return this.cnt}Ant(t){this.cnt=t}K9(){super.K9(),this.ant=NaN,this.tnt=!1}Cst(){super.Cst();const t=this.Irt.let(),s=t.AP();switch(this.ant=s-this.hnt,this.Irt.xst()){case"audioSource":break;case"volume":this.lnt=this.Irt.urt(s)}this.tnt=!1}ef(t,s,e,i,r,n,h){if(this.snt)switch(this.Irt.xst()){case"audioSource":{if(!this.AQ.Btt())return;if(i)return void(this.ent&&this.ent.VW.call(this.snt,this.ont));if(t<this.hnt)return void(this.tnt=!1);const o=this.int.Ent.call(this.snt,this.ont),a=this.AQ.tH();if(a!==o&&this.ent.ZW.call(this.snt,this.ont,a),this.tnt)return;if(!this.Irt.let().IsPlaying())return;if(this.tnt=!0,isNaN(this.ant)){const l=self.performance.now(),c=t-this.hnt,u=this.snt.Int();if("suspended"===u)return void(this.tnt=!1);const f=self.performance.now(),d=(f-l)/1e3,p=c+d;if(this.ent){let t=this.Tnt();isNaN(t)?(this.Ant(0),t=0):this.Ant(t),this.ent.wnt.call(this.snt,this.nnt,t,this.ont,p)}}else{const C=this.ant,m=(this.ant=NaN,this.gnt()),g=(this.lnt=NaN,this.snt.Int());if("suspended"===g)return void(this.tnt=!1);this.ent&&(this.Ant(m),this.ent.wnt.call(this.snt,this.nnt,m,this.ont,C))}break}case"volume":this.mnt(),super.ef(t,s,e,i,r,n,h)}}urt(t,s,e){if(this.snt)switch(this.Irt.xst()){case"audioSource":return;case"volume":return this.mnt(),super.urt(t,s,e)}}Rnt(t,s){return this.unt?this.unt.Tnt():0}Mnt(t,s,e,i){this.unt&&this.unt.Ant(this.Rnt()+s),this.ent&&this.unt&&this.ent.Ant.call(this.snt,this.unt._nt(),this.unt.Tnt())}bnt(t,s,e){this.unt&&this.unt.Ant(s),this.ent&&this.unt&&this.ent.Ant.call(this.snt,this.unt._nt(),this.unt.Tnt())}Gnt(){return!0}D8(){return{audioPlaybackStarted:this.tnt,audioTag:this.ont,pauseTime:this.ant,pauseVolume:this.lnt,volume:this.cnt}}N8(t){t&&(this.tnt=t.audioPlaybackStarted,this.ont=t.audioTag,this.ant=t.pauseTime,this.lnt=t.pauseVolume,this.cnt=t.volume,this.fnt())}}C33.aet.Dit=AudioSourceAdapter}{const C33=self.Bs;C33.aet.krt=class{constructor(t){this.Sit=t,this.Irt=t.SH(),this.Xst=this.Irt.Mit().UD(),this.vnt=this.Irt.xst(),this.Pnt=!1,this.Ont=null,this.xnt=null}_n(){this.Sit=null,this.Irt=null,this.Xst=null,this.Ont=null,this.xnt=null}crt(){return!1}wst(){}nQ(){this.Xst=null,this.Ont=null,this.xnt=null}Mtt(){return this.Sit}SH(){return this.Irt}UD(){return this.Xst||(this.Xst=this.Irt.Mit().UD()),this.Xst}Lnt(t){this.Pnt=!!t}Dnt(){return this.Pnt}ast(){}K9(){}Cst(){}Frt(){this.Ont=this.art()}_rt(){this.Ont=null}art(){}hit(){}oit(){}Vrt(t){const s=typeof this.Nnt(),e=typeof t;return s==e}Grt(){}Drt(t,s,e,i,r,n,h,o){}Nrt(){}Fnt(){const t=this.$nt(()=>{const t=this.Irt.bit(),s=this.Irt.oet();return s.qit(t)},()=>{const t=this.Irt.bit(),s=this.Irt.oet();return s.knt(t)});return t.Bnt()}Wnt(){const t=this.Irt.let(),i=t.AP()-this.Irt.Mit().Tst(),s=this.$nt(()=>{const t=this.Irt.bit(),s=this.Irt.oet();return s.ert(i,t)},()=>{const t=this.Irt.bit(),s=this.Irt.oet(),e=s.nrt(i,t);return e||s.knt(t)});return s.Bnt()}$nt(t,s){const e=this.Irt.let();return(e.Btt()?t:s)()}Hnt(t,s){const e=this.Irt.FQ();return("relative"===e?t:s)()}Vnt(t,s){return(this.Dnt()?(this.Lnt(!1),t):s)()}Unt(t){}jnt(){return this.Sit.Yx()}Xnt(){return this.xnt||(this.xnt=this.Sit.brt()),this.xnt}Ynt(t,s,e,i,r,n){const h=this.Irt._et();switch(h){case"behavior":return t();case"effect":return s();case"instance-variable":return e();case"plugin":return i();case"world-instance":return r();case"audio":return n()}}D8(){return{firstAbsoluteUpdate:this.Pnt,saveState:this.Ont}}N8(t){t&&(this.Pnt=t.firstAbsoluteUpdate,this.Ont=t.saveState)}qnt(t,s=!1){const e=[];for(const i of t){const r=i.Mit().Tst();for(const n of i.Zit())(s&&0===n.AP()||!s)&&e.push({time:r+n.AP(),value:n.Bnt()})}return e.sort((t,s)=>t.time-s.time)}Knt(t,s,e){return this.znt(s,e)}znt(s,e){for(let t=e.length-1;0<=t;t--){const i=e[t].time;if(i<=s)return e[t]}return null}}}{const C33=self.Bs,TMP_COLORS_MAP=new Map,TMP_COLOR=[0,0,0];class ColorInterpolationAdapter extends C33.aet.krt{constructor(t){super(t)}ast(){}K9(){}Cst(){}art(){const t=this.Irt._et(),s=this.Xnt(),e=this.jnt();switch(t){case"behavior":return this.Jnt(s.Qnt(e));case"effect":return this.Jnt(s[e]);case"plugin":return this.Jnt(s.Qnt(e));case"world-instance":return this.Jnt(this.Nnt())}}hit(){const t=this.Fnt();return!this.Znt(t,this.Nnt())}oit(){return!C33._i(this.Ont)&&!this.Znt(this.Ont,this.Nnt())}Znt(t,s){return t=this.tht(t),s=this.tht(s),t.wa(s)}Fnt(){const t=super.Fnt();return this.tht(t)}Wnt(){const t=super.Wnt();return this.tht(t)}Unt(t){}Jnt(t){return(C33.rr(t,C33.Zo)?t.toArray():t).slice(0,3)}tht(t){return C33.rr(t,C33.Zo)?t:new C33.Zo(t[0],t[1],t[2],1)}Vrt(t){return!0}crt(){return!0}Grt(){const t=this.Irt.let(),s=this.Irt.fH(),e=this.Irt.Mtt(),i=t.Rtt(s,e,this.vnt,this.Irt);if(i&&1<i.length){TMP_COLORS_MAP.has(s)||TMP_COLORS_MAP.set(s,new Map);const r=TMP_COLORS_MAP.get(s),n=this.Irt._et(),h=(r.has(n)||r.set(n,new Map),r.get(n));h.has(this.vnt)||h.set(this.vnt,{sht:!1,color:new C33.Zo(0,0,0,1)})}}eht(t,s,e){const i=TMP_COLORS_MAP.get(t).get(s).get(e);return i.sht=!0,i.color}Drt(t,s,e,i,r,n,h,o){const a=this.Irt.let(),l=this.Irt.Mit(),c=this.Irt.fH(),u=this.Irt.Mtt(),f=this.Irt._et(),d=this.vnt,p=a.Rtt(c,u,d,this.Irt);if(p&&1<p.length){const C=this.qnt(p,!0),m=this.Knt(a,a.AP(),C);if(m){const g=l.Tst(),S=m.time-g;if(0==S)this.eht(c,f,this.vnt).la(s[0],s[1],s[2]);else if(!(S<0)){const y=s[0],_=s[1],T=s[2],A=this.Irt.ef(S,!1,!0),E=C33.Zo.rl(y,A[0]),I=C33.Zo.rl(_,A[1]),w=C33.Zo.rl(T,A[2]);this.eht(c,f,this.vnt).la(E,I,w)}}}else this.iht(s[0],s[1],s[2])}Nrt(){const t=this.Irt.fH();if(TMP_COLORS_MAP.has(t)){const s=TMP_COLORS_MAP.get(t),e=this.Irt._et();if(s.has(e)){const i=s.get(e);if(i.has(this.vnt)){const r=i.get(this.vnt),n=r.sht,h=r.color;n&&this.iht(h.Sa(),h.ya(),h._a()),0===i.size&&s.delete(e),0===s.size&&TMP_COLORS_MAP.delete(t)}}}}Nnt(){const t=this.Irt._et(),s=this.Xnt(),e=this.jnt();switch(t){case"behavior":return this.tht(s.Qnt(e));case"effect":return s[e].clone();case"plugin":return this.tht(s.Qnt(e));case"world-instance":return this.UD().R4().clone()}}iht(t,s,e){const i=this.Irt._et(),r=this.Xnt(),n=this.jnt();switch(i){case"behavior":TMP_COLOR[0]=t,TMP_COLOR[1]=s,TMP_COLOR[2]=e,r.rht(n,TMP_COLOR);break;case"effect":r[n].aa(t,s,e);break;case"plugin":TMP_COLOR[0]=t,TMP_COLOR[1]=s,TMP_COLOR[2]=e,r.rht(n,TMP_COLOR);break;case"world-instance":this.UD().nht(t,s,e)}}D8(){}N8(t){}}C33.aet.krt.Wrt=ColorInterpolationAdapter}{const C33=self.Bs,NS=C33.aet;class NoInterpolationAdapter extends C33.aet.krt{constructor(t){super(t)}ast(){}K9(){}Cst(){}art(){return this.Nnt()}hit(){const t=this.Fnt();return t!==this.art()}oit(){return!C33._i(this.Ont)&&this.Ont!==this.art()}crt(){return!1}Drt(t,s,e,i,r,n,h,o){const a=this.Irt,l=a.Mit(),c=a._et(),u=a.let(),f=l.fH(),d=a.Mtt(),p=this.vnt,C=u.Rtt(f,d,p,a);if(C&&1<C.length){const g=this.qnt(C),S=t+l.Tst(),y=this.Knt(u,S,g);y&&(s=y.value)}const m=a.Yit();switch(m){case"numeric":if(NS.vrt.hht(this.jnt(),this.Xnt(),s,c))break;return;case"angle":if(NS.Prt.hht(this.jnt(),this.Xnt(),s,c))break;return;case"boolean":if(NS.Ort.hht(this.jnt(),this.Xnt(),s,c))break;return;case"color":if(NS.xrt.hht(this.jnt(),this.Xnt(),s,c))break;return;case"text":if(!NS.Lrt.hht(this.jnt(),this.Xnt(),s,c))return}this.iht(s)}Nnt(){const t=this.Irt._et(),s=this.Xnt(),e=this.jnt();switch(t){case"behavior":return s.Qnt(e);case"effect":return s[e];case"instance-variable":return s.oht(e);case"plugin":return s.Qnt(e)}}iht(t){const s=this.Irt._et(),e=this.Xnt(),i=this.jnt();switch(s){case"behavior":e.rht(i,t);break;case"effect":e[i]=t;break;case"instance-variable":e.aht(i,t);break;case"plugin":e.rht(i,t)}}}C33.aet.krt.$rt=NoInterpolationAdapter}{const C33=self.Bs,NS=C33.aet.krt,INSTANCE_FUNC_MAP=new Map,add2=(t,s,e,i,r,n=!1,h=null,o=null)=>{INSTANCE_FUNC_MAP.set(t,{lht:s,cht:e,uht:i,round:r,fht:n,init:h,reset:o})};add2("offsetX",(t,s,e,i)=>{"relative"===i.Irt.FQ()?t.dht(s,e.let().Ftt()):t.dht(s)},(t,s)=>t.Fy(s),t=>t.Ny(),!0),add2("offsetY",(t,s,e,i)=>{"relative"===i.Irt.FQ()?t.pht(s,e.let().Ftt()):t.pht(s)},(t,s)=>t.By(s),t=>t.ky(),!0),add2("offsetWidth",(s,t,o,e,i)=>{if(0!==t){const r="relative"===e.Irt.FQ(),l=1===e.Cht.gE();if((r||l)&&s.s5()&&s.a5()){if(isNaN(e.mht)){let i=[],t=s.H4();for(;t;)i.push(t),t=t.H4();i.reverse();let a=(t,s)=>s.let().Lst(t.fH()),r=(t,s)=>{const e=a(t,s);if(e)return e.$et();const i=t.fH().N5();return i.ket()?i.$et():t.Sht().ght()},n=(t,s,e,i=0)=>{const r=a(t,s);if(!r)return i;const n=r.SH(e);if(!n)return i;const h=n.bit().Tit();if(!h)return i;const o=h.knt();return o?o.Wit():i},h;if(l){let t=i[i.length-1];h=t.AC()}else{let s=i[0],t=s.Sht().ght(),e=s.Sht().yht();h=t*e,h=(h+=n(s,o,"offsetWidth"))+r(s,o)*n(s,o,"offsetScaleX");for(let t=1;t<i.length;t++){const c=(s=i[t]).Sht().yht();h=(h=(h*=c)+n(s,o,"offsetWidth"))+r(s,o)*n(s,o,"offsetScaleX")}}e.mht=0===h?Number.EPSILON:h}i||s.tm(t/e.mht,!0)}else s.tm(t)}},(t,s)=>t.GC(s),t=>t.AC(),!0),add2("offsetHeight",(s,t,o,e,i)=>{if(0!==t){const r="relative"===e.Irt.FQ(),a=1===e.Cht.gE();if((r||a)&&s.s5()&&s.c5()){if(isNaN(e.mht)){let i=[],t=s.H4();for(;t;)i.push(t),t=t.H4();i.reverse();let r=(t,s)=>{i=t;const e=s.let().Lst(i.fH());var i;if(e)return e.Wet();const r=t.fH().N5();return r.ket()?r.Wet():t.Sht()._ht()},n=(t,s,e,i=0)=>{const r=s.let().Lst(t.fH());if(!r)return i;const n=r.SH(e);if(!n)return i;const h=n.bit().Tit();if(!h)return i;const o=h.knt();return o?o.Wit():i},h;if(a){let t=i[i.length-1];h=t.OC()}else{let s=i[0],t=s.Sht()._ht(),e=s.Sht().Tht();h=t*e,h=(h+=n(s,o,"offsetHeight"))+r(s,o)*n(s,o,"offsetScaleY");for(let t=1;t<i.length;t++){const l=(s=i[t]).Sht().Tht();h=(h=(h*=l)+n(s,o))+r(s,o)*n(s,o,"offsetScaleY")}}e.mht=0===h?Number.EPSILON:h}i||s.Aht(t/e.mht,!0)}else s.Aht(t)}},(t,s)=>t.EC(s),t=>t.OC(),!0),add2("offsetAngle",(t,s,e,i,r)=>{t.Eht(s)},(t,s)=>t.y$(s),t=>t.GetAngle(),!1,!0),add2("offsetOpacity",(t,s,e,i,r)=>{const n=i.Iht||1,h=(s/=n,t.VG()),o=h+s;if(0===i.wht)1<o?i.wht+=o-1:o<0&&(i.wht+=o),t.Rht(s);else{const a=t.VG()+s;0<s&&0<i.wht?1<a&&(i.wht+=a-1):0<s&&i.wht<0?(i.wht+=s,0<i.wht&&(t.Rht(i.wht),i.wht=0)):s<0&&0<i.wht?(i.wht+=s,i.wht<0&&(t.Rht(i.wht),i.wht=0)):s<0&&i.wht<0&&a<0&&(i.wht+=a)}},(t,s)=>{t.jG(s)},t=>t.VG(),!1,!0,(n,r,h)=>{switch(n.wht=0,n.Irt.FQ()){case"relative":{n.Irt.oet();let t=n.Irt.bit(),s=t.Tit(),e=s._it(),i=n.UD().VG(),r=i;for(const o of e){const a=o.AP(),l=n.Irt.urt(a);r=i+l,r=C33.wn(r,0,1)}n.Mht=i-r,n.Mht=Math.round(100*(n.Mht+Number.EPSILON))/100,r=i;for(let t=e.length-1;0<=t;t--){const c=e[t].AP(),u=n.Irt.urt(c);r-=u,r=C33.wn(r,0,1)}n.bht=r,n.bht=Math.round(100*(n.bht+Number.EPSILON))/100;break}}const t="relative"===n.Irt.FQ(),s=1===n.Cht.gE();if((t||s)&&r.s5()&&r.m5()){let s=[],t=r.H4();for(;t;)s.push(t),t=t.H4();s.reverse();let e=(t,s,e)=>{const i=s.let().Lst(t.fH());if(!i)return 0;const r=i.SH(e);if(!r)return 0;const n=r.bit().Tit();if(!n)return 0;const h=n.knt();return h?h.Wit():0},i=s[0].Sht().Ght();i+=e(s[0],h,"offsetOpacity");for(let t=1;t<s.length;t++)i+=e(s[t],h,"offsetOpacity");n.Iht=0===i?1:i}},e=>{switch(e.Irt.FQ()){case"relative":{e.wht=0;let t=e.UD(),s=t.VG();s=Math.round(100*(s+Number.EPSILON))/100,e.Irt.let().Btt()?(t.jG(s+e.Mht),e.nI=0):(t.jG(s-e.bht),e.nI=e.Mtt().Ert());break}}}),add2("offsetOriginX",(t,s)=>t.vht(s),(t,s)=>t.Pht(s),t=>t.IW(),!1),add2("offsetOriginY",(t,s)=>t.Oht(s),(t,s)=>t.xht(s),t=>t.RW(),!1),add2("offsetZElevation",(t,s)=>t.Lht(s),(t,s)=>t.Hy(s),t=>t.Wy(),!0),add2("offsetScaleX",(t,s,e,i)=>{if(0!==s){const r=t.AC()<0?-1:1;if("relative"===i.Irt.FQ()&&t.s5()&&t.a5()){const n=e.$et()*r*s;isNaN(i.mht)&&INSTANCE_FUNC_MAP.get("offsetWidth").lht(t,1,e,i,!0),t.tm(n/i.mht,!0)}else t.tm(e.$et()*r*s)}},(t,s,e)=>{t.GC(e.$et()*s)},(i,r)=>{const n=i.AC()<0?-1:1;if(i.a5()){let t=i.H4(),s=r.let().Lst(t.fH()),e=NaN;if(s)e=t.AC()/s.$et();else{const h=t.fH().N5();e=h.ket()?t.AC()/h.$et():1}return i.AC()*n/(r.$et()*e)}return i.AC()*n/r.$et()},!1),add2("offsetScaleY",(t,s,e,i)=>{if(0!==s){const r=t.OC()<0?-1:1;if("relative"===i.Irt.FQ()&&t.s5()&&t.c5()){const n=e.Wet()*r*s;isNaN(i.mht)&&INSTANCE_FUNC_MAP.get("offsetHeight").lht(t,1,e,i,!0),t.Aht(n/i.mht,!0)}else t.Aht(e.Wet()*r*s)}},(t,s,e)=>{t.EC(e.Wet()*s)},(i,r)=>{const n=i.OC()<0?-1:1;if(i.c5()){let t=i.H4(),s=r.let().Lst(t.fH()),e=NaN;if(s)e=t.OC()/s.Wet();else{const h=t.fH().N5();e=h.ket()?t.OC()/h.Wet():1}return i.OC()*n/(r.Wet()*e)}return i.OC()*n/r.Wet()},!1);class NumericInterpolationAdapter extends C33.aet.krt{constructor(t){super(t),this.nI=0,this.wht=0,this.Mht=0,this.bht=0,this.Iht=NaN,this.mht=NaN,this.Dht=void 0,this.Nht=void 0,this.Fht=null,this.$ht=null,this.kht=null,this.Bht=null,this.Wht=null,this.Hht=null,this.Vht=null,this.Uht=null,this.jht=!1,this.Xht=!1,C33.rr(this.Irt.let(),C33.Yht)?this.Cht=new C33.aet.krt.qht(this):this.Cht=new C33.aet.krt.Kht(this);const s=this.Irt.xst();switch(this.Irt._et()){case"world-instance":{const e=INSTANCE_FUNC_MAP.get(s);this.Fht=e.uht,this.$ht=e.lht,this.kht=e.cht,this.jht=e.round,this.Xht=e.fht,this.Wht=e.init,this.Bht=e.reset;break}case"audio":this.Hht=t.Rnt,this.Vht=t.Mnt,this.Uht=t.bnt,this.jht=!!t.Gnt(),this.Xht=!1}}_n(){this.Cht=null,this.Fht=null,this.$ht=null,this.kht=null,this.Bht=null,this.Wht=null,this.Hht=null,this.Vht=null,this.Uht=null,super._n()}crt(){return this.Cht.crt()}zht(){return this.nI}Jht(t){this.nI=t}ast(){this.Bht&&this.Bht(this)}K9(){const t=this.Cht.K9();if("number"==typeof t&&(this.nI=t),this.Wht){const s=this.UD(),e=this.Irt.Mit();this.Wht(this,s,e)}}Cst(){const t=this.Cht.Cst();"number"==typeof t&&(this.nI=t)}art(){return this.Nnt()}hit(){const t=this.Fnt();return t!==this.art()}oit(){return!C33._i(this.Ont)&&this.Ont!==this.art()}Grt(){this.Cht.Grt()}Drt(t,s,e,i,r,n,h,o){return this.Cht.Drt(t,s,e,i,r,n,h,o)}Nrt(){this.Cht.Nrt()}Nnt(){const t=this.Xnt(),s=this.jnt(),e=this.UD(),i=this.Irt.Mit(),r=this.Irt._et();switch(r){case"behavior":return t.Qnt(s);case"effect":return t[s];case"instance-variable":return t.oht(s);case"plugin":return t.Qnt(s);case"world-instance":return this.Fht(e,i);case"audio":return this.Hht.call(this.Mtt(),e,i)}}iht(t,s,e){const i=this.Xnt(),r=this.jnt(),n=this.UD(),h=this.Irt.Mit(),o=this.Irt._et();switch(o){case"behavior":i.Qht(r,t);break;case"effect":i[r]+=t;break;case"instance-variable":i.Zht(r,t);break;case"plugin":i.Qht(r,t,this.Mtt().zrt());break;case"world-instance":this.$ht(n,t,h,this);break;case"audio":this.Vht.call(this.Mtt(),n,t,h,this)}}tot(t,s,e){let i=this.Irt.xtt();if("discrete"!==(i="default"===i?"continuous":i)||s){if("discrete"===i&&e){const l=this.Irt.let(),c=l.AP(),u=this.Irt.srt(c);if(!u)return}const r=this.Xnt(),n=this.jnt(),h=this.UD(),o=this.Irt.Mit(),a=this.Irt._et();switch(a){case"behavior":r.rht(n,t);break;case"effect":r[n]=t;break;case"instance-variable":r.aht(n,t);break;case"plugin":r.rht(n,t,this.Mtt().zrt());break;case"world-instance":this.kht(h,t,o);break;case"audio":this.Uht.call(this.Mtt(),h,t,o)}}}sot(t,s,e,i,r,n,h,o){this.Cht.sot(t,s,e,i,r,n,h,o)}eot(t,s,e,i,r){let n=(t="angle"===this.Irt.jit()?C33.bn(t):t).toString(),h=n.split(".")[1]||"",o=h.length,a=this.Nnt(),l;switch(l=0===o?this.jht?Math.round(a):this.Xht?"angle"===this.Irt.jit()?C33.Mn(Math.round(C33.bn(a))):Number(C33.toFixed(a,2)):a:this.jht?Number(C33.toFixed(a,o)):(this.Xht,a),this.iht(l-a,s,e),this.Irt.xst()){case"offsetWidth":case"offsetScaleX":{const c=this.UD(),u=c.AC(),f=Number(C33.toFixed(u,2));c.tm(f-u);break}case"offsetHeight":case"offsetScaleY":{const d=this.UD(),p=d.OC(),C=Number(C33.toFixed(p,2));d.Aht(C-p);break}}}D8(){return Object.assign(super.D8(),{v:this.nI,a:this.wht,fod:this.Mht,bod:this.bht,of:this.Iht,sf:this.mht,armorf:this.Dht,armandf:this.Nht})}N8(t){t&&(super.N8(t),this.nI=t.v,this.wht=t.a,this.Mht=C33.gi(t.fod)?t.fod:0,this.bht=C33.gi(t.bod)?t.bod:0,this.Iht=C33.gi(t.of)?t.of:NaN,this.mht=C33.gi(t.sf)?t.sf:NaN,this.Dht=C33.gi(t.armorf)?t.armorf:void 0,this.Nht=C33.gi(t.armandf)?t.armandf:void 0)}}C33.aet.krt.Brt=NumericInterpolationAdapter}{const C33=self.Bs;class AbsoluteValueObject{constructor(t){this.iot=!1,this.Qrt=0,this.rot=!1,this.not=!1,this.eet=t;for(let t=0,s=this.eet.length;t<s;t++)this.eet[t].wit(this)}Ost(){return this.eet}hot(){this.iot=!0}oot(){return this.iot}Art(t){this.Qrt=t}Wit(){return this.Qrt}aot(t){this.rot=t}lot(){return this.rot}yst(t){this.not=t}cot(){return this.not}vd(){this.iot=!1,this.Qrt=0,this.rot=!1,this.not=!1}}class NumericInterpolationAdapterForTimeline{constructor(t){this.uot=t}_n(){this.uot=null}gE(){return 0}K9(){const t=this.uot;return this.uot.SH(),t.Hnt(()=>t.$nt(()=>0,()=>t.Mtt().Ert()),()=>{})}Cst(){}crt(){this.uot;const t=this.uot.SH();switch(t.FQ()){case"relative":return!1;case"absolute":return!0}}Grt(){this.uot;const t=this.uot.SH(),s=t.xst();switch(t.FQ()){case"relative":break;case"absolute":if(t.Iit()){const e=t.Rit();e.vd()}else{const i=t.let(),r=t.fH(),n=t.Mtt(),h=i.Rtt(r,n,s,t);h&&1<h.length&&new AbsoluteValueObject(h)}}}Drt(t,s,e,i,r,n,h,o){const a=this.uot,l=this.uot.SH();switch(l.FQ()){case"relative":{const c=a.zht();a.iht(s-c,e,i),n&&this.sot(t,e,i,r,c,s),a.Jht(s);break}case"absolute":{const u=l.let(),f=l.Mit();if(l.fH(),l.Mtt(),l.Iit()){const d=l.Rit(),p=d.Ost(),C=a.qnt(p,!0),m=a.Knt(u,u.AP(),C);if(m){const g=f.Tst(),S=m.time-g;if(0==S)d.yst(h),d.aot(o),d.hot(),d.Art(d.Wit()+s);else{if(S<0)return;const y=l.urt(S);d.yst(h),d.aot(o),d.hot(),d.Art(d.Wit()+(s-y))}}}else a.tot(s,o,h);break}}}Nrt(){const t=this.uot,s=this.uot.SH();switch(s.FQ()){case"relative":break;case"absolute":if(s.Iit()){const e=s.Rit();e.oot()&&t.tot(e.Wit(),e.lot(),e.cot())}}}sot(t,s,e,i,r,n){const h=this.uot;i||(s&&t===s.AP()?h.eot(s.UQ(),s,e):e&&t===e.AP()?h.eot(e.UQ(),s,e):n-r==0&&h.eot(s.UQ(),s,e))}}C33.aet.krt.Kht=NumericInterpolationAdapterForTimeline}{const C33=self.Bs;class NumericInterpolationAdapterForTween{constructor(t){this.uot=t}_n(){this.uot=null}gE(){return 1}K9(){const t=this.uot;return t.Lnt(!0),this.Unt(t.Fnt())}Cst(){const t=this.uot;if(t.Fnt()!==t.Wnt())return t.Lnt(!0),this.Unt(t.Wnt())}crt(){return!1}Grt(){}Drt(t,s,e,i,r,n,h,o){const a=this.uot,l=a.zht();switch(a.SH().FQ()){case"relative":a.iht(s-l,e,i),n&&this.sot(t,e,i,r,l,s,!1,h);break;case"absolute":a.Dnt()?(a.Lnt(!1),a.iht(l,e,i)):0===t&&0===a.SH().let().qW()?a.tot(s,!0,!1):(a.iht(s-l,e,i),n&&this.sot(t,e,i,r,l,s,this.fot(),h))}a.Jht(s)}Nrt(){}Unt(t){const s=this.uot;return t-s.art()}fot(){let t=this.uot,s=t.UD().fH(),e=t.SH().cN(),i=e.wtt(),r=0;for(const n of i.E9())0===n.gE()?n.b9(s)&&r++:1===n.gE()&&n.fH()===s&&r++;return r<=1}sot(t,s,e,i,r,n,h,o){const a=this.uot;i?s&&t===s.AP()?a.eot(s.UQ(),s,e,h,o):e&&t===e.AP()?a.eot(e.UQ(),s,e,h,o):e||a.eot(s.UQ(),s,e,h,o):s&&t===s.AP()?a.eot(s.UQ(),s,e,h,o):e&&t===e.AP()?a.eot(e.UQ(),s,e,h,o):n-r==0&&a.eot(s.UQ(),s,e,h,o)}}C33.aet.krt.qht=NumericInterpolationAdapterForTween}{const C33=self.Bs,Ease=self.vu;C33.aet.vrt=class{constructor(){}static hht(t,s,e,i){let r;switch(i){case"behavior":r=s.Qnt(t);break;case"effect":r=s[t];break;case"instance-variable":r=s.oht(t);break;case"plugin":r=s.Qnt(t)}return r!==e}static ef(n,h,o,a){if(!o){let t=a.bit(),s=a.oet();return(t=s.knt(t)).UQ()}let l=a.xtt();if("default"===l&&(l="continuous"),"discrete"===(l="combo"===a.jit()?"discrete":l))return h.UQ();if("continuous"===l||"step"===l){const c=a.let().Ptt();if("step"===l&&0!==c){const m=1/c;n=Math.floor(n*m)/m}const u=h.UQ(),f=o.UQ(),d=h.HQ("cubic-bezier"),p=o.HQ("cubic-bezier"),C=d&&d.dot()&&p&&p.pot();if(!C&&u===f)return u;let t=h.AP(),s=o.AP(),e=("step"===l&&0!==c&&(n=C33.wn(n,t,s)),C33.normalize(n,t,s)),i=h.Trt(),r;if(C){const g=s-t;r=Ease.ju(i)(g*e,0,1,g),r=Ease.ju("cubicbezier")(r,u,u+d.YQ(),f+p.zQ(),f)}else r=Ease.ju(i)((s-t)*e,u,f-u,s-t);return"integer"===a.jit()?Math.floor(r):r}}}}{const C33=self.Bs;C33.aet.Prt=class{constructor(){}static hht(t,s,e,i){let r;switch(i){case"behavior":r=s.Qnt(t);break;case"effect":r=s[t];break;case"instance-variable":r=s.oht(t);break;case"plugin":r=s.Qnt(t)}return r!==e}static ef(t,s,e,i){if(!e){let t=i.bit(),s=i.oet();return(t=s.knt(t)).UQ()}let r=i.xtt();if("default"===r&&(r="continuous"),"discrete"===(r="combo"===i.jit()?"discrete":r))return s.UQ();if("continuous"===r||"step"===r){const n=i.let().Ptt();if("step"===r&&0!==n){const u=1/n;t=Math.floor(t*u)/u}const h=s.AP(),o=e.AP(),a=s.UQ(),l=e.UQ(),c=("step"===r&&0!==n&&(t=C33.wn(t,h,o)),s.HQ("angle"));if(!c){if(a===l)return a;const f=C33.normalize(t,h,o),d=self.vu.ju(s.Trt());return C33.Fn(a,l,d(f,0,1,1))}{const p=c.Cot();if(a===l&&0===p)return a;const C=C33.normalize(t,h,o),m=self.vu.ju(s.Trt()),g=m(C,0,1,1);switch(c.mot()){case"closest":return C33.Fn(a,l,g,p);case"clockwise":return C33.$n(a,l,g,p);case"anti-clockwise":return C33.kn(a,l,g,p)}}}}}}{const C33=self.Bs;C33.aet.Ort=class{constructor(){}static hht(t,s,e,i){let r;switch(i){case"behavior":r=s.Qnt(t);break;case"effect":r=s[t];break;case"instance-variable":r=s.oht(t);break;case"plugin":r=s.Qnt(t)}return!!r!=!!e}static ef(t,s,e,i){if(e)return s.UQ()?1:0;{let t=i.bit(),s=i.oet();return(t=s.knt(t)).UQ()?1:0}}}}{const C33=self.Bs,TEMP_COLOR_ARRAY=[0,0,0],TEMP_COLOR_ARRAY_2=[0,0,0],TEMP_COLOR_ARRAY_3=[0,0,0];C33.aet.xrt=class{constructor(){}static hht(t,s,e,i){let r;switch(i){case"behavior":r=s.Qnt(t);break;case"effect":r=s[t];break;case"instance-variable":r=s.oht(t);break;case"plugin":r=s.Qnt(t)}return Array.isArray(e)?(TEMP_COLOR_ARRAY[0]=e[0],TEMP_COLOR_ARRAY[1]=e[1],TEMP_COLOR_ARRAY[2]=e[2]):(TEMP_COLOR_ARRAY_3.Wa(e),TEMP_COLOR_ARRAY[0]=Math.floor(255*TEMP_COLOR_ARRAY_3.Sa()),TEMP_COLOR_ARRAY[1]=Math.floor(255*TEMP_COLOR_ARRAY_3.ya()),TEMP_COLOR_ARRAY[2]=Math.floor(255*TEMP_COLOR_ARRAY_3._a())),Array.isArray(r)?(TEMP_COLOR_ARRAY_2[0]=r[0],TEMP_COLOR_ARRAY_2[1]=r[1],TEMP_COLOR_ARRAY_2[2]=r[2]):(TEMP_COLOR_ARRAY_3.Wa(r),TEMP_COLOR_ARRAY_2[0]=Math.floor(255*TEMP_COLOR_ARRAY_3.Sa()),TEMP_COLOR_ARRAY_2[1]=Math.floor(255*TEMP_COLOR_ARRAY_3.ya()),TEMP_COLOR_ARRAY_2[2]=Math.floor(255*TEMP_COLOR_ARRAY_3._a())),TEMP_COLOR_ARRAY[0]!==TEMP_COLOR_ARRAY_2[0]||TEMP_COLOR_ARRAY[1]!==TEMP_COLOR_ARRAY_2[1]||TEMP_COLOR_ARRAY[2]!==TEMP_COLOR_ARRAY_2[2]}static ef(t,s,e,i){if(!e){let t=i.bit(),s=i.oet(),e=(t=s.knt(t)).UQ();return TEMP_COLOR_ARRAY[0]=e[0],TEMP_COLOR_ARRAY[1]=e[1],TEMP_COLOR_ARRAY[2]=e[2],TEMP_COLOR_ARRAY}let r=i.xtt();if("discrete"===(r="default"===r?"continuous":r)){const n=s.UQ();return TEMP_COLOR_ARRAY[0]=n[0],TEMP_COLOR_ARRAY[1]=n[1],TEMP_COLOR_ARRAY[2]=n[2],TEMP_COLOR_ARRAY}if("continuous"===r||"step"===r){const h=i.let().Ptt();if("step"===r&&0!==h){const A=1/h;t=Math.floor(t*A)/A}const o=s.AP(),a=e.AP(),l=s.UQ(),c=e.UQ(),u=("step"===r&&0!==h&&(t=C33.wn(t,o,a)),C33.normalize(t,o,a)),f=s.Trt(),d=l[0],p=l[1],C=l[2],m=c[0],g=c[1],S=c[2],y=self.vu.ju(f),_=a-o,T=_*u;return TEMP_COLOR_ARRAY[0]=d===m?d:y(T,d,m-d,_),TEMP_COLOR_ARRAY[1]=p===g?p:y(T,p,g-p,_),TEMP_COLOR_ARRAY[2]=C===S?C:y(T,C,S-C,_),TEMP_COLOR_ARRAY}}}}{const C33=self.Bs;C33.aet.Lrt=class{constructor(){}static hht(t,s,e,i){let r;switch(i){case"behavior":r=s.Qnt(t);break;case"effect":r=s[t];break;case"instance-variable":r=s.oht(t);break;case"plugin":r=s.Qnt(t)}return r!==e}static ef(t,s,e,i){if(e)return s.UQ();{let t=i.bit(),s=i.oet();return(t=s.knt(t)).UQ()}}}}{const C33=self.Bs;C33.v7=class{constructor(){this.got=new Map}_n(){for(const t of this.got.values())t._n();this.got.clear(),this.got=null}Mu(t){const s=new C33.Sot(t),e=s.pf();this.got.set(e,s)}oe(t){return this.got.get(t)}Stt(){return 0}static yot(t,s,e,i){if(s)for(const r of s)C33.v7._ot("create",r,t,e,i)}static Tot(t,s,e,i){if(s)for(const r of s)C33.v7._ot("create-including-disabled",r,t,e,i)}static Aot(e,t,s,i){e.length?t.forEach((t,s)=>{e[s].N8(t)}):t.forEach(t=>{C33.v7._ot("load",t,e,s,i)})}static _ot(t,s,e,i,r){let n;if("function"==typeof i)switch(t){case"load":n=new i(null,r);break;case"create":case"create-including-disabled":n=new i(s,r)}else if("object"==typeof i){const h=i.prop,o=s[h],a=i.map.get(o);switch(t){case"load":n=new a(null,r);break;case"create":case"create-including-disabled":n=new a(s,r)}}switch(t){case"load":n.N8(s),e.push(n);break;case"create":if("function"==typeof n.Let&&!n.Let())return n._n();e.push(n);break;case"create-including-disabled":e.push(n)}}}}{const C33=self.Bs,NAME=0,TOTAL_TIME=1,STEP=2,INTERPOLATION_MODE=3,RESULT_MODE=4,TRACKS=5,LOOP=6,PING_PONG=7,REPEAT_COUNT=8,START_ON_LAYOUT=9,TRANSFORM_WITH_SCENE_GRAPH=10,USE_SYSTEM_TIMESCALE=11;C33.Sot=class{constructor(t){this.En="",this.Sst=NaN,this.Eot=0,this.Iot="default",this.wot="default",this.Rot=!1,this.Mot=!1,this.bot=1,this.Hst=null,this.Got="",this.vot=!1,this.Pot=!0,t&&(this.En=t[NAME],this.Sst=t[TOTAL_TIME],this.Eot=t[STEP],this.Iot=t[INTERPOLATION_MODE],this.wot=t[RESULT_MODE],this.Rot=!!t[LOOP],this.Mot=!!t[PING_PONG],this.bot=t[REPEAT_COUNT],this.Got=t[START_ON_LAYOUT],this.vot=!!t[TRANSFORM_WITH_SCENE_GRAPH],this.Pot=!!t[USE_SYSTEM_TIMESCALE],this.Hst=new C33.Oot(t[TRACKS],this))}_n(){this.Hst._n(),this.Hst=null}Ett(){return this.Hst||(this.Hst=new C33.Oot(null,this)),this.Hst}pf(){return this.En}oU(t){this.En=t}qW(){return this.Sst}YW(t){this.Sst=t}Ptt(){return this.Eot}Ott(t){this.Eot=t}xtt(){return this.Iot}Ltt(t){this.Iot=t}FQ(){return this.wot}Dtt(t){this.wot=t}zW(){return this.Rot}KW(t){this.Rot=t}QW(){return this.Mot}JW(t){this.Mot=t}oW(){return this.bot}Ntt(t){this.bot=t}hQ(){return this.Got}Ftt(){return this.vot}$tt(){return this.Pot}D8(){return{trackDataJson:this.Hst.D8(),name:this.En,totalTime:this.Sst,step:this.Eot,interpolationMode:this.Iot,resultMode:this.wot,loop:this.Rot,pingPong:this.Mot,repeatCount:this.bot,startOnLayout:this.Got,transformWithSceneGraph:!!this.vot,useSystemTimescale:this.Pot}}N8(t){t&&(this.Ett().N8(t.trackDataJson),this.En=t.name,this.Sst=t.totalTime,this.Eot=t.step,this.Iot=t.interpolationMode,this.wot=t.resultMode,this.Rot=t.loop,this.Mot=t.pingPong,this.bot=t.repeatCount,this.Got=t.startOnLayout,this.vot=!!t.transformWithSceneGraph,this.Pot=!!t.useSystemTimescale)}}}{const C33=self.Bs,WI_DATA=0,OC_INDEX=1,WI_UID=2,INTERPOLATION_MODE=1,RESULT_MODE=2,ENABLED=3,KEYFRAMES=4,PROPERTY_TRACKS=5,ID=6,NESTED_DATA=7,START_OFFSET=0,LOCAL_TOTAL_TIME=1,WI_ADDITIONAL_DATA=8,ORIGINAL_WIDTH=0,ORIGINAL_HEIGHT=1,TRACK_TYPE=9,TRACK_NAME=10;class TrackDataItem{constructor(t,s){this.Hst=s,this.xot=null,this.Lot=null,this.Vst=NaN,this.Ust=NaN,this.Iot="default",this.wot="default",this.tu=!1,this.Dot=null,this.git=null,this.If="",this.Not=null,this.Fot=0,this.$ot=this.Hst.vtt().qW(),this.vf=0,this.En="",t&&(t[WI_DATA]&&(this.xot=t[WI_DATA],this.Vst=t[WI_DATA][WI_UID],this.Ust=t[WI_DATA][OC_INDEX]),this.Iot=t[INTERPOLATION_MODE],this.wot=t[RESULT_MODE],this.tu=!!t[ENABLED],t[ID]&&(this.If=t[ID]),t[NESTED_DATA]&&(this.Not=t[NESTED_DATA],this.Fot=t[NESTED_DATA][START_OFFSET],this.$ot=t[NESTED_DATA][LOCAL_TOTAL_TIME]),t[WI_ADDITIONAL_DATA]&&(this.Lot=t[WI_ADDITIONAL_DATA]),t[WI_ADDITIONAL_DATA]&&(this.Lot=t[WI_ADDITIONAL_DATA]),t[TRACK_TYPE]&&(this.vf=t[TRACK_TYPE]),t[TRACK_NAME]&&(this.En=t[TRACK_NAME]),this.Dot=new C33.kot(t[KEYFRAMES],this),this.git=new C33.Bot(t[PROPERTY_TRACKS],this))}_n(){this.xot=null,this.Hst=null,this.Dot&&(this.Dot._n(),this.Dot=null),this.git&&(this.git._n(),this.git=null),this.Not=null}Ett(){return this.Hst}tet(){return this.Dot||(this.Dot=new C33.kot(null,this)),this.Dot}oet(){return this.git||(this.git=new C33.Bot(null,this)),this.git}Wot(){return this.xot}det(){return this.Ust}Net(t){this.Ust=t}fet(){return this.Vst}Pet(t){this.Vst=t}xtt(){return this.Iot}Ltt(t){this.Iot=t}FQ(){return this.wot}Dtt(t){this.wot=t}Let(){return this.tu}Det(t){this.tu=!!t}mH(){return this.If}Tst(){return this.Fot}Oet(){return this.$ot}xet(t){this.$ot=t}$et(){return this.Lot[ORIGINAL_WIDTH]}Fet(t){this.Lot||(this.Lot=[]),this.Lot[ORIGINAL_WIDTH]=t}Wet(){return this.Lot||(this.Lot=[]),this.Lot[ORIGINAL_HEIGHT]}Bet(t){this.Lot||(this.Lot=[]),this.Lot[ORIGINAL_HEIGHT]=t}gE(){return this.vf}pf(){return this.En}D8(){return{keyframeDataJson:this.Dot.D8(),propertyTrackDataJson:this.git.D8(),instanceData:this.xot,additionalInstanceData:this.Lot,instanceUid:this.Vst,objectClassIndex:this.Ust,interpolationMode:this.Iot,resultMode:this.wot,enabled:this.tu,id:this.If,nestedData:this.Not,type:this.vf,name:this.En}}N8(t){t&&(this.xot=t.instanceData,this.Vst=t.instanceUid,this.Ust=t.objectClassIndex,this.Iot=t.interpolationMode,this.wot=t.resultMode,this.tu=t.enabled,this.If=t.id,this.vf=t.type||0,this.En=t.name||"",this.$ot=this.Hst.vtt().qW(),t.nestedData&&(this.Not=t.nestedData,this.Fot=this.Not[START_OFFSET],this.$ot=this.Not[LOCAL_TOTAL_TIME]),t.additionalInstanceData&&(this.Lot=t.additionalInstanceData),this.tet().N8(t.keyframeDataJson),this.oet().N8(t.propertyTrackDataJson))}}C33.Oot=class{constructor(t,s){this.WZ=s,this.Hot=[],C33.v7.yot(this.Hot,t,TrackDataItem,this)}_n(){this.WZ=null;for(const t of this.Hot)t._n();C33.qh(this.Hot),this.Hot=null}vtt(){return this.WZ}Ist(){const t=new TrackDataItem(null,this);return this.Hot.push(t),t}Vot(t){return t.tet().Zst()[0]}Uot(t){const s=t.tet().Zst();return s.at(-1)}Jet(s,t){const e=t.tet().Zst(),i=e.length;for(let t=0;t<i;t++){const r=e[t];if(r.AP()===s)return r}}jot(s,t){const e=t.tet().Zst(),i=e.length;for(let t=0;t<i;t++){const r=e[t];if(r.AP()>s)return r}}Xot(s,t){const e=t.tet().Zst(),i=e.length;for(let t=0;t<i;t++){const r=e[t];if(r.AP()>=s)return r}}zet(s,t){const e=t.tet().Zst();for(let t=e.length-1;0<=t;t--){const i=e[t];if(i.AP()<=s)return i}}*Att(){for(const t of this.Hot)yield t}D8(){return{trackDataItemsJson:this.Hot.map(t=>t.D8())}}N8(t){t&&C33.v7.Aot(this.Hot,t.trackDataItemsJson,TrackDataItem,this)}}}{const C33=self.Bs,SOURCE_DATA=0,SOURCE=0,PROPERTY=1,TYPE=2,MIN=3,MAX=4,INTERPOLATION_MODE=5,RESULT_MODE=6,ENABLED=7,PROPERTY_KEYFRAMES=8,CAN_HAVE_PROPERTY_KEYFRAMES=9;class PropertyTrackDataItem{constructor(t,s){this.git=s,this.Yot="",this.qot=null,this.vnt=null,this.vf=null,this.Kot=NaN,this.zot=NaN,this.Iot="default",this.wot="default",this.tu=!1,this.Jot=null,this.Qot=!0,t&&(this.Yot=t[SOURCE_DATA][SOURCE],this.qot=t[SOURCE_DATA].slice(1),this.vnt=t[PROPERTY],this.vf=t[TYPE],this.Kot=t[MIN],this.zot=t[MAX],this.Iot=t[INTERPOLATION_MODE],this.wot=t[RESULT_MODE],this.tu=!!t[ENABLED],this.Jot=new C33.Zot(t[PROPERTY_KEYFRAMES],this),this.Qot=t[CAN_HAVE_PROPERTY_KEYFRAMES])}_n(){this.Jot._n(),this.Jot=null,this.git=null,this.qot=null}oet(){return this.git}Tit(){return this.Jot||(this.Jot=new C33.Zot(null,this)),this.Jot}_et(){return this.Yot}Nit(t){this.Yot=t}$it(){return this.qot}Bit(t){this.qot=t}Hit(){return this.vnt}Uit(t){this.vnt=t}gE(){return this.vf}SetType(t){this.vf=t}Kit(){return this.Kot}zit(t){this.Kot=t}Jit(){return this.zot}Qit(t){this.zot=t}xtt(){return this.Iot}Ltt(t){this.Iot=t}FQ(){return this.wot}Dtt(t){this.wot=t}Let(){return this.tu}Det(t){this.tu=!!t}trt(){return!!this.Qot}D8(){return{propertyKeyframeDataJson:this.Jot.D8(),sourceAdapterId:this.Yot,sourceAdapterArguments:this.qot,property:this.vnt,type:this.vf,min:this.Kot,max:this.zot,interpolationMode:this.Iot,resultMode:this.wot,enabled:this.tu,canHavePropertyKeyframes:this.Qot}}N8(t){t&&(this.Yot=t.sourceAdapterId,this.qot=t.sourceAdapterArguments,this.vnt=t.property,this.vf=t.type,this.Kot=t.min,this.zot=t.max,this.Iot=t.interpolationMode,this.wot=t.resultMode,this.tu=t.enabled,this.Qot=t.canHavePropertyKeyframes,this.Tit().N8(t.propertyKeyframeDataJson))}}C33.Bot=class{constructor(t,s){this.Wst=s,this.tat=[],C33.v7.yot(this.tat,t,PropertyTrackDataItem,this)}_n(){this.Wst=null;for(const t of this.tat)t._n();C33.qh(this.tat),this.tat=null}vet(){return this.Wst}sit(){const t=new PropertyTrackDataItem(null,this);return this.tat.push(t),t}qit(t){const s=t.Tit();return s._it()[0]}knt(t){const s=t.Tit(),e=s._it();return e.at(-1)}srt(s,t){const e=t.Tit(),i=e._it(),r=i.length;for(let t=0;t<r;t++){const n=i[t];if(n.AP()===s)return n}}rrt(s,t){const e=t.Tit(),i=e._it(),r=i.length;for(let t=0;t<r;t++){const n=i[t];if(n.AP()>s)return n}}nrt(s,t){const e=t.Tit(),i=e._it(),r=i.length;for(let t=0;t<r;t++){const n=i[t];if(n.AP()>=s)return n}}ert(s,t){const e=t.Tit(),i=e._it();for(let t=i.length-1;0<=t;t--){const r=i[t];if(r.AP()<=s)return r}}*het(){for(const t of this.tat)yield t}D8(){return{propertyTrackDataItemsJson:this.tat.map(t=>t.D8())}}N8(t){t&&C33.v7.Aot(this.tat,t.propertyTrackDataItemsJson,PropertyTrackDataItem,this)}}}{const C33=self.Bs,TIME=0,EASE=1,ENABLE=2,TAGS=3;class KeyframeDataItem{constructor(t,s){if(this.Dot=s,this.SO=-1,this.sat="noease",this.eat=!1,this.dtt=null,this.iat=null,t){this.SO=t[TIME],this.sat=t[EASE],this.eat=!!t[ENABLE];const e=t[TAGS];this.dtt=e?e.split(" "):[],this.iat=new Set(this.dtt.map(t=>t.toLowerCase())),this.rat=null}}_n(){this.Dot=null,C33.qh(this.dtt),this.dtt=null,this.iat.clear(),this.iat=null,this.rat=null}tet(){return this.Dot}GQ(){return this.rat}nat(t){this.rat=t}AP(){return this.SO}XW(t){this.SO=t,this.Dot.hat()}Trt(){return this.sat}uH(t){this.sat=t}Let(){return this.eat}Det(t){this.eat=!!t}sH(){return this.dtt}Wtt(t){this.dtt=t?t.split(" "):[],this.iat=new Set(this.dtt.map(t=>t.toLowerCase()))}oat(){return this.iat}Fst(t){return this.iat.has(t.toLowerCase())}D8(){return{time:this.SO,ease:this.sat,enable:this.eat,tags:this.dtt}}N8(t){t&&(this.SO=t.time,this.sat=t.ease,this.eat=t.enable,this.dtt=t.tags,this.iat=new Set(this.dtt.map(t=>t.toLowerCase())))}}C33.kot=class{constructor(t,s){this.Wst=s,this.Qst=[],C33.v7.yot(this.Qst,t,KeyframeDataItem,this),this.hat()}_n(){this.Wst=null;for(const t of this.Qst)t._n();C33.qh(this.Qst),this.Qst=null}hat(){this.Qst.sort((t,s)=>t.AP()-s.AP());for(let t=0;t<this.Qst.length;t++){const s=this.Qst[t];s.nat(this.Qst[t+1])}}vet(){return this.Wst}aat(){return this.Qst.length}Zst(){return this.Qst}Zet(){const t=new KeyframeDataItem(null,this);return this.Qst.push(t),this.hat(),t}iit(t){for(const s of this.Qst)if(t(s)){const e=this.Qst.indexOf(s);-1!==e&&(s._n(),this.Qst.splice(e,1))}this.lat(),this.hat()}lat(){this.Qst.sort((t,s)=>t.AP()-s.AP())}dit(t){return this.Qst.indexOf(t)}pit(t){return this.Qst[t]}*cat(){for(const t of this.Qst)yield t}*uat(){for(let t=this.Qst.length-1;0<=t;t--)yield this.Qst[t]}D8(){return{keyframeDataItemsJson:this.Qst.map(t=>t.D8())}}N8(t){t&&(C33.v7.Aot(this.Qst,t.keyframeDataItemsJson,KeyframeDataItem,this),this.hat())}}}{const C33=self.Bs,VALUE_DATA=0,VALUE_DATA_VALUE=0,VALUE_DATA_ABSOLUTE_VALUE=1,VALUE_DATA_TYPE=2,TIME=1,EASE=2,ENABLE=3,ADDONS=4,PATH_MODE=5;class PropertyKeyframeDataItem{constructor(t,s){this.Jot=s,this.Qrt=null,this.fat=null,this.vf="",this.SO=NaN,this.sat="noease",this.eat=!1,this.dat=null,this.pat=void 0,this.Cat="line",t&&(this.Qrt=t[VALUE_DATA][VALUE_DATA_VALUE],this.fat=t[VALUE_DATA][VALUE_DATA_ABSOLUTE_VALUE],this.vf=t[VALUE_DATA][VALUE_DATA_TYPE],this.SO=t[TIME],this.sat=t[EASE],this.eat=!!t[ENABLE],this.Cat=t[PATH_MODE],this.dat=null,t[ADDONS]&&(this.dat=new C33.mat(t[ADDONS],this)),this.rat=null,this.gat=null)}_n(){this.Jot=null,this.dat&&(this.dat._n(),this.dat=null),this.rat=null,this.gat=null}Sat(){return this.dat}nat(t){this.rat=t}GQ(){return this.rat}yat(t){this.gat=t}vQ(){return this.gat}Wit(){return this.Qrt}Art(t){"color"===this.vf&&C33.gi(t)?(this.Qrt[0]=C33.eh(t),this.Qrt[1]=C33.ih(t),this.Qrt[2]=C33.rh(t)):this.Qrt=t}Bnt(){return this.fat}Srt(t){"color"===this.vf&&C33.gi(t)?(this.fat[0]=C33.eh(t),this.fat[1]=C33.ih(t),this.fat[2]=C33.rh(t)):this.fat=t}UQ(){const t=this.Jot.bit().FQ();return"relative"===t?this.Wit():"absolute"===t?this.Bnt():void 0}gE(){return this.vf}SetType(t){this.vf=t}AP(){return this.SO}XW(t){this.SO=t,this.Jot._at()}Trt(){return this.sat}uH(t){this.sat=t}Let(){return this.eat}Det(t){this.eat=!!t}PQ(){return this.Cat}HQ(s){if(this.dat){if(!this.pat&&null!==this.pat){const e=this.dat.Tat();if(e){const i=e.length;for(let t=0;t<i;t++){const r=e[t];if(r.mH()===s)return this.pat=r,this.pat}}this.pat=null}return this.pat}}D8(){const t=this.dat;return{addonDataJson:t&&t.D8(),value:this.Qrt,aValue:this.fat,type:this.vf,time:this.SO,ease:this.sat,enable:this.eat}}N8(t){t&&(t.addonDataJson&&this.dat._SetFromJson(t.addonDataJson),this.Qrt=t.value,this.fat=t.aValue,this.vf=t.type,this.SO=t.time,this.sat=t.ease,this.eat=t.enable)}}C33.Zot=class{constructor(t,s){this.mit=s,this.yit=[],this.Aat=[],C33.v7.yot(this.yit,t,PropertyKeyframeDataItem,this),C33.v7.Tot(this.Aat,t,PropertyKeyframeDataItem,this),this._at()}_n(){this.mit=null;for(const t of this.yit)t._n();C33.qh(this.yit),this.yit=null;for(const s of this.Aat)s._n();C33.qh(this.Aat),this.Aat=null}_at(){let s=this.yit;s.sort((t,s)=>t.AP()-s.AP());for(let t=0;t<s.length;t++){const e=s[t];t+1<s.length&&e.nat(s[t+1]),0<=t-1&&e.yat(s[t-1])}(s=this.Aat).sort((t,s)=>t.AP()-s.AP());for(let t=0;t<s.length;t++){const i=s[t];t+1<s.length&&i.nat(s[t+1]),0<=t-1&&i.yat(s[t-1])}}mrt(){const t=new PropertyKeyframeDataItem(null,this);return this.yit.push(t),this._at(),t}grt(t){for(const s of this.yit)if(t(s)){const e=this.yit.indexOf(s);-1!==e&&(s._n(),this.yit.splice(e,1))}this.Eat(),this._at()}Eat(){this.yit.sort((t,s)=>t.AP()-s.AP())}bit(){return this.mit}Iat(){return this.yit.length}knt(){return this.yit[this.yit.length-1]}_it(){return this.yit}bQ(){return this.Aat}*wat(){for(const t of this.yit)yield t}*Rat(){for(let t=this.yit.length-1;0<=t;t--)yield this.yit[t]}D8(){const t=this.yit,s=this.Aat;return{propertyKeyframeDataItemsJson:t.map(t=>t.D8()),propertyKeyframeDataItemsIncludingDisabledJson:s.map(t=>t.D8())}}N8(t){t&&(C33.v7.Aot(this.yit,t.propertyKeyframeDataItemsJson,PropertyKeyframeDataItem,this),C33.v7.Aot(this.Aat,t.propertyKeyframeDataItemsIncludingDisabledJson,PropertyKeyframeDataItem,this),this._at())}}}{const C33=self.Bs,ADDON_ID=0,ADDON_DATA=1;class AddonDataItem{constructor(t,s){this.dat=s,this.If=t[ADDON_ID],this.Mat=t[ADDON_DATA]}_n(){this.dat=null,this.Mat=null}Sat(){return this.dat}mH(){return this.If}D8(){return{id:this.If,data:this.Mat}}N8(t){t&&(this.If=t.id,this.Mat=t.data)}}const START_ANCHOR=0,START_ENABLE=1,END_ANCHOR=2,END_ENABLE=3;class AddonDataCubicBezierItem extends AddonDataItem{constructor(t,s){super(t,s),this.bat=this.Mat[START_ANCHOR],this.Gat=!!this.Mat[START_ENABLE],this.vat=this.Mat[END_ANCHOR],this.Pat=!!this.Mat[END_ENABLE]}_n(){super._n()}YQ(){return this.bat}dot(){return this.Gat}zQ(){return this.vat}pot(){return this.Pat}D8(){return Object.assign(super.D8(),{startAnchor:this.bat,startEnable:!!this.Gat,endAnchor:this.vat,endEnable:!!this.Pat})}N8(t){t&&(super.N8(t),this.bat=t.startAnchor,this.Gat=!!t.startEnable,this.vat=t.endAnchor,this.Pat=!!t.endEnable)}}const DIRECTION=0,REVOLUTIONS=1;class AddonDataAngleItem extends AddonDataItem{constructor(t,s){super(t,s),this.Oat=this.Mat[DIRECTION],this.xat=this.Mat[REVOLUTIONS]}_n(){super._n()}mot(){return this.Oat}Cot(){return this.xat}D8(){return Object.assign(super.D8(),{direction:this.Oat,revolutions:this.xat})}N8(t){t&&(super.N8(t),this.Oat=t.direction,this.xat=t.revolutions)}}C33.mat=class{constructor(t,s){this.Lat=s,this.Dat=[],C33.v7.yot(this.Dat,t,{prop:0,map:new Map([["cubic-bezier",AddonDataCubicBezierItem],["angle",AddonDataAngleItem]])},this)}_n(){this.Lat=null;for(const t of this.Dat)t._n();C33.qh(this.Dat),this.Dat=null}Nat(){return this.Lat}Tat(){return this.Dat}*Fat(){for(const t of this.Dat)yield t}D8(){return{addonDataItemsJson:this.Dat.map(t=>t.D8())}}N8(t){t&&C33.v7.Aot(this.Dat,t.addonDataItemsJson,{prop:"id",map:new Map([["cubic-bezier",AddonDataCubicBezierItem],["angle",AddonDataAngleItem]])},this)}}}{let C33=self.Bs,INITIAL_VALUE_MODE_START_VALUE="start-value",INITIAL_VALUE_MODE_CURRENT_STATE="current-state",PING_PONG_BEGIN=0,PING_PONG_END=1,createdTweens=0;C33.Yht=class extends C33.c9{constructor(t,s){super("tween-"+createdTweens++,t,s),this.If="",this.$at=!1,this.kat=INITIAL_VALUE_MODE_START_VALUE,this.jst=null,this.Bat=null,this.Wat=null,this.Cit=null,this.Hat=null}_tt(t){const s=C33.yn(C33.Event,"tweenstatereleased");s.Vat=this,t.dispatchEvent(s)}gE(){return 1}XZ(){for(const t of this.WZ.Ett().Att())this.HZ.push(C33.Uat.CA(this,t));this.Cit=this.HZ[0]}Est(){const t=this.WZ.Ett().Ist(),s=C33.Uat.CA(this,t);return this.HZ.push(s),this.jat(),s}jat(){this.Cit=this.HZ[0]}SH(t){return this.Cit.Ost()[0]}Xit(t){this.Xat=t}fH(){const t=this.wQ();if(t&&t.length){const s=t[0];if(this.Cit=s){const e=s.fH();return s.uet()?e:void 0}}}Yat(t){this.Wat||(this.Wat=[]),this.Wat.push(t)}qat(t){this.Bat||(this.Bat=[]),this.Bat.push(t)}Kat(t){if(this.Wat){const s=this.Wat.indexOf(t);-1!==s&&this.Wat.splice(s,1)}}zat(t){if(this.Bat){const s=this.Bat.indexOf(t);-1!==s&&this.Bat.splice(s,1)}}Jat(t,s){for(const e of this.HZ)for(const i of e.eet)if(i.xst()===s){const r=i.oet(),n=i.bit(),h=r.qit(n);h.Art(t),h.Srt(t)}}Qat(t){for(const s of this.HZ)for(const e of s.eet)if(e.xst()===t)return e}Zat(t){for(const s of t){const e=this.Qat(s);this.Jat(e.art(),s)}if(this.Btt()){const i=this.qW()-this.AP();this.YW(i);for(const r of this.HZ)r.xet(i);this.sst(0)}else{const n=this.AP();this.YW(n);for(const h of this.HZ)h.xet(n);this.sst(n)}this.est()}tlt(t,s){const e=this.Qat(s),i=e.oet(),r=e.bit(),n=i.knt(r);n.XW(this.qW()),n.Art(t),n.Srt(t)}slt(t){this.If=t}mH(){return this.If}elt(t){this.kat=t}ilt(){return this.kat}CH(t){this.$at=t}pH(){return this.$at}jtt(){if(this.Wat)for(const t of this.Wat)t(this);if(!this.eQ())for(const s of this.HZ)s.oit()}Xtt(){this.ott=this.Af.Ytt()}rQ(){if(!this.ctt&&(this.ctt=!0,this.Bat))for(const t of this.Bat)t(this)}XW(t){this.rlt(),super.XW(t)}ost(t){(t=C33.gi(t)?t:this.qW())<0?this.KZ=0:t>=this.qW()?this.KZ=this.qW():this.KZ=t,this.Cit.ast()}K9(t){if(!this.iQ()&&this.ilt()===INITIAL_VALUE_MODE_CURRENT_STATE)for(const s of this.HZ)s.hit();super.K9(t)}VW(t=!1){if(super.VW(t),!this.eQ())for(const s of this.HZ)s.nit()}vd(t=!0,s=!1){this.rlt(),super.vd(t,s)}rlt(){for(const t of this.HZ){const s=t=>{const s=t.AP(),e=this.qW();return 0!==s&&s!==e};t.eit(s),t.rit(s)}}q7(){if(!this.WW()){const t=this.fH();if(t&&t.qk().qY())return!1;this.BZ.j9(this),this.dst()}return!0}Z9(r,t,s){if(this.jst||(this.jst=this.fH()),!this.jst||this.jst.mV())this.VW(!0),this.Xtt();else{const e=this.jst.ZL();if(0!==(r=-1!==e?s*e:r)||0!==this.ftt){this.ftt=r;const n=this.KZ+this.zZ,h=r*this.JZ,o=n+h,a=this.WZ.Sst;o<0?(this.KZ=0,this.zZ=-o):a<=o?(this.KZ=a,this.zZ=this.KZ-o):(this.KZ=o,this.zZ=0);let t=!1,s=!1,e=this.zW(),i=this.QW();e||i?e&&!i?0<this.JZ?this.KZ>=a&&(this.ost(0),this.nlt(C33.llt.olt.MJ.hlt),this.nlt(C33.llt.olt.MJ.clt),s=!0):this.KZ<=0&&(this.ost(a),this.nlt(C33.llt.olt.MJ.hlt),this.nlt(C33.llt.olt.MJ.clt),s=!0):!e&&i?0<this.JZ?this.KZ>=a&&(this.sst(a),this.ZW(-1*this.tH()),s=!0,this.QZ===PING_PONG_END?this.ZZ<this.oW()?(this.ZZ++,this.nlt(C33.llt.olt.MJ.hlt),this.nlt(C33.llt.olt.MJ.clt),this.nlt(C33.llt.olt.MJ.ult),this.nlt(C33.llt.olt.MJ.flt),this.QZ=PING_PONG_BEGIN):(this.nlt(C33.llt.olt.MJ.ult),this.nlt(C33.llt.olt.MJ.flt),t=!0):this.QZ===PING_PONG_BEGIN&&(this.nlt(C33.llt.olt.MJ.ult),this.nlt(C33.llt.olt.MJ.flt),this.QZ=PING_PONG_END)):this.KZ<=0&&(this.sst(0),this.ZW(-1*this.tH()),s=!0,this.QZ===PING_PONG_END?this.ZZ<this.oW()?(this.ZZ++,this.nlt(C33.llt.olt.MJ.hlt),this.nlt(C33.llt.olt.MJ.clt),this.nlt(C33.llt.olt.MJ.ult),this.nlt(C33.llt.olt.MJ.flt),this.QZ=PING_PONG_BEGIN):(t=!0,this.nlt(C33.llt.olt.MJ.ult),this.nlt(C33.llt.olt.MJ.flt)):this.QZ===PING_PONG_BEGIN&&(this.nlt(C33.llt.olt.MJ.ult),this.nlt(C33.llt.olt.MJ.flt),this.QZ=PING_PONG_END)):e&&i&&(0<this.JZ?this.KZ>=a&&(this.sst(a),this.ZW(-1*this.tH()),s=!0,this.QZ===PING_PONG_BEGIN&&(this.nlt(C33.llt.olt.MJ.ult),this.nlt(C33.llt.olt.MJ.flt)),this.QZ===PING_PONG_END&&(this.nlt(C33.llt.olt.MJ.hlt),this.nlt(C33.llt.olt.MJ.clt),this.nlt(C33.llt.olt.MJ.ult),this.nlt(C33.llt.olt.MJ.flt)),this.QZ++,this.QZ=C33.wrap(this.QZ,0,2)):this.KZ<=0&&(this.sst(0),this.ZW(-1*this.tH()),s=!0,this.QZ===PING_PONG_BEGIN&&(this.nlt(C33.llt.olt.MJ.ult),this.nlt(C33.llt.olt.MJ.flt)),this.QZ===PING_PONG_END&&(this.nlt(C33.llt.olt.MJ.hlt),this.nlt(C33.llt.olt.MJ.clt),this.nlt(C33.llt.olt.MJ.ult),this.nlt(C33.llt.olt.MJ.flt)),this.QZ++,this.QZ=C33.wrap(this.QZ,0,2))):0<this.JZ?this.KZ>=a&&(this.ZZ<this.oW()?(this.ZZ++,this.ost(0),this.nlt(C33.llt.olt.MJ.hlt),this.nlt(C33.llt.olt.MJ.clt),s=!0):(this.sst(a),t=!0)):this.KZ<=0&&(this.ZZ<this.oW()?(this.ZZ++,this.ost(a),this.nlt(C33.llt.olt.MJ.hlt),this.nlt(C33.llt.olt.MJ.clt),s=!0):(this.sst(0),t=!0)),t?(this.Cit.yst(),this.VW(!0),this.Xtt()):(this.Cit.ef(this.KZ,!0,!1,s,this.utt,!1),this.utt&&(this.utt=!1))}}}nlt(t){const s=this.fH(),e=s.dlt(C33.llt.olt);e.plt(this),this.Af.LB(t,s,e.Y5()),e.Clt()}D8(){const t=super.D8(),s=this.vtt();return Object.assign(t,{tweenDataItemJson:s.D8(),id:this.If,destroyInstanceOnComplete:this.$at,initialValueMode:this.kat})}N8(t){if(t){const s=this.vtt();s.N8(t.tweenDataItemJson),super.N8(t),this.If=t.id,this.$at=t.destroyInstanceOnComplete,this.kat=t.initialValueMode,this.jat()}}static IsPlaying(t){return t.IsPlaying()}static rH(t){return t.rH()}static mlt(t){return!!t.QW()&&t.ktt()===PING_PONG_BEGIN}static glt(t){return!!t.QW()&&t.ktt()===PING_PONG_END}static Slt(t){const s=t.runtime.wtt(),e=new C33.Sot;if(t.json){e.N8(t.json.tweenDataItemJson);const i=new C33.Yht(e,s);return i.N8(t.json),i}{const r=new C33.Yht(e,s),n=(C33.Wi(t.ylt)||(t.ylt=[t.ylt]),r.slt(t.id),r.Wtt(t.tags),r.elt(t.initialValueMode),r.CH(t._lt),r.KW(t.loop),r.JW(t.pingPong),r.YW(t.time),r.Ott(0),r.Ltt("default"),r.Dtt(t.ylt[0].resultMode),r.Ntt(t.repeatCount),r.Est()),h=(n.Pet(t.q5.oB()),n.Ltt("default"),n.Dtt(t.ylt[0].resultMode),n.Det(!0),n.Net(t.q5.qk().Yx()),t.q5.N5()),o=h.ket()?h.$et():t.q5.UD().AC(),a=h.ket()?h.Wet():t.q5.UD().OC(),l=(n.Fet(o),n.Bet(a),n.Qet()),c=(l.XW(0),l.uH("noease"),l.Det(!0),l.Wtt(""),n.Qet());c.XW(t.time),c.uH("noease"),c.Det(!0),c.Wtt("");for(const u of t.ylt){const f=n.tit(),d=(f.Nit(u.Tlt),f.kit(u.Alt),f.Vit(u.property),f.Xit(u.type),f.zit(NaN),f.Qit(NaN),f.Ltt("default"),f.Dtt(u.resultMode),f.Det(!0),f.Crt()),p=(d.SetType(u.valueType),d.XW(0),d.uH(u.ease),d.Det(!0),d.Art(u.Elt),d.Srt(u.Elt),f.Crt());p.SetType(u.valueType),p.XW(t.time),p.uH(u.ease),p.Det(!0),p.Art(u.Ilt),p.Srt(u.Ilt),f.Mtt()}return r}}static Pet(t,s){if(!isNaN(s))for(const e of t.wQ())e.Pet(s)}wlt(t,s){return this.Hat||(this.Hat=C33.yn(self.oH,this,t,s)),this.Hat}}}{const C33=self.Bs;C33.Uat=class extends C33.Itt{constructor(t,s){super(t,s),this.Rlt=null,this.Mlt=null}static CA(t,s){return C33.yn(C33.Uat,t,s)}blt(){1===this.eet.length?this.Rlt=this.eet[0]:(this.Rlt=this.eet[0],this.Mlt=this.eet[1])}iet(){for(const t of this.Wst.oet().het())this.eet.push(C33.Glt.CA(this,t));this.blt()}tit(){const t=this.Wst.oet(),s=t.sit(),e=C33.Glt.CA(this,s);return this.eet.push(e),this.blt(),e}K9(){if(this.cet(),this.uet()||!this.Gtt()){const t=this.let(),s=t.Btt(),e=s?0:this.Oet();for(const r of this.eet)r.K9(e),0===this.ret&&1===r.Uet()&&(this.ret=1),0===this.h9&&1===r.z9()&&(this.h9=1);this.net=0;const i=this.eet.some(t=>t.gst());i&&(this.net=1),this.Jst=this.jet(e),this.qst=!1,this.Kst=!1,this.ef(e)}}_st(){}ef(t,s=0,e=!1,i=!1,r,n=!1,h=!1){if(this.jst||this.fH(),this.jst){const o=!this.jst.mV();return o&&(!n||!this.qk().qY())&&((this.Mlt?(this.Rlt.ef(t,e,i,h),this.Mlt):this.Rlt).ef(t,e,i,h),void(0!==this.Rlt.Uet()&&(this.Xst||(this.Xst=this.jst.UD()),this.Xst)&&this.Xst.u4()))}}Ast(){}N8(t){super.N8(t),this.blt()}}}{const C33=self.Bs;C33.Glt=class extends C33.aet{constructor(t,s){super(t,s),this.vlt=!1}static CA(t,s){return C33.yn(C33.Glt,t,s)}ef(t,s=!1,e=!1,i=!1){let r,n;if(this.vlt)r=this.yit[0],n=this.yit[1];else{if(s)r=this.git.ert(t,this.mit);else{if(this.Ait){const h=this.let(),o=this.Ait.GQ(),a=this.Ait.AP(),l=o?o.AP():h.qW();(t<=a||l<=t)&&(this.Ait=this.git.ert(t,this.mit))}else this.Ait=this.git.ert(t,this.mit);r=this.Ait}n=r.GQ()}this.Sit.ef(t,r,n,s,e,i)}Crt(){const t=this.mit.Tit(),s=t.mrt();return this.Ait=null,this.vlt=this.Zit().length<=2,s}rit(t){this.Ait=null;const s=this.mit.Tit();s.grt(t),this.vlt=this.Zit().length<=2}D8(){return{sourceAdapterJson:this.Mtt().D8(),basic:this.vlt}}N8(t){t&&(this.Mtt().N8(t.sourceAdapterJson),this.vlt=t.basic)}}}{const C33=self.Bs,Ease=self.vu,NAME=0,TRANSITION_KEYFRAMES=1,LINEAR=2;C33.if=class extends C33.gn{constructor(t,s=!0){super(),this.En=t[NAME],this.Plt=t[LINEAR],this.Olt=[];for(const e of t[TRANSITION_KEYFRAMES]){const i=C33.xlt.CA(this,e);this.Olt.push(i)}for(let t=0;t<this.Olt.length;t++){const r=this.Olt[t],n=this.Olt[t+1],h=this.Olt[t-1];r.nat(n),r.yat(h)}this.Llt=new Map,this.Dlt=new Map,this.Nlt(),s&&Ease.nf(this.En,(t,s,e,i)=>this.ef(t,s,e,i),null,{transition:this})}static CA(t){return C33.yn(C33.if,t)}_n(){for(const t of this.Olt)t._n();C33.qh(this.Olt),this.Olt=null,this.Llt.clear(),this.Llt=null,this.Dlt.clear(),this.Dlt=null}rf(t){this.Plt=!!t}Flt(t){const s=this.Dlt.get(t);if(s)return s;for(const e of this.Olt)if(e.$lt()===t)return this.Dlt.set(t,e),e}klt(s){for(let t=this.Olt.length-1;0<=t;t--){const e=this.Olt[t],i=e.$lt();if(i<=s){let t=e;if(i<s)return t;if(i===s){for(;t;){const r=t.vQ();if(!r)break;if(r.$lt()!==t.$lt())break;t=r}return t}}}}ef(t,s,e,i){let r=t/i;if(this.Plt){const S=this.Flt(0),y=this.Flt(1),_=s+(s+e)*S.Blt(),T=(s+e)*y.Blt(),A=T-_;return 0===i?_+A:Ease.lf(t,_,A,i)}0===i&&(r=1);let n=this.klt(r),h=n.GQ();if(!h){const E=n.vQ(),I=n;n=E,h=I}const o=h.$lt()-n.$lt(),a=C33.In(r,n.$lt(),h.$lt(),0,o);if(n.Wlt()||0==o){const w=s+(s+e)*n.Blt(),R=(s+e)*h.Blt(),M=R-w;return 0==o?1===a?w+M:w:Ease.lf(a,w,M,o)}let l=n.$lt(),c=n.Blt(),u=n.$lt()+n.Hlt(),f=n.Blt()+n.Vlt(),d=h.$lt()+h.Ult(),p=h.Blt()+h.jlt(),C=h.$lt(),m=h.Blt(),g=Ease.ju("spline")(a,l,c,u,f,d,p,C,m,this.Llt.get(n));return(1-(g+=n.Blt()))*s+g*(s+e)}Nlt(){this.Llt.clear();for(let t=0;t<this.Olt.length-1;t++){const s=this.Olt[t];if(s.dot()){const e=s,i=this.Olt[t+1];if(i.pot()){const r=e.$lt(),n=e.$lt()+e.Hlt(),h=i.$lt()+i.Ult(),o=i.$lt();this.Llt.set(e,Ease.cf(r,n,h,o))}}}}}}{const C33=self.Bs,VALUE_X=0,VALUE_Y=1,START_ANCHOR_X=2,START_ANCHOR_Y=3,END_ANCHOR_X=4,END_ANCHOR_Y=5,START_ENABLE=6,END_ENABLE=7,SEGMENT_MODE=8;C33.xlt=class extends C33.gn{constructor(t,s){super(),this.Xlt=t,this.Ylt=s[VALUE_X],this.qlt=s[VALUE_Y],this.Klt=s[START_ANCHOR_X],this.zlt=s[START_ANCHOR_Y],this.Jlt=s[END_ANCHOR_X],this.Qlt=s[END_ANCHOR_Y],this.Gat=s[START_ENABLE],this.Pat=s[END_ENABLE],this.Zlt=s[SEGMENT_MODE],this.rat=null,this.gat=null}_n(){this.Xlt=null}static CA(t,s){return C33.yn(C33.xlt,t,s)}nat(t){this.rat=t}GQ(){return this.rat}yat(t){this.gat=t}vQ(){return this.gat}$lt(){return this.Ylt}Blt(){return this.qlt}Hlt(){return this.Klt}Vlt(){return this.zlt}Ult(){return this.Jlt}jlt(){return this.Qlt}dot(){return this.Gat}pot(){return this.Pat}Wlt(){return"linear"===this.Zlt}tct(){return"cubic"===this.Zlt}}}{const C33=self.Bs;C33.sct=class extends C33.gn{constructor(t){super(),this.Af=t,this.ect=[]}_n(){for(const t of this.ect)t._n();C33.qh(this.ect),this.ect=null}CA(t){this.ect.push(C33.if.CA(t))}}}{const C33=self.Bs;C33.ict=class extends C33.gn{constructor(t){super(),this.Af=t,this.rct=null,this.nct=null,this.J7=t=>this.Q7(t.q5)}_n(){if(this.o9(),this.rct){for(const t of this.rct.values())t.clear();this.rct.clear()}this.rct=null,this.Af=null}CA(t){if(this.rct||(this.rct=new Map),t){const s=t[0][16],e=s[0],i=t[1],r=(this.rct.has(i)||this.rct.set(i,new Map),this.rct.get(i));r.set(e,t)}}a9(){const t=this.Af.ed();t&&t.addEventListener("instancedestroy",this.J7)}o9(){const t=this.Af.ed();t&&t.removeEventListener("instancedestroy",this.J7)}hct(){return!!this.rct&&0!==this.rct.size}oct(t,s){let e;if(e=t instanceof C33.lct?t.Yx():t,this.rct.has(e)){const i=this.rct.get(e).get(s);return i?JSON.parse(JSON.stringify(i)):void 0}}cct(t,s){this.nct||(this.nct=new WeakMap),this.nct.has(t)||this.nct.set(t,s)}uct(t){if(!this.nct)return"";const s=this.nct.get(t);return s||""}Q7(t){this.nct&&this.nct.has(t)&&this.nct.delete(t)}}}{const C33=self.Bs;C33.fct=class{constructor(t){this.Af=t,this.dct=new C33.pct}_n(){this.dct._n(),this.dct=null,this.Af=null}cN(){return this.Af}CA(t){this.dct.Mu(t)}Cct(t){return this.dct.oe(t)}mct(){return this.dct.mct()}}}{const C33=self.Bs;C33.gct=class{constructor(t,s,e,i,r,n,h){this.Af=r.cN(),this.Sct=r,this.yct=t,this._ct=e,this.Tct=i,this.d1=s,this.P7=n,this.Act=h??n.fH().oB(),this.Ect(),this.Ict=this.Rct?.wct()??-1,this.Mct=[],this.bct=null,this.Gct=NaN,this.vct=null,this.Pct=null,this.Oct=null,this.xct="",this.Lct=null,this.Dct="",this.Nct="",this.Fct=0,this.$ct=!1,this.ntt=!1}_n(){this.ntt||(C33.qh(this.Mct),this.Mct=null,this.Af=null,this.Sct=null,this.Tct=null,this.P7=null,this.bct=null,this.Gct=NaN,this.vct&&this.vct.clear(),this.vct=null,this.Pct=null,this.Oct=null,this.xct="",this.Lct=null,this.Dct="",this.Nct="",this.ntt=!0)}Tn(){return this.ntt}kct(){return this.Sct}cN(){return this.Af}pf(){return this.yct}Bct(){return this.Tct}BW(){return this.d1}T9(){return this.P7||(this.P7=this.Af.kD(this.Act).N5()),this.P7}Wct(){return this.Hct(this.Ict)}Vct(){const t=this.Wct();return t?t.BW():""}Uct(){const t=this.Wct();return t?t.sH():[]}jct(t){const s=this.Uct();if(!s)return!1;if(!s.length)return!1;const e=C33.gct.Htt(t);return!(!e||!e.length)&&e.every(C33.gct.Utt,s)}Xct(t,s){const e=this.Uct();if(!e)return!1;if(!e.length)return!1;const i=C33.gct.Htt(t);return!(!i||!i.length)&&i.every(t=>C33.gct.Yct.call(e,t,s))}static Utt(t){return""===t?1===this.length&&""===this[0]:this.map(t=>t.trim().toLowerCase()).includes(t.trim().toLowerCase())}static Htt(t){return t.trim().split(" ")}static Yct(s,e){return""===s?1===this.length&&""===this[0]:this.some(t=>C33.compare(t.trim(),e,s.trim()))}qct(t){const s=this.Wct();if(s){if(C33.gi(t)){const e=s.Kct(),i=e?e[t]:void 0;if(C33.gi(i))return this.Hct(i)}if("string"==typeof t)for(const r of s.Kct()){const n=this.Hct(r);if(n.jW(t))return this.Hct(n.wct())}}}zct(t){const s=this.qct(t);return s?s.BW():""}Jct(t){const s=this.qct(t);return s?s.sH():""}Qct(t){const s=this.Wct();if(!s)return-1;const e=s.Kct();if(!e)return-1;const i=this.qct(t);return i?e.indexOf(i.wct()):-1}Zct(){const t=this.Wct();if(!t)return 0;const s=t.Kct();return s?s.length:0}Hct(t){return this.Tct.Hct(t)}vd(){const t=this.tut();t.sut(!0)}sut(t){if(this.eut()){for(const[s,e]of this.eut().entries())e.sut(!1);this.eut().clear()}if(this.vct=null,this.bct=null,this.iut=null,this.Pct=null,this.xct="",this.Lct=null,this.Dct="",this.Nct="",this.Mct=[],t){this.Sct.rut(this);const i=this.Rct.wct();i!==this.Ict&&this.nut(i)}else this.Ict=this.Rct.wct()}hut(){const t=this.Tct.Hct(this.Ict);return t?t.aut().out():0}lut(t){const s=this.cut(t);return s?s.pf():""}uut(t){let s;return C33.gi(t)&&(s=this.cut(t)),"string"==typeof t&&(s=this.fut(t)),"number"!=typeof t&&"string"!=typeof t&&console.warn("[Flowcharts] unexpected argument type in GetCurrentNodeOutputValueAt expression"),s?s.Wit():""}dut(t){let s;if(C33.gi(t)&&(s=this.cut(t)),s="string"==typeof t?this.fut(t):s){const e=s.Cut();C33.gi(e)&&(this.Mct.push(this.Ict),this.nut(e))}}mut(t){const s=this.Tct.gut(t);if(s){const e=this.Tct.Hct(s.wct());e&&(this.Mct.push(this.Ict),this.nut(e.wct()))}}Sut(){const t=this.Mct.pop();C33.gi(t)?this.nut(t):this.yut()&&(this.Sct.rut(this.yut(),!0,!1,!1),this.yut().nut(this._ut()),this.tut().Tut(this.yut()))}Aut(t){const s=this.Wct();if(s){s.wct();const e=this.qct(t);e&&(this.Mct.push(this.Ict),this.nut(e.wct()))}}Eut(s){if(C33.gi(s)){const t=this.Tct.Hct(this.Ict),e=t.aut().Iut();return!!e[s]}if("string"==typeof s){const i=this.Tct.Hct(this.Ict),r=i.aut().Iut();for(let t=0;t<r.length;t++)if(r[t].pf()===s)return!0}return!1}wut(){this.$ct=!0}Rut(){return 0<this.Fct}Mut(){this.Fct++}but(){this.Fct--,0===this.Fct&&this.$ct&&this.Sct.Gut(this)}nut(t){const e=this.Ict,s=this.T9().fH();if(this.Mut(),this.Sct.vut(this),this.Af.LB(C33.GJ.Flowchart.MJ.OnBeforeAnyNodeChange,s),this.Af.LB(C33.GJ.Flowchart.MJ.OnBeforeTaggedNodeChange,s),this.Af.LB(C33.GJ.Flowchart.MJ.OnBeforeAnyNodeChangeInFlowchart,s),this.Af.LB(C33.GJ.Flowchart.MJ.OnBeforeTaggedNodeChangeInFlowchart,s),this.Ict=t,this.Af.LB(C33.GJ.Flowchart.MJ.OnAnyNodeChange,s),this.Af.LB(C33.GJ.Flowchart.MJ.OnTaggedNodeChange,s),this.Af.LB(C33.GJ.Flowchart.MJ.OnAnyNodeChangeInFlowchart,s),this.Af.LB(C33.GJ.Flowchart.MJ.OnTaggedNodeChangeInFlowchart,s),this.Sct.Put(),this.but(),!this.Tn()){const i=this.Hct(this.Ict);if("reference"===i.gE()){const r=i.Out();if(this.xut(i)){this.Mct.pop();const n=this.Lut(i),h=(this.Sct.rut(n,!0,!0,!1),n.Dut(this,e),this.tut());h.Tut(n)}else{const o=i.Nut();if(r){this.Mct.pop();let s=i.Fut();if(s){let t=this.Sct.$ut(s);for(;t;)s=C33.Cp(s),t=this.Sct.$ut(s)}else{s=r+"-ref";let t=this.Sct.$ut(s);for(;t;)s=C33.Cp(s),t=this.Sct.$ut(s)}const a=this.Sct.kut(r,o,s,this.P7,!0),l=(a.Dut(this,e),this.But(i,a),this.tut());a.Wut(l),l.Tut(a)}}}}}cut(t){const s=this.Tct.Hct(this.Ict);if(!s)return null;const e=s.aut().Iut();if(!e)return null;const i=e[t];return i||null}fut(t){const s=this.Tct.Hct(this.Ict);if(!s)return null;const e=s.aut().Hut(t);return e||null}Ect(s){if("number"==typeof s){let t=this.Hct(s);t=t||this.Tct.Vut(),this.Rct=t}else{let t=this.Tct.gut(this._ct);t=t||this.Tct.Vut(),this.Rct=t}}D8(){return this.$ct?null:{flowchartName:this.yct,flowchartTag:this.d1,startNodeTag:this._ct,currentNodeId:this.Ict,previousNodeIds:this.Mct,pluginUID:this.P7.fH().oB(),reference:{previousFlowchartTag:this.yut()?this.yut().BW():"",previousStartNodeId:C33.gi(this._ut())?this._ut():NaN,referencesJson:this.Uut(),currentReferenceFlowchartTag:this.jut()?this.jut().BW():"",rootFlowchartTag:this.tut()?this.tut().BW():""}}}Uut(){if(!this.Xut())return null;const t=[];for(const[s,e]of this.eut().entries())t.push({flowchartElementId:s.wct(),flowchartStateTag:e.BW()});return t.length?t:null}N8(t){if(t){if(this.yct=t.flowchartName,this.d1=t.flowchartTag,this._ct=t.startNodeTag,this.Ict=t.currentNodeId,this.Mct=t.previousNodeIds,this.Act=t.pluginUID,t.hasOwnProperty("reference")){const s=t.reference;this.xct=s.previousFlowchartTag,this.Gct=s.previousStartNodeId,this.Lct=s.referencesJson,this.Dct=s.currentReferenceFlowchartTag,this.Nct=s.rootFlowchartTag}this.Ect()}}yut(){return"string"==typeof this.xct&&this.xct&&(this.bct=this.Sct.$ut(this.xct),this.xct=""),this.bct}_ut(){return this.Gct}Dut(t,s){this.bct=t,this.Gct=s}jut(){return"string"==typeof this.Dct&&this.Dct&&(this.Pct=this.Sct.$ut(this.Dct),this.Dct=""),this.Pct}Tut(t){this.Pct=t,this.Pct===this&&(this.Pct=null)}tut(){return"string"==typeof this.Nct&&this.Nct&&(this.Oct=this.Sct.$ut(this.Nct),this.Nct=""),this.Oct||this}Wut(t){this.Oct=t}Xut(){return this.Yut(),!!this.vct}xut(t){return this.Yut(),this.vct&&this.vct.has(t)}Yut(){if(this.Lct){this.vct&&this.vct.clear(),this.vct||(this.vct=new Map);for(const t of this.Lct){const s=this.Sct.$ut(t.flowchartStateTag),e=s.Hct(t.flowchartElementId);this.vct.set(e,s)}this.Lct=null}}eut(){return this.Yut(),this.vct}Lut(t){return this.Yut(),this.vct.get(t)}But(t,s){this.vct||(this.vct=new Map),this.vct.set(t,s)}}}{const C33=self.Bs;C33.qut=class{constructor(t){this.Af=t,this.Kut=new Map,this.zut=null,this.Jut=[],this.Qut=()=>this.e9(),this.Zut=null}_n(){C33.qh(this.Jut),this.Jut=null,this.Kut.clear(),this.Kut=null,this.zut=null,this.Af=null,this.Zut=null}cN(){return this.Af}kut(t,s,e,i,r,n){const h=this.Af.kct().Cct(t);if(h){if(!this.Kut.has(e)){const o=new C33.gct(t,e,s,h,this,i,n);return this.Kut.set(e,o),r&&this.rut(o,!0),o}{const a=this.Kut.get(e);a&&this.Gut(a)}}else console.warn(`[Flowcharts] no flowchart found with name '${t}'`)}Gut(t){if(t.wut(),!t.Rut()){const s=t.BW();this.Kut.delete(s),t._n(),this.zut===t&&(this.zut=null)}}tft(t){t.vd()}$ut(t){return this.Kut.get(t)}vut(t){this.Jut.push(t)}Put(){this.Jut.pop()}rut(t,s=!1,e=!1,i=!0){if(i){const r=t.jut();t=r||t}t!==this.zut&&(this.eft(),this.ift(t,s,e))}rft(t){return"string"==typeof t?this.$ut(t):this.Jut.length?this.Jut[this.Jut.length-1]:this.zut}eft(){if(this.zut&&!this.zut.Tn()){const t=this.zut.T9().fH();this.zut.Mut(),this.vut(this.zut),this.Af.LB(C33.GJ.Flowchart.MJ.OnBeforeFlowchartChange,t),this.Put(),this.zut.but()}}ift(t,s=!1,e=!1){if(this.zut=t,this.zut&&!this.zut.Tn()){const i=this.zut.T9().fH();this.zut.Mut(),this.vut(this.zut),this.Af.LB(C33.GJ.Flowchart.MJ.OnFlowchartChange,i),!0!==e&&"number"!=typeof e||this.zut.Ect(e),s&&(this.Af.LB(C33.GJ.Flowchart.MJ.OnAnyNodeChange,i),this.Af.LB(C33.GJ.Flowchart.MJ.OnTaggedNodeChange,i)),this.Put(),this.zut.but()}}D8(){return{flowchartJsonObjects:[...this.Kut.values()].map(t=>t.D8()),currentFlowchartTag:this.zut?this.zut.BW():null}}N8(t){if(t){this.Zut=t;const s=new Map;for(const e of this.Zut.flowchartJsonObjects){const i=e.flowchartTag;if(this.Kut.has(i)){const r=this.Kut.get(i);r.N8(e),s.set(i,r)}else{const n=this.kut(e.flowchartName,e.startNodeTag,e.flowchartTag,null,!1,e.pluginUID);n.N8(e),s.set(e.flowchartTag,n)}}for(const[h,o]of this.Kut.entries())s.has(h)||o._n();this.Kut.clear(),this.Kut=s,this.Af.SJ()?this.Af.ed().addEventListener("afterload",this.Qut):this.e9()}}e9(){this.Af.ed().removeEventListener("afterload",this.Qut);const t=this.Kut.get(this.Zut.currentFlowchartTag);t&&this.rut(t,!0),this.Zut=null}}}{const C33=self.Bs;C33.pct=class{constructor(){this.nft=new Map}_n(){for(const t of this.nft.values())t._n();this.nft.clear(),this.nft=null}Mu(t){const s=new C33.hft(t),e=s.pf();this.nft.set(e,s)}oe(t){return this.nft.get(t)}mct(){return!!this.nft.size}static oft(t,s,e,i){if(s)for(const r of s){const n=new e(r,i);t.push(n)}}}}{const C33=self.Bs,NAME=0,NODES=1;C33.hft=class{constructor(t){this.En=t[NAME],this.aft=new C33.lft(t[NODES],this)}_n(){this.aft._n(),this.aft=null}cft(){return this.aft}Hct(t){return this.aft.Hct(t)}gut(t){return this.aft.gut(t)}Vut(){return this.aft.Vut()}pf(){return this.En}}}{const C33=self.Bs,FLOWCHART_ID=0,TAG=1,PARENT_FLOWCHART_IDS=2,PARENT_OUTPUT_FLOWCHART_IDS=3,CHILDREN_FLOWCHART_IDS=4,OUTPUTS=5,IS_START=6,TYPE=7,REFERENCE_FLOWCHART=8,REFERENCE_FLOWCHART_START_NODE=9,REFERENCE_FLOWCHART_TAG=10;class FlowchartNodeDataItem{constructor(t,s){this.aft=s,this.vf=t[TYPE],this.uft=t[FLOWCHART_ID],this.d1=t[TAG],this.d1?this.dtt=this.d1.trim().split(" ").map(t=>t.trim()):this.dtt=[],this.fft=t[PARENT_FLOWCHART_IDS],this.dft=null,this.pft=null,"dictionary"===this.vf&&(this.dft=t[PARENT_OUTPUT_FLOWCHART_IDS],this.pft=t[CHILDREN_FLOWCHART_IDS]),this.Cft=t[IS_START],this.mft=null,this.gft=null,this.Sft=null,"reference"===this.vf&&(this.mft=t[REFERENCE_FLOWCHART],this.gft=t[REFERENCE_FLOWCHART_START_NODE],this.Sft=t[REFERENCE_FLOWCHART_TAG]),this.yft=new C33._ft(t[OUTPUTS],this)}_n(){this.aft=null}cft(){return this.aft}aut(){return this.yft}wct(){return this.uft}BW(){return this.d1}sH(){return this.dtt}jW(t){if(!this.dtt)return!1;if(!this.dtt.length)return!1;const s=C33.gct.Htt(t);return!(!s||!s.length)&&s.every(C33.gct.Utt,this.dtt)}Tft(){return this.Cft}Aft(t){this.Cft=!!t}Eft(){if("dictionary"===this.vf)return!0;if("reference"===this.vf)return!1;throw new Error("unexpected flowchart node type: "+this.vf)}Kct(){return this.fft}Ift(){return this.dft}wft(){return this.pft}gE(){return this.vf}Out(){return this.mft}Nut(){return this.gft}Fut(){return this.Sft}}C33.lft=class{constructor(t,s){this.Tct=s,this.Rft=[],this.Mft=new Map,this.bft=new Map,this.Gft=null,C33.pct.oft(this.Rft,t,FlowchartNodeDataItem,this);for(const e of this.Rft){const i=e.wct(),r=e.BW(),n=e.sH(),h=e.Tft();if(this.Mft.set(i,e),r)for(const a of n)this.bft.has(a)||this.bft.set(a,new Set),this.bft.get(a).add(e);h&&(this.Gft=e);const o=e.aut();for(const l of o.vft()){const c=l.wct();this.Mft.set(c,l)}}this.Gft||this.Pft()}_n(){this.Tct=null;for(const t of this.Rft)t._n();C33.qh(this.Rft),this.Rft=null}Bct(){return this.Tct}Hct(t){return this.Mft.get(t)}gut(t){if(!t||!t.length)return null;const e=[];for(const i of t.trim().split(" ")){let t=this.bft.get(i.trim())??new Set;if(0===t.size)return null;e.push(t)}const s=e.reduce((t,s)=>s.size<t.size?s:t);return[...s].filter(s=>e.every(t=>t.has(s)))[0]}Vut(){return this.Gft}*Oft(){for(const t of this.Rft)yield t}Pft(){let t=0;for(const s of this.Oft())s.Tft()&&t++;if(0===t){for(const e of this.Oft())if(e.Eft()&&!e.Tft())return void e.Aft(!0)}else{if(1===t)return;if(1<t){let t=!0;for(const i of this.Oft())i.Eft()&&(i.Tft()&&t?t=!1:i.Tft()&&!t&&i.Aft(!1))}}for(const r of this.Oft())if(r.Eft()&&r.Tft())return void(this.Gft=r)}}}{const C33=self.Bs,FLOWCHART_ID=0,NAME=1,VALUE=2,CONNECTED_FLOWCHART_NODE_FLOWCHART_ID=3;class FlowchartNodeDataOutputItem{constructor(t,s){this.yft=s,this.uft=t[FLOWCHART_ID],this.En=t[NAME],this.Qrt=t[VALUE],this.xft=t[CONNECTED_FLOWCHART_NODE_FLOWCHART_ID]}_n(){this.yft=null}aut(){return this.yft}wct(){return this.uft}pf(){return this.En}Wit(){return this.Qrt}Cut(){return this.xft}}C33._ft=class{constructor(t,s){this.Lft=s,this.Dft=[],this.Nft=new Map,C33.pct.oft(this.Dft,t,FlowchartNodeDataOutputItem,this);for(const e of this.Dft)this.Nft.set(e.pf(),e)}_n(){this.Lft=null;for(const t of this.Dft)t._n();C33.qh(this.Dft),this.Dft=null}Fft(){return this.Lft}out(){return this.Dft.length}Iut(){return this.Dft}Hut(t){return this.Nft.get(t)}*vft(){for(const t of this.Dft)yield t}}}{const C33=self.Bs;C33.$ft=class extends C33.gn{constructor(t){super(),this.kft=t,this.Bft=[],this.Bft.push(C33.yn(C33.Wft,this)),this.f1=0,this.Hft=this.Bft[0]}_n(){for(const t of this.Bft)t._n();C33.qh(this.Bft),this.Hft=null,this.kft=null}qk(){return this.kft}s$(){return this.Hft}Vft(){return this.Bft[this.f1-1]}gu(){this.s$().gu()}Uft(){const t=this.Bft,s=++this.f1;if(s===t.length){const e=C33.yn(C33.Wft,this);t.push(e),this.Hft=e}else{const i=t[s];i.vd(),this.Hft=i}}jft(){const t=this.Bft,s=++this.f1,e=(s===t.length&&t.push(C33.yn(C33.Wft,this)),t[s]);e.Kd(t[s-1]),this.Hft=e}mU(){this.Hft=this.Bft[--this.f1]}Xft(e){const i=this.Bft;for(let t=0,s=i.length;t<s;++t)i[t].Xft(e)}}}{const C33=self.Bs;C33.Wft=class extends C33.gn{constructor(t){super(),this.Bft=t,this.kft=this.Bft.qk(),this.Yft=this.kft.cN().kL(),this.qft=!0,this.r6=[],this.Kft=[]}_n(){this.zft(),this.Bft=null,this.kft=null,this.Yft=null}zft(){C33.qh(this.r6),C33.qh(this.Kft)}qk(){return this.kft}Jft(){return this.qft}Qft(){return this.qft?!!this.kft.i$():!!this.r6.length}t$(){return this.qft?this.kft.t$():this.r6}Zft(){return!!this.Kft.length}tdt(){return this.Kft}sdt(){const t=this.t$();return t.length?t:this.Kft}vd(){this.qft=!0,C33.qh(this.Kft)}gu(){this.qft=!0}Kd(t){t.Jft()?this.vd():(this.qft=!1,C33.Qh(this.r6,t.r6),C33.qh(this.Kft))}edt(t){this.r6.push(t)}idt(t){this.Kft.push(t)}rdt(t){this.qft=!!t}ndt(){return this.r6}hdt(){return this.Kft}odt(t){this.qft=!1,C33.qh(this.r6),this.r6.push(t)}adt(t){this.qft=!1,C33.Qh(this.r6,t)}ldt(t){this.qft=!1,C33.qh(this.r6);for(const s of t)this.r6.push(s)}cdt(t,s){for(const e of s)t.has(e)||this.Kft.push(e)}udt(t){for(const s of t)this.r6.push(s);C33.ho(this.Kft,t)}fdt(){C33.qh(this.Kft)}ddt(t){if(t)if(this.Yft.rU().OL().pdt()){this.Jft()&&(C33.qh(this.r6),C33.Qh(this.Kft,t.qk().t$()),this.qft=!1);const s=this.Kft.indexOf(t);-1!==s&&(this.r6.push(this.Kft[s]),this.Kft.splice(s,1))}else this.odt(t)}Xft(t){C33.ho(this.r6,t),C33.ho(this.Kft,t)}}}{const C33=self.Bs;C33.Cdt=class extends C33.gn{constructor(t){super(),this.mdt=t,this.Af=this.mdt.cN(),this.Bft=[],this.Bft.push(C33.yn(C33.gdt,this,null)),this.f1=0,this.Sdt=[]}_n(){for(const t of this.Bft)t._n();C33.qh(this.Bft),C33.qh(this.Sdt),this.mdt=null,this.Af=null}RL(){return this.mdt}cN(){return this.Af}rU(){return this.Bft[this.f1]}ydt(){return this.Bft}_dt(){return this.f1}nU(t){const s=this.Bft,e=++this.f1;if(e===s.length){const i=C33.yn(C33.gdt,this,t);return s.push(i),i}{const r=s[e];return r.vd(t),r}}mU(){--this.f1}Tdt(t){this.Sdt.push(t)}Adt(){this.Sdt.pop()}$L(){const t=this.Sdt;return 0===t.length?null:t.at(-1)}}}{const C33=self.Bs;C33.gdt=class extends C33.gn{constructor(t,s){super(),this.Bft=t,this.Af=this.Bft.cN(),this.Edt=s,this.Idt=0,this.wdt=0,this.Rdt=!1,this.Mdt=!1,this.bdt=null,this.Gdt=0,this.vdt=0,this.Pdt=null}_n(){this.vd(null),this.Bft=null,this.Af=null}vd(t){this.Edt=t,this.Idt=0,this.wdt=0,this.Rdt=!1,this.Mdt=!1,this.Pdt=null}Odt(t,s){this.Edt=t,this.Idt=0,this.wdt=s}xdt(){this.Idt=0,this.wdt=0}OL(){return this.Edt}Ldt(t){this.Edt=t}Ddt(){return this.Idt}Ndt(t){this.Idt=t}Fdt(){return this.wdt}$dt(t){this.wdt=t}kdt(t){this.Rdt=!!t}Bdt(){return this.Rdt}Wdt(t){this.Mdt=!!t}Hdt(){return this.Mdt}Vdt(t){this.bdt=t}Udt(){return this.bdt}jdt(t,s){this.Gdt=t,this.vdt=s}BL(){return this.Gdt}WL(t){this.vdt=t}Xdt(){return this.vdt}Ydt(){const t=this.Edt;return!!t.qdt()||this.Idt<t.Kdt()-1&&!!t.iU().length}zdt(t){this.Pdt=t}Jdt(){return this.Pdt}}}{const C33=self.Bs;C33.Qdt=class extends C33.gn{constructor(t){super(),this.mdt=t,this.Af=this.mdt.cN(),this.Bft=[],this.f1=-1,this.Hft=null,this.Zdt=[]}_n(){C33.qh(this.Bft),this.mdt=null,this.Af=null}t0t(t){this.Zdt=t;const s=this.Zdt.slice(0);this.Bft.push(s),this.f1=0,this.Hft=s}RL(){return this.mdt}cN(){return this.Af}s0t(){return this.Hft}nU(){const t=++this.f1,s=this.Bft;t===s.length?s.push(this.Zdt.slice(0)):C33.Qh(s[t],this.Zdt),this.Hft=s[t]}mU(){this.Hft=this.Bft[--this.f1]}}}{const C33=self.Bs;C33.e0t=class extends C33.gn{constructor(t){super(),this.mdt=t,this.Af=this.mdt.cN(),this.Bft=[],this.f1=-1}_n(){C33.qh(this.Bft),this.mdt=null,this.Af=null}RL(){return this.mdt}cN(){return this.Af}i0t(){return 0<=this.f1}s0t(){return this.Bft[this.f1]}nU(){if(++this.f1,this.f1===this.Bft.length){const t=C33.yn(C33.r0t,this);return this.Bft.push(t),t}{const s=this.Bft[this.f1];return s.vd(),s}}mU(){--this.f1}n0t(s){const e=this.Bft;for(let t=this.f1;0<=t;--t){const i=e[t];if(i.pf()===s)return i}return null}h0t(){return this.Bft.slice(0,this.f1+1)}}}{const C33=self.Bs;C33.r0t=class extends C33.gn{constructor(t){super(),this.o0t=t,this.En="",this.f1=0,this.a0t=!1,this.l0t=NaN}vd(){this.En="",this.f1=0,this.a0t=!1,this.l0t=NaN}oU(t){this.En=t}pf(){return this.En}dU(t){this.f1=t}Yx(){return this.f1}VW(){this.a0t=!0}CU(){return this.a0t}c0t(t){this.l0t=t}u0t(){return this.l0t}}}{const C33=self.Bs;C33.f0t=class extends C33.gn{constructor(){super(),this.Bft=[],this.f1=-1}_n(){C33.qh(this.Bft)}s0t(){return this.Bft[this.f1]}nU(){if(++this.f1,this.f1!==this.Bft.length)return this.Bft[this.f1];{const t=[];return this.Bft.push(t),t}}mU(){--this.f1}}}{let SortSolArray2=function(t,s){return t.Yx()-s.Yx()},IsSolArrayIdentical2=function(e,i){for(let t=0,s=e.length;t<s;++t)if(e[t]!==i[t])return!1;return!0};SortSolArray=SortSolArray2,IsSolArrayIdentical=IsSolArrayIdentical2;const C33=self.Bs,assert=self.assert;C33.d0t=class extends C33.gn{constructor(t){super(),this.Af=t,this.p0t=[],this.C0t=new Map,this.m0t=[],this.g0t=new Map,this.S0t=new Map,this.y0t=new Map,this._0t=new Map,this.T0t=new Map,this.A0t=new Map,this.E0t=0,this.I0t=[],this.w0t=[],this.R0t=[],this.M0t=new Map,this.b0t=new Map,this.Yft=C33.yn(C33.Cdt,this),this.G0t=C33.yn(C33.Qdt,this),this.o0t=C33.yn(C33.e0t,this),this.v0t=[],this.P0t=[],this.O0t=[],this.x0t=0,this.L0t=0,this.D0t=0,this.N0t=[],this.F0t=[],this.$0t=[],this.k0t=new Map,this.B0t=new Map,self.c3_callFunction=(t,s)=>this.W0t(t,s)}_n(){this.BJ(),this.Yft._n(),this.Yft=null,this.G0t._n(),this.G0t=null,C33.qh(this.P0t),C33.qh(this.O0t),this.Af=null,C33.qh(this.p0t),this.C0t.clear()}CA(t){const s=C33.yn(C33.H0t,this,t);this.p0t.push(s),this.C0t.set(s.pf().toLowerCase(),s)}V0t(t){this.v0t.push(t)}U0t(){for(const t of this.b0t.values())t.j0t();for(const s of this.M0t.values())s.U0t();for(const e of this.b0t.values())e.U0t();for(const i of this.p0t)i.U0t();for(const r of this.p0t)r.oJ();for(const n of this.v0t)n.U0t(!1);C33.qh(this.v0t),this.G0t.t0t(this.R0t)}cN(){return this.Af}hJ(t){return this.C0t.get(t.toLowerCase())||null}X0t(t){this.m0t.push(t),this.g0t.set(t.Y0t(),t)}q0t(t){this.S0t.set(t.gq(),t)}K0t(t){this.y0t.set(t.gq(),t)}z0t(t){this._0t.set(t.gq(),t)}J0t(t){switch(t.Q0t()){case 0:this.M0t.set(t.Z0t().toLowerCase(),t);break;case 1:this.b0t.set(t.Z0t().toLowerCase(),t)}}t3t(t){this.A0t.set(t.gq(),t),(t.qY()?this.I0t:this.w0t).push(t)}s3t(e){2<=e.length&&e.sort(SortSolArray2);let i=this.T0t.get(e.length);i||(i=[],this.T0t.set(e.length,i));for(let t=0,s=i.length;t<s;++t){const r=i[t];if(IsSolArrayIdentical2(e,r))return r}return i.push(e),e}e3t(t){return this.R0t.push(t.i3t()),this.E0t++}kL(){return this.Yft}r3t(){return this.kL().rU()}OL(){return this.r3t().OL()}n3t(){const t=this.r3t(),s=t.OL();return s.h3t(t.Ddt())}o3t(){const t=this.r3t(),s=t.OL();return s.a3t(t.Fdt())}l3t(){return this.G0t}hU(){return this.o0t}c3t(t){const s=[];for(t=t.u3t();t;)C33.an(s,t.f3t()),t=t.u3t();return s}d3t(t){const s={};for(const e of this.c3t(t))s[e.p3t()]=e.C3t();return Object.create(Object.prototype,s)}m3t(t){return this.A0t.get(t)||null}g3t(t){return this.S0t.get(t)||null}S3t(t){return this.y0t.get(t)||null}y3t(t){return this._0t.get(t)||null}ML(t){return this.M0t.get(t.toLowerCase())||null}_3t(t,s){let e=this.b0t.get((t.pf()+"."+s).toLowerCase());if(e)return e;if(!t.aq())for(const i of t.T3t())if(e=this.b0t.get((i.pf()+"."+s).toLowerCase()))return e;return null}A3t(){return this.I0t}E3t(){return this.w0t}I3t(t){for(const s of this.I0t)s.w3t();if(t)for(const e of this.w0t)e.ST()&&e.w3t()}R3t(t){return this.g0t.get(t.toLowerCase())||null}M3t(t){const s=this.S0t.get(t);return s&&s.b3t()?s:null}G3t(){return this.m0t}v3t(){for(const t of this.m0t)t.P3t()}O3t(){for(const t of this.p0t)t.x3t()}L3t(t){this.O3t(),this.x0t++;for(const s of t.E7()){const e=s.xz();e&&(this.Af.D3t(s),e.Bw(),this.Af.N3t())}this.x0t--}async F3t(t){this.O3t(),this.x0t++;for(const s of this.$3t(t))await this.Af.k3t(s);this.x0t--}*$3t(t){for(const s of t.E7()){const e=s.xz();e&&(this.Af.D3t(s),yield*e.B3t(),this.Af.N3t())}}W3t(t,s,e,i){let r=!1;if(!t.AD())return this.H3t(s,e,i);this.L0t++;for(const n of t.E7()){const h=n.xz();if(h){this.Af.D3t(n);for(const a of h.V3t()){const l=a.W3t(s,e,i);r=r||l}const o=h.W3t(s,e,i);r=r||o,this.Af.N3t()}}return this.L0t--,r}*U3t(t,s,e,i){let r=!1;if(!t.AD())return this.H3t(s,e,i);this.L0t++;for(const n of t.E7()){const h=n.xz();if(h){this.Af.D3t(n);for(const a of h.V3t()){const l=yield*a.U3t(s,e,i);r=r||l}const o=yield*h.U3t(s,e,i);r=r||o,this.Af.N3t()}}return this.L0t--,r}H3t(t,s,e){return this.P0t.push([t,s,e]),!1}j3t(t,s,e){let i=null,r=new Promise(t=>i=t);return this.O0t.push([t,s,e,i]),r}*X3t(){if(this.Af.Y3t())throw new Error("should not be in breakpoint");const t=this.Af.wD();for(;this.O0t.length;){const[s,e,i,r]=this.O0t.shift(),n=yield*this.U3t(t,s,e,i);r(n)}}async q3t(){for(const t of this.X3t())await this.Af.k3t(t)}K3t(t,e,i,r){let n=!1,s=t.AD(),h=s.xz();if(h){this.L0t++,this.Af.D3t(s);const o=h.V3t();for(let t=0,s=o.length;t<s;++t){const l=o[t].K3t(e,i,r);n=n||l}const a=h.K3t(e,i,r);return n=n||a,this.Af.N3t(),this.L0t--,n}}*z3t(t,e,i,r){let n=!1,s=t.AD(),h=s.xz();if(h){this.L0t++,this.Af.D3t(s);const o=h.V3t();for(let t=0,s=o.length;t<s;++t){const l=yield*o[t].z3t(e,i,r);n=n||l}const a=yield*h.z3t(e,i,r);return n=n||a,this.Af.N3t(),this.L0t--,n}}J3t(){return this.L0t}Q3t(){return 0<this.J3t()}Z3t(){return++this.L0t}tpt(){--this.L0t}spt(){return 0<this.x0t}l$(){return this.spt()||this.Q3t()}vJ(t){for(const[s,e,i]of this.P0t)this.W3t(t,s,e,i);C33.qh(this.P0t)}o$(t){t?this.D0t++:this.D0t--}sB(){return 0<this.D0t}ept(e){for(let t=0,s=e.length;t<s;++t)e[t].ipt().gu()}rpt(e){for(let t=0,s=e.length;t<s;++t)e[t].ipt().Uft()}cU(e){for(let t=0,s=e.length;t<s;++t)e[t].ipt().jft()}fU(e){for(let t=0,s=e.length;t<s;++t)e[t].ipt().mU()}xL(s){const e=new Set,i=this.Yft.ydt(),r=this.Yft._dt();for(let t=0;t<=r;++t){const n=i[t].Jdt();if(n)for(const h of n)s&&s.has(h)||e.add(h)}return e}npt(t){const s=new Set([...t]),e=this.xL(s);if(0<e.size){for(const i of e)i.ipt().Uft();return[...e]}return null}hpt(){const t=C33.yn(C33.opt,this);return this.N0t.push(t),t}apt(){return this.N0t}lpt(){if(this.N0t.length){let e=this.r3t(),i=!1;this.x0t++;for(let t=0,s=this.N0t.length;t<s;++t){const r=this.N0t[t];r.cpt()&&r.upt(e),r.fpt()&&(i=!0)}i&&(this.dpt(),e.vd(null)),this.x0t--}}async ppt(){if(this.N0t.length){let e=this.r3t(),i=!1;this.x0t++;for(let t=0,s=this.N0t.length;t<s;++t){const r=this.N0t[t];r.cpt()&&await r.Cpt(e),r.fpt()&&(i=!0)}i&&(this.dpt(),e.vd(null)),this.x0t--}}dpt(){const t=C33.no(this.N0t,t=>t.fpt());for(const s of t)s._n()}BJ(){for(const t of this.N0t)t._n();C33.qh(this.N0t)}mpt(t){for(const s of this.N0t)s.Xft(t);for(const e of t){const i=this.B0t.get(e);if(this.B0t.delete(e),i)for(const{resolve:r}of i.gpt.values())r(!0)}}Spt(t){this.F0t.push({promise:t,ypt:this.J3t()})}_pt(){C33.qh(this.F0t)}Tpt(){const s=this.J3t();this.F0t=this.F0t.filter(t=>t.ypt<=s)}Apt(){const t=Promise.all(this.F0t.map(t=>t.promise));return this.F0t=[],t}HL(t){const s=t.toLowerCase();this.$0t.push(s),this.Af.LB(C33.GJ.bJ.MJ.Ept,null),this.$0t.pop();for(const i of this.Af.RL().apt())i.Ipt()&&i.wpt()===s&&i.Rpt();const e=this.k0t.get(s);e&&(e.resolve(),this.k0t.delete(s))}UL(t){const e=t.toLowerCase(),s=this.k0t.get(e);if(s)return s.promise;{let s=null,t=new Promise(t=>s=t);return this.k0t.set(e,{promise:t,resolve:s}),t}}Mpt(){if(0===this.$0t.length)throw new Error("not in a signal");return this.$0t.at(-1)}bpt(t){let s=this.B0t.get(t);return s||(s={Gpt:[],gpt:new Map},this.B0t.set(t,s)),s}_B(t,s){const e=this.bpt(t),i=s.toLowerCase();e.Gpt.push(i),this.Af.LB(t.UF().Ppt().MJ.vpt,t),e.Gpt.pop();for(const n of this.Af.RL().apt())n.Opt()&&n.wpt()===i&&n.xpt(t);const r=e.gpt.get(i);r&&(r.resolve(!1),e.gpt.delete(i)),0===e.Gpt.length&&0===e.gpt.size&&this.B0t.delete(t)}TB(t,s){const e=this.bpt(t),i=s.toLowerCase(),r=e.gpt.get(i);if(r)return r.promise;{let s=null,t=new Promise(t=>s=t);return e.gpt.set(i,{promise:t,resolve:s}),t}}Lpt(t){const s=this.bpt(t);if(s&&0!==s.Gpt.length)return s.Gpt.at(-1);throw new Error("not in a signal")}D8(){return{groups:this.Dpt(),cnds:this.Npt(),acts:this.Fpt(),vars:this.$pt(),waits:this.kpt()}}N8(t){this.Bpt(t.groups),this.Wpt(t.cnds),this.Hpt(t.acts),this.Vpt(t.vars),this.Upt(t.waits)}Dpt(){const t={};for(const s of this.G3t())t[s.gq().toString()]=s.jpt();return t}Bpt(t){for(const[s,e]of Object.entries(t)){const i=parseInt(s,10),r=this.M3t(i);r&&r.Xpt(e)}}Npt(){const t={};for(const[s,e]of this.y0t){const i=e.D8();i&&(t[s.toString()]=i)}return t}Wpt(t){const s=new Map;for(const[e,i]of Object.entries(t))s.set(parseInt(e,10),i);for(const[r,n]of this.y0t)n.N8(s.get(r)||null)}Fpt(){const t={};for(const[s,e]of this._0t){const i=e.D8();i&&(t[s.toString()]=i)}return t}Hpt(t){const s=new Map;for(const[e,i]of Object.entries(t))s.set(parseInt(e,10),i);for(const[r,n]of this._0t)n.N8(s.get(r)||null)}$pt(){const t={};for(const[s,e]of this.A0t)e.Ypt()||!e.qY()&&!e.ST()||(t[s.toString()]=e.Wit());return t}Vpt(t){for(const[s,e]of Object.entries(t)){const i=parseInt(s,10),r=this.m3t(i);r&&r.Art(e)}}kpt(){return this.N0t.filter(t=>!t.qpt()).map(t=>t.D8())}Upt(t){this.BJ();for(const s of t){const e=C33.opt.Kpt(this,s);e&&this.N0t.push(e)}}zpt(){return[...this.Af.wD().E7()].map(t=>t.xz()).filter(t=>t).map(t=>t.Jpt())}Qpt(t){for(;t;){const s=t.u3t();if(s instanceof C33.Zpt)return s;t=s}return null}W0t(t,s){Array.isArray(s)||(s=[]);const e=this.ML(t.toLowerCase());if(!e)return null;if(!e.pu())return e.bL();const i=e.tCt();if(s.length<i.length)for(s=s.slice(0);s.push(i[s.length].i3t()),s.length<i.length;);const r=e.vL();return r.LL(r.PL(),!1,e.NL(),e.bL(),...s)}}}{const C33=self.Bs;C33.H0t=class extends C33.gn{constructor(t,s){super(),this.mdt=t,this.Af=t.cN(),this.En=s[0],this.sCt=[],this.eCt=new Map,this.iCt=new Map,this.rCt=new Map,this.nCt=!1,this.hCt=[],this.oCt=[],this.aCt=new Set;for(const e of s[1])this.lCt(e,null,this.sCt);this.cCt=this.Af.UB()?{type:"sheet",name:this.En,uCt:0,children:[]}:null}_n(){this.mdt=null,this.Af=null}lCt(t,s,e){switch(t[0]){case 0:case 3:this.fCt(t,s,e);break;case 1:this.dCt(t,s,e);break;case 2:this.pCt(t,s,e);break;case 4:this.CCt(t,s);break;case 5:this.mCt(t,s,e);break;case 6:this.gCt(t,s);break;default:throw new Error("invalid event type")}}fCt(t,s,e){const i=C33.SCt.CA(this,s,t);if(i.pdt()){e.push(i);const r=i.yCt();for(let t=0,s=r.length;t<s;++t)r[t]._Ct()&&this.TCt(i,t)}else i._Ct()?this.TCt(i,0):e.push(i)}CCt(t,s){const e=C33.Zpt.ACt(this,s,t);this.mdt.J0t(e)}gCt(t,s){const e=C33.Zpt.ECt(this,s,t);this.mdt.J0t(e)}dCt(t,s,e){const i=C33.ICt.CA(this,s,t);e.push(i)}pCt(t,s,e){const i=C33.wCt.CA(this,s,t);e.push(i)}mCt(t,s,e){const i=C33.RCt.CA(this,s,t);e.push(i)}TCt(r,n){r.pdt()||this.mdt.V0t(r);const h=r.h3t(n),o=h.MCt(),a=h.qk();if(h.bCt()){let t=this.iCt.get(a),s=(t||(t=new Map,this.iCt.set(a,t)),h.GCt().toLowerCase()),e=t.get(o),i=(e||(e=new Map,t.set(o,e)),e.get(s));i||(i=[],e.set(s,i)),i.push([r,n])}else{let t=this.eCt.get(a),s=(t||(t={vCt:new Map,PCt:new Map},this.eCt.set(a,t)),h.Y5()),e,i=(s?(e=t.PCt.get(s))||(e=new Map,t.PCt.set(s,e)):e=t.vCt,e.get(o));i||(i=[],e.set(o,i)),i.push([r,n])}}U0t(){const e=this.sCt;for(let t=0,s=e.length;t<s;++t){const i=t<s-1&&e[t+1]instanceof C33.SCt&&e[t+1].OCt();e[t].U0t(i)}}xCt(t){this.hCt.push(t)}oJ(){C33.qh(this.oCt),this.LCt(this),this.aCt.clear()}LCt(t){const s=t.oCt,e=t.aCt;for(const i of this.hCt){const r=i.DCt();i.NCt()&&t!==r&&!e.has(r)&&(e.add(r),r.LCt(t),s.push(r))}}V3t(){return this.oCt}RL(){return this.mdt}cN(){return this.Af}pf(){return this.En}FCt(t,s){this.rCt.set(s,t)}$Ct(t){return this.rCt.get(t)||null}x3t(){this.nCt=!1}Bw(){if(!this.nCt){const t=this.Af,s=t.kCt(),e=s?performance.now():0,i=(this.nCt=!0,this.RL()),r=i.r3t();for(const n of this.sCt)n.Bw(r),i.ept(n.iU()),i._pt(),t.u$();r.vd(null),s&&(this.cCt.uCt+=performance.now()-e)}}*B3t(){if(!this.nCt){this.nCt=!0;const t=this.Af,s=this.RL(),e=s.r3t();for(const i of this.sCt)yield*i.B3t(e),s.ept(i.iU()),s._pt(),t.u$();e.vd(null)}}W3t(i,r,n){if(!r)return this.BCt(i,r,null,null);{let t=r.qk(),s=!1,e=this.BCt(i,r,t,n);s=s||e;for(const h of t.T3t())e=this.BCt(i,r,h,n),s=s||e}}BCt(t,s,e,i){const r=this.eCt.get(e);if(!r)return!1;const n=i?r.PCt.get(i):r.vCt;if(!n)return!1;const h=n.get(t);if(!h)return!1;let o=!1;for(const[a,l]of h){const c=this.WCt(s,a,l);o=o||c}return o}*U3t(i,r,n){if(!r)return yield*this.HCt(i,r,null,null);{let t=r.qk(),s=!1,e=yield*this.HCt(i,r,t,n);s=s||e;for(const h of t.T3t())e=yield*this.HCt(i,r,h,n),s=s||e}}*HCt(t,s,e,i){const r=this.eCt.get(e);if(!r)return!1;const n=i?r.PCt.get(i):r.vCt;if(!n)return!1;const h=n.get(t);if(!h)return!1;let o=!1;for(const[a,l]of h){let t;t=a.VCt()?this.WCt(s,a,l):yield*this.UCt(s,a,l),o=o||t}return o}K3t(t,s,e){const i=s.qk(),r=this.iCt.get(i);if(!r)return!1;const n=r.get(t);if(!n)return!1;const h=n.get(e);if(!h)return!1;let o=!1;for(let t=0,s=h.length;t<s;++t){const a=h[t],l=this.WCt(null,a[0],a[1]);o=o||l}return o}*z3t(t,s,e){const i=s.qk(),r=this.iCt.get(i);if(!r)return!1;const n=r.get(t);if(!n)return!1;const h=n.get(e);if(!h)return!1;let o=!1;for(let r=0,t=h.length;r<t;++r){let t=h[r],s=t[0],e=t[1],i;i=s.VCt()?this.WCt(null,s,e):yield*this.UCt(null,s,e),o=o||i}return o}WCt(t,s,e){let i=this.Af,r=this.mdt,n=r.OL(),h=r.kL(),o=r.J3t(),a=!1;n&&r.rpt(n.PL()),r.rpt(s.PL());const l=1<o,c=(l&&r.l3t().nU(),h.nU(s));if(t){const f=s.yCt()[e].qk(),d=f.s$();d.odt(t),t.nB()&&t.jCt()}let u=!0;if(s.H4()){const p=s.XCt();for(let t=0,s=p.length;t<s;++t)if(!p[t].YCt(c)){u=!1;break}}return u&&(s.pdt()?s.qCt(c,e):s.Bw(c),a=c.Bdt()),h.mU(),l&&r.l3t().mU(),r.fU(s.PL()),n&&r.fU(n.PL()),n||1!==o||(r._pt(),r.sB())||i.u$(),a}*UCt(t,s,e){let i=this.Af,r=this.mdt,n=r.OL(),h=r.kL(),o=r.J3t(),a=!1;n&&r.rpt(n.PL()),r.rpt(s.PL());const l=1<o,c=(l&&r.l3t().nU(),h.nU(s));if(t){const f=s.yCt()[e].qk(),d=f.s$();d.odt(t),t.nB()&&t.jCt()}let u=!0;if(s.H4()){const p=s.XCt();for(let t=0,s=p.length;t<s;++t)if(!(yield*p[t].KCt(c))){u=!1;break}}return u&&(s.pdt()?yield*s.zCt(c,e):yield*s.B3t(c),a=c.Bdt()),h.mU(),l&&r.l3t().mU(),r.fU(s.PL()),n&&r.fU(n.PL()),n||1!==o||(r._pt(),r.sB())||i.u$(),a}Jpt(){return this.cCt}}}{let NoActions2=function(t,s){return!0};NoActions=NoActions2;const C33=self.Bs,EMPTY_ARRAY=[];function*DebugNoActions(t,s){return!0}C33.SCt=class extends C33.gn{constructor(t,s,e){super(),this.z8=t,this.Af=t.cN(),this.JCt=s,this.QCt=null,this.Yft=this.Af.RL().kL(),this.ZCt=[],this.tmt=[],this.smt=!1,this.emt=!1,this.imt=!1,this.rmt=!1,this.nmt=!!e[2],this.hmt=!1,this.omt=null,this.amt=[],this.ent=[],this.lmt=[],this.cmt=NoActions2,this.umt=DebugNoActions,this.fmt=!1,this.dmt=!1,this.pmt="",this.Cmt=!1,this.mmt=null,this.cCt=null,this.N6=e[4],this.gmt=e[5],this.z8.FCt(this,this.gmt),this.Smt=this.Af.UB()?{ymt:e[3][0],_mt:e[3][1],Tmt:!1,Amt:!1,Emt:!1,Imt:!1}:null,this.RL().q0t(this),3===e[0]&&this.wmt(e[1]);let i=0;for(const r of e[6]){const n=C33.Rmt.CA(this,r,i++);this.amt.push(n),this.Mmt(n.qk())}i=0;for(const h of e[7]){const o=C33.bmt.CA(this,h,i++);this.ent.push(o)}if(9===e.length){const a=e[8];for(const l of a)this.z8.lCt(l,this,this.lmt)}this.amt.length&&(this.hmt=null===this.amt[0].qk()&&this.amt[0].MCt()===C33.GJ.bJ.MJ.Gmt),0===this.amt.length&&(this.amt=EMPTY_ARRAY),0===this.ent.length&&(this.ent=EMPTY_ARRAY),0===this.lmt.length&&(this.lmt=EMPTY_ARRAY)}static CA(t,s,e){return C33.yn(C33.SCt,t,s,e)}wmt(t){this.fmt=!0,this.dmt=!!t[0],this.Cmt=this.dmt,this.pmt=t[1].toLowerCase(),this.mmt=[],this.RL().X0t(this),this.Af.UB()&&(this.cCt={type:"group",name:t[1],uCt:0,children:[]})}vmt(t){this.mmt.push(t)}Pmt(t,s){for(const e of t.Yz().OJ())s.includes(e)||s.push(e)}Omt(t,s){if(t)if(s.includes(t)||s.push(t),t.aq())for(const e of t.xmt())e.nB()&&this.Pmt(e,s);else t.nB()&&this.Pmt(t,s)}Mmt(t){this.Omt(t,this.ZCt)}Lmt(t){this.Omt(t,this.tmt)}Dmt(){this.ZCt=this.Af.oq()}U0t(t){this.rmt=!!t,this.Nmt(),this.Fmt();for(const s of this.amt)s.U0t();if(0<this.ent.length){let t=!1;for(const i of this.ent)i.U0t(),i.$mt()&&(t=!0);t?(this.cmt=this.kmt,this.umt=this.Bmt):(this.cmt=this.Wmt,this.umt=this.Hmt)}const e=this.lmt;for(let t=0,s=e.length;t<s;++t){const r=t<s-1&&e[t+1]instanceof C33.SCt&&e[t+1].OCt();e[t].U0t(r)}this.Smt&&this.Vmt(),this.cCt&&this.Umt().Jpt().children.push(this.cCt)}Jpt(){return this.cCt}Umt(){let t=this.H4();for(;t;){if(t.b3t())return t;t=t.H4()}return this.z8}Vmt(){const t=this.Smt;t.Tmt=this.amt.every(t=>t.VCt()),t.Amt=this.ent.every(t=>t.VCt()),t.Emt=this.lmt.every(t=>t.VCt()),t.Imt=t.Tmt&&t.Amt&&t.Emt}jmt(){let t=this;for(;t.Vmt(),t=t.H4(););}Nmt(){if(this.b3t()){let t=this.H4();for(this.imt=!0;t;){if(!t.b3t()){this.imt=!1;break}t=t.H4()}}}Xmt(){const t=this.Af.oq();if(this.ZCt===t)this.tmt=t;else{this.tmt=C33.co(this.ZCt);let t=this.H4();for(;t;){for(const e of t.ZCt)this.Lmt(e);t=t.H4()}const s=this.RL();this.ZCt=s.s3t(this.ZCt),this.tmt=s.s3t(this.tmt)}}Fmt(){if(this.Ymt()){this.omt=[];let t=this.H4();for(;t;)this.omt.push(t),t=t.H4();this.omt.reverse()}}qmt(){this.emt=!0,this.JCt&&this.JCt.qmt()}qdt(){return this.emt}iU(){return this.ZCt}PL(){return this.smt||(this.smt=!0,this.Xmt()),this.tmt}Kmt(t){return this.ZCt.includes(t)}XCt(){return this.omt}xz(){return this.z8}RL(){return this.z8.RL()}cN(){return this.Af}H4(){return this.JCt}zmt(t){this.QCt=t}u3t(){return this.QCt||this.JCt}Jmt(){return this.gmt}Qmt(){return this.Smt&&this.Smt._mt}Zmt(){return this.Qmt()&&this.Smt.ymt}t1t(t){this.Smt.ymt=!!t,this.jmt()}b3t(){return this.fmt}s1t(){return this.imt}OCt(){return this.hmt}e1t(){return this.rmt}Y0t(){return this.pmt}jpt(){return this.Cmt}P3t(){this.Xpt(this.dmt)}Xpt(t){if(t=!!t,!this.fmt)throw new Error("not a group");if(this.Cmt!==t){this.Cmt=t;for(const s of this.mmt)s.i1t();if(this.mmt.length){const e=this.Af.HD(),i=e.xz();i&&i.oJ()}}}gq(){return this.N6}pdt(){return this.nmt}_Ct(){return this.amt.length&&this.amt[0]._Ct()}r1t(){return this.QCt&&this.QCt instanceof C33.Zpt}Ymt(){return this.r1t()||this.amt.some(t=>t._Ct())}yCt(){return this.amt}Kdt(){return this.amt.length}h3t(t){if((t=Math.floor(t))<0||t>=this.amt.length)throw new RangeError("invalid condition index");return this.amt[t]}n1t(t){return this.h3t(t)}h1t(t){let s=t.Yx();if(0!==s){--s;const e=t.o1t()?t.a1t():t.qk();for(;0<=s;--s){const i=this.amt[s];if(e===i.qk()||i.o1t()&&i.a1t()===e)return!1}}return!0}l1t(){return this.ent}c1t(){return this.ent.length}a3t(t){if((t=Math.floor(t))<0||t>=this.ent.length)throw new RangeError("invalid action index");return this.ent[t]}u1t(s){s=Math.floor(s);const t=this.ent.find(t=>t.f1t()===s);if(t)return t;throw new RangeError("invalid action debug index")}d1t(t){return 0<=(t=Math.floor(t))&&t<this.ent.length}p1t(){return this.lmt}f3t(){return this.lmt.filter(t=>t instanceof C33.ICt)}YCt(e){e.Ldt(this);let i=this.amt,r=0===i.length;for(let t=0,s=i.length;t<s;++t){const n=i[t];if(e.Ndt(t),n.hW())throw new Error("trigger cannot be used as sub-event to a loop");if(n.Bw())r=!0;else if(!this.nmt)return!1}return!this.nmt||r}qCt(t,s){t.Ldt(this),t.Ndt(s),this.amt[s].Bw()&&(this.cmt(t,0)&&this.C1t(t),t.kdt(!0))}*KCt(e){e.Ldt(this);let i=this.amt,r=0===i.length;for(let t=0,s=i.length;t<s;++t){const n=i[t];if(e.Ndt(t),n.hW())throw new Error("trigger cannot be used as sub-event to a loop");if(n.VCt()?n.Bw():yield*n.B3t())r=!0;else if(!this.nmt)return!1}return!this.nmt||r}*zCt(t,s){t.Ldt(this),t.Ndt(s);let e=this.amt[s];if(e.VCt()?e.Bw():yield*e.B3t())(this.m1t()?this.cmt(t,0):yield*this.umt(t,0))&&(this.g1t()?this.C1t():yield*this.S1t()),t.kdt(!0)}Bw(t){t.Ldt(this),this.hmt||t.Wdt(!1),this.nmt?this.y1t(t):this._1t(t)}*B3t(t){(this.Zmt()||this.Af.T1t())&&(yield this),t.Ldt(this),this.hmt||t.Wdt(!1),this.nmt?yield*this.A1t(t):yield*this.E1t(t)}y1t(e){let i=this.amt,r=0===i.length;for(let t=0,s=i.length;t<s;++t){const n=i[t];if(!n._Ct()){e.Ndt(t);const h=n.Bw();r=r||h}}e.kdt(r),r&&(this.cmt(e,0)&&this.C1t(e),this.rmt)&&e.Wdt(!0)}*A1t(e){let i=this.amt,r=0===i.length;for(let s=0,t=i.length;s<t;++s){const n=i[s];if(!n._Ct()){e.Ndt(s);let t;t=n.VCt()?n.Bw():yield*n.B3t(),r=r||t}}if(e.kdt(r),r)(this.m1t()?this.cmt(e,0):yield*this.umt(e,0))&&(this.g1t()?this.C1t():yield*this.S1t()),this.rmt&&e.Wdt(!0)}_1t(e){const i=this.amt;for(let t=0,s=i.length;t<s;++t){const r=i[t],n=(e.Ndt(t),r.Bw());if(!n)return void e.kdt(!1)}e.kdt(!0),this.cmt(e,0)&&this.C1t(e),e.Bdt()&&this.rmt&&e.Wdt(!0)}*E1t(e){const i=this.amt;for(let t=0,s=i.length;t<s;++t){const r=i[t];e.Ndt(t);if(!(r.VCt()?r.Bw():yield*r.B3t()))return void e.kdt(!1)}e.kdt(!0);(this.m1t()?this.cmt(e,0):yield*this.umt(e,0))&&(this.g1t()?this.C1t():yield*this.S1t()),e.Bdt()&&this.rmt&&e.Wdt(!0)}Wmt(e,i){const r=this.ent;for(let t=i,s=r.length;t<s;++t){const n=r[t];e.$dt(t),n.Bw()}return!0}*Hmt(e,i){const r=this.ent;for(let t=i,s=r.length;t<s;++t){const n=r[t];e.$dt(t),n.VCt()?n.Bw():yield*n.B3t()}return!0}kmt(e,i){const r=this.RL(),n=this.ent;for(let t=i,s=n.length;t<s;++t){const h=n[t],o=(e.$dt(t),h.Bw());if(h.I1t()&&!0===o)return!1;h.w1t()&&o instanceof Promise&&r.Spt(o)}return!0}*Bmt(e,i){const r=this.RL(),n=this.ent;for(let s=i,t=n.length;s<t;++s){const h=n[s];e.$dt(s);let t;if(t=h.VCt()?h.Bw():yield*h.B3t(),h.I1t()&&!0===t)return!1;h.w1t()&&t instanceof Promise&&r.Spt(t)}return!0}R1t(t){this.cmt(t,t.Fdt())&&this.C1t()}*M1t(t){(yield*this.umt(t,t.Fdt()))&&(yield*this.S1t())}C1t(){if(this.lmt.length){const t=this.b3t()&&this.Af.kCt(),s=t?performance.now():0,e=this.Yft,i=e.nU(this);this.emt?this.b1t(i):this.G1t(i),e.mU(),t&&(this.cCt.uCt+=performance.now()-s)}}b1t(i){const r=this.fmt,n=this.imt,h=this.RL(),o=this.lmt;for(let t=0,s=o.length,e=s-1;t<s;++t){const a=o[t],l=a.iU(),c=!n||!r&&t<e;c&&h.cU(l),a.Bw(i),c?h.fU(l):h.ept(l)}}G1t(e){const i=this.lmt;for(let t=0,s=i.length;t<s;++t)i[t].Bw(e)}*S1t(){if(this.lmt.length){const t=this.Yft,s=t.nU(this);this.emt?yield*this.v1t(s):yield*this.P1t(s),t.mU()}}*v1t(i){const r=this.fmt,n=this.imt,h=this.RL(),o=this.lmt;for(let t=0,s=o.length,e=s-1;t<s;++t){const a=o[t],l=a.iU(),c=!n||!r&&t<e;c&&h.cU(l),yield*a.B3t(i),c?h.fU(l):h.ept(l)}}*P1t(e){const i=this.lmt;for(let t=0,s=i.length;t<s;++t)yield*i[t].B3t(e)}uU(e,i){i.xdt();const r=this.amt;if(!this.pdt())for(let t=e.Ddt()+1,s=r.length;t<s;++t){const n=r[t],h=(i.Ndt(t),n.Bw());if(!h)return!1}return this.cmt(i,0)&&this.C1t(i),!0}*O1t(e,i){i.xdt();const r=this.amt;if(!this.pdt())for(let t=e.Ddt()+1,s=r.length;t<s;++t){const n=r[t];i.Ndt(t);if(!(n.VCt()?n.Bw():yield*n.B3t()))return!1}return(this.m1t()?this.cmt(i,0):yield*this.umt(i,0))&&(this.g1t()?this.C1t():yield*this.S1t()),!0}VCt(){return!this.Zmt()&&!this.Af.T1t()&&this.Smt.Imt}m1t(){return!this.Af.T1t()&&this.Smt.Amt}g1t(){return!this.Af.T1t()&&this.Smt.Emt}x1t(e){if(this.H4()){const i=this.XCt();for(let t=0,s=i.length;t<s;++t)if(!i[t].YCt(e))return!1}return!0}*L1t(e){if(this.H4()){const i=this.XCt();for(let t=0,s=i.length;t<s;++t)if(!(yield*i[t].KCt(e)))return!1}return!0}D1t(t,s,e){if(0<s.length)if(e){const i=s.map(t=>t.oe(0));t.l3t().nU(),this.QCt.N1t(i)}else this.QCt.F1t(s);else e&&t.l3t().nU()}$1t(t,s,e,i){let r,n,h=0<t.length,o=null,a=this.Af,l=this.Yft,c=a.RL(),u=this.QCt,f=u.w1t(),d=c.Z3t(),p=1<d;if(this.D1t(c,s,p),h&&(e?c.cU(t):c.rpt(t)),null!==i){if(i.k1t){const m=e?i.k1t.s$():i.k1t.ipt().Vft(),g=i.B1t.s$();g.adt(m.t$()),g.fdt(),e||i.B1t.W1t()}else if(i.H1t){const S=i.H1t.s$();S.adt(i.V1t),S.fdt()}i.U1t&&(o=c.npt(t))}const C=l.nU(this);return e&&C.zdt(t),this.x1t(C)&&(C.Ldt(this),f&&([n,r]=u.j1t()),this._1t(C),f)&&u.X1t(n),l.mU(),p&&c.l3t().mU(),null!==o&&c.fU(o),h&&c.fU(t),c.tpt(),f||c.Tpt(),r}*Y1t(t,s,e,i){let r,n,h=((this.Zmt()||this.Af.T1t())&&(yield this),0<t.length),o=null,a=this.Af,l=this.Yft,c=a.RL(),u=this.QCt,f=u.w1t(),d=c.Z3t(),p=1<d;if(this.D1t(c,s,p),h&&(e?c.cU(t):c.rpt(t)),null!==i){if(i.k1t){const m=e?i.k1t.s$():i.k1t.ipt().Vft(),g=i.B1t.s$();g.adt(m.t$()),g.fdt(),e||i.B1t.W1t()}else if(i.H1t){const S=i.H1t.s$();S.adt(i.V1t),S.fdt()}i.U1t&&(o=c.npt(t))}const C=l.nU(this);return e&&C.zdt(t),(yield*this.L1t(C))&&(C.Ldt(this),f&&([n,r]=u.j1t()),yield*this.E1t(C),f)&&u.X1t(n),l.mU(),p&&c.l3t().mU(),null!==o&&c.fU(o),h&&c.fU(t),c.tpt(),f||c.Tpt(),r}q1t(t,s){const e=this.PL(),i=0<e.length,r=this.Af,n=this.Yft,h=r.RL(),o=h.Z3t(),a=1<o,l=(a&&h.l3t().nU(),this.QCt.N1t(t),i&&(s?h.cU(e):h.rpt(e)),n.nU(this));this.x1t(l)&&(l.Ldt(this),this._1t(l)),n.mU(),a&&h.l3t().mU(),i&&h.fU(e),h.tpt(),h.Tpt()}*K1t(t,s){(this.Zmt()||this.Af.T1t())&&(yield this);const e=this.PL(),i=0<e.length,r=this.Af,n=this.Yft,h=r.RL(),o=h.Z3t(),a=1<o,l=(a&&h.l3t().nU(),this.QCt.N1t(t),i&&(s?h.cU(e):h.rpt(e)),n.nU(this));(yield*this.L1t(l))&&(l.Ldt(this),yield*this.E1t(l)),n.mU(),a&&h.l3t().mU(),i&&h.fU(e),h.tpt(),h.Tpt()}LL(t,s,e,i,...r){let n,h,o=0<t.length,a=this.Af,l=this.Yft,c=a.RL(),u=this.QCt,f=u.w1t(),d=c.Z3t(),p=1<d,C=(p&&c.l3t().nU(),0<r.length&&this.QCt.N1t(r),o&&(s?c.cU(t):c.rpt(t)),l.nU(this));return C.jdt(e,i),l.Tdt(C),a.aU(!1),this.x1t(C)&&(C.Ldt(this),f&&([h,n]=u.j1t()),this._1t(C),f)&&u.X1t(h),a.aU(!0),l.mU(),l.Adt(),p&&c.l3t().mU(),o&&c.fU(t),c.tpt(),f||c.Tpt(),n||C.Xdt()}}}{let C33=self.Bs,EMPTY_SOL_MODIFIERS=[],hadUserScriptException=!1;C33.RCt=class extends C33.gn{constructor(t,s,e){super();const i=t.cN(),r=t.RL(),n=(this.z8=t,this.mdt=r,this.Af=t.cN(),this.JCt=s,i.z1t(e[1]));this.J1t=n,this.gmt=e[2],this.z8.FCt(this,this.gmt),this.Smt=i.UB()?{ymt:e[3][0],_mt:e[3][1]}:null}static CA(t,s,e){return C33.yn(C33.RCt,t,s,e)}U0t(){const t=this.J1t,s=this.Af.RL().d3t(this);this.J1t=t.bind(null,this.Af.mF(),s)}H4(){return this.JCt}u3t(){return this.JCt}xz(){return this.z8}Jmt(){return this.gmt}Qmt(){return this.Smt&&this.Smt._mt}Zmt(){return this.Qmt()&&this.Smt.ymt}t1t(t){this.Smt.ymt=!!t}OCt(){return!1}iU(){return EMPTY_SOL_MODIFIERS}PL(){return this.JCt?this.JCt.PL():EMPTY_SOL_MODIFIERS}Bw(t){t.Ldt(this),this.mdt.Spt(this.Q1t())}async Q1t(){try{await this.J1t()}catch(t){console.error(`Unhandled exception running script %c${this.xz().pf()}, event ${this.Jmt()}:`,"font-size: 1.2em; font-weight: bold;",t),self.C3Debugger&&self.C3Debugger._SetLastErrorScript(this),hadUserScriptException||(console.info("%cTip:%c run this to highlight in Construct the last script that had an error: %cgoToLastErrorScript()","font-weight: bold; text-decoration: underline","","font-weight: bold"),hadUserScriptException=!0)}}*B3t(t){t.Ldt(this),(this.Zmt()||this.Af.T1t())&&(yield this),this.Bw(t)}VCt(){return!this.Zmt()&&!this.Af.T1t()}static Z1t(){return hadUserScriptException}static t2t(){hadUserScriptException=!0}}}{const C33=self.Bs,assert=self.assert;C33.Zpt=class extends C33.gn{constructor(t,s,e){super(),this.z8=t,this.Af=t.cN(),this.JCt=s,this.s2t=0,this.e2t="",this.i2t=0,this.r2t=[],this.n2t=!0,this.h2t="",this.kft=null,this.o2t=!1,this.a2t=[],this.l2t=!1,this.c2t=!1,this.u2t=0,this.f2t=-1,this.d2t=new Map,this.p2t=C33.SCt.CA(t,s,e),this.p2t.zmt(this)}C2t(t){this.s2t=0,this.e2t=t[0],this.i2t=t[1],this.r2t=t[2].map(t=>C33.ICt.CA(this.z8,this,t)),this.n2t=t[3],this.c2t=t[4],this.l2t=t[5]}m2t(t){this.s2t=1,this.h2t=t[1],this.kft=this.Af.$Y(t[2]),this.p2t.Mmt(this.kft),this.e2t=this.kft.pf()+"."+this.h2t,this.i2t=t[3],this.r2t=t[4].map(t=>C33.ICt.CA(this.z8,this,t)),this.n2t=t[5],this.c2t=t[6],this.l2t=t[7],this.kft.g2t(this)}static ACt(t,s,e){const i=C33.yn(C33.Zpt,t,s,e),r=e[1];return i.C2t(r),i}static ECt(t,s,e){const i=C33.yn(C33.Zpt,t,s,e),r=e[1];return i.m2t(r),i}j0t(){if(this.kft&&this.kft.aq())for(const t of this.kft.xmt())if(t.S2t(this.h2t)){this.o2t=!0;break}}U0t(){for(const t of this.r2t)t.U0t();this.p2t.U0t(!1)}Q0t(){return this.s2t}f3t(){return this.r2t}tCt(){return this.r2t}GL(){return this.r2t.length}y2t(t){this.a2t.push(t)}_2t(){return this.a2t}F1t(e){const i=this.r2t;for(let t=0,s=i.length;t<s;++t)i[t].Art(e[t].oe(0))}N1t(e){const i=this.r2t;for(let t=0,s=i.length;t<s;++t)i[t].Art(e[t])}T2t(){return this.r2t.map(t=>t.Wit())}H4(){return this.JCt}u3t(){return this.JCt}Z0t(){return this.e2t}A2t(){return this.h2t}E2t(){return this.o2t}NL(){return this.i2t}qk(){return this.kft}pu(){return this.n2t}bL(){switch(this.i2t){case 0:return null;case 2:return"";default:return 0}}vL(){return this.p2t}DL(){return this.l2t}w1t(){return this.c2t}j1t(){const t=this.u2t++;this.f2t=t;let s,e=new Promise(t=>s=t);return this.d2t.set(t,{resolve:s,I2t:0}),[t,e]}X1t(t){const s=this.d2t.get(t);0===s.I2t&&(s.resolve(),this.d2t.delete(t)),this.f2t=-1}w2t(){const t=this.d2t.get(this.f2t);return t.I2t++,this.f2t}R2t(t){this.f2t=t;const s=this.d2t.get(t);s.I2t--}M2t(t,s){const e=new Map,i=[];for(const r of this.kft.s$().t$()){const n=r.qk();if(n.S2t(this.h2t)){const h=e.get(n);Array.isArray(h)?h.push(r):e.set(n,[r])}else i.push(r)}if(0<i.length&&this.p2t.$1t(t,s,this.l2t,{H1t:this.kft,V1t:i}),0<e.size)for(const[o,a]of e){const l=o.b2t(this.h2t).vL(),c=[...new Set([...t,...l.iU()])];l.$1t(c,s,this.l2t,{H1t:o,V1t:a})}}*G2t(t,s){const e=new Map,i=[];for(const r of this.kft.s$().t$()){const n=r.qk();if(n.S2t(this.h2t)){const h=e.get(n);Array.isArray(h)?h.push(r):e.set(n,[r])}else i.push(r)}if(0<i.length&&(yield*this.p2t.Y1t(t,s,this.l2t,{H1t:this.kft,V1t:i})),0<e.size)for(const[o,a]of e){const l=o.b2t(this.h2t).vL(),c=[...new Set([...t,...l.iU()])];yield*l.Y1t(c,s,this.l2t,{H1t:o,V1t:a})}}}}{const C33=self.Bs,EMPTY_SOL_MODIFIERS=[];C33.ICt=class extends C33.gn{constructor(t,s,e){super();const i=t.RL();this.z8=t,this.mdt=i,this.Af=t.cN(),this.JCt=s,this.G0t=i.l3t(),this.En=e[1],this.vf=e[2],this.v2t=e[3],this.U_=!!e[4],this.P2t=!!e[5],this.O2t=s instanceof C33.Zpt,this.N6=e[6],this.x2t=this.Af.p3t(e[8]),this.L2t=t=>this.Art(t),this.D2t=()=>this.Wit(),this.N2t=!this.JCt||this.U_||this.P2t,this.Qrt=this.v2t,this.F2t=-1,this.$2t()&&(this.Qrt=this.Qrt?1:0),!this.k2t()||this.ST()||this.Ypt()||(this.F2t=i.e3t(this)),i.t3t(this)}static CA(t,s,e){return C33.yn(C33.ICt,t,s,e)}U0t(){if(this.k2t()&&!this.ST()&&!this.Ypt()&&!this.B2t()){const t=this.mdt.Qpt(this);t&&t.y2t(this)}}pf(){return this.En}p3t(){return this.x2t}H4(){return this.JCt}u3t(){return this.H4()}qY(){return!this.H4()}k2t(){return!this.qY()}B2t(){return this.O2t}ST(){return this.U_}Ypt(){return this.P2t}mi(){return 0===this.vf}Ri(){return 1===this.vf}$2t(){return 2===this.vf}OCt(){return!1}gq(){return this.N6}i3t(){return this.v2t}iU(){return EMPTY_SOL_MODIFIERS}Bw(t){!this.k2t()||this.ST()||this.Ypt()||this.Art(this.i3t())}VCt(){return!0}*B3t(t){this.Bw(t)}Art(t){this.mi()?"number"!=typeof t&&(t=parseFloat(t)):this.Ri()?"string"!=typeof t&&(t=t.toString()):this.$2t()&&(t=t?1:0),this.N2t?this.Qrt=t:this.G0t.s0t()[this.F2t]=t}Wit(){return this.N2t?this.Qrt:this.G0t.s0t()[this.F2t]}W2t(){let t=this.Wit();return this.$2t()?!!t:t}w3t(){this.Qrt=this.v2t}C3t(){return{configurable:!1,enumerable:!0,get:this.D2t,set:this.L2t}}}}{const C33=self.Bs,assert=self.assert,EMPTY_SOL_MODIFIERS=[];C33.wCt=class extends C33.gn{constructor(t,s,e){super();const i=t.RL();this.z8=t,this.mdt=i,this.Af=t.cN(),this.JCt=s,this.H2t=null,this.V2t=e[1],this.Gd=!0}static CA(t,s,e){return C33.yn(C33.wCt,t,s,e)}U0t(){this.H2t=this.mdt.hJ(this.V2t),this.z8.xCt(this);let t=this.H4();for(;t;)t instanceof C33.SCt&&t.b3t()&&t.vmt(this),t=t.H4();this.i1t(),this.Af.UB()&&this.z8.Jpt().children.push(this.H2t.Jpt())}H4(){return this.JCt}iU(){return EMPTY_SOL_MODIFIERS}DCt(){return this.H2t}Bw(t){const s=!!this.H4(),e=this.Af.oq();s&&this.mdt.rpt(e),this.H2t.Bw(),s&&this.mdt.fU(e)}*B3t(t){const s=!!this.H4(),e=this.Af.oq();s&&this.mdt.rpt(e),yield*this.H2t.B3t(),s&&this.mdt.fU(e)}VCt(){return!1}NCt(){return this.Gd}i1t(){let t=this.H4();for(;t;){if(t instanceof C33.SCt&&t.b3t()&&!t.jpt())return void(this.Gd=!1);t=t.H4()}this.Gd=!0}}}{let WrapIndex2=function(t,s){return s<=t?t%s:(t<0&&(t<=-s&&(t%=s),t<0)&&(t+=s),t)};WrapIndex=WrapIndex2;const C33=self.Bs,assert=self.assert;C33.U2t=class extends C33.gn{constructor(t){super(),this.i_=t,this.Af=t.cN()}U0t(){}static j2t(t,s){const e=s[0],i=[BehaviorExpressionNode,ObjectExpressionNode,InstVarExpressionNode,EventVarExpNode,SystemExpressionExpNode,CallFunctionExpressionExpNode];return C33.yn(i[e],t,s)}};class SystemExpressionExpNode extends C33.U2t{constructor(t,s){super(t),this.X2t=this.Af.IX(),this.J1t=this.Af.z1t(s[1]),this.J1t!==C33.GJ.bJ.Cnt.random&&this.J1t!==C33.GJ.bJ.Cnt.Y2t||this.i_.q2t()}K2t(){return this.X2t.z2t(this.J1t,this.X2t)}}class CallFunctionExpressionExpNode extends C33.U2t{constructor(t,s){super(t),this.J2t=null,this.e2t=s[1],this.i_.q2t()}U0t(){const t=this.Af.RL(),s=(this.J2t=t.ML(this.e2t),this.e2t=null,this.i_.vL()),e=this.J2t.vL();this.Q2t=[...new Set([...s.PL(),...e.PL()])],this.Q2t=t.s3t(this.Q2t)}K2t(){const t=this.J2t;if(t.pu()){const s=t.vL();return C33.SCt.prototype.LL.bind(s,this.Q2t,t.DL(),t.NL(),t.bL())}{const e=t.bL();return()=>e}}}class ObjectExpressionNode extends C33.U2t{constructor(t,s){super(t),this.kft=this.Af.$Y(s[1]),this.J1t=this.Af.z1t(s[2]),this.Z2t=!!s[3],this.Yft=this.Af.RL().kL(),this.i_.tgt(this.kft)}K2t(){return this.kft.UF().z2t(this.J1t,this.kft.WF().N5())}sgt(...t){const s=this.kft,e=s.s$().sdt(),i=e.length;if(0===i)return this.Z2t?"":0;const r=WrapIndex2(this.i_.egt(),i);return this.Yft.rU().Vdt(s),this.J1t.apply(e[r].N5(),t)}igt(t,...s){const e=this.kft,i=e.t$(),r=i.length;if(0===r||"number"!=typeof t)return this.Z2t?"":0;const n=WrapIndex2(t,r);return this.Yft.rU().Vdt(e),this.J1t.apply(i[n].N5(),s)}}class InstVarExpressionNode extends C33.U2t{constructor(t,s){super(t),this.kft=this.Af.$Y(s[1]),this.rgt=s[3],this.Z2t=!!s[2],this.i_.tgt(this.kft)}ngt(){const t=this.kft.s$().sdt(),s=t.length;if(0===s)return this.Z2t?"":0;const e=WrapIndex2(this.i_.egt(),s);return t[e].hgt(this.rgt)}ogt(){const t=this.kft,s=t.s$().sdt(),e=s.length;if(0===e)return this.Z2t?"":0;const i=WrapIndex2(this.i_.egt(),e),r=s[i],n=r.qk().agt(t.lgt());return r.hgt(this.rgt+n)}cgt(t){const s=this.kft,e=s.t$(),i=e.length;if(0===i||"number"!=typeof t)return this.Z2t?"":0;let r=WrapIndex2(t,i),n=e[r],h=0;return s.aq()&&(h=n.qk().agt(s.lgt())),n.hgt(this.rgt+h)}}class BehaviorExpressionNode extends C33.U2t{constructor(t,s){super(t),this.kft=this.Af.$Y(s[1]),this.ugt=this.kft.Xrt(s[2]),this.fgt=this.kft.Ret(s[2]),this.J1t=this.Af.z1t(s[3]),this.Z2t=!!s[4],this.Yft=this.Af.RL().kL(),this.i_.tgt(this.kft)}dgt(...t){const s=this.kft,e=s.s$().sdt(),i=e.length;if(0===i)return this.Z2t?"":0;let r=WrapIndex2(this.i_.egt(),i),n=(this.Yft.rU().Vdt(s),e[r]),h=0;return s.aq()&&(h=n.qk().pgt(s.lgt())),this.J1t.apply(n.jrt()[this.fgt+h].N5(),t)}Cgt(t,...s){const e=this.kft,i=e.t$(),r=i.length;if(0===r||"number"!=typeof t)return this.Z2t?"":0;let n=WrapIndex2(t,r),h=(this.Yft.rU().Vdt(e),i[n]),o=0;return e.aq()&&(o=h.qk().pgt(e.lgt())),this.J1t.apply(h.jrt()[this.fgt+o].N5(),s)}}class EventVarExpNode extends C33.U2t{constructor(t,s){super(t),this.mgt=null,this.ggt=s[1]}U0t(){this.mgt=this.Af.RL().m3t(this.ggt)}Sgt(){return this.mgt}}}{let GetExpressionFunc2=function(t){const s=self.ygt[t];if(s)return s;throw new Error("invalid expression number")};GetExpressionFunc=GetExpressionFunc2;const C33=self.Bs,assert=self.assert;C33._gt=class extends C33.gn{constructor(t,s,e){super(),this.i_=t,this.f1=e,this.vf=s,this.oe=null,this.Tgt=!1,this.P2t=!1}static CA(t,s,e){const i=s[0],r=[ExpressionParameter,StringExpressionParameter,FileParameter,ComboParameter,ObjectParameter,LayerExpressionParameter,LayoutParameter,ExpressionParameter,ComboParameter,ComboParameter,InstVarParameter,EventVarParameter,FileParameter,VariadicParameter,StringExpressionParameter,TimelineParameter,BooleanParameter,FunctionParameter,EaseParameter,TilemapBrushParameter,TemplateExpressionParameter,FlowchartParameter];return C33.yn(r[i],t,i,e,s)}U0t(){}q2t(){this.Tgt=!0}tgt(t){this.Tgt||!t||t.UF().SF()||(this.Tgt=!0)}Agt(){return this.Tgt}Yx(){return this.f1}cN(){return this.i_.cN()}vL(){return this.i_.vL()}Ypt(){return this.P2t}Egt(){return 4===this.vf}};class ExpressionParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.Igt=0;const r=i[1];this.wgt=r[0],this.Rgt=[],this.Mgt=null;for(let t=1,s=r.length;t<s;++t)this.Rgt.push(C33.U2t.j2t(this,r[t]));this.Rgt.length?this.oe=this.bgt:(this.oe=GetExpressionFunc2(this.wgt),this.P2t=!0)}Ggt(t){if(t<0||t>=this.Rgt.length)throw new RangeError("invalid numbered node");return this.Rgt[t]}U0t(){for(const s of this.Rgt)s.U0t();const t=GetExpressionFunc2(this.wgt);this.Rgt.length?this.Mgt=t(this):this.Mgt=t}egt(){return this.Igt}bgt(t){return this.Igt=t,this.Mgt()}}class StringExpressionParameter extends ExpressionParameter{constructor(t,s,e,i){super(t,s,e,i),this.oe=this.vgt,14===s&&(this.vL().Dmt(),this.i_ instanceof C33.bmt)&&this.vL().qmt()}vgt(t){this.Igt=t;const s=this.Mgt();return"string"==typeof s?s:""}Pgt(){return GetExpressionFunc2(this.wgt)()}}class LayerExpressionParameter extends ExpressionParameter{constructor(t,s,e,i){super(t,s,e,i),2<=t.Ogt()?this.oe=this.R$:this.oe=this.jD,this.P2t=!1}jD(t){this.Igt=t;const s=this.Mgt(),e=this.cN().HD();return e.jD(s)}R$(t){const s=this.jD(t);return s?s.R$():null}}class ComboParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.xgt=i[1],this.oe=this.Lgt,this.P2t=!0}Lgt(){return this.xgt}}class BooleanParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.Dgt=i[1],this.oe=this.Ngt,this.P2t=!0}Ngt(){return this.Dgt}}class ObjectParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.kft=this.cN().$Y(i[1]),2<=t.Ogt()?this.oe=this.$F:this.oe=this.qk;const r=this.vL();r.Mmt(this.kft),this.i_ instanceof C33.bmt?r.qmt():r.H4()&&r.H4().qmt(),this.P2t=!0}qk(){return this.kft}$F(){return this.kft?this.kft.$F():null}}class LayoutParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.O6=this.cN().wD().S7(i[1]),2<=t.Ogt()?this.oe=this.ED:this.oe=this.RD,this.P2t=!0}RD(){return this.O6}ED(){return this.O6?this.O6.ED():null}}class TimelineParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.AQ=this.cN().wtt().G9(i[1]),2<=t.Ogt()?this.oe=this.Bst:this.oe=this.let,this.P2t=!0}let(){return this.AQ}Bst(){return this.AQ?this.AQ.Bst():null}}class FileParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.Fgt=i[1],this.oe=this.$gt,this.P2t=!0}$gt(){return this.Fgt}}class InstVarParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.kgt=i[1];const r=this.i_.qk();this.i_ instanceof C33.Rmt&&this.i_.ST()||!r||!r.aq()?(this.oe=this.Bgt,this.P2t=!0):(this.oe=this.Wgt,this.q2t())}Bgt(){return this.kgt}Wgt(t){t=t||0;let s=this.i_.qk(),e=s.s$(),i=e.t$(),r=null;if(i.length)r=i[t%i.length].qk();else if(e.Zft()){const n=e.tdt();r=n[t%n.length].qk()}else{if(!(0<s.i$()))return 0;{const h=s.t$();r=h[t%h.length].qk()}}return this.kgt+r.agt(s.lgt())}}class EventVarParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.ggt=i[1],this.mgt=null,2<=t.Ogt()?this.oe=this.Hgt:this.oe=this.Vgt,this.P2t=!0}U0t(){this.mgt=this.cN().RL().m3t(this.ggt)}Vgt(){return this.mgt}Hgt(){return null}}class FunctionParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.Ugt=i[1],this.J2t=null,2<=t.Ogt()?this.oe=this.jgt:this.oe=this.Xgt,this.P2t=!0}U0t(){this.J2t=this.cN().RL().ML(this.Ugt),this.Ugt=null}Xgt(){return this.J2t}jgt(){return null}}class VariadicParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.Ygt=[],this.qgt=[],this.P2t=!0;for(let t=1,s=i.length;t<s;++t){const r=C33._gt.CA(this.i_,i[t],0);this.Ygt.push(r),this.qgt.push(0),r.Ypt()||(this.P2t=!1)}this.oe=this.Kgt}U0t(){for(const t of this.Ygt)t.U0t()}Kgt(){const e=this.Ygt,i=this.qgt;for(let t=0,s=e.length;t<s;++t)i[t]=e[t].oe(0);return i}}class EaseParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.zgt=i[1],this.oe=this.Trt,this.P2t=!0}Trt(){return this.zgt}}class TilemapBrushParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.Jgt=i[1],this.oe=this.Qgt,this.P2t=!0}Qgt(){return this.Jgt}}class TemplateExpressionParameter extends ExpressionParameter{constructor(t,s,e,i){super(t,s,e,i),this.oe=this.uB,this.P2t=!1}uB(){return this.Mgt()}}class FlowchartParameter extends C33._gt{constructor(t,s,e,i){super(t,s,e),this.Tct=this.cN().kct().Cct(i[1]),this.oe=this.Zgt,this.P2t=!0}Zgt(){return this.Tct.pf()}}}{let EvalParams2=function(e,i){for(let t=0,s=e.length;t<s;++t)i[t]=e[t].oe(0)};EvalParams=EvalParams2;const C33=self.Bs,assert=self.assert,EMPTY_PARAMS_ARRAY=[],noop=function(){};C33.Rmt=class extends C33.gn{constructor(t,e,s){if(super(),this.p2t=t,this.Af=t.cN(),this.f1=s,this.J1t=this.Af.z1t(e[1]),this.tSt=0<e[3],this.sSt=2===e[3],this.eSt=!!e[4],this.iSt=!!e[5],this.U_=!!e[6],this.N6=e[7],this.rSt=this.p2t.pdt(),this.kft=null,this.ugt=null,this.fgt=-1,this.X2t=null,this.Bw=noop,this.B3t=noop,this.Zs=[],this.nSt=[],this.hSt=!1,this.oSt=null,this.aSt=null,this.Smt=this.Af.UB()?{ymt:e[8][0],lSt:e[8][1]}:null,-1===e[0]?this.X2t=this.Af.IX():(this.kft=this.Af.$Y(e[0]),e[2]&&(this.ugt=this.kft.Xrt(e[2]),this.fgt=this.kft.Ret(e[2])),this.p2t.H4()&&this.p2t.H4().qmt()),10===e.length){let s=e[9];for(let t of s)this.Zs.push(C33._gt.CA(this,t,this.Zs.length)),this.nSt.push(0)}0===this.Zs.length&&(this.Zs=EMPTY_PARAMS_ARRAY,this.nSt=EMPTY_PARAMS_ARRAY),this.p2t.RL().K0t(this)}static CA(t,s,e){return C33.yn(C33.Rmt,t,s,e)}U0t(){for(const t of this.Zs)t.U0t(),t.Agt()&&(this.hSt=!0);this.sSt?(this.Bw=this.cSt,this.B3t=this.uSt):this.X2t?(this.fSt(),this.B3t=this.dSt):this.kft.UF().SF()?(this.pSt(),this.B3t=this.CSt):this.U_?(this.Bw=this.mSt,this.B3t=this.gSt):(this.Bw=this.SSt,this.B3t=this.ySt)}fSt(){const t=this.X2t,s=this.X2t;this._St(t,s,this.TSt)}pSt(){const t=this.kft.UF(),s=this.kft.WF().N5();this._St(t,s,this.ASt)}_St(t,s,e){const i=this.J1t,r=this.iSt,n=this.Zs;if(0===n.length){const h=t.z2t(i,s);r?this.Bw=function(){return C33.xor(h(),r)}:this.Bw=h}else if(1===n.length){const o=n[0];if(!r&&o.Ypt())this.Bw=t.ESt(i,s,o.oe(0));else{const a=t.z2t(i,s);this.Bw=function(){return C33.xor(a(o.oe(0)),r)}}}else if(2===n.length){const l=n[0],c=n[1];if(!r&&l.Ypt()&&c.Ypt())this.Bw=t.ISt(i,s,l.oe(0),c.oe(0));else{const u=t.z2t(i,s);this.Bw=function(){return C33.xor(u(l.oe(0),c.oe(0)),r)}}}else if(3===n.length){const f=n[0],d=n[1],p=n[2];if(!r&&f.Ypt()&&d.Ypt()&&p.Ypt())this.Bw=t.wSt(i,s,f.oe(0),d.oe(0),p.oe(0));else{const C=t.z2t(i,s);this.Bw=function(){return C33.xor(C(f.oe(0),d.oe(0),p.oe(0)),r)}}}else this.Bw=e}gq(){return this.N6}MCt(){return this.J1t}qk(){return this.kft}Y5(){return this.ugt}RSt(){return this.ugt?this.ugt.U5():this.kft?this.kft.UF():null}Ogt(){const t=this.RSt();return t?t.MSt():1}vL(){return this.p2t}cN(){return this.Af}Yx(){return this.f1}f1t(){return this.Yx()}_Ct(){return this.tSt}bCt(){return this.sSt}bSt(){return this.iSt}hW(){return this.eSt}ST(){return this.U_}GSt(){return this.Smt.ymt}vSt(){return!!this.X2t}o1t(){return this.vSt()||this.kft.UF().SF()}a1t(){for(const t of this.Zs)if(t.Egt())return t.qk();return null}PSt(t){this.Smt.ymt=!!t,this.p2t.jmt()}OSt(){return this.Smt.lSt}VCt(){return!this.GSt()&&!this.Af.T1t()&&!this.OSt()}xSt(){return this.oSt||(this.oSt=new Map),this.oSt}LSt(){return this.aSt||(this.aSt=new Map),this.aSt}TSt(){const t=this.nSt;return EvalParams2(this.Zs,t),C33.xor(this.J1t.apply(this.X2t,t),this.iSt)}*dSt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const s=this.nSt;EvalParams2(this.Zs,s);let t=this.J1t.apply(this.X2t,s);return C33.Jo(t)&&(t=yield*t),C33.xor(t,this.iSt)}return this.Bw()}ASt(){const t=this.nSt,s=(EvalParams2(this.Zs,t),this.kft.WF().N5());return C33.xor(this.J1t.apply(s,t),this.iSt)}*CSt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){let t=this.nSt,s=(EvalParams2(this.Zs,t),this.kft.WF().N5()),e=this.J1t.apply(s,t);return C33.Jo(e)&&(e=yield*e),C33.xor(e,this.iSt)}return this.Bw()}cSt(){return!0}*uSt(){return(this.GSt()||this.Af.T1t())&&(yield this),!0}DSt(){return this.ugt?2<=this.ugt.U5().MSt()?this.ugt.X5():this.ugt:2<=this.kft.UF().MSt()?this.kft.$F():this.kft}mSt(){const t=this.nSt,s=(EvalParams2(this.Zs,t),this.J1t.apply(this.DSt(),t));return this.kft.W1t(),s}*gSt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const s=this.nSt;EvalParams2(this.Zs,s);let t=this.J1t.apply(this.DSt(),s);return C33.Jo(t)&&(t=yield*t),this.kft.W1t(),t}return this.Bw()}SSt(){const e=this.Zs,i=this.nSt,t=this.kft.s$();for(let t=0,s=e.length;t<s;++t){const r=e[t];r.Agt()||(i[t]=r.oe(0))}return t.Jft()?this.NSt(t):this.FSt(t)}*ySt(){return(this.GSt()||this.Af.T1t())&&(yield this),this.SSt()}$St(e){const i=this.Zs,r=this.nSt;for(let t=0,s=i.length;t<s;++t){const n=i[t];n.Agt()&&(r[t]=n.oe(e))}}NSt(e){const t=this.kft,i=t.aq(),r=t.lgt(),n=this.fgt,h=0<=n,o=t.t$(),a=this.hSt,l=this.nSt,c=this.J1t,u=this.iSt,f=this.rSt&&!this.tSt;e.zft();for(let s=0,t=o.length;s<t;++s){const d=o[s];a&&this.$St(s);let t;if(h){const p=i?d.qk().pgt(r):0;t=c.apply(d.jrt()[n+p].N5(),l)}else t=c.apply(d.N5(),l);C33.xor(t,u)?e.edt(d):f&&e.idt(d)}return t.kSt(!0),e.rdt(!1),t.W1t(),e.Qft()}FSt(t){let s=this.kft,e=s.aq(),i=s.lgt(),r=s.nB(),n=this.fgt,h=0<=n,o=this.hSt,a=this.nSt,l=this.J1t,c=this.iSt,u=this.rSt&&!this.tSt,f=t.ndt(),d=t.hdt(),p=u&&!this.p2t.h1t(this),C=p?d:f,m=0,g=!1;for(let s=0,t=C.length;s<t;++s){const y=C[s];o&&this.$St(s);let t;if(h){const _=e?y.qk().pgt(i):0;t=l.apply(y.jrt()[n+_].N5(),a)}else t=l.apply(y.N5(),a);C33.xor(t,c)?(g=!0,p?(f.push(y),r&&y.BSt()):(C[m]=y,r&&y.WSt(m),++m)):p?(C[m]=y,r&&y.HSt(m),++m):u&&(d.push(y),r)&&y.VSt()}C33.Yh(C,m),r&&s.USt(p,m);const S=g;return p&&!g&&(g=this.jSt(f)),s.kSt(S||u),u?g:t.Qft()}jSt(e){const t=this.kft,i=t.aq(),r=t.lgt(),n=this.hSt,h=this.fgt,o=0<=h,a=this.nSt,l=this.J1t,c=this.iSt;for(let s=0,t=e.length;s<t;++s){const u=e[s];n&&this.$St(s);let t;if(o){const f=i?u.qk().pgt(r):0;t=l.apply(u.jrt()[h+f].N5(),a)}else t=l.apply(u.N5(),a);if(C33.xor(t,c))return!0}return!1}XSt(t,s){return this.Zs[t].oe(s)}GCt(){const t=this.Zs;if(t.length)return t[0].Pgt();throw new Error("no parameters")}D8(){if(!this.oSt||!this.oSt.size)return null;const s={};for(const[e,i]of this.oSt.entries()){let t=i;"collmemory"===e&&(t=[...i.entries()].map(t=>[t[0].oB(),t[1].oB(),t[2]])),s[e]=t}return{ex:s}}N8(t){if(this.oSt&&(this.oSt.clear(),this.oSt=null),t){const s=this.Af,e=t.ex;if(e){const i=this.xSt();i.clear();for(const[r,n]of Object.entries(e)){let t=n;"collmemory"===r&&(t=C33.yn(C33.Cu,n.map(t=>[s.kD(t[0]),s.kD(t[1]),t[2]]).filter(t=>t[0]&&t[1]))),i.set(r,t)}}}}}}{let EvalParams2=function(e,i){for(let t=0,s=e.length;t<s;++t)i[t]=e[t].oe(0)};EvalParams=EvalParams2;const C33=self.Bs,assert=self.assert,EMPTY_PARAMS_ARRAY=[],noop=function(){},noopGenerator=function*(){},FLAG_CANPICKANYOBJECTCLASS=1,FLAG_COPYPICKED=2,FLAG_CUSTOM_ACE=4,FLAG_IS_ASYNC=8,FLAG_CAN_BAIL_OUT=16;C33.bmt=class extends C33.gn{constructor(t,s,e){super();const i=(this.p2t=t).cN(),r=(this.Af=i,this.f1=e,this.N6=4<=s.length?s[3]:-1,this.YSt=5<=s.length?255&s[4]:0,this.qSt=5<=s.length?s[4]>>8:0,this.J1t=null,this.kft=null,this.ugt=null,this.fgt=-1,this.X2t=null,this.KSt="",this.zSt=null,this.JSt=null,this.Bw=noop,this.B3t=noop,this.Zs=[],this.nSt=[],this.hSt=!1,this.oSt=null,this.aSt=null,-3===s[0]),n=r?s[2]:s[5];if(this.Smt=i.UB()||r?{ymt:n[0],lSt:n[1],index:n[2]}:null,-1===s[0])this.X2t=i.IX(),this.J1t=i.z1t(s[1]);else if(-2===s[0])this.KSt=s[1];else if(r){const h=i.z1t(s[1]);this.J1t=h,this.Bw=this.QSt,this.B3t=this.ZSt,this.qSt|=FLAG_IS_ASYNC}else this.kft=i.$Y(s[0]),this.qSt&FLAG_CUSTOM_ACE?(this.KSt=s[1],this.zSt=i.$Y(s[2])):(s[2]&&(this.ugt=this.kft.Xrt(s[2]),this.fgt=this.kft.Ret(s[2])),this.J1t=i.z1t(s[1]));if(7===s.length){const o=s[6];for(const a of o)this.Zs.push(C33._gt.CA(this,a,this.Zs.length)),this.nSt.push(0)}0===this.Zs.length&&(this.Zs=EMPTY_PARAMS_ARRAY,this.nSt=EMPTY_PARAMS_ARRAY),this.tyt()&&(this.p2t.Dmt(),this.p2t.qmt()),this.p2t.RL().z0t(this)}static CA(t,s,e){return C33.yn(C33.bmt,t,s,e)}U0t(){for(const t of this.Zs)t.U0t(),t.Agt()&&(this.hSt=!0);if(this.X2t)this.fSt(),this.B3t=this.dSt;else if(this.KSt)this.qSt&FLAG_CUSTOM_ACE?this.syt():this.eyt(),this.KSt="",this.zSt=null;else if(this.Bw===this.QSt){const s=this.J1t,e=this.Af.RL().d3t(this.p2t);this.J1t=s.bind(null,this.Af.mF(),e)}else this.ugt?this.w1t()?(this.Bw=this.iyt,this.B3t=this.ryt):(this.Bw=this.nyt,this.B3t=this.hyt):this.kft.UF().SF()?(this.pSt(),this.B3t=this.CSt):this.ST()?(this.Bw=this.oyt,this.B3t=this.ayt):this.w1t()?(this.Bw=this.lyt,this.B3t=this.cyt):this.uyt()?(this.Bw=this.fyt,this.B3t=this.dyt):this.Zs.length?this.Zs.every(t=>t.Agt())?(this.Bw=this.pyt,this.B3t=this.Cyt):this.hSt?(this.Bw=this.myt,this.B3t=this.gyt):this.Zs.every(t=>t.Ypt())?(EvalParams2(this.Zs,this.nSt),this.Bw=this.Syt,this.B3t=this.yyt):(this.Bw=this._yt,this.B3t=this.Tyt):(this.Bw=this.Syt,this.B3t=this.yyt)}fSt(){const t=this.X2t,s=this.X2t;this._St(t,s,this.TSt)}pSt(){const t=this.kft.UF(),s=this.kft.WF().N5();this._St(t,s,this.ASt)}eyt(){const t=this.p2t.RL(),e=t.ML(this.KSt);if(e.pu()){const i=0!=(this.qSt&FLAG_COPYPICKED);this.JSt=e.vL();let s=[...new Set([...this.p2t.PL(),...this.JSt.PL()])];s=t.s3t(s);const r=!e.DL()&&this.Ayt()?{U1t:!0}:null;if(this.Bw=C33.SCt.prototype.$1t.bind(this.JSt,s,this.Zs,i,r),this.Af.UB()){const n=this;this.B3t=function*(){(n.GSt()||n.Af.T1t())&&(yield n);const t=yield*n.JSt.Y1t(s,n.Zs,i,r);return t}}else this.B3t=noopGenerator}else this.Bw=noop,this.B3t=noopGenerator}syt(){const n=this.p2t.RL(),h=n._3t(this.zSt,this.KSt);if(h.pu()){const o=0!=(this.qSt&FLAG_COPYPICKED);this.JSt=h.vL();let s=[...new Set([...this.p2t.PL(),...this.JSt.PL(),this.kft,h.qk()])],t=(s=n.s3t(s),!this.kft.aq()&&!h.qk().aq()),e=!this.kft.aq()&&h.qk().aq(),i=this.kft.aq(),r=null;if(!h.DL()&&this.Ayt()&&((r=r||{}).U1t=!0),!e&&o||((r=r||{}).k1t=this.kft,r.B1t=h.qk()),t||e||i&&!h.E2t()?this.Bw=C33.SCt.prototype.$1t.bind(this.JSt,s,this.Zs,o,r):i&&(this.Bw=C33.Zpt.prototype.M2t.bind(h,s,this.Zs)),this.Af.UB()){const a=this;t||e||i&&!h.E2t()?this.B3t=function*(){(a.GSt()||a.Af.T1t())&&(yield a);const t=yield*a.JSt.Y1t(s,a.Zs,o,r);return t}:i&&(this.B3t=function*(){(a.GSt()||a.Af.T1t())&&(yield a);const t=yield*h.G2t(s,a.Zs);return t})}else this.B3t=noopGenerator}else this.Bw=noop,this.B3t=noopGenerator}_St(t,s,e){const i=this.J1t,r=this.Zs;if(0===r.length)this.Bw=t.z2t(i,s);else if(1===r.length){const n=r[0];if(n.Ypt())this.Bw=t.ESt(i,s,n.oe(0));else{const h=t.z2t(i,s);this.Bw=function(){return h(n.oe(0))}}}else if(2===r.length){const o=r[0],a=r[1];if(o.Ypt()&&a.Ypt())this.Bw=t.ISt(i,s,o.oe(0),a.oe(0));else{const l=t.z2t(i,s);this.Bw=function(){return l(o.oe(0),a.oe(0))}}}else if(3===r.length){const c=r[0],u=r[1],f=r[2];if(c.Ypt()&&u.Ypt()&&f.Ypt())this.Bw=t.wSt(i,s,c.oe(0),u.oe(0),f.oe(0));else{const d=t.z2t(i,s);this.Bw=function(){return d(c.oe(0),u.oe(0),f.oe(0))}}}else this.Bw=e}gq(){return this.N6}w1t(){return 0!=(this.qSt&FLAG_IS_ASYNC)}I1t(){return 0!=(this.qSt&FLAG_CAN_BAIL_OUT)}uyt(){return 1===this.YSt}ST(){return 2===this.YSt}tyt(){return 0!=(this.qSt&FLAG_CANPICKANYOBJECTCLASS)}$mt(){return this.w1t()||this.I1t()}qk(){return this.kft}RSt(){return this.ugt?this.ugt.U5():this.kft?this.kft.UF():null}Ogt(){const t=this.RSt();return t?t.MSt():1}vL(){return this.p2t}Ayt(){let t=this.p2t;do{if(t instanceof C33.Zpt&&t.DL())return!0}while(t=t.u3t());return!1}cN(){return this.Af}Yx(){return this.f1}f1t(){return this.Smt.index}GSt(){return this.Smt.ymt}PSt(t){this.Smt.ymt=!!t,this.p2t.jmt()}OSt(){return this.Smt.lSt}VCt(){return!this.GSt()&&!this.Af.T1t()&&!this.OSt()}xSt(){return this.oSt||(this.oSt=new Map),this.oSt}LSt(){return this.aSt||(this.aSt=new Map),this.aSt}TSt(){const t=this.nSt;return EvalParams2(this.Zs,t),this.J1t.apply(this.X2t,t)}*dSt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const t=this.nSt,s=(EvalParams2(this.Zs,t),yield*this.J1t.apply(this.X2t,t));return s}return this.Bw()}ASt(){const t=this.nSt;return EvalParams2(this.Zs,t),this.J1t.apply(this.kft.WF().N5(),t)}*CSt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const t=this.nSt,s=(EvalParams2(this.Zs,t),yield*this.J1t.apply(this.kft.WF().N5(),t));return s}return this.Bw()}Syt(){const e=this.nSt,i=this.kft.s$().t$();for(let t=0,s=i.length;t<s;++t)this.J1t.apply(i[t].N5(),e)}*yyt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const e=this.nSt,i=this.kft.s$().t$();for(let t=0,s=i.length;t<s;++t)yield*this.J1t.apply(i[t].N5(),e)}else this.Syt()}_yt(){const e=this.nSt,i=(EvalParams2(this.Zs,e),this.kft.s$().t$());for(let t=0,s=i.length;t<s;++t)this.J1t.apply(i[t].N5(),e)}*Tyt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const e=this.nSt,i=(EvalParams2(this.Zs,e),this.kft.s$().t$());for(let t=0,s=i.length;t<s;++t)yield*this.J1t.apply(i[t].N5(),e)}else this._yt()}pyt(){const i=this.Zs,r=this.nSt,s=this.J1t,n=this.kft.s$().t$();for(let e=0,t=n.length;e<t;++e){const h=n[e];for(let t=0,s=i.length;t<s;++t)r[t]=i[t].oe(e);s.apply(h.N5(),r)}}*Cyt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const i=this.Zs,r=this.nSt,s=this.J1t,n=this.kft.s$().t$();for(let e=0,t=n.length;e<t;++e){const h=n[e];for(let t=0,s=i.length;t<s;++t)r[t]=i[t].oe(e);yield*s.apply(h.N5(),r)}}else this.pyt()}myt(){const i=this.Zs,r=this.nSt,s=this.J1t,n=this.kft.s$().t$();for(let t=0,s=i.length;t<s;++t){const e=i[t];e.Agt()||(r[t]=e.oe(0))}for(let e=0,t=n.length;e<t;++e){const h=n[e];for(let t=0,s=i.length;t<s;++t){const o=i[t];o.Agt()&&(r[t]=o.oe(e))}s.apply(h.N5(),r)}}*gyt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const i=this.Zs,r=this.nSt,s=this.J1t,n=this.kft.s$().t$();for(let t=0,s=i.length;t<s;++t){const e=i[t];e.Agt()||(r[t]=e.oe(0))}for(let e=0,t=n.length;e<t;++e){const h=n[e];for(let t=0,s=i.length;t<s;++t){const o=i[t];o.Agt()&&(r[t]=o.oe(e))}yield*s.apply(h.N5(),r)}}else this.myt()}fyt(){const i=this.Zs,r=this.nSt,s=this.J1t,t=this.kft,e=t.Eyt(),n=t.s$().t$();e.Iyt(s);for(let e=0,t=n.length;e<t;++e){const h=n[e];for(let t=0,s=i.length;t<s;++t)r[t]=i[t].oe(e);s.apply(h.N5(),r)}e.wyt(s)}*dyt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const i=this.Zs,r=this.nSt,s=this.J1t,t=this.kft,e=t.Eyt(),n=t.s$().t$();e.Iyt(s);for(let e=0,t=n.length;e<t;++e){const h=n[e];for(let t=0,s=i.length;t<s;++t)r[t]=i[t].oe(e);yield*s.apply(h.N5(),r)}e.wyt(s)}else this.fyt()}Ryt(){return this.ugt?2<=this.ugt.U5().MSt()?this.ugt.X5():this.ugt:2<=this.kft.UF().MSt()?this.kft.$F():this.kft}oyt(){const t=this.nSt;return EvalParams2(this.Zs,t),this.J1t.apply(this.Ryt(),t)}*ayt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const s=this.nSt;EvalParams2(this.Zs,s);let t=this.J1t.apply(this.Ryt(),s);return C33.Jo(t)?yield*t:t}return this.oyt()}nyt(){const t=this.kft,s=t.aq(),i=t.lgt(),r=this.Zs,n=this.hSt,h=this.nSt,o=this.J1t,a=this.fgt,l=t.s$().t$();for(let t=0,s=r.length;t<s;++t){const e=r[t];e.Agt()||(h[t]=e.oe(0))}for(let e=0,t=l.length;e<t;++e){const c=l[e];if(n)for(let t=0,s=r.length;t<s;++t){const f=r[t];f.Agt()&&(h[t]=f.oe(e))}const u=s?c.qk().pgt(i):0;o.apply(c.jrt()[a+u].N5(),h)}}*hyt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const t=this.kft,s=t.aq(),i=t.lgt(),r=this.Zs,n=this.hSt,h=this.nSt,o=this.J1t,a=this.fgt,l=t.s$().t$();for(let t=0,s=r.length;t<s;++t){const e=r[t];e.Agt()||(h[t]=e.oe(0))}for(let e=0,t=l.length;e<t;++e){const c=l[e];if(n)for(let t=0,s=r.length;t<s;++t){const f=r[t];f.Agt()&&(h[t]=f.oe(e))}const u=s?c.qk().pgt(i):0;yield*o.apply(c.jrt()[a+u].N5(),h)}}else this.nyt()}lyt(){const i=this.Zs,r=this.nSt,s=this.J1t,n=this.kft.s$().t$(),h=[];for(let e=0,t=n.length;e<t;++e){const o=n[e];for(let t=0,s=i.length;t<s;++t)r[t]=i[t].oe(e);h.push(s.apply(o.N5(),r))}return Promise.all(h)}*cyt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const i=this.Zs,r=this.nSt,s=this.J1t,n=this.kft.s$().t$(),h=[];for(let e=0,t=n.length;e<t;++e){const o=n[e];for(let t=0,s=i.length;t<s;++t)r[t]=i[t].oe(e);h.push(yield*s.apply(o.N5(),r))}return Promise.all(h)}return this.lyt()}iyt(){const t=this.kft,s=t.aq(),i=t.lgt(),r=this.Zs,n=this.nSt,h=this.J1t,o=this.fgt,a=t.s$().t$(),l=[];for(let e=0,t=a.length;e<t;++e){const c=a[e];for(let t=0,s=r.length;t<s;++t)n[t]=r[t].oe(e);const u=s?c.qk().pgt(i):0;l.push(h.apply(c.jrt()[o+u].N5(),n))}return Promise.all(l)}*ryt(){if((this.GSt()||this.Af.T1t())&&(yield this),this.OSt()){const t=this.kft,s=t.aq(),i=t.lgt(),r=this.Zs,n=this.nSt,h=this.J1t,o=this.fgt,a=t.s$().t$(),l=[];for(let e=0,t=a.length;e<t;++e){const c=a[e];for(let t=0,s=r.length;t<s;++t)n[t]=r[t].oe(e);const u=s?c.qk().pgt(i):0;l.push(yield*h.apply(c.jrt()[o+u].N5(),n))}return Promise.all(l)}return this.iyt()}async QSt(){try{await this.J1t()}catch(t){console.error(`Unhandled exception running script %c${this.p2t.xz().pf()}, event ${this.p2t.Jmt()}, action ${this.f1t()+1}:`,"font-size: 1.2em; font-weight: bold;",t),self.C3Debugger&&self.C3Debugger._SetLastErrorScript(this),C33.RCt.Z1t()||(console.info("%cTip:%c run this to highlight in Construct the last script that had an error: %cgoToLastErrorScript()","font-weight: bold; text-decoration: underline","","font-weight: bold"),C33.RCt.t2t())}}*ZSt(){return(this.GSt()||this.Af.T1t())&&(yield this),this.QSt()}D8(){return this.oSt&&this.oSt.size?{ex:C33.qo(this.oSt)}:null}N8(t){if(this.oSt&&(this.oSt.clear(),this.oSt=null),t){const s=t.ex;s&&(this.oSt=C33.Ko(s))}}}}{let GetInst2=function(t){return t instanceof IInstance?runtime.O$(t):t.fH()},GetWorldInfo2=function(t){return GetInst2(t).UD()},GetInst_SDKv22=function(t){return runtime.O$(t)},GetWorldInfo_SDKv22=function(t){return GetInst_SDKv22(t).UD()},GetObjectClass2=function(t){return t instanceof IObjectClass?runtime.O$(t):t},GetLayer2=function(t){return t instanceof ILayer?runtime.O$(t):t},CollMemory_Add2=function(t,s,e,i){const r=s.oB(),n=e.oB();r<n?t.Set(s,e,i):t.Set(e,s,i)},CollMemory_Remove2=function(t,s,e){const i=s.oB(),r=e.oB();i<r?t.yu(s,e):t.yu(e,s)},CollMemory_RemoveInstance2=function(t,s){t._u(s)},CollMemory_Get2=function(t,s,e){const i=s.oB(),r=e.oB();return i<r?t.oe(s,e):t.oe(e,s)},DoOverlapCondition2=function(t,s,e,i){if(!s)return!1;const r=0!==e||0!==i,n=t.UD(),h=runtime.tL(),o=runtime.n3t(),a=o.vL().pdt(),l=o.qk(),c=o.bSt(),u=s.s$(),f=l!==s;rPickType=s,needsCollisionFinish=f&&!c;let d,p=0,C=0,m=rPickFromElseInstances=!1;u.Jft()?(tempRect.I(n._4()),tempRect.offset(e,i),h.Myt(n.jD(),s,tempRect,tempCandidates2),d=tempCandidates2):!a||runtime.byt()&&!u.hdt().length&&u.ndt().length?d=u.ndt():(d=u.hdt(),rPickFromElseInstances=!0),r&&(p=n.Ny(),C=n.ky(),n.m4(e,i),n.u4());for(const g of d)if(h.PN(t,g)){if(m=!0,c)break;f&&rToPick.add(g)}return r&&(n.f4(p,C),n.u4()),C33.qh(tempCandidates2),m},FinishCollisionConditionPicking2=function(t){const s=runtime.OL().pdt(),e=rPickType.s$(),i=e.ndt(),r=e.hdt();e.Jft()?(e.ldt(rToPick),s&&(C33.qh(r),e.cdt(rToPick,rPickType.t$()))):s?rPickFromElseInstances?e.udt(rToPick):(e.cdt(rToPick,i),e.ldt(rToPick)):e.ldt(rToPick),rPickType.W1t()},FinishCollisionCondition2=function(t,s){needsCollisionFinish&&(s&&FinishCollisionConditionPicking2(t),rToPick.clear(),rPickType=null,needsCollisionFinish=!1)},PickByUID_Normal2=function(t,s){const e=runtime.kD(s);if(e){const i=t.s$();if(i.Jft()||i.ndt().includes(e))if(t.aq()){if(e.qk().Gyt(t))return i.ddt(e),t.W1t(),!0}else if(e.qk()===t)return i.ddt(e),t.W1t(),!0}return!1},PickByUID_Inverted2=function(t,r){const n=t.s$();if(n.Jft()){n.rdt(!1),n.zft();const e=t.t$();for(let t=0,s=e.length;t<s;++t){const i=e[t];i.oB()===r?n.idt(i):n.edt(i)}return t.W1t(),!!n.ndt().length}{let e=n.ndt(),i=0;for(let t=0,s=e.length;t<s;++t){const h=e[t];(e[i]=h).oB()===r?n.idt(h):++i}return C33.Yh(e,i),t.W1t(),!!e.length}},C33=(GetInst=GetInst2,GetWorldInfo=GetWorldInfo2,GetInst_SDKv2=GetInst_SDKv22,GetWorldInfo_SDKv2=GetWorldInfo_SDKv22,GetObjectClass=GetObjectClass2,GetLayer=GetLayer2,CollMemory_Add=CollMemory_Add2,CollMemory_Remove=CollMemory_Remove2,CollMemory_RemoveInstance=CollMemory_RemoveInstance2,CollMemory_Get=CollMemory_Get2,DoOverlapCondition=DoOverlapCondition2,FinishCollisionConditionPicking=FinishCollisionConditionPicking2,FinishCollisionCondition=FinishCollisionCondition2,PickByUID_Normal=PickByUID_Normal2,PickByUID_Inverted=PickByUID_Inverted2,self.Bs),tempColor=new C33.Zo,AnySDK={},SDKv1={},SDKv2={},runtime=null,IInstance=(C33.vyt=function(t){runtime=t},self.Xk),IObjectClass=self.HF,ILayer=self.P$,tempRect=(SDKv1.Pyt=function(t,s){return C33.compare(this.UD().Ny(),t,s)},SDKv2.Pyt=function(t,s){return C33.compare(this.x,t,s)},SDKv1.Oyt=function(t,s){return C33.compare(this.UD().ky(),t,s)},SDKv2.Oyt=function(t,s){return C33.compare(this.y,t,s)},SDKv1.xyt=function(){return this.UD().I4()},SDKv2.xyt=function(){return this.E4()},AnySDK.Lyt=function(){const t=GetWorldInfo2(this),s=t.RD(),e=t._4();return e.$l()<0||e.kl()<0||e.Nl()>s.AC()||e.Fl()>s.OC()},AnySDK.Dyt=function(e,i,r){const t=GetObjectClass2(this),s=t.s$(),n=s.t$();if(!n.length)return!1;let h=n[0],o=h.UD(),a=h,l=C33.On(o.Ny(),o.ky(),i,r);for(let t=1,s=n.length;t<s;++t){h=n[t],o=h.UD();const c=C33.On(o.Ny(),o.ky(),i,r);(0===e&&c<l||1===e&&c>l)&&(l=c,a=h)}return s.ddt(a),!0},SDKv1.Fy=function(t){const s=this.UD();s.Ny()!==t&&(s.Fy(t),s.u4())},SDKv2.Fy=function(t){this.x=+t},SDKv1.By=function(t){const s=this.UD();s.ky()!==t&&(s.By(t),s.u4())},SDKv2.By=function(t){this.y=+t},SDKv1.Nyt=function(t,s){const e=this.UD();e.Fyt(t,s)||(e.f4(t,s),e.u4())},SDKv2.Nyt=function(t,s){this.setPosition(t,s)},AnySDK.$yt=function(t,s){if(t=GetObjectClass2(t)){const e=GetInst2(this),i=t.QF(e);if(i){const[r,n]=i.kyt(s),h=e.UD();h.Ny()===r&&h.ky()===n||(h.f4(r,n),h.u4())}}},AnySDK.Byt=function(t){if(0!==t){const s=GetWorldInfo2(this);s.m4(s.Wyt()*t,s.Hyt()*t),s.u4()}},SDKv1.Vyt=function(t,s){if(0!==s){const e=this.UD();t=C33.Mn(t),e.m4(Math.cos(t)*s,Math.sin(t)*s),e.u4()}},SDKv2.Vyt=function(t,s){0!==s&&(t=C33.Mn(t),this.C4(Math.cos(t)*s,Math.sin(t)*s))},SDKv1.Ny=function(){return this.UD().Ny()},SDKv2.Ny=function(){return this.x},SDKv1.ky=function(){return this.UD().ky()},SDKv2.ky=function(){return this.y},AnySDK.YL=function(){return runtime.YL(GetInst2(this))},SDKv1.Uyt=function(t,s){return C33.compare(this.UD().AC(),t,s)},SDKv2.Uyt=function(t,s){return C33.compare(this.width,t,s)},SDKv1.jyt=function(t,s){return C33.compare(this.UD().OC(),t,s)},SDKv2.jyt=function(t,s){return C33.compare(this.height,t,s)},SDKv1.GC=function(t){const s=this.UD();s.AC()!==t&&(s.GC(t),s.u4())},SDKv2.GC=function(t){this.width=t},SDKv1.EC=function(t){const s=this.UD();s.OC()!==t&&(s.EC(t),s.u4())},SDKv2.EC=function(t){this.height=t},SDKv1.cM=function(t,s){const e=GetWorldInfo2(this);e.AC()===t&&e.OC()===s||(e.cM(t,s),e.u4())},SDKv2.cM=function(t,s){this.m$(t,s)},SDKv1.AC=function(){return this.UD().AC()},SDKv2.AC=function(){return this.width},SDKv1.OC=function(){return this.UD().OC()},SDKv2.OC=function(){return this.height},AnySDK.Xyt=function(){return GetWorldInfo2(this)._4().Nl()},AnySDK.Yyt=function(){return GetWorldInfo2(this)._4().Fl()},AnySDK.qyt=function(){return GetWorldInfo2(this)._4().$l()},AnySDK.Kyt=function(){return GetWorldInfo2(this)._4().kl()},AnySDK.zyt=function(){const t=GetWorldInfo2(this)._4();return(t.Nl()+t.$l())/2},AnySDK.Jyt=function(){const t=GetWorldInfo2(this)._4();return(t.Fl()+t.kl())/2},AnySDK.Qyt=function(t,s){return C33.Ln(GetWorldInfo2(this).GetAngle(),C33.Mn(s))<=C33.Mn(t)},AnySDK.Zyt=function(t){return C33.Nn(GetWorldInfo2(this).GetAngle(),C33.Mn(t))},AnySDK.t_t=function(t,s){const e=C33.Mn(t),i=C33.Mn(s),r=GetWorldInfo2(this).GetAngle(),n=!C33.Nn(i,e);return n?!(!C33.Nn(r,e)&&C33.Nn(r,i)):C33.Nn(r,e)&&!C33.Nn(r,i)},SDKv1.y$=function(t){const s=this.UD(),e=C33.Rn(C33.Mn(t));isNaN(e)||s.GetAngle()===e||(s.y$(e),s.u4())},SDKv2.y$=function(t){this.y4=t},AnySDK.s_t=function(t){if(!isNaN(t)&&0!==t){const s=GetWorldInfo2(this);s.y$(s.GetAngle()+C33.Mn(t)),s.u4()}},AnySDK.e_t=function(t){if(!isNaN(t)&&0!==t){const s=GetWorldInfo2(this);s.y$(s.GetAngle()-C33.Mn(t)),s.u4()}},AnySDK.i_t=function(t,s){const e=GetWorldInfo2(this),i=e.GetAngle(),r=C33.Dn(i,C33.Mn(s),C33.Mn(t));isNaN(r)||i===r||(e.y$(r),e.u4())},AnySDK.r_t=function(t,s,e){const i=GetWorldInfo2(this),r=i.GetAngle(),n=s-i.Ny(),h=e-i.ky(),o=Math.atan2(h,n),a=C33.Dn(r,o,C33.Mn(t));isNaN(a)||r===a||(i.y$(a),i.u4())},AnySDK.n_t=function(t,s){const e=GetWorldInfo2(this),i=e.GetAngle(),r=t-e.Ny(),n=s-e.ky(),h=Math.atan2(n,r);isNaN(h)||i===h||(e.y$(h),e.u4())},SDKv1.GetAngle=function(){return C33.bn(this.UD().GetAngle())},SDKv2.GetAngle=function(){return this.y4},AnySDK.h_t=function(t,s){return C33.compare(C33.zn(100*GetWorldInfo2(this).VG(),6),t,s)},SDKv1.rk=function(){return this.UD().rk()},SDKv2.rk=function(){return this.isVisible},AnySDK.ek=function(t){const s=GetWorldInfo2(this);t=2===t?!s.rk():0!==t,s.rk()!==t&&(s.ek(t),runtime.JD())},AnySDK.jG=function(t){const s=C33.wn(t/100,0,1),e=GetWorldInfo2(this);if(e.m5()){if(e.Sht().o_t()===s)return}else if(e.VG()===s)return;e.jG(s),runtime.JD()},AnySDK.a_t=function(t){tempColor.La(t);const s=GetWorldInfo2(this);s.R4().wa(tempColor)||(s.M4(tempColor),runtime.JD())},AnySDK.YG=function(){const t=GetWorldInfo2(this).R4();return C33.Zn(t.Sa(),t.ya(),t._a(),t.Ta())},AnySDK.VG=function(){return C33.zn(100*GetWorldInfo2(this).VG(),6)},AnySDK.l_t=function(t){return!!(t=GetLayer2(t))&&GetWorldInfo2(this).jD()===t},AnySDK.c_t=function(e){const t=GetObjectClass2(this),s=t.s$(),i=s.t$();if(!i.length)return!1;let r=i[0],n=r;for(let t=1,s=i.length;t<s;++t){const h=i[t],o=h.UD(),a=n.UD(),l=o.jD().Yx(),c=a.jD().Yx();0===e?(c<l||l===c&&o.XD()>a.XD())&&(n=h):(l<c||l===c&&o.XD()<a.XD())&&(n=h)}return s.ddt(n),!0},SDKv1.u_t=function(t,s,e){const i=this.UD(),r=0===t?i.Wy():i.S4();return C33.compare(r,s,e)},SDKv2.u_t=function(t,s,e){const i=0===t?this.Ak:this.g4;return C33.compare(i,s,e)},SDKv1.f_t=function(){this.UD().G4()},SDKv2.f_t=function(){this.b4()},SDKv1.d_t=function(){this.UD().P4()},SDKv2.d_t=function(){this.v4()},AnySDK.p_t=function(t){(t=GetLayer2(t))&&GetWorldInfo2(this).x4(t)},AnySDK.C_t=function(t,s){const e=0===t;if(s=GetObjectClass2(s)){const i=GetInst2(this),r=s.m_t(i);r&&i.UD().D4(r,e)}},SDKv1.Hy=function(t){const s=this.UD();s.Wy()!==t&&(s.Hy(t),runtime.JD())},SDKv2.Hy=function(t){this.Ak=t},AnySDK.g_t=function(){return GetWorldInfo2(this).jD().Yx()},AnySDK.S_t=function(){return GetWorldInfo2(this).jD().pf()},SDKv1.y_t=function(){return this.UD().XD()},SDKv2.y_t=function(){return this.zIndex},SDKv1.__t=function(){return this.UD().Wy()},SDKv2.__t=function(){return this.Ak},SDKv1.T_t=function(){return this.UD().S4()},SDKv2.T_t=function(){return this.g4},AnySDK.A_t=function(t){const s=GetInst2(this),e=s.qk().d$().qrt(t);if(e){const i=e.Yx(),r=s.UD().l4();return r.Z5(i)}},AnySDK.E_t=function(t,s){const e=GetInst2(this),i=e.qk().d$().qrt(s);if(i){const r=i.Yx(),n=1===t,h=e.UD().l4();h.Z5(r)!==n&&(h.tW(r,n),h.sW(),runtime.JD())}},AnySDK.I_t=function(t,s,e){const i=GetInst2(this),r=i.qk().d$().qrt(t);if(r){s=Math.floor(s);const n=r.pE().mE(s);if(n){"color"===n?(tempColor.La(e),e=tempColor):"percent"===n&&(e/=100);const h=r.Yx(),o=i.UD().l4(),a=o.iW(h,s,e);a&&o.Z5(h)&&runtime.JD()}}},C33.yn(C33.Rect)),tempCandidates1=[],tempCandidates2=[],needsCollisionFinish=!1,rPickType=null,rPickFromElseInstances=!1,rToPick=new Set;function*DebugOnCollision(S){if(S){let t=this.cN(),s=t.tL(),i=t.RL(),e=i.kL(),r=i.n3t(),n=r.qk(),h=r.xSt(),o=r.LSt(),a=e.rU(),l=t.Ytt(),c=l-1,u=a.OL(),f=e.nU(u),d=h.get("collmemory"),p=(d||(d=C33.yn(C33.Cu),h.set("collmemory",d)),o.get("collisionCreatedDestroyCallback")||(o.set("collisionCreatedDestroyCallback",!0),t.ed().addEventListener("instancedestroy",t=>CollMemory_RemoveInstance2(d,t.q5))),n.s$()),C=S.s$(),m=p.t$(),g=null;for(let t=0;t<m.length;++t){const y=m[t];C.Jft()?(s.Myt(y.UD().jD(),S,y.UD()._4(),tempCandidates1),g=tempCandidates1,s.w_t(y,S,g)):g=C.t$();for(let t=0;t<g.length;++t){const _=g[t];if(s.PN(y,_)||s.R_t(y,_)){let t=CollMemory_Get2(d,y,_),s=!1,e=-2;"number"==typeof t&&(s=!0,e=t);const T=!s||e<c;if(CollMemory_Add2(d,y,_,l),T){const A=u.iU(),E=(i.cU(A),n.s$()),I=S.s$();if(E.rdt(!1),I.rdt(!1),n===S){const w=E.ndt();C33.qh(w),w.push(y),w.push(_),n.W1t()}else{const R=E.ndt(),M=I.ndt();C33.qh(R),C33.qh(M),R.push(y),M.push(_),n.W1t(),S.W1t()}yield*u.O1t(a,f),i.fU(A)}}else CollMemory_Remove2(d,y,_)}C33.qh(tempCandidates1)}e.mU()}return!1}AnySDK.M_t=function(g){const t=GetObjectClass2(this),S=(g=GetObjectClass2(g),t.cN());if(S.b_t())return DebugOnCollision.call(t,g);if(g){let s=S.tL(),i=S.RL(),t=i.kL(),e=i.n3t(),r=e.qk(),n=e.xSt(),h=e.LSt(),o=t.rU(),a=S.Ytt(),l=a-1,c=o.OL(),u=t.nU(c),f=n.get("collmemory"),d=(f||(f=C33.yn(C33.Cu),n.set("collmemory",f)),h.get("collisionCreatedDestroyCallback")||(h.set("collisionCreatedDestroyCallback",!0),S.ed().addEventListener("instancedestroy",t=>CollMemory_RemoveInstance2(f,t.q5))),r.s$()),p=g.s$(),C=d.t$(),m=null;for(let t=0;t<C.length;++t){const y=C[t];p.Jft()?(s.Myt(y.UD().jD(),g,y.UD()._4(),tempCandidates1),m=tempCandidates1,s.w_t(y,g,m)):m=p.t$();for(let t=0;t<m.length;++t){const _=m[t];if(s.PN(y,_)||s.R_t(y,_)){let t=CollMemory_Get2(f,y,_),s=!1,e=-2;"number"==typeof t&&(s=!0,e=t);const T=!s||e<l;if(CollMemory_Add2(f,y,_,a),T){const A=c.iU(),E=(i.cU(A),r.s$()),I=g.s$();if(E.rdt(!1),I.rdt(!1),r===g){const w=E.ndt();C33.qh(w),w.push(y),w.push(_),r.W1t()}else{const R=E.ndt(),M=I.ndt();C33.qh(R),C33.qh(M),R.push(y),M.push(_),r.W1t(),g.W1t()}c.uU(o,u),i.fU(A)}}else CollMemory_Remove2(f,y,_)}C33.qh(tempCandidates1)}t.mU()}return!1},AnySDK.G_t=function(t){return t=GetObjectClass2(t),DoOverlapCondition2(GetInst2(this),t,0,0)},AnySDK.v_t=function(t,s,e){return t=GetObjectClass2(t),DoOverlapCondition2(GetInst2(this),t,s,e)},AnySDK.P_t=function(){return!0},AnySDK.s5=function(){return GetWorldInfo2(this).s5()},AnySDK.B8=function(){return GetWorldInfo2(this).B8()},AnySDK.O_t=function(e,i){const t=GetObjectClass2(this),s=(e=GetObjectClass2(e),t.cN()),r=this.s$(),n=r.t$();if(0===n.length)return!1;let h=e.s$(),o=h.t$();if(h.Jft()){const c=[...s.x_t(e)];0<c.length&&(o=o.concat(c))}if(0===o.length)return!1;const a=h.Jft()?null:new Set(o),l=new Set;for(let t=0,s=n.length;t<s;++t){const u=n[t];if(1===i)for(const f of u.j4())f.L_t(e)&&(null===a||a.has(f))&&l.add(f);else{let t;if(0===i){if(null===(t=u.H4()))continue}else t=u.U4();t.L_t(e)&&(null===a||a.has(t))&&l.add(t)}}return 0!==l.size&&(h.ldt(l),e.W1t(),!0)},AnySDK.D_t=function(e,i){const t=GetObjectClass2(this),s=(e=GetObjectClass2(e),t.cN()),r=t.s$(),n=r.t$();if(0===n.length)return!1;let h=e.s$(),o=h.t$();if(h.Jft()){const c=[...s.x_t(e)];0<c.length&&(o=o.concat(c))}if(0===o.length)return!1;const a=h.Jft()?null:new Set(o),l=new Set;for(let t=0,s=n.length;t<s;++t){const u=n[t];2!==i||u.B8()||!u.L_t(e)||null!==a&&!a.has(u)||l.add(u);for(const f of 0===i?u.children():u.z4())2===i&&f.B8()||f.L_t(e)&&(null===a||a.has(f))&&l.add(f)}return 0!==l.size&&(h.ldt(l),e.W1t(),!0)},AnySDK.N_t=function(e,i,r){const t=GetObjectClass2(this),s=(e=GetObjectClass2(e),t.cN()),n=t.s$(),h=n.t$();if(0===h.length)return!1;let o=e.s$(),a=o.t$();if(o.Jft()){const u=[...s.x_t(e)];0<u.length&&(a=a.concat(u))}if(0===a.length)return!1;const l=o.Jft()?null:new Set(a),c=[];for(let t=0,s=h.length;t<s;++t){const f=h[t];if(0===i){const d=f.K4(r);null!==d&&d.L_t(e)&&(null===l||l.has(d))&&c.push(d)}else if(1===i)for(const p of f.children())if(p.L_t(e)){if(0===r){null!==l&&!l.has(p)||c.push(p);break}--r}}return 0!==c.length&&(o.adt(c),e.W1t(),!0)},AnySDK.F_t=function(t,s,e){const i=GetInst2(this);switch(t){case 0:default:return C33.compare(i.Y4(),s,e);case 1:return C33.compare(i.$_t(),s,e)}},AnySDK.Q4=function(t,s,e,i,r,n,h,o,a,l){t=GetObjectClass2(t);const c=GetInst2(this),u=runtime.o3t().qk();for(const f of t.k_t(c,u)){if(!f.UF().vF())return;c.Q4(f,{i5:s,n5:e,o5:i,l5:r,u5:n,C5:h,d5:o,g5:a,y5:l})}},AnySDK.Z4=function(t){t=GetObjectClass2(t);const s=GetInst2(this),e=runtime.o3t().qk();for(const i of t.k_t(s,e))s.Z4(i)},AnySDK.B_t=function(){const t=GetInst2(this);if(t.s5()){const s=t.H4();s.Z4(t)}},AnySDK.W_t=function(){const t=GetInst2(this).H4();return t?t.oB():-1},AnySDK.H_t=function(){return GetInst2(this).Y4()},AnySDK.V_t=function(){return GetInst2(this).$_t()},AnySDK.U_t=function(t,s){t=Math.floor(t),s=Math.floor(s);const e=GetWorldInfo2(this);t<2||s<2||!isFinite(t)||!isFinite(s)?(e.I5(),e.u4()):e.A5(t,s)},AnySDK.R5=function(t,s,e,i,r,n,h,o){const a=GetWorldInfo2(this),l=a.R5(t,s,{mode:0===e?"absolute":"relative",x:i,y:r,Ak:n,u:h,v:o});l&&a.u4()},AnySDK.j_t=function(){const t=GetWorldInfo2(this);return t.b5()?t.G5().u_():0},AnySDK.X_t=function(){const t=GetWorldInfo2(this);return t.b5()?t.G5().f_():0},AnySDK.Y_t=function(t){const s=GetWorldInfo2(this);t=2===t?!s.rk():0!==t,s.rk()!==t&&s.ek(t)},AnySDK.W5=function(t,s){this instanceof self.Xk?this.TV(t,s):this.W5(t,s)},AnySDK.q_t=function(t,s){this instanceof self.Xk?this.AV(t,""+s):this.q_t(t,""+s)},AnySDK.K_t=function(t){this instanceof self.Xk?this.EV(t):this.K_t(t)},AnySDK.z_t=function(){this instanceof self.Xk?this.SV():this.F5()},AnySDK.J_t=function(){this instanceof self.Xk?this.yV():this.k5()},AnySDK.Q_t=function(){return this instanceof self.Xk?this._V():this.Q_t()},AnySDK.Z_t=function(t){this instanceof self.Xk?this._setEnabled(0!==t):this.tTt(0!==t)},AnySDK.sTt=function(){return this instanceof self.Xk?this.n2t():this.eTt()},SDKv1.iTt=function(t,s,e){return C33.compare(this.fH().oht(t),s,e)},SDKv2.iTt=function(t,s,e){return C33.compare(GetInst_SDKv22(this).oht(t),s,e)},SDKv1.rTt=function(t){return!!this.fH().oht(t)},SDKv2.rTt=function(t){return!!GetInst_SDKv22(this).oht(t)},AnySDK.nTt=function(e,i){const r=GetObjectClass2(this),t=r.s$(),n=t.t$();if(!n.length)return!1;let h=r.aq(),o=null,a=0;for(let t=0,s=n.length;t<s;++t){const l=n[t],c=h?l.qk().agt(r.lgt()):0,u=l.oht(c+i);(null===o||0===e&&u<a||1===e&&u>a)&&(a=u,o=l)}return t.ddt(o),!0},AnySDK.hTt=function(t){const s=GetObjectClass2(this);return(s.cN().n3t().bSt()?PickByUID_Inverted2:PickByUID_Normal2)(s,t)},AnySDK.jW=function(t){const s=new Set(C33.do(t)),e=GetInst2(this).mB();return s.isSubsetOf(e)},AnySDK.oTt=function(){return GetInst2(this).aTt()},AnySDK.lTt=function(){return GetInst2(this).mB().size},AnySDK.cTt=function(t){return GetInst2(this).uTt(t)},AnySDK.fTt=function(t,s){const e=C33.do(s);if(0!==e.length){const i=GetInst2(this),r=new Set(i.mB());if(0===t)for(const n of e)r.add(n);else if(1===t)for(const h of e)r.delete(h);i.SB(r)}},AnySDK.dTt=function(){runtime.tB(GetInst2(this))},AnySDK.pTt=function(){return!0},AnySDK.CTt=function(){return!0},SDKv1.mTt=function(t,s){this.fH().aht(t,s)},SDKv2.mTt=function(t,s){GetInst_SDKv22(this).aht(t,s)},SDKv1.gTt=function(t,s){const e=this.fH(),i=e.oht(t);"number"==typeof i&&"number"!=typeof s?s=parseFloat(s):"string"==typeof i&&"string"!=typeof s&&(s=s.toString()),e.aht(t,i+s)},SDKv2.gTt=function(t,s){const e=GetInst_SDKv22(this),i=e.oht(t);"number"==typeof i&&"number"!=typeof s?s=parseFloat(s):"string"==typeof i&&"string"!=typeof s&&(s=s.toString()),e.aht(t,i+s)},SDKv1.STt=function(t,s){const e=this.fH(),i=e.oht(t);"number"==typeof i&&("number"!=typeof s&&(s=parseFloat(s)),e.aht(t,i-s))},SDKv2.STt=function(t,s){const e=GetInst_SDKv22(this),i=e.oht(t);"number"==typeof i&&("number"!=typeof s&&(s=parseFloat(s)),e.aht(t,i-s))},SDKv1.yTt=function(t,s){this.fH().aht(t,s?1:0)},SDKv2.yTt=function(t,s){GetInst_SDKv22(this).aht(t,s?1:0)},SDKv1._Tt=function(t){const s=this.fH();s.aht(t,0===s.oht(t)?1:0)},SDKv2._Tt=function(t){const s=GetInst_SDKv22(this);s.aht(t,0===s.oht(t)?1:0)},AnySDK.TTt=function(t){let s;try{s=JSON.parse(t)}catch(t){return void console.error("Failed to load from JSON string: ",t)}const e=GetInst2(this);runtime.ATt(),e.t9("state"),e.zy(s,"state"),runtime.ETt("state",{ITt:!0})},AnySDK.wTt=function(){return JSON.stringify(GetInst2(this).Ky("state"))},AnySDK.RTt=function(){return GetInst2(this).qk().pf()},AnySDK.MTt=function(){let t=runtime.r3t().Udt(),s=t.i$();for(const e of runtime.x_t(t))++s;return s},AnySDK.bTt=function(){return runtime.r3t().Udt().s$().t$().length},SDKv1.lB=function(){return this.fH().lB()},SDKv2.lB=function(){return GetInst_SDKv22(this).lB()},SDKv1.oB=function(){return this.fH().oB()},SDKv2.oB=function(){return GetInst_SDKv22(this).oB()},AnySDK.vpt=function(t){const s=GetInst2(this);return t.toLowerCase()===runtime.RL().Lpt(s)},AnySDK._B=function(t){const s=GetInst2(this);runtime.RL()._B(s,t)},AnySDK.GTt=function(t){const s=GetObjectClass2(this);return runtime.RL().hpt().vTt(s.s$().t$(),t),!0},AnySDK.PTt=function(){return GetInst2(this).uB()},C33.OTt=function(t,s,e){const i=t[1],r=t[3],n=t[4],h=t[5],o=t[6],a=t[7],l=t[8],c=t[10],u=t[11],f=t[12],d=t[13],p=t[14],C=t[15],m=t[16],g=s.MJ,S=s.pnt,y=s.Cnt,_=Object.assign({},AnySDK,2<=e?SDKv2:SDKv1);r&&(g.Pyt=_.Pyt,g.Oyt=_.Oyt,g.xyt=_.xyt,g.Lyt=_.Lyt,g.Dyt=_.Dyt,S.Fy=_.Fy,S.By=_.By,S.Nyt=_.Nyt,S.$yt=_.$yt,S.Byt=_.Byt,S.Vyt=_.Vyt,y.xTt=_.Ny,y.LTt=_.ky,y.dt=_.YL),n&&(g.Uyt=_.Uyt,g.jyt=_.jyt,S.GC=_.GC,S.EC=_.EC,S.cM=_.cM,y.DTt=_.AC,y.NTt=_.OC,y.FTt=_.Xyt,y.$Tt=_.Yyt,y.kTt=_.qyt,y.BTt=_.Kyt,y.WTt=_.zyt,y.HTt=_.Jyt),h&&(g.VTt=_.Qyt,g.UTt=_.Zyt,g.t_t=_.t_t,S.y$=_.y$,S.s_t=_.s_t,S.e_t=_.e_t,S.i_t=_.i_t,S.r_t=_.r_t,S.n_t=_.n_t,y.jTt=_.GetAngle),o&&(g.rk=_.rk,g.h_t=_.h_t,S.ek=_.ek,S.jG=_.jG,S.a_t=_.a_t,y.Opacity=_.VG,y.XTt=_.YG),a&&(g.l_t=_.l_t,g.c_t=_.c_t,g.u_t=_.u_t,S.f_t=_.f_t,S.d_t=_.d_t,S.p_t=_.p_t,S.C_t=_.C_t,S.Hy=_.Hy,y.g_t=_.g_t,y.S_t=_.S_t,y.y_t=_.y_t,y.__t=_.__t,y.T_t=_.T_t),l&&(g.A_t=_.A_t,S.E_t=_.E_t,S.I_t=_.I_t),d&&(g.P_t=_.P_t,g.s5=_.s5,g.B8=_.B8,g.O_t=_.O_t,g.D_t=_.D_t,g.N_t=_.N_t,g.F_t=_.F_t,S.Q4=_.Q4,S.Z4=_.Z4,S.B_t=_.B_t,y.W_t=_.W_t,y.H_t=_.H_t,y.V_t=_.V_t),p&&(S.U_t=_.U_t,S.R5=_.R5,y.j_t=_.j_t,y.X_t=_.X_t),c&&(g.rk=_.rk,S.ek=_.Y_t,S.YTt=_.W5,S.qTt=_.q_t,S.KTt=_.K_t),u&&(g.zTt=_.Q_t,S.JTt=_.z_t,S.QTt=_.J_t),f&&(g.pu=_.sTt,S.ZTt=_.Z_t),C&&(g.M_t=_.M_t,g.G_t=_.G_t,g.v_t=_.v_t,s.tAt=FinishCollisionCondition2),i||(g.iTt=_.iTt,g.rTt=_.rTt,g.nTt=_.nTt,g.hTt=_.hTt,g.jW=_.jW,S.mTt=_.mTt,S.gTt=_.gTt,S.STt=_.STt,S.yTt=_.yTt,S._Tt=_._Tt,S.fTt=_.fTt,g.pTt=_.pTt,g.CTt=_.CTt,S.dTt=_.dTt,S.TTt||(S.TTt=_.TTt),y.wTt||(y.wTt=_.wTt),y.MTt=_.MTt,y.bTt=_.bTt,y.sAt=_.lB,y.eAt=_.oB,y.RTt=_.RTt,y.oTt=_.oTt,y.lTt=_.lTt,y.cTt=_.cTt,g.vpt=_.vpt,S._B=_._B,S.GTt=_.GTt),m&&(y.PTt=_.PTt)}}{const C33=self.Bs;C33.opt=class extends C33.gn{constructor(t){super(),this.mdt=t,this.vf="",this.SO=-1,this.iAt="",this.rAt=!1,this.nAt=null,this.wdt=0,this.ZCt=[],this.Pdt=null,this.hAt=new Map,this.oAt=null,this.aAt=null,this.lAt=-1,this.r2t=null,this.cAt=null,this.uAt=!1}_n(){this.vf="",this.SO=-1,this.iAt="",this.nAt=null,this.aAt=null,this.r2t=null,this.cAt=null,this.lAt=-1,C33.qh(this.ZCt),this.Pdt&&(this.Pdt.clear(),this.Pdt=null);for(const t of this.hAt.values())t._n();this.hAt.clear(),this.oAt=null}Dy(){const t=this.mdt,s=t.cN().oq(),e=t.r3t(),i=(this.nAt=e.OL(),this.wdt=e.Fdt()+1,t.Qpt(this.nAt));i&&(this.aAt=i,this.r2t=i.T2t(),this.cAt=i._2t().map(t=>t.Wit()),i.w1t())&&(this.lAt=i.w2t());for(const n of s){const h=n.s$();h.Jft()&&!this.nAt.Kmt(n)||(this.ZCt.push(n),this.hAt.set(n,C33.yn(C33.fAt,h)))}const r=t.xL();this.Pdt=0<r.size?r:null}dAt(t){this.vf="timer",this.Dy(),this.SO=this.mdt.cN().zL()+t}pAt(t){this.vf="walltimer",this.Dy(),this.SO=this.mdt.cN().QL()+t}CAt(t){this.vf="signal",this.Dy(),this.iAt=t.toLowerCase()}vTt(t,s){this.vf="instance-signals",this.Dy(),this.iAt=s.toLowerCase(),this.oAt=new Set(t)}mAt(t){this.vf="promise",this.Dy(),t.then(()=>this.Rpt()).catch(t=>{console.warn("[C3 runtime] Promise rejected in 'Wait for previous actions to complete': ",t),this.Rpt()})}gAt(){return"timer"===this.vf}SAt(){return"walltimer"===this.vf}Ipt(){return"signal"===this.vf}Opt(){return"instance-signals"===this.vf}qpt(){return"promise"===this.vf}wpt(){return this.iAt}yAt(){return this.rAt}Rpt(){this.rAt=!0}xpt(t){this.oAt.delete(t),0===this.oAt.size&&this.Rpt()}cpt(){return this.gAt()?this.SO<=this.mdt.cN().zL():this.SAt()?this.SO<=this.mdt.cN().QL():this.yAt()}_At(t){t.Odt(this.nAt,this.wdt);for(const[e,i]of this.hAt.entries()){const r=e.s$();i.Odt(r)}this.Pdt&&t.zdt([...this.Pdt]);const s=this.aAt;s&&(s.N1t(this.r2t),s._2t().map((t,s)=>t.Art(this.cAt[s])),s.w1t())&&s.R2t(this.lAt)}upt(t){this._At(t),this.nAt.R1t(t),this.aAt&&this.aAt.w1t()&&this.aAt.X1t(this.lAt),this.mdt.ept(this.ZCt),this.uAt=!0}async Cpt(t){this._At(t);for(const s of this.nAt.M1t(t))await this.mdt.cN().k3t(s);this.aAt&&this.aAt.w1t()&&this.aAt.X1t(this.lAt),this.mdt.ept(this.ZCt),this.uAt=!0}fpt(){return this.uAt}Xft(t){for(const s of this.hAt.values())s.Xft(t);if("instance-signals"===this.vf){for(const e of t)this.oAt.delete(e);0===this.oAt.size&&this.Rpt()}}D8(){const t={},s={wt:this.vf,t:this.SO,st:this.iAt,s:this.rAt,ev:this.nAt.gq(),sm:this.ZCt.map(t=>t.gq()),dsm:this.Pdt?[...this.Pdt].map(t=>t.gq()):null,sols:t};this.nAt.d1t(this.wdt)&&(s.act=this.nAt.a3t(this.wdt).gq());for(const[e,i]of this.hAt)t[e.gq().toString()]=i.D8();return"instance-signals"===this.vf&&(s.pi=[...this.oAt].map(t=>t.oB())),s}static Kpt(t,s){const e=t.cN(),i=t.g3t(s.ev);if(!i)return null;let r=0;if(s.hasOwnProperty("act")){const h=t.y3t(s.act);if(!h)return null;r=h.Yx()}const n=C33.yn(C33.opt,t);n.SO=s.t,s.hasOwnProperty("wt")?n.vf=s.wt:n.vf=-1===n.SO?"signal":"timer",n.iAt=s.st,n.rAt=s.s,n.nAt=i,n.wdt=r;for(const o of s.sm){const a=e.zV(o);a&&n.ZCt.push(a)}if(Array.isArray(s.dsm))for(const l of s.dsm){const c=e.zV(l);c&&(n.Pdt||(n.Pdt=new Set),n.Pdt.add(c))}for(const[u,f]of Object.entries(s.sols)){const d=parseInt(u,10),p=e.zV(d);if(p){const C=C33.yn(C33.fAt,null);C.N8(t,f),n.hAt.set(p,C)}}if("instance-signals"===n.vf){n.oAt=new Set;for(const m of s.pi){const g=e.kD(m);g&&n.oAt.add(g)}}return n}}}{const C33=self.Bs;C33.fAt=class extends C33.gn{constructor(t){super(),this.kft=null,this.TAt=!0,this.r6=[],t&&(this.kft=t.qk(),this.TAt=t.Jft(),C33.Qh(this.r6,t.ndt()))}_n(){this.kft=null,C33.qh(this.r6)}Odt(t){t.rdt(this.TAt),C33.Qh(t.ndt(),this.r6)}Xft(t){C33.ho(this.r6,t)}D8(){return{sa:this.TAt,insts:this.r6.map(t=>t.oB())}}N8(t,s){const e=t.cN();this.TAt=!!s.sa,C33.qh(this.r6);for(const i of s.insts){const r=e.kD(i);r&&this.r6.push(r)}}}}{let GetNextParamMap2=function(t,s){let e=t.get(s);return e||(e=new Map,t.set(s,e)),e};GetNextParamMap=GetNextParamMap2;const C33=self.Bs;C33.AAt=class extends C33.gn{constructor(t){super(),this.Af=t.runtime,this.En=t.name??"",this.EAt=!!t.gF,this.IAt=!!t.wAt,this.RAt=!!t.EF,this.MAt=!!t.bAt,this.GAt=!!t.wF,this.vAt=!!t.PAt,this.OAt=!!t.PF,this.xAt=!!t.TF,this.LAt=!!t.MF,this.DAt=t.NAt,this.FAt=null,this.$At=new Map,this.kAt=new Map,this.BAt=new Map,this.WAt=new Map,this.HAt=t.VAt,this.UAt=null}_n(){this.Af=null}cN(){return this.Af}pf(){return this.En}jAt(){}Ppt(){return(2<=this.MSt()?this.UAt:this).constructor}MSt(){return this.DAt}XAt(t=!1){let s=this.HAt;return t&&"function"!=typeof s&&2<=this.MSt()?globalThis.yH:s}SF(){return this.EAt}_F(){return this.IAt}AF(){return this.xAt}bF(){return this.LAt}IF(){return this.RAt}iy(){return this.MAt}RF(){return this.GAt}vF(){return this.vAt}OF(){return this.OAt}z2t(t,s){if(!s)throw new Error("missing 'this' binding");let e=this.$At.get(t);return e||(e=t.bind(s),this.$At.set(t,e)),e}ESt(t,s,e){if(!s)throw new Error("missing 'this' binding");let i=GetNextParamMap2(this.kAt,t),r=i.get(e);return r||(r=t.bind(s,e),i.set(e,r)),r}ISt(t,s,e,i){if(!s)throw new Error("missing 'this' binding");let r=GetNextParamMap2(this.BAt,t),n=GetNextParamMap2(r,e),h=n.get(i);return h||(h=t.bind(s,e,i),n.set(i,h)),h}wSt(t,s,e,i,r){if(!s)throw new Error("missing 'this' binding");let n=GetNextParamMap2(this.WAt,t),h=GetNextParamMap2(n,e),o=GetNextParamMap2(h,i),a=o.get(r);return a||(a=t.bind(s,e,i,r),o.set(r,a)),a}YAt(t){if(!this.SF())throw new Error("must be single-global plugin");this.FAt=t}kF(){if(this.SF())return this.FAt;throw new Error("must be single-global plugin")}WF(){if(this.SF())return this.FAt.WF();throw new Error("must be single-global plugin")}qAt(){const t=this.MSt(),s=(C33.CF.KAt(this,t),this.XAt(!0));if(s){if(this.UAt=new s,!(this.UAt instanceof self.fF))throw new TypeError("plugin class must derive from IPlugin")}else this.UAt=new self.fF;C33.CF.zAt(t)}NF(){return this.UAt}}}{const C33=self.Bs;C33.JAt=class extends C33.AAt{constructor(t,s){super(t),this.QAt=s,this.ZAt=0,this.tEt=new Map,this.sEt("elem-focused",t=>t.eEt()),this.sEt("elem-blurred",t=>{t&&t.iEt()})}_n(){super._n()}rEt(t){const s=this.ZAt++;return this.tEt.set(s,t),s}nEt(t){this.tEt.delete(t)}sEt(t,e){this.Af.kB(this.QAt,t,t=>{const s=this.tEt.get(t.elementId);e(s,t)})}}}{const C33=self.Bs;C33.hEt=class extends C33.gn{constructor(t){super(),this.kft=t,this.Af=t.cN(),this.oEt=t.UF()}_n(){this.kft=null,this.Af=null,this.oEt=null}qk(){return this.kft}cN(){return this.Af}UF(){return this.oEt}TW(){return this.kft.TW()}jAt(){}kSt(t){}Iyt(t){}wyt(t){}zz(t){}eJ(){}Zz(){}EJ(t){}aEt(){}XAt(){return null}lEt(t,s,e){const i=C33.yn(C33.Event,t,s);i.cEt=this,e&&Object.assign(i,e),this.qk().r7(i)}}}{const C33=self.Bs;C33.uEt=class extends C33.gn{constructor(t,s){super(),this.Ge=t,this.QAt=s,this.fEt=null,this.Af=t.cN(),this.kft=this.Ge.qk(),this.dEt=this.kft.Eyt(),this.V7=null,this.j7=null,this.XB=!1,this.qB=!1,this.Wd=null,this.LR=!1}_n(){this.LR=!0,this.pEt(),this.CEt(),this.V7=null,this.j7=null,this.Wd&&(this.Wd._n(),this.Wd=null),this.Ge=null,this.Af=null,this.kft=null,this.dEt=null}Tn(){return this.LR}fH(){return this.Ge}cN(){return this.Af}qk(){return this.kft}UF(){return this.dEt.UF()}Eyt(){return this.dEt}mEt(){return this.Ge.BD()}LB(t){return this.Af.LB(t,this.Ge,null)}gEt(t){return this.Af.gEt(t,this.Ge,null)}NB(t){return this.Af.NB(t,this.Ge,null)}SEt(t,s){return this.Af.SEt(t,this.Ge,s)}yEt(t,s){return this.Af.yEt(t,this.Ge,s)}_Et(t){return this.Af._Et(t)}TEt(t,s){this.Af.kB(this.QAt,t,s)}AEt(t){for(const[s,e]of t)this.TEt(s,e)}EEt(t,s){this.Af.wf(this.QAt,t,s)}IEt(t,s){return this.Af.ZD(this.QAt,t,s)}wEt(t,s){if(!this.Af.cL())return window.c3_runtimeInterface._OnMessageFromRuntime({type:"event",component:this.QAt,handler:t,data:s,responseId:null});this.EEt(t,s)}REt(t){if(!t)throw new Error("cannot set empty component id");this.fEt=t}MEt(){if(this.fEt)return this.Af.ZB(this.fEt);throw new Error("wrapper extension component id not set")}s4(t,s){if(!this.fEt)throw new Error("wrapper extension component id not set");this.Af.s4(this.fEt,t,s)}bEt(t){for(const[s,e]of t)this.s4(s,e)}BV(t,s){if(!this.fEt)throw new Error("wrapper extension component id not set");this.Af.BV(this.fEt,t,s)}WV(t,s){if(this.fEt)return this.Af.WV(this.fEt,t,s);throw new Error("wrapper extension component id not set")}Z9(){}GEt(){}vEt(){if(!this.XB){if(!this.V7)if(this.Af.UB()){const s=globalThis.C3Debugger,e=this.UF();this.V7=()=>{const t=performance.now();this.Z9(),s.AddIndividualPluginTickTime(e,performance.now()-t)}}else this.V7=()=>this.Z9();this.Af.ed().addEventListener("tick",this.V7),this.XB=!0}}pEt(){this.XB&&(this.Af.ed().removeEventListener("tick",this.V7),this.XB=!1)}PEt(){return this.XB}OEt(){if(!this.qB){if(!this.j7)if(this.Af.UB()){const s=globalThis.C3Debugger,e=this.UF();this.j7=()=>{const t=performance.now();this.GEt(),s.AddIndividualPluginTickTime(e,performance.now()-t)}}else this.j7=()=>this.GEt();this.Af.ed().addEventListener("tick2",this.j7),this.qB=!0}}CEt(){this.qB&&(this.Af.ed().removeEventListener("tick2",this.j7),this.qB=!1)}xEt(){return this.qB}LEt(){return[]}Ky(){return null}zy(t){}Qnt(t){}rht(t,s){}Qht(t,s,e){if(0!==s){const i=this.Qnt(t);if("number"!=typeof i)throw new Error("expected number");this.rht(t,i+s,e)}}DEt(t,s,e,i){}NEt(t,...s){t.call(this,...s)}FEt(t,...s){return t.call(this,...s)}XAt(){return null}lEt(t,s,e){if(this.Ge.$Et()){const i=this.mEt(),r=C33.yn(C33.Event,t,s);r.q5=i,e&&Object.assign(r,e),i.dispatchEvent(r)}}iy(){return!1}}}{const C33=self.Bs;C33.kEt=class extends C33.uEt{constructor(t,s){super(t,s),this.Xst=t.UD(),this.BEt=null,this.WEt=null}_n(){if(this.BEt){const t=this.Af.ed();t.removeEventListener("renderercontextlost",this.BEt),t.removeEventListener("renderercontextrestored",this.WEt),this.BEt=null,this.WEt=null}this.Xst=null,super._n()}HEt(){this.VEt()}UEt(){}jEt(){}VEt(){if(!this.BEt){this.BEt=()=>this.zX(),this.WEt=()=>this.XEt();const t=this.Af.ed();t.addEventListener("renderercontextlost",this.BEt),t.addEventListener("renderercontextrestored",this.WEt)}}zX(){this.UEt()}XEt(){this.jEt()}UD(){return this.Xst}ket(){return!1}$et(){if(!this.ket())throw new Error("original size not known");const t=this.YEt();if(t)return t.AC()}Wet(){if(!this.ket())throw new Error("original size not known");const t=this.YEt();if(t)return t.OC()}YEt(){return null}qEt(){const t=this.YEt();if(t){const s=t.KT();if(s)return[s.AC(),s.OC()]}return[100,100]}KEt(){const t=this.YEt();return t?t.WM():null}zEt(){const t=this.YEt();return t?t.JEt():null}QEt(){const t=this.YEt();return!!t&&t.ZEt()}kyt(t){const s=this.Ge.UD();return[s.Ny(),s.ky(),s.S4()]}aEt(t,s,e){}tIt(t,s){}f8(){return!0}}}{const C33=self.Bs,tempRect=C33.yn(C33.Rect);C33.sIt=class extends C33.kEt{constructor(t,s){super(t,s),this.eIt=this.UF().rEt(this),this.iIt=!0,this.rIt=!1,this.nIt=!1,this.hIt=-.2,this.oIt=C33.yn(C33.Rect,0,0,-1,-1);const e=this.Af.QN();this.aIt=e.eV(),this.lIt=e.iV(),this.cIt=-1,this.uIt=-1,this.fIt=!1,this.vEt()}_n(){this.UF().nEt(this.eIt),this.dIt("destroy"),this.eIt=-1,super._n()}D5(){if(this.Af.cL())throw new Error("not valid in worker mode");return this.pIt("get-element")}dIt(t,s){(s=s||{}).elementId=this.eIt,this.EEt(t,s)}pIt(t,s){return(s=s||{}).elementId=this.eIt,this.wEt(t,s)}CIt(t,s){return(s=s||{}).elementId=this.eIt,this.IEt(t,s)}mIt(t){t=t||{};const s=this.UD();t.elementId=this.eIt,t.isVisible=s.rk(),t.htmlIndex=s.jD().lV(),t.htmlZIndex=s.cV(),Object.assign(t,this.gIt()),this.iIt=!!t.isVisible,this.wEt("create",t),this.SIt(!0)}Y_t(t){this.iIt!==(t=!!t)&&(this.iIt=t,this.dIt("set-visible",{isVisible:t}))}Z9(){this.SIt(!1)}yIt(){const t=this.Af.QN().CV();return"Android"===C33.pe.Ce&&("scale-inner"===t||"scale-outer"===t||"crop"===t)}SIt(c){if(!this.fH().mV()){let t=this.UD(),s=t.jD(),e=t._4(),[i,r]=s.kk(e.Nl(),e.Fl()),[n,h]=s.kk(e.$l(),e.kl()),o=this.Af.QN(),a=o.eF(),l=o.rF();if(t.rk()&&s.rk())if(!this.yIt()&&(n<=0||h<=0||a<=i||l<=r))this.Y_t(!1);else{tempRect.set(i,r,n,h);const u=o.eV(),f=o.iV(),d=s.lV(),p=t.cV();if(!c&&tempRect.equals(this.oIt)&&this.aIt===u&&this.lIt===f&&this.cIt===d&&this.uIt===p)this.Y_t(!0);else{this.oIt.I(tempRect),this.aIt=u,this.lIt=f,this.cIt=d,this.uIt=p,this.Y_t(!0);let t=null;this.nIt&&(t=s.gV()+this.hIt),this.dIt("update-position",{left:Math.round(this.oIt.Nl()),top:Math.round(this.oIt.Fl()),width:Math.round(this.oIt.width()),height:Math.round(this.oIt.height()),htmlIndex:d,htmlZIndex:p,fontSize:t})}}else this.Y_t(!1)}}F5(){this.pIt("focus",{focus:!0})}k5(){this.pIt("focus",{focus:!1})}eEt(){this.rIt=!0}iEt(){this.rIt=!1}Q_t(){return this.rIt}W5(t,s){this.dIt("set-css-style",{prop:C33.zo(t),val:s})}q_t(t,s){this.dIt("set-attribute",{name:t,val:s})}K_t(t){this.dIt("remove-attribute",{name:t})}_It(){this.fIt||(this.fIt=!0,Promise.resolve().then(()=>{this.fIt=!1,this.dIt("update-state",this.gIt())}))}gIt(){}TIt(){return this.eIt}}}{const C33=self.Bs,IBehavior=self.J5;C33.AIt=class extends C33.gn{constructor(t){super(),this.Af=t.runtime,this.En=t.name??"",this.EIt=C33.yn(C33.Eu),this.IIt=C33.yn(C33.Eu),this.DAt=t.NAt,this.HAt=t.VAt,this.wIt=null}_n(){this.IIt._n(),this.EIt._n(),this.Af=null}cN(){return this.Af}pf(){return this.En}jAt(){}MSt(){return this.DAt}XAt(t=!1){let s=this.HAt;return t&&"function"!=typeof s&&2<=this.MSt()?globalThis.RV:s}RIt(t){this.EIt.Mu(t)}w9(){return this.EIt.bu()}KY(t){this.IIt.Mu(t)}QY(t){this.IIt.yu(t)}t$(){return this.IIt.bu()}qAt(){const t=this.MSt(),s=(C33.CF.KAt(this,t),this.XAt(!0));if(s){if(this.wIt=new s,!(this.wIt instanceof IBehavior))throw new TypeError("behavior class must derive from IBehavior")}else this.wIt=new IBehavior;C33.CF.zAt(t)}V5(){return this.wIt}}}{const C33=self.Bs;C33.MIt=class extends C33.gn{constructor(t){super(),this.Af=t.cN(),this.ugt=t,this.kft=t.qk(),this.bIt=t.U5(),this.bIt.RIt(this.kft)}_n(){this.Af=null,this.ugt=null,this.kft=null,this.bIt=null}jAt(){}Y5(){return this.ugt}qk(){return this.kft}cN(){return this.Af}U5(){return this.bIt}}}{const C33=self.Bs;C33.GIt=class extends C33.gn{constructor(t,s){super(),this.vIt=t,this.QAt=s,this.Ge=t.K5(),this.Af=t.cN(),this.ugt=t.Y5(),this.dEt=this.ugt.Eyt(),this.XB=!1,this.qB=!1,this.$V=!1,this.Wd=null}_n(){this.pEt(),this.CEt(),this.PIt(),this.Wd&&(this.Wd._n(),this.Wd=null),this.vIt=null,this.Ge=null,this.Af=null,this.ugt=null,this.dEt=null}U5(){return this.ugt.U5()}OIt(){return this.vIt}K5(){return this.Ge}qk(){return this.Ge.qk()}UD(){return this.Ge.UD()}cN(){return this.Af}Y5(){return this.ugt}Eyt(){return this.dEt}mEt(){return this.vIt.mEt()}LB(t){return this.Af.LB(t,this.Ge,this.ugt)}gEt(t){return this.Af.gEt(t,this.Ge,this.ugt)}NB(t){return this.Af.NB(t,this.Ge,this.ugt)}xIt(){}Z9(){}GEt(){}LIt(){}vEt(){this.XB||(this.Af.OV(this),this.XB=!0)}pEt(){this.XB&&(this.Af.xV(this),this.XB=!1)}PEt(){return this.XB}OEt(){this.qB||(this.Af.LV(this),this.qB=!0)}CEt(){this.qB&&(this.Af.DV(this),this.qB=!1)}xEt(){return this.qB}DIt(){this.$V||(this.Af.NV(this),this.$V=!0)}PIt(){this.$V&&(this.Af.FV(this),this.$V=!1)}NIt(){return this.$V}LEt(){return[]}TEt(t,s){this.Af.kB(this.QAt,t,s)}FIt(t,s){}Ky(){return null}zy(t){}Qnt(t){}rht(t,s){}Qht(t,s){if(0!==s){const e=this.Qnt(t);if("number"!=typeof e)throw new Error("expected number");this.rht(t,e+s)}}DEt(t,s,e,i){}NEt(t,...s){t.call(this,...s)}FEt(t,...s){return t.call(this,...s)}XAt(){return null}lEt(t,s,e){if(this.vIt.$Et()){const i=this.mEt(),r=C33.yn(C33.Event,t,s);r.$It=i,r.q5=i.q5,e&&Object.assign(r,e),i.dispatchEvent(r)}}}}{let ValidateInternalAPIToken2=function(t){if(t!==internalApiToken)throw new Error("invalid internal API token")},C33=(ValidateInternalAPIToken=ValidateInternalAPIToken2,self.Bs),internalApiToken=(C33.GJ={},C33.llt={},C33.Ws()),initObjectStack=[],initObjectStack2=[],initPropertiesStack=[],originalPushInitObject=null,originalPopInitObject=null,originalGetInitObject=null,originalGetInitObject2=null,pluginsByCtor=new Map,behaviorsByCtor=new Map;C33.CF=class extends C33.gn{constructor(t,s){super(),this.Af=t,this.kIt=[],this.X2t=null,this.BIt=[],this.WIt=new Map,this.HIt=null,this.VIt=null,this.UIt=new Set(s)}jIt(t){const s=t[19],e=this.Af.z1t(t[0]);if(!e)throw new Error("missing plugin");C33.OTt(t,e,s);const i=2<=s?C33.AAt:e,r=C33.yn(i,{runtime:this.Af,gF:t[1],wAt:t[2],EF:t[5],wF:t[8],bAt:t[9],PAt:t[13],PF:t[14],TF:t[17],MF:t[18],NAt:s,name:t[20],VAt:2<=s?e:null});r.jAt(),this.kIt.push(r),pluginsByCtor.set(e,r)}XIt(){this.X2t=C33.yn(C33.GJ.bJ,{runtime:this.Af,gF:!0}),this.X2t.jAt()}YIt(t){const e=t[1],i=t[2],r=this.Af.z1t(t[0]);if(!r)throw new Error("missing behavior");this.WIt.set(r,()=>{const t=2<=e?C33.AIt:r,s=C33.yn(t,{runtime:this.Af,name:i,NAt:e,VAt:2<=e?r:null});s.jAt(),this.BIt.push(s),behaviorsByCtor.set(r,s),!this.HIt&&C33.llt.solid&&s instanceof C33.llt.solid?this.HIt=s:!this.VIt&&C33.llt.jumpthru&&s instanceof C33.llt.jumpthru&&(this.VIt=s),s.qAt()})}qIt(t){const s=this.WIt.get(t);s&&(s(),this.WIt.delete(t))}static KAt(t,s=1){if(C33.CF.KAt!==originalPushInitObject)throw new Error("invalid method");1===s&&initObjectStack.push(t),initObjectStack2.push(t)}static zAt(t=1){if(C33.CF.zAt!==originalPopInitObject)throw new Error("invalid method");1===t&&initObjectStack.pop(),initObjectStack2.pop()}static Qk(){if(C33.CF.Qk!==originalGetInitObject)throw new Error("invalid method");if(0===initObjectStack.length)throw new Error("no init object set");return initObjectStack.at(-1)}static pF(t){if(C33.CF.pF!==originalGetInitObject2)throw new Error("invalid method");if(ValidateInternalAPIToken2(t),0===initObjectStack2.length)throw new Error("no init object set");return initObjectStack2.at(-1)}static KIt(t){initPropertiesStack.push(t)}static zIt(){initPropertiesStack.pop()}static OB(){if(0===initPropertiesStack.length)throw new Error("no init properties set");return initPropertiesStack.at(-1)}JIt(){for(const t of this.kIt)t.qAt()}static DF(t){return pluginsByCtor.get(t)||null}static Q5(t){return behaviorsByCtor.get(t)||null}IX(){return this.X2t}QIt(){return this.HIt}ZIt(){return this.VIt}ZB(t){return this.UIt.has(t)}},originalPushInitObject=C33.CF.KAt,originalPopInitObject=C33.CF.zAt,originalGetInitObject=C33.CF.Qk,originalGetInitObject2=C33.CF.pF}{const C33=self.Bs,allImageInfos=new Set;C33.twt=class extends C33.gn{constructor(){super(),this.swt=0,this.kX="",this.BX=0,this.ewt=0,this.iwt=0,this.am=0,this.lm=0,this.rwt=!1,this.nwt=!1,this.hwt=null,this.owt="",this.bR=C33.yn(C33.Rect),this.awt=C33.yn(C33.dc),this.lwt="",this.cwt=new self.aN(this),allImageInfos.add(this)}_n(){this.PR(),this.hwt&&0===this.hwt.ZX()&&this.hwt._n(),this.hwt=null,allImageInfos.delete(this),this.uwt()}static zX(){for(const t of allImageInfos)t.owt="",t.bR.set(0,0,0,0),t.awt.Fc(t.bR)}fwt(t){this.kX=t[0],this.BX=t[1],this.ewt=t[2],this.iwt=t[3],this.am=t[4],this.lm=t[5],this.rwt=t[6],this.nwt=!0}dwt(t,s){if(this.hwt)throw new Error("already loaded asset");this.kX=s;const e={};return C33.bo(s)&&(e.pX="remote"),this.lN(t,e),this.hwt.gX()}pwt(t,s){if(this.hwt)throw new Error("already loaded asset");this.kX="",this.BX=s.size,this.hwt=C33.yn(C33.CX,t.Jx(),{blob:s,size:this.BX,pX:"local"})}Cwt(t){if(t===this)throw new Error("cannot replace with self");this.swt++,this.PR(),this.kX=t.kX,this.BX=t.BX,this.ewt=t.ewt,this.iwt=t.iwt,this.am=t.am,this.lm=t.lm,this.rwt=t.rwt,this.nwt=t.nwt,this.hwt=t.hwt,this.owt=t.owt,this.bR=t.bR,this.awt=t.awt,this.uwt()}mX(){return this.kX}Tu(){return this.BX}mwt(){return this.ewt}gwt(){return this.iwt}ZEt(){return this.rwt}AC(){return this.am}OC(){return this.lm}Swt(){return this.hwt.AC()}ywt(){return this.hwt.OC()}lN(t,s){if(this.hwt)throw new Error("already got asset");s=Object.assign({},s,{url:this.mX(),size:this.Tu()}),this.hwt=t.dX(s)}UX(){return this.hwt&&this.hwt.UX()}async qU(t,s){if(!this.hwt)throw new Error("no asset");if(this.owt)throw new Error("already loaded texture");const e=this.swt,i=(this.owt="loading",await this.hwt.qU(t,s));if(this.swt!==e)return null;if(!i)return this.owt="",null;this.owt="loaded",this.nwt||(this.am=i.AC(),this.lm=i.OC(),this.nwt=!0);const r=this.rwt?this.lm:this.am,n=this.rwt?this.am:this.lm;return this.bR.set(this.ewt,this.iwt,this.ewt+r,this.iwt+n),this.bR.vt(i.AC(),i.OC()),this.awt.Fc(this.bR),this.rwt&&this.awt.Vc(),i}PR(){this.owt&&(this.hwt&&this.hwt.PR(),this.owt="",this.bR.set(0,0,0,0),this.awt.Fc(this.bR))}KT(){return this.hwt&&"loaded"===this.owt?this.hwt.KT():null}WM(){return this.bR}JEt(){return this.awt}OH(){return this.cwt}_wt(){return this.hwt}async Twt(t){t=t||await this.hwt.t6();const s=C33.Wo(this.am,this.lm),e=s.getContext("2d");return this.rwt?(e.rotate(Math.PI/-2),e.translate(-this.lm,0),e.drawImage(t,this.ewt,this.iwt,this.lm,this.am,0,0,this.lm,this.am)):e.drawImage(t,this.ewt,this.iwt,this.am,this.lm,0,0,this.am,this.lm),s}async Awt(t){if(!this.lwt){const s=await this.Twt(t),e=await C33.Ho(s);this.lwt=URL.createObjectURL(e)}return this.lwt}uwt(){this.lwt&&(URL.revokeObjectURL(this.lwt),this.lwt="")}}}{const C33=self.Bs;C33.Ewt=class extends C33.gn{constructor(t){super(),this.En=t[0],this.Iwt=t[1],this.eSt=!!t[2],this.bot=t[3],this.wwt=t[4],this.Rwt=!!t[5],this.N6=t[6],this.Mwt=t[7].map(t=>C33.yn(C33.bwt,t)),this.Gwt=new self.rW(this)}static vwt(t,s){const e=C33.yn(C33.Ewt,[s,0,!1,0,0,!1,Math.floor(1e15*Math.random()),[]]);return e.Mwt.push(C33.bwt.vwt(t)),e}_n(){for(const t of this.Mwt)t._n();C33.qh(this.Mwt)}Pwt(t){for(const s of this.Mwt)s.TW().lN(t)}Owt(s,e){return Promise.all(this.Mwt.map(t=>t.TW().qU(s,e)))}xwt(){for(const t of this.Mwt)t.TW().PR()}pf(){return this.En}gq(){return this.N6}fW(){return this.Mwt.length}pW(){return this.Mwt}Lwt(t){if((t=Math.floor(t))<0||t>=this.Mwt.length)throw new RangeError("invalid frame");return this.Mwt[t]}Dwt(t,s){(s=Math.floor(s))<0?this.Mwt.unshift(t):s>=this.Mwt.length?this.Mwt.push(t):this.Mwt.splice(s,0,t)}Nwt(t){if((t=Math.floor(t))<0||t>=this.Mwt.length)throw new RangeError("invalid frame");this.Mwt[t]._n(),this.Mwt.splice(t,1)}Fwt(e){for(let t=0,s=this.Mwt.length;t<s;++t)if(C33.wr(this.Mwt[t].BW(),e))return t;return-1}$wt(t){if("string"!=typeof t)return t;{const s=this.Fwt(t);if(-1===s)throw new Error("cannot find animation frame with tag "+t);return s}}nW(){return this.Iwt}hW(){return this.eSt}oW(){return this.bot}lW(){return this.wwt}uW(){return this.Rwt}kwt(){return this.Gwt}}}{const C33=self.Bs,EMPTY_IMAGE_BLOB=(()=>{const e=atob("iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAQMAAABKLAcXAAAAAXNSR0IArs4c6QAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAAATSURBVBgZYxgFo2AUjIJRQFcAAAV4AAHcRQIbAAAAAElFTkSuQmCC"),i=new Uint8Array(e.length);for(let t=0,s=e.length;t<s;++t)i[t]=e.charCodeAt(t);return new Blob([i],{type:"image/png"})})();C33.bwt=class extends C33.gn{constructor(t){super(),this.Bwt=C33.yn(C33.twt),this.Bwt.fwt(t),this.Wwt=t[7],this.Hwt=C33.yn(C33.ul,t[8],t[9]),this.Vwt=t[10].map(t=>C33.yn(C33.Uwt,this,t)),this.jwt=new Map;for(const e of this.Vwt)this.jwt.set(e.pf().toLowerCase(),e);this.Xwt=null;const s=t[11];6<=s.length&&(this.Xwt=C33.yn(C33.zc,s)),this.d1=t[12]||"",this.Ywt=new self._W(this)}static vwt(t){const s=C33.yn(C33.bwt,["",0,0,0,100,100,!1,1,0,0,[],[],""]);return s.Bwt.pwt(t,EMPTY_IMAGE_BLOB),s}_n(){this.Xwt&&(this.Xwt._n(),this.Xwt=null),this.Bwt._n(),this.Bwt=null}TW(){return this.Bwt}AW(){return this.Wwt}IW(){return this.Hwt.ml()}RW(){return this.Hwt.Sl()}NW(){return this.Xwt}LW(t){return this.jwt.get(t.toLowerCase())||null}xW(t){return(t=Math.floor(t))<0||t>=this.Vwt.length?null:this.Vwt[t]}GW(){return this.Vwt.length}BW(){return this.d1}mW(){return this.Ywt}}}{const C33=self.Bs;C33.Uwt=class extends C33.gn{constructor(t,s){super(),this.qwt=t,this.En=s[0],this.Kwt=C33.yn(C33.ul,s[1],s[2])}_n(){}pf(){return this.En}Ny(){return this.Kwt.ml()}ky(){return this.Kwt.Sl()}zwt(){return this.Kwt}}}{const C33=self.Bs,C3Debugger=self.C3Debugger,IObjectClass=self.HF,assert=self.assert;C33.lct=class extends C33.gn{constructor(s,t,e){super();const i=s.z1t(e[1]),[r,n]=(this.Af=s,this.oEt=C33.CF.DF(i),this.dEt=null,this.Jwt=i.Instance,this.f1=t,this.N6=e[11],this.En=e[0],this.x2t=this.Af.p3t(e[14]),this.Qwt=!!e[9],this.Zwt=!!e[2],this.tRt=!!e[10],this.sRt=e[3].map(t=>({sid:t[0],type:t[1],name:t[2],eRt:s.p3t(t[3])})),this.iRt=e[4],this.rRt=e[5],this.IAt=this.oEt._F(),this.nRt=C33.yn(C33.Event.ed),this.yY=null,s.tL().$N());if(this.hRt=C33.yn(C33.oRt,r,n),this.aRt=!0,this.lRt=null,this.cRt=null,this.uRt=-1,this.fRt=null,this.dRt=null,this.pRt=null,this.CRt=null,this.mRt=null,this.gRt=!1,this.SRt=null,this.yRt=e[8].map(t=>C33._Rt.CA(this,t)),this.TRt=[],this.ARt=new Map,this.ERt=new Map,this.IRt=new Set,this.wRt=new Map,this.RRt=C33.yn(C33.$ft,this),this.MRt=null,this.bRt=0,this.GRt=!1,this.SRt=null,this.Bwt=null,this.vRt=null,this.PRt=null,this.ORt=null,this.xRt=0,this.oSt=new Map,this.aSt=new Map,this.r6=[],this.LRt=new Map,this.DRt=!0,this.oEt.RF()&&(this.yY=C33.yn(C33._Y,this,e[12])),e[6]&&(this.Bwt=C33.yn(C33.twt),this.Bwt.fwt(e[6])),e[7]){this.vRt=e[7].map(t=>C33.yn(C33.Ewt,t)),this.PRt=new Map,this.ORt=new Map;for(const a of this.vRt)this.PRt.set(a.pf().toLowerCase(),a),this.ORt.set(a.gq(),a)}this.Zwt?(this.lRt=[],this.cRt=new Set,this.uRt=this.Af.NRt()):(this.fRt=[],this.dRt=new Set,this.pRt=[],this.CRt=[],this.mRt=[]);const h=this.oEt.MSt();if(h<2&&(this.dEt=C33.yn(i.FRt,this,e[15]),!(this.dEt instanceof C33.hEt)))throw new Error("v1 sdk type must derive from SDKTypeBase");this.$Rt=null,this.kRt=null,this.Tz=C33.yn(C33.Event.ed),C33.CF.KAt(this,h);let o;if(o=2<=h?(o=i.FRt)||globalThis.GH:this.dEt.XAt()){if(this.$Rt=new o(h<2?this:null),h<2&&!(this.$Rt instanceof IObjectClass))throw new TypeError("script interface class must derive from IObjectClass");if(2<=h&&!(this.$Rt instanceof globalThis.GH))throw new TypeError("script interface class must derive from ISDKObjectTypeBase")}else this.$Rt=new IObjectClass;if(C33.CF.zAt(h),e[13]){const l=e[13];if(l){const c=l[0],u=l[1],f=l[2];this.dEt.aEt(c,u,f)}}this.Af.BRt()&&!this.Zwt&&!this.tRt&&this.IAt||this.jAt(),this.oEt.SF()&&(this.oEt.YAt(this),this.WRt(e)),this.HRt=null}static CA(t,s,e){return C33.yn(C33.lct,t,s,e)}_n(){if(this.nRt._n(),this.nRt=null,this.Bwt&&(this.Bwt._n(),this.Bwt=null),this.vRt){for(const t of this.vRt)t._n();C33.qh(this.vRt),this.PRt.clear(),this.ORt.clear()}this.HRt=null,this.RRt._n(),this.RRt=null,this.oSt.clear(),this.aSt.clear(),this.SRt=null,this.Af=null}VRt(e){for(let t=1,s=e.length;t<s;++t){const i=this.Af.$Y(e[t]);this.lRt.push(i),this.cRt.add(i),i.fRt.push(this),i.dRt.add(this)}}URt(t){this.gRt=!0,this.SRt=t}nB(){return this.gRt}Yz(){return this.SRt}jRt(){let t=0;if(!this.Zwt)for(const s of this.fRt)for(const e of s.XRt()){const i=e.pf().toLowerCase();this.ARt.set(i,e),this.ERt.set(i,t),this.TRt.push(e),++t}for(const r of this.XRt()){const n=r.pf().toLowerCase();this.ARt.set(n,r),this.ERt.set(n,t),this.TRt.push(r),++t}for(const h of this.TRt)this.IRt.add(h.U5().constructor);if(!this.Zwt&&this.fRt.length){let t=this.Af.YRt(),s=(C33.zh(this.pRt,t,0),C33.zh(this.CRt,t,0),C33.zh(this.mRt,t,0),[]),e=0,i=0,r=0;for(const o of this.fRt){const a=o.lgt(),l=(this.pRt[a]=e,e+=o.qRt(),this.CRt[a]=i,i+=o.KRt(),this.mRt[a]=r,r+=o.zRt(),o.d$());if(l&&this.yY)for(const c of l.p$())s.push(c.JRt(this.yY))}this.yY&&this.yY.QRt(s)}}WRt(t){const s=this.Af.ZRt(),e=C33.yn(C33.Instance,{runtime:this.Af,Yk:this,uid:s});e.tMt(t[16],[]),this.Af.sMt(s,e),this.r6.push(e)}Eyt(){return this.dEt}eMt(){return this.tRt}ed(){return this.nRt}jAt(){this.Zwt||(this.dEt?this.dEt.jAt():this.$Rt.vH())}iMt(){return 0<this.xRt}async zz(t){this.Zwt||(this.xRt++,1===this.xRt&&(this.dEt?await this.dEt.zz(t):await this.$Rt.xH(this.Af.QN().rMt())))}eJ(){if(!this.Zwt){if(this.xRt--,this.xRt<0)throw new Error("released textures too many times");0===this.xRt&&(this.dEt?this.dEt.eJ():this.$Rt.LH(this.Af.QN().rMt()))}}Zz(){if(this.Zwt)throw new Error("not applicable to family");this.dEt?this.dEt.Zz():this.$Rt.DH()}async EJ(t){this.Zwt||(this.dEt?await this.dEt.EJ(t):await this.$Rt.NH(this.Af.QN().rMt()))}cN(){return this.Af}UF(){return this.oEt}nMt(){return this.Jwt}pf(){return this.En}p3t(){return this.x2t}Yx(){return this.f1}gq(){return this.N6}aq(){return this.Zwt}qY(){return this.Qwt}_F(){return this.IAt}lgt(){return this.uRt}XRt(){return this.yRt}KRt(){return this.iRt}hMt(t){return t&&this.IRt.has(t)}qRt(){return this.sRt.length}oMt(){return this.sRt.map(t=>t.sid)}aMt(s){return this.sRt.findIndex(t=>t.sid===s)}Aet(s){return this.sRt.findIndex(t=>t.name===s)}lMt(){return this.sRt.map(t=>t.name)}cMt(){return this.sRt.map(t=>t.eRt)}Iet(t){if((t=Math.floor(t))<0||t>=this.sRt.length)throw new RangeError("invalid instance variable index");return this.sRt[t].type}Eet(t){if((t=Math.floor(t))<0||t>=this.sRt.length)throw new RangeError("invalid instance variable index");return this.sRt[t].name}zRt(){return this.rRt}uMt(){return this.TRt}Xrt(t){return this.ARt.get(t.toLowerCase())||null}Ret(t){const s=this.ERt.get(t.toLowerCase());return void 0===s?-1:s}d$(){return this.yY}RF(){return this.oEt.RF()}fMt(){return this.yY&&this.yY.dMt()}ipt(){return this.RRt}s$(){return this.RRt.s$()}TW(){return this.Bwt}WY(t){this.MRt=t}BY(){return this.MRt}HY(t){this.bRt=t}pMt(){return this.bRt}CMt(){return this.vRt}mMt(){return this.vRt.length}T3t(){return this.fRt}Gyt(t){return this.dRt.has(t)}xmt(){return this.lRt}lq(t){return this.cRt.has(t)}pgt(t){return this.CRt[t]}agt(t){return this.pRt[t]}g2t(t){this.wRt.set(t.A2t().toLowerCase(),t)}S2t(t){return!!this.b2t(t)}b2t(t){const s=this.wRt.get(t.toLowerCase());return s&&s.pu()?s:null}gMt(){return this.vRt}SMt(t){if(this.vRt)return this.PRt.get(t.toLowerCase())||null;throw new Error("no animations")}yMt(t){if(this.vRt)return this.ORt.get(t)||null;throw new Error("no animations")}_Mt(t){if(this.SMt(t))throw new Error(`animation name '${t}' already exists`);const s=C33.Ewt.vwt(this.cN(),t);return this.vRt.push(s),this.PRt.set(s.pf().toLowerCase(),s),this.ORt.set(s.gq(),s),s}TMt(t){const s=this.SMt(t);if(!s)throw new Error(`animation name '${t}' does not exist`);if(1===this.vRt.length)throw new Error("cannot remove last animation");const e=this.vRt.indexOf(s);this.vRt.splice(e,1),this.PRt.delete(s.pf().toLowerCase()),this.ORt.delete(s.gq()),s._n()}AMt(){if(this.vRt)return this.vRt[0];throw new Error("no animations")}EMt(){return this.AMt().Lwt(0)}IMt(){if(this.vRt){const t=this.EMt().TW();return[t.AC(),t.OC()]}return this.Bwt?[this.Bwt.AC(),this.Bwt.OC()]:[100,100]}WF(){if(this.oEt.SF())return this.r6[0];throw new Error("not a single-global plugin")}t$(){return this.r6}*instances(){yield*this.r6}*ZF(){yield*this.r6,yield*this.Af.x_t(this)}i$(){return this.r6.length}KY(t){this.r6.push(t)}wMt(){this.DRt=!0}LJ(){if(this.DRt&&!this.Zwt){let s=this.r6,e=0;for(let t=s.length;e<t;++e)s[e].RMt(e);const t=this.Af.MMt();for(const i of t)i.qk()===this&&i.RMt(e++);this.DRt=!1}}bMt(t){const s=this.r6;if(t<s.length)return s[t];t-=s.length;const e=this.Af.MMt();for(const i of e)if(i.qk()===this){if(0===t)return i;--t}return null}m_t(t){if(t&&t.nB()&&t.qk()!==this)for(const e of t.hB())if(e.qk()===this)return e;const s=this.s$().t$();return s.length?s[0]:null}QF(t){const s=this.s$().t$();return 0<s.length?s[t.lB()%s.length]:null}*k_t(t,s){let e=this.s$().t$(),i=e.length,r=s.s$(),n=s.s$().t$(),h=n.length,o=t.lB(),a=(!s.aq()&&r.Jft()||(o=n.indexOf(t)),Math.ceil(i/h)),l=i%h,c=0,u;u=0==l||o<l?(c=o*a,a):(c=l*a+(o-l)*(a-1),a-1);for(let t=c,s=c+u;t<s;++t)yield e[t]}kSt(t){this.dEt?.kSt(t)}W1t(){if(this.gRt&&!this.Zwt){this.LJ();const t=this.s$(),s=t.ndt(),e=t.Jft(),i=this.Af.r3t(),r=i&&i.OL()&&i.OL().pdt();for(const n of this.SRt.OJ())if(n!==this){n.LJ();const h=n.s$();if(h.rdt(e),!e){const o=h.ndt();C33.qh(o);for(const a of s)o.push(n.bMt(a.lB()));if(r){const l=t.hdt(),c=h.hdt();C33.qh(c);for(const u of l)c.push(n.bMt(u.lB()))}}}}}USt(t,s){for(const e of this.Yz().OJ()){const i=e.s$();t?C33.Yh(i.hdt(),s):C33.Yh(i.ndt(),s)}}GMt(){return this.hRt}vMt(t){this.aRt=!!t}PMt(){if(this.aRt&&this.IAt){for(const t of this.r6)t.UD().OMt();for(const s of this.Af.MMt())s.qk()===this&&s.UD().OMt();this.aRt=!1}}xMt(s,t,e){if(t){const i=this.LRt.get(t);i&&(i.delete(s),0===i.size)&&this.LRt.delete(t)}if(e){let t=this.LRt.get(e);t||(t=new Set,this.LRt.set(e,t)),t.add(s)}}LMt(){if(this.aq()){const t=new Set;for(const s of this.lRt)for(const e of s.LMt())t.add(e);return t.values()}return this.LRt.keys()}xSt(){return this.oSt||(this.oSt=new Map),this.oSt}LSt(){return this.aSt||(this.aSt=new Map),this.aSt}DMt(){return this.hMt(C33.llt.solid)}NMt(){return this.hMt(C33.llt.jumpthru)}FMt(){return this.hMt(C33.llt.NoSave)}XY(){return this.hMt(C33.llt.Persist)}D8(){const t={instances:this.r6.map(t=>t.Ky())};return this.oSt&&this.oSt.size&&(t.ex=C33.qo(this.oSt)),t}N8(t,i){this.oSt&&(this.oSt.clear(),this.oSt=null);const s=t.ex,r=(s&&(this.oSt=C33.Ko(s)),this.r6),n=t.instances;for(let t=0,s=Math.min(r.length,n.length);t<s;++t)r[t].zy(n[t]);for(let t=n.length,s=r.length;t<s;++t)this.Af.tB(r[t]);for(let e=r.length,t=n.length;e<t;++e){let t=n[e],s=null;if(!this._F()||(s=this.Af.AD().Nz(t.w.l))){const h=this.Af.YY(this.MRt||this,s,!1,0,0,!0);h.zy(t),i&&i.add(h)}}this.HRt=n,this.wMt()}$Mt(){return this.HRt}kMt(){this.HRt=null}BMt(){for(let t=0,s=this.r6;t<s;++t)this.r6[t].BMt()}$F(){return this.$Rt}AL(){return this.Tz}WMt(){return this.kRt}r$(t){this.kRt=t}r7(t){const s=this.Af,e=s.UB()&&!s.RL().l$();e&&C3Debugger.StartMeasuringScriptTime(),this.Tz.dispatchEvent(t),e&&C3Debugger.AddScriptTime()}}}{const C33=self.Bs;C33.HMt=class extends C33.gn{constructor(t,s){super(),this.Af=t,this.VMt=s;for(const e of this.VMt)e.URt(this)}_n(){this.Af=null}cN(){return this.Af}Xz(){return this.VMt}OJ(){return this.VMt}NJ(){return this.VMt.some(t=>t._F())}}}{let C33=self.Bs,C3Debugger=self.C3Debugger,IInstance=self.Xk,originalAddonManager=C33.CF,EMPTY_ARRAY=[],nextPuid=0,savedDataMaps=new WeakMap,unsavedDataMaps=new WeakMap,FLAG_DESTROYED=1,FLAG_TILEMAP=2,FLAG_MUST_PREDRAW=4,FLAG_SOLID_ENABLED=8,FLAG_JUMPTHRU_ENABLED=16,FLAG_MUST_MITIGATE_Z_FIGHTING=32,FLAG_IS_DRAWING_WITH_EFFECTS=64;C33.Instance=class extends C33.gn{constructor(t){if(C33.CF!==originalAddonManager)throw new Error("invalid addon manager");super(),this.Af=t.runtime,this.UMt=t.Yk,this.Xst=null,this.jMt=null,this.XMt=null,this.YMt=0,this.qMt=t.uid,this.KMt=nextPuid++,this.qSt=0,this.zMt=null;const s=C33.do(t.tags),e=(0<s.length&&(this.zMt=new Set(s)),this.JMt=EMPTY_ARRAY,this.QMt=EMPTY_ARRAY,this.UMt.uMt()),i=(0<e.length&&(this.QMt=e.map((t,s)=>C33.yn(C33.ZMt,{runtime:this.Af,j5:t,q5:this,index:s}))),this.tbt=this.UMt.nB()?[]:null,this.sbt=-1,this.nRt=null,this.UF());if(i.iy()&&(this.qSt|=FLAG_MUST_PREDRAW),i._F())if(this.Xst=C33.yn(C33.ebt,this,t.c4),t.ibt)this.Xst.rbt(t.ibt);else{this.Xst.nbt();const[r,n]=this.UMt.IMt();this.Xst.cM(r,n),this.qk().fMt()&&this.Xst.l4().hbt()}t.obt?this.abt(t.obt):this.lbt()}_n(){if(this.XMt&&(this.XMt.Zk(),this.XMt=null),0<this.QMt.length){for(const e of this.QMt)e._n();C33.qh(this.QMt)}this.jMt&&(this.jMt._n(),this.jMt=null);const t=savedDataMaps.get(this),s=(t&&(t.clear(),savedDataMaps.delete(this)),unsavedDataMaps.get(this));s&&(s.clear(),unsavedDataMaps.delete(this)),this.tbt&&C33.qh(this.tbt),this.nRt&&(this.nRt._n(),this.nRt=null),this.zMt&&this.zMt.clear(),this.zMt=null,this.Af=null,this.UMt=null,0<this.JMt.length&&C33.qh(this.JMt),this.Xst&&(this.Xst._n(),this.Xst=null)}abt(t){0<t.length&&(this.JMt=[],C33.Qh(this.JMt,t))}lbt(){const s=this.UMt.qRt();if(0!==s){this.JMt=[];const e=[0,0,""];for(let t=0;t<s;++t)this.JMt.push(e[this.UMt.Iet(t)])}}tMt(t,e){if(this.jMt)throw new Error("already got sdk instance");for(let t=0,s=this.QMt.length;t<s;++t){const i=this.QMt[t];i.tMt(e?e[t]:null)}const s=this.UF().MSt();if(s<2){if(this.jMt=C33.yn(this.UMt.nMt(),this,t),!(this.jMt instanceof C33.uEt))throw new Error("sdk type must derive from SDKInstanceBase");!this.UF()._F()&&this.UMt.WMt()&&this.BD()}else{const r=this.UF().XAt();this.cbt(r.Instance,t)}}N5(){return this.jMt??this.XMt}UD(){return this.Xst}cN(){return this.Af}ZL(){return this.sbt}fB(){const t=this.sbt;return-1===t?this.cN().ZL():t}tD(t){((t=+t)<0||!isFinite(t))&&(t=0),this.sbt=t,this.qk().fMt()&&this.Af.ubt(this,!0)}pB(){this.sbt=-1,this.qk().fMt()&&this.Af.ubt(this,!1)}E8(){return this.Af.fbt(this)}ed(){return this.nRt||(this.nRt=C33.yn(C33.Event.ed)),this.nRt}I_(t){this.jMt?this.jMt.I_(t):this.XMt.VH(this.Af.QN().rMt())}jAt(t){this.jMt.jAt(t)}dbt(){this.qSt|=FLAG_TILEMAP}pbt(){return 0!=(this.qSt&FLAG_TILEMAP)}Cbt(){this.qSt|=FLAG_DESTROYED}mV(){return 0!=(this.qSt&FLAG_DESTROYED)}iy(){return 0!=(this.qSt&FLAG_MUST_PREDRAW)||this.jMt.iy()}mbt(){this.qSt|=FLAG_MUST_MITIGATE_Z_FIGHTING}p8(){return 0!=(this.qSt&FLAG_MUST_MITIGATE_Z_FIGHTING)}gbt(){return 0!=(this.qSt&FLAG_SOLID_ENABLED)}Sbt(t){t?this.qSt|=FLAG_SOLID_ENABLED:this.qSt&=~FLAG_SOLID_ENABLED}ybt(){return 0!=(this.qSt&FLAG_JUMPTHRU_ENABLED)}_bt(t){t?this.qSt|=FLAG_JUMPTHRU_ENABLED:this.qSt&=~FLAG_JUMPTHRU_ENABLED}Tbt(){return 0!=(this.qSt&FLAG_IS_DRAWING_WITH_EFFECTS)}Abt(t){t?this.qSt|=FLAG_IS_DRAWING_WITH_EFFECTS:this.qSt&=~FLAG_IS_DRAWING_WITH_EFFECTS}Ebt(t,s){t<<=16,s?this.qSt|=t:this.qSt&=~t}Ibt(t){return 0!=(this.qSt&t<<16)}YEt(){return this.jMt.YEt()}qEt(){return this.jMt.qEt()}KEt(){return this.jMt.KEt()}zEt(){return this.jMt.zEt()}QEt(){return this.jMt.QEt()}kyt(t){return this.jMt.kyt(t)}qk(){return this.UMt}f8(){return this.jMt.f8()}L_t(t){return t.aq()?t.lq(this.qk()):this.qk()===t}wbt(r,t,s){const e=(t,s)=>{const e=s||t.qk(),i=r.get(e);i?i.add(t):r.set(e,new Set([t]))};if(e(this,t),this.nB())for(const i of this.hB())e(i);if(s)for(const n of this.z4())e(n)}Rbt(){if(!this.UF().vF())throw new Error("object does not support scene graph")}s5(){return null!==this.H4()}H4(){const t=this.UD();if(!t)return null;const s=t.H4();return s?s.fH():null}U4(){const t=this.UD();if(!t)return null;const s=t.U4();return s?s.fH():null}*j4(){const t=this.UD();if(t)for(const s of t.j4())yield s.fH()}Mbt(t){if(t)for(const s of this.children())if(s===t)return!0;return!1}B8(){const t=this.UD();return!!t&&t.B8()}bbt(t){const s=this.UD();if(!s)return[];const e=t.pf();return s.UJ().map(t=>t.fH()).filter(t=>t.qk().pf()===e)}UJ(){const t=this.UD();return t?t.UJ().map(t=>t.fH()):[]}*children(){const t=this.UD();if(t)for(const s of t.children())yield s.fH()}*z4(){const t=this.UD();if(t)for(const s of t.z4())yield s.fH()}Y4(){const t=this.UD();return t?t.Y4():0}Gbt(){return[...this.j4()].length}$_t(){const t=this.UD();return t?t.$_t():0}K4(t){const s=this.UD();if(!s)return null;const e=s.K4(t);return e?e.fH():null}vbt(){const t=this.UD();if(!t)return NaN;const s=t.H4();return s?s.Pbt(t):NaN}Obt(t){for(const s of this.UD().UJ())if(s.fH().oB()===t)return!0;return!1}Q4(t,s){this.Rbt(),t.Rbt(),this.UD().Q4(t.UD(),s||{})}Z4(t){const s=this.UD();s&&s.Z4(t.UD())}_5(){const t=this.UD();return!!t&&t._5()}yJ(){const t=this.UD();if(t){const s=t.xbt();if(s)for(const e of s){const i=this.Af.kD(e[2]);if(i){const r=e[3];this.Q4(i,{i5:!!(r>>0&1),n5:!!(r>>1&1),o5:!!(r>>2&1),l5:!!(r>>3&1),u5:!!(r>>4&1),y5:!!(r>>5&1),d5:!!(r>>6&1),C5:!!(r>>7&1),g5:!!(r>>8&1)})}}}}_J(t,s){const e=t.get(this);if(e)for(const i of e.sceneGraphJson.children){const r=s.get(i.index);if(r){const n=i.flags;this.Q4(r,{i5:!!(n>>0&1),n5:!!(n>>1&1),o5:!!(n>>2&1),l5:!!(n>>3&1),u5:!!(n>>4&1),y5:!!(n>>5&1),d5:!!(n>>6&1),C5:!!(n>>7&1),g5:!!(n>>8&1)})}}}uB(){const t=this.Af.Lbt();return t?t.uct(this):""}nB(){return null!==this.tbt}xJ(t){this.tbt.push(t)}iB(){return this.tbt}Dbt(t){return!!this.Nbt(t)}Nbt(t){const s=this.hB();if(null===s||0===s.length)return!1;for(const e of s)if(e.qk()===t)return e;return null}hB(){return this.tbt}jCt(){for(const t of this.hB())t.qk().s$().odt(t)}BSt(){for(const t of this.hB())t.qk().s$().edt(t)}WSt(t){for(const s of this.hB())s.qk().s$().ndt()[t]=s}VSt(){for(const t of this.hB())t.qk().s$().idt(t)}HSt(t){for(const s of this.hB())s.qk().s$().hdt()[t]=s}UF(){return this.UMt.UF()}RMt(t){this.YMt=t}lB(){return this.UMt.LJ(),this.YMt}oB(){return this.qMt}Fbt(){return this.KMt}$bt(t){t?this.SB(new Set(t)):this.zMt=null}SB(t){if(0===t.size)this.zMt=null;else{this.zMt?this.zMt.clear():this.zMt=new Set;for(const s of t)this.zMt.add(s)}}mB(){return this.zMt??new Set}aTt(){return Array.from(this.mB()).join(" ")}uTt(t){t=Math.floor(t);for(const s of this.mB()){if(0===t)return s;--t}return""}jrt(){return this.QMt}kbt(t){if(t)for(const s of this.QMt)if(s.U5()instanceof t)return s;return null}dlt(t){if(!t)return null;const s=this.kbt(t);return s?s.N5():null}Urt(e){const i=this.QMt;for(let t=0,s=i.length;t<s;++t)if(i[t].Y5().gq()===e)return t;return-1}Bbt(){return this.JMt}lMt(){return this.UMt.lMt()}Wbt(){return this.JMt.length}oht(t){const s=this.JMt;if((t|=0)<0||t>=s.length)throw new RangeError("invalid instance variable");return s[t]}hgt(t){return this.JMt[t]}Hbt(t){const s=this.JMt[t];return 0===this.UMt.Iet(t)?!!s:s}aht(t,s){const e=this.JMt;if((t|=0)<0||t>=e.length)throw new RangeError("invalid instance variable");const i=this.UMt.Iet(t);switch(i){case 0:e[t]=s?1:0;break;case 1:e[t]="number"==typeof s?s:parseFloat(s);break;case 2:e[t]="string"==typeof s?s:s.toString();break;default:throw new Error("unknown instance variable type")}}Zht(t,s){if(0!==s){const e=this.JMt;if((t|=0)<0||t>=e.length)throw new RangeError("invalid instance variable");const i=e[t];if("number"!=typeof i)throw"boolean"==typeof i?new Error("can not set offset of boolean variable"):"string"==typeof i?new Error("can not set offset of string variable"):new Error("unknown instance variable type");e[t]+="number"==typeof s?s:parseFloat(s)}}xSt(){let t=savedDataMaps.get(this);return t||(t=new Map,savedDataMaps.set(this,t)),t}LSt(){let t=unsavedDataMaps.get(this);return t||(t=new Map,unsavedDataMaps.set(this,t)),t}Vbt(t){const s=this.qk();if(s.AL().fd(t))return!0;for(const e of s.T3t())if(e.AL().fd(t))return!0;return!!this.Af.AL().fd(t)}a$(){const t=new Set,s=(t.add(this),this.UD());if(s&&s.B8())for(const e of this.z4())if(t.add(e),e.nB())for(const i of e.hB())t.add(i);if(this.nB())for(const r of this.hB())t.add(r);for(const n of t.values())n.TJ();this.AJ()}Ubt(){this.UMt.WMt()&&this.BD();for(const t of this.QMt)t.xIt()}jbt(){this.Ubt()}TJ(){if(this.Ubt(),this.Vbt("instancecreate")){const t=this.qk(),s=new C33.Event("instancecreate");s.q5=this.BD(),t.r7(s);for(const e of t.T3t())e.r7(s);this.Af.r7(s)}this.Af.LB(this.UF().Ppt().MJ.pTt,this,null)}AJ(){if(this.UF().vF()){if(this.r7(new C33.Event("hierarchyready")),this.Vbt("hierarchyready")){const t=this.qk(),s=new C33.Event("hierarchyready");s.q5=this.BD(),t.r7(s);for(const e of t.T3t())e.r7(s);this.Af.r7(s)}this.Af.LB(this.UF().Ppt().MJ.P_t,this,null)}}Xbt(){this.Af.LB(this.UF().Ppt().MJ.CTt,this,null)}Ybt(t){if(this.XMt){const s=new C33.Event("destroy");s.qbt=t,this.r7(s)}if(this.Vbt("instancedestroy")){const e=this.qk(),i=new C33.Event("instancedestroy");i.q5=this.BD(),i.qbt=t,e.r7(i);for(const r of e.T3t())r.r7(i);this.Af.r7(i)}}Kbt(){return this.jMt?this.jMt.LEt():this.XMt.KB()}Ky(t="full",s=null){const e={},i=("full"===t?e.uid=this.oB():e.c3=!0,this.mB());if(0<i.size&&(e.tags=Array.from(i)),"visual-state"!==t){const n=savedDataMaps.get(this);if(n&&n.size&&(e.ex=C33.qo(n)),-1!==this.ZL()&&(e.mts=this.ZL()),0<this.UMt.qRt()){const h={},o=this.UMt.oMt();for(let t=0,s=this.JMt.length;t<s;++t)h[o[t].toString()]=this.JMt[t];e.ivs=h}if(this.QMt.length){const a={};for(const l of this.QMt){const c=l.Ky(t);c&&(a[l.Y5().gq().toString()]=c)}e.behs=a}}this.Xst&&(e.w=this.Xst.D8(t,s));const r=this.jMt?this.jMt.Ky():this.XMt.zB();return r&&(e.data=r),e}t9(t="full",s){this.Xst&&this.Xst.t9(t)}e9(t,s="full",e=null){this.Xst&&this.Xst.e9(t,s,e)}zbt(t,s="full",e=null){this.Xst&&this.Xst.zbt(t,s,e)}BMt(){this.UF()._F()&&this.Xst.BMt()}zy(s,t="full",e){if("full"===t)this.qMt=s.uid;else if(!s.c3)return;if(this.$bt(s.tags),"visual-state"!==t){let t=savedDataMaps.get(this);t&&(t.clear(),savedDataMaps.delete(this));const r=s.ex,n=(r&&(t=C33.Ko(r),savedDataMaps.set(this,t)),this.sbt=s.hasOwnProperty("mts")?s.mts:-1,s.ivs);if(n)for(const[h,o]of Object.entries(n)){const a=parseInt(h,10),l=this.UMt.aMt(a);if(!(l<0||l>=this.JMt.length)){let t=o;null===t&&(t=NaN),this.JMt[l]=t}}}if(this.UF()._F()){const c=s.w;if(c){const u=c.l;if(this.Xst.jD().gq()!==u){const f=this.Xst.jD(),d=f.RD().Nz(u);d?(this.Xst.KD(d),f.QY(this,!0),d.KY(this,!0),d.zD(this),this.Xst.u4()):"full"===t&&this.Af.tB(this)}this.Xst.N8(c,t)}}if("visual-state"!==t){const p=s.behs;if(p)for(const[C,m]of Object.entries(p)){const g=parseInt(C,10),S=this.Urt(g);S<0||S>=this.QMt.length||this.QMt[S].zy(m,t)}}const i=s.data;i&&(this.jMt?this.jMt.zy(i,t):this.XMt.JB(i))}BD(){return this.XMt||this.cbt()}$Et(){return!!this.XMt}cbt(t,s){const e=this.Xst?t?self.FH:self.P5:t?self.AB:self.Xk,i=t||this.jMt.XAt(),r=this.UMt.WMt(),n=r||i||e,h=this.UF().MSt();if(C33.CF.KAt(this,h),C33.CF.KIt(s),this.XMt=new n,C33.CF.zIt(),C33.CF.zAt(h),i&&!(this.XMt instanceof e))throw new TypeError(`script interface class '${i.name}' does not extend the right base class '${e.name}'`);if(r){const o=i||e;if(!(this.XMt instanceof o))throw new TypeError(`setInstanceClass(): class '${r.name}' does not extend the right base class - check it extends the right class, e.g. globalThis.InstanceType.MyObjectName`)}return this.XMt}Kk(t){if(0!==this.JMt.length){const e={},i=this.UMt.cMt();for(let t=0,s=i.length;t<s;++t)e[i[t]]={configurable:!1,enumerable:!0,get:C33.Instance.prototype.Hbt.bind(this,t),set:C33.Instance.prototype.aht.bind(this,t)};const s=Object.create(Object.prototype,e);t.Jbt={value:s,writable:!1}}}zk(t){const s=this.QMt;if(0!==s.length){const e={};for(const r of s)e[r.Y5().p3t()]={value:r.mEt(),writable:!1};const i=Object.create(Object.prototype,e);t.PCt={value:i,writable:!1}}}r7(t){if(this.$Et()){const s=this.BD(),e=(t.q5=s,this.Af),i=e.UB()&&!e.RL().l$();i&&C3Debugger.StartMeasuringScriptTime(),s.dispatchEvent(t),i&&C3Debugger.AddScriptTime()}}}}{const C33=self.Bs;C33.XJ=class extends C33.gn{constructor(i){super(),this.i_=i,this.JCt=null,this.Qbt=[],this.Zbt=i.AC(),this.tGt=i.OC(),this.sGt=1,this.eGt=1,this.iGt=0,this.rGt=1,this.nGt=i.VG(),this.hGt=null,this.oGt=null,this.aGt=NaN,this.lGt=!1,this.V8=NaN,this.U8=NaN,this.cGt=t=>{if(t.q5===this.JCt.fH()){const s=i.cN(),e=(s.ed().removeEventListener("instancecreate",this.cGt),this.JCt.fH().N5());this.lGt=!!e.ket(),this.V8=this.lGt?e.$et():NaN,this.U8=this.lGt?e.Wet():NaN}}}_n(){this.JCt=null,this.hGt=null,this.oGt=null,this.aGt=NaN,this.lGt=!1,this.V8=NaN,this.U8=NaN,C33.qh(this.Qbt)}uGt(t){if(this.rGt=this.i_.VG(),this.nGt=this.rGt,this.JCt=t,this.iGt=t?t.GetAngle():0,this.JCt){const s=this.i_,e=s.cN(),i=this.JCt.fH().UF().MSt();if(i<2){const r=this.JCt.fH().N5();r?(this.lGt=!!r.ket(),this.V8=this.lGt?r.$et():NaN,this.U8=this.lGt?r.Wet():NaN):this.JCt.fH().mV()||e.ed().addEventListener("instancecreate",this.cGt)}else this.lGt=!1,this.V8=NaN,this.U8=NaN}else this.lGt=!1,this.V8=NaN,this.U8=NaN}H4(){return this.JCt}B8(){return 0<this.Qbt.length}UJ(){return this.Qbt}fGt(){this.B8()&&1!==this.Qbt.length&&(this.oGt?this.Qbt.sort((t,s)=>{const e=this.oGt.get(t.fH()),i=this.oGt.get(s.fH());return C33.gi(e)&&C33.gi(i)?e-i:0}):this.Qbt.sort((t,s)=>{const e=t.Sht().dGt(),i=s.Sht().dGt();return C33.gi(e)&&C33.gi(i)?e-i:0}))}dGt(){return this.aGt}yht(){return this.sGt}pGt(t){this.sGt=t}Tht(){return this.eGt}CGt(t){this.eGt=t}Ght(){return this.nGt}o_t(){return this.rGt}mGt(t){this.rGt=t}ght(){return 0===this.Zbt?Number.EPSILON:this.Zbt}_ht(){return 0===this.tGt?Number.EPSILON:this.tGt}gGt(){if(this.i_.a5()){let t=this.JCt,s=t.AC(),e=t.Sht().ght();return 0===s&&(s=Number.EPSILON),e===Number.EPSILON&&s===Number.EPSILON?1:e===Number.EPSILON&&s!==Number.EPSILON&&this.lGt?1+s/this.V8:s/e}return 1}SGt(){if(this.i_.c5()){let t=this.JCt,s=t.OC(),e=t.Sht()._ht();return 0===s&&(s=Number.EPSILON),e===Number.EPSILON&&s===Number.EPSILON?1:e===Number.EPSILON&&s!==Number.EPSILON&&this.lGt?1+s/this.U8:s/e}return 1}yGt(){return 0}_Gt(){return{sw:this.Zbt,sh:this.tGt,sx:this.sGt,sy:this.eGt,psa:this.iGt,oo:this.rGt,so:this.nGt,pi:this.i_.fH().vbt()}}D8(t,s=null){const e=this._Gt();return s&&s.selfOnly?Object.assign(e,{p:null,c:[]}):Object.assign(e,{p:this.TGt(t),c:this.AGt(t)})}EGt(t){let s="";return t.r5()&&(s+="x"),t.h5()&&(s+="y"),t.a5()&&(s+="w"),t.c5()&&(s+="h"),t.f5()&&(s+="a"),t.p5()&&(s+="z"),t._5()&&(s+="d"),t.m5()&&(s+="o"),t.S5()&&(s+="v"),s}TGt(t){return this.JCt&&this.JCt.fH()&&!this.JCt.fH().mV()?this.IGt(this.JCt,this.i_,t):null}AGt(s){return this.Qbt.map(t=>this.IGt(t,t,s)).filter(t=>t)}IGt(t,s,e){const i=t.fH();if(i&&i.mV())return null;const r={};return r.uid=i.oB(),r.f=this.EGt(s),r.offsets=s.wGt(),r.data=C33.XJ.RGt(i),r.oci=i.qk().Yx(),"state"===e?(r.inst=i.Ky("full",{selfOnly:!0}),r.instIndex=NaN):(r.instIndex=i.qk().t$().indexOf(i),r.inst=null),r}N8(t){this.Zbt=t.sw,this.tGt=t.sh,this.sGt=t.sx,this.eGt=t.sy,this.iGt=t.psa,this.rGt=t.oo,this.nGt=t.so,this.aGt=C33.gi(t.pi)?t.pi:NaN}MGt(t,s){if(!t&&!s&&this.hGt)for(const e of this.hGt)e.mV()||e.s5()||e.cN().tB(e);this.hGt=t,this.oGt=s}e9(t,s){const e=this.i_,i=e.cN(),r=new Set;if(t.p&&!this.JCt){const o=t.p.uid,a=i.kD(o);if(s?.ITt,a){const l=a.UD();if(a.Mbt(e.fH()))this.JCt=l;else{a.Obt(e.fH().oB())?i.tB(e.fH()):a.Q4(e.fH(),this.bGt(t.p.f)),r.has(e)||(e.GGt(t.p.offsets),this.vGt(a,t.p,s)),r.add(e);const c=a.UD();c.Sht().fGt()}}else if(C33.gi(t.p.oci)){const u=i.$Y(t.p.oci),f=(i.IX(),i.n$(u,e.jD(),0,0,!0));if(s?.ITt,f){const d=this.PGt(t.p,i),p=(d&&f.zy(d),f.UD()),C=(p.jD().h$(f),f.Q4(e.fH(),this.bGt(t.p.f)),f.UD());C.Sht().fGt()}}}const n=[];for(const m of t.c){const g=m.uid,S=i.kD(g);S&&n.push(S)}let h=0;for(const y of t.c){const _=y.uid,T=i.kD(_);if(s?.ITt,T){if(this.hGt){if(this.hGt.includes(T)){const w=T;if(w.qk()!==T.qk()){h++;continue}if(w.mV()){h++;continue}const R=t.c[h];if(!s?.ITt&&this.OGt(w,n,e)){this.xGt(h,R,e,r,s),h++;continue}if(w.s5()&&w.H4()!==e.fH()){const M=this.LGt(R,s);this.DGt(M,R,r,s),h++;continue}this.DGt(w.UD(),R,r,s,!0),h++;continue}if(this.hGt[h]){const b=this.hGt[h];if(b.qk()!==T.qk()){h++;continue}if(b.mV()){h++;continue}const G=t.c[h];if(!s?.ITt&&this.OGt(b,n,e)){this.xGt(h,G,e,r,s),h++;continue}if(b.s5()&&b.H4()!==e.fH()){const v=this.LGt(G,s);this.DGt(v,G,r,s),h++;continue}this.DGt(b.UD(),G,r,s,!0),h++;continue}}const A=T.qk(),E=this.NGt(n,A),I=e.fH().bbt(A).length;if(E===I){const P=e.fH().K4(h);if(P){const O=P.UD();O&&(r.has(O)||(O.GGt(y.offsets),this.vGt(P,y,s)),r.add(O))}h++;continue}if(T.s5()&&T.H4()!==e.fH()){const x=this.LGt(y,s);this.DGt(x,y,r,s),h++;continue}this.DGt(T.UD(),y,r,s)}else if(this.hGt&&this.hGt[h]){const L=this.hGt[h],N=i.$Y(this.FGt(y));if(L.qk()!==N){h++;continue}if(L.mV()){h++;continue}const D=t.c[h];if(!s?.ITt&&this.OGt(L,n,e)){this.xGt(h,D,e,r,s),h++;continue}if(L.s5()&&L.H4()!==e.fH()){const F=this.LGt(D,s);this.DGt(F,D,r,s),h++;continue}this.DGt(L.UD(),D,r,s)}else{const $=this.LGt(y,s);this.DGt($,y,r,s)}h++}}OGt(t,s,e){const i=t.qk(),r=this.NGt(s,i),n=e.fH().bbt(i).length;return r===n}xGt(t,s,e,i,r){const n=e.fH().K4(t,s);if(n){const h=n.UD();h&&(i.has(h)||(h.GGt(s.offsets),this.vGt(n,s,r)),i.add(h))}}bGt(t){const s={};return s.i5=t.includes("x"),s.n5=t.includes("y"),s.o5=t.includes("w"),s.l5=t.includes("h"),s.u5=t.includes("a"),s.d5=t.includes("z"),s.y5=t.includes("d"),s.C5=t.includes("o"),s.g5=t.includes("v"),s}FGt(t){return C33.gi(t.oci)?t.oci:t[1]}LGt(i,r){if(C33.gi(i.oci)){let t=this.i_,s=t.cN(),e;if(i.data)e=s.YY(i.data,t.jD(),!1,0,0,!1,!0);else{const n=s.$Y(i.oci);e=s.n$(n,t.jD(),0,0,!0)}if(r?.ITt,e){const h=this.PGt(i,s),o=(h&&e.zy(h),e.UD());return o.jD().h$(e,!0),o}}}DGt(t,s,e,i,r=!0){const n=this.i_,h=n.Q4(t,this.bGt(s.f));h&&r&&(e.has(t)||(t.GGt(s.offsets),this.vGt(t.fH(),s,i)),e.add(t)),this.fGt()}vGt(t,s,e){let i=this.PGt(s,this.i_.cN());i&&((i=JSON.parse(JSON.stringify(i))).w=null,t.zy(i))}NGt(t,s){return t.filter(t=>t.qk().pf()===s.pf()).length}PGt(t,s){if(C33.gi(t.instIndex)){const e=s.$Y(t.oci),i=e.$Mt();return i?i[t.instIndex]:null}return C33.Ri(t.inst)?JSON.parse(t.inst):t.inst||void 0}static RGt(t){let s=t.UD().jD().VY(t.oB());if(!s)return null;s=JSON.parse(JSON.stringify(s));const e=[];for(const i of[...t.UJ()]){const r=i.UD();e.push([r.RD().gq(),r.jD().Yx(),i.oB(),C33.XJ.jJ(r),i.qk().nB()?1:0,r.XD(),C33.XJ.RGt(i)])}return C33.Wi(s[0][14])?s[0][14][1]=e:(s[0][14]=[],s[0][14][0]=C33.XJ.$Gt(),s[0][14][1]=e,s[0][14][2]=t.UD().XD()),s}static jJ(t){let s=0;return(s|=Number(t.S5())<<8)|Number(t.m5())<<7|Number(t.p5())<<6|Number(t._5())<<5|Number(t.f5())<<4|Number(t.c5())<<3|Number(t.a5())<<2|Number(t.h5())<<1|Number(t.r5())<<0}static $Gt(t){let s=0;return s,511}}}{let C33=self.Bs,glMatrix=self.Es,vec32=glMatrix.Ps,vec42=glMatrix.Os,tempRect=C33.yn(C33.Rect),tempQuad=C33.yn(C33.dc),bboxChangeEvent=C33.yn(C33.Event,"bboxchange",!1),tempColor=C33.yn(C33.Zo,0,0,0,0),tempCollisionPoly=C33.yn(C33.zc),DEFAULT_COLOR=C33.yn(C33.Zo,1,1,1,1),DEFAULT_RENDER_CELLS=C33.yn(C33.Rect,0,0,-1,-1),DEFAULT_COLLISION_CELLS=C33.yn(C33.Rect,0,0,-1,-1),VALID_SET_MESH_POINT_MODES=new Set(["absolute","relative"]),EMPTY_ARRAY=[],enableUpdateRendererStateGroup=!0,FLAG_IS_VISIBLE=1,FLAG_BBOX_CHANGED=2,FLAG_ENABLE_BBOX_CHANGED_EVENT=4,FLAG_COLLISION_ENABLED=8,FLAG_COLLISION_CELL_CHANGED=16,FLAG_SOLID_FILTER_INCLUSIVE=32,FLAG_HAS_ANY_ACTIVE_EFFECT=64,FLAG_IS_ROTATABLE=128,FLAG_DESTROYED=256,FLAG_DESTROY_WITH_PARENT=512,FLAG_TRANSFORM_WITH_PARENT_X=1024,FLAG_TRANSFORM_WITH_PARENT_Y=2048,FLAG_TRANSFORM_WITH_PARENT_W=4096,FLAG_TRANSFORM_WITH_PARENT_H=8192,FLAG_TRANSFORM_WITH_PARENT_A=16384,FLAG_TRANSFORM_WITH_PARENT_Z_ELEVATION=32768,FLAG_TRANSFORM_WITH_PARENT_OPACITY=1<<22,FLAG_TRANSFORM_WITH_PARENT_VISIBILITY=1<<23,MASK_ALL_SCENE_GRAPH_FLAGS=FLAG_DESTROY_WITH_PARENT|FLAG_TRANSFORM_WITH_PARENT_X|FLAG_TRANSFORM_WITH_PARENT_Y|FLAG_TRANSFORM_WITH_PARENT_W|FLAG_TRANSFORM_WITH_PARENT_H|FLAG_TRANSFORM_WITH_PARENT_A|FLAG_TRANSFORM_WITH_PARENT_Z_ELEVATION|FLAG_TRANSFORM_WITH_PARENT_OPACITY|FLAG_TRANSFORM_WITH_PARENT_VISIBILITY,FLAG_MESH_CHANGED=65536,FLAG_PHYSICS_BODY_CHANGED=1<<17,FLAG_SIN_COS_ANGLE_CHANGED=1<<18,FLAG_USE_POINTS_SHADER_PROGRAM=1<<19,FLAG_DRAW_BACK_FACE_ONLY=1<<20,FLAG_DRAW_NON_BACK_FACES_ONLY=1<<21,FLAG_BLEND_MODE_BIT_OFFSET=26,FLAG_BLEND_MODE_MASK=31<<FLAG_BLEND_MODE_BIT_OFFSET,sceneGraphExportDataMap=new WeakMap,sceneGraphZIndexMap=new WeakMap;C33.ebt=class extends C33.gn{constructor(t,s){super(),this.Ge=t,this.kft=t.qk(),this.Af=t.cN(),this.kGt=s,this.kft.xMt(this,null,s),this.BGt=-1,this.WGt=-1,this.qSt=FLAG_IS_VISIBLE|FLAG_BBOX_CHANGED|FLAG_COLLISION_ENABLED|FLAG_COLLISION_CELL_CHANGED|FLAG_MESH_CHANGED|FLAG_PHYSICS_BODY_CHANGED,this.kft.UF().IF()&&(this.qSt|=FLAG_IS_ROTATABLE),this.fl=NaN,this.dl=NaN,this.Ay=NaN,this.HGt=NaN,this.VGt=NaN,this.vT=NaN,this.na=NaN,this.UGt=NaN,this.jGt=NaN,this.XGt=NaN,this.YGt=NaN,this.qGt=C33.yn(C33.Rect),this.KGt=C33.yn(C33.dc),this.zGt=DEFAULT_COLLISION_CELLS,this.JGt=DEFAULT_RENDER_CELLS,this.QGt=null,this.ZGt=null,this.tvt=null,this.Ty=DEFAULT_COLOR,this.svt=DEFAULT_COLOR,this.evt=null,this.ivt=null,this.Ge.qk().fMt()&&(this.ivt=C33.yn(C33.rvt,this.Ge,this)),this.nvt=null,this.hGt=null,this.oGt=null,this.hvt=-1,this.ovt=null}Cbt(){this.qSt|=FLAG_DESTROYED}_n(){if(this.kft.xMt(this,this.kGt,null),this.evt&&(this.Af.JS().Eg(this.evt),this.evt=null),this.QGt=null,this.ZGt&&(this.ZGt.avt._n(),this.ZGt=null),this.tvt&&(this.tvt.clear(),this.tvt=null),this.I5(),this.ivt&&this.ivt._n(),this.s5()&&this.H4().Z4(this),this.B8()){const t=[...this.UJ()];for(const s of t)this.Z4(s)}this.lvt(),this.cvt(),sceneGraphExportDataMap.delete(this),sceneGraphZIndexMap.delete(this),this.Ge=null,this.kft=null,this.Af=null,this.kGt=null}rbt(t){if(enableUpdateRendererStateGroup=!1,this.f4(t[0],t[1]),this.Hy(t[2]),this.cM(t[3],t[4]),this.vT=0,this.IF()?this.y$(t[6]):this.na=0,tempColor.Za(t[7]),this.uvt(tempColor),this.Pht(t[8]),this.xht(t[9]),this.Iy(t[10]),this.ivt&&this.ivt.fvt(t[12]),t[14]&&sceneGraphExportDataMap.set(this,{dvt:t[14][1],pvt:t[14][2]}),t[15]){const s=t[15],i=(this.A5(s[0],s[1]),this.G5()),r=s[2];for(let e=0,t=r.length;e<t;++e){const n=r[e];for(let t=0,s=n.length;t<s;++t){const h=n[t],o=i.A_(t,e);o.Fy(h[0]),o.By(h[1]),o.Hy(h[2]),o.Uy(h[3]),o.Xy(h[4])}}}if(t[16]){const e=t[16][0],a=t[16][1],l=!!a,c=!l,u=this.Af.Lbt();l&&u&&u.cct(this.fH(),a),c&&u&&u.cct(this.fH(),e)}enableUpdateRendererStateGroup=!0,this.Cvt()}nbt(){this.fl=0,this.dl=0,this.Ay=0,this.HGt=0,this.VGt=0,this.vT=0,this.na=0,this.UGt=0,this.jGt=1,this.XGt=0,this.YGt=0,this.Cvt()}cN(){return this.Af}qk(){return this.kft}fH(){return this.Ge}mvt(){return this.f5()?this.gvt(this.H4().Svt()-this.nvt.yGt()):0}Fy(t){if(t=+t,this.r5()){const s=this.nvt,e=t-this.Ny(),i=-this.mvt();0==i?this.fl+=e/s.gGt():(this.fl+=Math.cos(i)*e/s.gGt(),this.h5()&&(this.dl+=Math.sin(i)*e/s.SGt()))}else this.fl=t}dht(t,s=!1){t=+t,!s&&this.r5()?this.Fy(this.Ny()+t):this.fl+=t}Ny(){if(this.r5()){let t=this.fl,s=this.nvt,e=this.H4(),i=this.mvt();return 0===i?t*=s.gGt():(t=t*s.gGt()*Math.cos(i),this.h5()&&(t-=this.dl*s.SGt()*Math.sin(i))),e.Ny()+t}return this.fl}By(t){if(t=+t,this.h5()){const s=this.nvt,e=t-this.ky(),i=-this.mvt();0==i?this.dl+=e/s.SGt():(this.r5()&&(this.fl-=Math.sin(i)*e/s.gGt()),this.dl+=Math.cos(i)*e/s.SGt())}else this.dl=t}pht(t,s=!1){t=+t,!s&&this.h5()?this.By(this.ky()+t):this.dl+=t}ky(){if(this.h5()){let t=this.dl,s=this.nvt,e=this.H4(),i=this.mvt();return 0===i?t*=s.SGt():(t=t*s.SGt()*Math.cos(i),this.r5()&&(t+=this.fl*s.gGt()*Math.sin(i))),e.ky()+t}return this.dl}f4(t,s){if(t=+t,s=+s,this.yvt()){const e=this.r5(),i=this.h5(),r=this.nvt,n=t-this.Ny(),h=s-this.ky(),o=-this.mvt();if(0==o)e?this.fl+=n/r.gGt():this.fl=t,i?this.dl+=h/r.SGt():this.dl=s;else{const a=Math.sin(o),l=Math.cos(o);e?this.fl+=i?(l*n-a*h)/r.gGt():l*n/r.gGt():this.fl=t,i?this.dl+=e?(a*n+l*h)/r.SGt():l*h/r.SGt():this.dl=s}}else this.fl=t,this.dl=s}_vt(){return[this.Ny(),this.ky()]}m4(t,s){t=+t,s=+s,this.yvt()?this.f4(this.Ny()+t,this.ky()+s):(this.fl+=t,this.dl+=s)}Fyt(t,s){return this.Ny()===t&&this.ky()===s}Hy(t){if(t=+t,this.p5()&&(t-=this.H4().Wy()),this.Ay!==t){this.Ay=t,this.Tvt();const s=this.jD();0!==this.Ay&&s.sq(),s.zD(this)}}Tvt(){if(this.Cvt(),this.B8()){const e=this.UJ();for(let t=0,s=e.length;t<s;t++){const i=e[t];i.p5()&&i.Tvt()}}}Lht(t){this.Hy(this.Wy()+t)}Wy(){return this.p5()?this.H4().Wy()+this.Ay:this.Ay}S4(){return this.jD().Wy()+this.Wy()}ket(){const t=this.fH().UF().MSt();return t<2&&this.fH().N5().ket()}GC(t){if(t=+t,this.a5()){const s=this.AC();0===s?this.HGt=Number.EPSILON:this.HGt*=t/s}else this.HGt=t;this.Avt()}tm(t,s){t=+t,!s&&this.a5()?this.GC(this.AC()+t):this.HGt+=t,this.Avt()}AC(){if(this.a5()){const t=this.H4(),s=t.AC(),e=t.Sht().ght();return e===Number.EPSILON?(this.Sht().ght()+s)*this.HGt:s*this.HGt}return this.HGt}EC(t){if(t=+t,this.c5()){const s=this.OC();0===s?this.VGt=Number.EPSILON:this.VGt*=t/s}else this.VGt=t;this.Avt()}Aht(t,s){t=+t,!s&&this.c5()?this.EC(this.OC()+t):this.VGt+=t,this.Avt()}OC(){if(this.c5()){const t=this.H4(),s=t.OC(),e=t.Sht()._ht();return e===Number.EPSILON?(this.Sht()._ht()+s)*this.VGt:s*this.VGt}return this.VGt}cM(t,s){if(t=+t,s=+s,this.a5()){const e=this.AC();0===e?this.HGt=Number.EPSILON:this.HGt*=t/e}else this.HGt=t;if(this.c5()){const i=this.OC();0===i?this.VGt=Number.EPSILON:this.VGt*=s/i}else this.VGt=s;this.Avt()}Tu(){return[this.AC(),this.OC()]}d8(){return this.vT}Evt(t){if(t<0)throw new RangeError("invalid depth");this.vT=t}Ivt(){if(this.s5()){const t=this.nvt;return Math.min(t.gGt(),t.SGt())}return 1}IF(){return 0!=(this.qSt&FLAG_IS_ROTATABLE)}y$(t){t=+t,this.IF()&&(this.f5()&&(t-=this.H4().GetAngle()),t=C33.Rn(t),this.na!==t)&&(this.na=t,this.Avt())}Eht(t){0!=(t=+t)&&this.IF()&&(this.na=C33.Rn(this.na+t),this.Avt())}Avt(){if(this.qSt|=FLAG_SIN_COS_ANGLE_CHANGED,this.B8()){const e=this.UJ();for(let t=0,s=e.length;t<s;t++)e[t].Avt()}}GetAngle(){return this.f5()&&this.IF()?this.gvt(C33.Rn(this.H4().Svt()+this.na)):this.na}Svt(){return this.f5()&&this.IF()?C33.Rn(this.H4().Svt()+this.na):this.na}gvt(t){return this.a5()&&this.U4().AC()<0&&(t=C33.Rn(C33.Bn(t,this.U4().GetAngle()+Math.PI))),this.c5()&&this.U4().OC()<0?C33.Bn(t,this.U4().GetAngle()):t}wvt(){const t=this.H4();return!!(this.a5()&&t.AC()<0)||!!(this.c5()&&t.OC()<0)}Rvt(){const t=this.H4();return!!(this.a5()&&t.AC()<0&&this.c5()&&t.OC()<0)}Mvt(){const t=this.qSt;if(0!=(t&FLAG_SIN_COS_ANGLE_CHANGED)){const s=this.GetAngle();this.UGt=Math.sin(s),this.jGt=Math.cos(s),this.qSt=t&~FLAG_SIN_COS_ANGLE_CHANGED}}Hyt(){return this.Mvt(),this.UGt}Wyt(){return this.Mvt(),this.jGt}Pht(t){this.XGt=+t}vht(t){this.XGt+=+t}IW(){return this.XGt}xht(t){this.YGt=+t}Oht(t){this.YGt+=+t}RW(){return this.YGt}uvt(t){this.Ty.equals(t)||(this.Ty===DEFAULT_COLOR?(this.Ty=C33.yn(C33.Zo,t),this.svt=C33.yn(C33.Zo,t),this.svt.Oa()):t.Ma(1,1,1,1)?(this.Ty=DEFAULT_COLOR,this.svt=DEFAULT_COLOR):(this.Ty.set(t),this.svt.set(t),this.svt.Oa()),this.Cvt())}jG(t){if(t=C33.wn(+t,0,1),this.m5()){if(this.Sht().o_t()===t)return;this.Sht().mGt(t),t=this.VG()}else if(this.Ty.a===t)return;this.bvt(t)}Gvt(){if(this.B8()){const e=this.UJ();for(let t=0,s=e.length;t<s;t++){const i=e[t];i.bvt(i.VG())}}}bvt(t){tempColor.ga(this.Ty),tempColor.a=t,this.uvt(tempColor),this.Gvt()}Rht(t){this.m5()?this.jG(this.Sht().o_t()+t):this.jG(this.VG()+t)}VG(){return this.m5()?this.H4().VG()*this.Sht().o_t():this.Ty.a}M4(t){this.Ty.wa(t)||(tempColor.ga(t),tempColor.a=this.VG(),this.uvt(tempColor))}nht(t,s,e){tempColor.aa(t,s,e),this.M4(tempColor)}vvt(t,s,e){0===t&&0===s&&0===e||(tempColor.ga(this.Ty),tempColor.r+=t,tempColor.g+=s,tempColor.b+=e,this.M4(tempColor))}R4(){return this.Ty}AY(){return this.svt}_5(){return 0!=(this.qSt&FLAG_DESTROY_WITH_PARENT)}Pvt(t){this.Ovt(FLAG_DESTROY_WITH_PARENT,t)}r5(){return 0!=(this.qSt&FLAG_TRANSFORM_WITH_PARENT_X)}xvt(t){this.Ovt(FLAG_TRANSFORM_WITH_PARENT_X,t)}h5(){return 0!=(this.qSt&FLAG_TRANSFORM_WITH_PARENT_Y)}yvt(){return 0!=(this.qSt&(FLAG_TRANSFORM_WITH_PARENT_X|FLAG_TRANSFORM_WITH_PARENT_Y))}Lvt(t){this.Ovt(FLAG_TRANSFORM_WITH_PARENT_Y,t)}a5(){return 0!=(this.qSt&FLAG_TRANSFORM_WITH_PARENT_W)}Dvt(t){this.Ovt(FLAG_TRANSFORM_WITH_PARENT_W,t)}c5(){return 0!=(this.qSt&FLAG_TRANSFORM_WITH_PARENT_H)}Nvt(t){this.Ovt(FLAG_TRANSFORM_WITH_PARENT_H,t)}f5(){return 0!=(this.qSt&FLAG_TRANSFORM_WITH_PARENT_A)}Fvt(t){this.Ovt(FLAG_TRANSFORM_WITH_PARENT_A,t)}p5(){return 0!=(this.qSt&FLAG_TRANSFORM_WITH_PARENT_Z_ELEVATION)}$vt(t){this.Ovt(FLAG_TRANSFORM_WITH_PARENT_Z_ELEVATION,t)}m5(){return 0!=(this.qSt&FLAG_TRANSFORM_WITH_PARENT_OPACITY)}kvt(t){this.Ovt(FLAG_TRANSFORM_WITH_PARENT_OPACITY,t)}S5(){return 0!=(this.qSt&FLAG_TRANSFORM_WITH_PARENT_VISIBILITY)}Bvt(t){this.Ovt(FLAG_TRANSFORM_WITH_PARENT_VISIBILITY,t)}Wvt(){this.qSt&=~MASK_ALL_SCENE_GRAPH_FLAGS}Q4(t,s){if(t===this)return!1;if(t.s5())return!1;if(this.Hvt(t))return!1;if(this.Vvt(t))return!1;const e=t.Ny(),i=t.ky(),r=t.AC(),n=t.OC(),h=t.GetAngle(),o=t.Wy(),a=t.VG(),l=(t.Uvt(this),t.xvt(s.i5),t.Lvt(s.n5),t.Dvt(s.o5),t.Nvt(s.l5),t.Fvt(s.u5),t.$vt(s.d5),t.kvt(s.C5),t.Bvt(s.g5),t.Pvt(s.y5),e-this.Ny()),c=i-this.ky(),u=-this.GetAngle(),f=Math.cos(u),d=Math.sin(u);if(s.i5&&(s.u5?t.fl=l*f-c*d:t.fl=l,s.o5)){const p=this.AC()/this.nvt.ght();0!=p&&(t.fl/=p)}if(s.n5&&(s.u5?t.dl=l*d+c*f:t.dl=c,s.l5)){const C=this.OC()/this.nvt._ht();0!=C&&(t.dl/=C)}if(s.o5){const m=this.AC();0===m||m===Number.EPSILON?(t.HGt=1,t.nvt.pGt(1)):(t.HGt=r/this.AC(),t.nvt.pGt(t.HGt))}if(s.l5){const g=this.OC();0===g||g===Number.EPSILON?(t.VGt=1,t.nvt.CGt(1)):(t.VGt=n/this.OC(),t.nvt.CGt(t.VGt))}return s.u5&&(t.na=h-this.GetAngle()),s.d5&&(t.Ay=o-this.Wy()),s.C5&&t.nvt.mGt(a),s.g5&&t.ek(this.rk()),this.jvt(t),this.u4(),this.Gvt(),!0}Z4(t){if(t.H4()===this){const s=t.Ny(),e=t.ky(),i=t.AC(),r=t.OC(),n=t.GetAngle(),h=t.Wy(),o=t.VG();t.Uvt(null),t.Wvt(),t.f4(s,e),t.cM(i,r),t.y$(n),t.Hy(h),t.jG(o),this.Xvt(t),this.u4()}}Yvt(){return this.hvt}qvt(){this.Kvt();const t=[...this.children()];for(const e of t)this.Z4(e);const s=this.H4();s&&s.Z4(this),this.Wvt()}Kvt(){if(this.zvt(),!this.hGt){const s=[...this.children()];s.length&&(this.hGt=[],this.oGt=new WeakMap);let t=0;for(const e of s){const i=e.fH();this.hGt.push(i),this.oGt.set(i,t),t++}}const t=this.H4();t&&t.Kvt()}zvt(){if(-1===this.hvt){const t=[...this.j4()];this.hvt=t.length;for(const e of t)e.zvt();const s=[...this.children()];for(const i of s)i.zvt()}}cvt(){this.hGt&&(this.hGt.length=0),this.hGt=null,this.oGt=null;const t=this.H4();t&&t.cvt(),this.hvt=-1}s5(){return null!==this.H4()}H4(){const t=this.nvt;return null!==t?t.H4():null}U4(){let t=this;for(;t.s5();)t=t.H4();return t}*j4(){let t=this.H4();for(;t;)yield t,t=t.H4()}Mbt(t){return this.UJ().includes(t)}B8(){const t=this.nvt;return null!==t&&t.B8()}UJ(){const t=this.nvt;return null!==t?t.UJ():EMPTY_ARRAY}children(){return this.UJ()}*z4(){for(const t of this.children())yield t,yield*t.z4()}Y4(){return this.UJ().length}$_t(){return[...this.z4()].length}K4(t){const s=this.UJ();return(t=Math.floor(+t))<0||t>=s.length?null:s[t]}Pbt(s){if(s){const e=this.UJ();if(e)for(let t=0;t<e.length;t++)if(s===e[t])return t}return NaN}Jvt(t){this.nvt||(this.nvt=C33.yn(C33.XJ,this)),t&&this.nvt.uGt(t)}Sht(){return this.nvt}lvt(){this.nvt&&(this.nvt._n(),this.nvt=null)}Uvt(t){t?(t.Jvt(null),this.Jvt(t)):(this.nvt&&this.nvt.uGt(null),this.B8()||this.lvt())}Vvt(t){if(!this.s5())return!1;const s=this.H4();return s===t||s.Vvt(t)}Hvt(t){if(this.Mbt(t))return!0;for(const s of this.UJ())if(s.Hvt(t))return!0;return!1}jvt(t){this.nvt.UJ().push(t)}Xvt(t){const s=this.nvt.UJ(),e=s.indexOf(t);-1!==e&&s.splice(e,1),0!==s.length||this.s5()||this.lvt(),t.B8()||t.lvt()}xbt(){const t=sceneGraphExportDataMap.get(this);return t?t.dvt:null}Qvt(){const t=sceneGraphExportDataMap.get(this);return t?t.pvt:NaN}k8(){const t=sceneGraphZIndexMap.get(this);return C33.gi(t)?t:NaN}Zvt(t){sceneGraphZIndexMap.set(this,t)}tPt(){this.Ovt(FLAG_USE_POINTS_SHADER_PROGRAM,!0),this.Cvt()}Cvt(){if(enableUpdateRendererStateGroup){const s=this.Af.JS();this.evt&&s.Eg(this.evt);let t;t=0!=(this.qSt&FLAG_USE_POINTS_SHADER_PROGRAM)?s.rg()||"<point>":s.sg()||"<default>",this.evt=s.yg(t,this.Gk(),this.svt,this.Wy())}}_8(){return this.evt}Tq(){return this.Ty===DEFAULT_COLOR}Iy(t){if((t|=0)<0||31<t)throw new RangeError("invalid blend mode");this.Gk()!==t&&(this.qSt=this.qSt&~FLAG_BLEND_MODE_MASK|t<<FLAG_BLEND_MODE_BIT_OFFSET,this.Cvt())}Gk(){return(this.qSt&FLAG_BLEND_MODE_MASK)>>FLAG_BLEND_MODE_BIT_OFFSET}KD(t,s){const e=s&&this.kGt!==t;e&&this.ZY(),this.kft.xMt(this,this.kGt,t),this.kGt=t,e&&this.sPt(),0!==this.Wy()&&this.kGt.sq()}jD(){return this.kGt}RD(){return this.jD().RD()}iq(t){this.BGt=0|t}XD(){return this.kGt.dK(),this.BGt}gK(t){this.WGt=0|t}cV(){return this.kGt.CK(),this.WGt}s6(){return this.BGt}Ovt(t,s){s?this.qSt|=t:this.qSt&=~t}rk(){return 0!=(this.qSt&FLAG_IS_VISIBLE)}ek(t){if(this.Ovt(FLAG_IS_VISIBLE,t),this.B8())for(const s of this.UJ())s.S5()&&s.ek(t)}F4(){return 0!=(this.qSt&FLAG_COLLISION_ENABLED)}B4(t){t=!!t,this.F4()!==t&&(this.Ovt(FLAG_COLLISION_ENABLED,t),t?this.u4():this.ePt())}iPt(t,s){if(this.Ovt(FLAG_SOLID_FILTER_INCLUSIVE,t),this.tvt&&this.tvt.clear(),s.trim()){this.tvt||(this.tvt=new Set);for(const e of s.split(" "))e&&this.tvt.add(e.toLowerCase())}else this.tvt=null}rPt(t){const s=0!=(this.qSt&FLAG_SOLID_FILTER_INCLUSIVE),e=this.tvt;if(t&&e)for(const i of e)if(t.has(i))return s;return!s}u4(){if(this.qSt|=FLAG_BBOX_CHANGED|FLAG_COLLISION_CELL_CHANGED|FLAG_MESH_CHANGED,this.kft.vMt(!0),this.Af.JD(),this.kGt.LY()&&(this.nPt(this.qGt,this.KGt,!0),this.qSt&=~FLAG_BBOX_CHANGED,this.sPt()),0!=(this.qSt&FLAG_ENABLE_BBOX_CHANGED_EVENT)&&this.Ge.ed().dispatchEvent(bboxChangeEvent),null!==this.nvt){const e=this.nvt.UJ();for(let t=0,s=e.length;t<s;++t)e[t].u4()}}nPt(t,s,e){const i=this.Ny(),r=this.ky(),n=this.AC(),h=this.OC(),o=this.GetAngle();t.Ml(i-this.XGt*n,r-this.YGt*h,n,h),e&&this.b5()&&this.hPt(t),0===o?s.Fc(t):(t.offset(-i,-r),s.kc(t,this.Hyt(),this.Wyt()),s.offset(i,r),s.Bc(t)),t.normalize()}oPt(){const t=this.qSt;0!=(t&FLAG_BBOX_CHANGED)&&(this.nPt(this.qGt,this.KGt,!0),this.qSt=t&~FLAG_BBOX_CHANGED)}_4(){return this.oPt(),this.qGt}A4(){return this.oPt(),this.KGt}aPt(t){const s=this.Ny(),e=this.ky(),i=Math.round(s)-s,r=Math.round(e)-e;return 0==i&&0==r?t:(tempQuad.I(t),tempQuad.offset(i,r),tempQuad)}lPt(t){this.qGt.I(t),this.KGt.Fc(this.qGt),this.qSt&=~FLAG_BBOX_CHANGED,this.OMt(),this.sPt()}cPt(t){this.Ovt(FLAG_ENABLE_BBOX_CHANGED_EVENT,t)}uPt(){return 0!=(this.qSt&FLAG_ENABLE_BBOX_CHANGED_EVENT)}a8(t,s,e){return s&&0!==this.d8()?this.u8(this.jD().c8()):0===this.Wy()||e?t.oc(this._4()):this.fPt()}fPt(){const t=this.jD(),s=this.S4();return!(s>=t.kq())&&(t.Fq(s,tempRect),tempRect.oc(this._4()))}u8(t){const s=this._4(),e=s.Nl(),i=s.$l(),r=s.Fl(),n=s.kl(),h=this.S4(),o=h+this.d8();return t.L1(e,r,h,i,n,o)}I4(){const t=this.jD();if(t.Jq())return this.u8(t.c8());{const s=t.RD();return this.a8(t.xk(),s.o8(),s.X$())}}g8(t){this.Ovt(FLAG_DRAW_BACK_FACE_ONLY,t)}m8(t){this.Ovt(FLAG_DRAW_NON_BACK_FACES_ONLY,t)}dPt(){return 0!=(this.qSt&FLAG_DRAW_BACK_FACE_ONLY)}pPt(){return 0!=(this.qSt&FLAG_DRAW_NON_BACK_FACES_ONLY)}CPt(t){this.QGt=t,this.mPt(),this.b5()&&(this.ovt.gPt=null)}SPt(){return this.QGt}yPt(){return null!==this.QGt||this.b5()}_Pt(){return this.TPt(this.AC(),this.OC(),this.GetAngle(),this.Hyt(),this.Wyt())}APt(t,s,e){let i=0,r=1;return 0!==e&&(i=Math.sin(e),r=Math.cos(e)),this.TPt(t,s,e,i,r)}TPt(r,n,t,h,o){let s=this.ZGt;null===s&&(s={avt:C33.yn(C33.zc),width:NaN,height:NaN,angle:NaN},this.ZGt=s);const a=s.avt;if(s.width!==r||s.height!==n||s.angle!==t){const l=this.QGt;if(this.b5()){let t=this.IW(),s=this.RW(),e=this.G5(),i=this.ovt.gPt;i||(l?(tempCollisionPoly.I(l),tempCollisionPoly.offset(t,s)):tempCollisionPoly.ru(),i=e.R_(tempCollisionPoly),this.ovt.gPt=i),e.M_(i,a),a.offset(-t,-s),a.au(r,n,h,o)}else l?(a.I(l),a.au(r,n,h,o)):a.ou(this.A4(),-this.Ny(),-this.ky());s.width=r,s.height=n,s.angle=t}return a}mPt(){this.EPt(!0);const t=this.ZGt;null!==t&&(t.width=NaN)}A5(t,s){if(t=Math.floor(t),s=Math.floor(s),!this.fH().UF().OF())throw new Error("object does not support mesh");this.I5(),this.ovt={IPt:C33.yn(C33.T1.t_,t,s),wPt:C33.yn(C33.T1.t_,t,s),gPt:null}}b5(){return null!==this.ovt}G5(){if(this.b5())return this.ovt.IPt;throw new Error("no mesh")}RPt(){if(this.b5())return this.ovt.wPt;throw new Error("no mesh")}MPt(t){this.Ovt(FLAG_MESH_CHANGED,t)}bPt(){return 0!=(this.qSt&FLAG_MESH_CHANGED)}EPt(t){this.Ovt(FLAG_PHYSICS_BODY_CHANGED,t)}GPt(){return 0!=(this.qSt&FLAG_PHYSICS_BODY_CHANGED)}hPt(t){const s=this.ovt.IPt,e=Math.min(s.m_(),0),i=Math.min(s.g_(),0),r=Math.max(s.S_(),1),n=Math.max(s.y_(),1),h=t.width(),o=t.height();t.offsetLeft(e*h),t.offsetTop(i*o),t.Xl((r-1)*h),t.Yl((n-1)*o),this.vT=s.__()}I5(){this.ovt&&(this.ovt.IPt._n(),this.ovt.wPt._n(),this.ovt=null,this.mPt())}R5(t,s,e){t=Math.floor(t),s=Math.floor(s);const i=e.mode||"absolute";if(!VALID_SET_MESH_POINT_MODES.has(i))throw new Error("invalid mode");let r="relative"===i,n=e.x,h=e.y,o=e.Ak,a="number"==typeof e.u?e.u:r?0:-1,l="number"==typeof e.v?e.v:r?0:-1;if(!this.b5())return!1;const c=this.G5(),u=c.A_(t,s);if(null===u)return!1;let f=!1;return"number"==typeof o&&u.Wy()!==o&&(u.Hy(o),f=!0),r&&(n+=t/(c.u_()-1),h+=s/(c.f_()-1)),a=-1!==a||r?(r&&(a+=t/(c.u_()-1)),C33.wn(a,0,1)):u.Vy(),l=-1!==l||r?(r&&(l+=s/(c.f_()-1)),C33.wn(l,0,1)):u.jy(),u.Ny()===n&&u.ky()===h&&u.Vy()===a&&u.jy()===l?f:(u.Fy(n),u.By(h),u.Uy(a),u.Xy(l),this.mPt(),!0)}pbt(){return this.Ge.pbt()}W4(t,s){return!!this._4().lc(t,s)&&!!this.A4().lc(t,s)&&(this.pbt()?this.Ge.N5().tIt(t,s):!this.yPt()||this._Pt().lc(t-this.Ny(),s-this.ky()))}vPt(){return 0!=(this.qSt&FLAG_COLLISION_CELL_CHANGED)}OMt(){if(this.vPt()&&this.F4()&&0==(this.qSt&FLAG_DESTROYED)){const t=this._4(),s=this.kft.GMt(),e=this.zGt;if(tempRect.set(s.S6(t.Nl()),s.y6(t.Fl()),s.S6(t.$l()),s.y6(t.kl())),!e.equals(tempRect)){const i=this.Ge;e===DEFAULT_COLLISION_CELLS?(s._6(i,null,tempRect),this.zGt=C33.yn(C33.Rect,tempRect)):(s._6(i,e,tempRect),e.I(tempRect)),this.qSt&=~FLAG_COLLISION_CELL_CHANGED}}}PPt(){this.qSt|=FLAG_COLLISION_CELL_CHANGED}ePt(){const t=this.zGt;t!==DEFAULT_COLLISION_CELLS&&(this.kft.GMt()._6(this.Ge,t,null),this.zGt=DEFAULT_COLLISION_CELLS)}sPt(){const t=this.jD();if(t.LY()&&0==(this.qSt&FLAG_DESTROYED)){const s=t.Eq(),e=this._4(),i=this.JGt;if(tempRect.set(s.S6(e.Nl()),s.y6(e.Fl()),s.S6(e.$l()),s.y6(e.kl())),!i.equals(tempRect)){const r=this.Ge;i===DEFAULT_RENDER_CELLS?(s._6(r,null,tempRect),this.JGt=C33.yn(C33.Rect,tempRect)):(s._6(r,i,tempRect),i.I(tempRect)),t.Iq()}}}ZY(){const t=this.JGt;t!==DEFAULT_RENDER_CELLS&&(this.jD().Eq()._6(this.Ge,t,null),this.JGt=DEFAULT_RENDER_CELLS)}pK(){return this.JGt}G4(){const t=this.Ge,s=this.kGt,e=s.qD();e.length&&e.at(-1)===t||(s.QY(t,!1),s.KY(t,!1),this.Af.JD())}P4(){const t=this.Ge,s=this.kGt,e=s.qD();e.length&&e[0]===t||(s.QY(t,!1),s.JY(t,!1),this.Af.JD())}x4(t){const s=this.Ge,e=this.kGt;if(e.RD()!==t.RD())throw new Error("layer from different layout");t!==e&&(e.QY(s,!0),this.KD(t),t.KY(s,!0),this.Af.JD())}D4(t,s){let e=this.Ge,i=!1,r=this.kGt;if(t.oB()!==e.oB()){const n=t.UD();if(!n)throw new Error("expected world instance");const h=n.jD(),o=(r.Yx()!==h.Yx()&&(r.QY(e,!0),this.KD(h),h.KY(e,!0),i=!0),h._K(e,t,!!s));(i||o)&&this.Af.JD()}}l4(){return this.ivt}OPt(t){this.Ovt(FLAG_HAS_ANY_ACTIVE_EFFECT,t)}MK(){return 0!=(this.qSt&FLAG_HAS_ANY_ACTIVE_EFFECT)}D8(t,s=null){const e={x:this.Ny(),y:this.ky(),w:this.AC(),h:this.OC(),l:this.jD().gq(),zi:this.XD()},i=(0!==this.Wy()&&(e.ze=this.Wy()),0!==this.GetAngle()&&(e.a=this.Svt()),this.Tq()||(e.c=this.Ty.toJSON()),.5!==this.IW()&&(e.oX=this.IW()),.5!==this.RW()&&(e.oY=this.RW()),0!==this.Gk()&&(e.bm=this.Gk()),this.rk()||(e.v=this.rk()),this.F4()||(e.ce=this.F4()),this.uPt()&&(e.be=this.uPt()),this.ivt&&(e.fx=this.ivt.D8()),0!=(this.qSt&FLAG_SOLID_FILTER_INCLUSIVE));return i&&(e.sfi=i),this.tvt&&(e.sft=[...this.tvt].join(" ")),this.nvt&&"visual-state"!==t&&(e.sgi=this.nvt.D8(t,s),sceneGraphExportDataMap.has(this))&&(e.sgcd=sceneGraphExportDataMap.get(this).dvt,e.sgzid=sceneGraphExportDataMap.get(this).pvt),this.b5()&&(e.mesh=this.G5().Ky()),e}wGt(){return{x:this.fl,y:this.dl,z:this.Ay,w:this.HGt,h:this.VGt,a:this.na,sgi:this.Sht()?this.Sht()._Gt():null}}GGt(t){t&&(this.fl=t.x,this.dl=t.y,this.Ay=t.z,this.HGt=t.w,this.VGt=t.h,this.na=t.a,t.sgi&&this.Sht()&&this.Sht().N8(t.sgi),this.Avt(),this.u4())}BMt(){this.cvt(),this.qvt(),this.Jvt(null),this.nvt&&this.nvt.MGt(this.hGt,this.oGt)}t9(t){"visual-state"!==t&&this.qvt()}e9(t,s="full",e=null){t.hasOwnProperty("sgi")&&"visual-state"!==s&&0==(this.qSt&FLAG_DESTROYED)&&this.nvt.e9(t.sgi,e)}zbt(t,s="full",e){t.hasOwnProperty("sgi")&&"visual-state"!==s&&0==(this.qSt&FLAG_DESTROYED)&&(this.nvt.MGt(null,null),this.cvt(),this.u4())}N8(t,s){if(enableUpdateRendererStateGroup=!1,this.Fy(t.x),this.By(t.y),this.GC(t.w),this.EC(t.h),this.iq(t.zi),this.Hy(t.hasOwnProperty("ze")?t.ze:0),this.y$(t.hasOwnProperty("a")?t.a:0),t.hasOwnProperty("c")?tempColor.Za(t.c):t.hasOwnProperty("o")?(tempColor.ga(this.Ty),tempColor.a=t.o):tempColor.oa(1,1,1,1),this.uvt(tempColor),this.Pht(t.hasOwnProperty("oX")?t.oX:.5),this.xht(t.hasOwnProperty("oY")?t.oY:.5),this.Iy(t.hasOwnProperty("bm")?t.bm:0),this.ek(!t.hasOwnProperty("v")||t.v),this.B4(!t.hasOwnProperty("ce")||t.ce),this.cPt(!!t.hasOwnProperty("be")&&t.be),this.iPt(!!t.hasOwnProperty("sfi")&&t.sfi,t.hasOwnProperty("sft")?t.sft:""),this.ivt&&t.hasOwnProperty("fx")&&this.ivt.N8(t.fx),!t.hasOwnProperty("sgi")&&"visual-state"!==s&&this.hGt)for(const e of this.hGt)e.mV()||this.Af.tB(e);if(t.hasOwnProperty("sgi")&&"visual-state"!==s){this.Jvt(null);const i=this.nvt,r=t.sgi;i.N8(r),i.MGt(this.hGt,this.oGt),t.sgcd&&C33.gi(t.sgzid)&&sceneGraphExportDataMap.set(this,{dvt:t.sgcd,pvt:t.sgzid})}if(t.hasOwnProperty("mesh")){const n=t.mesh;this.A5(n.cols,n.rows),this.G5().zy(n)}else this.I5();this.u4(),enableUpdateRendererStateGroup=!0,this.Cvt(),"visual-state"!==s&&this.Af.xPt(this.fH(),t)}}}{const C33=self.Bs;C33._Rt=class extends C33.gn{constructor(t,s){super();const e=t.cN(),i=e.z1t(s[1]),r=(e.LPt().qIt(i),this.Af=e,this.kft=t,this.bIt=C33.CF.Q5(i),this.dEt=null,this.DPt=null,this.Jwt=i.Instance,this.N6=s[2],this.En=s[0],this.x2t=this.Af.p3t(s[3]),this.bIt.MSt());if(r<2&&(this.dEt=C33.yn(i.FRt,this),!(this.dEt instanceof C33.MIt)))throw new Error("v1 sdk type must derive from SDKBehaviorBase");if(C33.CF.KAt(this,r),2<=r){const n=i.FRt??globalThis.MV;if(this.DPt=new n,!(this.DPt instanceof globalThis.MV))throw new Error("script interface class must derive from ISDKBehaviorTypeBase")}else this.DPt=new globalThis.z5;C33.CF.zAt(r),this.jAt()}static CA(t,s){return C33.yn(C33._Rt,t,s)}_n(){this.Af=null,this.bIt=null,this.dEt&&(this.dEt._n(),this.dEt=null),this.Jwt=null}Eyt(){return this.dEt}jAt(){this.dEt?this.dEt.jAt():this.DPt&&this.DPt.vH()}cN(){return this.Af}qk(){return this.kft}U5(){return this.bIt}nMt(){return this.Jwt}pf(){return this.En}gq(){return this.N6}X5(){return this.DPt}p3t(){return this.x2t}}}{const C33=self.Bs,IBehaviorInstance=self.H5;C33.ZMt=class extends C33.gn{constructor(t){super(),this.Af=t.runtime,this.ugt=t.j5,this.bIt=this.ugt.U5(),this.Ge=t.q5,this.f1=t.index,this.jMt=null,this.XMt=null,this.bIt.KY(this.Ge)}_n(){this.XMt&&(this.XMt.Zk(),this.XMt=null),this.bIt.QY(this.Ge),this.jMt&&(this.jMt._n(),this.jMt=null),this.Af=null,this.ugt=null,this.bIt=null,this.Ge=null}tMt(t){if(this.jMt)throw new Error("already got sdk instance");const s=this.U5().MSt();if(s<2){if(this.jMt=C33.yn(this.ugt.nMt(),this,t),!(this.jMt instanceof C33.GIt))throw new Error("v1 sdk type must derive from SDKBehaviorInstanceBase")}else{const e=this.U5().XAt();this.qAt(e.Instance,t)}}N5(){return this.jMt??this.XMt}K5(){return this.Ge}cN(){return this.Af}Y5(){return this.ugt}U5(){return this.bIt}jnt(){return this.f1}xIt(){this.jMt?this.jMt.xIt():this.XMt.PV()}FIt(t,s){this.jMt&&this.jMt.FIt(t,s)}Kbt(){return this.jMt?this.jMt.LEt():this.XMt.KB()}Ky(t="full"){return this.jMt?this.jMt.Ky(t):this.XMt.zB(t)}zy(t,s="full"){if(this.jMt)return this.jMt.zy(t,s);this.XMt.JB(t,s)}static NPt(t,s,e){let i=globalThis.bV,r,n;r=s instanceof i?t.O$(s):s.OIt(),n=e instanceof i?t.O$(e):e.OIt();const h=r.K5(),o=n.K5(),a=h.qk().Yx(),l=o.qk().Yx();if(a!==l)return a-l;const c=h.Fbt(),u=o.Fbt();return c!==u?c-u:r.jnt()-n.jnt()}qAt(t,s){const e=IBehaviorInstance,i=t??this.jMt.XAt(),r=i||e,n=this.U5().MSt();if(C33.CF.KAt(this,n),C33.CF.KIt(s),this.XMt=new r,C33.CF.zIt(),C33.CF.zAt(n),!i||this.XMt instanceof e)return this.XMt;throw new TypeError(`script interface class '${i.name}' does not extend the right base class '${e.name}'`)}mEt(){return this.XMt||this.qAt()}$Et(){return!!this.XMt}}}{const C33=self.Bs;C33._Y=class extends C33.gn{constructor(t,s){super(),this.i_=t,this.FPt=[],this.$Pt=[],this.kPt=new Map,this.BPt=[],this.WPt=[],this.HPt=new Set,this.US=!0;for(const e of s){const i=C33.yn(C33.VPt,this,e,this.FPt.length);this.FPt.push(i),this.kPt.set(i.pf().toLowerCase(),i),3<=e.length&&this.BPt.push(this.UPt(i,e[2]))}this.cN().jPt(this)}_n(){this.cN().XPt(this);for(const t of this.WPt)t._n();C33.qh(this.WPt),C33.qh(this.FPt),C33.qh(this.$Pt),this.kPt.clear(),C33.qh(this.BPt),this.i_=null}YPt(t){this.HPt.add(t)}qPt(t){this.HPt.delete(t)}KPt(t){t.q2()&&(this.WPt=this.FPt.map(t=>{const s=t.pE();return 0<s.GetCustomParametersByteSize()?C33.yn(C33.T1.WebGPUEffectCustomParamsBuffer,s):null}),this.zPt());for(const s of this.HPt)s.KPt(t)}QRt(t){if(t.length){this.FPt=t.concat(this.FPt);for(const s of t)this.kPt.set(s.pf().toLowerCase(),s);for(let t=0,s=this.FPt.length;t<s;++t)this.FPt[t].uq(t)}}UPt(t,s){t.JPt(s[0]);const e=s.slice(1);for(let t=0,s=e.length;t<s;++t){const i=e[t];if(Array.isArray(i)){const r=C33.yn(C33.Zo);r.Za(i),e[t]=r}}return e}d_(){return this.i_}cN(){return this.i_.cN()}sW(){C33.qh(this.$Pt);let t=!0;for(const s of this.FPt)s.NCt()&&(this.$Pt.push(s),s.pE().ny()||(t=!1));this.US=t}p$(){return this.FPt}dMt(){return 0<this.FPt.length}qrt(t){return this.kPt.get(t.toLowerCase())||null}QPt(t){if((t=Math.floor(+t))<0||t>=this.FPt.length)throw new RangeError("invalid effect type index");return this.FPt[t]}Z5(t){return this.QPt(t).NCt()}tW(t,s){this.QPt(t).JPt(s)}Aq(){return this.$Pt}MK(){return 0<this.$Pt.length}ny(){return this.US}Yrt(t){return this.BPt[t]}IY(t){return(t<this.WPt.length?this.WPt:this.BPt)[t]}eW(t,s){if(t<0||t>=this.BPt.length)return null;const e=this.BPt[t];return s<0||s>=e.length?null:e[s]}iW(t,s,e){if(t<0||t>=this.BPt.length)return!1;const i=this.BPt[t];if(s<0||s>=i.length)return!1;const r=i[s];if(r instanceof C33.Zo){if(r.wa(e))return!1;r.ga(e)}else{if(r===e)return!1;i[s]=e}return t<this.WPt.length&&this.WPt[t].SetParameterValue(s,e),!0}zPt(){const e=this.BPt,i=this.WPt;for(let t=0,s=Math.min(e.length,i.length);t<s;++t){const r=i[t],n=e[t];for(let t=0,s=n.length;t<s;++t)r.SetParameterValue(t,n[t])}}static ZPt(t){return t&&t instanceof C33.Zo?{t:"color",v:t.toJSON()}:t}static tOt(t){if(null===t)return NaN;if("object"!=typeof t)return t;{const s=t.t;if("color"!==s)throw new Error("invalid effect parameter type");{const e=C33.yn(C33.Zo);return e.Za(t.v),e}}}static sOt(t){return t.map(C33._Y.ZPt)}static eOt(t){return t.map(C33._Y.tOt)}Ky(){return this.FPt.map(t=>({name:t.pf(),active:t.NCt(),params:C33._Y.sOt(this.BPt[t.Yx()])}))}zy(t){for(const s of t){const e=this.qrt(s.name);e&&(e.JPt(s.active),this.BPt[e.Yx()]=C33._Y.eOt(s.params))}this.sW(),this.zPt()}}}{const C33=self.Bs;C33.VPt=class extends C33.gn{constructor(t,s,e){super(),this.yY=t,this.If=s[0],this.En=s[1],this.f1=e,this.Sy=null,this.Gd=!0}_n(){this.yY=null,this.Sy=null}JRt(t){const s=C33.yn(C33.VPt,t,[this.If,this.En],-1);return s.Sy=this.Sy,s.Gd=this.Gd,s}KPt(t){const s=t.tg(this.If);if(!s)throw new Error("failed to find shader program '"+this.If+"'");this.Sy=s}d$(){return this.yY}pf(){return this.En}uq(t){this.f1=t}Yx(){return this.f1}d_(){return this.yY.d_()}cN(){return this.yY.cN()}JPt(t){this.Gd=!!t}NCt(){return this.Gd}pE(){return this.Sy}iOt(){const e=[];for(let t=0,s=this.Sy.CE();t<s;++t){const i=this.Sy.mE(t);if("float"===i||"percent"===i)e.push(0);else{if("color"!==i)throw new TypeError("unknown effect parameter type");e.push(C33.yn(C33.Zo,1,1,1,1))}}return e}}}{const C33=self.Bs;C33.rvt=class extends C33.gn{constructor(t,s){super(),this.Ge=t,this.rOt=s,this.yY=t.qk().d$(),this.nOt=!0,this.RY=!0,this.hOt=!1,this.oOt=!1,this.aOt=!1,this.lOt=!1,this.Vx=C33.yn(C33.T1.DP,t.cN().QN().TY(),{IP:(t,s)=>{const e=s.Dx(),i=e.UD();t.wy(i.AY()),t.Fg(i.S4()),e.I_(t),t.Fg(0)},wP:t=>{const s=t.KEt(),[e,i]=t.qEt();return{Mx:s,bx:e,Gx:i}},RP:t=>this.IY(t)}),this.cOt=[],this.$Pt=[],this.US=!0,this.BPt=[],this.WPt=[],this.KPt(t.cN().JS());for(let t=0,s=this.yY.p$().length;t<s;++t)this.cOt.push(!0);this.sW(),this.yY.YPt(this)}_n(){this.yY.qPt(this);for(const t of this.WPt)t&&t._n();C33.qh(this.WPt),this.Vx._n(),this.Vx=null,C33.qh(this.cOt),C33.qh(this.$Pt),C33.qh(this.BPt),this.Ge=null,this.yY=null}KPt(t){t.q2()&&(this.WPt=this.yY.p$().map(t=>{const s=t.pE();return 0<s.GetCustomParametersByteSize()?C33.yn(C33.T1.WebGPUEffectCustomParamsBuffer,s):null}))}fvt(t){let s=0;for(const e of t)this.BPt.push(this.UPt(s,e)),++s;this.zPt(),this.sW()}UPt(t,s){this.cOt[t]=s[0];const e=s.slice(1);for(let t=0,s=e.length;t<s;++t){const i=e[t];if(Array.isArray(i)){const r=C33.yn(C33.Zo);r.Za(i),e[t]=r}}return e}hbt(){for(const t of this.yY.p$())this.BPt.push(t.iOt());this.zPt()}d_(){return this.i_}d$(){return this.yY}Xx(){return this._q(),this.Vx}cN(){return this.Ge.cN()}sW(){C33.qh(this.$Pt);let t=this.rOt,e=this.yY.p$(),i=this.$Pt,r=this.cOt,n=!0;for(let t=0,s=e.length;t<s;++t)if(r[t]){const h=e[t];i.push(h),h.pE().ny()||(n=!1)}this.US=n,t.OPt(!!i.length),this.nOt=!0}_q(){const t=this.Ge,s=this.rOt,e=s.Tq(),i=t.UF().bF(),r=0!==s.GetAngle()||0!==s.jD().GetAngle()||s.AC()<0||s.OC()<0,n=t.QEt(),h=t.iy();(this.nOt||e!==this.RY||i!==this.hOt||r!==this.oOt||n!==this.aOt||h!==this.lOt||this.Vx.wO())&&(this.Vx.RO(this.$Pt.map(t=>t.pE()),{bP:this.$Pt.map(t=>t.Yx()),GP:!e||h,PP:i,OP:n,xP:r}),this.nOt=!1,this.RY=e,this.hOt=i,this.oOt=r,this.aOt=n,this.lOt=h)}Aq(){return this.$Pt}Yrt(t){return this.BPt[t]}IY(t){return(t<this.WPt.length?this.WPt:this.BPt)[t]}eW(t,s){if(t<0||t>=this.BPt.length)return null;const e=this.BPt[t];return s<0||s>=e.length?null:e[s]}iW(t,s,e){if(t<0||t>=this.BPt.length)return!1;const i=this.BPt[t];if(s<0||s>=i.length)return!1;const r=i[s];if(r instanceof C33.Zo){if(r.wa(e))return!1;r.ga(e)}else{if(r===e)return!1;i[s]=e}return t<this.WPt.length&&this.WPt[t].SetParameterValue(s,e),!0}zPt(){const e=this.BPt,i=this.WPt;for(let t=0,s=i.length;t<s;++t){const r=i[t],n=e[t];for(let t=0,s=n.length;t<s;++t)r.SetParameterValue(t,n[t])}}ny(){return this.US}uOt(){return this.$Pt.some(t=>t.pE().ly())}Z5(t){return this.cOt[t]}tW(t,s){this.cOt[t]=!!s}p$(){return this.yY.p$()}D8(){return this.yY.p$().map(t=>({name:t.pf(),active:this.cOt[t.Yx()],params:C33._Y.sOt(this.BPt[t.Yx()])}))}N8(t){for(const s of t){const e=this.yY.qrt(s.name);e&&(this.cOt[e.Yx()]=s.active,this.BPt[e.Yx()]=C33._Y.eOt(s.params))}this.sW(),this.zPt()}}}{let C33=self.Bs,tempCandidates=[],tileCollRectCandidates=[],tempJumpthruRet=[],tempPolyA=C33.yn(C33.zc),tempPolyB=C33.yn(C33.zc),tempQuad=C33.yn(C33.dc),tempRect=C33.yn(C33.Rect),tempRect2=C33.yn(C33.Rect),tempPolyC=null,tempRect3=null,tempQuadB=null;C33.fOt=class extends C33.gn{constructor(t){super(),this.Af=t,this.dOt=0,this.pOt=0,this.COt=[],this.mOt=0,this.gOt=0,this.SOt=0,this.yOt=0,this._Ot=new self.GN(this)}_n(){this.Af=null}cN(){return this.Af}Zx(){return this._Ot}TOt(){this.gOt=this.mOt,this.mOt=0,this.yOt=this.SOt,this.SOt=0}AOt(){return this.gOt}EOt(){return this.yOt}IOt(t,s){const e=t.UD(),i=s.UD();e&&i&&e.F4()&&i.F4()&&this.COt.push([t,s])}w_t(s,e,i){for(const[r,n]of this.COt){let t=null;if(s===r)t=n;else{if(s!==n)continue;t=r}t.L_t(e)&&!i.includes(t)&&i.push(t)}}R_t(t,s){if(this.COt.length)for(const[e,i]of this.COt)if(t===e&&s===i||t===i&&s===e)return!0;return!1}wOt(){C33.qh(this.COt)}PN(t,s){if(!t||!s||t===s)return!1;const e=t.UD(),i=s.UD();if(!e.F4()||!i.F4())return!1;this.mOt++;const r=e.jD(),n=i.jD(),h=r.lK(n);return h?this.ROt(e,i):this.MOt(e,i)}ROt(t,s){if(!t._4().oc(s._4()))return!1;if(this.SOt++,!t.A4().Hc(s.A4()))return!1;if(t.pbt()&&s.pbt())return!1;if(t.pbt())return this.bOt(t,s);if(s.pbt())return this.bOt(s,t);if(!t.yPt()&&!s.yPt())return!0;const e=t._Pt(),i=s._Pt();return e.lu(i,s.Ny()-t.Ny(),s.ky()-t.ky())}MOt(e,i){const t=e.pbt(),s=i.pbt();if(t&&!s)return this.GOt(e,i);if(s&&!t)return this.GOt(i,e);if(s||t)return!1;{const r=e.jD(),n=i.jD(),h=(tempPolyA.I(e._Pt()),tempPolyB.I(i._Pt()),tempPolyA.su());for(let t=0,s=h.length;t<s;t+=2){const a=t+1,l=h[t],c=h[a],[u,f]=r.kk(l+e.Ny(),c+e.ky());h[t]=u,h[a]=f}const o=tempPolyB.su();for(let t=0,s=o.length;t<s;t+=2){const d=t+1,p=o[t],C=o[d],[m,g]=n.kk(p+i.Ny(),C+i.ky());o[t]=m,o[d]=g}return tempPolyA.nu(),tempPolyB.nu(),this.SOt++,tempPolyA.lu(tempPolyB,0,0)}}GOt(t,s){const e=t.jD(),i=s.jD(),r=(tempPolyC=tempPolyC||C33.yn(C33.zc),tempRect3=tempRect3||C33.yn(C33.Rect),tempQuadB=tempQuadB||C33.yn(C33.dc),s.Ny()),n=s.ky(),[h,o]=i.kk(r,n),[a,l]=e.Dk(h,o),c=a-r,u=l-n;if(tempRect3.I(s._4()),tempRect3.offset(c,u),!t._4().oc(tempRect3))return!1;if(tempQuadB.I(s.A4()),tempQuadB.offset(c,u),this.SOt++,!t.A4().Hc(tempQuadB))return!1;tempPolyC.I(s._Pt());const f=tempPolyC.su();for(let t=0,s=f.length;t<s;t+=2){const d=t+1;f[t]+=c,f[d]+=u}return tempPolyC.nu(),this.bOt(t,s,a,l,tempPolyC,tempRect3,tempQuadB)}bOt(t,i,s,e,r,n,h){const o=void 0!==n?n:i._4(),a=t.Ny(),l=t.ky(),c=t.fH().N5(),u=void 0!==s?s:i.Ny(),f=void 0!==e?e:i.ky(),d=i.yPt(),p=void 0!==h?h:i.A4(),C=tileCollRectCandidates;c.GetCollisionRectCandidates(o,C);for(let t=0,s=C.length;t<s;++t){const m=C[t],g=m.GetRect();if(this.mOt++,o.ac(g,a,l)&&(tempQuad.Fc(g),tempQuad.offset(a,l),tempQuad.Hc(p)))if(d){let t=void 0!==r?r:i._Pt(),s=u,e=f;void 0!==r&&(s=i.Ny(),e=i.ky());const S=m.GetPoly();if(S){if(this.SOt++,S.lu(t,s-(a+g.Nl()),e-(l+g.Fl())))return C33.qh(C),!0}else if(tempPolyA.ou(tempQuad,0,0),tempPolyA.lu(t,s,e))return C33.qh(C),!0}else{const y=m.GetPoly();if(!y)return C33.qh(C),!0;if(tempPolyA.ou(p,0,0),y.lu(tempPolyA,-(a+g.Nl()),-(l+g.Fl())))return C33.qh(C),!0}}return C33.qh(C),!1}vOt(t,o,a){const l=t.s$(),s=this.Af.OL();if(!s)throw new Error("cannot call outside event");const c=s.pdt(),e=new Map,u=t=>{let s=e.get(t);return void 0===s&&(s=t.fk(),e.set(t,s)),s};if(l.Jft()){a||(l.rdt(!1),C33.qh(l.ndt())),c&&C33.qh(l.hdt());for(const i of t.t$()){let r=i.UD(),n=r.jD();if(!(!u(n)||!r.I4())&&o.some(([t,s])=>{const[e,i]=n.Dk(t,s,r.S4());return r.W4(e,i)})){if(a)return!1;l.edt(i)}else c&&l.idt(i)}}else{let e,i=!1,h=(!c||s.h1t(this.Af.n3t())||this.Af.byt()&&!l.hdt().length&&l.ndt().length?e=l.ndt():(e=l.hdt(),i=!0),0);for(let s=0,t=e.length;s<t;++s){let t=e[s],r=t.UD(),n=r.jD();if(!(!u(n)||!r.I4())&&o.some(([t,s])=>{const[e,i]=n.Dk(t,s,r.S4());return r.W4(e,i)})){if(a)return!1;i?l.edt(t):e[h++]=t}else i?e[h++]=t:c&&l.idt(t)}a||(e.length=h)}return t.W1t(),e.clear(),!!a||l.Qft()}POt(t,s){if(t)for(const e of s.LMt())if(!t.lK(e))return!1;return!0}Myt(t,s,e,i){if(s.aq())for(const r of s.xmt())this.POt(t,r)?(r.PMt(),r.GMt().T6(e,i)):C33.an(i,r.t$());else this.POt(t,s)?(s.PMt(),s.GMt().T6(e,i)):C33.an(i,s.t$())}WN(t,s,e,i){for(const r of s)this.Myt(t,r,e,i)}OOt(t,s,e){const i=this.Af.QIt();i&&this.WN(t,i.w9(),s,e)}xOt(t,s,e){const i=this.Af.ZIt();i&&this.WN(t,i.w9(),s,e)}rPt(t,s){return t.gbt()&&(!s||s.UD().rPt(t.xSt().get("solidTags")))}LN(t){const s=t.UD();this.OOt(s.jD(),s._4(),tempCandidates);for(const e of tempCandidates)if(this.rPt(e,t)&&this.PN(t,e))return C33.qh(tempCandidates),e;return C33.qh(tempCandidates),null}LOt(t,s){this.OOt(null,t,tempCandidates);for(const e of tempCandidates)if(this.rPt(e,s)&&this.DOt(t,e))return C33.qh(tempCandidates),e;return C33.qh(tempCandidates),null}NOt(t,s){let e=null;s&&(e=tempJumpthruRet,C33.qh(e));const i=t.UD();this.xOt(i.jD(),i._4(),tempCandidates);for(const r of tempCandidates)if(r.ybt()&&this.PN(t,r)){if(!s)return C33.qh(tempCandidates),r;e.push(r)}return C33.qh(tempCandidates),e}FOt(s,e,i,r,n){r=r||50;const h=s.UD(),o=h.Ny(),a=h.ky();for(let t=0;t<r;++t)if(h.f4(o+e*t,a+i*t),h.u4(),!this.PN(s,n))return!0;return h.f4(o,a),h.u4(),!1}$Ot(s,e,i,r,n,h){r=r||50;let o=s.UD(),a=o.Ny(),l=o.ky(),c=null,u=null;for(let t=0;t<r;++t)if(o.f4(a+e*t,l+i*t),o.u4(),!this.PN(s,c))if(c=this.LN(s))u=c;else if(n&&(c=h?this.PN(s,h)?h:null:this.NOt(s))&&(u=c),!c)return u&&this.kOt(s,e,i,u,16,!0),!0;return o.f4(a,l),o.u4(),!1}BOt(e,i,r,t){t=t||50;let n=e.UD(),h=n.Ny(),o=n.ky(),a=null,l=null;for(let s=0;s<t;++s)for(let t=0;t<2;++t){const c=2*t-1;if(n.f4(h+i*s*c,o+r*s*c),n.u4(),!this.PN(e,a)){if(!(a=this.LN(e)))return l&&this.kOt(e,i*c,r*c,l,16,!0),!0;l=a}}return n.f4(h,o),n.u4(),!1}kOt(t,s,e,i,r,n){let h=2,o=!1,a=!1,l=t.UD(),c=l.Ny(),u=l.ky();for(;h<=r;){const f=1/h;h*=2,l.m4(s*f*(o?1:-1),e*f*(o?1:-1)),l.u4(),this.PN(t,i)||n&&this.LN(t)?(o=!0,a=!0):(o=!1,a=!1,c=l.Ny(),u=l.ky())}a&&(l.f4(c,u),l.u4())}WOt(e,t=100){let i=0,r=e.UD(),n=r.Ny(),h=r.ky(),o=0,a=this.LN(e);if(!a)return!0;for(;i<=t;){let t=0,s=0;switch(o){case 0:t=0,s=-1,i++;break;case 1:t=1,s=-1;break;case 2:t=1,s=0;break;case 3:t=1,s=1;break;case 4:t=0,s=1;break;case 5:t=-1,s=1;break;case 6:t=-1,s=0;break;case 7:t=-1,s=-1}if(o=(o+1)%8,r.f4(Math.floor(n+t*i),Math.floor(h+s*i)),r.u4(),!this.PN(e,a)&&!(a=this.LN(e)))return!0}return r.f4(n,h),r.u4(),!1}HOt(t,s,e,i){const r=t.UD(),n=r.Ny(),h=r.ky(),o=Math.max(10,C33.Pn(s,e,n,h)),a=C33.xn(s,e,n,h),l=i||this.LN(t);if(!l)return C33.Rn(a+Math.PI);let c=l,u=0,f=0,d=C33.Mn(5),p;for(p=1;p<36;++p){const I=a-p*d;if(r.f4(s+Math.cos(I)*o,e+Math.sin(I)*o),r.u4(),!this.PN(t,c)&&!(c=i?null:this.LN(t))){u=I;break}}for(36===p&&(u=C33.Rn(a+Math.PI)),c=l,p=1;p<36;++p){const w=a+p*d;if(r.f4(s+Math.cos(w)*o,e+Math.sin(w)*o),r.u4(),!this.PN(t,c)&&!(c=i?null:this.LN(t))){f=w;break}}if(36===p&&(f=C33.Rn(a+Math.PI)),r.f4(n,h),r.u4(),f===u)return f;let C=C33.Ln(f,u)/2,m;m=C33.Nn(f,u)?C33.Rn(u+C+Math.PI):C33.Rn(f+C);const g=Math.cos(a),S=Math.sin(a),y=Math.cos(m),_=Math.sin(m),T=g*y+S*_,A=g-2*T*y,E=S-2*T*_;return C33.xn(0,0,A,E)}VOt(t,s,e,i,r){if(!r)return!1;const n=r.UD();if(!n.F4())return!1;if(this.mOt++,tempRect.set(Math.min(t,e),Math.min(s,i),Math.max(t,e),Math.max(s,i)),!n._4().oc(tempRect))return!1;if(r.pbt())return this.UOt(t,s,e,i,r,n);if(this.SOt++,!n.A4().Wc(t,s,e,i))return!1;if(!n.yPt())return!0;const h=n._Pt();return h.Wc(n.Ny(),n.ky(),t,s,e,i)}UOt(e,i,r,n,t,s){const h=s.Ny(),o=s.ky(),a=t.N5(),l=tileCollRectCandidates;tempRect2.set(e,i,r,n),tempRect2.normalize(),a.GetCollisionRectCandidates(tempRect2,l);for(let t=0,s=l.length;t<s;++t){const c=l[t],u=c.GetRect();if(this.mOt++,tempRect.ac(u,h,o)&&(tempQuad.Fc(u),tempQuad.offset(h,o),tempQuad.Wc(e,i,r,n))){const f=c.GetPoly();if(!f)return C33.qh(l),!0;if(this.SOt++,f.Wc(h+u.Nl(),o+u.Fl(),e,i,r,n))return C33.qh(l),!0}}return C33.qh(l),!1}DOt(t,s){if(!s)return!1;const e=s.UD();if(!e.F4())return!1;if(this.mOt++,!e._4().oc(t))return!1;if(s.pbt())return this.jOt(t,s,e);if(this.SOt++,tempQuad.Fc(t),!e.A4().Hc(tempQuad))return!1;if(!e.yPt())return!0;const i=tempPolyA,r=(i.Fc(t,e.Ny(),e.ky()),e._Pt());return i.lu(r,0,0)}jOt(e,t,s){const i=s.Ny(),r=s.ky(),n=t.N5(),h=tileCollRectCandidates;n.GetCollisionRectCandidates(e,h);for(let t=0,s=h.length;t<s;++t){const o=h[t],a=o.GetRect();if(this.mOt++,e.ac(a,i,r)){const l=o.GetPoly();if(!l)return C33.qh(h),!0;if(this.SOt++,tempPolyA.Fc(e,0,0),l.lu(tempPolyA,-(i+a.Nl()),-(r+a.Fl())))return C33.qh(h),!0}}return C33.qh(h),!1}XOt(t,s){if(t){const e=t.UD();e.F4()&&(this.mOt++,e._4().oc(s.rect))&&(t.pbt()?this.YOt(t,e,s):(this.SOt++,e.yPt()?s.qOt(t,e.Ny(),e.ky(),e._Pt()):s.KOt(t,e.A4())))}}YOt(e,i,r){const n=i.Ny(),h=i.ky(),o=tileCollRectCandidates;e.N5().GetCollisionRectCandidates(r.rect,o);for(let t=0,s=o.length;t<s;t++){const a=o[t],l=a.GetRect();if(this.mOt++,r.rect.ac(l,n,h)){const c=a.GetPoly();this.SOt++,c?r.qOt(e,n+l.Nl(),h+l.Fl(),c):r.zOt(e,i.Ny(),i.ky(),l)}}C33.qh(o)}NN(t,s){if(t!==this.dOt||s!==this.pOt){this.dOt=t,this.pOt=s;const e=this.Af.oq();for(const i of e)if(i._F()){for(const r of i.ZF())r.UD().ePt();i.GMt().JOt(t,s),i.vMt();for(const n of i.ZF()){const h=n.UD();h.PPt(),h.OMt()}}}}$N(){return[this.dOt,this.pOt]}QOt(t,s){this.dOt=t,this.pOt=s}}}{const C33=self.Bs;C33.oRt=class extends C33.gn{constructor(t,s){super(),this.p6=t,this.C6=s,this.m6=C33.yn(C33.Cu)}_n(){this.m6._n(),this.m6=null}JOt(t,s){if(!this.m6.Su())throw new Error("grid not empty");this.p6=t,this.C6=s}g6(t,s,e){let i=this.m6.oe(t,s);return i||(e?(i=C33.yn(C33.ZOt,this,t,s),this.m6.Set(t,s,i),i):null)}S6(t){const s=Math.floor(t/this.p6);return isFinite(s)?s:0}y6(t){const s=Math.floor(t/this.C6);return isFinite(s)?s:0}_6(i,r,n){if(r)for(let e=r.Nl(),t=r.$l();e<=t;++e)for(let t=r.Fl(),s=r.kl();t<=s;++t)if(!n||!n.lc(e,t)){const h=this.g6(e,t,!1);h&&(h.Hd(i),h.Su())&&this.m6.yu(e,t)}if(n)for(let e=n.Nl(),t=n.$l();e<=t;++e)for(let t=n.Fl(),s=n.kl();t<=s;++t)r&&r.lc(e,t)||this.g6(e,t,!0).c6(i)}T6(t,s){let e=this.S6(t.Nl()),i=this.y6(t.Fl()),r=this.S6(t.$l()),n=this.y6(t.kl());if(isFinite(r)&&isFinite(n))for(;e<=r;++e)for(let t=i;t<=n;++t){const h=this.g6(e,t,!1);h&&h.f6(s)}}}}{const C33=self.Bs;C33.ZOt=class extends C33.gn{constructor(t,s,e){super(),this.i6=t,this.fl=s,this.dl=e,this.r6=C33.yn(C33.Eu)}_n(){this.r6._n(),this.r6=null,this.i6=null}Su(){return this.r6.Su()}c6(t){this.r6.Mu(t)}Hd(t){this.r6.yu(t)}f6(t){C33.an(t,this.r6.bu())}}}{const C33=self.Bs,PADDING=1e-6,NO_HIT=2;C33.txt=class{constructor(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.dx=0,this.dy=0,this.rect=new C33.Rect,this.sxt=NO_HIT,this.ixt=null,this.rxt=0,this.nxt=0,this.hxt=0,this.oxt=0,this.axt=0,this.Ot=0,this.lxt=1,this.cxt=0,this.uxt=1,this.fxt=0}dxt(){return this.sxt<1+PADDING}vd(){this.sxt=NO_HIT}Set(t,s,e,i){return this.x1=t,this.y1=s,this.x2=e,this.y2=i,this.dx=e-t,this.dy=i-s,this.rect.set(t,s,e,i),this.rect.normalize(),this.sxt=NO_HIT,this.ixt=null,this.rxt=0,this.nxt=0,this.hxt=0,this.oxt=0,this.axt=0,this.Ot=0,this.lxt=1,this.cxt=0,this.uxt=1,this.fxt=0,this}pxt(){if(!1!==this.dxt()){const t=this.dx*this.sxt,s=this.dy*this.sxt,e=C33.Gn(t,s),i=t/e,r=s/e,n=(this.Ot=e-PADDING,this.oxt=this.x1+i*this.Ot,this.axt=this.y1+r*this.Ot,this.rxt=Math.atan2(this.hxt,this.nxt)+Math.PI/2,this.lxt=Math.cos(this.rxt),this.cxt=Math.sin(this.rxt),i*this.lxt+r*this.cxt);if(this.uxt=i-2*this.lxt*n,this.fxt=r-2*this.cxt*n,0<n){const h=Math.PI;this.rxt=C33.Rn(this.rxt+h),this.lxt=-this.lxt,this.cxt=-this.cxt}}}Cxt(t,s,e,i,r){const n=C33.Eh(this.x1,this.y1,this.x2,this.y2,s,e,i,r);0<=n&&n<this.sxt&&(this.sxt=n,this.ixt=t.oB(),this.nxt=s-i,this.hxt=e-r)}zOt(t,s,e,i){const r=s+i.Nl(),n=s+i.$l(),h=e+i.Fl(),o=e+i.kl();this.Cxt(t,r,h,n,h),this.Cxt(t,n,h,n,o),this.Cxt(t,n,o,r,o),this.Cxt(t,r,o,r,h)}KOt(t,s){const e=s.ph(),i=s.Ch(),r=s.mh(),n=s.gh(),h=s.Sh(),o=s.yh(),a=s._h(),l=s.Th();this.Cxt(t,e,i,r,n),this.Cxt(t,r,n,h,o),this.Cxt(t,h,o,a,l),this.Cxt(t,a,l,e,i)}qOt(e,i,r,t){const n=t.su();for(let t=0,s=n.length;t<s;t+=2){const h=(t+2)%s,o=n[t]+i,a=n[t+1]+r,l=n[h]+i,c=n[1+h]+r;this.Cxt(e,o,a,l,c)}}}}{const C33=self.Bs,VALID_FULLSCREEN_MODES=new Set(["off","crop","scale-inner","scale-outer","letterbox-scale","letterbox-integer-scale"]),VALID_FULLSCREEN_SCALING_QUALITIES=new Set(["high","low"]),glMatrix=self.Es,mat42=glMatrix.Ms,vec32=glMatrix.Ps,tempProjection=mat42.create(),PERCENTTEXT_WIDTH=300,PERCENTTEXT_HEIGHT=200,PROGRESSBAR_WIDTH=120,PROGRESSBAR_HEIGHT=8,tempQuad=C33.yn(C33.dc),tempRect=C33.yn(C33.Rect),SPLASH_MIN_DISPLAY_TIME=3e3,SPLASH_AFTER_FADEOUT_WAIT_TIME=200,SPLASH_FADE_DURATION=300;C33.mxt=class extends C33.gn{constructor(t){super(),this.Af=t,this.gxt=[],this.Sxt=!1,this.yxt=null,this._xt=null,this.Txt=null,this.Axt="high-performance",this.Ext=!1,this.Ixt="auto",this.wxt=0,this.Rxt=0,this.Mxt="",this.bxt=0,this.Gxt=0,this.vxt=0,this.Pxt=0,this.Oxt=0,this.xxt=0,this.j1="normalized",this.Lxt=0,this.Dxt=1,this.Nxt=1e4,this.I2=!0,this.Fxt=0,this.hO=0,this.oO=0,this.$xt="letterbox-scale",this.kxt="letterbox-scale",this.Bxt=0,this.Wxt=0,this.Hxt=mat42.create(),this.Vxt="high",this.Uxt=this.Vxt,this.jxt=!1,this.Xxt=[],this.Yxt=new Set,this.qxt=self.C3_Shaders,this.Kxt=C33.yn(C33.T1.cP,{hP:()=>[this.UK(),this.jK()],oP:()=>this.zxt(),aP:t=>this.Jxt(t),getTime:()=>this.cN().zL(),lP:()=>this.cN().JD()}),this.Qxt=0,this.Zxt=0,this.tLt=NaN,this.sLt=null,this.eLt=new Map,this.iLt=NaN,this.rLt=new Map,this.nLt="",this.hLt=1,this.oLt=C33.yn(C33.Rect),this.aLt="",this.lLt=null,this.cLt=null,this.uLt=0,this.fLt=0,this.dLt=-1,this.pLt=0,this.CLt=t=>this.pLt=t.progress,this.mLt=null,this.gLt={SLt:null,yLt:null,_Lt:null},this.TLt=0,this.ALt=0,this.ELt=0,this.ILt="fade-in",this.wLt=null,this.RLt=new Promise(t=>this.wLt=t)}MLt(t){this.Axt=t}bLt(t){this.Sxt=!!t}GLt(t){this.j1=t}vLt(){return this.j1}PLt(t){this.Lxt=t}OLt(t,s){this.Dxt=t,this.Nxt=s}xLt(t){this.Ext=!!t}LLt(t){this.Ixt=t}async Wo(t){let s=t.canvas,e=(this.gxt.push({canvas:s,DLt:null}),this.Af.kB("runtime","window-resize",t=>this.NLt(t)),this.Af.kB("runtime","fullscreenchange",t=>this.FLt(t)),this.Af.kB("runtime","fullscreenerror",t=>this.$Lt(t)),s.addEventListener("webglcontextlost",t=>this.kLt(t)),s.addEventListener("webglcontextrestored",t=>this.BLt(t)),this.jxt=!!t.isFullscreen,this.Mxt=t.cssDisplayMode,navigator.gpu&&this.Sxt),i=!1;if(e)try{await this.WLt(!0)}catch(t){this.HLt("WebGPU",t),this._xt=null}if(!this.JS())try{await this.VLt(!0)}catch(t){this.HLt("WebGL",t),this.yxt=null}if(this.JS()||(i=!0),!this.JS()&&e)try{await this.WLt(!1)}catch(t){this.HLt("WebGPU",t),this._xt=null}if(!this.JS())try{await this.VLt(!1)}catch(t){this.HLt("WebGL",t),this.yxt=null}const r=this.JS();if(!r)throw new Error("failed to acquire a renderer - check WebGL or WebGPU is supported");r.GS(i),this._xt&&(this._xt.ULt=()=>this.jLt(),this._xt.XLt=()=>this.YLt()),"normalized"===this.j1?r.U2():(r.j2(),r.H2(this.Lxt)),this.cM(t.windowInnerWidth,t.windowInnerHeight,!0),await this.KPt()}HLt(t,s){s&&"string"==typeof s.message&&s.message.startsWith("renderer-unavailable")||console.error(`Error creating ${t} renderer: `,s)}async WLt(t){let s={N1:this.Dxt,F1:this.Nxt},e=!0;"no"===this.Ixt?e=!1:"auto"===this.Ixt&&(e=C33.pe.Ae);const i={powerPreference:this.Axt,depth:this.Af.zq(),failIfMajorPerformanceCaveat:t,qLt:this.Af.ZK(),KLt:this.Af.zLt(),Ab:this.Af.JLt(),QLt:e};this._xt=C33.yn(C33.T1.WebGPURenderer,s),await this._xt.CA(this.gxt[0].canvas,i)}async VLt(t){const s={alpha:!0,powerPreference:this.Axt,Tb:"xbox-uwp-webview2"!==this.Af.qN(),depth:this.Af.zq(),Ab:this.Af.JLt(),failIfMajorPerformanceCaveat:t,N1:this.Dxt,F1:this.Nxt};this.Ext&&(s.Eb=1),this.yxt=C33.yn(C33.T1.Rb,this.gxt[0].canvas,s),await this.yxt.G2()}async ZLt(){if(this.qxt){const t=[];for(const[s,e]of Object.entries(this.qxt)){e.src=e.wgsl;const i=C33.T1.WebGPUShaderProgram.LE();t.push(this._xt.GG(Object.assign({fA:i,name:s},e)))}await Promise.all(t)}}async tDt(){if(this.qxt){const s=[];for(const[e,i]of Object.entries(this.qxt)){let t;if(i.glslWebGL2&&2<=this.yxt.sT())i.src=i.glslWebGL2,t=C33.T1.cA.DE();else{if(!i.glsl)throw new Error(`shader '${e}' does not support WebGL 1`);i.src=i.glsl,t=C33.T1.cA.LE()}s.push(this.yxt.GG(Object.assign({fA:t,name:e},i)))}await Promise.all(s),this.yxt.vG(),this.yxt.eg()}this.yxt.Yv()&&(this.sLt=C33.yn(C33.T1.lb,this.yxt))}async KPt(){this._xt?await this.ZLt():this.yxt&&await this.tDt();const t=this.JS();t.MS(this.I2),t.Yv()&&(this.tLt=0);for(const s of this.Af.sDt()){for(const e of s.p$())e.KPt(t);s.KPt(t),s.sW()}this.Txt=new self.gU(this.Af,t)}_n(){this.Af=null,this.yxt=null,this.gxt.length=0}cL(){return this.Af.cL()}NLt(t){const s=this.Af;if(!s.eDt()){const e=t.devicePixelRatio,i=(this.cL()&&(self.devicePixelRatio=e),s.iDt(e),this.jxt=!!t.isFullscreen,this.Mxt=t.cssDisplayMode,this.cM(t.innerWidth,t.innerHeight),s.JD(),new C33.Event("window-resize")),r=(i.data=t,s.ed().Sd(i),new C33.Event("resize"));r.rDt=this.eF(),r.nDt=this.rF(),r.hDt=this.hF(),r.oDt=this.aF(),s.r7(r),s.UB()&&(s.Y3t()||self.C3Debugger.IsDebuggerPaused())&&s.DO()}}FLt(t){this.jxt=!!t.isFullscreen,this.cM(t.innerWidth,t.innerHeight,!0),this.Af.JD()}$Lt(t){this.jxt=!!t.isFullscreen,this.cM(t.innerWidth,t.innerHeight,!0),this.Af.JD()}cM(t,s,e=!1){if(t=Math.floor(t),s=Math.floor(s),t<=0||s<=0)throw new Error("invalid size");if(this.wxt!==t||this.Rxt!==s||e){this.wxt=t,this.Rxt=s;const i=this.aDt();"letterbox-scale"===i?this.lDt(t,s):"letterbox-integer-scale"===i?this.cDt(t,s):"off"===i?this.uDt(t,s):this.fDt(t,s),this.dDt(i);for(const{canvas:h}of this.gxt)h.width=this.vxt,h.height=this.Pxt;this.Af.wf("canvas","update-size",{marginLeft:this.Oxt,marginTop:this.xxt,styleWidth:this.bxt,styleHeight:this.Gxt,displayScale:this.gV()});const r=this.JS();r.cM(this.vxt,this.Pxt,!0);for(const o of this.Xxt)r.Wv(o);C33.qh(this.Xxt),this.pDt();const n=this.Af.wD();n.R7(),n.M7()}}pDt(){this.JS().Y2(this.Hxt,this.UK()/this.jK())}XK(){return this.Hxt}lDt(t,s){const e=this.Af.lF(),i=this.Af.fL(),r=this.Af.pL(),n=i/r,h=t/s;if(n<h){const o=s*n;this.bxt=Math.round(o),this.Gxt=s,this.Oxt=Math.floor((t-this.bxt)/2),this.xxt=0}else{const a=t/n;this.bxt=t,this.Gxt=Math.round(a),this.Oxt=0,this.xxt=Math.floor((s-this.Gxt)/2)}this.vxt=Math.round(this.bxt*e),this.Pxt=Math.round(this.Gxt*e),this.Af.CDt(i,r)}cDt(t,s){let e=this.Af.lF(),i=(1!==e&&(t+=1,s+=1),this.Af.fL()),r=this.Af.pL(),n=i/r,h=t/s,o;if(n<h){const a=s*n;o=a*e/i}else{const l=t/n;o=l*e/r}1<o?o=Math.floor(o):o<1&&(o=1/Math.ceil(1/o)),this.vxt=Math.round(i*o),this.Pxt=Math.round(r*o),this.bxt=this.vxt/e,this.Gxt=this.Pxt/e,this.Oxt=Math.max(Math.floor((t-this.bxt)/2),0),this.xxt=Math.max(Math.floor((s-this.Gxt)/2),0),this.Af.CDt(i,r)}fDt(t,s){const e=this.Af.lF(),i=(this.bxt=t,this.Gxt=s,this.vxt=Math.round(this.bxt*e),this.Pxt=Math.round(this.Gxt*e),this.Oxt=0,this.xxt=0,this.gV());this.Af.CDt(this.bxt/i,this.Gxt/i)}uDt(t,s){const e=this.Af.lF();this.bxt=this.Af.Bq(),this.Gxt=this.Af.Wq(),this.vxt=Math.round(this.bxt*e),this.Pxt=Math.round(this.Gxt*e),this.mDt()?(this.Oxt=Math.floor((t-this.bxt)/2),this.xxt=Math.floor((s-this.Gxt)/2)):(this.Oxt=0,this.xxt=0),this.Af.CDt(this.Af.Bq(),this.Af.Wq())}dDt(e){if("high"===this.Vxt)this.hO=this.vxt,this.oO=this.Pxt,this.Uxt="high";else{let t,s;if(s="off"===this.aDt()?(t=this.Af.Bq(),this.Af.Wq()):(t=this.Af.fL(),this.Af.pL()),this.vxt<t||this.Pxt<s)this.hO=this.vxt,this.oO=this.Pxt,this.Uxt="high";else if(this.hO=t,this.oO=s,this.Uxt="low","scale-inner"===e){const i=t/s,r=this.wxt/this.Rxt;r<i?this.hO=this.oO*r:i<r&&(this.oO=this.hO/r)}else if("scale-outer"===e){const n=t/s,h=this.wxt/this.Rxt;n<h?this.hO=this.oO*h:h<n&&(this.oO=this.hO/h)}}}cN(){return this.Af}gDt(){return this.gxt[0].canvas}TY(){return this.Kxt}mDt(){return this.jxt}SDt(){return this.Mxt}yDt(t){if(!VALID_FULLSCREEN_MODES.has(t))throw new Error("invalid fullscreen mode");this.$xt=t;const s=this.Af.wD();s.R7(),s.M7()}CV(){return this.$xt}_Dt(t){if(!VALID_FULLSCREEN_MODES.has(t))throw new Error("invalid fullscreen mode");this.kxt=t;const s=this.Af.wD();s.R7(),s.M7()}TDt(){return this.kxt}aDt(){return this.mDt()?this.TDt():this.CV()}ADt(t){if(!VALID_FULLSCREEN_SCALING_QUALITIES.has(t))throw new Error("invalid fullscreen scaling quality");this.Vxt=t,this.Af.wD().R7()}EDt(){return this.Vxt}t8(){return this.Uxt}static IDt(t){switch(t){case 0:return"off";case 1:return"crop";case 2:return"scale-inner";case 3:return"scale-outer";case 4:return"letterbox-scale";case 5:return"letterbox-integer-scale";default:throw new Error("invalid fullscreen mode")}}eV(){return this.wxt}iV(){return this.Rxt}UK(){return this.hO}jK(){return this.oO}MS(t){this.I2=!!t}wDt(t){this.Fxt=t}JX(){return this.Fxt}RDt(){return this.JS().kM()}kLt(t){console.log("[Construct] WebGL context lost"),t.preventDefault(),this.Xxt=[],this.Yxt.clear(),this.Kxt.Ry(),this.yxt.Ry(),this.Af.rJ()}jLt(){console.log("[Construct] WebGPU device lost"),this.Xxt=[],this.Yxt.clear(),this.Kxt.Ry(),this.Af.rJ()}async BLt(t){await this.yxt.My(),await this.KPt(),await this.Af.MDt(),console.log("[Construct] WebGL context restored")}async YLt(){await this.KPt(),await this.Af.MDt(),console.log("[Construct] WebGPU device restored")}bDt(){return this.yxt}GDt(){return this._xt}JS(){return this._xt||this.yxt}rMt(){return this.Txt}JN(){let t="";return t=this.Af.GDt()?"webgpu":"webgl"+this.Af.bDt().sT(),this.Af.JS().vS()&&(t+="-software"),t}tF(){return this.Af.GDt()?this.Af.GDt().GetAdapterInfoString():this.Af.bDt().eP()}jk(){return"low"===this.Uxt?1/this.Af.lF():this.gV()}gV(){const t=this.aDt();if("off"===t||"crop"===t)return 1;const s=this.Af.fL(),e=this.Af.pL(),i=s/e,r=this.vxt/this.Pxt;return"scale-inner"!==t&&i<r||"scale-inner"===t&&r<i?this.Gxt/e:this.bxt/s}I8(){return"low"===this.t8()?1:this.gV()}A8(){return"low"===this.t8()?1:this.Af.lF()}vDt(t,s){this.Bxt=t,this.Wxt=s}ej(s,e,i,t=!0){e=e||this.hO,i=i||this.oO;const r=e/2+this.Bxt,n=i/2+this.Wxt;if(t){let t=this.XK();e===this.hO&&i===this.oO||(s.Y2(tempProjection,e/i),t=tempProjection),s.OG(t)}const h=s.J2(r,n,s.P2(i),r,n,0,i);s.$G(h)}PDt(t,s=!0){const e=this.eF(),i=this.rF(),r=e/2,n=i/2,h=(s&&t.OG(this.XK()),t.J2(r,n,t.P2(i),r,n,0,i));t.$G(h)}hF(){return this.vxt}aF(){return this.Pxt}eF(){return this.bxt}rF(){return this.Gxt}Nk(){return this.Oxt}Fk(){return this.xxt}Bz(){return this.gxt.length}ODt(){return"undefined"!=typeof OffscreenCanvas&&this.gDt()instanceof OffscreenCanvas&&("Chromium"!==C33.pe._e||124<=C33.pe.ye)}async lJ(i,r=!1){if(i<1)throw new Error("invalid HTML layer count");if(this.gxt.length!==i){let t=this.Af.wD().AD(),s={count:i,layersDomState:t.mq().filter(t=>t.lk()).map(t=>t.yK()),immediate:r,marginLeft:this.Oxt,marginTop:this.xxt,styleWidth:this.bxt,styleHeight:this.Gxt},e;if(e=this.cL()?await this.Af.ZD("canvas","set-html-layer-count",s):self.c3_runtimeInterface._OnSetHTMLLayerCount(s),i<this.gxt.length)this.gxt.length=i;else for(const n of e.addedCanvases){n.width=this.vxt,n.height=this.Pxt;const h=this.ODt()?"bitmaprenderer":"2d",o=n.getContext(h);if(!o)throw new Error(`failed to acquire '${h}' canvas context`);this.gxt.push({canvas:n,DLt:o})}this.Af.JD()}}s7(t){if(!(t>=this.gxt.length)){const s=this.gDt(),e=this.gxt[t].DLt;this.ODt()?e.transferFromImageBitmap(s.transferToImageBitmap()):(e.globalCompositeOperation="copy",e.drawImage(s,0,0))}}s8(s){s.depth=this.Af.zq();let t=this.Xxt,e=t.findIndex(t=>t.rA(s)),i;return-1!==e?(i=t[e],t.splice(e,1)):i=this.JS().Nv(s),this.Yxt.add(i),i}EY(t){if(!this.Yxt.has(t))throw new Error("render target not in use");this.Yxt.delete(t),this.Xxt.push(t)}zxt(){const t={D_:this.Af.CL()};return"low"===this.t8()&&(t.width=this.UK(),t.height=this.jK()),this.s8(t)}Jxt(t){this.EY(t)}*xDt(){for(const t of this.Af.wD().E7())for(const s of t.b$()){const e=this.eLt.get(s);e&&(yield e)}}zK(t){if(!this.JS().Yv())return null;let s=this.eLt.get(t);return s||(s={c4:t,name:t.pf(),LDt:C33.yn(C33.T1.lb,this.yxt),DDt:0,NDt:0,FDt:0},this.eLt.set(t,s)),s.LDt}$Dt(){const t=this.JS();if(t.Yv()&&0===this.Zxt){this.Zxt=t.wS(),this.iLt=NaN;for(const s of this.xDt())s.DDt=NaN}}kDt(){this.yxt&&this.yxt.Yv()&&this.BDt(),this._xt&&this._xt.Yv()&&this.WDt()}BDt(){if(isNaN(this.iLt)&&(this.iLt=this.sLt.gb(this.Qxt,this.Zxt),!isNaN(this.iLt))){if(this.Af.UB())for(const t of this.xDt())if(t.DDt=t.LDt.gb(this.Qxt,this.Zxt),isNaN(t.DDt))return;if(this.sLt.Sb(this.Zxt),this.tLt=Math.min(this.iLt,1),this.Af.UB()){const e=new Map;for(const r of this.xDt())r.LDt.Sb(this.Zxt),r.NDt=Math.min(r.DDt,1),e.set(r.c4,r.NDt);for(const n of this.xDt()){const h=n.c4,o=e.get(h)||0,a=o-h.J$().reduce((t,s)=>t+(e.get(s)||0),0);n.FDt=C33.wn(a,0,1)}const s=this.Af.AD(),i=this.tLt-s.mq().reduce((t,s)=>t+(e.get(s)||0),0);self.C3Debugger.UpdateGPUProfile(C33.wn(i,0,1),this.tLt,[...this.xDt()])}this.Qxt=this.Zxt,this.Zxt=0}}HDt(){return this.sLt}WDt(){if(0!==this.Zxt){for(let t=this.Qxt;t<this.Zxt;++t){const e=this.rLt.get(t);if(e&&!e.JM())return}let t=this.Af.AD(),h=C33.Qo(t.Lz()+1,0),s=0;for(let t=this.Qxt;t<this.Zxt;++t){const o=this.rLt.get(t);if(o){let e=o.QM(),i=BigInt(0),r=BigInt(0),n=BigInt(0);for(let t=0,s=Math.min(h.length,e.length/2);t<s;++t){const c=e[2*t],u=e[2*t+1],f=(c!==n&&(i===n||c<i)&&(i=c),u>r&&(r=u),u-c),d=Number(f)/1e9;h[t]+=d}const a=r-i,l=Number(a)/1e9;s+=l}}if(this.tLt=C33.wn(s,0,1),this.Af.UB()){const i=t.b$(),r=new Map;for(let t=0,s=Math.min(i.length,h.length-1);t<s;++t){const m=h[t+1];r.set(i[t],m)}const n=[],p=new Map;for(const[g,S]of r){const y=[...g.Z$()].reduce((t,s)=>t+(r.get(s)||0),0);p.set(g,y),n.push({name:g.pf(),FDt:C33.wn(S,0,1),NDt:C33.wn(y,0,1)})}const C=this.tLt-t.mq().reduce((t,s)=>t+(p.get(s)||0),0);self.C3Debugger.UpdateGPUProfile(C33.wn(C,0,1),this.tLt,n)}for(let t=this.Qxt;t<this.Zxt;++t)this.rLt.delete(t);this.Qxt=this.Zxt,this.Zxt=0}}VDt(t){this.rLt.set(this._xt.wS(),t)}oD(){return this.tLt}UDt(t,s,e,i,r,n){return this.nLt=t,this.hLt=s,this.oLt.Ml(e,i,r,n),this.lLt||(this.lLt=new Promise(t=>{this.cLt=t})),this.lLt}jDt(){if(this.nLt){let t=this.gDt(),s=this.oLt,e=C33.wn(Math.floor(s.Nl()),0,t.width),i=C33.wn(Math.floor(s.Fl()),0,t.height),r=s.width(),n=(r=0===r?t.width-e:C33.wn(Math.floor(r),0,t.width-e),s.height());if(n=0===n?t.height-i:C33.wn(Math.floor(n),0,t.height-i),(0!==e||0!==i||r!==t.width||n!==t.height)&&0<r&&0<n){const h=C33.Wo(r,n),o=h.getContext("2d");o.drawImage(t,e,i,r,n,0,0,r,n),t=h}C33.Ho(t,this.nLt,this.hLt).then(t=>{this.aLt&&URL.revokeObjectURL(this.aLt),this.aLt=URL.createObjectURL(t),this.lLt=null,this.cLt(this.aLt)}),this.nLt="",this.hLt=1}}XDt(){return this.aLt}YDt(t){t?this.uLt++:this.uLt--}qDt(){return 0<this.uLt}KDt(t){const s=this.JS();if(2===t)this.mLt=C33.yn(C33.T1.FS,this.JS()),this.mLt.kR("Arial"),this.mLt.BR(16),this.mLt.sM("center"),this.mLt.iM("center"),this.mLt.cM(PERCENTTEXT_WIDTH,PERCENTTEXT_HEIGHT);else if(0===t){const e=this.Af.zDt();e&&e.qU(s).catch(t=>console.warn("[C3 runtime] Failed to create texture for loading logo: ",t))}else 4===t&&(this.JDt("splash-images/splash-logo.svg").then(t=>{"done"===this.ILt?s.VT(t):this.gLt.SLt=t}).catch(t=>console.warn("Failed to load splash image: ",t)),this.QDt("splash-images/splash-poweredby-512.png").then(t=>{"done"===this.ILt?s.VT(t):this.gLt.yLt=t}).catch(t=>console.warn("Failed to load splash image: ",t)),this.QDt("splash-images/splash-website-512.png").then(t=>{"done"===this.ILt?s.VT(t):this.gLt._Lt=t}).catch(t=>console.warn("Failed to load splash image: ",t)))}async JDt(t){t=new URL(t,this.Af.ZDt()).toString();const s=await C33.Lo(t),e=await this.Af.tNt(s,2048,2048);return this.JS().Dv(e,{B_:"high"})}async QDt(t){t=new URL(t,this.Af.ZDt()).toString();const s=await C33.Lo(t);return this.JS().Dv(s,{B_:"high"})}sNt(){this.Af.wf("runtime","hide-cordova-splash")}eNt(){this.fLt=Date.now(),this.Af.ed().addEventListener("loadingprogress",this.CLt),this.dLt=requestAnimationFrame(()=>this.iNt());const t=this.Af.rNt();3!==t&&this.sNt()}async nNt(){const t=this.JS(),s=(this.pLt=1,this.Af.rNt());4===s&&await this.RLt,this.wLt=null,this.RLt=null,-1!==this.dLt&&(cancelAnimationFrame(this.dLt),this.dLt=-1),this.Af.ed().removeEventListener("loadingprogress",this.CLt),this.CLt=null,this.mLt&&(this.mLt._n(),this.mLt=null),this.Af.hNt(),t.wv(),this.gLt.SLt&&(t.VT(this.gLt.SLt),this.gLt.SLt=null),this.gLt.yLt&&(t.VT(this.gLt.yLt),this.gLt.yLt=null),this.gLt._Lt&&(t.VT(this.gLt._Lt),this.gLt._Lt=null),t.Iv(0,0,0,0),t.ES(),this.ILt="done",this.Qxt=t.wS(),3===s&&this.sNt()}iNt(){if(-1!==this.dLt){const t=this.JS(),s=(t.wv(),this.dLt=-1,this.Af.Jx().AX()),e=this.Af.rNt();if(3!==e&&(this.PDt(t),t.Iv(0,0,0,0),t.XG(),t.eg(),t.qG(null)),0===e)this.oNt(s);else if(1===e)this.aNt(s,PROGRESSBAR_WIDTH,0);else if(2===e)this.lNt(s);else if(3===e)C33.Uh();else{if(4!==e)throw new Error("invalid loader style");this.cNt(s)}t.ES(),this.dLt=requestAnimationFrame(()=>this.iNt())}}lNt(t){t?this.mLt.tM(1,0,0):this.mLt.tM(.6,.6,.6),this.mLt.Rf(Math.round(100*this.pLt)+"%");const s=this.bxt/2,e=this.Gxt/2,i=PERCENTTEXT_WIDTH/2,r=PERCENTTEXT_HEIGHT/2,n=(tempQuad.Ic(s-i,e-r,s+i,e+r),this.JS());n.qG(this.mLt.KT()),n.qg(tempQuad,this.mLt.WM())}aNt(t,s,e){const i=this.JS(),r=PROGRESSBAR_HEIGHT,n=(i.ag(),t?i.UG(1,0,0,1):i.UG(.118,.565,1,1),this.bxt/2),h=this.Gxt/2,o=s/2,a=r/2;tempRect.Ml(n-o,h-a+e,Math.floor(s*this.pLt),r),i.Rect(tempRect),tempRect.Ml(n-o,h-a+e,s,r),tempRect.offset(-.5,-.5),tempRect.Kl(.5,.5),i.UG(0,0,0,1),i.Zg(tempRect),tempRect.Kl(1,1),i.UG(1,1,1,1),i.Zg(tempRect)}oNt(t){const s=this.JS(),e=this.Af.zDt();if(e){const i=e.KT();if(i){const r=i.AC(),n=i.OC(),h=this.bxt/2,o=this.Gxt/2,a=r/2,l=n/2;tempQuad.Ic(h-a,o-l,h+a,o+l),s.qG(i),s.dc(tempQuad),this.aNt(t,r,16+l)}else this.aNt(t,PROGRESSBAR_WIDTH,0)}else this.aNt(t,PROGRESSBAR_WIDTH,0)}cNt(t){let s=this.JS(),e=this.gLt.SLt,i=this.gLt.yLt,r=this.gLt._Lt,n=Date.now(),h=(0===this.TLt&&(this.fLt=n),this.Af.uNt()||this.Af.fNt()&&!this.Af.dNt()),o=h?0:SPLASH_AFTER_FADEOUT_WAIT_TIME,a=h?0:SPLASH_MIN_DISPLAY_TIME,l=1,c=("fade-in"===this.ILt?l=Math.min((n-this.fLt)/SPLASH_FADE_DURATION,1):"fade-out"===this.ILt&&(l=Math.max(1-(n-this.ELt)/SPLASH_FADE_DURATION,0)),s.ag(),s.UG(.231*l,.251*l,.271*l,l),tempRect.set(0,0,this.bxt,this.Gxt),s.Rect(tempRect),Math.ceil(this.bxt)),u=Math.ceil(this.Gxt),f,d;256<this.Gxt?(s.UG(.302*l,.334*l,.365*l,l),f=c,d=Math.max(.005*u,2),tempRect.Ml(0,.8*u-d/2,f,d),s.Rect(tempRect),t?s.UG(l,0,0,l):s.UG(.161*l,.953*l,.816*l,l),f=c*this.pLt,tempRect.Ml(.5*c-f/2,.8*u-d/2,f,d),s.Rect(tempRect),s.UG(l,l,l,l),s.eg(),i&&(f=1.5*C33.wn(.22*u,105,.6*c),d=f/8,tempRect.Ml(.5*c-f/2,.2*u-d/2,f,d),s.qG(i),s.Rect(tempRect)),e&&(f=Math.min(.395*u,.95*c),d=f,tempRect.Ml(.5*c-f/2,.485*u-d/2,f,d),s.qG(e),s.Rect(tempRect)),r&&(f=1.5*C33.wn(.22*u,105,.6*c),d=f/8,tempRect.Ml(.5*c-f/2,.868*u-d/2,f,d),s.qG(r),s.Rect(tempRect))):(s.UG(.302*l,.334*l,.365*l,l),f=c,d=Math.max(.005*u,2),tempRect.Ml(0,.85*u-d/2,f,d),s.Rect(tempRect),t?s.UG(l,0,0,l):s.UG(.161*l,.953*l,.816*l,l),f=c*this.pLt,tempRect.Ml(.5*c-f/2,.85*u-d/2,f,d),s.Rect(tempRect),s.UG(l,l,l,l),s.eg(),e&&(f=.55*u,d=f,tempRect.Ml(.5*c-f/2,.45*u-d/2,f,d),s.qG(e),s.Rect(tempRect))),this.TLt++,"fade-in"===this.ILt&&n-this.fLt>=SPLASH_FADE_DURATION&&2<=this.TLt&&(this.ILt="wait",this.ALt=n),"wait"===this.ILt&&n-this.ALt>=a&&1<=this.pLt&&(this.ILt="fade-out",this.ELt=n),("fade-out"===this.ILt&&n-this.ELt>=SPLASH_FADE_DURATION+o||h&&1<=this.pLt&&n-this.fLt<500)&&this.wLt()}}}{let C33=self.Bs,C3Debugger=self.C3Debugger,assert=self.assert,ISDKBehaviorInstanceBase=self.bV,DEFAULT_RUNTIME_OPTS={messagePort:null,runtimeBaseUrl:"",headless:!1,hasDom:!0,isInWorker:!1,useAudio:!0,exportType:""},ife=!0;C33.pNt=class extends C33.gn{constructor(t){t=Object.assign({},DEFAULT_RUNTIME_OPTS,t),super(),this.CNt=t.messagePort,this.mNt=t.runtimeBaseUrl,this.gNt=t.previewUrl,this.SNt=!!t.headless,this.yNt=!!t.hasDom,this._Nt=!!t.isInWorker,ife=t.ife,this.TNt=!!t.useAudio,this.ANt=t.exportType,this.ENt=t.isNWjs,this.Ij=!!t.isiOSCordova,this.INt=!!t.isiOSWebView,this.wNt=!!t.isWindowsWebView2,this.RNt=!!t.isAnyWebView2Wrapper,this.MNt=!!t.isFBInstantAvailable,this.bNt=!("preview"!==this.ANt||!t.isDebug),this.GNt=this.bNt,this.vNt=this.bNt,this.PNt=0,this.ONt=[],this.xNt=[],this.LNt=!1,this.DNt="",this.NNt="",this.FNt="",this.$Nt="",this.kNt=0,this.BNt=0,this.WNt=0,this.CO=self.devicePixelRatio,this.HNt=0,this.VNt=0,this.UNt=0,this.jNt=0,this.XNt=0,this.YNt=!1,this.t1=!0,this.qNt=!1,this.KNt=!1,this.zNt=!1,this.JNt=null,this.$X=C33.yn(C33._j,this,t),this.H8=C33.yn(C33.o7,this),this.mdt=C33.yn(C33.d0t,this),this.QNt=C33.yn(C33.CF,this,t.wrapperComponentIds),this.ZNt=C33.yn(C33.fOt,this),this.BZ=C33.yn(C33.b7,this),this.tFt=C33.yn(C33.sct,this),this.sFt=C33.yn(C33.ict,this),this.Sct=C33.yn(C33.fct,this),this.Km=C33.yn(C33.Fm,{Bm:t=>this.eFt(t),Hm:t=>this.iFt(t)}),this.rFt=new Map,this.nFt=[],this.hFt=new Map,this.oFt=new Map,this.aFt=0,this.lFt=[],this.cFt=new Set,this.uFt=[],this.fFt=[],this.dFt=new Map,this.pFt=!1,this.CFt=!1,this.mFt=0,this.gFt=0,this.SFt=new Map,this.yFt=new Set,this._Ft=new Set,this.TFt=[],this.AFt=[],this.EFt=null,this.IFt=!1,this.wFt="vsync",this.Y_="trilinear",this.RFt=!1,this.MFt=!0,this.bFt=!1,this.GFt=!1,this.vFt=null,this.PFt={OFt:t=>{this.dLt=-1,this.xFt=-1,this.Z9(t)},LFt:t=>{this.xFt=-1,this.Z9(t,!1,"skip-render")},DFt:()=>{this.dLt=-1,this.DO()}},this.dLt=-1,this.xFt=-1,this.NFt=0,this.FFt=0,this.$Ft=!1,this.kFt=!1,this.BFt=!1,this.WFt=!0,this.HFt=!0,this.VFt=!1,this.UFt=0,this.jFt=new C33.O0(1),this.XFt=()=>Math.random(),this.YFt=0,this.qFt=0,this.KFt=0,this.zFt=0,this.JFt=0,this.sbt=1,this.QFt=1/30,this.ZFt=0,this.t$t=C33.yn(C33.Ud),this.s$t=C33.yn(C33.Ud),this.e$t=C33.yn(C33.Ud),this.i$t=new Map,this.r$t=-1,this.n$t=0,this.h$t=0,this.o$t=-1,this.a$t=0,this.l$t=0,this.c$t=0,this.u$t=!1,this.f$t="",this.d$t=!1,this.p$t="",this.JB=null,this.C$t="",this.m$t=null,this.g$t=null,this.nRt=C33.yn(C33.Event.ed),this.S$t=new Map,this.y$t=new Map,this._$t=0,this.T$t=!1,this.A$t=!1,this.E$t=!1,this.I$t=[],this.w$t={pretick:C33.yn(C33.Event,"pretick",!1),tick:C33.yn(C33.Event,"tick",!1),tick2:C33.yn(C33.Event,"tick2",!1),instancecreate:C33.yn(C33.Event,"instancecreate",!1),instancedestroy:C33.yn(C33.Event,"instancedestroy",!1),beforelayoutchange:C33.yn(C33.Event,"beforelayoutchange",!1),layoutchange:C33.yn(C33.Event,"layoutchange",!1)},this.w$t.instancecreate.q5=null,this.w$t.instancedestroy.q5=null,this.Tz=C33.yn(C33.Event.ed),this.R$t=null;const s=(t,s)=>C33.ZMt.NPt(this,t,s);this.M$t=C33.yn(C33.Zd,s),this.b$t=C33.yn(C33.Zd,s),this.G$t=C33.yn(C33.Zd,s),this.v$t=C33.yn(C33.P$t,this,t.jobScheduler),t.canvas&&(this.EFt=C33.yn(C33.mxt,this)),this.CNt.onmessage=t=>this._OnMessageFromDOM(t.data),this.kB("runtime","visibilitychange",t=>this.O$t(t)),this.kB("runtime","wrapper-extension-message",t=>this.x$t(t)),this.kB("runtime","get-remote-preview-status-info",()=>this.L$t()),this.kB("runtime","js-invoke-function",t=>this.W0t(t)),this.kB("runtime","go-to-last-error-script",self.goToLastErrorScript),this.kB("runtime","offline-audio-render-completed",t=>this.D$t(t)),this.nRt.addEventListener("window-blur",t=>this.N$t(t)),this.nRt.addEventListener("window-focus",()=>this.F$t()),this.BZ.a9(),this.sFt.a9(),this.$$t=null,this.k$t=new WeakMap,this.B$t={keyboard:null,xD:null,LD:null,DD:null},this.W$t=new WeakMap,this.H$t=[]}static CA(t){return C33.yn(C33.pNt,t)}_n(){C33.qh(this.nFt),this.hFt.clear(),this.oFt.clear(),this.H8._n(),this.H8=null,this.mdt._n(),this.mdt=null,this.QNt._n(),this.QNt=null,this.$X._n(),this.$X=null,this.ZNt._n(),this.ZNt=null,this.BZ._n(),this.BZ=null,this.tFt._n(),this.tFt=null,this.sFt._n(),this.sFt=null,this.Sct._n(),this.Sct=null,this.Km._n(),this.Km=null,this.EFt&&(this.EFt._n(),this.EFt=null),this.nRt._n(),this.nRt=null,this.V$t=null}["_OnMessageFromDOM"](t){const s=t.type;if("event"===s)this.U$t(t);else{if("result"!==s)throw new Error(`unknown message '${s}'`);this.j$t(t)}}U$t(t){if(this.E$t){const s=t.component,e=t.handler,i=t.data,r=t.dispatchOpts,n=!(!r||!r.dispatchRuntimeEvent),h=!(!r||!r.dispatchUserScriptEvent),o=t.responseId;if("runtime"===s){if(n){const l=new C33.Event(e);l.data=i,this.nRt.Sd(l)}if(h){const c=new C33.Event(e,!0);for(const[u,f]of Object.entries(i))c[u]=f;this.r7(c)}}const a=this.S$t.get(s);if(a){const d=a.get(e);if(d){let t=null;try{t=d(i)}catch(t){return console.error(`Exception in '${s}' handler '${e}':`,t),void(null!==o&&this.X$t(o,!1,""+t))}null!==o&&(t&&t.then?t.then(t=>this.X$t(o,!0,t)).catch(t=>{console.error(`Rejection from '${s}' handler '${e}':`,t),this.X$t(o,!1,""+t)}):this.X$t(o,!0,t))}else n||h||console.warn(`[Runtime] No DOM handler '${e}' for component '${s}'`)}else n||h||console.warn(`[Runtime] No DOM event handlers for component '${s}'`)}else this.I$t.push(t)}X$t(t,s,e){this.CNt.postMessage({type:"result",responseId:t,isOk:s,result:e})}j$t(t){const s=t.responseId,e=t.isOk,i=t.result,r=this.y$t.get(s);e?r.resolve(i):r.reject(i),this.y$t.delete(s)}kB(t,s,e){let i=this.S$t.get(t);if(i||(i=new Map,this.S$t.set(t,i)),i.has(s))throw new Error(`[Runtime] Component '${t}' already has handler '${s}'`);i.set(s,e)}wf(t,s,e,i){this.CNt.postMessage({type:"event",component:t,handler:s,data:e,responseId:null},i)}ZD(t,s,e,i){const r=this._$t++,n=new Promise((t,s)=>{this.y$t.set(r,{resolve:t,reject:s})});return this.CNt.postMessage({type:"event",component:t,handler:s,data:e,responseId:r},i),n}BV(t,s,e,i=-1){this.wf("runtime","send-wrapper-extension-message",{componentId:t,messageId:s,params:e,asyncId:i})}WV(t,s,e){const i=this._$t++,r=new Promise((t,s)=>{this.y$t.set(i,{resolve:t,reject:s})});return this.BV(t,s,e,i),r}x$t(t){if(-1!==t.asyncId){const s=t.asyncId,e=this.y$t.get(s);e.resolve(t.params),this.y$t.delete(s)}else this.U$t({component:"wrapper-extension:"+t.componentId,handler:t.messageId,data:t.params,responseId:null})}s4(t,s,e){this.kB("wrapper-extension:"+t,s,e)}ZB(t){return this.QNt.ZB(t)}Y$t(t){if(!this.UB())throw new Error("not in debug mode");this.wf("runtime","post-to-debugger",t)}async rbt(t){C33.vyt(this),this.UB()?await C3Debugger.rbt(this):self.C3Debugger&&self.C3Debugger.InitPreview(this);const s=await this.$X.xo("data.json");if(await this.q$t(s),await this.K$t(t),this.uNt()||console.info("%cMade with Construct, the game and animation creation tool. Visit: https://www.construct.net","font-weight: bold"),this.bDt()){const e=this.bDt();console.info(`[C3 runtime] Hosted in ${this.cL()?"worker":"DOM"}, rendering with WebGL ${e.sT()} [${e.eP()}]`)}else this.GDt()&&console.info(`[C3 runtime] Hosted in ${this.cL()?"worker":"DOM"}, rendering with WebGPU [${this.GDt().GetAdapterInfoString()}]`);this.JS().vS()&&console.warn("[C3 runtime] The renderer indicates a major performance caveat. Software rendering may be in use. This can result in significantly degraded performance."),this.E$t=!0;for(const i of this.I$t)this.U$t(i);C33.qh(this.I$t),this.EFt&&this.EFt.eNt();for(const r of t.runOnStartupFunctions)this.ONt.push(this.z$t(r));if(await Promise.all([this.$X._X(),...this.ONt]),C33.qh(this.ONt),!this.$X.AX())return this.EFt&&await this.EFt.nNt(),await this.nRt.md(new C33.Event("beforeruntimestart")),await this.wv(),this.CNt.postMessage({type:"runtime-ready"}),this;this.EFt&&this.EFt.sNt()}async z$t(t){try{await t(this.$$t)}catch(t){console.error("[C3 runtime] Error in runOnStartup function: ",t)}}async q$t(t){const s=t.project,e=(this.DNt=s[0],this.NNt=s[16],this.FNt=s[31],this.$Nt=s[38],this.kNt=s[36],s[39]||"loading-logo.png"),i=(this.RFt=!!s[9],this.BNt=this.UNt=s[10],this.WNt=this.jNt=s[11],this.ZNt.QOt(this.BNt,this.WNt),this.HNt=this.BNt/2,this.VNt=this.WNt/2,this.wFt=s[37],this.IFt=!!s[40],this.Y_=s[14],this.qNt=s[15],this.KNt=s[42],this.zNt=s[17],this.YNt=!!s[18],this.XNt=s[19],this.gFt=s[21],this.bFt=s[22],this.$X);if(i.zj(s[45]),i.GX(s[7],s[25]),i.Qj(s[8]),i.Zj(s[32]),i.sX(s[28]),i.wX(s[29]),0===this.XNt){let t;(t="flat"===i.SN()?i.eX()+e:e)&&(this.JNt=i.dX({url:t}))}this.EFt&&(this.EFt.yDt(C33.mxt.IDt(s[12])),this.EFt.ADt(s[23]?"high":"low"),this.EFt.MS(0!==s[24]),this.EFt.MLt(s[34]),this.EFt.wDt(s[41]),this.EFt.bLt(s[13]),this.EFt.GLt(s[30]),this.EFt.OLt(s[46],s[47]),this.EFt.PLt(s[26]),this.EFt.xLt(s[48]),this.EFt.LLt(s[50]));const r=s[43],n=(r&&await this.J$t(r),this.Q$t(),this.QNt.XIt(),this.TFt=self.Z$t(),s[2]);for(const l of n[1])this.QNt.YIt(l);for(const c of n[0])this.QNt.jIt(c);this.TFt=self.Z$t(),this.tkt(),this.QNt.JIt();for(const u of s[3]){const f=C33.lct.CA(this,this.nFt.length,u);this.nFt.push(f),this.hFt.set(f.pf().toLowerCase(),f),this.oFt.set(f.gq(),f)}for(const d of s[4]){const p=this.nFt[d[0]];p.VRt(d)}for(const C of s[27]){const m=C.map(t=>this.nFt[t]);this.lFt.push(C33.yn(C33.HMt,this,m))}this.skt();for(const g of this.nFt)g.jRt();for(const S of s[5])this.H8.CA(S);const h=s[1];if(h){const y=this.H8.S7(h);y&&this.H8.m7(y)}for(const _ of s[35])this.tFt.CA(_);for(const T of s[33])this.BZ.CA(T);for(const A of s[44])this.sFt.CA(A);this.sFt.hct()||(this.sFt._n(),this.sFt=null);for(const E of s[49])this.Sct.CA(E);this.Sct.mct()||(this.Sct._n(),this.Sct=null);for(const I of s[6])this.mdt.CA(I);this.mdt.U0t(),this.ekt(),C33.qh(this.TFt),this.u$();let o="any",a=s[20];1===a?o="portrait":2===a&&(o="landscape"),this.wf("runtime","set-target-orientation",{targetOrientation:o})}async J$t(t){const s=t.format;"image-sequence"===s?this.vFt=new self.C3ExportToImageSequence(this,t):"image-sequence-gif"===s?this.vFt=new self.C3ExportToGIF(this,t):"webm"===s?this.vFt=new self.C3ExportToWebMVideo(this,t):"mp4"===s&&(this.vFt=new self.C3ExportToMP4Video(this,t)),this.wFt="unlimited-frame",this.EFt.yDt("off"),this.CO=1,self.devicePixelRatio=1,await this.ZD("runtime","set-exporting-to-video",{message:this.vFt.GetExportingMessageForPercent(0),duration:this.vFt.AW()})}rNt(){return this.XNt}eDt(){return null!==this.vFt}ikt(){return this.vFt.AW()}rkt(){return this.vFt.GetFramerate()}nkt(){return this.vFt.rbt({width:this.EFt.hF(),height:this.EFt.aF()})}hkt(){const t=this.NFt/this.rkt();return this.vFt.AddFrame(this.EFt.gDt(),t)}okt(){this.vFt&&this.vFt.Qet()}D$t(t){this.vFt.OnOfflineAudioRenderCompleted(t)}akt(){return this.vFt.ES()}fNt(){return this.MNt}h1(){return this.t1}iN(t){this.ONt.push(t)}uJ(t){this.LNt=!!t}lkt(t){this.LNt&&this.xNt.push(t)}gJ(){return this.xNt}NRt(){return this.aFt++}YRt(){return this.aFt}jPt(t){this.cFt.add(t)}XPt(t){this.cFt.delete(t)}sDt(){return this.cFt}async K$t(t){this.EFt&&(await this.EFt.Wo(t),this.EFt.KDt(this.XNt))}async wv(){this.$Ft=!0,this.YFt=Date.now();let s=null,t=new Promise(t=>s=t);if(this.YNt){for(const r of this.nFt)r.aq()||r.eMt()||!r._F()||r.jAt();(async()=>{await this.$X._X(),await t,this.t1=!1,this.ckt()})()}else this.t1=!1;this.$X.TX(),this.UB()&&C3Debugger.RuntimeInit(ife);for(const n of this.H8.bD())n.DJ();this.eDt()&&await this.nkt();const e=this.H8.g7(),i=(await e.Kz(null,this.JS()),await e.nJ(!0),this.n$t=performance.now(),s(),this.YNt||this.ckt(),await this.ZD("runtime","before-start-ticking"));i.isSuspended&&!this.eDt()?(this.UFt++,this.VFt=!0):this.Z9()}ckt(){this.LB(C33.GJ.bJ.MJ.ukt,null,null),this.wf("runtime","register-sw")}z1t(t){t=Math.floor(t);const s=this.TFt;if(t<0||t>=s.length)throw new Error("invalid object reference");return s[t]}tkt(){for(const t of self.fkt){const s=C33.first(Object.keys(t));this.AFt.push(s)}}p3t(t){t=Math.floor(t);const s=this.AFt;if(t<0||t>=s.length)throw new Error("invalid prop reference");return s[t]}dkt(){return this.yNt}pkt(){return this.SNt}cL(){return this._Nt}ZDt(){return this.mNt}Ckt(){return this.gNt}RL(){return this.mdt}kL(){return this.mdt.kL()}r3t(){return this.mdt.r3t()}OL(){return this.mdt.OL()}n3t(){return this.mdt.n3t()}byt(){return 0===this.r3t().Ddt()}o3t(){return this.mdt.o3t()}LPt(){return this.QNt}IX(){return this.QNt.IX()}$Y(t){if((t=Math.floor(t))<0||t>=this.nFt.length)throw new RangeError("invalid index");return this.nFt[t]}mkt(t){return this.hFt.get(t.toLowerCase())||null}zV(t){return this.oFt.get(t)||null}dnt(t){const s=C33.CF.DF(t);return s?s.kF():null}oq(){return this.nFt}*gkt(){for(const t of this.nFt)t.aq()||(yield*t.instances())}ed(){return this.nRt}AL(){return this.Tz}r7(t){t.runtime=this.mF();const s=this.UB()&&!this.mdt.l$();s&&C3Debugger.StartMeasuringScriptTime(),this.Tz.dispatchEvent(t),s&&C3Debugger.AddScriptTime()}IJ(t){return t.runtime=this.mF(),this.Tz.md(t)}fL(){return this.BNt}pL(){return this.WNt}Skt(t,s){if(this.BNt!==t||this.WNt!==s){this.BNt=t,this.WNt=s;const e=this.wD();e.R7(),e.M7()}}Bq(){return this.UNt}Wq(){return this.jNt}CDt(t,s){if(this.UNt!==t||this.jNt!==s){this.UNt=t,this.jNt=s;const e=this.wD();e.R7(),e.M7()}}iDt(t){this.eDt()||(this.CO=t)}lF(){return this.CO}FK(){return this.HNt}$K(){return this.VNt}QN(){return this.EFt}UK(){return this.EFt?this.EFt.UK():this.UNt}jK(){return this.EFt?this.EFt.jK():this.jNt}jk(){return this.EFt?this.EFt.jk():1}gV(){return this.EFt?this.EFt.gV():1}I8(){return this.EFt?this.EFt.I8():1}A8(){return this.EFt?this.EFt.A8():1}Nk(){return this.EFt?this.EFt.Nk():0}Fk(){return this.EFt?this.EFt.Fk():0}ykt(){return this.EFt?this.EFt.eF():0}_kt(){return this.EFt?this.EFt.rF():0}CV(){return this.EFt?this.EFt.CV():"off"}s8(t){return this.EFt?this.EFt.s8(t):null}EY(t){this.EFt&&this.EFt.EY(t)}ZK(){return this.qNt}zLt(){return this.KNt}JLt(){return this.zNt}oD(){return this.EFt?this.EFt.oD():NaN}JT(){return"nearest"!==this.CL()}lD(){return this.wFt}cD(t){this.wFt!==t&&(this.wFt=t,-1!==this.dLt||-1!==this.xFt)&&(this.Tkt(),this.Akt())}CL(){return this.Y_}BRt(){return this.YNt}zDt(){return this.JNt}hNt(){this.JNt&&(this.JNt.PR(),this.JNt._n(),this.JNt=null)}wD(){return this.H8}AD(){return this.H8.AD()}wtt(){return this.BZ}Ekt(){return this.tFt}Lbt(){return this.sFt}kct(){return this.Sct}Jx(){return this.$X}dX(t){return this.$X.dX(t)}n$(t,s,e,i,r,n){if(n&&this.sFt){if(t instanceof C33.lct&&t.aq()){const o=t.xmt(),a=Math.floor(this.TD()*o.length);return this.n$(o[a],s,e,i,r,n)}const h=this.sFt.oct(t,n);if(h){const l=this.YY(h,s,!1,e,i,!1,r,void 0,r);return this.sFt.cct(l,n),l}}return this.YY(t,s,!1,e,i,!1,r,void 0,r)}YY(t,s,e,i,r,n,h,o,a){let l=null,c=null;if(t instanceof C33.lct){if((c=t).aq()){const _=c.xmt(),T=Math.floor(this.TD()*_.length);c=_[T]}l=c.BY()}else l=t,c=this.$Y(l[1]);const u=c.UF()._F();if(this.t1&&u&&!c.eMt())return null;const f=s;u||(s=null);let d;d=e&&!n&&l&&!this.SFt.has(l[2])?l[2]:this.gFt++;const p=l?l[0]:null,C=C33.yn(C33.Instance,{runtime:this,Yk:c,c4:s,ibt:p,obt:l?l[3]:null,uid:d,tags:l?l[6]:null});this.SFt.set(d,C);let m=null,g=(u&&(m=C.UD(),void 0!==i&&void 0!==r&&(m.Fy(i),m.By(r)),c.vMt(!0)),s&&(a||s.KY(C,!0),s.RD().Jz(c)),this.mFt++,!0);if(o){const A=o.qk();if(A.nB()&&c.nB()){const E=c.Yz(),I=A.Yz();E===I&&(g=!1)}}if(c.nB()&&!e&&!n&&g){const w=new Set;for(const R of c.Yz().OJ())if(R!==c){const M=this.Ikt(R,m,w);if(M){const b=this.YY(M,f,!1,m?m.Ny():i,m?m.ky():r,!0,!1,void 0,a);C.xJ(b)}else{const $=this.YY(R,f,!1,m?m.Ny():i,m?m.ky():r,!0,!1,void 0,a);C.xJ($)}}for(const G of C.hB()){G.xJ(C);for(const v of C.hB())G!==v&&G.xJ(v)}}if(u&&!e&&h&&this.wkt(C,p,m,s,i,r,a),c.nB()&&!e&&!n&&h)for(const P of C.hB()){const O=P.UD();if(O){const k=P.UF(),x=P.qk().BY()[0];k._F()?this.wkt(P,x,O,s,O.Ny(),O.ky(),a):this.wkt(P,x,O,s,void 0,void 0,a)}}if(!n&&h){void 0===i&&(i=p[0]),void 0===r&&(r=p[1]);const L=m.U4(),B=i-m.Ny()+L.Ny(),W=r-m.ky()+L.ky();L.f4(B,W)}c.wMt();const N=l?C33.co(l[5]):null,F=l?l[4].map(t=>C33.co(t)):null,S=u&&p&&p[13];if(S&&C.dbt(),C.tMt(N,F),S){const D=p[13];C.N5().aEt(D[2],D[0],D[1])}this.fFt.push(C),this.pFt=!0,this.UB()&&C3Debugger.InstanceCreated(C);const y=this.w$t.instancecreate;return y.q5=C,this.nRt.dispatchEvent(y),C}PGt(t){const s=t[0],e=t[1],i=t[2],r=t[6];if(r)return r;const n=this.H8.y7(s),h=n.jD(e);return h.VY(i)}Ikt(t,s,e){const i=s?.xbt()??[];for(const r of i){const n=this.PGt(r),h=!!r[4],o=this.$Y(n[1]);if(!e.has(n)&&t===o&&h)return e.add(n),n}}wkt(a,t,s,l,c,u,f){const e=s.Qvt(),i=s.xbt();if(a.UD().Zvt(e),i){void 0===c&&(c=t[0]),void 0===u&&(u=t[1]);const d=new Set,p=t[0],C=t[1];for(const m of i){let t=m[0],s=m[1],e=m[2],i=m[3],r=!!m[4],n=m[5],h=m[6],o;if(h)o=h;else{const _=this.H8.y7(t),T=_.jD(s);o=T.VY(e)}const g=this.$Y(o[1]),S=a.Dbt(g),y=d.has(g);if(S&&!y&&r){const A=a.Nbt(g),E=(A.UD().rbt(o[0]),c+o[0][0]-p),I=u+o[0][1]-C;A.UD().f4(E,I),A.UD().Zvt(n),a.Q4(A,{i5:!!(i>>0&1),n5:!!(i>>1&1),o5:!!(i>>2&1),l5:!!(i>>3&1),u5:!!(i>>4&1),y5:!!(i>>5&1),d5:!!(i>>6&1),C5:!!(i>>7&1),g5:!!(i>>8&1)}),d.add(g)}else{const w=c+o[0][0]-p,R=u+o[0][1]-C,M=this.YY(o,l,!1,w,R,!1,!0,a,f);M.UD().Zvt(n),a.Q4(M,{i5:!!(i>>0&1),n5:!!(i>>1&1),o5:!!(i>>2&1),l5:!!(i>>3&1),u5:!!(i>>4&1),y5:!!(i>>5&1),d5:!!(i>>6&1),C5:!!(i>>7&1),g5:!!(i>>8&1)})}}}}tB(e){if(!this.yFt.has(e)){let t=e.qk(),s=this.dFt.get(t);if(s){if(s.has(e))return;s.add(e)}else(s=new Set).add(e),this.dFt.set(t,s);if(this.UB()&&C3Debugger.InstanceDestroyed(e),e.Cbt(),this.pFt=!0,e.nB())for(const i of e.hB())this.tB(i);for(const r of e.children())r._5()&&this.tB(r);if(!this.H8.c$()&&!this.u$t){const n=this.RL();n.o$(!0),e.Xbt(),n.o$(!1)}e.Ybt(this.H8.c$())}}u$(){this.pFt&&(this.CFt=!0,this.Rkt(),this.Mkt(),this.CFt=!1,this.pFt=!1,this.JD())}Rkt(){for(const t of this.fFt){const s=t.qk();s.KY(t);for(const e of s.T3t())e.KY(t),e.wMt()}C33.qh(this.fFt)}Mkt(){this.nRt.qf(!0);for(const[t,s]of this.dFt.entries())this.bkt(t,s),s.clear();this.dFt.clear(),this.nRt.qf(!1)}bkt(t,s){for(const e of s){const i=this.w$t.instancedestroy,r=(i.q5=e,this.nRt.dispatchEvent(i),this.SFt.delete(e.oB()),this.i$t.delete(e),e.UD());r&&(r.ePt(),r.ZY(),r.Cbt()),this.yFt.add(e),this.mFt--}C33.ho(t.t$(),s),t.wMt(),this._Ft.add(t);for(const n of t.T3t())C33.ho(n.t$(),s),n.wMt(),this._Ft.add(n);if(t.UF()._F()){const h=new Set([...s].map(t=>t.UD().jD()));for(const o of h)o.fK(s)}}MMt(){return this.fFt}*x_t(t){for(const s of this.MMt())t.aq()?s.qk().Gyt(t)&&(yield s):s.qk()===t&&(yield s)}ZRt(){return this.gFt++}sMt(t,s){this.SFt.set(t,s)}jV(t){this.HFt!==(t=!!t)&&(this.HFt=!!t,this.HFt)&&this.VFt&&(this.qV(!1),this.VFt=!1)}XV(){return this.HFt}rJ(){this.nRt.dispatchEvent(C33.yn(C33.Event,"renderercontextlost")),this.qV(!0);for(const s of this.nFt)!s.aq()&&s.iMt()&&s.eJ();const t=this.AD();t&&t.rJ(),C33.twt.zX(),C33.CX.zX()}async MDt(){await this.AD().Kz(null,this.JS()),this.nRt.dispatchEvent(C33.yn(C33.Event,"renderercontextrestored")),this.qV(!1),this.JD()}O$t(t){if(this.HFt){const s=t.hidden;this.qV(s),(this.VFt=s)||this.JD()}}N$t(t){this.uNt()&&this.bFt&&!C33.pe.Ee&&!t.data.parentHasFocus&&(this.qV(!0),this.GFt=!0)}F$t(){this.GFt&&(this.qV(!1),this.GFt=!1)}Akt(){const t=this.PFt;"vsync"===this.wFt?-1===this.dLt&&(this.dLt=self.requestAnimationFrame(t.OFt)):"unlimited-tick"===this.wFt?(-1===this.xFt&&(this.xFt=C33.Ao(t.LFt)),-1===this.dLt&&(this.dLt=self.requestAnimationFrame(t.DFt))):-1===this.xFt&&(this.xFt=C33.Ao(t.OFt))}Tkt(){-1!==this.dLt&&(self.cancelAnimationFrame(this.dLt),this.dLt=-1),-1!==this.xFt&&(C33.Eo(this.xFt),this.xFt=-1)}XL(){return 0<this.UFt}qV(t){if(!this.eDt()){const s=this.XL(),e=(this.UFt+=t?1:-1,this.UFt<0&&(this.UFt=0),this.XL());if(!s&&e)console.log("[Construct] Suspending"),this.Tkt(),this.nRt.dispatchEvent(C33.yn(C33.Event,"suspend")),this.LB(C33.GJ.bJ.MJ.Gkt,null,null);else if(s&&!e){console.log("[Construct] Resuming");const i=performance.now();this.qFt=i,this.n$t=i,this.r$t=0,this.h$t=0,this.o$t=0,this.a$t=0,this.c$t=0,this.l$t=0,this.nRt.dispatchEvent(C33.yn(C33.Event,"resume")),this.LB(C33.GJ.bJ.MJ.vkt,null,null),this.Y3t()||this.Z9(i)}}}OV(t){this.M$t.Mu(t)}NV(t){this.b$t.Mu(t)}LV(t){this.G$t.Mu(t)}xV(t){this.M$t.Hd(t)}FV(t){this.b$t.Hd(t)}DV(t){this.G$t.Hd(t)}Pkt(t,s){let e=s?performance.now():0,i;return t instanceof ISDKBehaviorInstanceBase?(i=t.jB(),s&&C3Debugger.AddIndividualBehaviorTickTime(t.behavior,performance.now()-e)):(i=t.Z9(),s&&C3Debugger.AddIndividualBehaviorTickTime(t.U5(),performance.now()-e)),i}Okt(){const t=this.UB();this.M$t.v0(!0);for(const s of this.M$t)this.Pkt(s,t);this.M$t.v0(!1)}xkt(t,s){let e=s?performance.now():0,i;return t instanceof ISDKBehaviorInstanceBase?(i=t.kV(),s&&C3Debugger.AddIndividualBehaviorTickTime(t.behavior,performance.now()-e)):(i=t.LIt(),s&&C3Debugger.AddIndividualBehaviorTickTime(t.U5(),performance.now()-e)),i}Lkt(){const t=this.UB();this.b$t.v0(!0);for(const s of this.b$t)this.xkt(s,t);this.b$t.v0(!1)}Dkt(t,s){let e=s?performance.now():0,i;return t instanceof ISDKBehaviorInstanceBase?(i=t.YB(),s&&C3Debugger.AddIndividualBehaviorTickTime(t.behavior,performance.now()-e)):(i=t.GEt(),s&&C3Debugger.AddIndividualBehaviorTickTime(t.U5(),performance.now()-e)),i}Nkt(){const t=this.UB();this.G$t.v0(!0);for(const s of this.G$t)this.Dkt(s,t);this.G$t.v0(!1)}*Fkt(){const t=this.UB();this.M$t.v0(!0);for(const s of this.M$t){const e=this.Pkt(s,t);C33.Jo(e)&&(yield*e)}this.M$t.v0(!1)}*$kt(){const t=this.UB();this.b$t.v0(!0);for(const s of this.b$t){const e=this.xkt(s,t);C33.Jo(e)&&(yield*e)}this.b$t.v0(!1)}*kkt(){const t=this.UB();this.G$t.v0(!0);for(const s of this.G$t){const e=this.Dkt(s,t);C33.Jo(e)&&(yield*e)}this.G$t.v0(!1)}async Z9(a,t,s){this.BFt=!0;const l="background-wake"===s,c="background-wake"!==s&&"skip-render"!==s,u=this.wD(),f=this.QN();if(this.$Ft&&(!this.XL()||t||l)){let t=performance.now(),s=(this.kFt=!0,this.Bkt(a||0),this.o$t++,this.Wkt(),this.Hkt()),e=(this.b_t()&&await s,this.nRt.gd(this.w$t.pretick)),i=(e instanceof Promise&&await e,this.r7(this.R$t.pretick),this.Vkt()),r=(this.b_t()&&await i,this.Ukt()&&await this.jkt(),u.vD()&&await this.Xkt(),this.Ykt()),n=(this.b_t()&&await r,u.AD()),h=n.Wz(),o=!1;if(-1!==h&&(n.Vz(),f.Bz()!==h)){const d=this.QN().lJ(h);this.cL()&&(o=!0,await d)}this.wf("canvas","update-html-layer-dom-state",{layersDomState:n.mq().filter(t=>t.lk()).map(t=>t.yK())}),c&&this.DO(),o&&this.wf("canvas","cleanup-html-layers"),this.eDt()&&(await this.hkt(),this.zL()>=this.ikt())?this.akt():(this.XL()||l||this.Akt(),this.NFt++,this.FFt++,this.kFt=!1,this.l$t+=performance.now()-t)}}async Hkt(){const t=this.mdt,s=this.UB();this.u$(),t.o$(!0),this.D3t(this.AD()),s&&C3Debugger.StartMeasuringTime(),this.b_t()?await t.ppt():t.lpt(),s&&C3Debugger.AddEventsTime(),this.N3t(),t.o$(!1),this.u$(),t.o$(!0)}async Vkt(){const t=this.mdt,s=this.UB(),e=this.b_t(),i=this.nRt,r=this.w$t,n=this.R$t;s&&C3Debugger.StartMeasuringTime(),e?await this.qkt(this.Fkt()):this.Okt(),e?await this.qkt(this.$kt()):this.Lkt(),s&&C3Debugger.AddBehaviorTotalTickTime(),s&&C3Debugger.StartMeasuringTime(),e?await this.Kkt(r.tick):i.dispatchEvent(r.tick),s&&C3Debugger.AddPluginTotalTickTime(),t.o$(!1),this.r7(n.tick)}async Ykt(){const t=this.mdt,s=this.nRt,e=this.w$t,i=this.R$t,r=this.UB(),n=this.b_t();r&&C3Debugger.StartMeasuringTime(),n?await t.F3t(this.H8):t.L3t(this.H8),r&&C3Debugger.AddEventsTime(),this.ZNt.wOt(),this.Wkt(),this.WFt=!1,t.o$(!0),r&&C3Debugger.StartMeasuringTime(),n?await this.qkt(this.kkt()):this.Nkt(),r&&C3Debugger.AddBehaviorTotalTickTime(),r&&C3Debugger.StartMeasuringTime(),n?await this.Kkt(e.tick2):s.dispatchEvent(e.tick2),r&&C3Debugger.AddPluginTotalTickTime(),t.o$(!1),this.r7(i.tick2),n&&await t.q3t()}Wkt(){if(0!==this.yFt.size){const t=this.nRt;t.qf(!0);for(const s of this._Ft)s.ipt().Xft(this.yFt);this._Ft.clear(),this.mdt.mpt(this.yFt);for(const e of this.yFt)e._n();this.yFt.clear(),t.qf(!1)}}async Xkt(){let t=this.wD(),s=0;for(;t.vD()&&s++<10;)await this.zkt(t.w7())}Bkt(t){let s=0;if(this.eDt())s=1/this.rkt(),this.KFt=s,this.zFt=s;else if(0!==this.qFt){const e=Math.max(t-this.qFt,0);.5<(s=e/1e3)&&(s=0),this.KFt=s,this.zFt=C33.wn(s,this.ZFt,this.QFt)}this.qFt=t,this.JFt=this.zFt*this.sbt,this.t$t.Mu(this.JFt),this.s$t.Mu(s*this.sbt),this.e$t.Mu(this.zFt);for(const[i,r]of this.i$t)r.Mu(this.zFt*i.ZL());this.EFt&&this.EFt.kDt(),1e3<=t-this.n$t&&(this.n$t+=1e3,1e3<=t-this.n$t&&(this.n$t=t),this.h$t=this.r$t,this.r$t=0,this.a$t=this.o$t,this.o$t=0,this.c$t=Math.min(this.l$t/1e3,1),this.l$t=0,this.EFt&&this.EFt.$Dt(),this.ZNt.TOt(),this.UB())&&C3Debugger.Update1sPerfStats()}ubt(t,s){if(s){if(!this.i$t.has(t)){const e=C33.yn(C33.Ud);e.Kd(this.t$t),this.i$t.set(t,e)}}else this.i$t.delete(t)}fbt(t){const s=this.i$t.get(t);return s?s.oe():this.zL()}async zkt(t){const s=this.nRt,e=this.wD(),i=e.AD();await i.FJ(),i.iJ(t,this.JS()),i===t&&this.mdt.BJ(),this.ZNt.wOt(),this.Wkt(),s.dispatchEvent(this.w$t.beforelayoutchange),C33.zf._d(!0),await t.Kz(i,this.JS()),C33.zf._d(!1),await t.nJ(!1),s.dispatchEvent(this.w$t.layoutchange),this.JD(),this.WFt=!0,this.u$(),this.okt()}JD(){this.MFt=!0}bDt(){return this.EFt?this.EFt.bDt():null}GDt(){return this.EFt?this.EFt.GDt():null}JS(){return this.EFt?this.EFt.JS():null}DO(){const e=this.EFt;if(e&&!e.RDt()){const i=this.JS(),t=i.Yv(),r=t&&i.PS(),n=t&&i.q2();if(r&&i.xv(),this.MFt||this.eDt()){const h=this.H8.AD(),o=(this.r$t++,i.wv(),this.UB());o&&C3Debugger.StartMeasuringTime(),this.MFt=!1;let t=null,s=(r&&(t=e.HDt().Cb(),i.Xv(t)),null);n&&(s=i.StartFrameTiming(2*(1+h.Lz())),i.StartMeasuringRenderPassTime(0,1)),this.zq()&&"low"===e.t8()?i.LG(e.UK(),e.jK()):i.DG(),this.Jkt(this.JS(),h),t&&i.qv(t),n&&(i.StopMeasuringRenderPassTime(),this.EFt.VDt(s)),i.ES(),o&&(C3Debugger.AddDrawCallsTime(),C3Debugger.UpdateInspectHighlight()),e&&e.jDt()}else i.RS()}}zJ(t){return"low"===this.QN().t8()||t.PS()&&(this.ZK()||this.zq())}Jkt(s,e){s.eg(),s.QG(),s.UG(1,1,1,1),s.Fv(null),s.qG(null),s.Mv(this.zq()),this.zJ(s)&&e.qJ(s);const i=e.Bz();for(let t=1;t<i;++t)e.t7(s,t),s.q2()&&s.Restart();this.zJ(s)||e.qJ(s),e.ZJ(s)}LB(t,s,e){if(!this.$Ft)return!1;let i=!this.kFt&&!this.mdt.Q3t(),r=0;i&&(r=performance.now());const n=this.UB(),h=(n&&this.aU(!1),this.mdt.W3t(this.H8,t,s,e));if(i){const o=performance.now()-r;this.l$t+=o,n&&C3Debugger.AddTriggersTime(o)}return n&&this.aU(!0),h}gEt(t,s,e){if(!this.b_t())return this.LB(t,s,e);if(this.Y3t())throw new Error("called DebugTrigger() while stopped on breakpoint");if(this.kFt||this.mdt.Q3t())return this.mdt.U3t(this.H8,t,s,e);throw new Error("called DebugTrigger() outside of event code - use TriggerAsync() instead")}async NB(t,s,e){if(!this.b_t())return this.LB(t,s,e);if(!this.$Ft)return!1;if(this.Y3t())return this.mdt.j3t(t,s,e);if(!this.AD())return this.mdt.H3t(t,s,e);let i=performance.now(),r=this.mdt.U3t(this.H8,t,s,e),n=r.next();for(;!n.done;)await this.k3t(n.value),n=r.next();return this.XL()||this.mdt.Q3t()||(await this.mdt.q3t(),this.BFt&&!this.kFt&&this.Akt()),this.l$t+=performance.now()-i,n.value}SEt(t,s,e){const i=this.UB(),r=(i&&this.aU(!1),this.mdt.K3t(this.H8,t,s,e));return i&&this.aU(!0),r}yEt(t,s,e){return this.mdt.z3t(this.H8,t,s,e)}_Et(t){return this.jFt.Mu(t)}D3t(t){this.uFt.push(t)}N3t(){if(!this.uFt.length)throw new Error("layout stack empty");this.uFt.pop()}HD(){return this.uFt.length?this.uFt.at(-1):this.AD()}YL(t){return t&&-1!==t.ZL()?this.zFt*t.ZL():this.JFt}J9(){return this.JFt}Q9(){return this.zFt}KL(){return this.KFt}ZL(){return this.sbt}tD(t){(isNaN(t)||t<0)&&(t=0),this.sbt=t}dD(t){this.ZFt=Math.max(t,0)}fD(){return this.ZFt}mD(t){this.QFt=Math.max(t,0)}CD(){return this.QFt}sD(){return this.h$t}iD(){return this.a$t}nD(){return this.c$t}Qkt(){return this.YFt}zL(){return this.t$t.oe()}Zkt(){return this.s$t.oe()}QL(){return this.e$t.oe()}Ytt(){return this.NFt}tBt(){return this.FFt}sBt(){return this.mFt}rL(){return this.DNt}hL(){return this.NNt}eBt(){return this.FNt}iBt(){return this.$Nt}aL(){return this.kNt}kD(t){if(this.u$t)throw new Error("cannot call while loading state - wait until afterload event");return this.SFt.get(t)||null}PJ(){this.SFt.clear();for(const t of this.nFt)if(!t.aq())for(const s of t.t$())this.SFt.set(s.oB(),s)}uNt(){return"preview"===this.ANt}UB(){return this.bNt}qN(){return this.ANt}KN(){return"nwjs"===this.qN()||this.ENt}dNt(){return"cordova"===this.ANt}rBt(){return"Android"===C33.pe.Ce&&("cordova"===this.ANt||"playable-ad-single-file"===this.ANt||"playable-ad-zip"===this.ANt||"instant-games"===this.ANt)}nBt(){return this.Ij}hBt(){return this.INt}zN(){return this.wNt}oBt(){return this.RNt}tL(){return this.ZNt}QIt(){return this.QNt.QIt()}ZIt(){return this.QNt.ZIt()}zq(){return this.IFt}aBt(){return this.JS().D2(this.Wq())}P2(t){return this.JS().P2(t||this.Wq())}lBt(){return this.WFt}cBt(t){this.RFt!==(t=!!t)&&(this.RFt=t,this.wD().M7(),this.JD())}gL(){return this.RFt}uBt(t){if(!this.rFt.has(t)){const e=()=>this.fBt(t);this.rFt.set(t,e),t.ed().addEventListener("animationframeimagechange",e)}const s=this.Km.Vm(t);return s.n1()||s.o1().then(()=>this.JD()),s}fBt(t){this.Km.Ym(t)}eFt(t){const s=[];for(const e of t.CMt())for(const i of e.pW()){const r=i.TW();s.push({source:i,width:r.AC(),height:r.OC(),tag:i.BW()})}return{e1:s}}async iFt(t){const s=C33.yn(C33.O0),e=[],r=new Map;for(const h of t.CMt())for(const o of h.pW()){const a=o.TW()._wt();r.has(a)||(r.set(a,null),e.push(s.Mu(async()=>{const t=await a.t6();r.set(a,t)})))}await Promise.all(e);const i=[];for(const l of t.CMt())for(const c of l.pW())i.push(s.Mu(async()=>{const t=c.TW(),s=r.get(t._wt()),e=await t.Twt(s),i=await createImageBitmap(e);return{l1:i}}));const n=await Promise.all(i);for(const u of r.values())u instanceof ImageBitmap&&u.close&&u.close();return{e1:n}}dBt(t){this.f$t=t,this.d$t=!1}pBt(){this.f$t="",this.d$t=!0}CBt(t){this.p$t=t}TTt(t){this.JB=t}mBt(){return this.C$t}Ukt(){return!!(this.f$t||this.d$t||this.p$t||null!==this.JB)}async jkt(){if(this.f$t&&(this.u$(),await this.gBt(this.f$t),this.SBt()),this.p$t&&(await this.yBt(this.p$t),this.SBt(),this.UB())&&C3Debugger.StepIfPausedInDebugger(),this.d$t){const t=await this._Bt();this.C$t=t,await this.NB(C33.GJ.bJ.MJ.TBt,null),this.C$t="",this.SBt()}if(null!==this.JB){this.u$();try{await this.ABt(this.JB),this.C$t=this.JB,await this.NB(C33.GJ.bJ.MJ.EBt,null),this.C$t=""}catch(t){console.error("[Construct] Failed to load state from JSON string: ",t),await this.NB(C33.GJ.bJ.MJ.IBt,null)}this.SBt()}}SBt(){this.f$t="",this.d$t=!1,this.p$t="",this.JB=null}uF(){return this.m$t||(this.m$t=localforage.We({name:"c3-localstorage-"+this.eBt(),description:this.rL()})),this.m$t}wBt(){return this.g$t||(this.g$t=localforage.We({name:"c3-savegames-"+this.eBt(),description:this.rL()})),this.g$t}async gBt(t){const s=await this._Bt();try{await this.wBt().setItem(t,s),console.log("[Construct] Saved state to storage ("+s.length+" chars)"),this.C$t=s,await this.NB(C33.GJ.bJ.MJ.TBt,null),this.C$t=""}catch(t){console.error("[Construct] Failed to save state to storage: ",t),await this.NB(C33.GJ.bJ.MJ.RBt,null)}}async yBt(t){try{const s=await this.wBt().getItem(t);if(!s)throw new Error("empty slot");console.log("[Construct] Loaded state from storage ("+s.length+" chars)"),await this.ABt(s),this.C$t=s,await this.NB(C33.GJ.bJ.MJ.EBt,null),this.C$t=""}catch(t){console.error("[Construct] Failed to load state from storage: ",t),await this.NB(C33.GJ.bJ.MJ.IBt,null)}}async _Bt(){const t={c3save:!0,version:1,rt:{time:this.zL(),timeRaw:this.Zkt(),walltime:this.QL(),timescale:this.ZL(),tickcount:this.Ytt(),next_uid:this.gFt,running_layout:this.AD().gq(),start_time_offset:Date.now()-this.YFt},types:{},layouts:{},events:this.mdt.D8(),timelines:this.BZ.D8(),user_script_data:null};for(const e of this.nFt)e.aq()||e.FMt()||(t.types[e.gq().toString()]=e.D8());for(const i of this.H8.bD())t.layouts[i.gq().toString()]=i.D8();const s=this.MBt("save");return s.saveData=null,await this.IJ(s),t.user_script_data=s.saveData,JSON.stringify(t)}SJ(){return this.u$t}async ABt(t){const s=this.wD(),e=JSON.parse(t);if(e.c2save)throw new Error("C2 saves are incompatible with C3 runtime");if(!e.c3save)throw new Error("not valid C3 save data");if(1<e.version)throw new Error("C3 save data from future version");this.ATt(),this.nRt.dispatchEvent(C33.yn(C33.Event,"beforeload"));for(const a of this.gkt()){const l=a.qk();l.FMt()||a.t9()}let i=e.rt,r=(this.t$t.Set(i.time),i.hasOwnProperty("timeRaw")&&this.s$t.Set(i.timeRaw),this.e$t.Set(i.walltime),this.sbt=i.timescale,this.NFt=i.tickcount,this.YFt=Date.now()-i.start_time_offset,i.running_layout),n=!(this.u$t=!0);if(r!==this.AD().gq()){const c=s.y7(r);if(!c)return;await this.zkt(c),n=!0}for(const[u,f]of Object.entries(e.layouts)){const d=parseInt(u,10),p=s.y7(d);p&&p.N8(f)}const h=new Set;for(const[C,m]of Object.entries(e.types)){const g=parseInt(C,10),S=this.zV(g);!S||S.aq()||S.FMt()||S.N8(m,h)}for(const y of this.H8.bD())for(const _ of y.G$())_.F8();if(this.u$(),this.PJ(),this.u$t=!1,n){for(const T of this.gkt())T.yJ();for(const[A,E]of Object.entries(e.types)){const I=parseInt(A,10),w=this.zV(I);!w||w.aq()||w.FMt()||w.BMt(E)}}this.gFt=i.next_uid,this.mdt.N8(e.events);for(const R of this.nFt)if(!R.aq()&&R.nB())for(const M of R.t$()){const b=M.lB();for(const G of R.Yz().OJ())if(G!==R){const v=G.t$();if(b<0||b>=v.length)throw new Error("missing sibling instance");M.xJ(v[b])}}this.BZ.N8(e.timelines),s.R7(),s.M7();for(const P of h)P.jbt();this.ETt(),this.nRt.dispatchEvent(C33.yn(C33.Event,"afterload")),this.r7(this.MBt("afterload"));for(const[O,x]of Object.entries(e.types)){const L=parseInt(O,10),D=this.zV(L);D&&D.kMt()}const o=this.MBt("load");o.saveData=e.user_script_data,await this.IJ(o),this.JD()}bBt(t,s){return t.UD().Yvt()-s.UD().Yvt()}xPt(t,s){t.UD()&&!this.W$t.has(t)&&(this.W$t.set(t,s),this.H$t.push(t))}ATt(){this.W$t=new WeakMap,C33.qh(this.H$t)}ETt(t="full",s=null){this.H$t.sort(this.bBt);for(const e of this.H$t)e.e9(this.W$t.get(e),t,s);for(const i of this.H$t)i.zbt(this.W$t.get(i),t,s);this.ATt()}async GBt(t){const s=await Promise.all(t.map(async t=>{const s=this.dNt()&&this.$X.iX();if(s||"playable-ad-single-file"===this.qN()){const e=await this.$X.Lo(t);return URL.createObjectURL(e)}return new URL(t,location.href).toString()}));this.v$t.vBt(s)}PBt(t,s){this.v$t.OBt(t,s)}xBt(t,s){this.v$t.LBt(t,s)}DBt(t,s,e,i){return this.v$t.DBt(t,s,e,null,null,i)}NBt(t,s,e,i){return this.v$t.NBt(t,s,e,i)}FBt(){return this.v$t.$Bt()}FD(t,s){this.wf("runtime","invoke-download",{url:t,filename:s})}async tNt(t,s,e,i,r,n){if(i=i||s,r=r||e,this.cL()){const h=await this.ZD("runtime","raster-svg-image",{blob:t,imageWidth:s,imageHeight:e,surfaceWidth:i,surfaceHeight:r,imageBitmapOpts:n});return h.imageBitmap}{const o=await self.C3_RasterSvgImageBlob(t,s,e,i,r);return n?self.createImageBitmap(o,n):o}}async kBt(t){return this.cL()?this.ZD("runtime","get-svg-image-size",{blob:t}):self.C3_GetSvgImageSize(t)}BBt(){this.T$t||(this.T$t=!0,this.wf("runtime","enable-device-orientation"))}WBt(){this.A$t||(this.A$t=!0,this.wf("runtime","enable-device-motion"))}TD(){return this.XFt()}HBt(t){this.XFt=t}L$t(){const t=this.JS();return{fps:this.sD(),tps:this.iD(),cpu:this.nD(),gpu:this.oD(),layout:this.AD()?this.AD().pf():"",renderer:t.PS()?t.eP():t.GetAdapterInfoString()}}Y3t(){return!!this.UB()&&C3Debugger.Y3t()}k3t(t){return this.b_t()?C3Debugger.k3t(t):Promise.resolve()}T1t(){return!!this.b_t()&&C3Debugger.BreakNext()}VBt(t){this.GNt=!!t,this.UBt()}jBt(){return this.GNt}b_t(){return this.vNt}aU(t){t?this.PNt--:this.PNt++,this.UBt()}UBt(){this.vNt=this.UB()&&this.GNt&&0===this.PNt}kCt(){return this.UB()&&C3Debugger.kCt()}KK(){return this.UB()&&this.JS().Yv()&&C3Debugger.KK()}async qkt(t){if(t)for(const s of t)await this.k3t(s)}Kkt(t){return this.qkt(this.nRt.yd(t))}W0t(t){return this.mdt.W0t(t.name,t.params)}sN(t){if(this.cL())throw new Error("not supported in worker mode");return self.c3_runtimeInterface._GetHTMLWrapElement(t)}mF(){return this.$$t}MBt(t){const s=C33.yn(C33.Event,t,!1);return s.runtime=this.$$t,s}Q$t(){this.$$t=new self.qx(this),this.R$t={pretick:this.MBt("pretick"),tick:this.MBt("tick"),tick2:this.MBt("tick2")}}skt(){const t={};for(const s of this.nFt)t[s.p3t()]={value:s.$F(),enumerable:!0,writable:!1};this.$$t.EL(t)}ekt(){const t={};for(const s of this.RL().A3t())t[s.p3t()]=s.C3t();this.$$t.IL(t)}OD(){return this.B$t}xF(t,s){this.k$t.set(t,s)}O$(t){return this.k$t.get(t)}BN(t){if(!(t instanceof self.HF))throw new TypeError("expected IObjectClass");const s=this.O$(t);if(s&&s instanceof C33.lct)return s;throw new Error("invalid IObjectClass")}JF(t){if(!(t instanceof self.Xk))throw new TypeError("expected IInstance");const s=this.O$(t);if(s&&s instanceof C33.Instance)return s;throw new Error("invalid IInstance")}VD(t){if(!(t instanceof self.P5))throw new TypeError("expected IWorldInstance");const s=this.O$(t);if(s&&s instanceof C33.Instance)return s;throw new Error("invalid IInstance")}},self.C3_CreateRuntime=C33.pNt.CA,self.C3_InitRuntime=(t,s)=>t.rbt(s)}{const C33=self.Bs;C33.P$t=class extends C33.gn{constructor(t,s){super(),this.Af=t,this.XBt=new Map,this.YBt=0,this.qBt=s.inputPort,s.outputPort.onmessage=t=>this.KBt(t),this.zBt=s.maxNumWorkers,this.JBt=1,this.QBt=!1,this.ZBt=!1}$Bt(){return this.zBt}vBt(t){this.qBt.postMessage({type:"_import_scripts",scripts:t})}OBt(t,s){this.qBt.postMessage({type:"_send_blob",blob:t,id:s})}LBt(t,s){this.qBt.postMessage({type:"_send_buffer",buffer:t,id:s},[t])}DBt(t,s,e,i,r,n){if(e=e||[],"number"==typeof n&&(n=Math.floor(n))<=0)throw new Error("invalid maxWorkerNum");const h=this.YBt++,o={type:t,isBroadcast:!1,maxWorkerNum:n,jobId:h,params:s,transferables:e},a=new Promise((t,s)=>{this.XBt.set(h,{resolve:t,progress:i,reject:s,t4t:!1,maxWorkerNum:n})});return r&&r.Bd(()=>this.s4t(h)),this.qBt.postMessage(o,e),this.e4t(),a}NBt(t,s,e,i){if(e=e||[],"number"==typeof i&&(i=Math.floor(i))<=0)throw new Error("invalid maxWorkerNum");const r=this.YBt++,n={type:t,isBroadcast:!0,maxWorkerNum:i,jobId:r,params:s,transferables:e};this.qBt.postMessage(n,e)}s4t(t){const s=this.XBt.get(t);s&&(s.t4t=!0,s.resolve=null,s.progress=null,s.reject=null,this.qBt.postMessage({type:"_cancel",jobId:t}))}KBt(t){const s=t.data,e=s.type,i=s.jobId;switch(e){case"result":this.i4t(i,s.result);break;case"progress":this.r4t(i,s.progress);break;case"error":this.n4t(i,s.error);break;case"ready":this.h4t();break;default:throw new Error(`unknown message from worker '${e}'`)}}i4t(t,s){const e=this.XBt.get(t);if(!e)throw new Error("invalid job ID");e.t4t||e.resolve(s),this.XBt.delete(t)}r4t(t,s){const e=this.XBt.get(t);if(!e)throw new Error("invalid job ID");!e.t4t&&e.progress&&e.progress(s)}n4t(t,s){const e=this.XBt.get(t);if(!e)throw new Error("invalid job ID");e.t4t||e.reject(s),this.XBt.delete(t)}h4t(){this.QBt&&(this.QBt=!1,this.JBt++,this.JBt<this.zBt?this.e4t():this.qBt.postMessage({type:"_no_more_workers"}))}o4t(){let t=0,s=[...this.XBt.values()].sort((t,s)=>{const e=t.maxWorkerNum||1/0,i=s.maxWorkerNum||1/0;return e-i});for(const e of s){const i=e.maxWorkerNum||1/0;t<i&&t++}return t}async e4t(){if(!(this.JBt>=this.zBt||this.QBt||this.ZBt||this.o4t()<=this.JBt))try{this.QBt=!0;const t=await this.Af.ZD("runtime","create-job-worker");t.outputPort.onmessage=t=>this.KBt(t)}catch(t){this.ZBt=!0,this.QBt=!1,console.error(`[Construct] Failed to create job worker; stopping creating any more (created ${this.JBt} so far)`,t)}}}}self.C3_Shaders={};{let ForEachOrdered_SortInstances2=function(t,s){const e=t[1],i=s[1];if("number"==typeof e&&"number"==typeof i)return e-i;{const r=""+e,n=""+i;return r<n?-1:n<r?1:0}},a=(ForEachOrdered_SortInstances=ForEachOrdered_SortInstances2,self.Bs),r=null,n="",s="",o=[],u="",l="",c="",i=a.yn(a.f0t);a.GJ.bJ=class extends a.AAt{constructor(t){super(t),this.o0t=this.Af.RL().hU(),this.Yft=this.Af.RL().kL(),this.a4t=0,this.l4t=0,this.c4t=new Map}_n(){super._n()}JD(){this.Af.JD()}LB(t){this.Af.LB(t,null,null)}u4t(t,e){return r&&t===n&&e===s||(r=new RegExp(t,e),n=t,s=e),r.lastIndex=0,r}f4t(t,s,e){if(t!==u||s!==l||e!==c){const i=this.u4t(s,e);o=t.match(i),u=t,l=s,c=e}return o}async d4t(t,s){if(s.length){this.a4t+=s.length;const e=[];for(const i of s)e.push(t.Jz(i));await a.yo(e,()=>{this.l4t++}),this.l4t++,this.l4t===this.a4t&&(this.l4t=0,this.a4t=0,this.Af.LB(a.GJ.bJ.MJ.p4t,null,null))}}EX(){return 0===this.a4t?1:this.l4t/this.a4t}C4t(t,s){for(const e of s)0===e.i$()&&t.sJ(e)}m4t(){return i}g4t(s){const e=this.Af.RL(),t=e.kL(),i=t.rU(),r=i.OL(),n=r.iU(),h=i.Ydt(),o=t.nU(r),a=e.hU(),l=a.nU();if(l.c0t(s),h)for(let t=0;t<s&&!l.CU();++t)e.cU(n),l.dU(t),r.uU(i,o),e.fU(n);else for(let t=0;t<s&&!l.CU();++t)l.dU(t),r.uU(i,o);return t.mU(),a.mU(),!1}*S4t(s){const e=this.Af.RL(),t=e.kL(),i=t.rU(),r=i.OL(),n=r.iU(),h=i.Ydt(),o=t.nU(r),a=e.hU(),l=a.nU();if(l.c0t(s),h)for(let t=0;t<s&&!l.CU();++t)e.cU(n),l.dU(t),yield*r.O1t(i,o),e.fU(n);else for(let t=0;t<s&&!l.CU();++t)l.dU(t),yield*r.O1t(i,o);return t.mU(),a.mU(),!1}y4t(){const s=this.Af.RL(),t=s.kL(),e=t.rU(),i=e.OL(),r=i.iU(),n=e.Ydt(),h=t.nU(i),o=s.hU(),a=o.nU();if(n)for(let t=0;!a.CU();++t)s.cU(r),a.dU(t),i.uU(e,h)||a.VW(),s.fU(r);else for(let t=0;!a.CU();++t)a.dU(t),i.uU(e,h)||a.VW();return t.mU(),o.mU(),!1}*_4t(){const s=this.Af.RL(),t=s.kL(),e=t.rU(),i=e.OL(),r=i.iU(),n=e.Ydt(),h=t.nU(i),o=s.hU(),a=o.nU();if(n)for(let t=0;!a.CU();++t){s.cU(r),a.dU(t);const l=yield*i.O1t(e,h);l||a.VW(),s.fU(r)}else for(let t=0;!a.CU();++t){a.dU(t);const c=yield*i.O1t(e,h);c||a.VW()}return t.mU(),o.mU(),!1}T4t(t,s,e){const i=this.Af.RL(),r=i.kL(),n=r.rU(),h=n.OL(),o=h.iU(),a=n.Ydt(),l=r.nU(h),c=i.hU(),u=c.nU();if(u.oU(t),u.c0t(e),e<s)if(a)for(let t=s;t>=e&&!u.CU();--t)i.cU(o),u.dU(t),h.uU(n,l),i.fU(o);else for(let t=s;t>=e&&!u.CU();--t)u.dU(t),h.uU(n,l);else if(a)for(let t=s;t<=e&&!u.CU();++t)i.cU(o),u.dU(t),h.uU(n,l),i.fU(o);else for(let t=s;t<=e&&!u.CU();++t)u.dU(t),h.uU(n,l);return r.mU(),c.mU(),!1}*A4t(t,s,e){const i=this.Af.RL(),r=i.kL(),n=r.rU(),h=n.OL(),o=h.iU(),a=n.Ydt(),l=r.nU(h),c=i.hU(),u=c.nU();if(u.oU(t),u.c0t(e),e<s)if(a)for(let t=s;t>=e&&!u.CU();--t)i.cU(o),u.dU(t),yield*h.O1t(n,l),i.fU(o);else for(let t=s;t>=e&&!u.CU();--t)u.dU(t),yield*h.O1t(n,l);else if(a)for(let t=s;t<=e&&!u.CU();++t)i.cU(o),u.dU(t),yield*h.O1t(n,l),i.fU(o);else for(let t=s;t<=e&&!u.CU();++t)u.dU(t),yield*h.O1t(n,l);return r.mU(),c.mU(),!1}E4t(e){const t=e.s$(),s=t.t$();if(0!==s.length){const r=this.Af.RL(),n=r.kL(),h=n.rU(),o=h.OL(),l=o.iU(),c=h.Ydt(),u=n.nU(o),f=r.hU(),d=f.nU(),p=e.nB(),C=i.nU();if(a.Qh(C,s),d.c0t(C.length),c)for(let t=0,s=C.length;t<s&&!d.CU();++t){r.cU(l);const m=C[t];e.s$().odt(m),p&&m.jCt(),d.dU(t),o.uU(h,u),r.fU(l)}else{t.rdt(!1);const g=t.ndt();a.qh(g),g.push(null);for(let t=0,s=C.length;t<s&&!d.CU();++t){const S=C[t];g[0]=S,p&&S.jCt(),d.dU(t),o.uU(h,u)}}n.mU(),f.mU(),a.qh(C),i.mU()}return!1}*I4t(e){const t=e.s$(),s=t.t$();if(0!==s.length){const r=this.Af.RL(),n=r.kL(),h=n.rU(),o=h.OL(),l=o.iU(),c=h.Ydt(),u=n.nU(o),f=r.hU(),d=f.nU(),p=e.nB(),C=i.nU();if(a.Qh(C,s),d.c0t(C.length),c)for(let t=0,s=C.length;t<s&&!d.CU();++t){r.cU(l);const m=C[t];e.s$().odt(m),p&&m.jCt(),d.dU(t),yield*o.O1t(h,u),r.fU(l)}else{t.rdt(!1);const g=t.ndt();a.qh(g),g.push(null);for(let t=0,s=C.length;t<s&&!d.CU();++t){const S=C[t];g[0]=S,p&&S.jCt(),d.dU(t),yield*o.O1t(h,u)}}n.mU(),f.mU(),a.qh(C),i.mU()}return!1}w4t(e,t){const s=e.s$(),r=s.t$();if(0!==r.length){const n=this.Af.RL(),h=n.kL(),o=n.n3t(),l=h.rU(),c=l.OL(),u=c.iU(),f=l.Ydt(),d=h.nU(c),p=n.hU(),C=p.nU(),m=e.nB(),g=i.nU();a.qh(g),C.c0t(r.length);for(let t=0,s=r.length;t<s;++t)g.push([r[t],o.XSt(1,t)]);if(g.sort(ForEachOrdered_SortInstances2),1===t&&g.reverse(),f)for(let t=0,s=g.length;t<s&&!C.CU();++t){n.cU(u);const S=g[t][0];e.s$().odt(S),m&&S.jCt(),C.dU(t),c.uU(l,d),n.fU(u)}else{s.rdt(!1);const y=s.ndt();a.qh(y),y.push(null);for(let t=0,s=g.length;t<s&&!C.CU();++t){const _=g[t][0];y[0]=_,m&&_.jCt(),C.dU(t),c.uU(l,d)}}h.mU(),p.mU(),a.qh(g),i.mU()}return!1}*R4t(e,t){const s=e.s$(),r=s.t$();if(0!==r.length){const n=this.Af.RL(),h=n.kL(),o=n.n3t(),l=h.rU(),c=l.OL(),u=c.iU(),f=l.Ydt(),d=h.nU(c),p=n.hU(),C=p.nU(),m=e.nB(),g=i.nU();a.qh(g),C.c0t(r.length);for(let t=0,s=r.length;t<s;++t)g.push([r[t],o.XSt(1,t)]);if(g.sort(ForEachOrdered_SortInstances2),1===t&&g.reverse(),f)for(let t=0,s=g.length;t<s&&!C.CU();++t){n.cU(u);const S=g[t][0];e.s$().odt(S),m&&S.jCt(),C.dU(t),yield*c.O1t(l,d),n.fU(u)}else{s.rdt(!1);const y=s.ndt();a.qh(y),y.push(null);for(let t=0,s=g.length;t<s&&!C.CU();++t){const _=g[t][0];y[0]=_,m&&_.jCt(),C.dU(t),yield*c.O1t(l,d)}}h.mU(),p.mU(),a.qh(g),i.mU()}return!1}M4t(t,s){let e=this.c4t.get(t);if(!e){if(!s)return null;e={b4t:null,G4t:new Map},this.c4t.set(t,e)}return e}v4t(t,s,e,i,r){s.vL().q1t(e,s.DL()),i&&t.fU(r)}*P4t(t,s,e,i,r){yield*s.vL().K1t(e,s.DL()),i&&t.fU(r)}}}{const a1=self.Bs;a1.GJ.bJ.FRt=class extends a1.gn{constructor(t){super(),this.kft=t,this.Af=t.cN(),this.oEt=t.UF()}jAt(){}_n(){this.kft=null,this.Af=null,this.oEt=null}}}{const d1=self.Bs;d1.GJ.bJ.Instance=class extends d1.gn{constructor(t,s){super(),this.Ge=t,this.kft=this.Ge.qk(),this.dEt=this.kft.Eyt(),this.Af=this.Ge.cN()}_n(){this.Ge=null,this.kft=null,this.dEt=null,this.Af=null}}}{const h1=self.Bs,i1=[];h1.GJ.bJ.MJ={O4t(){return!0},RJ(){return!0},$J(){return!0},Gkt(){return!0},vkt(){return!0},XL(){return this.Af.XL()},Gmt(){const t=this.Af.r3t();return!t.Hdt()&&!t.Bdt()},x4t(){let t=this.Af.n3t(),s=t.xSt(),e=s.get("TriggerOnce_lastTick");void 0===e&&(e=-1,s.set("TriggerOnce_lastTick",-1));const i=this.Af.Ytt();return s.set("TriggerOnce_lastTick",i),this.Af.lBt()||e!==i-1},L4t(t){const s=this.Af.n3t(),e=s.xSt(),i=e.get("Every_lastTime")||0,r=this.Af.zL(),n=(e.has("Every_seconds")||e.set("Every_seconds",t),e.get("Every_seconds"));return i+n<=r?(e.set("Every_lastTime",i+n),r>=e.get("Every_lastTime")+.04&&e.set("Every_lastTime",r),e.set("Every_seconds",t),!0):(r<i-.1&&e.set("Every_lastTime",r),!1)},jpt(t){const s=this.Af.RL().R3t(t);return s&&s.jpt()},uNt(){return this.Af.uNt()},Ee(){return h1.pe.Ee},ukt(){return!0},D4t(){return!0},N4t(){return!0},TBt(){return!0},RBt(){return!0},EBt(){return!0},IBt(){return!0},F4t(t){return!!this.Af.kD(t)},$4t(t){switch(t){case 0:return"browser"===h1.pe.Te;case 1:return"iOS"===h1.pe.Ce;case 2:return"Android"===h1.pe.Ce;case 8:return"cordova"===h1.pe.Te;case 9:return"scirra-arcade"===this.Af.qN();case 10:return"nwjs"===h1.pe.Te;case 13:return"windows-uwp"===this.Af.qN();default:return!1}},k4t(t,s,e){const i=this.u4t(s,e);return i.test(t)},B4t(t,s,e){return h1.compare(t,s,e)},W4t(t,s,e){return s<=t&&t<=e},H4t(t,s,e){return h1.compare(t.Wit(),s,e)},V4t(t){return!!t.Wit()},U4t(t,s){const e=this.Af.zL();if(0!==t)return h1.compare(e,t,s);{const i=this.Af.n3t(),r=i.xSt();return!r.get("CompareTime_executed")&&s<=e&&(r.set("CompareTime_executed",!0),!0)}},j4t(t){return isNaN(t)},VTt(t,s,e){return h1.Ln(h1.Mn(t),h1.Mn(e))<=h1.Mn(s)},UTt(t,s){return h1.Nn(h1.Mn(t),h1.Mn(s))},t_t(t,s,e){let i=h1.Mn(t),r=h1.Mn(s),n=h1.Mn(e),h=!h1.Nn(n,r);return h?!(!h1.Nn(i,r)&&h1.Nn(i,n)):h1.Nn(i,r)&&!h1.Nn(i,n)},X4t(t,s){return"number"==typeof t?0===s:1===s},Y4t(t){return!!t},Ept(t){return t.toLowerCase()===this.Af.RL().Mpt()},q4t(t,e,i,r){if(!t)return!1;let s=this.m4t(),n=s.nU(),h=t.s$(),o=(h1.Qh(n,h.t$()),h.Jft()&&h1.qh(h.hdt()),this.Af.n3t()),a=0;for(let t=0,s=n.length;t<s;++t){const c=n[t];n[a]=c,e=o.XSt(1,t),r=o.XSt(3,t),h1.compare(e,i,r)?++a:h.idt(c)}h1.Yh(n,a),h.adt(n);const l=!!n.length;return h1.qh(n),s.mU(),t.W1t(),l},K4t(t,s){if(!t)return!1;let e=this.m4t(),i=e.nU(),r=t.s$(),n=(h1.Qh(i,r.t$()),r.Jft()&&h1.qh(r.hdt()),this.Af.n3t()),h=0;for(let t=0,s=i.length;t<s;++t){const a=i[t];i[h]=a,n.XSt(1,t)?++h:r.idt(a)}h1.Yh(i,h),r.adt(i);const o=!!i.length;return h1.qh(i),e.mU(),t.W1t(),o},z4t(t,e,i){if(!t)return!1;const s=t.s$(),r=s.t$();if(0===r.length)return!1;let n=this.Af.n3t(),h=null,o=0;for(let t=0,s=r.length;t<s;++t){const a=r[t];i=n.XSt(2,t),(null===h||0===e&&i<o||1===e&&i>o)&&(o=i,h=a)}return s.ddt(h),t.W1t(),!0},J4t(t,s){if(!t)return!1;const e=t.s$(),i=e.t$();if((s=Math.floor(s))>=i.length)return!1;const r=i[s];return e.ddt(r),t.W1t(),!0},Q4t(t){if(!t)return!1;const s=t.s$(),e=s.t$(),i=Math.floor(this.Af.TD()*e.length);if(i>=e.length)return!1;const r=e[i];return s.ddt(r),t.W1t(),!0},Z4t(t){if(!t)return!1;if(!t.i$())return!1;const s=t.s$();return s.rdt(!0),t.W1t(),!0},t5t(t,e,i){if(!t)return!1;const r=t.s$(),s=r.t$(),n=this.Af.OL(),h=n.pdt(),o=this.Af.n3t().bSt();r.Jft()?(h1.Qh(i1,s),r.zft(),r.rdt(!1)):h?(h1.Qh(i1,r.hdt()),h1.qh(r.hdt())):(h1.Qh(i1,r.ndt()),h1.qh(r.ndt()));for(let t=0,s=i1.length;t<s;++t){const a=i1[t];h1.xor(a.UD().W4(e,i),o)?r.edt(a):r.idt(a)}return t.W1t(),h1.xor(!!r.ndt().length,o)},s5t(s){if(!s)return!1;let e=s.aq(),i=null,r=this.Af.MMt();for(let t=r.length-1;0<=t;--t){const n=r[t];if(e){if(n.qk().Gyt(s)){i=n;break}}else if(n.qk()===s){i=n;break}}if(!i){const h=s.t$();h.length&&(i=h.at(-1))}if(!i)return!1;const t=s.s$();return t.ddt(i),s.W1t(),!0},e5t(t){return this.Af.b_t()?this.S4t(t):this.g4t(t)},i5t(){return this.Af.b_t()?this._4t():this.y4t()},r5t(t,s,e){return this.Af.b_t()?this.A4t(t,s,e):this.T4t(t,s,e)},P0(t){return this.Af.b_t()?this.I4t(t):this.E4t(t)},n5t(t,s,e){return this.Af.b_t()?this.R4t(t,e):this.w4t(t,e)},h5t(t){return!!t&&t.rk()},o5t(t){return!!t&&t.fk()},a5t(t){return!!t&&t.lk()},l5t(t){return!!t&&!t.i$()},c5t(t,s,e){return!!t&&h1.compare(100*t.VG(),s,e)},u5t(t){const s=this.Af.AD();return!!s&&s.Dz(t)},p4t(){return!0},f5t(){return 0<this.a4t},d5t(t,s){const e=this.Af.Lbt();return!!e&&!!s&&!!e.oct(t,s)}}}{let SortZOrderList2=function(t,s){const e=t[0],i=s[0],r=e-i;if(0!=r)return r;const n=t[1],h=s[1];return n-h},SortInstancesByValue2=function(t,s){return t[1]-s[1]};SortZOrderList=SortZOrderList2,SortInstancesByValue=SortInstancesByValue2;const M2=self.Bs,N2=[],O2=[],P2=M2.yn(M2.Rect),Q2=M2.yn(M2.Zo),R2=[];M2.GJ.bJ.pnt={p5t(t,s){t.Art(s)},C5t(t,s){t.mi()&&"number"!=typeof s&&(s=parseFloat(s)),t.Art(t.Wit()+s)},m5t(t,s){t.mi()&&t.Art(t.Wit()-s)},g5t(t,s){t.Art(!!s)},S5t(t){t.Art(!t.Wit())},y5t(t){t.Art(t.i3t())},_5t(t){this.Af.RL().I3t(t)},T5t(t,s,e,i,r,n){if(t&&s){const h=this.Af.n$(t,s,e,i,r,n);if(h){r&&s.h$(h);const o=this.Af.RL(),a=(o.o$(!0),h.a$(),o.o$(!1),new Map);h.wbt(a,t,r);for(const[l,c]of a)l.s$().ldt(c)}}},A5t(t,s,e,i,r,n){if(t&&s){const h=this.Af.mkt(t);h&&M2.GJ.bJ.pnt.T5t.call(this,h,s,e,i,r,n)}},hq(r,n,h,o,a,t,l,c,u,f,d){if(r){let s=this.Af.HD(),e=s;if(t){const p=this.Af.wD().S7(t);if(!p)return;e=p}let i=null;if(!("number"!=typeof l||0<=l)||(i=e.jD(l))){let t=null;if(!("number"!=typeof c||0<=c)||(t=s.jD(c))){P2.set(n,h,o,a);const C=e.hq(r,P2,i,t,u,f,d);r.s$().adt(C),r.W1t()}}}},E5t(){const t=this.o0t;t.i0t()&&t.s0t().VW()},Xpt(t,s){const e=this.Af.RL().R3t(t);e&&(0===s?e.Xpt(!1):1===s?e.Xpt(!0):e.Xpt(!e.jpt()))},I5t(t){this.Af.tD(t)},w5t(t,s){if(s<0&&(s=0),t){const e=t.s$(),i=e.t$();for(const r of i)r.tD(s)}},R5t(t){if(t){const s=t.s$(),e=s.t$();for(const i of e)i.pB()}},Hh(t,s){if(!(t<0)){const e=this.Af.RL().hpt();return s?e.dAt(t):e.pAt(t),!0}},UL(t){return this.Af.RL().hpt().CAt(t),!0},M5t(){const t=this.Af.RL();return t.hpt().mAt(t.Apt()),!0},HL(t){this.Af.RL().HL(t)},async UDt(t,s,e,i,r,n){const h=this.Af.QN();h&&(this.JD(),await h.UDt(0===t?"image/png":"image/jpeg",s/100,e,i,r,n),await this.Af.NB(M2.GJ.bJ.MJ.D4t,null))},b5t(t,s){if(!(t<=0||s<=0)){this.Af.CDt(t,s),this.Af.HD().M8();const e=this.Af.QN();e&&("off"!==e.aDt()&&this.Af.Skt(t,s),e.cM(e.eV(),e.iV(),!0),this.Af.JD())}},G5t(t){const s=this.Af.QN();s&&"off"!==s.aDt()&&(s.ADt(0!==t?"high":"low"),s.cM(s.eV(),s.iV(),!0))},nit(t){this.Af.dBt(t)},v5t(){this.Af.pBt()},P5t(t){this.Af.CBt(t)},O5t(t){this.Af.TTt(t)},x5t(t){},L5t(){for(const t of this.Af.wD().bD())t.YJ()},D5t(t){this.Af.cBt(0!==t)},N5t(t,s){this.Af.mD(1/t),this.Af.dD(1/s)},F5t(t,s){this.Af.dD(t),this.Af.mD(s)},$5t(t){this.Af.cD(["vsync","unlimited-tick","unlimited-frame"][t])},k5t(t,e){if(t){const s=t.s$(),i=s.t$(),r=N2,n=O2,h=this.Af.HD(),o=t.aq(),a=t.lgt();for(let t=0,s=i.length;t<s;++t){const l=i[t],c=l.UD();if(c){let t;t=o?l.oht(e+l.qk().agt(a)):l.oht(e),r.push([c.jD().Yx(),c.XD()]),n.push([l,t])}}if(r.length){r.sort(SortZOrderList2),n.sort(SortInstancesByValue2);let e=!1;for(let t=0,s=r.length;t<s;++t){const u=n[t][0],f=h.YD(r[t][0]),d=r[t][1],p=f.qD();p[d]!==u&&((p[d]=u).UD().KD(f,!0),f.zD(u),e=!0)}e&&this.Af.JD(),M2.qh(N2),M2.qh(O2)}}},NN(t,s){t=Math.floor(t),s=Math.floor(s),t<=0||s<=0||!Number.isFinite(t)||!Number.isFinite(s)||this.Af.tL().NN(t,s)},B5t(t){if(!this.Af.h1()){const s=this.Af.wD();s.vD()||s.PD(t)}},W5t(t){if(!this.Af.h1()){const s=this.Af.wD();if(!s.vD()){const e=s.S7(t);e&&s.PD(e)}}},H5t(t){if(!this.Af.h1()){const s=this.Af.wD();if(!s.vD()){const e=s.bD(),i=e.indexOf(s.AD());if((!t||0!==i)&&(t||i!==e.length-1)){const r=e[i+(t?-1:1)];s.PD(r)}}}},V5t(){if(!this.Af.h1()){const t=this.Af.wD();t.vD()||(t.PD(t.AD()),this.Af.RL().v3t())}},U5t(t,s){t&&t.ek(s)},j5t(t,s){t&&t.hk(s)},X5t(t,s){t&&t.ck(s)},Y5t(t,s){t&&t.jG(s/100)},q5t(t,s){t&&t.dk(s)},K5t(t,s){t&&t.Ck(s)},z5t(t,s){t&&t.y$(M2.Mn(+s))},J5t(t,s,e){t&&(t.Pk(!0),t._$(s),t.A$(e))},Q5t(t){t&&t.Pk(!1)},Z5t(t,s,e){t&&t.Hq(s/100,e/100)},tWt(t,s){t&&t.Hy(+s)},sWt(t,s){if(t){Q2.La(s),Q2.wn();const e=t.vk();e.wa(Q2)||(e.ga(Q2),this.JD())}},eWt(t,s){t&&t.Ik(s)},iWt(t,s){t&&t.Iy(s)},rWt(t,s,e){if(t){const i=t.d$(),r=i.qrt(e);if(r){const n=1===s;r.NCt()!==n&&(r.JPt(n),t.sW(),this.Af.JD())}}},nWt(t,s,e,i){if(t){const r=t.d$(),n=r.qrt(s);if(n){e=Math.floor(e);const h=n.pE().mE(e);if(h){"color"===h?(Q2.La(i),i=Q2):"percent"===h&&(i/=100);const o=r.iW(n.Yx(),e,i);o&&n.NCt()&&this.Af.JD()}}}},hWt(t,s){t&&t.Mk(s)},oWt(t){this.Af.HD().g$(+t)},aWt(t){this.Af.HD().y$(M2.Mn(+t))},lWt(t,s){const e=this.Af.HD(),i=e.d$(),r=i.qrt(s);if(r){const n=1===t;r.NCt()!==n&&(r.JPt(n),e.sW(),this.Af.JD())}},cWt(t,s,e){const i=this.Af.HD(),r=i.d$(),n=r.qrt(t);if(n){s=Math.floor(s);const h=n.pE().mE(s);if(h){"color"===h?(Q2.La(e),e=Q2):"percent"===h&&(e/=100);const o=r.iW(n.Yx(),s,e);o&&n.NCt()&&this.Af.JD()}}},uWt(t,s){const e=this.Af.HD();e.W$(t/100,s/100)},fWt(t){const s=this.Af.HD();0===t?s.U$():s.j$()},dWt(t){const s=this.Af.HD();s._$(t)},pWt(t){const s=this.Af.HD();s.A$(t)},CWt(t,s){const e=this.Af.HD();e._$(t),e.A$(s)},mWt(t){if(t){const s=t.m_t();if(s){const e=s.UD();if(e){const i=this.Af.HD();i._$(e.Ny()),i.A$(e.ky())}}}},x$(t,s,e){const i=this.Af.HD();try{i.x$(t,s,e)}catch(t){console.warn("[Construct] Cannot add layer: ",t)}},D$(t,s,e){if(t){const i=this.Af.HD();try{i.D$(t,s,e)}catch(t){console.warn("[Construct] Cannot move layer: ",t)}}},F$(t){if(t){const s=this.Af.HD();s.F$(t)}},k$(){this.Af.HD().k$()},async gWt(t){const s=this.Af.AD();if(s&&t&&!this.Af.h1()){const e=t.aq()?t.xmt():[t];await this.d4t(s,e)}},async SWt(t){await M2.GJ.bJ.pnt.gWt.call(this,this.Af.mkt(t))},yWt(t){const s=this.Af.AD();if(s&&t){const e=t.aq()?t.xmt():[t];this.C4t(s,e)}},_Wt(t){M2.GJ.bJ.pnt.yWt.call(this,this.Af.mkt(t))},TWt(){const t=this.Af.AD();if(t){const s=t.qz();this.C4t(t,s)}},async AWt(t){const s=this.Af.AD();t&&s&&!this.Af.h1()&&await this.d4t(s,t.jz())},async EWt(t){const s=this.Af.AD(),e=this.Af.wD().S7(t);e&&s&&!this.Af.h1()&&await this.d4t(s,e.jz())},WL(t){const s=this.Yft.$L();if(s)switch(s.BL()){case 1:"number"==typeof t&&s.WL(t);break;case 2:"string"==typeof t&&s.WL(t);break;case 3:s.WL(t)}},IWt(t,s,e){const i=this.M4t(t.toLowerCase(),!0),r=i.G4t,n=s.toLowerCase(),h=(r.has(n)&&console.warn(`[Construct] Function map '${t}' string '${s}' already in map; overwriting entry`),M2.first(r.values())||i.b4t);if(h){const o=0!==h.NL(),a=0!==e.NL();if(o!=a)return void console.error(`[Construct] Function map '${t}' string '${s}' function return type not compatible with other functions in the map; entry ignored`)}r.set(n,e)},wWt(t,s){const e=this.M4t(t.toLowerCase(),!0),i=(e.b4t&&console.warn(`[Construct] Function map '${t}' already has a default; overwriting entry`),M2.first(e.G4t.values())||e.b4t);if(i){const r=0!==i.NL(),n=0!==s.NL();if(r!=n)return void console.error(`[Construct] Function map '${t}' default: function return type not compatible with other functions in the map; entry ignored`)}e.b4t=s},RWt(t,s,e){const i=this.Af,r=i.b_t()?R2:null,n=(e=Math.floor(e),this.M4t(t.toLowerCase(),!1));if(!n)return console.warn(`[Construct] Call mapped function: map name '${t}' not found; call ignored`),r;let h=n.G4t.get(s.toLowerCase());if(!h){if(!n.b4t)return console.warn(`[Construct] Call mapped function: no function associated with map '${t}' string '${s}'; call ignored (consider setting a default)`),r;h=n.b4t,e=0}if(!h.pu())return r;if(0!==h.NL())return console.warn(`[Construct] Call mapped function: map '${t}' string '${s}' has a return type so cannot be called`),r;const o=i.RL(),a=o.OL(),l=a.PL(),c=0<l.length,u=(c&&(h.DL()?o.cU(l):o.rpt(l)),[]),f=o.Qpt(a);if(f){const p=f.tCt();for(let t=e,s=p.length;t<s;++t)u.push(p[t].Wit())}const d=h.tCt();for(let t=u.length,s=d.length;t<s;++t)u.push(d[t].i3t());return i.b_t()?this.P4t(o,h,u,c,l):this.v4t(o,h,u,c,l)}}}{const Xf=self.Bs;Xf.GJ.bJ.Cnt={MWt:function(t){return"string"==typeof t&&(t=parseInt(t,10),isNaN(t))&&(t=0),Math.floor(t)},float:function(t){return"string"==typeof t&&(t=parseFloat(t),isNaN(t))?0:t},N(t){return t.toString()},qt(t){return"string"==typeof t?t.length:0},random(t,s){return void 0===s?this.Af.TD()*t:this.Af.TD()*(s-t)+t},Y2t(...t){const s=Math.floor(this.Af.TD()*t.length);return t[s]},bWt(t,...s){return"number"!=typeof t&&(t=0),s[t=Xf.wn(Math.floor(t),0,s.length-1)]},pi(){return Math.PI},GWt(){return 1/0},sqrt(t){return Math.sqrt(t)},abs(t){return Math.abs(t)},round(t){return Math.round(t)},vWt(t,s){s=Math.max(Math.floor(s),0);const e=Math.pow(10,s);return Math.round((t+Number.EPSILON)*e)/e},floor(t){return Math.floor(t)},ceil(t){return Math.ceil(t)},sign(t){return Math.sign(t)},sin(t){return Math.sin(Xf.Mn(t))},cos(t){return Math.cos(Xf.Mn(t))},tan(t){return Math.tan(Xf.Mn(t))},asin(t){return Xf.bn(Math.asin(t))},acos(t){return Xf.bn(Math.acos(t))},atan(t){return Xf.bn(Math.atan(t))},exp(t){return Math.exp(t)},ts(t){return Math.log(t)},log10(t){return Math.log10(t)},max(...e){let i=e[0];"number"!=typeof i&&(i=0);for(let s=1,t=e.length;s<t;++s){let t=e[s];"number"==typeof t&&i<t&&(i=t)}return i},min(...e){let i=e[0];"number"!=typeof i&&(i=0);for(let s=1,t=e.length;s<t;++s){let t=e[s];"number"==typeof t&&i>t&&(i=t)}return i},wn(t,s,e){return Xf.wn(t,s,e)},Ot(t,s,e,i){return Xf.Pn(t,s,e,i)},angle(t,s,e,i){return Xf.bn(Xf.xn(t,s,e,i))},$t(t,s,e){return Xf.$t(t,s,e)},Wn(t,s,e){return Xf.Wn(t,s,e)},Vn(t,s,e,i){return Xf.Vn(t,s,e,i)},Un(t,s,e,i,r){return Xf.Un(t,s,e,i,r)},jn(t,s,e){return Xf.jn(t,s,e)},PWt(t,s){return Xf.bn(Xf.Ln(Xf.Mn(t),Xf.Mn(s)))},OWt(t,s,e){return Xf.bn(Xf.Fn(Xf.Mn(t),Xf.Mn(s),e))},xWt(t,s,e){return Xf.bn(Xf.Dn(Xf.Mn(t),Xf.Mn(s),Xf.Mn(e)))},LWt(t,s,e){return(t|=0)&~(1<<(s|=0))|(e=0!==e?1:0)<<s},DWt(t,s){return(t|=0)^1<<(0|s)},NWt(t,s){return(t|=0)&1<<(0|s)?1:0},FWt(){return"\n"},$Wt(t){return"string"==typeof t?t.toUpperCase():""},kWt(t){return"string"==typeof t?t.toLowerCase():""},left(t,s){return"string"==typeof t?t.substr(0,s):""},mid(t,s,e){return"string"!=typeof t?"":e<0?t.substr(s):t.substr(s,e)},right(t,s){return"string"==typeof t?t.substr(Math.max(t.length-s,0)):""},trim(t){return"string"==typeof t?t.trim():""},BWt(t,s,e){if("string"!=typeof t||"string"!=typeof e)return"";let i=t.split(e);return(s=Math.floor(s))<0||s>=i.length?"":i[s]},WWt(t,s){return"string"==typeof t&&"string"==typeof s&&t.length?t.split(s).length:0},find(t,s){return"string"==typeof t&&"string"==typeof s?t.search(new RegExp(Xf.di(s),"i")):-1},HWt(t,s){return"string"==typeof t&&"string"==typeof s?t.search(new RegExp(Xf.di(s),"")):-1},replace(t,s,e){return"string"==typeof t&&"string"==typeof s&&"string"==typeof e?t.replace(new RegExp(Xf.di(s),"gi"),e):"string"==typeof t?t:""},VWt(t,...e){let i=t;for(let t=0,s=e.length;t<s;++t)i=i.replaceAll(`{${t}}`,e[t].toString());return i},UWt(t,s,e){const i=this.u4t(s,e);return t?t.search(i):-1},jWt(t,s,e,i){const r=this.u4t(s,e);return t?t.replace(r,i):""},XWt(t,s,e){const i=this.f4t(t.toString(),s,e);return i?i.length:0},YWt(t,s,e,i){i=Math.floor(i);const r=this.f4t(t.toString(),s,e);return!r||i<0||i>=r.length?"":r[i]},qWt(t,s){let e=t<0?"-":"",i=s-(t=t<0?-t:t).toString().length;return(e+="0".repeat(Math.max(i,0)))+t.toString()},KWt(t){return encodeURIComponent(t)},zWt(t){return decodeURIComponent(t)},dt(){return this.Af.J9()},JWt(){return this.Af.Q9()},timescale(){return this.Af.ZL()},QWt(){return(Date.now()-this.Af.Qkt())/1e3},ZWt(){return Date.now()},time(){return this.Af.zL()},tickcount(){return this.Af.Ytt()},tHt(){return this.Af.sBt()},fps(){return this.Af.sD()},sHt(){return this.Af.nD()},eHt(){return this.Af.oD()},iHt(){return this.Af.QN().hF()},rHt(){return this.Af.QN().aF()},nHt(){return this.Af.fL()},hHt(){return this.Af.pL()},oHt(){return this.Af.fL()},aHt(){return this.Af.pL()},lHt(){return this.Af.HD().T$()},cHt(){return this.Af.HD().E$()},uHt(){return this.Af.HD().pf()},fHt(){return this.Af.HD().S$()},dHt(){return Xf.bn(this.Af.HD().GetAngle())},pHt(){return this.Af.HD().AC()},CHt(){return this.Af.HD().OC()},mHt(){return 100*this.Af.HD().Dq()},gHt(){return 100*this.Af.HD().Nq()},SHt(t){const s=this.Af.HD().jD(t);return s?s.Lq().Nl():0},yHt(t){const s=this.Af.HD().jD(t);return s?s.Lq().Fl():0},_Ht(t){const s=this.Af.HD().jD(t);return s?s.Lq().$l():0},THt(t){const s=this.Af.HD().jD(t);return s?s.Lq().kl():0},AHt(t){const s=this.Af.HD().jD(t);return s?s.Lq().width():0},EHt(t){const s=this.Af.HD().jD(t);return s?s.Lq().height():0},IHt(t){const s=this.Af.HD().jD(t);if(s){const e=s.Lq();return(e.Nl()+e.$l())/2}return 0},wHt(t){const s=this.Af.HD().jD(t);if(s){const e=s.Lq();return(e.Fl()+e.kl())/2}return 0},RHt(t,s,e){const i=this.Af.HD().jD(t);return i?i.Dk(s,e)[0]:0},MHt(t,s,e){const i=this.Af.HD().jD(t);return i?i.Dk(s,e)[1]:0},bHt(t,s,e){const i=this.Af.HD().jD(t);return i?i.kk(s,e)[0]:0},GHt(t,s,e){const i=this.Af.HD().jD(t);return i?i.kk(s,e)[1]:0},vHt(t,s,e,i){const r=this.Af.HD(),n=r.jD(t),h=r.jD(s);if(!n||!h||n===h)return e;const[o,a]=n.kk(e,i);return h.Dk(o,a)[0]},PHt(t,s,e,i){const r=this.Af.HD(),n=r.jD(t),h=r.jD(s);if(!n||!h||n===h)return i;const[o,a]=n.kk(e,i);return h.Dk(o,a)[1]},OHt(t){const s=this.Af.HD().jD(t);return s?s.pk():0},xHt(t){const s=this.Af.HD().jD(t);return s?Xf.bn(s.gk()):0},LHt(t){const s=this.Af.HD().jD(t);return s?100*s.VG():0},DHt(t){const s=this.Af.HD().jD(t);return s?s.mk():0},NHt(t){const s=this.Af.HD().jD(t);return s?s.T$():0},FHt(t){const s=this.Af.HD().jD(t);return s?s.E$():0},$Ht(t){const s=this.Af.HD().jD(t);return s?100*s.yk():0},kHt(t){const s=this.Af.HD().jD(t);return s?100*s.Tk():0},BHt(t){const s=this.Af.HD().jD(t);return s?s.Wy():0},WHt(t){const s=this.Af.HD().jD(t);return s?s.Yx():-1},HHt(){const t=this.Af.QN();return t?t.XDt():""},VHt(t){const s=this.o0t;if(!s.i0t())return 0;if(t){const e=s.n0t(t);return e?e.Yx():0}return s.s0t().Yx()},UHt(){return this.Af.mBt()},jHt(t,s,...e){const i=this.M4t(t.toLowerCase(),!1);if(!i)return console.warn(`[Construct] Call mapped function: map name '${t}' not found; returning 0`),0;let r=i.G4t.get(s.toLowerCase());if(!r){if(!i.b4t)return console.warn(`[Construct] Call mapped function: no function associated with map '${t}' string '${s}'; returning 0 (consider setting a default)`),0;r=i.b4t}const n=r.NL(),h=r.bL();if(0===n)return console.warn(`[Construct] Call mapped function: map '${t}' string '${s}' has no return type so cannot be called from an expression; returning 0`),0;if(!r.pu())return h;const o=this.Af,a=o.RL(),l=a.OL(),c=l.PL(),u=0<c.length,f=(u&&(r.DL()?a.cU(c):a.rpt(c)),r.tCt());for(let t=e.length,s=f.length;t<s;++t)e.push(f[t].i3t());const d=r.vL(),p=d.LL(d.PL(),r.DL(),n,h,...e);return u&&a.fU(c),p},XHt(){return this.Af.Jx().SD()},YHt(){return this.EX()},renderer(){return this.Af.GDt()?"webgpu":"webgl"},qHt(){return this.Af.GDt()?this.Af.GDt().GetAdapterInfoString():this.Af.bDt().eP()},KHt(){let t=this.Af.JS().LS();return Math.round(100*t/1048576)/100},zHt(t,s,e){return Xf.Qn(t,s,e)},JHt(t,s,e){return Xf.th(t/100,s/100,e/100)},QHt(t,s,e,i){return Xf.Zn(t/100,s/100,e/100,i/100)},ZHt(t,s,e){return Xf.th(t/255,s/255,e/255)},tVt(t,s,e,i){return Xf.Zn(t/255,s/255,e/255,i/255)},sVt(){return this.Af.rL()},eVt(){return this.Af.hL()},iVt(){return this.Af.OL().xz().pf()},rVt(){return this.Af.OL().Jmt()}}}{const a=self.Bs;a.GJ.nVt=class extends a.AAt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.GJ.nVt.FRt=class extends d.hEt{constructor(t){super(t),this.hVt=null,this.C1=null}_n(){this.eJ(),super._n()}jAt(){this.TW().lN(this.Af)}async zz(t){const s=this.TW();this.C1=await s.Twt()}oVt(t,s,e,i){!this.hVt&&this.C1&&(this.hVt=new self.aVt(this),this.hVt.lVt(this.C1,t,s,e,i))}eJ(){this.hVt&&(this.hVt._n(),this.hVt=null)}cVt(){return this.hVt}}}{const m=self.Bs,n=0,o=1,p=2,q=3,r=4,s=5,t=6,u=7,v=8,w=m.yn(m.Rect),x=m.yn(m.Rect),y=m.yn(m.dc);m.GJ.nVt.Instance=class extends m.kEt{constructor(e,i){super(e),this.uVt=16,this.fVt=16,this.dVt=16,this.pVt=16,this.CVt=1,this.mVt=1,this.gVt=!0,this.SVt=null,i&&(this.uVt=i[n],this.fVt=i[o],this.dVt=i[p],this.pVt=i[q],this.CVt=i[r],this.mVt=i[s],this.gVt=!!i[v],this.UD().ek(!!i[t])),this.dEt.oVt(this.uVt,this.fVt,this.dVt,this.pVt)}_n(){super._n()}yVt(t){this.SVt=t}I_(t){const s=this.UD(),e=s.A4();this._Vt(t,e.ph(),e.Ch(),s.AC(),s.OC())}_Vt(t,s,e,i,r){let n=this.dEt.cVt();if(n||(this.dEt.oVt(this.uVt,this.fVt,this.dVt,this.pVt),n=this.dEt.cVt())){const h=n.TVt(),o=n.AVt(),a=Math.min(this.uVt,h),l=Math.min(this.fVt,h),c=Math.min(this.dVt,o),u=Math.min(this.pVt,o),f=h-l,d=o-u,p=this.gVt?1:0,C=this.CVt,m=this.mVt;if(0<a&&0<c&&this.EVt(t,n.KT(),0,0,a+p,c+p,s,e,a+p,c+p),0<l&&0<c&&this.EVt(t,n.KT(),f-p,0,l+p,c+p,s+i-l-p,e,l+p,c+p),0<l&&0<u&&this.EVt(t,n.KT(),f-p,d-p,l+p,u+p,s+i-l-p,e+r-u-p,l+p,u+p),0<a&&0<u&&this.EVt(t,n.KT(),0,d-p,a+p,u+p,s,e+r-u-p,a+p,u+p),0===C){const g=2===m?0:p;0<a&&c<d&&this.IVt(t,n.wVt(),s,e+c,a+g,r-c-u,0,0),0<l&&c<d&&this.IVt(t,n.RVt(),s+i-l-g,e+c,l+g,r-c-u,g,0),0<c&&a<f&&this.IVt(t,n.MVt(),s+a,e,i-a-l,c+g,0,0),0<u&&a<f&&this.IVt(t,n.bVt(),s+a,e+r-u-g,i-a-l,u+g,0,g)}else 1===C&&(0<a&&c<d&&this.EVt(t,n.KT(),0,c,a,d-c,s,e+c,a,r-c-u),0<l&&c<d&&this.EVt(t,n.KT(),f,c,l,d-c,s+i-l,e+c,l,r-c-u),0<c&&a<f&&this.EVt(t,n.KT(),a,0,f-a,c,s+a,e,i-a-l,c),0<u)&&a<f&&this.EVt(t,n.KT(),a,d,f-a,u,s+a,e+r-u,i-a-l,u);c<d&&a<f&&(0===m?this.IVt(t,n.GVt(),s+a,e+c,i-a-l,r-c-u,0,0):1===m&&this.EVt(t,n.KT(),a,c,f-a,d-c,s+a,e+c,i-a-l,r-c-u))}}EVt(t,s,e,i,r,n,h,o,a,l){const c=s.AC(),u=s.OC();if(t.qG(s),w.set(h,o,h+a,o+l),x.set(e/c,i/u,(e+r)/c,(i+n)/u),null===this.SVt){const f=this.UD(),d=f.A4(),p=d.ph(),C=d.Ch();w.offset(-p,-C),y.$c(w,f.GetAngle()),y.offset(p,C),t.qg(y,x)}else this.SVt(w,x)}IVt(t,s,e,i,r,n,h,o){const a=s.AC(),l=s.OC();if(t.qG(s),w.set(e,i,e+r,i+n),x.set(-h/a,-o/l,(r-h)/a,(n-o)/l),null===this.SVt){const c=this.UD(),u=c.A4(),f=u.ph(),d=u.Ch();w.offset(-f,-d),y.$c(w,c.GetAngle()),y.offset(f,d),t.qg(y,x)}else this.SVt(w,x)}YEt(){this.kft.TW()}Qnt(t){}rht(t,s){}}}{const Da=self.Bs;Da.GJ.nVt.MJ={}}{const Ea=self.Bs;Ea.GJ.nVt.pnt={vVt(t){this.UD().Iy(t),this.Af.JD()}}}{const Ga=self.Bs;Ga.GJ.nVt.Cnt={}}{let CloneDrawable2=function(t){const s=C33.Wo(t.width,t.height),e=s.getContext("2d");return e.drawImage(t,0,0),s};CloneDrawable=CloneDrawable2;const C33=self.Bs;self.aVt=class{constructor(t){this.dEt=t,this.Af=this.dEt.cN(),this.V_=null,this.PVt=null,this.OVt=null,this.xVt=null,this.LVt=null,this.DVt=null,this.qX=0,this.KX=0,this.kS=this.Af.JS(),this.t1=!1,this.LR=!1}_n(){this.kS.kM()||(this.kS.VT(this.V_),this.kS.VT(this.PVt),this.kS.VT(this.OVt),this.kS.VT(this.xVt),this.kS.VT(this.LVt),this.kS.VT(this.DVt)),this.V_=null,this.PVt=null,this.OVt=null,this.xVt=null,this.LVt=null,this.DVt=null,this.dEt=null,this.kS=null,this.LR=!0}Tn(){return this.LR}lVt(t,s,e,i,r){this.NVt(t,s,e,i,r)}FVt(){return!!this.V_}NVt(t,s,e,i,r){if(!this.LR){const n=t.width,h=t.height,o=(this.qX=n,this.KX=h,s=Math.min(Math.floor(s),n),e=Math.min(Math.floor(e),n),i=Math.min(Math.floor(i),h),n-e),a=h-(r=Math.min(Math.floor(r),h)),l=this.Af.CL(),c=this.Af.QN().JX();this.V_=this.kS.Lv(CloneDrawable2(t),{D_:l,N_:c}),s<o&&i<a&&(this.PVt=this.kS.Lv(this.$Vt(CloneDrawable2(t),s,i,o,a),{x_:"repeat",L_:"repeat",D_:l,N_:c})),0<s&&i<a&&(this.OVt=this.kS.Lv(this.$Vt(CloneDrawable2(t),0,i,s,a),{L_:"repeat",D_:l,N_:c})),0<e&&i<a&&(this.xVt=this.kS.Lv(this.$Vt(CloneDrawable2(t),o,i,n,a),{L_:"repeat",D_:l,N_:c})),0<i&&s<o&&(this.LVt=this.kS.Lv(this.$Vt(CloneDrawable2(t),s,0,o,i),{x_:"repeat",D_:l,N_:c})),0<r&&s<o&&(this.DVt=this.kS.Lv(this.$Vt(CloneDrawable2(t),s,a,o,h),{x_:"repeat",D_:l,N_:c}))}}$Vt(t,s,e,i,r){const n=i-s,h=r-e,o=C33.Wo(n,h),a=o.getContext("2d");return a.drawImage(t,s,e,n,h,0,0,n,h),o}TVt(){return this.qX}AVt(){return this.KX}KT(){return this.V_}GVt(){return this.PVt}wVt(){return this.OVt}RVt(){return this.xVt}MVt(){return this.LVt}bVt(){return this.DVt}}}{const a=self.Bs;a.GJ.Jrt=class extends a.AAt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs,e=self.zs,f=[],g=(d.GJ.Jrt.FRt=class extends d.hEt{constructor(t){super(t),this.vRt=t.CMt()}_n(){d.qh(this.vRt),super._n()}jAt(){for(const t of this.vRt)t.Pwt(this.Af)}zz(s){const e={D_:this.Af.CL()};return Promise.all(this.vRt.map(t=>t.Owt(s,e)))}eJ(){for(const t of this.vRt)t.xwt()}Zz(){this.kVt()}kVt(){for(const t of this.kft.ZF())t.N5().BVt()}kSt(t){d.GJ.Jrt.tAt(this,t)}Iyt(t){f.push({cEt:null,WVt:!1,instances:[]})}HVt(t,s,e){const i=f.at(-1);i.cEt=t,i.WVt=e,i.instances.push(s)}wyt(t){const s=f.pop(),e=s.cEt,i=s.WVt;if(e){const r=new Map;for(const n of s.instances)n.wbt(r,e,i);for(const[h,o]of r)h.s$().ldt(o)}}VVt(t){const s=this.qk()._Mt(t),e=this.cN(),i=s.Lwt(0);return i.TW().qU(e.JS(),{D_:e.CL()}).then(()=>this.kVt()),s}UVt(t){for(const s of this.kft.ZF())s.N5().jVt(t);this.qk().TMt(t)}XVt(t,s){const e=this.kft.SMt(t);if(!e)throw new Error(`cannot find animation name '${t}'`);let i=e.$wt(s);i<0&&(i+=e.fW()+1);const r=d.bwt.vwt(this.cN()),n=(e.Dwt(r,i),this.cN());r.TW().qU(n.JS(),{D_:n.CL()}).then(()=>this.kVt());for(const h of this.kft.ZF())h.N5().YVt();return r}qVt(t,s){const e=this.kft.SMt(t);if(!e)throw new Error(`cannot find animation name '${t}'`);if(1===e.fW())throw new Error(`cannot remove last frame from animation '${t}'`);let i=e.$wt(s);i<0&&(i+=e.fW()),e.Nwt(i);for(const r of this.kft.ZF())r.N5().YVt()}XAt(){return self.KVt}},new WeakMap);self.KVt=class extends self.HF{constructor(t){super(t),g.set(this,t.Eyt())}zVt(t){e.Mi(t);const s=g.get(this).qk().SMt(t);return s?s.kwt():null}JVt(){return g.get(this).qk().gMt().map(t=>t.kwt())}QVt(t){return e.Mi(t),g.get(this).VVt(t).kwt()}ZVt(t){e.Mi(t),g.get(this).UVt(t)}tUt(t,s){if(e.Mi(t),"number"!=typeof s&&"string"!=typeof s)throw new TypeError("invalid insert location");return g.get(this).XVt(t,s).mW()}sUt(t,s){if(e.Mi(t),"number"!=typeof s&&"string"!=typeof s)throw new TypeError("invalid insert location");g.get(this).qVt(t,s)}}}{const ea=self.Bs,fa=self.zs,ga=0,ha=1,ia=2,ja=3,ka=ea.yn(ea.Rect),la=ea.yn(ea.dc),ma=ea.yn(ea.ul),na=1,oa=2,pa=4,qa=(ea.GJ.Jrt.Instance=class extends ea.kEt{constructor(t,s){super(t);let e=!0,i="",r=0,n=!0;s&&(e=!!s[ga],i=s[ha],r=s[ia],n=s[ja]),this.eUt=this.kft.SMt(i)||this.kft.CMt()[0],this.iUt=ea.wn(r,0,this.eUt.fW()-1),this.rUt=this.eUt.Lwt(this.iUt);const h=this.rUt.TW(),o=(this.nUt=h.KT(),this.hUt=h.WM(),this.oUt=h.JEt(),this.VEt(),t.Ebt(oa,!0),t.Ebt(na,0<=this.eUt.nW()),this.aUt=Math.abs(this.eUt.nW()),this.lUt=this.eUt.lW(),this.cUt=ea.yn(ea.Ud),this.uUt=0,this.fUt=0,this.dUt="",this.pUt=-1,this.CUt="",this.mUt=0,this.UD());this.gUt=o.A4(),o.ek(e),o.B4(n),o.Pht(this.rUt.IW()),o.xht(this.rUt.RW()),o.CPt(this.rUt.NW()),o.u4(),1===this.kft.mMt()&&1===this.kft.CMt()[0].fW()||0===this.aUt||this.vEt()}_n(){this.eUt=null,this.rUt=null,this.nUt=null,this.cUt=null,super._n()}YEt(){return this.rUt.TW()}ket(){return!0}zX(){this.nUt=null}XEt(){this.BVt()}I_(t){const s=this.nUt;if(null!==s){t.qG(s);const e=this.UD();e.b5()?this.SUt(e,t):this.yUt(e,t)}}yUt(t,s){let e=this.gUt;this.Af.gL()&&(e=t.aPt(e)),s.hv(e,this.oUt)}SUt(s,t){const e=s.RPt();if(s.bPt()){s.nPt(ka,la,!1);let t=la;this.Af.gL()&&(t=s.aPt(t)),e.E_(s.G5(),t,this.oUt),s.MPt(!1)}e.I_(t)}_Ut(){return this.cUt.oe()}TUt(){return this.Ge.Ibt(oa)}AUt(t){this.Ge.Ebt(oa,t)}EUt(){return this.Ge.Ibt(na)}IUt(t){this.Ge.Ebt(na,t)}wUt(){return this.Ge.Ibt(pa)}RUt(t){this.Ge.Ebt(pa,t)}Z9(){this.CUt&&this.MUt(),0<=this.pUt&&this.bUt();const t=this.aUt;if(this.TUt()&&0!==t){const s=this.Af.YL(this.Ge),e=(this.cUt.Mu(s),this._Ut()),i=this.rUt,r=i.AW()/t;if(!(e<this.uUt+r)){const n=this.eUt,h=this.lUt,o=n.fW(),a=n.oW(),l=n.hW(),c=n.uW(),u=(this.EUt()?this.iUt++:this.iUt--,this.uUt+=r,this.iUt>=o&&(c?(this.IUt(!1),this.iUt=o-2):!l&&(this.fUt++,this.fUt>=a)?this.GUt(!1):this.iUt=h),this.iUt<0&&(c?(this.iUt=1,this.IUt(!0),l||(this.fUt++,this.fUt>=a&&this.GUt(!0))):!l&&(this.fUt++,this.fUt>=a)?this.GUt(!0):this.iUt=h),this.iUt=ea.wn(this.iUt,0,o-1),n.Lwt(this.iUt));e>this.uUt+u.AW()/t&&(this.uUt=e),this.vUt(i,u)}}else this.pEt()}GUt(t){this.iUt=t?0:this.eUt.fW()-1,this.AUt(!1),this.dUt=this.eUt.pf(),this.RUt(!0),this.lEt("animationend",!1,{animationName:this.dUt}),this.LB(ea.GJ.Jrt.MJ.PUt),this.LB(ea.GJ.Jrt.MJ.OUt),this.RUt(!1),this.fUt=0}vUt(e,i,t){if(e!==i){const s=this.UD(),r=e.TW(),n=i.TW(),h=r.AC(),o=r.OC(),a=n.AC(),l=n.OC(),c=(t&&t.onFrameChange?t.onFrameChange(s,h,o,a,l):(h!==a&&s.GC(s.AC()*(a/h)),o!==l&&s.EC(s.OC()*(l/o))),s.Pht(i.IW()),s.xht(i.RW()),s.CPt(i.NW()),s.u4(),this.rUt=i,this.nUt=n.KT(),this.hUt=n.WM(),this.oUt=n.JEt(),this.fH().jrt());for(let t=0,s=c.length;t<s;++t)c[t].FIt(e,i);this.lEt("framechange",!1,{animationName:this.eUt.pf(),xUt:this.iUt}),this.LB(ea.GJ.Jrt.MJ.LUt),this.Af.JD()}}DUt(t){this.AUt(!0),this.uUt=this._Ut(),1===t&&0!==this.iUt&&(this.pUt=0,this.wUt()||this.bUt()),this.vEt()}NUt(t,s,e){this.CUt=t,this.mUt=s,this.vEt(),!e&&this.wUt()||this.MUt()}FUt(){return this.eUt}$Ut(){return this.CUt||this.eUt.pf()}jVt(t){ea.wr(t,this.$Ut())&&this.NUt(this.kft.AMt().pf(),1,!0)}kUt(t){if("string"==typeof t)if(String(Number(t))===t)t=Number(t);else{const s=this.kft.SMt(this.$Ut());if(!s)return;if(-1===(t=s.Fwt(t)))return}isFinite(t)&&(this.pUt=t,this.wUt()||this.bUt())}YVt(){if(!this.CUt&&-1===this.pUt){const t=this.rUt,s=this.eUt.Lwt(ea.wn(this.iUt,0,this.eUt.fW()-1));t!==s&&this.vUt(t,s),1<this.eUt.fW()&&0<this.aUt&&this.vEt()}}BUt(){return this.iUt}WUt(){return this.rUt.BW()}HUt(t){this.aUt=Math.abs(t),this.IUt(0<=t),0<this.aUt&&this.vEt()}VUt(){return this.EUt()?this.aUt:-this.aUt}UUt(t){"string"==typeof t&&-1===(t=this.eUt.Fwt(t))||(t=ea.wn(Math.floor(t),0,this.eUt.fW()-1),this.lUt=t)}jUt(){return this.lUt}MUt(t){const s=this.rUt,e=this.kft.SMt(this.CUt);if(this.CUt="",e&&(e!==this.eUt||!this.TUt())){this.eUt=e,this.IUt(0<=e.nW()),this.aUt=Math.abs(e.nW()),this.lUt=e.lW(),this.iUt=ea.wn(this.iUt,0,this.eUt.fW()-1),1===this.mUt&&(this.iUt=0),this.AUt(!0),this.uUt=this._Ut();const i=this.eUt.Lwt(this.iUt);this.vUt(s,i,t)}}bUt(t){const s=this.rUt,e=this.iUt;if(this.iUt=ea.wn(Math.floor(this.pUt),0,this.eUt.fW()-1),this.pUt=-1,t||e!==this.iUt){const i=this.eUt.Lwt(this.iUt);this.vUt(s,i),this.uUt=this._Ut()}}BVt(){const t=this.rUt.TW();this.nUt=t.KT(),this.hUt=t.WM(),this.oUt=t.JEt(),this.UD().MPt(!0)}KT(){return this.nUt}WM(){return this.hUt}JEt(){return this.oUt}GW(){return this.rUt.GW()}kyt(t){let s=this.rUt,e=this.UD(),i=null;if("string"==typeof t)i=s.LW(t);else{if("number"!=typeof t)throw new TypeError("expected string or number");i=s.xW(t-1)}let r=e.S4();if(!i)return[e.Ny(),e.ky(),r];if(ma.I(i.zwt()),e.b5()){const[n,h,o]=e.G5().v_(ma.ml(),ma.Sl());ma.set(n,h),r+=o}return ma.offset(-s.IW(),-s.RW()),ma.scale(e.AC(),e.OC()),ma.rotate(e.GetAngle()),ma.offset(e.Ny(),e.ky()),[ma.ml(),ma.Sl(),r]}XUt(){return this.UD()._Pt().eu()}YUt(t){t=Math.floor(t);const s=this.UD(),e=s._Pt(),i=e.eu();if((t=t===i?0:t)<0||i<=t)return[0,0];const r=e.su();return[r[2*t+0]+s.Ny(),r[2*t+1]+s.ky()]}LEt(){const s=ea.GJ.Jrt.pnt,t="plugins.sprite.debugger.animation-properties";return[{title:t+".title",properties:[{name:t+".current-animation",value:this.eUt.pf(),qUt:t=>this.NEt(s.KUt,t,0)},{name:t+".current-frame",value:this.iUt,qUt:t=>this.NEt(s.zUt,t)},{name:t+".is-playing",value:this.TUt(),qUt:t=>t?this.NEt(s.JUt,0):this.NEt(s.QUt)},{name:t+".speed",value:this.aUt,qUt:t=>this.NEt(s.ZUt,t)},{name:t+".repeats",value:this.fUt,qUt:t=>this.fUt=t}]}]}Ky(){const t={a:this.eUt.gq()},s=(0!==this.uUt&&(t.fs=this.uUt),this._Ut()),e=(0!==s&&(t.at=s),0!==this.iUt&&(t.f=this.iUt),0!==this.aUt&&(t.cas=this.aUt),1!==this.fUt&&(t.ar=this.fUt),0!==this.lUt&&(t.rt=this.lUt),this.TUt()||(t.ap=this.TUt()),this.EUt()||(t.af=this.EUt()),this.UD());return e.F4()&&(t.ce=e.F4()),t}zy(t){const s=this.qk().yMt(t.a),e=(s&&(this.eUt=s),this.uUt=t.hasOwnProperty("fs")?t.fs:0,this.cUt.Set(t.hasOwnProperty("at")?t.at:0),t.hasOwnProperty("f")?t.f:0),i=(this.iUt=ea.wn(e,0,this.eUt.fW()-1),this.aUt=t.hasOwnProperty("cas")?t.cas:0,this.fUt=t.hasOwnProperty("ar")?t.ar:1,t.hasOwnProperty("rt")?t.rt:0),r=(this.lUt=ea.wn(i,0,this.eUt.fW()-1),this.AUt(!t.hasOwnProperty("ap")||!!t.ap),this.IUt(!t.hasOwnProperty("af")||!!t.af),this.eUt.Lwt(this.iUt)),n=(this.rUt=r,this.BVt(),this.UD());n.Pht(r.IW()),n.xht(r.RW()),n.CPt(r.NW()),n.B4(!!t.ce),this.TUt()&&this.vEt()}Qnt(t){const s=this.UD();switch(t){case ja:return s.F4();case ia:return ea.wn(this.iUt,0,this.eUt.fW()-1);case ha:return this.eUt.pf()}}rht(t,s,e){const i=this.UD();switch(t){case ja:i.B4(!!s);break;case ia:{this.AUt(!1);const r=this.eUt.fW()-1,n=s=ea.wn(s,0,r),h=this.eUt.Lwt(this.iUt),o=this.eUt.Lwt(n);this.vUt(h,o,e),this.iUt=ea.wn(n,0,r);break}case ha:{this.CUt=s,this.MUt(e);const a=this.eUt.fW();1<a&&0<this.eUt.nW()?this.vEt():this.pEt();break}}}XAt(){return self.tjt}},new WeakMap),ra=new Map([["current-frame",0],["beginning",1]]);self.tjt=class extends self.P5{constructor(){super(),qa.set(this,self.Xk.Jk().N5())}bW(){return qa.get(this).GW()}vW(t){return this.PW(t)[0]}OW(t){return this.PW(t)[1]}sjt(t){return this.PW(t)[2]}PW(t){if("string"!=typeof t&&"number"!=typeof t)throw new TypeError("expected string or number");return qa.get(this).kyt(t)}DW(){return qa.get(this).XUt()}FW(t){return fa.Ei(t),qa.get(this).YUt(t)[0]}kW(t){return fa.Ei(t),qa.get(this).YUt(t)[1]}$W(t){return fa.Ei(t),qa.get(this).YUt(t)}ejt(){qa.get(this).AUt(!1)}ijt(t="current-frame"){fa.Mi(t);const s=ra.get(t);if(void 0===s)throw new Error("invalid mode");qa.get(this).DUt(s)}rjt(t,s="beginning"){fa.Mi(t),fa.Mi(s);const e=ra.get(s);if(void 0===e)throw new Error("invalid mode");const i=qa.get(this);if(!i.qk().SMt(t))throw new Error(`animation name "${t}" does not exist`);i.NUt(t,e)}zVt(t){fa.Mi(t);const s=qa.get(this).qk().SMt(t);return s?s.kwt():null}get animation(){return qa.get(this).FUt().kwt()}get animationName(){return qa.get(this).$Ut()}set xUt(t){fa.Ei(t),qa.get(this).kUt(t)}get xUt(){return qa.get(this).BUt()}set njt(t){fa.Mi(t),qa.get(this).kUt(t)}get njt(){return qa.get(this).WUt()}set hjt(t){fa.Ei(t),qa.get(this).HUt(t)}get hjt(){return qa.get(this).VUt()}set ojt(t){fa.Ei(t),qa.get(this).UUt(t)}get ojt(){return qa.get(this).jUt()}get imageWidth(){return qa.get(this).YEt().AC()}get imageHeight(){return qa.get(this).YEt().OC()}ajt(){const t=qa.get(this).YEt();return[t.AC(),t.OC()]}async ljt(t){fa.hr(t,Blob);const s=qa.get(this),e=s.cN(),i=s.YEt(),r=ea.yn(ea.twt);if(r.pwt(e,t),await r.qU(e.JS(),{D_:e.CL()}),s.Tn())r._n();else{i.Cwt(r);const n=s.Eyt();n.kVt(),n.qk().ed().dispatchEvent(new ea.Event("animationframeimagechange")),e.JD()}}cjt(t,s){fa.Mi(s),qa.get(this).UD().iPt(!!t,s)}}}{const Vb=self.Bs;Vb.GJ.Jrt.MJ={ujt(t){return Vb.wr(this.$Ut(),t)},fjt(t,s){return Vb.compare(this.iUt,t,s)},djt(t,s){if("string"!=typeof s)return!1;const e=this.rUt.BW();return Vb.compare(e.toLowerCase(),t,s.toLowerCase())},pjt(t,s){return Vb.compare(this.VUt(),t,s)},OUt(t){return Vb.wr(this.dUt,t)},PUt(){return!0},LUt(){return!0},Cjt(){return this.UD().AC()<0},mjt(){return this.UD().OC()<0},gjt(){return!0},Sjt(){return!0},F4(){return this.UD().F4()}}}{const d1=self.Bs;d1.GJ.Jrt.pnt={yjt(t,s,e,i,r){if(t&&s){const[n,h]=this.kyt(e),o=this.Af.n$(t,s,n,h,i,r);if(o){if(i&&s.h$(o),t.UF().IF()){const l=o.UD();l.y$(this.UD().GetAngle()),l.u4()}const a=this.Af.RL();a.o$(!0),o.a$(),a.o$(!1),t!==this.Af.o3t().qk()&&this.dEt.HVt(t,o,i)}}},QUt(){this.AUt(!1)},JUt(t){this.DUt(t)},KUt(t,s){this.NUt(t,s)},zUt(t){this.kUt(t)},ZUt(t){this.HUt(t)},_jt(t){this.UUt(t)},Tjt(s,t){try{0===s?this.Eyt().VVt(t):this.Eyt().UVt(t)}catch(t){console.error(`[Construct] Error ${0===s?"adding":"removing"} animation: `,t)}},Ajt(s,t,e){try{0===s?this.Eyt().XVt(t,e):this.Eyt().qVt(t,e)}catch(t){console.error(`[Construct] Error ${0===s?"adding":"removing"} animation frame: `,t)}},Ejt(t){const s=this.UD(),e=s.AC(),i=Math.abs(e)*(0===t?-1:1);e!==i&&(s.GC(i),s.u4())},Ijt(t){const s=this.UD(),e=s.OC(),i=Math.abs(e)*(0===t?-1:1);e!==i&&(s.EC(i),s.u4())},g$(t){const s=this.rUt,e=s.TW(),i=this.UD(),r=i.AC()<0?-1:1,n=i.OC()<0?-1:1,h=e.AC()*t*r,o=e.OC()*t*n;i.AC()===h&&i.OC()===o||(i.cM(h,o),i.u4())},async wjt(t,s,e){const i=this.rUt,r=i.TW(),n=this.UD(),h=this.Af,o=this.dEt;if(r.mX()===t)0===s&&(n.cM(r.AC(),r.OC()),n.u4()),this.LB(d1.GJ.Jrt.MJ.gjt);else{const a=d1.yn(d1.twt);try{if(await a.dwt(h,t),!a.UX())throw new Error("image failed to load");if(this.Tn())return void a._n();await a.qU(h.JS(),{D_:h.CL()})}catch(t){return console.error("Load image from URL failed: ",t),void(this.Tn()||this.LB(d1.GJ.Jrt.MJ.Sjt))}this.Tn()?a._n():(r.Cwt(a),o.kVt(),o.qk().ed().dispatchEvent(new d1.Event("animationframeimagechange")),h.JD(),0===s&&(n.cM(r.AC(),r.OC()),n.u4()),await this.NB(d1.GJ.Jrt.MJ.gjt))}},Rjt(t){this.UD().B4(t)},iPt(t,s){this.UD().iPt(0===t,s)},vVt(t){this.UD().Iy(t),this.Af.JD()}}}{const dc=self.Bs;dc.GJ.Jrt.Cnt={Mjt(){return this.BUt()},bjt(){return this.WUt()},Gjt(){return this.eUt.fW()},vjt(){return this.eUt.pf()},Pjt(){return this.VUt()},Ojt(){return this.eUt.nW()},xjt(t){return this.kyt(t)[0]},Ljt(t){return this.kyt(t)[1]},Djt(t){return this.kyt(t)[2]},Njt(){return this.GW()},Fjt(){return this.YEt().AC()},$jt(){return this.YEt().OC()},kjt(t){return this.YUt(t)[0]},Bjt(t){return this.YUt(t)[1]},Wjt(){return this.XUt()}}}{const a=self.Bs;a.GJ.Hjt=class extends a.AAt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.GJ.Hjt.FRt=class extends d.hEt{constructor(t){super(t),this.Vjt=d.yn(self.Ujt)}_n(){super._n()}jAt(){this.TW().lN(this.Af)}zz(t){return this.TW().qU(t,{D_:this.Af.CL()})}eJ(){this.TW().PR()}jjt(){return this.Vjt}Xjt(t,s,e,i){const r=this.TW(),n=this.Vjt;n.GC(r.AC()),n.EC(r.OC()),n.Yjt(t),n.qjt(s),n.Kjt(e),n.zjt(i),n.Jjt()}}}{const n=self.Bs,o=self.zs,p=n.yn(n.ul),q=0,r=1,s=2,t=3,u=4,v=5,w=6,x=7,y=8,z=9,A=10,B=11,C=12,D=13,E=14,F=["left","center","right"],G=["top","center","bottom"],H=["word","cjk","character"],I=(n.GJ.Hjt.Instance=class extends n.kEt{constructor(t,s){super(t),this.Ef="",this.Qjt=!0,this.Zjt=16,this.tXt=16,this.sXt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,;:?!-_~#\"'&()[]|`\\/@°+=*$£€<>";let e="";if(this.eXt=1,this.iXt=0,this.Yw=0,this.sR=0,this.eR=0,this.nR="word",this.rXt=!0,this.nXt=!1,this.hXt=null,this.oXt=null,this.aXt=-1,this.lXt=-1,this.cXt=0,s){this.Ef=s[0],this.Qjt=s[1],this.Zjt=s[2],this.tXt=s[3],this.sXt=s[4],e=s[5],this.eXt=s[6],this.iXt=s[7],this.Yw=s[8],this.sR=s[9],this.eR=s[10],this.nR=H[s[11]];const r=this.UD();r.ek(s[12]),this.nXt=!!s[E]}this.dEt.Xjt(this.Zjt,this.tXt,this.sXt,e),this.oXt=n.yn(self.uXt,this.dEt.jjt());const i=this.UD();this.oXt.cM(i.AC(),i.OC()),this.fXt(),this.dXt(),this.Ge.mbt()}_n(){this.pXt(),this.hXt&&(this.hXt._n(),this.hXt=null),this.oXt._n(),this.oXt=null,super._n()}fXt(){const t=this.oXt;t&&(t.FR(this.Qjt),t.Rf(this.Ef),t.nM(this.nR),t.CXt(F[this.sR]),t.mXt(G[this.eR]),t.gXt(this.iXt),t.VR(this.Yw))}SXt(){const t=this.UD();this.oXt.cM(t.AC(),t.OC()),this.oXt.g$(this.eXt)}dXt(){if(this.nXt){let t=this.Ef;this.Qjt&&(t=n.kr.pC(t)),this.hXt?this.hXt.Rf(t):this.hXt=n.yn(n.Tf,this.Af,t)}else this.hXt&&(this.hXt._n(),this.hXt=null)}I_(i){const r=this.kft.TW(),n=r.KT();if(n){i.qG(n);let t=this.UD(),s=t.A4(),e=this.oXt;e.g$(this.eXt),e.yXt(t.Ivt()),this.Af.gL()&&(s=t.aPt(s)),e.cM(t.AC(),t.OC()),e.jjt()._Xt(r.WM()),e.wy(t.R4()),e.I_(i,s.ph(),s.Ch(),t.GetAngle()),this.rXt=!1}}Ky(){const t={t:this.Ef,ebbc:this.Qjt,csc:this.eXt,csp:this.iXt,lh:this.Yw,ha:this.sR,va:this.eR,w:this.nR,cw:this.dEt.jjt().TXt(),ch:this.dEt.jjt().AXt(),cs:this.dEt.jjt().EXt(),sd:this.dEt.jjt().IXt()};return-1!==this.lXt&&(t.tw={st:this.aXt,en:this.lXt,l:this.cXt}),t}zy(t){if(this.pXt(),this.Ef=t.t,this.Qjt=t.ebbc,this.eXt=t.csc,this.iXt=t.csp,this.Yw=t.lh,this.sR=t.ha,this.eR=t.va,t.hasOwnProperty("w")){const e=t.w;this.nR="boolean"==typeof e?e?"word":"character":e}else this.nR="word";if(t.hasOwnProperty("tw")){const i=t.tw;this.aXt=i.st,this.lXt=i.en,this.cXt=t.l}const s=this.dEt.jjt();s.Yjt(t.cw),s.qjt(t.ch),s.Kjt(t.cs),s.zjt(t.sd),this.fXt(),this.dXt(),-1!==this.lXt&&this.vEt()}Qnt(e){switch(e){case q:return this.lM();case r:return this.Qjt;case s:return this.dEt.jjt().TXt();case t:return this.dEt.jjt().AXt();case u:return this.dEt.jjt().EXt();case v:return this.dEt.jjt().IXt();case w:return this.wXt();case x:return this.RXt();case y:return this.MXt();case z:return this.bXt();case A:return this.GXt();case B:return this.vXt()}}rht(e,i){switch(e){case q:this.PXt(i);break;case r:this.Qjt!==!!i&&(this.Qjt=!!i,this.fXt());break;case s:this.dEt.jjt().Yjt(i);break;case t:this.dEt.jjt().qjt(i);break;case u:this.dEt.jjt().Kjt(i);break;case v:this.dEt.jjt().zjt(i);break;case w:this.OXt(i);break;case x:this.xXt(i);break;case y:this.LXt(i);break;case z:this.DXt(i);break;case A:this.NXt(i);break;case B:this.FXt(i)}}PXt(t){this.Ef!==t&&(this.Ef=t,this.oXt.Rf(t),this.dXt(),this.Af.JD())}lM(){return this.Ef}$Xt(t,s){this.PXt(t),this.aXt=this.Af.QL(),this.lXt=this.aXt+s/this.fH().fB(),this.cXt=n.Dp(n.kr.pC(t)),this.oXt.zR(0),this.vEt()}pXt(){this.aXt=-1,this.lXt=-1,this.cXt=0,this.oXt.zR(-1),this.pEt()}kXt(){-1!==this.lXt&&(this.pXt(),this.LB(n.GJ.Hjt.MJ.BXt),this.Af.JD())}OXt(t){this.eXt!==t&&(this.eXt=t,this.oXt.g$(this.eXt),this.Af.JD())}wXt(){return this.eXt}xXt(t){this.iXt!==t&&(this.iXt=t,this.oXt.gXt(this.iXt),this.Af.JD())}RXt(){return this.iXt}LXt(t){this.Yw!==t&&(this.Yw=t,this.oXt.VR(this.Yw),this.Af.JD())}MXt(){return this.Yw}DXt(t){this.sR!==t&&(this.sR=t,this.fXt(),this.Af.JD())}bXt(){return this.sR}NXt(t){this.eR!==t&&(this.eR=t,this.fXt(),this.Af.JD())}GXt(){return this.eR}WXt(t){this.FXt(H[t])}FXt(t){this.nR!==t&&(this.nR=t,this.fXt(),this.Af.JD())}vXt(){return this.nR}HXt(t){this.nXt=!!t,this.dXt()}VXt(){return this.nXt}UXt(){return this.SXt(),this.oXt.fM()}jXt(){return this.SXt(),this.oXt.pM()}XXt(t,s){this.SXt();const e=this.UD(),i=(p.set(t-e.Ny(),s-e.ky()),p.rotate(-e.GetAngle()),p.offset(e.AC()*e.IW(),e.OC()*e.RW()),this.oXt.gM(p.ml(),p.Sl()));if(i){const r=i.Rm("tag");if(r)return r.param}return""}YXt(t,s,e){const i=this.XXt(s,e);return i&&n.wr(t,i)}qXt(t,s){this.SXt(),s=Math.floor(s);const e=this.oXt.yM(t,s);if(!e)return null;const i=this.UD();return p.set(e.Tm(),e.Em()),p.offset(-i.AC()*i.IW(),-i.OC()*i.RW()),p.rotate(i.GetAngle()),p.offset(i.Ny(),i.ky()),{x:p.ml(),y:p.Sl(),width:e.AC(),height:e.OC()}}KXt(t){return this.SXt(),this.oXt._M(t)}Z9(){const s=this.Af.QL();if(s>=this.lXt)this.pXt(),this.LB(n.GJ.Hjt.MJ.BXt),this.Af.JD();else{let t=n.Hn(this.aXt,this.lXt,s,0,this.cXt);(t=Math.floor(t))!==this.oXt.JR()&&(this.oXt.zR(t),this.Af.JD())}}LEt(){const t="plugins.spritefont2";return[{title:t+".name",properties:[{name:t+".properties.text.name",value:this.lM(),qUt:t=>this.PXt(t)},{name:t+".properties.scale.name",value:this.wXt(),qUt:t=>this.OXt(t)},{name:t+".properties.character-spacing.name",value:this.RXt(),qUt:t=>this.xXt(t)},{name:t+".properties.line-height.name",value:this.MXt(),qUt:t=>this.LXt(t)}]}]}XAt(){return self.zXt}},new WeakMap),J=new Map([["left",0],["center",1],["right",2]]),K=new Map([["top",0],["center",1],["bottom",2]]);self.zXt=class extends self.P5{constructor(){super(),I.set(this,self.Xk.Jk().N5())}get text(){return I.get(this).lM()}set text(t){o.Mi(t);const s=I.get(this);s.pXt(),s.PXt(t)}JXt(t,s){o.Mi(t),o.Ei(s);const e=I.get(this);e.pXt(),e.$Xt(t,s)}QXt(){I.get(this).kXt()}set ZXt(t){o.Ei(t),I.get(this).OXt(t)}get ZXt(){return I.get(this).wXt()}set t6t(t){o.Ei(t),I.get(this).xXt(t)}get t6t(){return I.get(this).RXt()}set lineHeight(t){o.Ei(t),I.get(this).LXt(t)}get lineHeight(){return I.get(this).MXt()}set dj(t){o.Mi(t);const s=J.get(t);if(void 0===s)throw new Error("invalid mode");I.get(this).DXt(s)}get dj(){return F[I.get(this).bXt()]}set verticalAlign(t){o.Mi(t);const s=K.get(t);if(void 0===s)throw new Error("invalid mode");I.get(this).NXt(s)}get verticalAlign(){return G[I.get(this).GXt()]}set pj(t){if(!H.includes(t))throw new Error("invalid mode");I.get(this).FXt(t)}get pj(){return I.get(this).vXt()}set s6t(t){I.get(this).HXt(!!t)}get s6t(){return I.get(this).VXt()}get Sj(){return I.get(this).UXt()}get yj(){return I.get(this).jXt()}e6t(){const t=I.get(this);return[t.UXt(),t.jXt()]}i6t(t,s,e){return o.Mi(t),o.Ei(s),o.Ei(e),I.get(this).YXt(t,s,e)}r6t(t,s){return o.Ei(t),o.Ei(s),I.get(this).XXt(t,s)}n6t(t,s=0){return o.Mi(t),o.Ei(s),I.get(this).qXt(t,s)}h6t(t){return o.Mi(t),I.get(this).KXt(t)}}}{const h0=self.Bs;h0.GJ.Hjt.MJ={o6t(t,s){return s?this.Ef===t:h0.wr(this.Ef,t)},a6t(){return-1!==this.lXt},BXt(){return!0},l6t(t,s,e){return this.YXt(t,s,e)}}}{const n0=self.Bs;n0.GJ.Hjt.pnt={Rf(t){this.pXt(),"number"==typeof t&&t<1e9&&(t=Math.round(1e10*t)/1e10),this.PXt(t.toString())},c6t(t){this.pXt(),(t=(t="number"==typeof t&&t<1e9?Math.round(1e10*t)/1e10:t).toString())&&this.PXt(this.Ef+t)},u6t(t,s){this.pXt(),"number"==typeof t&&t<1e9&&(t=Math.round(1e10*t)/1e10),this.$Xt(t.toString(),s)},f6t(){this.kXt()},g$(t){this.OXt(t)},d6t(t){this.xXt(t)},VR(t){this.LXt(t)},Yjt(t,s){let e=!1,i=this.dEt.jjt();for(const r of t)if(" "===r)i.p6t(s),e=!0;else{const n=i.C6t(r);n&&(n.m6t(s),e=!0)}e&&i.g6t(),this.Af.JD()},vVt(t){this.UD().Iy(t),this.Af.JD()},S6t(t){this.DXt(t)},y6t(t){this.NXt(t)},_6t(t){this.WXt(t)},T6t(t){this.HXt(t)}}}{const G0=self.Bs;G0.GJ.Hjt.Cnt={A6t(t){const s=this.dEt.jjt().C6t(t);return s?s.E6t():this.dEt.jjt().TXt()},I6t(){return this.tXt},w6t(){return this.eXt},R6t(){return this.iXt},M6t(){return this.Yw},Text(){return this.Ef},b6t(){return this.Qjt?G0.kr.pC(this.Ef):this.Ef},G6t(){return this.UXt()},v6t(){return this.jXt()},P6t(t,s){return this.XXt(t,s)},O6t(t){return this.KXt(t)},x6t(t,s){const e=this.qXt(t,s);return e?e.x:0},L6t(t,s){const e=this.qXt(t,s);return e?e.y:0},D6t(t,s){const e=this.qXt(t,s);return e?e.width:0},N6t(t,s){const e=this.qXt(t,s);return e?e.height:0}}}{const C33=self.Bs;self.F6t=class{constructor(t,s,e,i){let r=t.TXt(),n=t.AXt();this.Vjt=t,this.$6t=s,this.k6t=new C33.Rect(e,i,e+r,i+n),this.B6t=new C33.Rect,this.W6t=-1,this.H6t()}_n(){this.Vjt=null,this.k6t=null,this.B6t=null}H6t(){let t=this.Vjt.AC(),s=this.Vjt.OC();this.B6t.I(this.k6t),this.B6t.vt(t,s),this.B6t.fc(this.Vjt.WM())}jjt(){return this.Vjt}V6t(){return this.$6t}WM(){return this.B6t}m6t(t){this.W6t=t}E6t(){return this.W6t<0?this.Vjt.TXt():this.W6t}}}{let getOffsetParam2=function(t,s){t=t.trim();const e=parseFloat(t);return isFinite(e)?t.endsWith("%")?s*e/100:e:0},normalizeCssColorString2=function(t){return(canvasColorCtx=canvasColorCtx||C33.Wo(32,32).getContext("2d")).fillStyle="#FFFFFF",canvasColorCtx.fillStyle=t,canvasColorCtx.fillStyle},C33=(getOffsetParam=getOffsetParam2,normalizeCssColorString=normalizeCssColorString2,self.Bs),tmpRect=new C33.Rect,tmpQuad=new C33.dc,tmpColor=new C33.Zo,VALID_HORIZ_ALIGNMENTS=new Set(["left","center","right"]),VALID_VERT_ALIGNMENTS=new Set(["top","center","bottom"]),VALID_WORD_WRAP_MODES=new Set(["word","cjk","character"]),canvasColorCtx=null;self.uXt=class{constructor(t){this.Vjt=t,this.fR=0,this.dR=0,this.Ef="",this.Jw=!1,this.iR=null,this.rR=C33.yn(C33.CC),this.nR="word",this.oR=!1,this.aR=!1,this.sR="left",this.eR="top",this.Q6=1,this.U6t=1,this.j6t=0,this.Yw=0,this.Ty=C33.yn(C33.Zo),this.cR=-1,this.uR=0,this.RR=t=>this.MR(t),this.Vjt.X6t(this)}_n(){this.Vjt.Y6t(this),this.Ty=null,this.RR=null,this.rR.gu(),this.rR=null,this.Vjt=null,this.iR=null}MR(t){if(t.vC())return{width:0,height:0};const s=t.XC(),e=t.Rm("scale"),i=(e?parseFloat(e.param):this.Q6)*this.U6t,r=t.Rm("scalex"),n=(r?parseFloat(r.param):1)*i,h=t.Rm("scaley"),o=(h?parseFloat(h.param):1)*i,a=this.Vjt.AXt()*o+this.Yw,l=this.jjt(),c=l.TXt()*n,u=this.q6t();if(l.K6t()){let e=0,i=0;for(const f of s){let t=c,s=l.C6t(f);s?t=s.E6t()*n:" "===f&&(t=l.z6t()*n),i+=t,++e}return{width:i+e*u,height:a}}{const d=s.length,p=Math.max(d,0);return{width:c*d+p*u,height:a}}}NR(){this.aR=!0}Vw(){this.NR(),this.oR=!0,this.rR.gu()}cM(t,s){t<=0||s<=0||this.fR===t&&this.dR===s||(this.fR!==t?this.Vw():this.NR(),this.fR=t,this.dR=s)}zR(t){this.cR=Math.floor(t)}JR(){return this.cR}gM(t,s){this.dM();const e=this.rR.SC();for(const i of e)if(s>i.Em()&&s<i.Em()+i.OC())for(const r of i.$C())if(t>=r.Tm()&&t<r.Tm()+r.AC())return r;return null}*SM(t){this.dM();const s=this.rR.SC();for(const e of s)for(const i of e.$C()){const r=i.Rm("tag");r&&C33.wr(r.param,t)&&(yield i)}}yM(t,s){for(const e of this.SM(t)){if(0===s)return e;--s}return null}_M(t){let s=0;for(const e of this.SM(t))++s;return s}dM(){this.MM(),this.bM()}MM(){if(this.oR){!this.Jw||this.iR&&this.iR.toString()===this.Ef||(this.iR=new C33.kr(this.Ef,{zp:!0}));const t=-this.q6t();this.rR.CC(this.Jw?this.iR.oC():this.Ef,this.RR,this.fR,this.nR,t),this.oR=!1}}bM(){this.aR&&(this.GM(),this.aR=!1)}GM(){let e=0,i=this.Yw,r=C33.co(this.rR.SC());for(const s of r){s._m(NaN),s.Am(NaN);for(const n of s.$C())n._m(NaN),n.Am(NaN)}const t=r.reduce((t,s)=>t+s.OC(),0)-i;"center"===this.eR?e=Math.max(Math.floor(this.dR/2-t/2),0):"bottom"===this.eR&&(e=Math.floor(this.dR-t));for(let t=0,s=r.length;t<s;++t){const h=r[t],o=h.OC();if(0<t&&e>this.dR-(o-i))break;0<=e&&this.LM(h,e),e+=o}}LM(t,s){let e=0;"center"===this.sR?e=Math.max(Math.floor((this.fR-t.AC())/2),0):"right"===this.sR&&(e=Math.max(Math.floor(this.fR-t.AC()),0)),t._m(e),t.Am(s);for(const i of t.$C())i.vC()||(this.J6t(i,e,s),e+=i.AC())}J6t(t,s,e){const i=t.Rm("offsetx"),r=(s+=i?getOffsetParam2(i.param,t.OC()):0,t.Rm("offsety"));e+=r?getOffsetParam2(r.param,t.OC()):0,t._m(s),t.Am(e)}I_(t,s,e,i){this.dM(),this.uR=0;const r=C33.co(this.rR.SC()),n=Math.sin(i),h=Math.cos(i);for(const o of r)this.Q6t(t,o,s,e,n,h)}Q6t(t,s,e,i,r,n){const h=s.Tm(),o=s.Em();if(Number.isFinite(h)&&Number.isFinite(o)){const a=s.OC();for(const l of s.$C())this.FM(t,l,e,i,r,n,a)}}FM(o,a,l,c,u,f,d){let p=a.Tm(),C=a.Em();if(Number.isFinite(p)&&Number.isFinite(C)){let n=a.XC(),h=a.AC();if(-1!==this.cR){if(this.uR>=this.cR)return;this.uR+n.length>this.cR&&(n=n.slice(0,this.cR-this.uR),h=this.MR(a).width),this.uR+=n.length}const m=a.Rm("background");if(!(C33.op(n)&&!m||a.Mm("hide"))){const g=a.Rm("scale"),S=(g?parseFloat(g.param):this.Q6)*this.U6t,y=a.Rm("scalex"),_=(y?parseFloat(y.param):1)*S,T=a.Rm("scaley"),A=(T?parseFloat(T.param):1)*S,E=this.Vjt.AXt()*A,I=this.Yw;C+=d-I-E;let t=1,s=a.Rm("opacity"),e=(s&&(t=parseFloat(s.param)/100),m&&(o.ag(),tmpColor.ja(normalizeCssColorString2(m.param)),tmpColor.ma(tmpColor.Ta()*t*this.Ty.Ta()),tmpColor.Oa(),o.wy(tmpColor),tmpRect.set(p,C,p+h,C+E),tmpRect.$l()>this.fR&&tmpRect.Pl(this.fR),tmpQuad.kc(tmpRect,u,f),tmpQuad.offset(l,c),o.dc(tmpQuad),o.eg()),a.Rm("color")),i=(e?(tmpColor.ja(normalizeCssColorString2(e.param)),tmpColor.ma(this.Ty.Ta())):tmpColor.I(this.Ty),tmpColor.ma(tmpColor.Ta()*t),tmpColor.Oa(),o.wy(tmpColor),this.Vjt.TXt()*_),r=Math.abs(this.q6t());for(const w of n){const R=this.Vjt.C6t(w);if(R){const M=R.E6t()*_;if(p+M>this.fR+r+1e-5)return;tmpRect.set(p,C,p+i,C+E),tmpQuad.kc(tmpRect,u,f),tmpQuad.offset(l,c),o.qg(tmpQuad,R.WM()),p+=M+this.j6t}else p+=this.Vjt.z6t()*_+this.j6t}}}}jjt(){return this.Vjt}FR(t){this.Jw!==(t=!!t)&&(this.Jw=t,this.Vw())}Ww(){return this.Jw}Rf(t){this.Ef!==t&&(this.Ef=t,this.Vw())}nM(t){if(!VALID_WORD_WRAP_MODES.has(t))throw new Error("invalid word wrap mode");this.nR!==t&&(this.nR=t,this.Vw())}CXt(t){if(!VALID_HORIZ_ALIGNMENTS.has(t))throw new Error("invalid alignment");this.sR!==t&&(this.sR=t,this.NR())}mXt(t){if(!VALID_VERT_ALIGNMENTS.has(t))throw new Error("invalid alignment");this.eR!==t&&(this.eR=t,this.NR())}g$(t){this.Q6!==t&&(this.Q6=t,this.Vw())}S$(){return this.Q6}yXt(t){this.U6t!==t&&(this.U6t=t,this.Vw())}Ivt(){return this.U6t}gXt(t){this.j6t!==t&&(this.j6t=t,this.Vw())}q6t(){return this.j6t}VR(t){this.Yw=t,this.Vw()}UR(){return this.Yw}jG(t){t=C33.wn(t,0,1),this.Ty.a=t}wy(t){this.Ty.equals(t)||this.Ty.I(t)}YG(){return this.Ty}fM(){return this.dM(),this.rR.nm()}pM(){this.dM();const t=this.Vjt.AXt()*this.Q6,s=this.Yw,e=t+s;return this.rR.yC()*e-s}}}{const C33=self.Bs,SpriteFontText=self.uXt,DEFAULT_SPRITEFONT_OPTS={width:256,height:256,Z6t:16,tYt:16,characterSet:""};self.Ujt=class{constructor(t){if((t=Object.assign({},DEFAULT_SPRITEFONT_OPTS,t)).width<=0||t.height<=0||t.Z6t<=0||t.tYt<=0)throw new Error("invalid size");this.am=t.width,this.lm=t.height,this.Zjt=t.Z6t,this.tXt=t.tYt,this.sXt=t.characterSet,this.sYt="",this.eYt=null,this.iYt=!1,this.rYt=-1,this.B6t=new C33.Rect(0,0,1,1),this.nYt=new Map,this.hYt=!0,this.oYt=new Set}_n(){this.B6t=null,this.aYt(),this.nYt=null,this.oYt&&this.oYt.clear(),this.oYt=null}aYt(){for(let t of this.nYt.values())t._n();this.nYt.clear()}X6t(t){this.oYt.add(t)}Y6t(t){this.oYt.delete(t)}Jjt(){if(this.hYt){this.aYt();let s=C33.xp(this.sXt),r=Math.floor(this.am/this.Zjt),t=Math.floor(this.lm/this.tXt),e=r*t;for(let i=0,t=s.length;i<t&&!(i>=e);++i){let e=s[i];if(!this.nYt.has(e)){let t=i%r,s=Math.floor(i/r);this.nYt.set(e,C33.yn(self.F6t,this,e,t*this.Zjt,s*this.tXt))}}if(this.iYt=!1,this.rYt=-1,Array.isArray(this.eYt))for(let s of this.eYt)if(Array.isArray(s)&&2===s.length){let e=s[0],t=s[1];if("number"==typeof e&&isFinite(e)&&"string"==typeof t&&e!==this.Zjt)for(let s of t){let t=this.nYt.get(s);t?(t.m6t(e),this.iYt=!0):" "===s&&(this.rYt=e,this.iYt=!0)}}this.hYt=!1;for(let t of this.oYt)t.Vw()}}g6t(){this.iYt=!0;for(const t of this.oYt)t.Vw()}C6t(t){return this.Jjt(),this.nYt.get(t)||null}K6t(){return this.iYt}GC(t){if((t=Math.floor(t))<=0)throw new Error("invalid size");this.am!==t&&(this.am=t,this.hYt=!0)}AC(){return this.am}EC(t){if((t=Math.floor(t))<=0)throw new Error("invalid size");this.lm!==t&&(this.lm=t,this.hYt=!0)}OC(){return this.lm}_Xt(t){if(!this.B6t.equals(t)){this.B6t.I(t);for(const s of this.nYt.values())s.H6t()}}WM(){return this.B6t}Yjt(t){if((t=Math.floor(t))<=0)throw new Error("invalid size");this.Zjt!==t&&(this.Zjt=t,this.hYt=!0)}TXt(){return this.Zjt}qjt(t){if((t=Math.floor(t))<=0)throw new Error("invalid size");this.tXt!==t&&(this.tXt=t,this.hYt=!0)}AXt(){return this.tXt}Kjt(t){this.sXt!==t&&(this.sXt=t,this.hYt=!0)}EXt(){return this.sXt}zjt(t){if(this.sYt!==t&&(this.sYt=t,this.hYt=!0,this.eYt=null,this.sYt.length))try{this.eYt=JSON.parse(this.sYt)}catch(t){this.eYt=null}}IXt(){return this.sYt}p6t(t){this.rYt!==(t=t<0?-1:t)&&(this.rYt=t,0<=this.rYt)&&(this.iYt=!0)}z6t(){return this.rYt<0?this.Zjt:this.rYt}}}{const a=self.Bs;a.GJ.lYt=class extends a.AAt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.GJ.lYt.FRt=class extends d.hEt{constructor(t){super(t)}_n(){super._n()}jAt(){this.TW().lN(this.Af)}zz(t){return this.TW().qU(t,{D_:this.Af.CL()})}eJ(){this.TW().PR()}}}{let GetParticleEngine2=function(t){return H.get(t).cYt()};GetParticleEngine=GetParticleEngine2;const h=self.Bs,i=self.zs,j=0,k=1,l=2,m=3,n=4,o=5,p=6,q=7,r=8,s=9,t=10,u=11,v=12,w=13,x=14,y=15,z=16,A=17,B=18,C=19,D=20,E=0,F=1,G=h.yn(h.Rect),H=(h.GJ.lYt.Instance=class extends h.kEt{constructor(e,i){super(e),this.uYt=!0;const a=h.yn(self.fYt);(this.pYt=a).dYt=()=>this.CYt(),this.mYt=null,this.gYt=(t,s,e,i,r,n)=>this.SYt(t,s,e,i,r,n),this.yYt=t=>this._Yt(t);let c=this.TYt=!0;i&&(a.AYt(i[j]),a.EYt(h.Mn(i[k])),a.IYt(i[l]?"one-shot":"continuous-spray"),this.wYt(this.Af.zV(i[m])),c=i[n],a.RYt(i[o]),a.MYt(i[p]),a.bYt(i[q]/100),a.GYt(i[r]),a.vYt(i[s]),a.PYt(i[t]),a.OYt(i[u]),a.xYt(i[v]),a.LYt(i[w]),a.DYt(i[x]),a.SetGravity(i[y]),a.NYt(i[z]),a.FYt(i[A]),a.$Yt(i[B]),a.kYt(i[C]),a.BYt(i[D])),this.WYt(),this.mYt&&(this.TYt=!1),"one-shot"===a.HYt()?a.VYt():a.UYt(!0);const f=this.UD();f.ek(c),f.cPt(!0),this.Ge.ed().addEventListener("bboxchange",()=>{f.lPt(this.pYt._4())}),this.cN().JS().q2()&&f.tPt(),this.s9=t=>this.e9(t),this.cN().ed().addEventListener("afterload",this.s9),this.vEt()}_n(){this.cN().ed().removeEventListener("afterload",this.s9),this.s9=null,this.pYt._n(),this.pYt=null,this.gYt=null,this.yYt=null,super._n()}cYt(){return this.pYt}jYt(t){this.pYt.AYt(t),"one-shot"===this.pYt.HYt()&&this.uYt&&this.pYt.XYt(t)}wYt(t){(t=t===this.qk()?null:t)===this.mYt||(this.mYt=t,this.pYt.YYt=t?t=>this.qYt(t):null,this.mYt)||(this.TYt=!0)}WYt(){const t=this.pYt,s=this.UD();t.KYt(s.VG()),t.D5t(this.Af.gL()),t.zYt(s.Ny()),t.JYt(s.ky()),t.QYt(s.GetAngle()),t.ZYt(Math.abs(s.Ivt()))}CYt(){this.Af.tB(this.Ge)}I_(t){if(this.TYt){const s=this.kft.TW(),e=s.KT();if(e){const i=this.UD(),r=i.jD(),n=G,h=(this.Af.QN().qDt()?n.set(-1/0,-1/0,1/0,1/0):r.Jq()?r.b8(i.S4(),n):r.Fq(i.S4(),n),t.qG(e),r.$q(i.S4()));this.pYt.tqt(r.jk()*h),this.pYt.I_(t,s.JEt(),n,r.Jq())}}}Ky(){const t=this.pYt;return{r:t.sqt(),sc:t.eqt(),st:t.HYt(),isp:t.iqt(),isz:t.rqt(),io:t.nqt(),gr:t.hqt(),xr:t.oqt(),yr:t.aqt(),spr:t.lqt(),szr:t.cqt(),grnd:t.uqt(),acc:t.fqt(),g:t.dqt(),lar:t.pqt(),lsr:t.Cqt(),lor:t.mqt(),dm:t.gqt(),to:t.Sqt(),s:t.yqt(),pcc:t._qt(),ft:this.uYt,soc:this.mYt?this.mYt.gq():null,p:t.Tqt().map(t=>t.toJSON())}}zy(t,s){const e=this.pYt;if(e.AYt(t.r),e.EYt(t.sc),e.IYt(t.st),e.RYt(t.isp),e.MYt(t.isz),e.bYt(t.io),e.GYt(t.gr),e.vYt(t.xr),e.PYt(t.yr),e.OYt(t.spr),e.xYt(t.szr),e.LYt(t.grnd),e.DYt(t.acc),e.SetGravity(t.g),e.NYt(t.lar),e.FYt(t.lsr),e.$Yt(t.lor),e.kYt(t.dm),e.BYt(t.to),e.UYt(t.s),e.Aqt(t.pcc),this.uYt=t.ft,t.hasOwnProperty("soc")){const n=this.cN().zV(t.soc);n&&this.wYt(n)}const i=t.p,r=(e.XYt(i.length,!1),e.Tqt());for(let t=0,s=r.length;t<s;++t)r[t].Za(i[t]);"state"===s&&this.mYt&&(e.Eqt(),e.Iqt(this))}e9(){const t=this.pYt,e=(t.Eqt(),t.Iqt(this),t.Tqt());for(let t=0,s=e.length;t<s;++t){const i=e[t],r=i.wqt();if(r){const n=r.UD();if(n){const h=n.fH();if(h){const o=i.Rqt(),a=h.oB();if(("number"!=typeof o||"number"!=typeof a||o!==a)&&"number"==typeof o){const l=this.cN(),c=l.kD(o);c&&l.tB(c)}}}}}}Z9(){const t=this.Af.YL(this.Ge);this.WYt(),this.uYt&&"one-shot"===this.pYt.HYt()&&this.pYt.Mqt(),this.pYt.Z9(t),this.pYt.yqt()&&this.Af.JD(),this.UD().u4(),this.uYt=!1}bqt(t){for(this.uYt&&"one-shot"===this.pYt.HYt()&&this.pYt.Mqt();0<t;)this.pYt.Z9(1/60),t-=1/60;this.pYt.yqt()&&this.Af.JD(),this.UD().u4(),this.uYt=!1}qYt(t,s){let e,i=(e=(e=(e="number"==typeof s?this.Af.kD(s):e)&&e.qk()!==this.mYt?null:e)||this.Af.n$(this.mYt,this.UD().jD(),t.Ny(),t.ky())).UD();return i.cM(t.Tu(),t.Tu()),i.y$(t.GetAngle()),i.jG(t.VG()),i.M4(this.UD().R4()),i.u4(),i.D4(this.fH(),!0),e.TJ(),t.Gqt(this.gYt),t.vqt(this.yYt),e}SYt(t,s,e,i,r,n){if(!t.mV()){const h=t.UD();h.m4(s,e),h.cM(h.AC()+i,h.OC()+i),h.y$(h.GetAngle()+r),h.jG(h.VG()+n),h.u4()}}_Yt(t){t.mV()||this.Af.tB(t)}Qnt(e){const i=this.pYt;switch(e){case j:return i.sqt();case k:return h.bn(i.eqt());case l:return"one-shot"===i.HYt()?F:E;case o:return i.iqt();case p:return i.rqt();case q:return 100*i.nqt();case r:return i.hqt();case s:return i.oqt();case t:return i.aqt();case u:return i.lqt();case v:return i.cqt();case w:return i.uqt();case x:return i.fqt();case y:return i.dqt();case z:return i.pqt();case A:return i.Cqt();case B:return i.mqt();case C:return i.gqt();case D:return i.Sqt()}}rht(e,i){const n=this.pYt;switch(e){case j:n.AYt(i);break;case k:n.EYt(h.Mn(i));break;case l:n.IYt(i?"one-shot":"continuous-spray");break;case o:n.RYt(i);break;case p:n.MYt(i);break;case q:n.bYt(i/100);break;case r:n.GYt(i);break;case s:n.vYt(i);break;case t:n.PYt(i);break;case u:n.OYt(i);break;case v:n.xYt(i);break;case w:n.LYt(i);break;case x:n.DYt(i);break;case y:n.SetGravity(i);break;case z:n.NYt(i);break;case A:n.FYt(i);break;case B:n.$Yt(i);break;case C:n.kYt(i);break;case D:n.BYt(i)}}LEt(){const t="plugins.particles",s=t+".properties",e=t+".debugger",i=this.pYt;return[{title:t+".name",properties:[{name:e+".particle-count",value:i.Pqt()},{name:s+".type.name",value:[s+".type.items."+i.HYt()]},{name:e+".is-spraying",value:i.yqt(),qUt:t=>i.UYt(t)},{name:s+".rate.name",value:i.sqt(),qUt:t=>i.AYt(t)},{name:s+".spray-cone.name",value:h.bn(i.eqt()),qUt:t=>i.EYt(h.Mn(t))},{name:s+".speed.name",value:i.iqt(),qUt:t=>i.RYt(t)},{name:s+".size.name",value:i.rqt(),qUt:t=>i.MYt(t)},{name:s+".opacity.name",value:i.nqt(),qUt:t=>i.bYt(t)},{name:s+".grow-rate.name",value:i.hqt(),qUt:t=>i.GYt(t)},{name:s+".x-randomiser.name",value:i.oqt(),qUt:t=>i.vYt(t)},{name:s+".y-randomiser.name",value:i.aqt(),qUt:t=>i.PYt(t)},{name:s+".initial-speed-randomiser.name",value:i.lqt(),qUt:t=>i.OYt(t)},{name:s+".size-randomiser.name",value:i.cqt(),qUt:t=>i.xYt(t)},{name:s+".grow-rate-randomiser.name",value:i.uqt(),qUt:t=>i.LYt(t)},{name:s+".acceleration.name",value:i.fqt(),qUt:t=>i.DYt(t)},{name:s+".gravity.name",value:i.dqt(),qUt:t=>i.SetGravity(t)},{name:s+".angle-randomiser.name",value:i.pqt(),qUt:t=>i.NYt(t)},{name:s+".life-speed-randomiser.name",value:i.Cqt(),qUt:t=>i.FYt(t)},{name:s+".opacity-randomiser.name",value:i.mqt(),qUt:t=>i.$Yt(t)},{name:s+".timeout.name",value:i.Sqt(),qUt:t=>i.BYt(t)}]}]}XAt(){return self.Oqt}},new WeakMap);self.Oqt=class extends self.P5{constructor(){super(),H.set(this,self.Xk.Jk().N5())}set xqt(t){GetParticleEngine2(this).UYt(!!t)}get xqt(){return GetParticleEngine2(this).yqt()}set rate(t){i.Ei(t),H.get(this).jYt(t)}get rate(){return GetParticleEngine2(this).sqt()}set Lqt(t){i.Ei(t),GetParticleEngine2(this).EYt(t)}get Lqt(){return GetParticleEngine2(this).eqt()}set Dqt(t){i.Ei(t),GetParticleEngine2(this).RYt(t)}get Dqt(){return GetParticleEngine2(this).iqt()}set Nqt(t){i.Ei(t),GetParticleEngine2(this).MYt(t)}get Nqt(){return GetParticleEngine2(this).rqt()}set Fqt(t){i.Ei(t),GetParticleEngine2(this).bYt(t)}get Fqt(){return GetParticleEngine2(this).nqt()}set $qt(t){i.Ei(t),GetParticleEngine2(this).vYt(t)}get $qt(){return GetParticleEngine2(this).oqt()}set kqt(t){i.Ei(t),GetParticleEngine2(this).PYt(t)}get kqt(){return GetParticleEngine2(this).aqt()}set Bqt(t){i.Ei(t),GetParticleEngine2(this).OYt(t)}get Bqt(){return GetParticleEngine2(this).lqt()}set Wqt(t){i.Ei(t),GetParticleEngine2(this).xYt(t)}get Wqt(){return GetParticleEngine2(this).cqt()}set Hqt(t){i.Ei(t),GetParticleEngine2(this).GYt(t)}get Hqt(){return GetParticleEngine2(this).hqt()}set Vqt(t){i.Ei(t),GetParticleEngine2(this).LYt(t)}get Vqt(){return GetParticleEngine2(this).uqt()}set acceleration(t){i.Ei(t),GetParticleEngine2(this).DYt(t)}get acceleration(){return GetParticleEngine2(this).fqt()}set Uqt(t){i.Ei(t),GetParticleEngine2(this).SetGravity(t)}get Uqt(){return GetParticleEngine2(this).dqt()}set jqt(t){i.Ei(t),GetParticleEngine2(this).NYt(t)}get jqt(){return GetParticleEngine2(this).pqt()}set Xqt(t){i.Ei(t),GetParticleEngine2(this).FYt(t)}get Xqt(){return GetParticleEngine2(this).Cqt()}set Yqt(t){i.Ei(t),GetParticleEngine2(this).$Yt(t)}get Yqt(){return GetParticleEngine2(this).mqt()}set timeout(t){i.Ei(t),GetParticleEngine2(this).BYt(t)}get timeout(){return GetParticleEngine2(this).Sqt()}qqt(t){i.Ei(t),H.get(this).bqt(t)}Kqt(t){const s=H.get(this);t?s.wYt(s.cN().BN(t)):s.wYt(null)}}}{const N0=self.Bs;N0.GJ.lYt.MJ={yqt(){return this.pYt.yqt()}}}{const O0=self.Bs;O0.GJ.lYt.pnt={UYt(t){this.pYt.UYt(0!==t)},AYt(t){this.jYt(t)},zqt(t){this.wYt(t)},Jqt(){this.wYt(null)},EYt(t){this.pYt.EYt(O0.Mn(t))},RYt(t){this.pYt.RYt(t)},MYt(t){this.pYt.MYt(t)},bYt(t){this.pYt.bYt(t/100)},GYt(t){this.pYt.GYt(t)},Qqt(t){this.pYt.vYt(t)},Zqt(t){this.pYt.PYt(t)},tKt(t){this.pYt.OYt(t)},sKt(t){this.pYt.xYt(t)},eKt(t){this.pYt.LYt(t)},iKt(t){this.pYt.DYt(t)},SetGravity(t){this.pYt.SetGravity(t)},rKt(t){this.pYt.NYt(t)},nKt(t){this.pYt.FYt(t)},hKt(t){this.pYt.$Yt(t)},BYt(t){this.pYt.BYt(t)},oKt(t){this.bqt(t)},vVt(t){this.UD().Iy(t),this.Af.JD()}}}{const ib=self.Bs;ib.GJ.lYt.Cnt={aKt(){return this.pYt.Pqt()},lKt(){return this.pYt.sqt()},cKt(){return ib.bn(this.pYt.eqt())},uKt(){return this.pYt.iqt()},fKt(){return this.pYt.rqt()},dKt(){return 100*this.pYt.nqt()},pKt(){return this.pYt.hqt()},CKt(){return this.pYt.oqt()},mKt(){return this.pYt.aqt()},gKt(){return this.pYt.cqt()},SKt(){return this.pYt.lqt()},yKt(){return this.pYt.uqt()},_Kt(){return this.pYt.fqt()},TKt(){return this.pYt.dqt()},AKt(){return this.pYt.pqt()},EKt(){return this.pYt.Cqt()},IKt(){return this.pYt.mqt()},wKt(){return this.pYt.Sqt()}}}{const C33=self.Bs,inactiveParticles=[],MAX_RECYCLE_PARTICLES=1e3,VALID_SPRAY_TYPES=new Set(["continuous-spray","one-shot"]),DESTROY_MODES=["fade-to-invisible","timeout-expired","particle-stopped"],tempRect=C33.yn(C33.Rect);self.fYt=class{constructor(){this.RKt=0,this.MKt=0,this.bKt="continuous-spray",this.GKt=!1,this.vKt=0,this.PKt=!1,this.OKt=0,this.xKt=0,this.LKt=0,this.DKt=0,this.NKt=0,this.FKt=1,this.$Kt=0,this.kKt=0,this.BKt=0,this.WKt=0,this.HKt=0,this.VKt=0,this.UKt=0,this.jKt=0,this.XKt=0,this.YKt=0,this.qKt=0,this.KKt=0,this.zKt=0,this.Rd=0,this.JKt=0,this.QKt=1,this.dYt=null,this.YYt=null,this.ZKt=[],this.qGt=new C33.Rect,this.Ty=new C33.Zo}_n(){this.Pd(),C33.qh(this.ZKt),this.ZKt=null,this.dYt=null,this.YYt=null,this.qGt=null,this.Ty=null}Pd(){const e=this.ZKt;for(let t=0,s=e.length;t<s;++t)e[t].dTt();C33.an(inactiveParticles,e),C33.qh(e),inactiveParticles.length>MAX_RECYCLE_PARTICLES&&C33.Yh(inactiveParticles,MAX_RECYCLE_PARTICLES),this.GKt=!1}VYt(){for(let t=0,s=this.RKt;t<s;++t)this.t8t();this.ZKt.length&&(this.GKt=!0)}t8t(t=!0){let s=null;return inactiveParticles.length?(s=inactiveParticles.pop()).s8t(this):s=C33.yn(self.e8t,this),this.ZKt.push(s),t?s.rbt(this.YYt):s.rbt(),s}Mqt(){const e=this.ZKt,i=this.YYt;for(let t=0,s=e.length;t<s;++t)e[t].rbt(i)}Eqt(){const e=this.ZKt,i=this.YYt;for(let t=0,s=e.length;t<s;++t)e[t].i8t(i)}Iqt(e){const i=this.ZKt;for(let t=0,s=i.length;t<s;++t){const r=i[t],n=r.wqt();if(n){const h=n.UD();h.Fy(r.Ny()),h.By(r.ky()),h.cM(r.Tu(),r.Tu()),h.jG(r.VG()),h.y$(r.GetAngle()),h.M4(e.UD().R4()),h.u4()}}}XYt(t,s=!0){const e=this.ZKt;if(t<e.length){const i=e.length-t;for(let t=0;t<i;++t){const r=e.pop();r.dTt(),inactiveParticles.push(r)}inactiveParticles.length>MAX_RECYCLE_PARTICLES&&C33.Yh(inactiveParticles,MAX_RECYCLE_PARTICLES)}else if(t>e.length){const n=t-e.length;for(let t=0;t<n;++t)this.t8t(s)}}Tqt(){return this.ZKt}Pqt(){return this.ZKt.length}Z9(t){this.r8t(t),this.n8t(t),this.h8t()}r8t(t){if("continuous-spray"===this.bKt&&this.GKt){this.JKt+=t*this.RKt;const s=Math.floor(this.JKt);this.JKt-=s;for(let t=0;t<s;++t)this.t8t()}}Aqt(t){this.JKt=t}_qt(){return this.JKt}n8t(e){let i=this.qGt,r=(i.set(this.OKt,this.xKt,this.OKt,this.xKt),this.ZKt),n=0;for(let t=0,s=r.length;t<s;++t){const h=r[t];(r[n]=h).Z9(e),h.NCt()?(++n,i.uc(h._4())):(h.dTt(),inactiveParticles.push(h))}C33.Yh(r,n),inactiveParticles.length>MAX_RECYCLE_PARTICLES&&C33.Yh(inactiveParticles,MAX_RECYCLE_PARTICLES)}h8t(){"one-shot"===this.bKt&&0===this.ZKt.length&&this.GKt&&(this.dYt&&this.dYt(),this.GKt=!1)}I_(e,i,r,n){tempRect.set(i.ph(),i.Ch(),i.Sh(),i.yh()),e.uv(tempRect),this.Ty.I(e.YG());const h=this.ZKt;for(let t=0,s=h.length;t<s;++t){const o=h[t];r.oc(o._4())&&o.I_(e,i,n)}e.dv()}YG(){return this.Ty}AYt(t){this.RKt=+t}sqt(){return this.RKt}EYt(t){this.MKt=+t}eqt(){return this.MKt}IYt(t){if(!VALID_SPRAY_TYPES.has(t))throw new Error("invalid spray type");this.bKt=t}HYt(){return this.bKt}UYt(t){this.GKt=!!t}yqt(){return this.GKt}KYt(t){this.vKt=+t}o8t(){return this.vKt}D5t(t){this.PKt=!!t}a8t(){return this.PKt}zYt(t){this.OKt=+t}l8t(){return this.OKt}JYt(t){this.xKt=+t}c8t(){return this.xKt}QYt(t){this.LKt=+t}u8t(){return this.LKt}RYt(t){this.DKt=+t}iqt(){return this.DKt}MYt(t){this.NKt=+t}rqt(){return this.NKt}ZYt(t){this.FKt=+t}f8t(){return this.FKt}bYt(t){this.$Kt=+t}nqt(){return this.$Kt}GYt(t){this.kKt=+t}hqt(){return this.kKt}vYt(t){this.BKt=+t}oqt(){return this.BKt}PYt(t){this.WKt=+t}aqt(){return this.WKt}OYt(t){this.HKt=+t}lqt(){return this.HKt}xYt(t){this.VKt=+t}cqt(){return this.VKt}LYt(t){this.UKt=+t}uqt(){return this.UKt}DYt(t){this.jKt=+t}fqt(){return this.jKt}SetGravity(t){this.XKt=+t}dqt(){return this.XKt}NYt(t){this.YKt=+t}pqt(){return this.YKt}FYt(t){this.qKt=+t}Cqt(){return this.qKt}$Yt(t){this.KKt=+t}mqt(){return this.KKt}d8t(t){let s=DESTROY_MODES.indexOf(t);if(-1===s)throw new Error("invalid destroy mode");this.zKt=s}kYt(t){this.d8t(DESTROY_MODES[t])}p8t(){return DESTROY_MODES[this.zKt]}gqt(){return this.zKt}BYt(t){this.Rd=+t}Sqt(){return this.Rd}tqt(t){this.QKt=+t}C8t(){return this.QKt}_4(){return this.qGt}}}{let randomOffset2=function(t){return Math.random()*t-t/2},C33=(randomOffset=randomOffset2,self.Bs),ParticleEngine=self.fYt,tmpQuad=new C33.dc,tmpColor=new C33.Zo,DPR=self.devicePixelRatio||1,didChangeColor=!1;self.e8t=class{constructor(t){this.m8t=t,this.Gd=!1,this.fl=0,this.dl=0,this.Iwt=0,this.Z6=0,this.g8t=1,this.S8t=0,this.y8t=0,this.BX=0,this._8t=0,this.T8t=0,this.A8t=0,this.Qc=new C33.Rect,this.E8t=null,this.I8t=NaN,this.w8t=null,this.R8t=null}s8t(t){this.m8t=t}rbt(t){const s=this.m8t;this.Gd=!0,this.fl=s.l8t()+randomOffset2(s.oqt()),this.dl=s.c8t()+randomOffset2(s.aqt()),this.Iwt=s.iqt()+randomOffset2(s.lqt()),this.Z6=s.u8t()+randomOffset2(s.eqt()),this.g8t=s.nqt(),this.S8t=this.g8t,this.BX=(s.rqt()+randomOffset2(s.cqt()))*s.f8t(),this._8t=this.BX/2,this.y8t=s.hqt()+randomOffset2(s.uqt()),this.T8t=0,this.A8t=0,this.M8t(),t?this.E8t||(this.E8t=t(this)):(this.E8t=null,this.w8t=null,this.R8t=null)}i8t(t){t?this.E8t&&!this.E8t.mV()||(this.E8t=t(this,this.I8t)):(this.E8t=null,this.w8t=null,this.R8t=null)}Gqt(t){this.w8t=t}vqt(t){this.R8t=t}dTt(){const t=this.R8t;t&&t(this.E8t),this.E8t=null,this.w8t=null,this.R8t=null}toJSON(){let t;return this.E8t&&this.E8t.UD()&&(t=this.E8t.UD().fH().oB()),[this.fl,this.dl,this.Iwt,this.Z6,this.g8t,this.y8t,this.BX,this.T8t,this.A8t,t]}Za(t){this.fl=t[0],this.dl=t[1],this.Iwt=t[2],this.Z6=t[3],this.g8t=t[4],this.S8t=this.g8t,this.y8t=t[5],this.BX=t[6],this.T8t=t[7],this.A8t=t[8],this.I8t=t[9],this._8t=this.BX/2,this.M8t()}Z9(t){let s=this.m8t,e=this.Iwt*t,i=this.Z6,r=Math.cos(i)*e,n=Math.sin(i)*e+this.T8t*t,h=(this.fl+=r,this.dl+=n,this.y8t*t),o=(this.BX+=h,this._8t=this.BX/2,this.Iwt+=s.fqt()*t,this.T8t+=s.dqt()*t,this.A8t+=t,this.M8t(),s.pqt()),a=s.Cqt(),l=s.mqt(),c=0;0!==o&&(c=randomOffset2(o*t),this.Z6+=c),0!==a&&(this.Iwt+=randomOffset2(a*t)),0!==l&&(this.g8t=C33.wn(this.g8t+randomOffset2(l*t),0,1));const u=1<=this.BX&&(2===s.gqt()?0<this.Iwt:this.A8t<s.Sqt()),f=this.w8t;if(f&&u){let t=s.o8t()*this.g8t;0===s.gqt()&&(t*=1-this.A8t/s.Sqt());const d=t-this.S8t;this.S8t=t,f(this.E8t,r,n,h,c,d)}this.Gd=u}NCt(){return this.Gd}_4(){return this.Qc}M8t(){const t=this.fl,s=this.dl,e=this._8t;this.Qc.set(t-e,s-e,t+e,s+e)}I_(r,n,h){if(!this.E8t){let e=this.m8t,i=e.o8t()*this.g8t;if(0===e.gqt()&&(i*=1-this.A8t/e.Sqt()),!(i<=0)){const o=this.BX,a=o*e.C8t()*DPR;if(!(a<1)){let t=this.fl,s=this.dl;e.a8t()&&(t=t+.5|0,s=s+.5|0),r.q2()?r.pv(t,s,o,i):h||a>r.Qv()||a<r.Jv()?(tmpColor.I(e.YG()),tmpColor.Pa(i),r.wy(tmpColor),didChangeColor=!0,tmpQuad.Fc(this.Qc),r.hv(tmpQuad,n)):(didChangeColor&&(r.wy(e.YG()),didChangeColor=!1),r.pv(t,s,a,i))}}}}wqt(){return this.E8t}Rqt(){return this.I8t}Ny(){return this.fl}ky(){return this.dl}Tu(){return this.BX}GetAngle(){return this.Z6}VG(){return this.g8t}}}{const a=self.Bs;a.GJ.b8t=class extends a.AAt{constructor(t){super(t)}_n(){super._n()}}}{let WrapModeToStr2=function(t){switch(t){case 0:return"clamp-to-edge";case 1:return"repeat";case 2:return"mirror-repeat"}return"repeat"};WrapModeToStr=WrapModeToStr2;const d=self.Bs;d.GJ.b8t.FRt=class extends d.hEt{constructor(t,s){super(t),this.j_="repeat",this.X_="repeat",s&&(this.j_=WrapModeToStr2(s[0]),this.X_=WrapModeToStr2(s[1]))}_n(){super._n()}jAt(){this.TW().lN(this.Af)}zz(t){return this.TW().qU(t,{D_:this.Af.CL(),x_:this.j_,L_:this.X_})}eJ(){this.TW().PR()}G8t(){return this.j_}v8t(){return this.X_}}}{const j=self.Bs,k=self.zs,l=0,m=1,n=4,o=5,p=6,q=7,r=8,s=9,t=10,u=11,v=12,w=13,x=14,y=j.yn(j.Rect),z=j.yn(j.dc),A=j.yn(j.Rect),B=j.yn(j.dc),C=(j.GJ.b8t.Instance=class extends j.kEt{constructor(e,i){super(e),this.P8t=0,this.O8t=0,this.x8t=1,this.L8t=1,this.D8t=0,this.N8t=!1,this.F8t=0,this.$8t=0,this.k8t=0,this.B8t=0,this.W8t=0,this.H8t=null,i&&(this.UD().ek(!!i[l]),this.P8t=i[n],this.O8t=i[o],this.x8t=i[p],this.L8t=i[q],this.D8t=j.Mn(i[r]),this.N8t=!!i[s],this.F8t=i[t],this.$8t=i[u],this.k8t=i[v],this.B8t=i[w],this.W8t=i[x])}_n(){this.V8t(),super._n()}V8t(){this.H8t&&(this.H8t._n(),this.H8t=null)}U8t(t,s,e){const i=this.YEt(),r=i.AC(),n=i.OC(),h=this.P8t/r,o=this.O8t/n,a=this.D8t;A.set(0,0,t/(r*this.x8t),s/(n*this.L8t)),A.offset(-h,-o),0===a?e.Fc(A):e.$c(A,-a)}j8t(t,s=!0){if(this.N8t){const e=this.YEt();t.og(),t.Tv(e.AC()*this.x8t,e.OC()*this.L8t,this.F8t,this.$8t,this.k8t,this.B8t,this.W8t)}else s&&t.eg()}I_(t){const s=this.YEt(),e=s.KT();if(null!==e){this.j8t(t),t.qG(e);const i=s.AC(),r=s.OC(),n=this.P8t/i,h=this.O8t/r,o=this.UD();A.set(0,0,o.AC()/(i*this.x8t),o.OC()/(r*this.L8t)),A.offset(-n,-h),o.b5()?this.SUt(o,t):this.yUt(o,t)}}yUt(t,s){let e=t.A4();this.Af.gL()&&(e=t.aPt(e)),0===this.D8t?s.qg(e,A):(B.$c(A,-this.D8t),s.hv(e,B))}SUt(e,t){const i=e.RPt();if(e.bPt()){e.nPt(y,z,!1);let t=z,s=(this.Af.gL()&&(t=e.aPt(t)),A);0!==this.D8t&&(B.$c(A,-this.D8t),s=B),i.E_(e.G5(),t,s),e.MPt(!1)}i.I_(t)}YEt(){return this.H8t||this.kft.TW()}ket(){return!0}KT(){return this.YEt().KT()}X8t(){this.UD().MPt(!0)}Y8t(t){this.P8t!==t&&(this.P8t=t,this.Af.JD(),this.X8t())}q8t(){return this.P8t}K8t(t){this.O8t!==t&&(this.O8t=t,this.Af.JD(),this.X8t())}z8t(){return this.O8t}J8t(t){this.x8t!==t&&(this.x8t=t,this.Af.JD(),this.X8t())}Q8t(){return this.x8t}Z8t(t){this.L8t!==t&&(this.L8t=t,this.Af.JD(),this.X8t())}tzt(){return this.L8t}szt(t){this.D8t!==t&&(this.D8t=t,this.Af.JD(),this.X8t())}ezt(){return this.D8t}izt(t){this.N8t!==(t=!!t)&&(this.N8t=t,this.Af.JD())}rzt(){return this.N8t}nzt(t){this.F8t!==t&&(this.F8t=t,this.rzt())&&this.Af.JD()}hzt(){return this.F8t}ozt(t){this.$8t!==t&&(this.$8t=t,this.rzt())&&this.Af.JD()}azt(){return this.$8t}lzt(t){this.k8t!==t&&(this.k8t=t,this.rzt())&&this.Af.JD()}czt(){return this.k8t}uzt(t){this.B8t!==t&&(this.B8t=t,this.rzt())&&this.Af.JD()}fzt(){return this.B8t}dzt(t){this.W8t!==t&&(this.W8t=t,this.rzt())&&this.Af.JD()}pzt(){return this.W8t}Ky(){const t={};return 0!==this.P8t&&(t.iox=this.P8t),0!==this.O8t&&(t.ioy=this.O8t),1!==this.x8t&&(t.isx=this.x8t),1!==this.L8t&&(t.isy=this.L8t),0!==this.D8t&&(t.ia=this.D8t),this.N8t&&(t.tr=!0),1!==this.F8t&&(t.trx=this.F8t),1!==this.$8t&&(t.try=this.$8t),1!==this.k8t&&(t.tra=this.k8t),.1!==this.B8t&&(t.trbmx=this.B8t),.1!==this.W8t&&(t.trbmy=this.W8t),t}zy(t){this.P8t=t.iox||0,this.O8t=t.ioy||0,this.x8t=t.hasOwnProperty("isx")?t.isx:1,this.L8t=t.hasOwnProperty("isy")?t.isy:1,this.D8t=t.ia||0,this.N8t=!!t.tr,this.F8t=t.hasOwnProperty("trx")?t.trx:1,this.$8t=t.hasOwnProperty("try")?t.try:1,this.k8t=t.hasOwnProperty("tra")?t.tra:1,this.B8t=t.hasOwnProperty("trbmx")?t.trbmx:.1,this.W8t=t.hasOwnProperty("trbmy")?t.trbmy:.1}LEt(){const t="plugins.tiledbg.properties";return[{title:t+".image-transform.name",properties:[{name:t+".image-offset-x.name",value:this.q8t(),qUt:t=>this.Y8t(t)},{name:t+".image-offset-y.name",value:this.z8t(),qUt:t=>this.K8t(t)},{name:t+".image-scale-x.name",value:100*this.Q8t(),qUt:t=>this.J8t(t/100)},{name:t+".image-scale-y.name",value:100*this.tzt(),qUt:t=>this.Z8t(t/100)},{name:t+".image-angle.name",value:j.bn(this.ezt()),qUt:t=>this.szt(j.Mn(t))}]},{title:t+".tile-randomization.name",properties:[{name:t+".enable-tile-randomization.name",value:this.rzt(),qUt:t=>this.izt(t)},{name:t+".x-random.name",value:100*this.hzt(),qUt:t=>this.nzt(t/100)},{name:t+".y-random.name",value:100*this.azt(),qUt:t=>this.ozt(t/100)},{name:t+".angle-random.name",value:100*this.czt(),qUt:t=>this.lzt(t/100)},{name:t+".blend-margin-x.name",value:100*this.fzt(),qUt:t=>this.uzt(t/100)},{name:t+".blend-margin-y.name",value:100*this.pzt(),qUt:t=>this.dzt(t/100)}]}]}Qnt(e){switch(e){case n:return this.q8t();case o:return this.z8t();case p:return this.Q8t();case q:return this.tzt();case r:return this.ezt();case s:return this.rzt();case t:return this.hzt();case u:return this.azt();case v:return this.czt();case w:return this.fzt();case x:return this.pzt()}}rht(e,i){switch(e){case n:this.Y8t(i);break;case o:this.K8t(i);break;case p:this.J8t(i);break;case q:this.Z8t(i);break;case r:this.szt(i);break;case s:this.izt(!!i);break;case t:this.nzt(i);break;case u:this.ozt(i);break;case v:this.lzt(i);break;case w:this.uzt(i);break;case x:this.dzt(i)}}XAt(){return self.Czt}},new WeakMap);self.Czt=class extends self.P5{constructor(){super(),C.set(this,self.Xk.Jk().N5())}set mzt(t){k.Ei(t),C.get(this).Y8t(t)}get mzt(){return C.get(this).q8t()}set gzt(t){k.Ei(t),C.get(this).K8t(t)}get gzt(){return C.get(this).z8t()}Szt(t,s){k.Ei(t),k.Ei(s);const e=C.get(this);e.Y8t(t),e.K8t(s)}yzt(){const t=C.get(this);return[t.q8t(),t.z8t()]}set _zt(t){k.Ei(t),C.get(this).J8t(t)}get _zt(){return C.get(this).Q8t()}set Tzt(t){k.Ei(t),C.get(this).Z8t(t)}get Tzt(){return C.get(this).tzt()}Azt(t,s){k.Ei(t),k.Ei(s);const e=C.get(this);e.J8t(t),e.Z8t(s)}Ezt(){const t=C.get(this);return[t.Q8t(),t.tzt()]}set Izt(t){k.Ei(t),C.get(this).szt(t)}get Izt(){return C.get(this).ezt()}set wzt(t){k.Ei(t),C.get(this).szt(j.Mn(t))}get wzt(){return j.bn(C.get(this).ezt())}get imageWidth(){return C.get(this).YEt().AC()}get imageHeight(){return C.get(this).YEt().OC()}ajt(){const t=C.get(this).YEt();return[t.AC(),t.OC()]}set Rzt(t){C.get(this).izt(!!t)}get Rzt(){return C.get(this).rzt()}set Mzt(t){k.Ei(t),C.get(this).nzt(t)}get Mzt(){return C.get(this).hzt()}set bzt(t){k.Ei(t),C.get(this).ozt(t)}get bzt(){return C.get(this).azt()}Gzt(t,s){k.Ei(t),k.Ei(s);const e=C.get(this);e.nzt(t),e.ozt(s)}vzt(){const t=C.get(this);return[t.hzt(),t.azt()]}set Pzt(t){k.Ei(t),C.get(this).lzt(t)}get Pzt(){return C.get(this).czt()}set Ozt(t){k.Ei(t),C.get(this).uzt(t)}get Ozt(){return C.get(this).fzt()}set xzt(t){k.Ei(t),C.get(this).dzt(t)}get xzt(){return C.get(this).pzt()}Lzt(t,s){k.Ei(t),k.Ei(s);const e=C.get(this);e.uzt(t),e.dzt(s)}Dzt(){const t=C.get(this);return[t.fzt(),t.pzt()]}async Nzt(t){k.hr(t,Blob);const s=C.get(this),e=s.cN(),i=j.yn(j.twt);i.pwt(e,t),await i.qU(e.JS(),{D_:e.CL(),x_:s.Eyt().G8t(),L_:s.Eyt().v8t()}),s.Tn()?i._n():(s.V8t(),s.H8t=i,e.JD())}}}{const o0=self.Bs;o0.GJ.b8t.MJ={gjt(){return!0},Sjt(){return!0},Fzt(){return this.rzt()}}}{const p0=self.Bs;p0.GJ.b8t.pnt={$zt(t){this.Y8t(t)},kzt(t){this.K8t(t)},Bzt(t){this.J8t(t/100)},Wzt(t){this.Z8t(t/100)},Hzt(t){this.szt(p0.Mn(t))},Vzt(t){this.izt(t)},Uzt(t,s){this.nzt(t/100),this.ozt(s/100)},jzt(t){this.lzt(t/100)},Xzt(t,s){this.uzt(t/100),this.dzt(s/100)},vVt(t){this.UD().Iy(t),this.Af.JD()},async wjt(t,s){if(!this.H8t||this.H8t.mX()!==t){const e=this.Af,i=p0.yn(p0.twt);try{if(await i.dwt(e,t),!i.UX())throw new Error("image failed to load");if(this.Tn())return i._n(),null;const r=await i.qU(e.JS(),{D_:e.CL(),x_:this.Eyt().G8t(),L_:this.Eyt().v8t()});if(!r)return}catch(t){return console.error("Load image from URL failed: ",t),void(this.Tn()||this.LB(p0.GJ.b8t.MJ.Sjt))}this.Tn()?i._n():(this.V8t(),this.H8t=i,e.JD(),await this.NB(p0.GJ.b8t.MJ.gjt))}}}}{const I0=self.Bs;I0.GJ.b8t.Cnt={Fjt(){return this.YEt().AC()},$jt(){return this.YEt().OC()},Yzt(){return this.P8t},qzt(){return this.O8t},Kzt(){return 100*this.x8t},zzt(){return 100*this.L8t},Jzt(){return I0.bn(this.D8t)},Qzt(){return 100*this.hzt()},Zzt(){return 100*this.azt()},tJt(){return 100*this.czt()},sJt(){return 100*this.fzt()},eJt(){return 100*this.pzt()}}}{const a=self.Bs;a.GJ.Touch=class extends a.AAt{constructor(t){super(t)}_n(){super._n()}}}{let GetTouchSdkInstance2=function(){return s.WF().N5()};GetTouchSdkInstance=GetTouchSdkInstance2;const d=self.Bs,e=self.zs;d.GJ.Touch.FRt=class extends d.hEt{constructor(t){super(t)}_n(){super._n()}jAt(){}XAt(){return self.iJt}};let s=null;self.iJt=class extends self.HF{constructor(t){super(t),(s=t).cN().OD().LD=this}requestPermission(t){e.Mi(t);const s=GetTouchSdkInstance2();if("orientation"===t)return s.rJt(0);if("motion"===t)return s.rJt(1);throw new Error("invalid type")}}}{const m=self.Bs,n="touch";m.GJ.Touch.Instance=class extends m.uEt{constructor(t,s){super(t,n),this.nJt=new Map,this.hJt=!1,this.oJt=!1,this.aJt=0,this.lJt=0,this.cJt=0,this.uJt=0,this.fJt=0,this.dJt=0,this.pJt=0,this.CJt=0,this.mJt=0,this.gJt=0,this.SJt=0,this.yJt=0,this._Jt=0,this.TJt=0,this.AJt=0,this.EJt=0,this.IJt=0,this.wJt=[],s&&(this.hJt=s[0]),this.TEt("permission-result",t=>this.RJt(t));const e=this.cN().ed();this.Wd=new m.$d(m.Od.Fd(e,"pointerdown",t=>this.MJt(t.data)),m.Od.Fd(e,"pointermove",t=>this.bJt(t.data)),m.Od.Fd(e,"pointerup",t=>this.GJt(t.data,!1)),m.Od.Fd(e,"pointercancel",t=>this.GJt(t.data,!0)),m.Od.Fd(e,"deviceorientation",t=>this.vJt(t.data)),m.Od.Fd(e,"deviceorientationabsolute",t=>this.PJt(t.data)),m.Od.Fd(e,"devicemotion",t=>this.OJt(t.data)),m.Od.Fd(e,"tick2",t=>this.X7()))}_n(){this.nJt.clear(),super._n()}MJt(t){if("mouse"===t.pointerType){if(!this.hJt)return;this.oJt=!0}const s=t.pointerId;if(!this.nJt.has(s)){const e=t.pageX-this.Af.Nk(),i=t.pageY-this.Af.Fk(),r=performance.now(),n=this.nJt.size,h=(this.SJt=n,this.yJt=s,m.yn(m.GJ.Touch.xJt));h.rbt(r,e,i,s,n),this.nJt.set(s,h),this.LB(m.GJ.Touch.MJ.LJt),this.LB(m.GJ.Touch.MJ.DJt),this.TJt=e,this.AJt=i,this.IJt=0,this.LB(m.GJ.Touch.MJ.NJt)}}bJt(t){if("mouse"!==t.pointerType||this.oJt){const s=this.nJt.get(t.pointerId);if(s){const e=performance.now();if(!(e-s.AP()<2)){const i=t.pageX-this.Af.Nk(),r=t.pageY-this.Af.Fk();s._6(e,i,r,t.width,t.height,t.pressure)}}}}GJt(t,s){if("mouse"===t.pointerType){if(!this.oJt)return;this.oJt=!1}const e=performance.now(),i=t.pointerId,r=this.nJt.get(i);if(r){if(this.SJt=r.FJt(),this.yJt=r.mH(),!s){const n=t.pageX-this.Af.Nk(),h=t.pageY-this.Af.Fk();this.TJt=n,this.AJt=h,this.IJt=1,this.LB(m.GJ.Touch.MJ.NJt)}if(this.LB(m.GJ.Touch.MJ.$Jt),this.LB(m.GJ.Touch.MJ.kJt),!s){const o=r.BJt(e);"single-tap"===o?(this.LB(m.GJ.Touch.MJ.WJt),this.TJt=r.Ny(),this.AJt=r.ky(),this.LB(m.GJ.Touch.MJ.HJt)):"double-tap"===o&&(this.LB(m.GJ.Touch.MJ.VJt),this.TJt=r.Ny(),this.AJt=r.ky(),this.LB(m.GJ.Touch.MJ.UJt))}r._n(),this.nJt.delete(i)}}rJt(e){return this.wEt("request-permission",{type:e}),new Promise((t,s)=>{this.wJt.push({type:e,resolve:t,reject:s})})}RJt(t){const s=t.result,e=t.type,i=(this._Jt=e,this.wJt.filter(t=>t.type===e));for(const r of i)r.resolve(s?"granted":"denied");this.wJt=this.wJt.filter(t=>t.type!==e),s?(this.LB(m.GJ.Touch.MJ.jJt),0===e?this.Af.BBt():this.Af.WBt()):this.LB(m.GJ.Touch.MJ.XJt)}vJt(t){"number"==typeof t.webkitCompassHeading?this.aJt=t.webkitCompassHeading:t.absolute&&(this.aJt=t.alpha),this.lJt=t.alpha,this.cJt=t.beta,this.uJt=t.gamma}PJt(t){this.aJt=t.alpha}OJt(t){const s=t.acceleration,e=(s&&(this.fJt=s.x,this.dJt=s.y,this.pJt=s.z),t.accelerationIncludingGravity);e&&(this.CJt=e.x,this.mJt=e.y,this.gJt=e.z)}X7(){let t=performance.now(),s=0;for(const e of this.nJt.values())e.AP()<=t-50&&e.YJt(t),e.qJt(t)&&(this.SJt=e.FJt(),this.yJt=e.mH(),this.EJt=s,this.LB(m.GJ.Touch.MJ.KJt),this.TJt=e.Ny(),this.AJt=e.ky(),this.LB(m.GJ.Touch.MJ.zJt),this.EJt=0),++s}JJt(t){t=Math.floor(t);for(const s of this.nJt.values()){if(0===t)return s;--t}return null}QJt(t,s){return 0<=t&&0<=s&&t<this.Af.ykt()&&s<this.Af._kt()}LEt(){return[{title:"plugins.touch.debugger.touches",properties:[...this.nJt.values()].map(t=>({name:"$"+t.mH(),value:t.Ny()+", "+t.ky()}))}]}}}{const ra=self.Bs,sa=[];ra.GJ.Touch.MJ={DJt(){return!0},kJt(){return!0},ZJt(){return 0<this.nJt.size},NJt(t,s){return!!t&&s===this.IJt&&!!this.QJt(this.TJt,this.AJt)&&this.Af.tL().vOt(t,[[this.TJt,this.AJt]],!1)},t7t(t){if(!t)return!1;const s=this.Af.n3t(),e=s.bSt(),i=[...this.nJt.values()].filter(t=>this.QJt(t.Ny(),t.ky())).map(t=>[t.Ny(),t.ky()]);return ra.xor(this.Af.tL().vOt(t,i,e),e)},s7t(t,s,e){const i=this.JJt(t);return!!i&&ra.compare(i.nW(),s,e)},e7t(){return!0},i7t(){return!0},r7t(t,s,e){this.Af.BBt();let i;return i=0===t?this.lJt:1===t?this.cJt:this.uJt,ra.compare(i,s,e)},n7t(t,s,e){this.Af.WBt();let i;return i=0===t?this.CJt:1===t?this.mJt:2===t?this.gJt:3===t?this.fJt:4===t?this.dJt:this.pJt,ra.compare(i,s,e)},LJt(t){return(t=Math.floor(t))===this.SJt},$Jt(t){return(t=Math.floor(t))===this.SJt},h7t(t){return t=Math.floor(t),this.nJt.size>=t+1},KJt(){return!0},WJt(){return!0},VJt(){return!0},zJt(t){return!!t&&!!this.QJt(this.TJt,this.AJt)&&this.Af.tL().vOt(t,[[this.TJt,this.AJt]],!1)},HJt(t){return!!t&&!!this.QJt(this.TJt,this.AJt)&&this.Af.tL().vOt(t,[[this.TJt,this.AJt]],!1)},UJt(t){return!!t&&!!this.QJt(this.TJt,this.AJt)&&this.Af.tL().vOt(t,[[this.TJt,this.AJt]],!1)},jJt(t){return this._Jt===t},XJt(t){return this._Jt===t}}}{const Va=self.Bs;Va.GJ.Touch.pnt={o7t(t){this.rJt(t)}}}{const Xa=self.Bs;Xa.GJ.Touch.Cnt={a7t(){return this.nJt.size},xTt(t){const s=this.JJt(this.EJt);return s?s.l7t(this.Af.HD(),t,!0):0},LTt(t){const s=this.JJt(this.EJt);return s?s.l7t(this.Af.HD(),t,!1):0},c7t(t,s){const e=this.JJt(t);return e?e.l7t(this.Af.HD(),s,!0):0},u7t(t,s){const e=this.JJt(t);return e?e.l7t(this.Af.HD(),s,!1):0},f7t(t,s){const e=this.nJt.get(t);return e?e.l7t(this.Af.HD(),s,!0):0},d7t(t,s){const e=this.nJt.get(t);return e?e.l7t(this.Af.HD(),s,!1):0},p7t(){const t=this.JJt(0);return t?t.Ny():0},C7t(){const t=this.JJt(0);return t?t.ky():0},m7t(t){const s=this.JJt(t);return s?s.Ny():0},g7t(t){const s=this.JJt(t);return s?s.ky():0},S7t(t){const s=this.nJt.get(t);return s?s.Ny():0},y7t(t){const s=this.nJt.get(t);return s?s.ky():0},_7t(t){const s=this.JJt(t);return s?s.nW():0},T7t(t){const s=this.nJt.get(t);return s?s.nW():0},A7t(t){const s=this.JJt(t);return s?Xa.bn(s.GetAngle()):0},E7t(t){const s=this.nJt.get(t);return s?Xa.bn(s.GetAngle()):0},I7t(){return this.Af.BBt(),this.aJt},w7t(){return this.Af.BBt(),this.lJt},R7t(){return this.Af.BBt(),this.cJt},M7t(){return this.Af.BBt(),this.uJt},b7t(){return this.Af.WBt(),this.CJt},G7t(){return this.Af.WBt(),this.mJt},v7t(){return this.Af.WBt(),this.gJt},P7t(){return this.Af.WBt(),this.fJt},O7t(){return this.Af.WBt(),this.dJt},x7t(){return this.Af.WBt(),this.pJt},L7t(){return this.SJt},D7t(){return this.yJt},N7t(t){const s=this.nJt.get(t);return s?s.AC():0},F7t(t){const s=this.nJt.get(t);return s?s.OC():0},$7t(t){const s=this.nJt.get(t);return s?s.k7t():0}}}{let C33=self.Bs,GESTURE_HOLD_THRESHOLD=15,GESTURE_HOLD_TIMEOUT=500,GESTURE_TAP_TIMEOUT=333,GESTURE_DOUBLETAP_THRESHOLD=25,lastTapX=-1e3,lastTapY=-1e3,lastTapTime=-1e4;C33.GJ.Touch.xJt=class extends C33.gn{constructor(){super(),this.B7t=0,this.SI=0,this.YFt=0,this.SO=0,this.W7t=0,this.H7t=0,this.V7t=0,this.fl=0,this.dl=0,this.U7t=0,this.j7t=0,this.am=0,this.lm=0,this.X7t=0,this.Y7t=!1,this.q7t=!1}_n(){}rbt(t,s,e,i,r){this.B7t=i,this.SI=r,this.SO=t,this.W7t=t,this.YFt=t,this.H7t=s,this.V7t=e,this.fl=s,this.dl=e,this.U7t=s,this.j7t=e}_6(t,s,e,i,r,n){this.W7t=this.SO,this.SO=t,this.U7t=this.fl,this.j7t=this.dl,this.fl=s,this.dl=e,this.am=i,this.lm=r,this.X7t=n,!this.q7t&&C33.Pn(this.H7t,this.V7t,this.fl,this.dl)>=GESTURE_HOLD_THRESHOLD&&(this.q7t=!0)}mH(){return this.B7t}FJt(){return this.SI}AP(){return this.SO}YJt(t){this.W7t=t}Ny(){return this.fl}ky(){return this.dl}nW(){const t=C33.Pn(this.fl,this.dl,this.U7t,this.j7t),s=(this.SO-this.W7t)/1e3;return 0<s?t/s:0}GetAngle(){return C33.xn(this.U7t,this.j7t,this.fl,this.dl)}AC(){return this.am}OC(){return this.lm}k7t(){return this.X7t}qJt(t){return!this.Y7t&&t-this.YFt>=GESTURE_HOLD_TIMEOUT&&!this.q7t&&C33.Pn(this.H7t,this.V7t,this.fl,this.dl)<GESTURE_HOLD_THRESHOLD&&(this.Y7t=!0)}BJt(t){return!this.Y7t&&t-this.YFt<=GESTURE_TAP_TIMEOUT&&!this.q7t&&C33.Pn(this.H7t,this.V7t,this.fl,this.dl)<GESTURE_HOLD_THRESHOLD?t-lastTapTime<=2*GESTURE_TAP_TIMEOUT&&C33.Pn(lastTapX,lastTapY,this.fl,this.dl)<GESTURE_DOUBLETAP_THRESHOLD?(lastTapX=-1e3,lastTapY=-1e3,lastTapTime=-1e4,"double-tap"):(lastTapX=this.fl,lastTapY=this.dl,lastTapTime=t,"single-tap"):""}l7t(t,s,e){if(void 0===s){const i=t.YD(0);return i.v8(this.fl,this.dl)[e?0:1]}{const r=t.jD(s);return r?r.Dk(this.fl,this.dl)[e?0:1]:0}}}}{const a=self.Bs;a.GJ.Keyboard=class extends a.AAt{constructor(t){super(t)}_n(){super._n()}}}{let GetKeyboardSdkInstance2=function(){return r.WF().N5()};GetKeyboardSdkInstance=GetKeyboardSdkInstance2;const d=self.Bs,e=self.zs;d.GJ.Keyboard.FRt=class extends d.hEt{constructor(t){super(t)}_n(){super._n()}jAt(){}XAt(){return self.K7t}};let r=null;self.K7t=class extends self.HF{constructor(t){super(t),(r=t).cN().OD().keyboard=this}z7t(t){const s=GetKeyboardSdkInstance2();if("string"==typeof t)return s.J7t(t);if("number"==typeof t)return s.Q7t(t);throw new TypeError("expected string or number")}}}{const m=self.Bs,n="keyboard";m.GJ.Keyboard.Instance=class extends m.uEt{constructor(t,s){super(t,n),this.Z7t=new Set,this.t9t=new Set,this.s9t=0,this.e9t="",this.i9t="",this.r9t=!1;const e=this.cN().ed();this.Wd=new m.$d(m.Od.Fd(e,"keydown",t=>this.n9t(t.data)),m.Od.Fd(e,"keyup",t=>this.h9t(t.data)),m.Od.Fd(e,"window-blur",()=>this.o9t()),m.Od.Fd(e,"keyboard-blur",()=>this.o9t())),this.Af.iN(this.Dy())}_n(){super._n()}async Dy(){const t=await this.IEt("init");this.r9t=t.isKeyboardLockSupported}n9t(t){const s=t.which,e=t.code||s.toString(),i=t.key;this.Z7t.has(e)||(this.Z7t.add(e),this.t9t.add(s),this.e9t=e,this.s9t=s,this.i9t=i,this.LB(m.GJ.Keyboard.MJ.a9t),this.LB(m.GJ.Keyboard.MJ.l9t),this.LB(m.GJ.Keyboard.MJ.c9t),this.LB(m.GJ.Keyboard.MJ.u9t))}h9t(t){const s=t.which,e=t.code||s.toString(),i=t.key;this.Z7t.delete(e),this.t9t.delete(s),this.e9t=e,this.s9t=s,this.i9t=i,this.LB(m.GJ.Keyboard.MJ.f9t),this.LB(m.GJ.Keyboard.MJ.d9t),this.LB(m.GJ.Keyboard.MJ.p9t),this.LB(m.GJ.Keyboard.MJ.C9t)}o9t(){for(const t of this.t9t)this.t9t.delete(t),this.s9t=t,this.LB(m.GJ.Keyboard.MJ.f9t),this.LB(m.GJ.Keyboard.MJ.d9t),this.LB(m.GJ.Keyboard.MJ.C9t);this.Z7t.clear()}J7t(t){return this.Z7t.has(t)}Q7t(t){return this.t9t.has(t)}Ky(){return{tk:this.s9t,tkk:this.i9t}}zy(t){this.s9t=t.tk,t.hasOwnProperty("tkk")&&(this.i9t=t.tkk)}LEt(){const t="plugins.keyboard";return[{title:t+".name",properties:[{name:t+".debugger.last-key-code",value:this.s9t},{name:t+".debugger.last-key-string",value:m.GJ.Keyboard.Cnt.m9t(this.s9t)},{name:t+".debugger.last-typed-key",value:this.i9t}]}]}}}{const I=self.Bs,J=["ShiftLeft","ShiftRight","ControlLeft","ControlRight","AltLeft","AltRight","MetaLeft","MetaRight"];I.GJ.Keyboard.MJ={J7t(t){return this.t9t.has(t)},l9t(t){return this.s9t===t},a9t(){return!0},f9t(){return!0},d9t(t){return this.s9t===t},Q7t(t){return t=Math.floor(t),this.t9t.has(t)},u9t(t){return this.s9t===t},C9t(t){return this.s9t===t},c9t(t){const s=J[t];return this.e9t===s},p9t(t){const s=J[t];return this.e9t===s},g9t(t){const s=J[t];return this.Z7t.has(s)},S9t(){return this.r9t},y9t(){return!0},_9t(){return!0}}}{const W=self.Bs;W.GJ.Keyboard.pnt={async T9t(s){if(this.r9t){let t=[];s&&(t=s.split(","));const e=await this.IEt("lock-keyboard",{keysArr:t});e.isOk?this.LB(W.GJ.Keyboard.MJ.y9t):this.LB(W.GJ.Keyboard.MJ._9t)}},A9t(){this.r9t&&this.IEt("unlock-keyboard")}}}{let StringFromCharCode2=function(t){switch(t=Math.floor(t)){case 8:return"backspace";case 9:return"tab";case 13:return"enter";case 16:return"shift";case 17:return"control";case 18:return"alt";case 19:return"pause";case 20:return"capslock";case 27:return"esc";case 33:return"pageup";case 34:return"pagedown";case 35:return"end";case 36:return"home";case 37:return"←";case 38:return"↑";case 39:return"→";case 40:return"↓";case 45:return"insert";case 46:return"del";case 91:return"left window key";case 92:return"right window key";case 93:return"select";case 96:return"numpad 0";case 97:return"numpad 1";case 98:return"numpad 2";case 99:return"numpad 3";case 100:return"numpad 4";case 101:return"numpad 5";case 102:return"numpad 6";case 103:return"numpad 7";case 104:return"numpad 8";case 105:return"numpad 9";case 106:return"numpad *";case 107:return"numpad +";case 109:return"numpad -";case 110:return"numpad .";case 111:return"numpad /";case 112:return"F1";case 113:return"F2";case 114:return"F3";case 115:return"F4";case 116:return"F5";case 117:return"F6";case 118:return"F7";case 119:return"F8";case 120:return"F9";case 121:return"F10";case 122:return"F11";case 123:return"F12";case 144:return"numlock";case 145:return"scroll lock";case 186:return";";case 187:return"=";case 188:return",";case 189:return"-";case 190:return".";case 191:return"/";case 192:return"'";case 219:return"[";case 220:return"\\";case 221:return"]";case 222:return"#";case 223:return"`";default:return String.fromCharCode(t)}};StringFromCharCode=StringFromCharCode2;const $=self.Bs;$.GJ.Keyboard.Cnt={E9t(){return this.s9t},m9t(t){return StringFromCharCode2(t)},I9t(){return this.i9t}}}{const C33=self.Bs;C33.GJ.ge=class BrowserPlugin extends C33.AAt{constructor(t){super(t)}_n(){super._n()}}}{const C33=self.Bs;C33.GJ.ge.FRt=class BrowserType extends C33.hEt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{const C33=self.Bs,DOM_COMPONENT_ID="browser";C33.GJ.ge.Instance=class BrowserInstance extends C33.uEt{constructor(t,s){super(t,DOM_COMPONENT_ID),this.w9t="",this.R9t=!1,this.M9t="",this.b9t="",this.G9t=!1,this.v9t=0,this.P9t=0,this.O9t=0,this.x9t=0,this.L9t=!1,this.D9t=!1,this.N9t=new Map,this.F9t=!1,this.$9t="",this.k9t=!1,this.AEt([["online-state",t=>this.B9t(t)],["backbutton",()=>this.W9t()],["sw-message",t=>this.H9t(t)],["hashchange",t=>this.V9t(t)],["install-available",()=>this.U9t()],["app-installed",t=>this.j9t(t)]]);const e=this.cN().ed();this.Wd=new C33.$d(C33.Od.Fd(e,"afterfirstlayoutstart",()=>this.X9t()),C33.Od.Fd(e,"window-resize",()=>this.NLt()),C33.Od.Fd(e,"window-focus",()=>this.F$t()),C33.Od.Fd(e,"window-blur",()=>this.N$t()),C33.Od.Fd(e,"suspend",()=>this.Y9t()),C33.Od.Fd(e,"resume",()=>this.q9t())),this.Af.iN(this.IEt("get-initial-state",{exportType:this.Af.qN()}).then(t=>{this.w9t=t.location,this.R9t=t.isOnline,this.M9t=t.referrer,this.b9t=t.title,this.G9t=t.isCookieEnabled,this.v9t=t.screenWidth,this.P9t=t.screenHeight,this.O9t=t.windowOuterWidth,this.x9t=t.windowOuterHeight,this.L9t=t.windowHasFocus,this.D9t=t.isConstructArcade}))}_n(){super._n()}X9t(){this.EEt("ready-for-sw-messages")}async B9t(t){const s=!!t.isOnline;this.R9t!==s&&(this.R9t=s,this.R9t?await this.NB(C33.GJ.ge.MJ.K9t):await this.NB(C33.GJ.ge.MJ.z9t))}async NLt(){await this.NB(C33.GJ.ge.MJ.J9t)}async F$t(){this.L9t=!0,await this.NB(C33.GJ.ge.MJ.Q9t)}async N$t(){this.L9t=!1,await this.NB(C33.GJ.ge.MJ.Z9t)}Y9t(){this.LB(C33.GJ.ge.MJ.tQt)}q9t(){this.LB(C33.GJ.ge.MJ.sQt)}async W9t(){await this.NB(C33.GJ.ge.MJ.eQt)}H9t(t){const s=t.type;"downloading-update"===s?this.LB(C33.GJ.ge.MJ.iQt):"update-ready"===s||"update-pending"===s?this.LB(C33.GJ.ge.MJ.rQt):"offline-ready"===s&&this.LB(C33.GJ.ge.MJ.nQt)}V9t(t){this.w9t=t.location,this.LB(C33.GJ.ge.MJ.hQt)}U9t(){this.F9t=!0,this.LB(C33.GJ.ge.MJ.oQt)}j9t(t){this.F9t=!1,this.LB(C33.GJ.ge.MJ.aQt)}lQt(){return this.k9t}cQt(t){this.k9t!==(t=!!t)&&(this.k9t=t,this.EEt("set-warn-on-close",{enabled:t}))}LEt(){const t="plugins.browser.debugger";return[{title:"plugins.browser.name",properties:[{name:t+".user-agent",value:navigator.userAgent},{name:t+".is-online",value:this.R9t},{name:t+".is-fullscreen",value:this.Af.QN().mDt()}]}]}}}{const C33=self.Bs;C33.GJ.ge.MJ={uQt(){return this.R9t},K9t(){return!0},z9t(){return!0},J9t(){return!0},Q9t(){return!0},Z9t(){return!0},fQt(){return this.L9t},dQt(){return this.G9t},pQt(){return this.Af.QN().mDt()},eQt(){return!0},CQt(t){const s=this.Af.QN().eV(),e=this.Af.QN().iV(),i=s<=e?0:1;return i===t},iQt(){return!0},rQt(){return!0},nQt(){return!0},hQt(){return!0},oQt(){return!0},mQt(){return this.F9t},gQt(t){switch(t){case 0:return"accepted"===this.$9t;case 1:return"dismissed"===this.$9t;case 2:return"error"===this.$9t;case 3:return!0;default:return!1}},aQt(){return!0},SQt(t){const s=this.Af.QN().SDt();switch(t){case 0:return"browser"===s;case 1:return"minimal-ui"===s;case 2:return"standalone"===s;case 3:return"fullscreen"===s;default:return!1}},yQt(){return this.lQt()},_Qt(){return!this.Af.XL()},tQt(){return!0},sQt(){return!0},TQt(){return!1},AQt(){return!1},EQt(){return!1},IQt(){return!1},wQt(){return!1},RQt(){return!0},MQt(){return!0}}}{const C3=self.Bs,ORIENTATIONS=["portrait","landscape","portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"];C3.GJ.ge.pnt={bQt(t){this.EEt("alert",{message:t.toString()})},GQt(){this.D9t||(this.Af.UB()?self.C3Debugger.CloseWindow():this.EEt("close"))},vQt(){this.EEt("set-focus",{isFocus:!0})},PQt(){this.EEt("set-focus",{isFocus:!1})},OQt(){this.D9t||this.EEt("navigate",{type:"back"})},xQt(){this.D9t||this.EEt("navigate",{type:"forward"})},LQt(){},DQt(){this.D9t||(this.Af.UB()?this.Af.Y$t({type:"reload"}):this.EEt("navigate",{type:"reload"}))},NQt(t,s){this.wEt("navigate",{type:"url",url:t,target:s,exportType:this.Af.qN()})},FQt(t,s){this.wEt("navigate",{type:"new-window",url:t,tag:s,exportType:this.Af.qN()})},$Qt(t,s){2<=t&&(t+=1),1===(t=6===t?2:t)&&(t=0);const e=C3.mxt.IDt(t);this.Af.QN()._Dt(e),this.wEt("request-fullscreen",{navUI:s})},kQt(){this.wEt("exit-fullscreen")},BQt(t){const e=t.split(",");for(let t=0,s=e.length;t<s;++t)e[t]=parseInt(e[t],10);this.wEt("vibrate",{pattern:e})},async FD(t,s){if(t&&s){const e=await this.Af.Jx().mN(t);this.Af.FD(e,s)}},WQt(t,s,e){if(e){const i=`data:${s},`+encodeURIComponent(t);this.Af.FD(i,e)}},HQt(t,s){s=s.toString(),0===t?console.log(s):1===t?console.warn(s):2===t&&console.error(s)},VQt(t){console.group(t)},UQt(){console.groupEnd()},jQt(jsStr){try{eval(jsStr)}catch(err){console.error("Error executing JavaScript: ",err)}},XQt(t){if(!((t=Math.floor(t))<0||t>=ORIENTATIONS.length)){const s=ORIENTATIONS[t];this.wEt("lock-orientation",{orientation:s})}},YQt(){this.wEt("unlock-orientation")},bN(t){this.Af.Jx().bN(t)},async qQt(t,s,e,i){await this.IEt("set-document-css-style",{prop:C3.zo(t),value:s,selector:e,"is-all":0!==i})},async KQt(t,s,e){const i=await this.IEt("get-document-css-style",{prop:t,selector:s});i.isOk&&this.N9t.set(e.toLowerCase(),i.result.trim())},zQt(t){this.EEt("set-hash",{hash:t})},JQt(t,s){this.EEt("set-window-size",{windowWidth:t,windowHeight:s})},QQt(t,s){this.EEt("set-window-position",{windowX:t,windowY:s})},async ZQt(){const t=await this.IEt("request-install");this.$9t=t.result,this.LB(C3.GJ.ge.MJ.gQt)},tZt(t){this.cQt(t)}}}{const C3=self.Bs;C3.GJ.ge.Cnt={URL(){return this.Af.cL()?this.w9t:location.toString()},sZt(){return(this.Af.cL()?new URL(this.w9t):location).protocol},eZt(){return(this.Af.cL()?new URL(this.w9t):location).hostname},iZt(){return(this.Af.cL()?new URL(this.w9t):location).port},rZt(){return(this.Af.cL()?new URL(this.w9t):location).pathname},nZt(){return(this.Af.cL()?new URL(this.w9t):location).hash},ue(){return(this.Af.cL()?new URL(this.w9t):location).search},hZt(t){const s=(this.Af.cL()?new URL(this.w9t):location).search,e=RegExp("[?&]"+t+"=([^&]*)").exec(s);return e?decodeURIComponent(e[1].replace(/\+/g," ")):""},oZt(){return this.M9t},aZt(){return this.b9t},lZt(){return navigator.language},pe(){return navigator.platform},cZt(){return navigator.userAgent},uZt(jsStr){let result=0;try{result=eval(jsStr)}catch(err){console.error("Error executing JavaScript: ",err)}return"number"==typeof result||"string"==typeof result?result:"boolean"==typeof result&&result?1:0},CSSStyleValue(t){return this.N9t.get(t)||""},fZt(){return navigator.appName},dZt(){return navigator.appVersion},pZt(){return navigator.product},CZt(){return navigator.vendor},mZt(){return 1},gZt(){return 1/0},SZt(){const t=navigator.connection;return t&&(t.downlink||t.downlinkMax||t.bandwidth)||1/0},ConnectionType(){const t=navigator.connection;return t&&t.type||"unknown"},yZt(){return self.devicePixelRatio},_Zt(){return this.v9t},TZt(){return this.P9t},AZt(){return this.Af.QN().eV()},EZt(){return this.Af.QN().iV()},IZt(){return this.O9t},wZt(){return this.O9t},RZt(){return this.Af.QN().SDt()},MZt(){return this.$9t}}}{const a=self.Bs;a.GJ.bZt=class extends a.AAt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.GJ.bZt.FRt=class extends d.hEt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{let ResizeArray2=function(s,e,i){if(e<s.length)g.Yh(s,e);else if(e>s.length)if("function"==typeof i)for(let t=s.length;t<e;++t)s.push(i());else for(let t=s.length;t<e;++t)s.push(i)};ResizeArray=ResizeArray2;const g=self.Bs,h=self.zs,i=self.Xk,j=(g.GJ.bZt.Instance=class extends g.uEt{constructor(t,s){super(t),this.GZt=10,this.vZt=1,this.PZt=1,this.wu=null,this.OZt=[],this.xZt=[],this.LZt=[],this.DZt=-1,s&&(this.GZt=s[0],this.vZt=s[1],this.PZt=s[2]),this.wu=g.Qo(this.GZt,()=>g.Qo(this.vZt,()=>g.Qo(this.PZt,0)))}_n(){this.wu=null,super._n()}NZt(t,s,e){return t=Math.floor(t),s=Math.floor(s),e=Math.floor(e),0<=t&&t<this.GZt&&0<=s&&s<this.vZt&&0<=e&&e<this.PZt?this.wu[t][s][e]:0}Set(t,s,e,i){t=Math.floor(t),s=Math.floor(s),e=Math.floor(e),0<=t&&t<this.GZt&&0<=s&&s<this.vZt&&0<=e&&e<this.PZt&&(this.wu[t][s][e]=i)}cM(t,e,i){if(t=Math.floor(t),e=Math.floor(e),i=Math.floor(i),e<0&&(e=0),i<0&&(i=0),this.GZt!==(t=t<0?0:t)||this.vZt!==e||this.PZt!==i){this.GZt=t,this.vZt=e,this.PZt=i;const r=this.wu;ResizeArray2(r,t,()=>g.Qo(e,()=>g.Qo(i,0)));for(let s=0;s<t;++s){ResizeArray2(r[s],e,()=>g.Qo(i,0));for(let t=0;t<e;++t)ResizeArray2(r[s][t],i,0)}}}AC(){return this.GZt}OC(){return this.vZt}d8(){return this.PZt}FZt(t,s,e,i,r){for(;0<s;){const n=Math.floor(this.Af.TD()*s);if(--s,0===t){const h=this.NZt(s,i,r),o=this.NZt(n,i,r);this.Set(s,i,r,o),this.Set(n,i,r,h)}else if(1===t){const a=this.NZt(e,s,r),l=this.NZt(e,n,r);this.Set(e,s,r,l),this.Set(e,n,r,a)}else if(2===t){const c=this.NZt(e,i,s),u=this.NZt(e,i,n);this.Set(e,i,s,u),this.Set(e,i,n,c)}}}LEt(){const t="plugins.arr.debugger",s="plugins.arr.properties",e=[{title:t+".array-properties.title",properties:[{name:s+".width.name",value:this.GZt,qUt:t=>this.cM(t,this.vZt,this.PZt)},{name:s+".height.name",value:this.vZt,qUt:t=>this.cM(this.GZt,t,this.PZt)},{name:s+".depth.name",value:this.PZt,qUt:t=>this.cM(this.GZt,this.vZt,t)},{name:s+".elements.name",value:this.GZt*this.vZt*this.PZt}]}],i=[];if(1===this.vZt&&1===this.PZt)for(let s=0;s<this.GZt;++s)i.push({name:"$"+s,value:this.wu[s][0][0],qUt:t=>this.wu[s][0][0]=t});else for(let t=0;t<this.GZt;++t)i.push({name:"$"+t,value:this.wu[t].toString()});return i.length&&e.push({title:t+".array-data.title",properties:i}),e}$Zt(){return JSON.stringify({c2array:!0,size:[this.GZt,this.vZt,this.PZt],data:this.wu})}Ky(){return{size:[this.GZt,this.vZt,this.PZt],data:this.wu}}zy(t){const s=t.size;this.GZt=s[0],this.vZt=s[1],this.PZt=s[2],this.wu=t.data}kZt(){return 0<=this.DZt&&this.DZt<this.OZt.length?this.OZt[this.DZt]:0}BZt(){return 0<=this.DZt&&this.DZt<this.xZt.length?this.xZt[this.DZt]:0}WZt(){return 0<=this.DZt&&this.DZt<this.LZt.length?this.LZt[this.DZt]:0}XAt(){return self.HZt}},new WeakMap);self.HZt=class extends i{constructor(){super(),j.set(this,i.Jk().N5())}get width(){return j.get(this).AC()}get height(){return j.get(this).OC()}get depth(){return j.get(this).d8()}m$(t,s=1,e=1){h.Ei(t),h.Ei(s),h.Ei(e),j.get(this).cM(t,s,e)}VZt(t,s=0,e=0){return h.Ei(t),h.Ei(s),h.Ei(e),j.get(this).NZt(t,s,e)}UZt(t,s,e=0,i=0){if(h.Ei(s),h.Ei(e),h.Ei(i),"number"!=typeof t&&"string"!=typeof t)throw new TypeError("invalid type");j.get(this).Set(s,e,i,t)}}}{let DoForEachTrigger2=function(t,s,e,i,r,n){t.cU(e);const h=n.qk().s$();h.ddt(n.fH()),s.uU(i,r),t.fU(e)};DoForEachTrigger=DoForEachTrigger2;const ma=self.Bs;ma.GJ.bZt.MJ={Pyt(t,s,e){return ma.compare(this.NZt(t,0,0),s,e)},jZt(t,s,e,i){return ma.compare(this.NZt(t,s,0),e,i)},XZt(t,s,e,i,r){return ma.compare(this.NZt(t,s,e),i,r)},YZt(t){const s=this.Af,i=s.RL(),r=s.OL(),n=r.iU(),e=s.kL(),h=e.rU(),o=e.nU(r),a=++this.DZt,l=this.OZt,c=this.xZt,u=this.LZt,f=this.GZt,d=this.vZt,p=this.PZt;if(a===this.OZt.length?(l.push(0),c.push(0),u.push(0)):(l[a]=0,c[a]=0,u[a]=0),s.aU(!1),0===t)for(let e=0;e<f;++e)for(let s=0;s<d;++s)for(let t=0;t<p;++t)l[a]=e,c[a]=s,u[a]=t,DoForEachTrigger2(i,r,n,h,o,this);else if(1===t)for(let s=0;s<f;++s)for(let t=0;t<d;++t)l[a]=s,c[a]=t,DoForEachTrigger2(i,r,n,h,o,this);else for(let t=0;t<f;++t)l[a]=t,DoForEachTrigger2(i,r,n,h,o,this);return s.aU(!0),this.DZt--,e.mU(),!1},qZt(t,s){return ma.compare(this.NZt(this.kZt(),this.BZt(),this.WZt()),t,s)},KZt(i){const t=this.GZt,r=this.vZt,n=this.PZt,h=this.wu;for(let e=0;e<t;++e)for(let s=0;s<r;++s)for(let t=0;t<n;++t)if(h[e][s][t]===i)return!0;return!1},Su(){return 0===this.GZt||0===this.vZt||0===this.PZt},zZt(t,s,e){let i=0;switch(t){case 0:i=this.GZt;break;case 1:i=this.vZt;break;case 2:i=this.PZt}return ma.compare(i,s,e)}}}{let CompareValues2=function(t,s){if("number"==typeof t&&"number"==typeof s)return t-s;{const e=t.toString(),i=s.toString();return e<i?-1:i<e?1:0}};CompareValues=CompareValues2;const n0=self.Bs;n0.GJ.bZt.pnt={gu(i){const t=this.GZt,r=this.vZt,n=this.PZt,h=this.wu;for(let e=0;e<t;++e)for(let s=0;s<r;++s)for(let t=0;t<n;++t)h[e][s][t]=i},cM(t,s,e){this.cM(t,s,e)},Fy(t,s){this.Set(t,0,0,s)},f4(t,s,e){this.Set(t,s,0,e)},JZt(t,s,e,i){this.Set(t,s,e,i)},nU(e,i,t){const r=this.GZt,n=this.vZt,s=this.PZt,h=this.wu;if(0===t){const o=n0.Qo(n,()=>n0.Qo(s,i));0===e?h.push(o):h.unshift(o),this.GZt++}else if(1===t){for(let t=0;t<r;++t){const a=n0.Qo(s,i);0===e?h[t].push(a):h[t].unshift(a)}this.vZt++}else{for(let s=0;s<r;++s)for(let t=0;t<n;++t)0===e?h[s][t].push(i):h[s][t].unshift(i);this.PZt++}},mU(e,t){const i=this.GZt,r=this.vZt,s=this.PZt,n=this.wu;if(0===t)0!==i&&(0===e?n.pop():n.shift(),this.GZt--);else if(1===t){if(0!==r){for(let t=0;t<i;++t)0===e?n[t].pop():n[t].shift();this.vZt--}}else if(0!==s){for(let s=0;s<i;++s)for(let t=0;t<r;++t)0===e?n[s][t].pop():n[s][t].shift();this.PZt--}},QZt(t){const e=this.GZt,i=this.vZt,s=this.PZt,r=this.wu;if(0!==e&&0!==i&&0!==s)if(0===t)r.reverse();else if(1===t)for(let t=0;t<e;++t)r[t].reverse();else for(let s=0;s<e;++s)for(let t=0;t<i;++t)r[s][t].reverse()},ZZt(t){const e=this.GZt,i=this.vZt,s=this.PZt,r=this.wu;if(0!==e&&0!==i&&0!==s)if(0===t)r.sort((t,s)=>CompareValues2(t[0][0],s[0][0]));else if(1===t)for(let t=0;t<e;++t)r[t].sort((t,s)=>CompareValues2(t[0],s[0]));else for(let s=0;s<e;++s)for(let t=0;t<i;++t)r[s][t].sort(CompareValues2)},tts(t){const r=this.GZt,n=this.vZt,s=this.PZt,h=this.wu;if(0!==r&&0!==n&&0!==s)if(0===t)h.sort((s,e)=>{for(let t=0;t<n;++t){const i=CompareValues2(s[t][0],e[t][0]);if(0!==i)return i}return 0});else if(1===t)for(let s=0;s<n;++s){const e=[];for(let t=0;t<r;++t)e.push(h[t][s]);e.sort((t,s)=>CompareValues2(t[0],s[0]));for(let t=0;t<r;++t)h[t][s]=e[t]}else if(2===t){const i=[];for(let t=0;t<n;++t)i.push(t);i.sort((s,e)=>{for(let t=0;t<r;++t){const i=CompareValues2(h[t][s],h[t][e]);if(0!==i)return i}return 0});for(let s=0;s<r;++s){let t=[];for(const o of i)t.push(h[s][o]);h[s]=t}}else if(3===t)for(let t=0;t<r;++t)h[t].sort((t,s)=>CompareValues2(t[0],s[0]));else for(let s=0;s<r;++s)for(let t=0;t<n;++t)h[s][t].sort(CompareValues2)},sts(e){const i=this.GZt,r=this.vZt,n=this.PZt;if(0!==i&&0!==r&&0!==n)if(0===e)for(let s=0;s<r;++s)for(let t=0;t<n;++t)this.FZt(e,i,0,s,t);else if(1===e)for(let s=0;s<i;++s)for(let t=0;t<n;++t)this.FZt(e,r,s,0,t);else for(let s=0;s<i;++s)for(let t=0;t<r;++t)this.FZt(e,n,s,t,0)},yu(e,t){if(!((e=Math.floor(e))<0)){const i=this.GZt,r=this.vZt,s=this.PZt,n=this.wu;if(0===t)i<=e||(n.splice(e,1),this.GZt--);else if(1===t){if(!(r<=e)){for(let t=0;t<i;++t)n[t].splice(e,1);this.vZt--}}else if(!(s<=e)){for(let s=0;s<i;++s)for(let t=0;t<r;++t)n[s][t].splice(e,1);this.PZt--}}},c6(e,i,t){if(!((i=Math.floor(i))<0)){const r=this.GZt,n=this.vZt,s=this.PZt,h=this.wu;if(0===t)r<i||(h.splice(i,0,n0.Qo(n,()=>n0.Qo(s,e))),this.GZt++);else if(1===t){if(!(n<i)){for(let t=0;t<r;++t)h[t].splice(i,0,n0.Qo(s,e));this.vZt++}}else if(!(i>s)){for(let s=0;s<r;++s)for(let t=0;t<n;++t)h[s][t].splice(i,0,e);this.PZt++}}},ets(t,s,e){const i=t.split(s);this.cM(i.length,1,1);for(let s=0,t=i.length;s<t;++s){let t=i[s];0===e?String(Number(t))===t&&(t=Number(t)):2===e&&(t=Number(t)),this.Set(s,0,0,t)}},its(t){let s=null;try{s=JSON.parse(t)}catch(t){return void console.error("[Construct] Failed to parse JSON: ",t)}if(s.c2array){const e=s.size;this.GZt=e[0],this.vZt=e[1],this.PZt=e[2],this.wu=s.data}},rts(t){const s=URL.createObjectURL(new Blob([this.$Zt()],{type:"application/json"}));this.Af.FD(s,t)}}}{const Q1=self.Bs;Q1.GJ.bZt.Cnt={NZt(t,s,e){return this.NZt(t,s||0,e||0)},DTt(){return this.GZt},NTt(){return this.vZt},nts(){return this.PZt},hts(){return this.kZt()},ots(){return this.BZt()},ats(){return this.WZt()},lts(){return this.NZt(this.kZt(),this.BZt(),this.WZt())},b0(){return this.NZt(0,0,0)},cts(){return this.NZt(this.GZt-1,0,0)},uts(e){const i=this.wu;for(let t=0,s=this.GZt;t<s;++t)if(i[t][0][0]===e)return t;return-1},fts(s){const e=this.wu;for(let t=this.GZt-1;0<=t;--t)if(e[t][0][0]===s)return t;return-1},dts(t){let s=[];for(let t=0;t<this.GZt;++t)s.push(this.NZt(t,0,0));return s.join(t)},wTt(){return this.$Zt()}}}{const a=self.Bs;a.GJ.pts=class extends a.AAt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.GJ.pts.FRt=class extends d.hEt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{const g=self.Bs,h="localstorage";g.GJ.pts.Instance=class extends g.uEt{constructor(t,s){super(t,h),this.Cts="",this.nI="",this.gts=[],this.Sts="",this.yts=!1,this._ts=0,this.Tts=0,this.Ats=!1,s&&(this.Ats=s[0]);const e=this.Af.uF();this.cF=null,this.Ats?this.cF=e.We({He:!0}):this.cF=e,this.Ets=new Map,this.Its=!1,this.Af.iN(this.Dy())}async Dy(){const t=await Promise.race([this.IEt("init"),g.Hh(3e3)]);t&&(this.yts=t.isPersistent)}_n(){super._n()}async wts(t){this.Sts=this.Rts(t),await this.NB(g.GJ.pts.MJ.Mts)}Rts(t){return t?"string"==typeof t?t:"string"==typeof t.message?t.message:"string"==typeof t.name?t.name:"string"==typeof t.data?t.data:"unknown error":"unknown error"}LEt(){return this.Its||this.bts(),[{title:"plugins.localstorage.name",properties:[...this.Ets.entries()].map(s=>({name:"$"+s[0],value:s[1],qUt:t=>this.cF.setItem(s[0],t)}))}]}async bts(){this.Its=!0;try{const e=await this.cF.keys(),i=(e.sort((t,s)=>{const e=t.toLowerCase(),i=s.toLowerCase();return e<i?-1:i<e?1:0}),await Promise.all(e.map(t=>this.cF.getItem(t))));this.Ets.clear();for(let t=0,s=e.length;t<s;++t)this.Ets.set(e[t],i[t])}catch(t){console.warn("[C3 debugger] Error displaying local storage: ",t)}finally{this.Its=!1}}}}{const B=self.Bs;B.GJ.pts.MJ={Gts(t){return this.Cts===t},vts(){return!0},Pts(t){return this.Cts===t},Ots(){return!0},xts(t){return this.Cts===t},Lts(){return!0},Dts(){return!0},Nts(){return!0},Mts(){return!0},Fts(t){return this.Cts===t},$ts(t){return this.Cts===t},kts(t,s){return B.compare(this.Cts,t,s)},Bts(t,s){return B.compare(this.nI,t,s)},Wts(){return 0<this.Tts},Hts(){return 0<this._ts},Vts(){return!0},Uts(){return!0},jts(){return this.yts}}}{let IsExpressionType2=function(t){return"string"==typeof t||"number"==typeof t};IsExpressionType=IsExpressionType2;const L=self.Bs;L.GJ.pts.pnt={async Xts(t,s){this.Tts++;try{const e=await this.cF.setItem(t,s);await this._Et(async()=>{this.Cts=t,this.nI=e,await this.NB(L.GJ.pts.MJ.vts),await this.NB(L.GJ.pts.MJ.Gts)})}catch(t){await this.wts(t)}finally{this.Tts--,0===this.Tts&&await this.NB(L.GJ.pts.MJ.Vts)}},async Yts(t,s){if(s){const e=s.m_t(this.Ge);if(e){const i=e.N5();if(i){const r=i.GetArrayBufferReadOnly();this.Tts++;try{await this.cF.setItem(t,r),await this._Et(async()=>{this.Cts=t,this.nI="",await this.NB(L.GJ.pts.MJ.vts),await this.NB(L.GJ.pts.MJ.Gts)})}catch(t){await this.wts(t)}finally{this.Tts--,0===this.Tts&&await this.NB(L.GJ.pts.MJ.Vts)}}}}},async qts(t){this._ts++;try{const s=await this.cF.getItem(t);await this._Et(async()=>{this.Cts=t,this.nI=IsExpressionType2(s)?s:"",await this.NB(L.GJ.pts.MJ.Ots),await this.NB(L.GJ.pts.MJ.Pts)})}catch(t){await this.wts(t)}finally{this._ts--,0===this._ts&&await this.NB(L.GJ.pts.MJ.Uts)}},async Kts(s,t){if(t){const e=t.m_t(this.Ge);if(e){const i=e.N5();this._ts++;try{let t=await this.cF.getItem(s);t=t instanceof ArrayBuffer?t:new ArrayBuffer(0),await this._Et(async()=>{this.nI="",this.Cts=s,i.SetArrayBufferTransfer(t),await this.NB(L.GJ.pts.MJ.Ots),await this.NB(L.GJ.pts.MJ.Pts)})}catch(t){await this.wts(t)}finally{this._ts--,0===this._ts&&await this.NB(L.GJ.pts.MJ.Uts)}}}},async zts(t){try{const s=await this.cF.getItem(t);await this._Et(async()=>{this.Cts=t,null==s?(this.nI="",await this.NB(L.GJ.pts.MJ.$ts)):(this.nI=IsExpressionType2(s)?s:"",await this.NB(L.GJ.pts.MJ.Fts))})}catch(t){await this.wts(t)}},async Sf(t){try{await this.cF.removeItem(t),await this._Et(async()=>{this.Cts=t,this.nI="",await this.NB(L.GJ.pts.MJ.Lts),await this.NB(L.GJ.pts.MJ.xts)})}catch(t){await this.wts(t)}},async Jts(){try{await this.cF.clear(),await this._Et(async()=>{this.Cts="",this.nI="",L.qh(this.gts),await this.NB(L.GJ.pts.MJ.Dts)})}catch(t){await this.wts(t)}},async Qts(){try{const t=await this.cF.keys();await this._Et(async()=>{this.gts=t,await this.NB(L.GJ.pts.MJ.Nts)})}catch(t){await this.wts(t)}},async Zts(){const t=await this.IEt("request-persistent");t.isOk&&(this.yts=t.isPersistent)},tss(s){if(this.Ats){let t;try{t=JSON.parse(s)}catch(t){return void console.error("[Local Storage] Failed to parse memory storage JSON: ",t)}t&&t["is-c3-storage"]&&Array.isArray(t.items)||console.error("[Local Storage] Failed to load memory storage JSON: invalid data"),this.cF.Be(new Map(t.items))}}}}{const qa=self.Bs;qa.GJ.pts.Cnt={sss(){return this.nI},Key(){return this.Cts},ess(){return this.gts.length},iss(t){return(t=Math.floor(t))<0||t>=this.gts.length?"":this.gts[t]},rss(){return this.Sts},nss(){return this.Ats?JSON.stringify({"is-c3-storage":!0,items:[...this.cF.ke()]}):""}}}{const a=self.Bs,b=[];a.GJ.Audio=class extends a.AAt{constructor(t){super(t)}hss(t){b.push(t)}static async oss(){await Promise.all(b),a.qh(b)}_n(){super._n()}}}{let GetAudioSdkInstance2=function(){return e.WF().N5()},GetAudioDOMInterface2=function(){if(self.C3Audio_DOMInterface)return self.C3Audio_DOMInterface;throw new Error("audio scripting API cannot be used here - make sure the project is using DOM mode, not worker mode")};GetAudioSdkInstance=GetAudioSdkInstance2,GetAudioDOMInterface=GetAudioDOMInterface2;const f=self.Bs,g=self.zs;f.GJ.Audio.FRt=class extends f.hEt{constructor(t){super(t)}_n(){super._n()}jAt(){}XAt(){return self.ass}};let e=null;self.ass=class extends self.HF{constructor(t){super(t),e=t}get lss(){return GetAudioDOMInterface2().GetAudioContextExtern()}get css(){return GetAudioDOMInterface2().GetDestinationNodeExtern()}get isSilent(){return GetAudioSdkInstance2().uss()}set isSilent(t){GetAudioSdkInstance2().fss(t)}get masterVolume(){return GetAudioSdkInstance2().dss()}set masterVolume(t){g.Ei(t),GetAudioSdkInstance2().pss(t)}Css(){GetAudioSdkInstance2().mss()}}}{const o=self.Bs,p="audio",q=["interactive","balanced","playback"];o.GJ.Audio.Instance=class extends o.uEt{constructor(t,s){super(t,p),this.gss=0,this.Sss=[],this.yss=!0,this._ss=0,this.Tss=0,this.Ass=!1,this.Ess=1,this.Iss=1,this.wss=[this.Af.Bq()/2,this.Af.Wq()/2,600],this.Rss=[0,0,-1],this.Mss=[0,1,0],this.bss=600,this.Gss=1e4,this.vss=1,this.Pss=null,this.Oss=-1,this.xss=1,this.Lss=!1,this.Dss=0,this.Nss="suspended",this.Fss=0,this.$ss=new Map,this.kss=0,this.Bss=0,this.Wss=new Map,this.Hss=new Map;let e="interactive";s&&(this._ss=s[0],this.Tss=s[1],this.Ass=s[2],e=q[s[3]],this.yss=s[4],this.Ess=s[5],this.Iss=s[6],this.wss[2]=s[7],this.bss=s[8],this.Gss=s[9],this.vss=s[10]),this.Vss=[],this.Uss=[],this.jss=[],this.AEt([["state",t=>this.Xss(t)],["audiocontext-state",t=>this.Yss(t)],["fxstate",t=>this.qss(t)],["trigger",t=>this.Kss(t)],["buffer-metadata",t=>this.zss(t)]]);const i=this.cN().ed(),r=(this.Wd=new o.$d(o.Od.Fd(i,"instancedestroy",t=>this.Jss(t.q5)),o.Od.Fd(i,"afterload",()=>this.e9()),o.Od.Fd(i,"suspend",()=>this.Y9t()),o.Od.Fd(i,"resume",()=>this.q9t())),this.Af.qN()),n="Safari"===o.pe.ge,h=this.Af.hBt()||"macos-wkwebview"===r,a=this.Af.Jx().iX(),l="playable-ad-single-file"===this.Af.qN(),c=n||h||a||l;this.Af.iN(this.IEt("create-audio-context",{preloadList:this.Af.Jx().DX().map(t=>({originalUrl:t.originalUrl,url:t.url,type:t.type,fileSize:t.fileSize})),timeScaleMode:this._ss,latencyHint:e,panningModel:this.Ess,distanceModel:this.Iss,refDistance:this.bss,maxDistance:this.Gss,rolloffFactor:this.vss,listenerPos:this.wss,usePlayMusicAsSoundWorkaround:c}).then(t=>{this.Dss=t.sampleRate,this.Nss=t.audioContextState,this.Fss=t.outputLatency})),this.vEt()}_n(){this.Pss=null,super._n()}Qss(t){return this.yss?t.split(" ").filter(t=>!!t):t?[t]:[]}Zss(s,t){for(const e of t){let t=!1;for(const i of s)if(o.wr(i,e)){t=!0;break}if(!t)return!1}return!0}tes(t,s){return this.Zss(t,this.Qss(s))}hss(t){this.UF().hss(t)}Jss(t){this.Pss===t&&(this.Pss=null)}ses(t){return Math.pow(10,t/20)}ees(t){const s=this.ses(t);return isFinite(s)?Math.max(Math.min(s,1),0):0}ies(t){return Math.log(t)/Math.log(10)*20}res(t){return this.ies(Math.max(Math.min(t,1),0))}Y9t(){this.Ass||this.EEt("set-suspended",{isSuspended:!0})}q9t(){this.Ass||this.EEt("set-suspended",{isSuspended:!1})}Xss(t){const s=t.tickCount,e=(this.Fss=t.outputLatency,this.Vss.filter(t=>t.hasOwnProperty("placeholder")&&(t.placeholder>s||-1===t.placeholder)));this.Vss=t.audioInstances,this.jss=t.analysers,0<e.length&&o.an(this.Vss,e)}zss(t){this.Wss.set(t.originalUrl,{duration:t.duration})}Yss(t){this.Nss=t.audioContextState}Int(){return this.Af.eDt()?"running":this.Nss}qss(t){this.Uss=t.fxstate}nes(t){const s=this.Qss(t);for(const e of this.Vss)if(this.Zss(e.tags,s))return e;return null}hes(t){const s=this.Qss(t);return this.Vss.some(t=>this.Zss(t.tags,s)&&t.isPlaying)}oes(t,s,e,i,r){if(this.hes(s))return null;const n=this.Wss.get(t),h={tags:this.Qss(s),duration:n?n.duration:0,volume:r,isPlaying:!0,playbackTime:0,playbackRate:1,uid:-1,bufferOriginalUrl:t,bufferUrl:"",bufferType:"",isMusic:e,isLooping:i,isMuted:!1,resumePosition:0,pan:null,placeholder:-1};return this.Vss.push(h),h}aes(t){const s=this.Qss(t);for(const e of this.Vss)this.Zss(e.tags,s)&&(e.isPlaying=!1)}async Kss(t){const s=t.type,e=(this.Sss=t.tags,t.aiid);if("ended"===s){for(const i of this.Vss)if(i.aiid===e){i.isPlaying=!1;break}await this.NB(o.GJ.Audio.MJ.les)}else"fade-ended"===s&&await this.NB(o.GJ.Audio.MJ.ces)}ues(t){return this.tes(this.Sss,t)}Z9(){const t={timeScale:this.Af.ZL(),gameTime:this.Af.Zkt(),instPans:this.fes(),tickCount:this.Af.tBt()};if(this.Pss){const s=this.Pss.UD();this.wss[0]=s.Ny(),this.wss[1]=s.ky(),t.listenerPos=this.wss,t.listenerOrientation=[...this.Rss,...this.Mss]}this.EEt("tick",t)}des(t,s,e,i,r){if(0!==e){const n=Math.sin(e),h=Math.cos(e),o=(t-=i)*n,a=(s-=r)*n,l=t*h,c=s*h;t=l-a,s=c+o,t+=i,s+=r}return[t,s]}fes(){return this.Vss.filter(t=>-1!==t.uid).map(t=>this.Af.kD(t.uid)).filter(t=>t).map(t=>{const s=t.UD(),e=s.jD().GetAngle(),[i,r]=this.des(s.Ny(),s.ky(),-e,this.wss[0],this.wss[1]);return{uid:t.oB(),x:i,y:r,z:s.S4(),angle:s.GetAngle()-e}})}pes(t,s){for(const e of this.jss)if(e.index===s&&o.wr(e.tag,t))return e;return null}Ces(t){for(const s of this.Qss(t)){const e=s.toLowerCase();this.$ss.set(e,(this.$ss.get(e)||0)+1)}}uss(){return this.Lss}fss(t){this.Lss!==(t=!!t)&&(this.Lss=t,this.EEt("set-silent",{isSilent:t}))}dss(){return this.xss}pss(t){this.xss!==t&&(this.xss=t,this.EEt("set-master-volume",{vol:t}))}mss(){this.EEt("stop-all");for(const t of this.Vss)t.isPlaying=!1}mes(t){return!t.hasOwnProperty("placeholder")&&3!==this.Tss&&!(t.isMusic&&1===this.Tss||!t.isMusic&&2===this.Tss)}Ky(){return{isSilent:this.Lss,masterVolume:this.xss,listenerZ:this.wss[2],listenerForwardVec:this.Rss,listenerUpVec:this.Mss,listenerUid:this.Pss?this.Pss.oB():-1,remoteUrls:[...this.Hss.entries()],playing:this.Vss.filter(t=>this.mes(t)),effects:this.Uss,analysers:this.jss}}zy(t){if(this.Lss=t.isSilent,this.xss=t.masterVolume,this.wss[2]=t.listenerZ,this.Pss=null,this.Oss=t.listenerUid,t.hasOwnProperty("listenerForwardVec")?this.Rss=t.listenerForwardVec:this.Rss=[0,0,-1],t.hasOwnProperty("listenerUpVec")?this.Mss=t.listenerUpVec:this.Mss=[0,1,0],this.Hss.clear(),t.remoteUrls)for(const[s,e]of t.remoteUrls)this.Hss.set(s,e);this.Vss=t.playing;for(const i of this.Vss)i.hasOwnProperty("tag")&&!i.hasOwnProperty("tags")&&(i.tags=[i.tag].filter(t=>!!t));this.Uss=t.effects,this.jss=t.analysers}e9(){if(-1!==this.Oss&&(this.Pss=this.Af.kD(this.Oss),this.Oss=-1,this.Pss)){const t=this.Pss.UD();this.wss[0]=t.Ny(),this.wss[1]=t.ky()}for(const s of this.Vss){const e=this.Af.Jx().LX(s.bufferOriginalUrl);e?(s.bufferUrl=e.url,s.bufferType=e.type):s.bufferUrl=null}for(const i of Object.values(this.Uss))for(const r of i)if(r.hasOwnProperty("bufferOriginalUrl")){const n=this.Af.Jx().LX(r.bufferOriginalUrl);n&&(r.bufferUrl=n.url,r.bufferType=n.type)}this.EEt("load-state",{saveLoadMode:this.Tss,timeScale:this.Af.ZL(),gameTime:this.Af.Zkt(),listenerPos:this.wss,listenerOrientation:[...this.Rss,...this.Mss],isSilent:this.Lss,masterVolume:this.xss,playing:this.Vss.filter(t=>null!==t.bufferUrl),effects:this.Uss})}LEt(){const t=[];for(const[e,i]of Object.entries(this.Uss))t.push({name:"$"+e,value:i.map(t=>t.type).join(", ")});const s="plugins.audio.debugger";return[{title:s+".tag-effects",properties:t},{title:s+".currently-playing",properties:[{name:s+".currently-playing-count",value:this.Vss.length},...this.Vss.map((t,s)=>({name:"$#"+s,value:`${t.bufferOriginalUrl} ("${t.tags}") ${Math.round(10*t.playbackTime)/10} / `+Math.round(10*t.duration)/10}))]}]}}}{const x0=self.Bs;x0.GJ.Audio.MJ={les(t){return this.ues(t)},ces(t){return this.ues(t)},ges(){return this.Bss===this.kss},Ses(){return!0},yes(){return this.uss()},_es(){for(const t of this.Vss)if(t.isPlaying)return!0;return!1},Tes(t){return this.hes(t)}}}{const C0=self.Bs,D0=["lowpass","highpass","bandpass","lowshelf","highshelf","peaking","notch","allpass"];C0.GJ.Audio.pnt={Play(t,s,e,i,r){const n=C0.GJ.Audio.pnt.Aes.call(this,t,s,e,i,r);return this.hss(n),n},wnt(t,s,e,i){C0.GJ.Audio.pnt.Aes.call(this,t,0,s,0,e,i)},async Aes(t,s,e,i,r,n){if(!this.Lss){const h=t[1],o=this.Af.Jx().LX(t[0]);if(o){const a=this.gss,l=(this.gss=0,this.oes(t[0],r,h,0!==s,this.ees(e)));try{await this.IEt("play",{originalUrl:t[0],url:o.url,type:o.type,isMusic:h,tags:this.Qss(r),isLooping:0!==s,vol:this.ees(e),stereoPan:C0.wn(i/100,-1,1),pos:n||0,off:a,trueClock:!!self.C3_GetAudioContextCurrentTime})}finally{l&&(l.placeholder=this.Af.tBt())}}}},async Ees(t,s,e,i,r,n,h,o,a,l,c){if(!this.Lss){const u=t[1],f=this.Af.Jx().LX(t[0]);if(f){const d=this.gss,p=(this.gss=0,this.oes(t[0],c,u,0!==s,this.ees(e)));try{await this.IEt("play",{originalUrl:t[0],url:f.url,type:f.type,isMusic:u,tags:this.Qss(c),isLooping:0!==s,vol:this.ees(e),pos:0,off:d,trueClock:!!self.C3_GetAudioContextCurrentTime,panning:{x:i,y:r,z:n,angle:C0.Mn(h),innerAngle:C0.Mn(o),outerAngle:C0.Mn(a),outerGain:this.ees(l)}})}finally{p&&(p.placeholder=this.Af.tBt())}}}},async Ies(t,s,e,i,r,n,h,o){if(!this.Lss&&i){const a=i.m_t();if(a&&a.UD()){const l=a.UD(),c=l.jD().GetAngle(),[u,f]=this.des(l.Ny(),l.ky(),-c,this.wss[0],this.wss[1]),d=t[1],p=this.Af.Jx().LX(t[0]);if(p){const C=this.gss,m=(this.gss=0,this.oes(t[0],o,d,0!==s,this.ees(e)));try{await this.IEt("play",{originalUrl:t[0],url:p.url,type:p.type,isMusic:d,tags:this.Qss(o),isLooping:0!==s,vol:this.ees(e),pos:0,off:C,trueClock:!!self.C3_GetAudioContextCurrentTime,panning:{x:u,y:f,z:l.S4(),angle:l.GetAngle()-c,innerAngle:C0.Mn(r),outerAngle:C0.Mn(n),outerGain:this.ees(h),uid:a.oB()}})}finally{m&&(m.placeholder=this.Af.tBt())}}}}},async wes(t,s,e,i,r,n){if(!this.Lss){const h=1===t,o=this.Af.Jx().LX(s)||this.Hss.get(s.toLowerCase());if(o){const a=this.gss,l=(this.gss=0,this.oes(s,n,h,0!==e,this.ees(i)));try{await this.IEt("play",{originalUrl:s,url:o.url,type:o.type,isMusic:h,tags:this.Qss(n),isLooping:0!==e,vol:this.ees(i),stereoPan:C0.wn(r/100,-1,1),pos:0,off:a,trueClock:!!self.C3_GetAudioContextCurrentTime})}finally{l&&(l.placeholder=this.Af.tBt())}}}},async Res(t,s,e,i,r,n,h,o,a,l,c,u){if(!this.Lss){const f=1===t,d=this.Af.Jx().LX(s)||this.Hss.get(s.toLowerCase());if(d){const p=this.gss,C=(this.gss=0,this.oes(s,u,f,0!==e,this.ees(i)));try{await this.IEt("play",{originalUrl:s,url:d.url,type:d.type,isMusic:f,tags:this.Qss(u),isLooping:0!==e,vol:this.ees(i),pos:0,off:p,trueClock:!!self.C3_GetAudioContextCurrentTime,panning:{x:r,y:n,z:h,angle:C0.Mn(o),innerAngle:C0.Mn(a),outerAngle:C0.Mn(l),outerGain:this.ees(c)}})}finally{C&&(C.placeholder=this.Af.tBt())}}}},async Mes(t,s,e,i,r,n,h,o,a){if(!this.Lss&&!this.Lss&&r){const l=r.m_t();if(l&&l.UD()){const c=l.UD(),u=c.jD().GetAngle(),[f,d]=this.des(c.Ny(),c.ky(),-u,this.wss[0],this.wss[1]),p=1===t,C=this.Af.Jx().LX(s)||this.Hss.get(s.toLowerCase());if(C){const m=this.gss,g=(this.gss=0,this.oes(s,a,p,0!==e,this.ees(i)));try{await this.IEt("play",{originalUrl:s,url:C.url,type:C.type,isMusic:p,tags:this.Qss(a),isLooping:0!==e,vol:this.ees(i),pos:0,off:m,trueClock:!!self.C3_GetAudioContextCurrentTime,panning:{x:f,y:d,z:c.S4(),angle:c.GetAngle()-u,innerAngle:C0.Mn(n),outerAngle:C0.Mn(h),outerGain:this.ees(o),uid:l.oB()}})}finally{g&&(g.placeholder=this.Af.tBt())}}}}},bes(t,s){this.EEt("set-looping",{tags:this.Qss(t),isLooping:0===s})},Ges(t,s){this.EEt("set-muted",{tags:this.Qss(t),isMuted:0===s})},Ant(t,s){this.EEt("set-volume",{tags:this.Qss(t),vol:this.ees(s)})},ves(t,s,e,i){this.EEt("fade-volume",{tags:this.Qss(t),vol:this.ees(s),duration:e,stopOnEnd:0===i})},Pes(t,s){this.EEt("set-stereo-pan",{tags:this.Qss(t),p:C0.wn(s/100,-1,1)})},async Oes(t){const s=t[1],e=this.Af.Jx().LX(t[0]);e&&(this.kss++,await this.IEt("preload",{originalUrl:t[0],url:e.url,type:e.type,isMusic:s}),this.Bss++)},async xes(t,s){const e=1===t,i=this.Af.Jx().LX(s)||this.Hss.get(s.toLowerCase());i&&(this.kss++,await this.IEt("preload",{originalUrl:s,url:i.url,type:i.type,isMusic:e}),this.Bss++)},ZW(t,s){this.EEt("set-playback-rate",{tags:this.Qss(t),rate:Math.max(s,0)})},VW(t){this.aes(t),this.EEt("stop",{tags:this.Qss(t)})},Les(){this.mss()},Des(t,s){this.EEt("set-paused",{tags:this.Qss(t),paused:0===s})},Nes(t,s){this.EEt("seek",{tags:this.Qss(t),pos:s})},Fes(t){2===t&&(t=this.uss()?1:0),this.fss(0===t)},$es(t){const s=this.ees(t);this.pss(s)},kes(t,s,e,i,r,n,h){const o=D0[s];this.Ces(t),this.EEt("add-effect",{type:"filter",tags:this.Qss(t),params:[o,e,i,r,n,C0.wn(h/100,0,1)]})},Bes(t,s,e,i){this.Ces(t),this.EEt("add-effect",{type:"delay",tags:this.Qss(t),params:[s,this.ees(e),C0.wn(i/100,0,1)]})},Wes(t,s,e,i,r,n){this.Ces(t),this.EEt("add-effect",{type:"flanger",tags:this.Qss(t),params:[s/1e3,e/1e3,i,r/100,C0.wn(n/100,0,1)]})},Hes(t,s,e,i,r,n,h){this.Ces(t),this.EEt("add-effect",{type:"phaser",tags:this.Qss(t),params:[s,e,i,r,n,C0.wn(h/100,0,1)]})},Ves(t,s,e,i){const r=this.Af.Jx().LX(s[0]);r&&(this.Ces(t),this.EEt("add-effect",{type:"convolution",tags:this.Qss(t),bufferOriginalUrl:s[0],bufferUrl:r.url,bufferType:r.type,params:[0===e,C0.wn(i/100,0,1)]}))},Ues(t,s){this.Ces(t),this.EEt("add-effect",{type:"gain",tags:this.Qss(t),params:[this.ees(s)]})},jes(t,s){this.Ces(t),this.EEt("add-effect",{type:"stereopan",tags:this.Qss(t),params:[C0.wn(s/100,-1,1)]})},Xes(t){this.Ces(t),this.EEt("add-effect",{type:"gain",tags:this.Qss(t),params:[0]})},Yes(t,s,e){this.Ces(t),this.EEt("add-effect",{type:"tremolo",tags:this.Qss(t),params:[s,C0.wn(e/100,0,1)]})},qes(t,s,e){this.Ces(t),this.EEt("add-effect",{type:"ringmod",tags:this.Qss(t),params:[s,C0.wn(e/100,0,1)]})},Kes(t,s,e,i,r,n){this.Ces(t),this.EEt("add-effect",{type:"distortion",tags:this.Qss(t),params:[this.ses(s),this.ses(e),i,this.ses(r),C0.wn(n/100,0,1)]})},zes(t,s,e,i,r,n){this.Ces(t),this.EEt("add-effect",{type:"compressor",tags:this.Qss(t),params:[s,e,i,r/1e3,n/1e3]})},Jes(t,s,e){this.Ces(t),this.EEt("add-effect",{type:"analyser",tags:this.Qss(t),params:[s,e]})},Qes(t){const s=this.Qss(t);for(const e of s)this.$ss.set(e.toLowerCase(),0);this.EEt("remove-effects",{tags:s}),this.Uss={}},iW(t,s,e,i,r,n){this.EEt("set-effect-param",{tags:this.Qss(t),index:Math.floor(s),param:e,value:i,ramp:r,time:n})},Zes(t){if(t){const s=t.m_t();s&&s.UD()&&(this.Pss=s)}},tis(t){this.wss[2]=t},sis(t,s,e,i,r,n){this.Rss[0]=t,this.Rss[1]=s,this.Rss[2]=-e,this.Mss[0]=i,this.Mss[1]=r,this.Mss[2]=-n},eis(t){this.gss=Math.max(t,0)},iis(t){const s=t[1],e=this.Af.Jx().LX(t[0]);e&&this.EEt("unload",{url:e.url,type:e.type,isMusic:s})},ris(t,s){const e=1===t,i=this.Af.Jx().LX(s)||this.Hss.get(s.toLowerCase());i&&this.EEt("unload",{url:i.url,type:i.type,isMusic:e})},nis(){this.EEt("unload-all")},his(t,s,e){this.Hss.set(e.toLowerCase(),{url:t,type:s})}}}{const y2=self.Bs;y2.GJ.Audio.Cnt={ois(t){const s=this.nes(t);return s?s.duration:0},Snt(t){const s=this.nes(t);return s?s.playbackTime:0},Ent(t){const s=this.nes(t);return s?s.playbackRate:0},ynt(t){const s=this.nes(t);return s?this.res(s.volume):0},ais(){return this.res(this.dss())},lis(t){return this.$ss.get(t.toLowerCase())||0},cis(t,s){const e=this.pes(t,Math.floor(s));return e?e.binCount:0},uis(t,s,e){const i=this.pes(t,Math.floor(s));return!i||(e=Math.floor(e))<0||e>=i.binCount?0:i.freqBins[e]},fis(t,s){const e=this.pes(t,Math.floor(s));return e?e.peak:0},dis(t,s){const e=this.pes(t,Math.floor(s));return e?e.rms:0},pis(){return this.Dss},Cis(){return self.C3_GetAudioContextCurrentTime?self.C3_GetAudioContextCurrentTime():performance.now()/1e3},mis(){return this.Fss},gis(t,s){return 0==(t=y2.wn(+t,0,100)/100)?-1/0:t<.1?this.res(y2.$t(0,this.ees(s),10*t)):y2.$t(s,0,(t-.1)/.9)}}}{const a=self.Bs;a.GJ.Sis=class extends a.AAt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.GJ.Sis.FRt=class extends d.hEt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{let Log2=function(t){console.log("[C3 advert]",t)};Log=Log2;const g=self.Bs,h="busy",i="set",j="advert";g.GJ.Sis.Instance=class extends g.uEt{constructor(t,s){super(t,j),this.yis=!!s[0],this._is=null,this.Tis=null,this.Ais=null,this.Eis=null,this.Iis=null,this.wis=null,this.Ris=null,this.Mis="not-determined",this.bis=!0,this.Gis="",this.vis=0,this.Pis="",this.Ois=0;const e=this.Af.ed();this.Wd=new g.$d(g.Od.Fd(e,"beforeruntimestart",()=>this.xis(s)),g.Od.Fd(e,"layoutchange",()=>this.Lis()))}async xis(t){const s=t[1],e=t[2],i=t[5],r=t[6],n=t[7],h=t[8],o=t[3],a=t[4];if(this.Af.dNt()){const l=this.Af.nBt()?e:s;l&&(await this.Dis(o),this.Nis(l,i,n,r,h,o,a))}else{const c={};c["data-ad-client"]="ca-"+i,c["data-ad-frequency-hint"]="30s",c.async="","https://preview.construct.net"!==self.origin&&!this.yis||(c["data-adbreak-test"]="on"),await this.IEt("AddScript",["https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",c]),await this.Dis(o),this.Nis("mock-id",i,n,r,h,o,a)}}Lis(){this._is===i&&this.NB(g.GJ.Sis.MJ.Fis)}async Dis(t){try{t=["DISABLED","EEA","NOT_EEA"][t];const s=await this.IEt("StatusUpdate",[this.yis,t]),[e,i,r]=s.split("&&");this.Ris=e,this.Mis=i,this.bis="false"!==r}catch(t){this.$is("status failed to update",t)}}async Nis(t,s,e,r,n,o,a){if(null===this._is){this._is=h,n=["eu","always","never"][n],o=["DISABLED","EEA","NOT_EEA"][o];try{const l=await this.IEt("Configure",[t.trim(),s.trim(),e.trim(),r,n,this.yis,o,a]),[c,u,f]=l.split("&&");this.bis="false"!==f,this._is=i,this.Ris=c,this.Mis=u,this.kis("configuration complete"),await this.NB(g.GJ.Sis.MJ.Fis)}catch(t){this._is=null,this.$is("configuration failed",t),await this.NB(g.GJ.Sis.MJ.Bis)}}}IEt(t,s=[]){return super.IEt(t,s)}$is(t,s){const e="string"==typeof s?s:s.message;this.kis(t,e)}kis(t,s="",e="",i=0,r=""){switch(Log2(`Event (${t} Error (${s}) Type (${e}) Amount (${i}))`),this.Wis=s||"",r){case"rewarded":this.Gis=e||"",this.vis=i||0;break;case"rewarded interstitial":this.Pis=e||"",this.Ois=i||0;break;default:this.Gis="",this.vis=0,this.Pis="",this.Ois=0}}His(){return!!self.cordova}Vis(){return!self.cordova}}}{const aa=self.Bs,ba="shown",ca="loaded",da="set";aa.GJ.Sis.MJ={Uis(){return!0},jis(){return!0},Xis(){return!0},Yis(){return!0},qis(){return!0},Kis(){return!0},zis(){return!0},Jis(){return!0},Qis(){return!0},Zis(){return!0},trs(){return!0},srs(){return!0},ers(){return!0},irs(){return!0},rrs(){return!0},nrs(){return!0},hrs(){return!0},ors(){return!0},ars(){return!0},lrs(){return!0},Bis(){return!0},Fis(){return!0},crs(){return!0},urs(){return this.Tis===ba},frs(){return this.Eis===ba},drs(){return this.Iis===ba},prs(){return this.Ais===ba},Crs(){return this.wis===ba},mrs(){return this.bis},grs(){return this.Tis===ca},Srs(){return this.Eis===ca},yrs(){return this.Iis===ca},_rs(){return this.Ais===ca},Trs(){return this.wis===ca},Ars(){return this._is===da},Ers(){return!0}}}{const ea=self.Bs,fa="busy",ga="shown",ha="loaded",ia="set",ja=["portrait","landscape","standard","large","medium","full","leaderboard"],ka=["bottom","top"];async function _HandleRewardedException(t,s,e,i){this.Vis()&&s&&"closed with no reward"!==t?await e():await i()}async function _HandleInterstitialException(t,s,e){this.Vis()&&t?await s():await e()}ea.GJ.Sis.pnt={async Irs(t,s,e,i,r,n,h){if(0===r&&(this.Tis=null),null==this.Tis){this.Tis=fa;try{await this.IEt("CreateBannerAdvert",[t.trim(),ja[s],this.yis,ka[i],0===r,n,0===h]),this.Tis=ha,this.kis("banner created"),await this.NB(ea.GJ.Sis.MJ.Uis),0==e&&ea.GJ.Sis.pnt.wrs.call(this)}catch(t){this.Tis=null,this.$is("failed to create banner",t),await this.NB(ea.GJ.Sis.MJ.Kis)}}},async wrs(){if(this.Tis==ha){this.Tis=fa;try{await this.IEt("ShowBannerAdvert"),this.Tis=ga,this.kis("banner shown"),await this.NB(ea.GJ.Sis.MJ.trs)}catch(t){this.Tis=null,this.$is("failed to show banner",t)}}},async Rrs(){if(this.Tis==ga){this.Tis=fa;try{await this.IEt("HideBannerAdvert"),this.Tis=null,this.kis("banner hidden"),await this.NB(ea.GJ.Sis.MJ.nrs)}catch(t){this.Tis=null,this.$is("failed to hide banner",t)}}},async Mrs(t,s){if(null==this.Ais){this.Ais=fa;try{await this.IEt("CreateInterstitialAdvert",[t.trim(),this.yis]),this.Ais=ha,this.kis("interstitial created"),await this.NB(ea.GJ.Sis.MJ.Yis),0==s&&ea.GJ.Sis.pnt.brs.call(this,!0)}catch(t){this.Ais=null,this.$is("failed to create interstitial",t),await this.NB(ea.GJ.Sis.MJ.Qis)}}},async brs(s=!1){if(this.Ais==ha){this.Ais=ga;try{await this.IEt("ShowInterstitialAdvert"),this.Ais=null,this.kis("interstitial completed"),await this.NB(ea.GJ.Sis.MJ.irs)}catch(t){this.Ais=null,await _HandleInterstitialException.call(this,s,async()=>{this.$is("failed to create interstitial",t),await this.NB(ea.GJ.Sis.MJ.Qis)},async()=>{this.$is("interstitial cancelled",t),await this.NB(ea.GJ.Sis.MJ.ars)})}}},async Grs(t,s){if(null==this.Eis&&null==this.Iis){this.Eis=fa;try{await this.IEt("CreateVideoAdvert",[t.trim(),this.yis]),this.Eis=ha,this.kis("video created"),await this.NB(ea.GJ.Sis.MJ.jis),0==s&&ea.GJ.Sis.pnt.vrs.call(this)}catch(t){this.Eis=null,this.$is("failed to create video",t),await this.NB(ea.GJ.Sis.MJ.zis)}}},async vrs(){if(this.Eis==ha){this.Eis=ga;try{const t=await this.IEt("ShowVideoAdvert"),[s,e]=JSON.parse(t);this.Eis=null,this.kis("video completed",null,s,e),await this.NB(ea.GJ.Sis.MJ.srs)}catch(t){this.Eis=null,this.$is("video cancelled",t),await this.NB(ea.GJ.Sis.MJ.hrs)}}},async Prs(t,s){if(null==this.Iis&&null==this.Eis){this.Iis=fa;try{await this.IEt("CreateRewardedAdvert",[t.trim(),this.yis]),this.Iis=ha,this.kis("rewarded created"),await this.NB(ea.GJ.Sis.MJ.Xis),0==s&&ea.GJ.Sis.pnt.Ors.call(this,!0)}catch(t){this.Iis=null,this.$is("failed to create rewarded",t),await this.NB(ea.GJ.Sis.MJ.Jis)}}},async Ors(s=!1){if(this.Iis==ha){this.Iis=ga;try{const t=await this.IEt("ShowRewardedAdvert"),[e,i]=JSON.parse(t);this.Iis=null,this.kis("rewarded completed",null,e,i,"rewarded"),await this.NB(ea.GJ.Sis.MJ.ers)}catch(t){this.Iis=null,await _HandleRewardedException.call(this,t,s,async()=>{this.$is("failed to create rewarded",t),await this.NB(ea.GJ.Sis.MJ.Jis)},async()=>{this.$is("rewarded cancelled",t),await this.NB(ea.GJ.Sis.MJ.ors)})}}},async xrs(t,s){if(null==this.wis){this.wis=fa;try{await this.IEt("CreateRewardedInterstitialAdvert",[t.trim(),this.yis]),this.wis=ha,this.kis("rewarded interstitial created"),await this.NB(ea.GJ.Sis.MJ.qis),0==s&&ea.GJ.Sis.pnt.Lrs.call(this,!0)}catch(t){this.wis=null,this.$is("failed to create rewarded interstitial",t),await this.NB(ea.GJ.Sis.MJ.Zis)}}},async Lrs(s=!1){if(this.wis==ha){this.wis=ga;try{const t=await this.IEt("ShowRewardedInterstitialAdvert"),[e,i]=JSON.parse(t);this.wis=null,this.kis("rewarded interstitial completed",null,e,i,"rewarded interstitial"),await this.NB(ea.GJ.Sis.MJ.rrs)}catch(t){this.wis=null,await _HandleRewardedException.call(this,t,s,async()=>{this.$is("failed to create rewarded interstitial",t),await this.NB(ea.GJ.Sis.MJ.Zis)},async()=>{this.$is("rewarded interstitial cancelled",t),await this.NB(ea.GJ.Sis.MJ.lrs)})}}},Drs(t,s,e,i,r,n){this.Nis(t,s,e,i=[!0,!1][i],r,n)},async Nrs(){if(this._is===ia){this._is=fa;try{const t=this.Mis,s=await this.IEt("RequestConsent"),[e,i,,]=s.split("&&");this._is=ia,this.Ris=e,this.Mis=i,t!==this.Mis&&this.LB(ea.GJ.Sis.MJ.Ers),this.kis("configuration complete"),await this.NB(ea.GJ.Sis.MJ.Fis)}catch(t){this._is=ia,this.$is("configuration failed",t),await this.NB(ea.GJ.Sis.MJ.Bis)}}},async Frs(t){},async $rs(t){if(this._is===ia)try{const s=["G","PG","T","MA"][t];await this.IEt("SetMaxAdContentRating",[s])}catch(t){}},async krs(t){if(this._is===ia)try{await this.IEt("TagForChildDirectedTreatment",[t?1:0])}catch(t){}},async Brs(t){if(this._is===ia)try{await this.IEt("TagForUnderAgeOfConsent",[t?1:0])}catch(t){}},async Wrs(){try{this.Mis=await this.IEt("RequestIDFA")}catch(t){console.warn("Error requesting IDFA: ",t),this.Mis="error"}this.LB(ea.GJ.Sis.MJ.Ers)}}}{const x0=self.Bs;x0.GJ.Sis.Cnt={rss(){return this.Wis||""},Hrs(){return this.Gis||""},Vrs(){return this.vis||0},Urs(){return this.Pis||""},jrs(){return this.Ois||0},Xrs(){return this.Ris||"UNKNOWN"},Yrs(){return this.Mis}}}{const a=self.Bs;a.llt.olt=class extends a.AIt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.llt.olt.FRt=class extends d.MIt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{const g=self.Bs,h=g.llt.olt,i=0;h.Instance=class extends g.GIt{constructor(t,s){super(t),this.qrs=!1,this.tu=!0,s&&(this.qrs=!1,this.tu=!!s[i]),this.Krs=new Map,this.zrs=[],this.Jrs=new Map,this.Qrs=null,this.Zrs=null,this.tns=null,this.sns=null,this.ens="",this.ins=[],this.s9=t=>this.e9(),this.cN().ed().addEventListener("afterload",this.s9)}_n(){this.cN().ed().removeEventListener("afterload",this.s9),this.s9=null,this.Qrs&&(this.rns(this.Qrs),this.Qrs=null),this.nns(),this.hns=null,this.ons(),this.zrs=null,this.ans(),this.Jrs=null,this.ins=null,super._n()}plt(t){this.ins.push(t)}Clt(){this.ins.pop()}lns(){return this.ins[this.ins.length-1]}ZTt(t){this.tu=!!t,t?this.Jrs&&this.Jrs.size&&this.OEt():this.CEt();for(const s of this.cns())t?this.uns(s)&&s.UW():((s.IsPlaying()||s.Ktt())&&this.fns(s),s.VW());t&&this.ons()}pu(){return this.tu}fns(t){this.zrs.push(t)}uns(t){return this.zrs.includes(t)}ons(){g.qh(this.zrs)}dns(){return this.Qrs}uet(){const t=this.K5();return!!t&&!t.mV()}pns(t,s,e=!1){const i=s?this.Cns(s,e):this.cns(e);if(i&&i.length)for(const r of i)if(r.jW(t))return r}mns(t,s){for(const e of this.Krs.values())for(const i of e)if(!i.WW()&&i.jW(t)&&s(i))return!0;for(const r of this.Jrs.values())for(const n of r)if(!n.WW()&&n.jW(t)&&s(n))return!0;return!1}gns(t){for(const s of this.Krs.values())for(const e of s)if(!e.WW()&&t(e))return!0;for(const i of this.Jrs.values())for(const r of i)if(!r.WW()&&t(r))return!0;return!1}Sns(t,s){return this.pns(t,s,!0)}*yns(t,s,e=!1){const i=s?this.Cns(s,e):this.cns(e);if(i&&i.length)for(const r of i)r.jW(t)&&(yield r)}*_ns(t,s){yield*this.yns(t,s,!0)}Cns(e,t){if(t){let t=this.Krs.get(e),s=this.Jrs.get(e);return(t=t||[]).concat(s||[]).filter(t=>t).filter(t=>!t.WW())}{let t=this.Krs.get(e);return(t=t||[]).filter(t=>t).filter(t=>!t.WW())}}cns(t){if(t){const s=[...this.Krs.values()].flat(),e=[...this.Jrs.values()].flat();return s.concat(e).filter(t=>t).filter(t=>!t.WW())}{const i=[...this.Krs.values()].flat();return i.filter(t=>t).filter(t=>!t.WW())}}Tns(){return this.cns(!0)}Ky(t=0){return{s:!1,e:!!this.tu,at:this.Ans(),dt:this.Ens(),wt:this.Ins(),ft:this.wns()}}zy(t,s="full"){t&&(this.Zrs=t.at,this.tns=t.dt,this.sns=t.wt,this.ens=t.ft,this.qrs=!1,this.tu=!!t.e,"state"===s)&&this.e9()}e9(){const t=this.cN().wtt();if(this.Rns(this.Zrs,this.Krs,t),this.tns){g.qh(this.zrs);for(const s of this.tns)this.Mns(this.zrs,s,t)}this.Rns(this.sns,this.Jrs,t),this.Qrs=this.bns(this.ens,t),this.tu?this.Jrs&&this.Jrs.size&&this.OEt():this.CEt()}Rns(s,e,i){if(s)for(const r in s){let t=e.get(r);t?g.qh(t):t=[];const n=s[r];for(const h of n){const o=this.Mns(t,h.name,i);if(o)this.Gns(h.name,h,i);else{const a=g.Yht.Slt({runtime:this.cN(),json:h});g.Yht.Pet(a,this.K5().oB()),a.qat(t=>this.vns(t)),i.x9(a),this.Mns(t,a,i)}}e.set(r,t)}}bns(t,s){return s.v9(t)}Mns(t,s,e){if("string"!=typeof s)return!!t.push(s);{const i=this.bns(s,e);if(i)return!!t.push(i)}return!1}Gns(t,s,e){if("string"==typeof t){const i=this.bns(t,e);i&&(i.N8(s),g.Yht.Pet(i,this.K5().oB()))}else t.N8(s),g.Yht.Pet(t,this.K5().oB())}Ans(){const t={};for(const[s,e]of this.Krs)t[s]=e.filter(t=>!t.WW()).map(t=>t.D8());return t}Ens(){return this.zrs.filter(t=>!t.WW()).map(t=>t.pf())}Ins(){const t={};for(const[s,e]of this.Jrs)t[s]=e.map(t=>t.D8());return t}wns(){return this.Qrs?this.Qrs.pf():""}GEt(){this.ans()}Pns(t){const s=h.xns.Ons(t.property,t.Elt,t.Ilt,t.ease,t.resultMode,this.K5()),e=h.Dns.Lns(t.property),i=(h.Dns.Nns(e)||this.Fns(t.property),g.Yht.Slt({runtime:this.cN(),id:e,tags:t.tags,time:t.time,q5:this.K5(),_lt:!!t._lt,loop:!!t.loop,pingPong:!!t.pingPong,repeatCount:t.repeatCount,initialValueMode:t.initialValueMode,ylt:s}));return i.qat(t=>this.vns(t)),this.$ns(i,t.property),i}kns(t){const s=t.mH();if(this.Krs.has(s)){const e=this.Krs.get(s);if(e){const i=e.indexOf(t);-1!==i&&e.splice(i,1)}}}lH(t,s=!1){this.kns(t),t.WW()||this.Bns(t)||(t.VW(s),this.Wns(t))}Fns(t,s=!1){if(g.gi(t)){const e=h.Dns.Lns(t);if(this.Krs.has(e)){const i=this.Krs.get(e),r=this.dns();for(const n of i)n===r||n.WW()||this.Bns(n)||(n.VW(s),n._n());g.qh(i)}}else{const o=this.dns();for(const a of this.cns())a===o||a.WW()||this.Bns(a)||(a.VW(s),a._n());for(const l of this.Krs.keys())g.qh(this.Krs.get(l)),this.Krs.delete(l);this.Krs.clear()}}rns(t){this.lH(t,!0)}nns(){this.Fns(NaN,!0)}Qnt(t){if(t===i)return this.tu}rht(t,s){t===i&&(this.tu=!!s)}Hns(t){const s=t.fH(),e=s.jrt();for(const i of e){const r=i.Y5();if(r.nMt()===this.constructor)return r}}LB(t,s,e,i){return this.Af?super.LB(t):s.LB(t,e,i)}vns(t){this.Qrs=t,h.MJ.Vns(t);let s,e;if(this.cN())s=this.Ge,e=this.Af,this.LB(h.MJ.Uns),this.LB(h.MJ.jns),this.lH(t);else{if(!(s=t.fH()))return;if(s&&s.mV())return;e=s.cN();const i=this.Hns(t);this.LB(h.MJ.Uns,e,s,i),this.LB(h.MJ.jns,e,s,i),t.VW()}this.Qrs=null,h.MJ.Vns(null),t.pH()&&e.tB(s)}$ns(t,s){const e=h.Dns.Lns(s),i=(this.Krs.has(e)||this.Krs.set(e,[]),this.Krs.get(e));i.push(t)}Wns(t){const s=t.mH();this.Jrs.has(s)||this.Jrs.set(s,[]),this.Jrs.get(s).push(t),this.xEt()||this.OEt()}Bns(t){const s=t.mH();return!!this.Jrs.has(s)&&this.Jrs.get(s).includes(t)}ans(){if(this.Jrs.size){for(const t of this.Jrs.values()){for(const s of t)s.WW()||s._n();g.qh(t)}this.Jrs.clear(),this.xEt()&&this.CEt()}}LEt(){return[{title:"$"+this.Y5().pf(),properties:[{name:"behaviors.tween.properties.enabled.name",value:this.pu(),qUt:t=>this.ZTt(t)}]}]}XAt(){return self.Xns}}}{let M0=self.Bs,s=null;M0.llt.olt.MJ={hlt(){return!0},clt(t){const s=this.lns();return!!s&&s.jW(t)},ult(t){const s=this.lns();return!!s&&(s.ktt()===t||2===t)},flt(t,s){const e=this.lns();return!!e&&(e.ktt()===s||2===s)&&e.jW(t)},Vns(t){s=t},Uns(t){return s.jW(t)},jns(){return!0},IsPlaying(t){return this.mns(t,M0.Yht.IsPlaying)},_es(){return this.gns(M0.Yht.IsPlaying)},rH(t){return this.mns(t,M0.Yht.rH)},Yns(){return this.gns(M0.Yht.rH)},uW(t,s){return 0===s?this.mns(t,M0.Yht.mlt):1===s&&this.mns(t,M0.Yht.glt)},qns(t){return 0===t?this.gns(M0.Yht.mlt):1===t&&this.gns(M0.Yht.glt)}}}{const ab=self.Bs,bb=self.vu,cb=ab.llt.olt;cb.pnt={ZTt(t){this.ZTt(!!t)},async Kns(...t){if(this.pu()&&this.uet()){const s=this.Pns(cb.Jns.zns(this,...t));s.Play()&&await s.eH()}},async Qns(...t){if(this.pu()&&this.uet()){const s=this.Pns(cb.Jns.Zns(this,...t));s.Play()&&await s.eH()}},async ths(...t){if(this.pu()&&this.uet()){const s=this.Pns(cb.Jns.shs(this,...t));s.Play()&&await s.eH()}},ehs(t){if(this.pu()&&this.uet())for(const s of this.yns(t))s.VW()},ihs(){if(this.pu()&&this.uet())for(const t of this.cns())t.VW()},rhs(t){if(this.pu()&&this.uet())for(const s of this.yns(t))s.UW()},nhs(){if(this.pu()&&this.uet())for(const t of this.cns())t.UW()},hhs(t){if(this.pu()&&this.uet())for(const s of this.yns(t))this.lH(s)},ohs(){if(this.pu()&&this.uet())for(const t of this.cns())this.lH(t)},ahs(t,s,e){if(this.pu()&&this.uet()){const i=ab.llt.olt.Dns.lhs(s);for(const r of this.yns(t))r.Zat([i]),r.tlt(e,i)}},chs(t,s,e,i){if(this.pu()&&this.uet()){const r=ab.llt.olt.Dns.uhs(s);for(const n of this.yns(t))n.Zat(r),n.tlt(e,r[0]),n.tlt(i,r[1])}},fhs(t,s){if(this.pu()&&this.uet())for(const e of this.yns(t,"value"))e.Jat(s,"value")},dhs(t,s){if(this.pu()&&this.uet())for(const e of this.yns(t,"value"))e.Zat(["value"]),e.tlt(s,"value")},phs(t,s){if(this.pu()&&this.uet()){const e=bb.Yu(s);for(const i of this.yns(t))i.uH(e)}},Chs(t){if(this.pu()&&this.uet()){const s=bb.Yu(t);for(const e of this.cns())e.uH(s)}},mhs(t,s){if(this.pu()&&this.uet())for(const e of this.yns(t))e.XW(s)},ghs(t){if(this.pu()&&this.uet())for(const s of this.cns())s.XW(t)},Shs(t,s){if(this.pu()&&this.uet())for(const e of this.yns(t))e.ZW(s)},yhs(t){if(this.pu()&&this.uet())for(const s of this.cns())s.ZW(t)},_hs(t,s){if(this.pu()&&this.uet())for(const e of this.yns(t))e.CH(!!s)},Ths(t){if(this.pu()&&this.uet())for(const s of this.cns())s.CH(!!t)}}}{const e1=self.Bs;e1.llt.olt.Cnt={Ahs(t){const s=this.Sns(t);return s?s.AP():0},Ehs(t){const s=this.Sns(t);return s?s.AP()/s.qW():0},Ent(t){const s=this.Sns(t);return s?s.tH():0},Ihs(t){const s=this.Sns(t,"value");return s?s.SH("value").gH():0},oTt(){let t=this.dns();return(t=t||this.lns())?t.Vtt():""}}}{const C33=self.Bs,Ease=self.vu,PAIR_PROPERTIES=["position","size","scale"],SINGLE_PROPERTIES=["offsetX","offsetY","offsetWidth","offsetHeight","offsetAngle","offsetOpacity","offsetColor","offsetZElevation","offsetScaleX","offsetScaleY"],VALUE_PROPERTIES=["value"],PROPERTY_INDEX_TO_NAME=[].concat(PAIR_PROPERTIES).concat(SINGLE_PROPERTIES).concat(VALUE_PROPERTIES),PROPERTY_PAIR_TO_REAL_PROPERTIES={position:["offsetX","offsetY"],size:["offsetWidth","offsetHeight"],scale:["offsetScaleX","offsetScaleY"]},ALL_REAL_PROPERTIES=Object.assign({},PROPERTY_INDEX_TO_NAME.reduce((t,s)=>Object.assign({},t,{[s]:[s]}),{}),PROPERTY_PAIR_TO_REAL_PROPERTIES);C33.llt.olt.Dns=class{constructor(){}static whs(){return[...Ease.Fu()]}static Yu(t){return[...Ease.Fu()][t]}static Lns(t){return PROPERTY_INDEX_TO_NAME[t]}static Rhs(t){return PROPERTY_INDEX_TO_NAME.indexOf(t)}static Mhs(t){return PAIR_PROPERTIES[t]}static lhs(t){return SINGLE_PROPERTIES[t]}static bhs(t){return VALUE_PROPERTIES[t]}static Ghs(t){return PROPERTY_PAIR_TO_REAL_PROPERTIES[t]}static uhs(t){return C33.Ri(t)?ALL_REAL_PROPERTIES[t]:ALL_REAL_PROPERTIES[PROPERTY_INDEX_TO_NAME[t]]}static vhs(t){return!!PROPERTY_PAIR_TO_REAL_PROPERTIES[t]}static Phs(t){return"offsetColor"===t}static Ohs(t){return"offsetAngle"===t}static xhs(t){return"offsetOpacity"===t}static Nns(t){return"value"===t}}}{const C33=self.Bs,NAMESPACE=C33.llt.olt,TWEEN_CONFIGURATIONS=new Map;NAMESPACE.xns=class{constructor(){}static Ons(t,s,e,i,r,n){0===TWEEN_CONFIGURATIONS.size&&this.Lhs();let h=NAMESPACE.Nhs.Dhs(t),o=TWEEN_CONFIGURATIONS.get(h);return C33.gi(t)&&(t=NAMESPACE.Dns.Lns(t)),this.Fhs(o,t,s,e,i,r,n)}static $hs(t,s){const e=C33.llt.olt.Ons(t);return e.khs(s)}static Lhs(){const t=NAMESPACE.Nhs,s=NAMESPACE.Bhs;this.Whs(t.Hhs,this.Vhs,s.Uhs),this.Whs(t.COLOR,this.jhs,s.Xhs),this.Whs(t.Yhs,this.qhs,s.Khs),this.Whs(t.zhs,this.Jhs,s.Uhs),this.Whs(t.Qhs,this.Zhs,s.Uhs)}static Whs(t,s,e){TWEEN_CONFIGURATIONS.set(t,this.tos(t,s,e))}static tos(t,s,e){return{name:t,sos:s,khs:e}}static Fhs(t,s,e,i,r,n,h){return t.sos(s,t.khs(e),t.khs(i),r,n,h)}static Vhs(t,e,i,r,n,s){const h=NAMESPACE.Dns.Ghs(t);return h.map((t,s)=>({Tlt:"world-instance",property:t,type:"float",valueType:"numeric",Elt:e[s],Ilt:i[s],ease:NAMESPACE.Dns.Yu(r),resultMode:n}))}static jhs(t,s,e,i,r,n){return C33.GJ.Text&&n.UF()instanceof C33.GJ.Text?{Tlt:"plugin",Alt:[7],property:"color",type:"color",valueType:"color",Elt:s,Ilt:e,ease:NAMESPACE.Dns.Yu(i),resultMode:r}:{Tlt:"world-instance",property:t,type:"color",valueType:"color",Elt:s,Ilt:e,ease:NAMESPACE.Dns.Yu(i),resultMode:r}}static qhs(t,s,e,i,r,n){return{Tlt:"world-instance",property:t,type:"angle",valueType:"angle",Elt:s,Ilt:e,ease:NAMESPACE.Dns.Yu(i),resultMode:r}}static Zhs(t,s,e,i,r,n){return{Tlt:"world-instance",property:t,type:"float",valueType:"numeric",Elt:s,Ilt:e,ease:NAMESPACE.Dns.Yu(i),resultMode:r}}static Jhs(t,s,e,i,r,n){return{Tlt:"value",property:t,type:"float",valueType:"numeric",Elt:s,Ilt:e,ease:NAMESPACE.Dns.Yu(i),resultMode:r}}}}{const C33=self.Bs,NAMESPACE=C33.llt.olt,COMMON_FIXED_ARGS={resultMode:"absolute"},COMMON_VARIABLE_ARGS=Object.assign({},COMMON_FIXED_ARGS,{tags:"",property:"",time:0,ease:0,_lt:0,loop:!1,pingPong:!1,repeatCount:1}),ONE_PROPERTY_ARGS=Object.assign({},COMMON_VARIABLE_ARGS,{initialValueMode:"current-state",Elt:0,Ilt:0}),TWO_PROPERTIES_ARGS=Object.assign({},COMMON_VARIABLE_ARGS,{initialValueMode:"current-state",Elt:[0,0],Ilt:[0,0]}),COLOR_PROPERTY_ARGS=Object.assign({},COMMON_VARIABLE_ARGS,{initialValueMode:"current-state",Elt:[0,0,0],Ilt:[0,0,0]}),VALUE_PROPERTY_ARGS=Object.assign({},ONE_PROPERTY_ARGS,{initialValueMode:"start-value"}),X=0,Y=1,R=0,G=1,B=2;NAMESPACE.Jns=class{constructor(){}static eos(t,s,e,i,r,n,h,o){t.tags=s,t.time=e,t.ease=i,t._lt=r,t.loop=n,t.pingPong=h,t.repeatCount=o}static zns(t,s,e,i,r,n,h,o,a,l){const c="string"==typeof e?e:NAMESPACE.Dns.lhs(e),u=NAMESPACE.Dns.Phs(c)?COLOR_PROPERTY_ARGS:ONE_PROPERTY_ARGS;return this.eos(u,s,r,n,h,o,a,l),NAMESPACE.Dns.Phs(c)?(COLOR_PROPERTY_ARGS.Ilt[R]=C33.eh(i),COLOR_PROPERTY_ARGS.Ilt[G]=C33.ih(i),COLOR_PROPERTY_ARGS.Ilt[B]=C33.rh(i),COLOR_PROPERTY_ARGS.property=NAMESPACE.Dns.Rhs(c)):NAMESPACE.Dns.xhs(c)?ONE_PROPERTY_ARGS.Ilt=i/100:ONE_PROPERTY_ARGS.Ilt=i,u.property=NAMESPACE.Dns.Rhs(c),u}static Zns(t,s,e,i,r,n,h,o,a,l,c){this.eos(TWO_PROPERTIES_ARGS,s,n,h,o,a,l,c);const u="string"==typeof e?e:NAMESPACE.Dns.Mhs(e);return TWO_PROPERTIES_ARGS.Ilt[X]=i,TWO_PROPERTIES_ARGS.Ilt[Y]=r,TWO_PROPERTIES_ARGS.property=NAMESPACE.Dns.Rhs(u),TWO_PROPERTIES_ARGS}static shs(t,s,e,i,r,n,h,o,a,l){return this.eos(VALUE_PROPERTY_ARGS,s,r,n,h,o,a,l),VALUE_PROPERTY_ARGS.Elt=e,VALUE_PROPERTY_ARGS.Ilt=i,VALUE_PROPERTY_ARGS.property=NAMESPACE.Dns.Rhs("value"),VALUE_PROPERTY_ARGS}}}{const C33=self.Bs,NAMESPACE=C33.llt.olt,TYPE_CHECK_OBJECTS=[];NAMESPACE.Nhs=class{constructor(){}static Dhs(t){if(0===TYPE_CHECK_OBJECTS.length){const s=TYPE_CHECK_OBJECTS;s.push({_b:NAMESPACE.Dns.vhs,result:this.Hhs}),s.push({_b:NAMESPACE.Dns.Phs,result:this.COLOR}),s.push({_b:NAMESPACE.Dns.Ohs,result:this.Yhs}),s.push({_b:NAMESPACE.Dns.Nns,result:this.zhs}),s.push({_b:()=>!0,result:this.Qhs})}C33.gi(t)&&(t=C33.llt.olt.Dns.Lns(t));for(const e of TYPE_CHECK_OBJECTS)if(e._b(t))return e.result}static get Hhs(){return"pair"}static get COLOR(){return"color"}static get Yhs(){return"angle"}static get zhs(){return"value"}static get Qhs(){return"other"}}}{const C33=self.Bs,NAMESPACE=C33.llt.olt;NAMESPACE.Bhs=class{constructor(){}static Khs(t){const s=C33.Mn(parseFloat(t));return C33.Rn(s)}static Xhs(t){return t.slice(0)}static Uhs(t){return t}}}{let getIndexForEase2=function(t){C3X.Mi(t);let s=Ease.xu(t),e;if(-1===(e=s?Ease.qu(s,null):Ease.qu(t,null)))throw new Error(`invalid ease name '${t}'`);return e},ValidateTags2=function(t,s=!1){if(!(s&&null==t||"string"==typeof t||Array.isArray(t)))throw new Error("invalid tags")};getIndexForEase=getIndexForEase2,ValidateTags=ValidateTags2;const C33=self.Bs,C3X=self.zs,IBehaviorInstance=self.H5,Ease=self.vu,NAMESPACE=C33.llt.olt,map=new WeakMap,TWEEN_PROPERTIES=new Map([["x",{name:"offsetX",type:"one"}],["y",{name:"offsetY",type:"one"}],["width",{name:"offsetWidth",type:"one"}],["height",{name:"offsetHeight",type:"one"}],["angle",{name:"offsetAngle",type:"one"}],["opacity",{name:"offsetOpacity",type:"one"}],["color",{name:"offsetColor",type:"color"}],["z-elevation",{name:"offsetZElevation",type:"one"}],["x-scale",{name:"offsetScaleX",type:"one"}],["y-scale",{name:"offsetScaleY",type:"one"}],["position",{name:"position",type:"two"}],["size",{name:"size",type:"two"}],["scale",{name:"scale",type:"two"}],["value",{name:"value",type:"value"}]]),TWEEN_OPTS={tags:"",ios:!1,loop:!1,pingPong:!1,repeatCount:1,Elt:0},I_TWEEN_OPTS={aH:getIndexForEase2};self.Xns=class extends IBehaviorInstance{constructor(){super(),map.set(this,IBehaviorInstance.Jk().N5())}ros(t,s,e,i,r){const n=map.get(this);if(!n.pu()||!n.uet())return null;const h=TWEEN_PROPERTIES.get(t);if(!h)throw new Error("invalid tween property");"one"===h.type||"value"===h.type?C3X.Si(s):(C3X.Hi(s),"two"===h.type?(C3X.Si(s[0]),C3X.Si(s[1])):"color"===h.type&&(C3X.Si(s[0]),C3X.Si(s[1]),C3X.Si(s[2]))),"angle"===t?s=C33.bn(s):"opacity"===t?s*=100:"color"===t&&(s=C33.th(s[0],s[1],s[2]));const o=getIndexForEase2(i);C3X.Ei(e),r=Object.assign({},TWEEN_OPTS,r),"value"===h.type&&C3X.Si(r.Elt),ValidateTags2(r.tags,!0);let a;if("one"===h.type||"color"===h.type?a=n.Pns(NAMESPACE.Jns.zns(n,r.tags,h.name,s,e,o,!!r.ios,!!r.loop,!!r.pingPong,r.repeatCount)):"two"===h.type?a=n.Pns(NAMESPACE.Jns.Zns(n,r.tags,h.name,s[0],s[1],e,o,!!r.ios,!!r.loop,!!r.pingPong,r.repeatCount)):"value"===h.type&&(a=n.Pns(NAMESPACE.Jns.shs(n,r.tags,r.Elt,s,e,o,!!r.ios,!!r.loop,!!r.pingPong,r.repeatCount))),a.Play())return a.wlt(n,I_TWEEN_OPTS);throw new Error("failed to start tween")}*nos(){const t=map.get(this);for(const s of t.cns())yield s.wlt(t,I_TWEEN_OPTS)}*hos(t){ValidateTags2(t);const s=map.get(this);for(const e of s.yns(t))yield e.wlt(s,I_TWEEN_OPTS)}get isEnabled(){return map.get(this).pu()}set isEnabled(t){map.get(this).ZTt(t)}}}{const a=self.Bs;a.llt.oos=class extends a.AIt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.llt.oos.FRt=class extends d.MIt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{const g=self.Bs,h=self.zs,i=self.H5,j=0,k=1,l=2,m=3,n=4,o=(g.llt.oos.Instance=class extends g.GIt{constructor(t,s){super(t),this.aos=2,this.los=2,this.uos=0,this.fos=0,this.n2t=!0;const e=this.Ge.UD()._4(),i=(this.dos=e.Nl(),this.Cos=e.Fl(),this.mos=this.Af.fL()-e.Nl(),this.gos=this.Af.pL()-e.Fl(),this.Sos=this.Af.fL()-e.$l(),this.yos=this.Af.pL()-e.kl(),s&&(this.aos=s[j],this.los=s[k],this.uos=s[l],this.fos=s[m],this.n2t=!!s[n]),this.Af.ed());this.Wd=new g.$d(g.Od.Fd(i,"layoutchange",()=>this.Lis())),this.n2t&&this.vEt()}_n(){super._n()}Ky(){return{xl:this.dos,yt:this.Cos,xr:this.mos,yb:this.gos,rd:this.Sos,bd:this.yos,al:this.aos,at:this.los,ar:this.uos,ab:this.fos,e:this.n2t}}zy(t){this.dos=t.xl,this.Cos=t.yt,this.mos=t.xr,this.gos=t.yb,this.Sos=t.rd,this.yos=t.bd,this.aos=t.al,this.los=t.at,this.uos=t.ar,this.fos=t.ab,this.n2t=t.e,this.n2t?this.vEt():this.pEt()}tTt(t){if(this.n2t&&!t)this.n2t=!1,this.pEt();else if(!this.n2t&&t){const s=this.Ge.UD()._4();this.dos=s.Nl(),this.Cos=s.Fl(),this.mos=this.Af.fL()-s.Nl(),this.gos=this.Af.pL()-s.Fl(),this.Sos=this.Af.fL()-s.$l(),this.yos=this.Af.pL()-s.kl(),this.n2t=!0,this.vEt()}}eTt(){return this.n2t}SIt(){if(this.n2t){const t=this.Ge.UD(),s=t.jD().xk();if(0===this.aos){const e=s.Nl()+this.dos-t._4().Nl();0!=e&&(t.dht(e),t.u4())}else if(1===this.aos){const i=s.$l()-this.mos-t._4().Nl();0!=i&&(t.dht(i),t.u4())}if(0===this.los){const r=s.Fl()+this.Cos-t._4().Fl();0!=r&&(t.pht(r),t.u4())}else if(1===this.los){const n=s.kl()-this.gos-t._4().Fl();0!=n&&(t.pht(n),t.u4())}if(1===this.uos){const h=s.$l()-this.Sos-t._4().$l();0!=h&&(t.dht(t.IW()*h),t.GC(Math.max(t.AC()+h),0),t.u4(),this.Sos=s.$l()-t._4().$l())}if(1===this.fos){const o=s.kl()-this.yos-t._4().kl();0!=o&&(t.pht(t.RW()*o),t.EC(Math.max(t.OC()+o,0)),t.u4(),this.yos=s.kl()-t._4().kl())}}}Z9(){this.SIt()}Lis(){this.SIt()}Qnt(t){switch(t){case j:return this.aos;case k:return this.los;case l:return this.uos;case m:return this.fos;case n:return this.n2t}}rht(t,s){switch(t){case j:this.aos=s;break;case k:this.los=s;break;case l:this.uos=s;break;case m:this.fos=s;break;case n:this.n2t=!!s,this.n2t?this.vEt():this.pEt()}}LEt(){return[{title:"$"+this.Y5().pf(),properties:[{name:"behaviors.anchor.properties.enabled.name",value:this.eTt(),qUt:t=>this.tTt(t)}]}]}XAt(){return self._os}},new WeakMap);self._os=class extends i{constructor(){super(),o.set(this,i.Jk().N5())}get isEnabled(){return o.get(this).eTt()}set isEnabled(t){o.get(this).tTt(t)}}}{const M=self.Bs;M.llt.oos.MJ={pu(){return this.eTt()}}}{const N=self.Bs;N.llt.oos.pnt={ZTt(t){this.tTt(0!==t)}}}{const P=self.Bs;P.llt.oos.Cnt={}}{const a=self.Bs;a.llt.Tos=class extends a.AIt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.llt.Tos.FRt=class extends d.MIt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{const g=self.Bs,h=self.zs,i=self.H5,j=0,k=1,l=2,m=3,n=4,o=5,p=6,q=7,r=8,s=0,t=1,u=2,v=3,w=4,x=5,y=6,z=7,A=8,B=9,C=0,D=1,E=2,F=3,G=4,H=2*Math.PI,I=Math.PI/2,J=3*Math.PI/2,K=[0,1,8,3,4,2,5,6,9,7],L=(g.llt.Tos.Instance=class extends g.GIt{constructor(t,s){super(t),this.Aos=0,this.Eos=0,this.Ios=0,this.wos=0,this.Ros=0,this.n2t=!0,this.Mos=0,this.bos=0,this.Gos=0,this.vos=0,this.Pos=0,this.Oos=0,this.v2t=0,this.xos=0,this.Los=0,this.Dos=0,this.Nos=0,s&&(this.Eos=K[s[j]],this.Ios=s[k],this.vos=this.Af.TD()*s[m],this.Mos=s[l],this.wos=s[l],this.wos+=this.vos,this.bos=s[n],0!==this.wos&&(this.Pos=this.Af.TD()*s[o],this.Aos=s[n]/this.wos*H,this.Aos+=this.Pos/this.wos*H),this.Oos=this.Af.TD()*s[q],this.Gos=s[p],this.Ros=s[p],this.Ros+=this.Oos,this.n2t=!!s[r]),this.Eos===x&&(this.Ros=g.Mn(this.Ros)),this.rbt(),this.n2t&&this.vEt()}_n(){super._n()}Ky(){return{i:this.Aos,e:this.n2t,mv:this.Eos,w:this.Ios,p:this.wos,mag:this.Ros,iv:this.v2t,iv2:this.xos,r:this.Nos,lkv:this.Los,lkv2:this.Dos}}zy(t){this.Aos=t.i,this.tTt(t.e),this.Eos=t.mv,this.Ios=t.w,this.wos=t.p,this.Ros=t.mag,this.v2t=t.iv,this.xos=t.iv2,this.Nos=t.r,this.Los=t.lkv,this.Dos=t.lkv2}rbt(){const e=this.Ge.UD();switch(this.Eos){case s:this.v2t=e.Ny();break;case t:this.v2t=e.ky();break;case u:this.v2t=e.AC(),this.Nos=e.OC()/e.AC();break;case v:this.v2t=e.AC();break;case w:this.v2t=e.OC();break;case x:this.v2t=e.GetAngle();break;case y:this.v2t=e.VG();break;case z:this.v2t=0;break;case A:this.v2t=e.Ny(),this.xos=e.ky();break;case B:this.v2t=e.Wy()}this.Los=this.v2t,this.Dos=this.xos}Fos(t){switch(t%=H,this.Ios){case C:return Math.sin(t);case D:return t<=I?t/I:t<=J?1-2*(t-I)/Math.PI:(t-J)/I-1;case E:return 2*t/H-1;case F:return-2*t/H+1;case G:return t<Math.PI?-1:1}return 0}Z9(){const t=this.Af.YL(this.Ge);this.n2t&&0!==t&&(0===this.wos?this.Aos=0:this.Aos=(this.Aos+t/this.wos*H)%H,this.$os())}$os(){const e=this.Ge.UD();switch(this.Eos){case s:e.Ny()!==this.Los&&(this.v2t+=e.Ny()-this.Los),e.Fy(this.v2t+this.Fos(this.Aos)*this.Ros),this.Los=e.Ny();break;case t:e.ky()!==this.Los&&(this.v2t+=e.ky()-this.Los),e.By(this.v2t+this.Fos(this.Aos)*this.Ros),this.Los=e.ky();break;case u:e.GC(this.v2t+this.Fos(this.Aos)*this.Ros),e.EC(e.AC()*this.Nos);break;case v:e.GC(this.v2t+this.Fos(this.Aos)*this.Ros);break;case w:e.EC(this.v2t+this.Fos(this.Aos)*this.Ros);break;case x:e.GetAngle()!==this.Los&&(this.v2t=g.Rn(this.v2t+(e.GetAngle()-this.Los))),e.y$(this.v2t+this.Fos(this.Aos)*this.Ros),this.Los=e.GetAngle();break;case y:e.jG(this.v2t+this.Fos(this.Aos)*this.Ros/100);break;case A:e.Ny()!==this.Los&&(this.v2t+=e.Ny()-this.Los),e.ky()!==this.Dos&&(this.xos+=e.ky()-this.Dos),e.Fy(this.v2t+Math.cos(e.GetAngle())*this.Fos(this.Aos)*this.Ros),e.By(this.xos+Math.sin(e.GetAngle())*this.Fos(this.Aos)*this.Ros),this.Los=e.Ny(),this.Dos=e.ky();break;case B:e.Hy(this.v2t+this.Fos(this.Aos)*this.Ros)}e.u4()}kos(t,s){}Bos(t){this.wos=t}Wos(){return this.wos}Hos(t){this.Ros=t}Vos(t){5===this.Eos&&(t=g.Mn(t)),this.Hos(t)}Uos(){return this.Ros}jos(){let t=this.Uos();return 5===this.Eos?g.bn(t):t}Xos(t){5===this.Eos&&5!==t&&(this.Ros=g.bn(this.Ros)),this.Eos=t,this.rbt()}Yos(){return this.Eos}qos(t){this.Ios=t}Kos(){return this.Ios}zos(t){this.Aos=g.wn(t,0,2*Math.PI),this.$os()}Jos(){return this.Aos}tTt(t){this.n2t=!!t,this.n2t?this.vEt():this.pEt()}eTt(){return this.n2t}Qnt(t){switch(t){case j:return this.Eos;case k:return this.Ios;case l:return this.Mos;case p:return this.Gos;case r:return this.n2t}}rht(t,s){switch(t){case j:this.Eos=K[s],this.rbt();break;case k:this.Ios=s;break;case l:this.Mos=s,this.wos=this.Mos+this.vos,this.n2t||(0!==this.wos?(this.Aos=this.bos/this.wos*H,this.Aos+=this.Pos/this.wos*H):this.Aos=0);break;case p:this.Gos=s,this.Ros=this.Gos+this.Oos,this.Eos===x&&(this.Ros=g.Mn(this.Ros));break;case r:this.n2t=!!s}}LEt(){const t="behaviors.sin";return[{title:"$"+this.Y5().pf(),properties:[{name:t+".properties.enabled.name",value:this.eTt(),qUt:t=>this.tTt(t)},{name:t+".properties.period.name",value:this.Wos(),qUt:t=>this.Bos(t)},{name:t+".properties.magnitude.name",value:this.jos(),qUt:t=>this.Vos(t)},{name:t+".debugger.value",value:this.Fos(this.Jos())*this.jos()}]}]}XAt(){return self.Qos}},new WeakMap),M=["horizontal","vertical","size","width","height","angle","opacity","value-only","forwards-backwards","z-elevation"],N=["sine","triangle","sawtooth","reverse-sawtooth","square"];self.Qos=class extends i{constructor(){super(),L.set(this,i.Jk().N5())}set Zos(t){h.Ei(t),L.get(this).Bos(t)}get Zos(){return L.get(this).Wos()}set tas(t){h.Ei(t),L.get(this).Hos(t)}get tas(){return L.get(this).Uos()}set sas(t){L.get(this).zos(t)}get sas(){return L.get(this).Jos()}set eas(t){h.Mi(t);const s=M.indexOf(t);if(-1===s)throw new Error("invalid movement");L.get(this).Xos(s)}get eas(){return M[L.get(this).Yos()]}set ias(t){h.Mi(t);const s=N.indexOf(t);if(-1===s)throw new Error("invalid wave");L.get(this).qos(s)}get ias(){return N[L.get(this).Kos()]}get value(){const t=L.get(this);return t.Fos(t.Jos())*t.Uos()}ras(){L.get(this).rbt()}set isEnabled(t){L.get(this).tTt(!!t)}get isEnabled(){return L.get(this).eTt()}}}{const va=self.Bs;va.llt.Tos.MJ={pu(){return this.eTt()},nas(t){return this.Yos()===t},oas(t,s){return va.compare(this.Wos(),t,s)},aas(t,s){return va.compare(this.jos(),t,s)},las(t){return this.Kos()===t}}}{const Ca=self.Bs;Ca.llt.Tos.pnt={ZTt(t){this.tTt(0!==t)},uas(t){this.Bos(t)},fas(t){this.Vos(t)},das(t){this.Xos(t)},pas(t){this.Ios=t},Cas(t){const s=2*Math.PI;this.zos(t*s%s)},mas(){this.rbt()}}}{const Ka=self.Bs;Ka.llt.Tos.Cnt={gas(){return this.Jos()/(2*Math.PI)},Sas(){return this.Wos()},yas(){return this.jos()},Ihs(){return this.Fos(this.Jos())*this.jos()}}}{const a=self.Bs;a.llt._as=class extends a.AIt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.llt._as.FRt=class extends d.MIt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{const g=self.Bs,h=self.zs,i=self.H5,j=0,k=1,l=2,m=(g.llt._as.Instance=class extends g.GIt{constructor(t,s){super(t),this.Iwt=0,this.jKt=0,this.n2t=!0,s&&(this.Iwt=g.Mn(s[j]),this.jKt=g.Mn(s[k]),this.n2t=s[l]),this.n2t&&this.vEt()}_n(){super._n()}Tas(t){this.Iwt=t}Aas(){return this.Iwt}Eas(t){this.jKt=t}Ias(){return this.jKt}Ky(){return{s:this.Iwt,a:this.jKt,e:this.n2t}}zy(t){this.Iwt=t.s,this.jKt=t.a,this.tTt(t.e)}Z9(){if(this.n2t){const t=this.Af.YL(this.Ge);if(0!==t&&(0!==this.jKt&&(this.Iwt+=this.jKt*t),0!==this.Iwt)){const s=this.Ge.UD();s.y$(s.GetAngle()+this.Iwt*t),s.u4()}}}Qnt(t){switch(t){case j:return g.bn(this.Aas());case k:return g.bn(this.Ias());case l:return this.eTt()}}rht(t,s){switch(t){case j:this.Tas(g.Mn(s));break;case k:this.Eas(g.Mn(s));break;case l:this.tTt(s)}}tTt(t){this.n2t=!!t,this.n2t?this.vEt():this.pEt()}eTt(){return this.n2t}LEt(){const t="behaviors.rotate";return[{title:"$"+this.Y5().pf(),properties:[{name:t+".properties.speed.name",value:g.bn(this.Aas()),qUt:t=>this.Tas(g.Mn(t))},{name:t+".properties.acceleration.name",value:g.bn(this.Ias()),qUt:t=>this.Eas(g.Mn(t))},{name:t+".properties.enabled.name",value:this.eTt(),qUt:t=>this.tTt(t)}]}]}XAt(){return self.was}},new WeakMap);self.was=class extends i{constructor(){super(),m.set(this,i.Jk().N5())}set speed(t){h.Ei(t),m.get(this).Tas(t)}get speed(){return m.get(this).Aas()}set acceleration(t){h.Ei(t),m.get(this).Eas(t)}get acceleration(){return m.get(this).Ias()}get isEnabled(){return m.get(this).eTt()}set isEnabled(t){m.get(this).tTt(t)}}}{const H=self.Bs;H.llt._as.MJ={pu(){return this.eTt()}}}{const I=self.Bs;I.llt._as.pnt={Ras(t){this.Tas(I.Mn(t))},DYt(t){this.Eas(I.Mn(t))},ZTt(t){this.tTt(t)}}}{const M=self.Bs;M.llt._as.Cnt={Mas(){return M.bn(this.Aas())},bas(){return M.bn(this.Ias())}}}{const a=self.Bs;a.llt.Gas=class extends a.AIt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.llt.Gas.FRt=class extends d.MIt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{const g=self.Bs;g.llt.Gas.Instance=class extends g.GIt{constructor(t,s){super(t),this.vas=null,this.Pas=-1,this.Oas="",this.xas=new Set,this.Las=0,this.Das=0,this.Nas=0,this.Fas=0,this.$as=0,this.kas=0,this.Bas=0,this.Was=0,this.Has=0,this.Vas=0,this.Uas=!1,s&&(this.Uas=s[0]);const e=this.Af.ed();this.Wd=new g.$d(g.Od.Fd(e,"instancedestroy",t=>this.Jss(t.q5)),g.Od.Fd(e,"afterload",t=>this.e9()))}_n(){this.vas=null,super._n()}jas(t){t?(this.vas=t,this.OEt()):(this.vas=null,this.CEt())}Xas(t,s,e){if(t){const i=t.m_t(this.Ge);if(i){this.Oas=s,this.jas(i);const r=this.Ge.UD(),n=i.UD();if("properties"===this.Oas){const h=this.xas;h.clear();for(const o of e)h.add(o);this.Fas=r.Ny()-n.Ny(),this.$as=r.ky()-n.ky(),this.Was=r.GetAngle()-n.GetAngle(),this.Vas=r.GetAngle(),this.Has=r.Wy()-n.Wy(),h.has("x")&&h.has("y")&&(this.Das=g.xn(n.Ny(),n.ky(),r.Ny(),r.ky())-n.GetAngle(),this.Las=g.Pn(n.Ny(),n.ky(),r.Ny(),r.ky())),h.has("width-abs")?this.kas=r.AC()-n.AC():h.has("width-scale")&&(this.kas=r.AC()/n.AC()),h.has("height-abs")?this.Bas=r.OC()-n.OC():h.has("height-scale")&&(this.Bas=r.OC()/n.OC())}else this.Las=g.Pn(n.Ny(),n.ky(),r.Ny(),r.ky())}}}Ky(){const t=this.xas,s=this.Oas,e={uid:this.vas&&!this.vas.mV()?this.vas.oB():-1,m:s,d:this.Uas};return"rope"===s||"bar"===s?e.pd=this.Las:"properties"===s&&(e.ps=[...this.xas],t.has("imagepoint")?e.ip=this.Nas:t.has("x")&&t.has("y")?(e.pa=this.Das,e.pd=this.Las):(t.has("x")&&(e.dx=this.Fas),t.has("y")&&(e.dy=this.$as)),t.has("angle")&&(e.da=this.Was,e.lka=this.Vas),(t.has("width-abs")||t.has("width-scale"))&&(e.dw=this.kas),(t.has("height-abs")||t.has("height-scale"))&&(e.dh=this.Bas),t.has("z"))&&(e.dz=this.Has),e}zy(t){const s=t.m,e=this.xas;if(e.clear(),this.Pas=t.uid,"number"==typeof s)this.Yas(t);else if(this.Oas=s,t.hasOwnProperty("d")&&(this.Uas=!!t.d),"rope"===s||"bar"===s)this.Las=t.pd;else if("properties"===s){for(const i of t.ps)e.add(i);e.has("imagepoint")?this.Nas=t.ip:e.has("x")&&e.has("y")?(this.Das=t.pa,this.Las=t.pd):(e.has("x")&&(this.Fas=t.dx),e.has("y")&&(this.$as=t.dy)),e.has("angle")&&(this.Was=t.da,this.Vas=t.lka||0),(e.has("width-abs")||e.has("width-scale"))&&(this.kas=t.dw),(e.has("height-abs")||e.has("height-scale"))&&(this.Bas=t.dh),e.has("z")&&(this.Has=t.dz)}}Yas(t){const s=this.xas,e=t.msa,i=t.tsa,r=t.pa,n=t.pd,h=t.m;switch(h){case 0:this.Oas="properties",s.add("x").add("y").add("angle"),this.Das=r,this.Las=n,this.Was=e-i,this.Vas=t.lka;break;case 1:this.Oas="properties",s.add("x").add("y"),this.Das=r,this.Las=n;break;case 2:this.Oas="properties",s.add("angle"),this.Was=e-i,this.Vas=t.lka;break;case 3:this.Oas="rope",this.Las=t.pd;break;case 4:this.Oas="bar",this.Las=t.pd}}e9(){-1===this.Pas?this.jas(null):(this.jas(this.Af.kD(this.Pas)),this.Pas=-1)}Jss(t){this.vas===t&&(this.jas(null),this.Uas)&&this.Af.tB(this.Ge)}GEt(){const n=this.vas;if(n&&!n.mV()){let e=n.UD(),t=this.Ge,i=t.UD(),s=this.Oas,r=!1;if("rope"===s||"bar"===s){const h=g.Pn(i.Ny(),i.ky(),e.Ny(),e.ky());if(h>this.Las||"bar"===s&&h<this.Las){const o=g.xn(e.Ny(),e.ky(),i.Ny(),i.ky());i.f4(e.Ny()+Math.cos(o)*this.Las,e.ky()+Math.sin(o)*this.Las),r=!0}}else{let t=this.xas,s=0;if(t.has("imagepoint")){const[a,l]=n.kyt(this.Nas);i.Fyt(a,l)||(i.f4(a,l),r=!0)}else if(t.has("x")&&t.has("y")){const c=e.Ny()+Math.cos(e.GetAngle()+this.Das)*this.Las,u=e.ky()+Math.sin(e.GetAngle()+this.Das)*this.Las;i.Fyt(c,u)||(i.f4(c,u),r=!0)}else s=e.Ny()+this.Fas,t.has("x")&&s!==i.Ny()&&(i.Fy(s),r=!0),s=e.ky()+this.$as,t.has("y")&&s!==i.ky()&&(i.By(s),r=!0);t.has("angle")&&(this.Vas!==i.GetAngle()&&(this.Was=g.Rn(this.Was+(i.GetAngle()-this.Vas))),(s=g.Rn(e.GetAngle()+this.Was))!==i.GetAngle()&&(i.y$(s),r=!0),this.Vas=i.GetAngle()),t.has("width-abs")&&(s=e.AC()+this.kas)!==i.AC()&&(i.GC(s),r=!0),t.has("width-scale")&&(s=e.AC()*this.kas)!==i.AC()&&(i.GC(s),r=!0),t.has("height-abs")&&(s=e.OC()+this.Bas)!==i.OC()&&(i.EC(s),r=!0),t.has("height-scale")&&(s=e.OC()*this.Bas)!==i.OC()&&(i.EC(s),r=!0),t.has("z")&&(s=e.Wy()+this.Has)!==i.Wy()&&(i.Hy(s),this.Af.JD())}r&&i.u4()}}LEt(){const t="behaviors.pin.debugger";return[{title:"$"+this.Y5().pf(),properties:[{name:t+".is-pinned",value:!!this.vas},{name:t+".pinned-uid",value:this.vas?this.vas.oB():0}]}]}}}{const $=self.Bs;$.llt.Gas.MJ={qas(){return!!this.vas},Kas(){return this.Uas}}}{const _=self.Bs;_.llt.Gas.pnt={zas(t,s){this.Xas(t,0===s?"rope":"bar")},Jas(t,s,e,i,r,n,h){const o=[];s&&o.push("x"),e&&o.push("y"),i&&o.push("angle"),h&&o.push("z"),1===r?o.push("width-abs"):2===r&&o.push("width-scale"),1===n?o.push("height-abs"):2===n&&o.push("height-scale"),0!==o.length&&this.Xas(t,"properties",o)},Qas(t,s,e,i,r,n){const h=["imagepoint"];e&&h.push("angle"),n&&h.push("z"),1===i?h.push("width-abs"):2===i&&h.push("width-scale"),1===r?h.push("height-abs"):2===r&&h.push("height-scale"),this.Nas=s,this.Xas(t,"properties",h)},Zas(t){"rope"!==this.Oas&&"bar"!==this.Oas||(this.Las=Math.max(t,0))},tls(t){this.Uas=t},sls(){this.jas(null),this.Oas="",this.xas.clear(),this.Nas=""},Gas(t,s){switch(s){case 0:this.Xas(t,"properties",["x","y","angle"]);break;case 1:this.Xas(t,"properties",["x","y"]);break;case 2:this.Xas(t,"properties",["angle"]);break;case 3:this.Xas(t,"rope");break;case 4:this.Xas(t,"bar")}}}}{const va=self.Bs;va.llt.Gas.Cnt={els(){return this.vas?this.vas.oB():-1}}}{let SetObjectTypeCollisionsEnabled2=function(e,i,t){const r=e.xSt(),n=i.xSt();if(t){const s=r.get(h),o=(s&&s.delete(i.gq()),n.get(h));o&&o.delete(e.gq())}else{let t=r.get(h),s=(t||(t=new Set,r.set(h,t)),n.get(h));s||(s=new Set,n.set(h,s)),t.add(i.gq()),s.add(e.gq())}},a=(SetObjectTypeCollisionsEnabled=SetObjectTypeCollisionsEnabled2,self.Bs),b=self.zs,s=null,o=null,n=[],y=null,r=null,h="Physics_DisabledCollisions";a.llt.ils=class extends a.AIt{constructor(t){super(t),(r=this).rls=null,this.nls=10,this.hls=.02,this.ols=null,this.als=-1,this.lls=1,this.cls=8,this.uls=3,this.fls=!0,this.Af.iN(this.dls())}XAt(){return self.pls}async dls(){const t=await this.Af.Jx().mN("box2d.wasm");await new Promise(s=>{self.Box2DWasmModule({wasmBinaryFile:t}).then(t=>{y=t,this.Cls(),s()})})}Cls(){const r=this.Af.tL(),t=(s=a.llt.ils.zwt(0,0),o=a.llt.ils.zwt(0,0),this.rls=new y.b2World(a.llt.ils.mls(0,this.nls),!0),new y.JSContactListener),e=(t.BeginContact=t=>{const s=y.wrapPointer(t,y.b2Contact),e=a.llt.ils.Instance.gls(s.GetFixtureA().GetBody()),i=a.llt.ils.Instance.gls(s.GetFixtureB().GetBody());r.IOt(e.K5(),i.K5())},t.EndContact=()=>{},t.PreSolve=()=>{},t.PostSolve=()=>{},this.rls.SetContactListener(t),new y.JSContactFilter);e.ShouldCollide=(t,s)=>{if(this.fls)return!0;const e=y.wrapPointer(t,y.b2Fixture),i=y.wrapPointer(s,y.b2Fixture),r=a.llt.ils.Instance.gls(e.GetBody()),n=a.llt.ils.Instance.gls(i.GetBody()),o=r.K5().qk(),l=n.K5().qk(),c=o.gq(),u=l.gq(),f=o.xSt().get(h);if(f&&f.has(u))return!1;const d=l.xSt().get(h);return!d||!d.has(c)},this.rls.SetContactFilter(e),this.ols=new y.b2WorldManifold}_n(){super._n()}Sls(){return y}yls(){return this.rls}_ls(){return this.hls}Tls(){return this.lls}Als(t){this.lls=t}Els(t){this.als=t}Ils(){return this.als}wls(t){this.cls=Math.max(t,1)}Rls(){return this.cls}Mls(t){this.uls=Math.max(t,1)}bls(){return this.uls}Gls(t,s){this.wls(t),this.Mls(s)}dqt(){return this.nls}SetGravity(t){t!==this.nls&&(this.rls.SetGravity(a.llt.ils.mls(0,t)),this.nls=t,this.vls())}vls(){for(const t of this.t$()){const s=a.llt.ils.Instance.Pls(t);if(s){const e=s.GetBody();e&&e.SetAwake(!0)}}}Ols(){this.fls=!1}xls(t,s,e){if(e=!!e,t&&s){if(s.aq())for(const i of s.xmt())SetObjectTypeCollisionsEnabled2(t,i,e);else SetObjectTypeCollisionsEnabled2(t,s,e);this.Ols()}}GetWorldManifold(){return this.ols}static Lls(){return h}static zwt(t,s){if(n.length){const e=n.pop();return e.set_x(t),e.set_y(s),e}{const i=y.b2Vec2;return new i(t,s)}}static Dls(t){n.push(t)}static mls(t,e){return s.set_x(t),s.set_y(e),s}static Nls(t,s){return o.set_x(t),o.set_y(s),o}static Fls(s){let t=y.b2PolygonShape,e=new t,i=y._malloc(8*s.length),r=0;for(let t=0;t<s.length;++t)y.HEAPF32[i+r>>2]=s[t].get_x(),y.HEAPF32[i+(r+4)>>2]=s[t].get_y(),r+=8;const n=y.wrapPointer(i,y.b2Vec2);return e.Set(n,s.length),y._free(i),e}};const i=["fixed","variable"];self.pls=class extends self.J5{constructor(){super()}set $ls(t){b.Ei(t),r.SetGravity(t)}get $ls(){return r.dqt()}set kls(t){const s=i.indexOf(t);if(s<0)throw new Error("invalid stepping mode");r.Als(i[s])}get kls(){return i[r.Tls()]}set Bls(t){b.Ei(t),r.wls(t)}get Bls(){return r.Rls()}set Wls(t){b.Ei(t),r.Mls(t)}get Wls(){return r.bls()}Hls(t,s,e){const i=r.cN(),n=i.BN(t),h=i.BN(s);e=!!e,r.xls(n,h,e)}}}{const Ea=self.Bs;Ea.llt.ils.FRt=class extends Ea.MIt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{let UnwrapIWorldInstance2=function(t,s){const e=f0.get(t).cN();return e.VD(s)};UnwrapIWorldInstance=UnwrapIWorldInstance2;const Ha=self.Bs,Ia=self.zs,Ja=self.H5,Ka=self.assert,La=0,Ma=1,Na=2,Oa=3,Pa=4,Qa=5,Ra=6,Sa=7,Ta=8,Ua=9,Va=new WeakMap,Wa=new WeakMap,Xa=new WeakMap,Ya=-2147483648,Za=1073741824,$a=536870912,_a=3758096384,a0=536870911,b0=Ha.llt.ils.mls,c0=Ha.llt.ils.Nls,d0=Ha.yn(Ha.Rect),e0=Ha.yn(Ha.dc),f0=(Ha.llt.ils.Instance=class extends Ha.GIt{constructor(t,s){super(t);const e=this.U5(),i=this.UD(),r=(this.Vls=e.Sls(),this.rls=e.yls(),this.hls=e._ls(),this.Uls=!1,this.jls=0,this.Xls=0,this.Yls=!1,this.qls=1,this.Kls=.5,this.zls=.2,this.Jls=0,this.Qls=.01,this.Zls=!1,this.n2t=!0,this.tcs=null,this.scs=[],this.ecs=[],this.ics=[],this.rcs=new Set,this.ncs=i.Ny(),this.hcs=i.ky(),this.Vas=i.GetAngle(),this.ocs=0,this.acs=0,this.lcs=!1,s&&(this.Uls=!!s[La],this.jls=s[Ma],this.Yls=!!s[Na],this.qls=s[Oa],this.Kls=s[Pa],this.zls=s[Qa],this.Jls=s[Ra],this.Qls=s[Sa],this.Zls=!!s[Ta],this.n2t=!!s[Ua]),this.Af.ed());this.Wd=new Ha.$d(Ha.Od.Fd(r,"instancedestroy",t=>this.Jss(t.q5)),Ha.Od.Fd(r,"beforeload",()=>this.t9()),Ha.Od.Fd(r,"afterload",()=>this.e9())),Wa.set(this.Ge,this),this.n2t&&this.vEt()}xIt(){this.ccs()}_n(){this.ucs(),Ha.qh(this.ics),this.rcs.clear(),this.tcs&&(this.fcs(),this.rls.DestroyBody(this.tcs),this.tcs=null),super._n()}dcs(t){if(this.tcs){const s=this.tcs.CreateFixture(t);return this.scs.push(s),s}}fcs(){if(this.tcs){for(const t of this.scs)this.tcs.DestroyFixture(t);Ha.qh(this.scs)}}pcs(){const t=this.UD();return t.b5()?(t.nPt(d0,e0,!1),e0):t.A4()}Ccs(t){this.Vls.destroy(t)}ccs(){if(this.n2t){const t=this.Vls.b2FixtureDef,e=this.Vls.b2BodyDef,i=this.UD(),s=i.yPt();if(this.Xls=this.jls,s||this.Ge.pbt()||0!==this.Xls||(this.Xls=1),!this.tcs){const o=new e;o.set_type(this.Uls?0:2);let t=i.Ny()*this.hls,s=i.ky()*this.hls;if(2===this.Xls){const a=this.pcs();t=a.Ul()*this.hls,s=a.jl()*this.hls}o.set_position(c0(t,s)),o.set_angle(i.GetAngle()),o.set_fixedRotation(this.Yls),o.set_linearDamping(this.Jls),o.set_angularDamping(this.Qls),o.set_bullet(this.Zls),this.tcs=this.rls.CreateBody(o),this.Ccs(o),Va.set(this.tcs,this)}this.fcs();const r=new t,n=(r.set_density(this.qls),r.set_friction(this.Kls),r.set_restitution(this.zls),Math.max(Math.abs(i.AC()),1)),h=Math.max(Math.abs(i.OC()),1);0===this.Xls?this.Ge.pbt()?this.mcs(r):this.gcs(r,n,h):1===this.Xls?this.Scs(r,i,n,h):this.ycs(r,n,h),this.ocs=i.AC(),this.acs=i.OC(),i.EPt(!1),this.Ccs(r)}}Scs(t,s,e,i){let r=this.Vls.b2PolygonShape,n=new r,h=e*this.hls,o=i*this.hls,a=s.IW(),l=s.RW();s.AC()<0&&(a=1-a),s.OC()<0&&(l=1-l);const c=(.5-a)*h,u=(.5-l)*o,f=Ha.llt.ils.zwt(c,u);n.SetAsBox(h/2,o/2,f,0),t.set_shape(n),this.dcs(t),this.Ccs(n),Ha.llt.ils.Dls(f)}ycs(t,s,e){const i=this.Vls.b2CircleShape,r=new i;r.set_m_radius(Math.min(s,e)*this.hls*.5),t.set_shape(r),this.dcs(t),this.Ccs(r)}gcs(t,s,e){const i=this.UD(),r=i.AC()<0,n=i.OC()<0,h=this.hls,o=i.APt(r?-s:s,n?-e:e,0),a=o.su(),l=a.length/2,c=[];for(let t=0;t<l;++t)c.push(Ha.llt.ils.zwt(a[2*t],a[2*t+1]));r!=n&&c.reverse();const u=Ha.llt.ils.Tcs._cs(c,s*e);for(const f of c)Ha.llt.ils.Dls(f);if(u.length)for(const d of u){for(const C of d)C.set_x(C.get_x()*h),C.set_y(C.get_y()*h);const p=Ha.llt.ils.Fls(d);t.set_shape(p),this.dcs(t),this.Ccs(p);for(const m of d)Ha.llt.ils.Dls(m)}else this.Scs(t,i,s,e)}mcs(i){const r=this.hls,n=Ha.llt.ils.zwt,h=Ha.llt.ils.Dls,e=[],o=(this.Ge.N5().GetAllCollisionRects(e),[]);for(let t=0,s=e.length;t<s;++t){const a=e[t],l=a.GetRect(),c=a.GetPoly();if(c){let e=Xa.get(c);if(!e){const u=c.su(),f=c.eu();for(let t=0;t<f;++t)o.push(n(u[2*t],u[2*t+1]));const d=a.GetTileId()&_a;(d===Ya||d===Za||d===$a||d&Ya&&d&Za&&d&$a)&&o.reverse(),e=Ha.llt.ils.Tcs._cs(o,l.width()*l.height()),Xa.set(c,e);for(const p of o)h(p);Ha.qh(o)}for(let t=0,s=e.length;t<s;++t){const C=e[t];for(let t=0,s=C.length;t<s;++t)o.push(n((l.Nl()+C[t].get_x())*r,(l.Fl()+C[t].get_y())*r));const m=Ha.llt.ils.Fls(o);i.set_shape(m),this.dcs(i),this.Ccs(m);for(const g of o)h(g);Ha.qh(o)}}else{o.push(n(l.Nl()*r,l.Fl()*r)),o.push(n(l.$l()*r,l.Fl()*r)),o.push(n(l.$l()*r,l.kl()*r)),o.push(n(l.Nl()*r,l.kl()*r));const S=Ha.llt.ils.Fls(o);i.set_shape(S),this.dcs(i),this.Ccs(S)}for(const y of o)h(y);Ha.qh(o)}}Acs(){this.tcs&&(this.ucs(),Va.delete(this.tcs),this.fcs(),this.rls.DestroyBody(this.tcs),this.tcs=null)}ucs(){for(const t of this.ecs)this.rls.DestroyJoint(t);Ha.qh(this.ecs)}Ecs(){for(const t of this.ics)switch(t.type){case 0:this.Ics(...t.params);break;case 1:this.wcs(...t.params);break;case 2:this.Rcs(...t.params);break;case 3:this.Mcs(...t.params)}}bcs(t){const s=this.UD();if(-1===t)return[s.Ny(),s.ky()];if(0===t&&this.tcs){const e=this.tcs.GetWorldCenter();return[e.get_x()/this.hls,e.get_y()/this.hls]}return this.Ge.kyt(t)}Gcs(t,s,e,i,r){if(this.n2t&&s&&s!==this.Ge){const n=Ha.llt.ils.Instance.Pls(s);n&&n.eTt()&&(this.ics.push({type:0,params:[t,s.oB(),e,i,r]}),this.Ics(t,s.oB(),e,i,r))}}Ics(t,s,e,i,r){if(this.n2t){const n=this.Af.kD(s);if(n&&n!==this.Ge){const h=Ha.llt.ils.Instance.Pls(n);if(h&&h.eTt()){h.rcs.add(this.Ge),this.vcs(!1),h.vcs(!1);const[o,a]=this.bcs(t),[l,c]=n.kyt(e),u=o-l,f=a-c,d=this.Vls.b2DistanceJointDef,p=this.hls,C=new d;C.Initialize(this.tcs,h.GetBody(),b0(o*p,a*p),c0(l*p,c*p)),C.set_length(Math.hypot(u,f)*p),C.set_dampingRatio(i),C.set_frequencyHz(r),this.ecs.push(this.rls.CreateJoint(C)),this.Ccs(C)}}}}Pcs(t,s){if(this.n2t&&s&&s!==this.Ge){const e=Ha.llt.ils.Instance.Pls(s);e&&e.eTt()&&(this.ics.push({type:1,params:[t,s.oB()]}),this.wcs(t,s.oB()))}}wcs(t,s){if(this.n2t){const e=this.Af.kD(s);if(e&&e!==this.Ge){const i=Ha.llt.ils.Instance.Pls(e);if(i&&i.eTt()){i.rcs.add(this.Ge),this.vcs(!1),i.vcs(!1);const[r,n]=this.bcs(t),h=this.Vls.b2RevoluteJointDef,o=this.hls,a=new h;a.Initialize(this.tcs,i.GetBody(),b0(r*o,n*o)),this.ecs.push(this.rls.CreateJoint(a)),this.Ccs(a)}}}}Ocs(t,s,e,i){if(this.n2t&&s&&s!==this.Ge){const r=Ha.llt.ils.Instance.Pls(s);r&&r.eTt()&&(e=Ha.bn(e),i=Ha.bn(i),this.ics.push({type:2,params:[t,s.oB(),e,i]}),this.Rcs(t,s.oB(),e,i))}}Rcs(t,s,e,i){if(this.n2t){const r=this.Af.kD(s);if(r&&r!==this.Ge){const n=Ha.llt.ils.Instance.Pls(r);if(n&&n.eTt()){n.rcs.add(this.Ge),this.vcs(!1),n.vcs(!1);const[h,o]=this.bcs(t),a=this.Vls.b2RevoluteJointDef,l=this.hls,c=new a;c.Initialize(this.tcs,n.GetBody(),b0(h*l,o*l)),c.set_enableLimit(!0),c.set_lowerAngle(Ha.Mn(e)),c.set_upperAngle(Ha.Mn(i)),this.ecs.push(this.rls.CreateJoint(c)),this.Ccs(c)}}}}xcs(t,s,e,i,r,n,h,o,a){if(this.n2t&&s&&s!==this.Ge){const l=Ha.llt.ils.Instance.Pls(s);l&&l.eTt()&&(e=Ha.bn(e),o=Ha.bn(o),this.ics.push({type:3,params:[t,s.oB(),e,i,r,n,h,o,a]}),this.Mcs(t,s.oB(),e,i,r,n,h,o,a))}}Mcs(t,s,e,i,r,n,h,o,a){if(this.n2t){const l=this.Af.kD(s);if(l&&l!==this.Ge){const c=Ha.llt.ils.Instance.Pls(l);if(c&&c.eTt()){c.rcs.add(this.Ge),this.vcs(!1),c.vcs(!1);const[u,f]=this.bcs(t),d=(e=Ha.Mn(e),Math.cos(e)),p=Math.sin(e),C=this.Vls.b2PrismaticJointDef,m=this.hls,g=new C;g.Initialize(this.tcs,c.GetBody(),b0(u*m,f*m),c0(d,p)),g.set_enableLimit(!!i),g.set_lowerTranslation(r*m),g.set_upperTranslation(n*m),g.set_enableMotor(!!h),g.set_motorSpeed(Ha.Mn(o)),g.set_maxMotorForce(a),this.ecs.push(this.rls.CreateJoint(g)),this.Ccs(g)}}}}Lcs(){this.n2t&&(this.ucs(),Ha.qh(this.ics),this.rcs.clear())}Dcs(){for(const t of this.rcs){const s=Ha.llt.ils.Instance.Pls(t);if(!s||!s.eTt())return;s.Ncs(this.Ge)}this.rcs.clear()}Jss(t){this.Ncs(t)}Ncs(t){let e=t.oB(),i=0;for(let t=0,s=this.ics.length;t<s;++t)this.ics[i]=this.ics[t],i<this.ecs.length&&(this.ecs[i]=this.ecs[t]),this.ics[t].params[1]===e?t<this.ecs.length&&this.rls.DestroyJoint(this.ecs[t]):++i;Ha.Yh(this.ics,i),i<this.ecs.length&&Ha.Yh(this.ecs,i),this.rcs.delete(t)}GetBody(){return this.tcs}static gls(t){return Va.get(t)||null}static Pls(t){return Wa.get(t)||null}Ky(){const t={e:this.n2t,im:this.Uls,pr:this.Yls,d:this.qls,fr:this.Kls,re:this.zls,ld:this.Jls,ad:this.Qls,b:this.Zls,mcj:this.ics};if(this.n2t){const s=this.tcs.GetLinearVelocity();t.vx=s.get_x(),t.vy=s.get_y(),t.om=this.tcs.GetAngularVelocity()}return t}t9(){this.ucs(),Ha.qh(this.ics),this.rcs.clear()}zy(t){this.Acs(),this.n2t=t.e,t.hasOwnProperty("im")&&(this.Uls=!!t.im),this.Yls=t.pr,this.qls=t.d,this.Kls=t.fr,this.zls=t.re,this.Jls=t.ld,this.Qls=t.ad,this.Zls=t.b,this.ics=t.mcj;const s=this.UD();this.ncs=s.Ny(),this.hcs=s.ky(),this.Vas=s.GetAngle(),this.ocs=s.AC(),this.acs=s.OC(),this.n2t&&(this.ccs(),this.tcs.SetLinearVelocity(b0(t.vx,t.vy)),this.tcs.SetAngularVelocity(t.om),0===t.vx&&0===t.vy&&0===t.om||this.tcs.SetAwake(!0),this.ics=t.mcj),this.n2t?this.vEt():this.pEt()}e9(){this.n2t&&this.Ecs()}Z9(){if(this.n2t){let t=this.Af,s=this.U5(),e=0;0===s.Tls()?e=t.ZL()/60:(e=t.YL(this.Ge))>1/30&&(e=1/30);const i=t.tBt();i>s.Ils()&&0<t.ZL()&&(0!==e&&this.rls.Step(e,s.Rls(),s.bls()),this.rls.ClearForces(),s.Els(i)),this.vcs(!0)}}vcs(t){let s=this.Ge,e=s.UD(),i=this.hls,r=(e.AC()===this.ocs&&e.OC()===this.acs&&!e.GPt()||this.ccs(),this.tcs),n=e.Ny(),h=e.ky(),o=n-this.ncs,a=h-this.hcs,l=.001<Math.abs(o)||.001<Math.abs(a),c=e.GetAngle()!==this.Vas,u=n,f=h;if(2===this.Xls){const g=this.pcs();u=g.Ul(),f=g.jl()}l?(c?r.SetTransform(b0(u*i,f*i),e.GetAngle()):r.SetTransform(b0(u*i,f*i),r.GetAngle()),t&&(r.SetLinearVelocity(b0(o,a)),this.lcs=!0),r.SetAwake(!0)):t&&this.lcs&&(this.lcs=!1,r.SetLinearVelocity(b0(0,0)),r.SetTransform(b0(u*i,f*i),r.GetAngle())),!l&&c&&(r.SetTransform(r.GetPosition(),e.GetAngle()),r.SetAwake(!0));const d=r.GetPosition(),p=d.get_x()/i,C=d.get_y()/i,m=r.GetAngle();if((p!==e.Ny()||C!==e.ky()||m!==e.GetAngle())&&(e.f4(p,C),e.y$(m),e.u4(),2===this.Xls)){const S=this.pcs(),y=S.Ul()-e.Ny(),_=S.jl()-e.ky();0==y&&0==_||(e.m4(-y,-_),e.u4())}this.ncs=e.Ny(),this.hcs=e.ky(),this.Vas=e.GetAngle()}Qnt(t){switch(t){case Na:return this.Fcs();case Oa:return this.$cs();case Pa:return this.kcs();case Qa:return this.Bcs();case Ra:return this.Wcs();case Sa:return this.Hcs();case Ta:return this.Vcs();case Ua:return this.eTt()}}rht(t,s){switch(t){case Na:this.Ucs(s);break;case Oa:this.jcs(s);break;case Pa:this.Xcs(s);break;case Qa:this.Ycs(s);break;case Ra:this.qcs(s);break;case Sa:this.Kcs(s);break;case Ta:this.zcs(s);break;case Ua:this.tTt(s)}}tTt(t){t=!!t,this.n2t&&!t?(this.Dcs(),this.Acs(),this.n2t=!1,this.pEt()):!this.n2t&&t&&(this.n2t=!0,this.ccs(),this.vEt())}eTt(){return this.n2t}LEt(){const t="behaviors.physics",s=[{name:t+".properties.enabled.name",value:this.eTt(),qUt:t=>this.tTt(t)},{name:t+".properties.immovable.name",value:this.Jcs(),qUt:t=>this.Qcs(t)},{name:t+".properties.density.name",value:this.$cs(),qUt:t=>this.jcs(t)},{name:t+".properties.friction.name",value:this.kcs(),qUt:t=>this.Xcs(t)},{name:t+".properties.elasticity.name",value:this.Bcs(),qUt:t=>this.Ycs(t)},{name:t+".properties.linear-damping.name",value:this.Wcs(),qUt:t=>this.qcs(t)},{name:t+".properties.angular-damping.name",value:this.Hcs(),qUt:t=>this.Kcs(t)}];return this.n2t&&(s.push({name:t+".debugger.is-sleeping",value:!this.Zcs()}),s.push({name:t+".debugger.velocity-x",value:this.tus(),qUt:t=>this.sus(t,this.eus())}),s.push({name:t+".debugger.velocity-y",value:this.eus(),qUt:t=>this.sus(this.tus(),t)}),s.push({name:t+".debugger.angular-velocity",value:Ha.bn(this.ius()),qUt:t=>this.rus(Ha.Mn(t))}),s.push({name:t+".debugger.mass",value:this.nus()})),[{title:"$"+this.Y5().pf(),properties:s}]}hus(t,s,e){const[i,r]=this.bcs(e);this.ous(t,s,i,r)}aus(t,s,e,i){const[r,n]=this.bcs(i),h=Ha.xn(r,n,s,e);this.ous(Math.cos(h)*t,Math.sin(h)*t,r,n)}lus(t,s,e){const[i,r]=this.bcs(e);this.ous(Math.cos(s)*t,Math.sin(s)*t,i,r)}ous(t,s,e,i){if(this.n2t){const r=this.hls;this.tcs.ApplyForce(b0(t,s),c0(e*r,i*r),!0)}}cus(t,s,e){const[i,r]=this.bcs(e);this.uus(t,s,i,r)}fus(t,s,e,i){const[r,n]=this.bcs(i),h=Ha.xn(r,n,s,e);this.uus(Math.cos(h)*t,Math.sin(h)*t,r,n)}dus(t,s,e){const[i,r]=this.bcs(e);this.uus(Math.cos(s)*t,Math.sin(s)*t,i,r)}uus(t,s,e,i){if(this.n2t){const r=this.hls,n=(this.tcs.ApplyLinearImpulse(b0(t,s),c0(e*r,i*r),!0),this.UD());this.ncs=n.Ny(),this.hcs=n.ky(),this.lcs=!1}}pus(t){this.n2t&&this.tcs.ApplyTorque(t,!0)}Cus(t,s){const e=Ha.Nn(this.UD().GetAngle(),s)?-1:1;this.pus(t*e)}mus(t,s,e){const i=this.UD(),r=Ha.xn(i.Ny(),i.ky(),s,e),n=Ha.Nn(i.GetAngle(),r)?-1:1;this.pus(t*n)}rus(t){this.n2t&&(this.tcs.SetAngularVelocity(t),this.tcs.SetAwake(!0))}ius(){return this.n2t?this.tcs.GetAngularVelocity():0}sus(t,s){if(this.n2t){const e=this.hls,i=(this.tcs.SetLinearVelocity(b0(t*e,s*e)),this.tcs.SetAwake(!0),this.UD());this.ncs=i.Ny(),this.hcs=i.ky(),this.lcs=!1}}gus(){if(!this.n2t)return[0,0];const t=this.hls,s=this.tcs.GetLinearVelocity();return[s.get_x()/t,s.get_y()/t]}tus(){return this.n2t?this.tcs.GetLinearVelocity().get_x()/this.hls:0}eus(){return this.n2t?this.tcs.GetLinearVelocity().get_y()/this.hls:0}Sus(t,s){if(this.n2t){const e=this.hls,i=(this.tcs.SetTransform(b0(t*e,s*e),this.tcs.GetAngle()),this.UD());i.f4(t,s),i.u4(),this.ncs=i.Ny(),this.hcs=i.ky()}}jcs(t){if(this.n2t&&this.qls!==t){this.qls=t;for(const s of this.scs)s.SetDensity(t);this.tcs.ResetMassData()}}$cs(){return this.n2t?this.qls:0}Xcs(t){if(this.n2t&&this.Kls!==t){this.Kls=t;for(const s of this.scs)s.SetFriction(t);if(this.tcs)for(let t=this.tcs.GetContactList();this.Vls.getPointer(t);t=t.get_next()){const e=t.get_contact();e&&e.ResetFriction()}}}kcs(){return this.n2t?this.Kls:0}Ycs(t){if(this.n2t&&this.zls!==t){this.zls=t;for(const s of this.scs)s.SetRestitution(t)}}Bcs(){return this.n2t?this.zls:0}qcs(t){this.n2t&&this.Jls!==t&&(this.Jls=t,this.tcs.SetLinearDamping(t))}Wcs(){return this.n2t?this.Jls:0}Kcs(t){this.n2t&&this.Qls!==t&&(this.Qls=t,this.tcs.SetAngularDamping(t))}Hcs(){return this.n2t?this.Qls:0}Qcs(t){this.n2t&&this.Uls!==(t=!!t)&&(this.Uls=t,this.tcs.SetType(this.Uls?0:2),this.tcs.SetAwake(!0))}Jcs(){return this.Uls}Ucs(t){this.n2t&&this.Yls!==(t=!!t)&&(this.Yls=t,this.tcs.SetFixedRotation(this.Yls),this.tcs.SetAngularVelocity(0),this.tcs.SetAwake(!0))}Fcs(){return this.Yls}zcs(t){this.n2t&&this.Zls!==(t=!!t)&&(this.Zls=t,this.tcs.SetBullet(this.Zls),this.tcs.SetAwake(!0))}Vcs(){return this.Zls}yus(t){this.n2t&&this.tcs.SetAwake(!!t)}Zcs(){return!!this.n2t&&this.tcs.IsAwake()}nus(){return this.n2t?this.tcs.GetMass()/this.hls:0}_us(){return this.n2t?this.tcs.GetWorldCenter().get_x()/this.hls:0}Tus(){return this.n2t?this.tcs.GetWorldCenter().get_y()/this.hls:0}Aus(){if(!this.n2t)return[0,0];const t=this.tcs.GetWorldCenter(),s=this.hls;return[t.get_x()/s,t.get_y()/s]}Eus(){if(!this.n2t)return 0;let s=0;for(let t=this.tcs.GetContactList();this.Vls.getPointer(t);t=t.get_next()){const e=t.get_contact();if(e){const i=e.GetManifold(),r=i.get_pointCount();s+=r}}return s}Ius(e){if(e=Math.floor(e),this.n2t){let s=0;for(let t=this.tcs.GetContactList();this.Vls.getPointer(t);t=t.get_next()){const i=t.get_contact();if(i){const r=i.GetManifold(),n=r.get_pointCount();if(e>=s&&e<s+n){const h=e-s,o=this.U5().GetWorldManifold(),a=(i.GetWorldManifold(o),o.get_points(h));return[a.get_x()/this.hls,a.get_y()/this.hls]}s+=n}}}return[0,0]}XAt(){return self.wus}},new WeakMap);self.wus=class extends Ja{constructor(){super(),f0.set(this,Ja.Jk().N5())}get isEnabled(){return f0.get(this).eTt()}set isEnabled(t){f0.get(this).tTt(t)}Rus(t,s,e=0){Ia.Ei(t),Ia.Ei(s),f0.get(this).hus(t,s,e)}Mus(t,s,e,i=0){Ia.Ei(t),Ia.Ei(s),Ia.Ei(e),f0.get(this).aus(t,s,e,i)}bus(t,s,e=0){Ia.Ei(t),Ia.Ei(s),f0.get(this).lus(t,s,e)}Gus(t,s,e=0){Ia.Ei(t),Ia.Ei(s),f0.get(this).cus(t,s,e)}vus(t,s,e,i=0){Ia.Ei(t),Ia.Ei(s),Ia.Ei(e),f0.get(this).fus(t,s,e,i)}Pus(t,s,e=0){Ia.Ei(t),Ia.Ei(s),f0.get(this).dus(t,s,e)}Ous(t){Ia.Ei(t),f0.get(this).pus(t)}xus(t,s){Ia.Ei(t),Ia.Ei(s),f0.get(this).Cus(t,s)}Lus(t,s,e){Ia.Ei(t),Ia.Ei(s),Ia.Ei(e),f0.get(this).mus(t,s,e)}set angularVelocity(t){Ia.Ei(t),f0.get(this).rus(t)}get angularVelocity(){return f0.get(this).ius()}setVelocity(t,s){Ia.Ei(t),Ia.Ei(s),f0.get(this).sus(t,s)}Dus(){return f0.get(this).tus()}Nus(){return f0.get(this).eus()}Fus(){return f0.get(this).gus()}$us(t,s){Ia.Ei(t),Ia.Ei(s),f0.get(this).Sus(t,s)}set kus(t){Ia.Ei(t),f0.get(this).jcs(t)}get kus(){return f0.get(this).$cs()}set Bus(t){Ia.Ei(t),f0.get(this).Xcs(t)}get Bus(){return f0.get(this).kcs()}set Wus(t){Ia.Ei(t),f0.get(this).Ycs(t)}get Wus(){return f0.get(this).Bcs()}set Hus(t){Ia.Ei(t),f0.get(this).qcs(t)}get Hus(){return f0.get(this).Wcs()}set Vus(t){Ia.Ei(t),f0.get(this).Kcs(t)}get Vus(){return f0.get(this).Hcs()}set Uus(t){f0.get(this).Qcs(t)}get Uus(){return f0.get(this).Jcs()}set jus(t){f0.get(this).Ucs(t)}get jus(){return f0.get(this).Fcs()}set Xus(t){f0.get(this).zcs(t)}get Xus(){return f0.get(this).Vcs()}get Yus(){return f0.get(this).nus()}qus(){return f0.get(this)._us()}Kus(){return f0.get(this).Tus()}zus(){return f0.get(this).Aus()}Jus(){return f0.get(this).Eus()}Qus(t){return Ia.Ei(t),f0.get(this).Ius(t)[0]}Zus(t){return Ia.Ei(t),f0.get(this).Ius(t)[1]}tfs(t){return Ia.Ei(t),f0.get(this).Ius(t)}set sfs(t){f0.get(this).yus(!!t)}get sfs(){return f0.get(this).Zcs()}get efs(){return!f0.get(this).Zcs()}ifs(t,s,e,i,r){Ia.Ei(i),Ia.Ei(r);const n=UnwrapIWorldInstance2(this,s);f0.get(this).Gcs(t,n,e,i,r)}rfs(t,s){const e=UnwrapIWorldInstance2(this,s);f0.get(this).Pcs(t,e)}nfs(t,s,e,i){Ia.Ei(e),Ia.Ei(i);const r=UnwrapIWorldInstance2(this,s);f0.get(this).Ocs(t,r,e,i)}hfs(t,s,e,i,r,n,h,o,a){const l=UnwrapIWorldInstance2(this,s);f0.get(this).xcs(t,l,e,i,r,n,h,o,a)}ofs(){f0.get(this).Lcs()}}}{const ue=self.Bs;ue.llt.ils.MJ={afs(){return!this.Zcs()},lfs(){return this.Jcs()},cfs(t,s,e){if(!this.n2t)return!1;let i=0;if(0===t)i=this.tus();else if(1===t)i=this.eus();else{const[r,n]=this.gus();i=Math.hypot(r,n)}return ue.compare(i,s,e)},ufs(t,s){if(!this.n2t)return!1;const e=ue.bn(this.ius());return ue.compare(e,t,s)},ffs(t,s){if(!this.n2t)return!1;const e=this.nus();return ue.compare(e,t,s)},pu(){return this.eTt()}}}{const He=self.Bs;He.llt.ils.pnt={ApplyForce(t,s,e){this.hus(t,s,e)},dfs(t,s,e,i){this.aus(t,s,e,i)},pfs(t,s,e){this.lus(t,He.Mn(s),e)},Cfs(t,s,e){this.cus(t,s,e)},mfs(t,s,e,i){this.fus(t,s,e,i)},gfs(t,s,e){this.dus(t,He.Mn(s),e)},ApplyTorque(t){this.pus(He.Mn(t))},Sfs(t,s){this.Cus(He.Mn(t),He.Mn(s))},yfs(t,s,e){this.mus(He.Mn(t),s,e)},SetAngularVelocity(t){this.rus(He.Mn(t))},_fs(t,s,e,i,r){if(s){const n=s.m_t(this.Ge);this.Gcs(t,n,e,i,r)}},Tfs(t,s){if(s){const e=s.m_t(this.Ge);this.Pcs(t,e)}},Afs(t,s,e,i){if(s){const r=s.m_t(this.Ge);this.Ocs(t,r,He.Mn(e),He.Mn(i))}},Efs(t,s,e,i,r,n,h,o,a){if(s){const l=s.m_t(this.Ge);this.xcs(t,l,He.Mn(e),i,r,n,h,He.Mn(o),a)}},Ifs(){this.Lcs()},wfs(t){this.U5().SetGravity(t)},Als(t){this.U5().Als(t)},Gls(t,s){this.U5().Gls(t,s)},Rfs(t,s){this.sus(t,s)},Mfs(t,s){this.Sus(t,s)},SetDensity(t){this.jcs(t)},SetFriction(t){this.Xcs(t)},bfs(t){this.Ycs(t)},SetLinearDamping(t){this.qcs(t)},SetAngularDamping(t){this.Kcs(t)},Gfs(t){this.Qcs(t)},vfs(t,s){this.U5().xls(this.qk(),t,0!==s)},Pfs(t){this.Ucs(0!==t)},SetBullet(t){this.zcs(0!==t)},SetAwake(t){this.yus(!!t)},ZTt(t){this.tTt(0!==t)}}}{const Z4=self.Bs;Z4.llt.ils.Cnt={Ofs(){return this.tus()},xfs(){return this.eus()},Lfs(){return Z4.bn(this.ius())},Dfs(){return this.nus()},Nfs(){return this._us()},Ffs(){return this.Tus()},$fs(){return this.$cs()},kfs(){return this.kcs()},Bfs(){return this.Bcs()},Wfs(){return this.Wcs()},Hfs(){return this.Hcs()},Vfs(){return this.Eus()},Ufs(t){return this.Ius(t)[0]},jfs(t){return this.Ius(t)[1]}}}{let CloneVec22=function(t){return GetVec2(t.get_x(),t.get_y())},SplitConvexPolysOver8Points2=function(t){const s=[];for(const e of t)e.length<=8?s.push(e):s.push.apply(s,SplitConvexPoly2(e));return s},SplitConvexPoly2=function(e){let i=[],r=(i.push(e.splice(0,8)),i[0][0]),n=i[0][7];for(;e.length;){let t=e.splice(0,Math.min(e.length,6)),s=t.at(-1);t.push(CloneVec22(r)),t.push(CloneVec22(n)),i.push(t),n=s}return i};CloneVec2=CloneVec22,SplitConvexPolysOver8Points=SplitConvexPolysOver8Points2,SplitConvexPoly=SplitConvexPoly2;const C33=self.Bs,b2Separator={},GetVec2=(C33.llt.ils.Tcs=b2Separator,C33.llt.ils.zwt),FreeVec2=C33.llt.ils.Dls;b2Separator.Xfs=function(t,s,e,i,r,n){return t*i+e*n+r*s-s*e-i*r-n*t},b2Separator.Yfs=function(t,s,e,i,r,n,h,o){const a=r-t,l=n-s,c=e-t,u=i-s,f=h-r,d=o-n,p=u*f-c*d,C=(f*l-d*a)/p,m=t+C*c,g=s+C*u,S=b2Separator.qfs(e,i,t,s,m,g),y=b2Separator.qfs(m,g,r,n,h,o);return S&&y?GetVec2(m,g):null},b2Separator.qfs=function(t,s,e,i,r,n){const h=t<=e+.1&&r-.1<=t||e-.1<=t&&t<=r+.1,o=s<=i+.1&&n-.1<=s||i-.1<=s&&s<=n+.1;return h&&o&&b2Separator.Kfs(t,s,e,i,r,n)},b2Separator.Kfs=function(t,s,e,i,r,n){if(.1<Math.abs(r-e)){const h=(n-i)/(r-e),o=h*(t-e)+i,a=Math.abs(o-s);return a<.1}return Math.abs(t-e)<.1},b2Separator.zfs=function(t,s,e,i){return Math.abs(e-t)<.1&&Math.abs(i-s)<.1},b2Separator._cs=function(t,n){let h=b2Separator.Jfs(t),o=[];for(let t=0,s=h.length;t<s;++t){let e=h[t],i=[],r=0;for(let t=0,s=e.length;t<s;++t){const a=e[t],l=e[(t+1)%s];r+=a.get_x()*l.get_y()-a.get_y()*l.get_x(),i.push(GetVec2(a.get_x(),a.get_y()))}if((r=Math.abs(r/2))>=.001*n)o.push(i);else for(let t=0,s=i.length;t<s;t++)FreeVec2(i[t])}return o=SplitConvexPolysOver8Points2(o)},b2Separator.Jfs=function(t){let s=[],e=0,i,r=0,n,h,o,a=0,l,c,u,f,d,p,C,m,g,S,y=0,_=0,T=0,A=0,E=[],I=[],w=!1,R=[],M=[],b=!1;for(M.push(t);M.length;){for(i=(s=M[0]).length,w=!0,e=0;e<i;e++)if(c=(l=e)<i-1?e+1:e+1-i,u=e<i-2?e+2:e+2-i,f=s[l],d=s[c],p=s[u],b2Separator.Xfs(f.get_x(),f.get_y(),d.get_x(),d.get_y(),p.get_x(),p.get_y())<0){for(w=!1,a=1e9,r=0;r<i;r++)r!==l&&r!==c&&(y=r,_=r<i-1?r+1:0,C=s[y],m=s[_],g=b2Separator.Yfs(f.get_x(),f.get_y(),d.get_x(),d.get_y(),C.get_x(),C.get_y(),m.get_x(),m.get_y()))&&((n=(h=d.get_x()-g.get_x())*h+(o=d.get_y()-g.get_y())*o)<a?(A=y,T=_,S=g,a=n):FreeVec2(g));if(1e9===a)return[];for(E=[],I=[],y=A,_=T,C=s[y],m=s[_],b=!1,b2Separator.zfs(S.get_x(),S.get_y(),m.get_x(),m.get_y())||(E.push(S),b=!0),b2Separator.zfs(S.get_x(),S.get_y(),C.get_x(),C.get_y())||(I.push(S),b=!0),b||FreeVec2(S),A=-1,T=l;;){if(T===_){if(A<0||A>=i)return[];b2Separator.qfs(m.get_x(),m.get_y(),s[A].get_x(),s[A].get_y(),f.get_x(),f.get_y())||E.push(s[T]);break}E.push(s[T]),(A=T)-1<0?T=i-1:T--}for(E.reverse(),A=-1,T=c;;){if(T===y){if(A<0||A>=i)return[];T!==y||b2Separator.qfs(C.get_x(),C.get_y(),s[A].get_x(),s[A].get_y(),d.get_x(),d.get_y())||I.push(s[T]);break}I.push(s[T]),(A=T)+1>i-1?T=0:T++}M.push(E,I),M.shift();break}w&&R.push(M.shift())}return R}}{const a=self.Bs;a.llt.Qfs=class extends a.AIt{constructor(t){super(t)}_n(){super._n()}}}{const d=self.Bs;d.llt.Qfs.FRt=class extends d.MIt{constructor(t){super(t)}_n(){super._n()}jAt(){}}}{const g=self.Bs,h=self.zs,i=self.H5,j=(g.llt.Qfs.Instance=class extends g.GIt{constructor(t,s){super(t),this.Zfs=0,this.tds=0,this.sds=0,this.eds=0,this.ids=0,this.vEt()}_n(){super._n()}rds(t,s,e){this.Zfs=t,this.tds=s,this.sds=1,this.eds=s,this.ids=e,this.Ge.UD().ek(!1),this.Af.JD()}nds(){this.ids=0,this.Ge.UD().ek(!0),this.Af.JD()}hds(){return 0<this.ids}Ky(){return{on:this.Zfs,off:this.tds,s:this.sds,stl:this.eds,tl:this.ids}}zy(t){this.Zfs=t.on,this.tds=t.off,this.sds=t.s,this.eds=t.stl,this.ids=null===t.tl?1/0:t.tl}Z9(){if(!(this.ids<=0)){const t=this.Af.YL(this.Ge);if(this.ids-=t,this.ids<=0)return this.ids=0,this.Ge.UD().ek(!0),this.Af.JD(),this.lEt("flashend"),this.gEt(g.llt.Qfs.MJ.ods);this.eds-=t,this.eds<=0&&(0===this.sds?(this.Ge.UD().ek(!1),this.sds=1,this.eds+=this.tds):(this.Ge.UD().ek(!0),this.sds=0,this.eds+=this.Zfs),this.Af.JD())}}LEt(){const t="behaviors.flash.debugger";return[{title:"$"+this.Y5().pf(),properties:[{name:t+".on-time",value:this.Zfs,qUt:t=>this.Zfs=t},{name:t+".off-time",value:this.tds,qUt:t=>this.tds=t},{name:t+".is-flashing",value:0<this.ids},{name:t+".time-left",value:this.ids}]}]}XAt(){return self.ads}},new WeakMap);self.ads=class extends i{constructor(){super(),j.set(this,i.Jk().N5())}lds(t,s,e){h.Ei(t),h.Ei(s),h.Ei(e),j.get(this).rds(t,s,e)}stop(){j.get(this).nds()}get cds(){return j.get(this).hds()}}}{const z=self.Bs;z.llt.Qfs.MJ={uds(){return this.hds()},ods(){return!0}}}{const A=self.Bs;A.llt.Qfs.pnt={Qfs(t,s,e){this.rds(t,s,e)},fds(){this.nds()}}}{const E=self.Bs;E.llt.Qfs.Cnt={}}{let unaryminus2=function(t){return"number"==typeof t?-t:t},bothNumbers2=function(t,s){return"number"==typeof t&&"number"==typeof s},add2=function(t,s){return bothNumbers2(t,s)?t+s:t},subtract2=function(t,s){return bothNumbers2(t,s)?t-s:t},multiply2=function(t,s){return bothNumbers2(t,s)?t*s:t},divide2=function(t,s){return bothNumbers2(t,s)?t/s:t},mod2=function(t,s){return bothNumbers2(t,s)?t%s:t},pow2=function(t,s){return bothNumbers2(t,s)?Math.pow(t,s):t},and2=function(e,i){if("string"!=typeof e&&"string"!=typeof i)return e&&i?1:0;{let t,s;return t="number"==typeof e?(Math.round(1e10*e)/1e10).toString():e,s="number"==typeof i?(Math.round(1e10*i)/1e10).toString():i,t+s}},or2=function(t,s){return bothNumbers2(t,s)?t||s?1:0:t};unaryminus=unaryminus2,bothNumbers=bothNumbers2,add=add2,subtract=subtract2,multiply=multiply2,divide=divide2,mod=mod2,pow=pow2,and=and2,or=or2;const C33=self.Bs;self.ygt=[()=>0,t=>{const s=t.Ggt(0).Sgt();return()=>s.Wit()},t=>{const s=t.Ggt(0).K2t();return()=>s(0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,4)},()=>40,()=>"Settings",()=>'{\n"c2array":true,\n"size":[11,1,1],\n"data":[\n[[62]],\n[[84]],\n[[100]],\n[[120]],\n[[174]],\n[[188]],\n[[202]],\n[[224]],\n[[236]],\n[[296]],\n[[350]]\n]}',()=>.1,()=>"opacity",()=>80,()=>.2,()=>1,t=>{const s=t.Ggt(0).K2t(),e=t.Ggt(1).K2t(),i=t.Ggt(2).Sgt(),r=t.Ggt(3).Sgt();return()=>C33.wn(s(e()),32+i.Wit()/2,688-r.Wit()/2)},t=>{const s=t.Ggt(0),e=t.Ggt(1).Sgt(),i=t.Ggt(2).Sgt();return()=>C33.wn(s.sgt(),32+e.Wit()/2,688-i.Wit()/2)},t=>{const s=t.Ggt(0).K2t();return()=>s(-1,1)},()=>.5,()=>"Objects",t=>{const s=t.Ggt(0);return()=>s.sgt()},()=>"",()=>-5,t=>{const s=t.Ggt(0);return()=>s.sgt()+10},t=>{const s=t.Ggt(0),e=t.Ggt(1).Sgt();return()=>s.sgt(e.Wit(),0)},()=>"scale",()=>.3,()=>-10,()=>"thwack",()=>"Balls merge",t=>{const s=t.Ggt(0);return()=>s.ogt()},()=>10,t=>{const s=t.Ggt(0),e=t.Ggt(1);return()=>(s.sgt()+e.sgt())/2},t=>{const s=t.Ggt(0);return()=>s.ngt()},()=>-2,t=>{const s=t.Ggt(0).Sgt();return()=>s.Wit()+1},t=>{const s=t.Ggt(0),e=t.Ggt(1);return()=>s.sgt(e.ngt()-1,0)},()=>"size",t=>{const s=t.Ggt(0),e=t.Ggt(1);return()=>s.sgt(e.ngt(),0)},()=>.15,t=>{const s=t.Ggt(0).Sgt();return()=>2*(s.Wit()+1)},()=>"TopScore_CryptoMerge",t=>{const s=t.Ggt(0);return()=>s.sgt()-150},()=>.7,()=>"Win & Fail",()=>"Win",()=>"flash",()=>3,()=>1.2,()=>"Win Fail",()=>360,()=>363,()=>"layer opacity",()=>100,t=>{const s=t.Ggt(0).K2t();return()=>s()/2},t=>{const s=t.Ggt(0).K2t(),e=t.Ggt(1).K2t();return()=>multiply2(s(-1,1),e(50,200))},t=>{const s=t.Ggt(0).K2t(),e=t.Ggt(1);return()=>s(e.sgt())},()=>"Fail",()=>.4,()=>"opacity2",()=>1.4,t=>{const s=t.Ggt(0).K2t();return()=>.06*s()},t=>{const s=t.Ggt(0).Sgt();return()=>.06*s.Wit()},t=>{const s=t.Ggt(0);return()=>s.dgt("layer opacity")},()=>"touch",()=>.9,()=>"Settings panel 2",t=>{const s=t.Ggt(0).K2t();return()=>s(0,1,2,3,4,5,6)},()=>"rotate 1",t=>{const s=t.Ggt(0);return()=>s.sgt()-60},()=>"layer opacity 1",()=>"rotate 2",t=>{const s=t.Ggt(0);return()=>s.sgt()+60},()=>"layer opacity 2",t=>{const s=t.Ggt(0);return()=>s.sgt()-20},()=>"Music & Sound2",()=>"Sound_CryptoMerge",t=>{const s=t.Ggt(0).K2t(),e=t.Ggt(1).Sgt();return()=>s(e.Wit())},()=>"Music_CryptoMerge",()=>"music",t=>{const s=t.Ggt(0).K2t();return()=>s("Background")},t=>{const s=t.Ggt(0).K2t();return()=>s("Game UI")+75},t=>{const s=t.Ggt(0).K2t();return()=>s("Game UI")-98},t=>{const s=t.Ggt(0).K2t();return()=>s("Game UI")+47},t=>{const s=t.Ggt(0).K2t();return()=>s("Game UI")-96},t=>{const s=t.Ggt(0).K2t();return()=>s("Game UI")+98},t=>{const s=t.Ggt(0).K2t(),e=t.Ggt(1).K2t();return()=>s("Game UI")-(e("Game UI")-1110)/2},t=>{const s=t.Ggt(0).K2t();return()=>C33.wn(400*s(),35,400)},t=>{const s=t.Ggt(0).K2t(),e=t.Ggt(1).K2t();return()=>and2(s(100*e()),"%")},t=>{const s=t.Ggt(0).K2t();return()=>s()},()=>"Settings panel",()=>"Music & Sound",t=>{const s=t.Ggt(0);return()=>s.sgt()+100},()=>"y",t=>{const s=t.Ggt(0);return()=>s.sgt()-100},()=>"https://codecanyon.net/user/svixel/portfolio",()=>"NewWindow",t=>{const s=t.Ggt(0).K2t();return()=>s("Objects")+75},()=>"ca-app-pub-YourPubHere/AdNumberHere",()=>"loaded"]}}}),import_c3runtime=__toESM(require_c3runtime()),C32=self.Bs;self.Z$t=function(){return[C32.GJ.nVt,C32.llt.olt,C32.GJ.Jrt,C32.GJ.Hjt,C32.GJ.lYt,C32.llt.oos,C32.llt.Tos,C32.llt._as,C32.GJ.b8t,C32.llt.Gas,C32.llt.ils,C32.llt.Qfs,C32.GJ.Touch,C32.GJ.Keyboard,C32.GJ.ge,C32.GJ.bZt,C32.GJ.pts,C32.GJ.Audio,C32.GJ.Sis,C32.GJ.bJ.MJ.RJ,C32.GJ.bJ.pnt.p5t,C32.GJ.Hjt.pnt.Rf,C32.GJ.bJ.Cnt.Y2t,C32.GJ.Jrt.pnt.zUt,C32.llt.ils.pnt.wfs,C32.GJ.b8t.pnt.jG,C32.llt.Gas.pnt.Jas,C32.GJ.b8t.pnt.p_t,C32.GJ.bZt.pnt.its,C32.GJ.bJ.pnt.Hh,C32.GJ.bJ.pnt.g5t,C32.llt.olt.pnt.Kns,C32.GJ.Jrt.pnt.ek,C32.GJ.Touch.MJ.ZJt,C32.GJ.bJ.MJ.h5t,C32.GJ.bJ.MJ.V4t,C32.GJ.Jrt.pnt.Fy,C32.GJ.Touch.Cnt.xTt,C32.GJ.bJ.Cnt.pHt,C32.GJ.Jrt.MJ.G_t,C32.GJ.Jrt.MJ.rTt,C32.GJ.Jrt.Cnt.xTt,C32.GJ.Touch.MJ.kJt,C32.GJ.Touch.MJ.t7t,C32.GJ.Jrt.pnt.yTt,C32.llt.Gas.pnt.sls,C32.llt.ils.pnt.ZTt,C32.llt.ils.pnt.SetAngularVelocity,C32.llt.olt.pnt.ohs,C32.GJ.bJ.pnt.T5t,C32.GJ.Jrt.Cnt.LTt,C32.GJ.Jrt.pnt.mTt,C32.GJ.Audio.pnt.Play,C32.GJ.Jrt.MJ.pTt,C32.GJ.Jrt.MJ.Oyt,C32.GJ.Jrt.pnt.cM,C32.GJ.bZt.Cnt.NZt,C32.GJ.bJ.pnt.M5t,C32.GJ.Jrt.Cnt.DTt,C32.llt.olt.pnt.Qns,C32.GJ.Jrt.Cnt.NTt,C32.GJ.Jrt.MJ.M_t,C32.llt.ils.MJ.cfs,C32.GJ.Audio.MJ.Tes,C32.GJ.bJ.MJ.jpt,C32.GJ.Jrt.MJ.iTt,C32.GJ.Jrt.pnt.dTt,C32.GJ.bJ.pnt.C5t,C32.GJ.bJ.MJ.H4t,C32.GJ.pts.pnt.Xts,C32.GJ.Hjt.MJ.pTt,C32.GJ.Hjt.Cnt.LTt,C32.GJ.bJ.MJ.P0,C32.GJ.Jrt.pnt.Rjt,C32.GJ.Hjt.pnt.ek,C32.GJ.b8t.pnt.d_t,C32.GJ.Jrt.pnt.f_t,C32.GJ.bJ.pnt.Y5t,C32.GJ.bJ.pnt.U5t,C32.llt.olt.pnt.ths,C32.GJ.bJ.Cnt.CHt,C32.llt._as.pnt.Ras,C32.GJ.bJ.Cnt.random,C32.GJ.Jrt.Cnt.Gjt,C32.GJ.b8t.MJ.h_t,C32.GJ.bJ.MJ.x4t,C32.llt.olt.MJ._es,C32.GJ.Jrt.Cnt.MTt,C32.GJ.bJ.MJ.e5t,C32.GJ.bJ.Cnt.VHt,C32.GJ.bJ.MJ.Q4t,C32.llt.olt.MJ.IsPlaying,C32.llt.olt.Cnt.Ihs,C32.GJ.Touch.MJ.NJt,C32.llt.olt.MJ.Uns,C32.GJ.bJ.pnt.B5t,C32.GJ.bJ.pnt.V5t,C32.GJ.Jrt.pnt.g$,C32.GJ.Jrt.pnt.jG,C32.GJ.Jrt.Cnt.jTt,C32.GJ.Touch.MJ.DJt,C32.GJ.bJ.pnt.S5t,C32.GJ.bJ.Cnt.MWt,C32.GJ.Audio.pnt.Des,C32.GJ.bJ.MJ.O4t,C32.GJ.b8t.pnt.cM,C32.GJ.bJ.Cnt.AHt,C32.GJ.bJ.Cnt.EHt,C32.GJ.Jrt.pnt.Nyt,C32.GJ.bJ.Cnt.SHt,C32.GJ.bJ.Cnt.yHt,C32.GJ.bJ.Cnt._Ht,C32.GJ.Jrt.pnt.By,C32.GJ.bJ.Cnt.THt,C32.GJ.nVt.pnt.GC,C32.GJ.bJ.Cnt.XHt,C32.GJ.bJ.MJ.ukt,C32.GJ.pts.pnt.zts,C32.GJ.pts.MJ.$ts,C32.GJ.pts.pnt.qts,C32.GJ.pts.MJ.Fts,C32.GJ.pts.MJ.Pts,C32.GJ.pts.Cnt.sss,C32.GJ.pts.MJ.Bts,C32.GJ.ge.pnt.FQt,C32.GJ.Sis.pnt.Mrs,C32.GJ.bJ.pnt.UL,C32.GJ.Sis.pnt.brs,C32.GJ.Sis.MJ._rs,C32.GJ.bJ.pnt.HL]},self.fkt=[{olt:0},{dds:0},{pds:0},{Cds:0},{mds:0},{gds:0},{Sds:0},{yds:0},{_ds:0},{Tds:0},{Ads:0},{Eds:0},{Ids:0},{wds:0},{Rds:0},{Mds:0},{bds:0},{Gds:0},{vds:0},{Pds:0},{Ods:0},{oos:0},{xds:0},{Lds:0},{Dds:0},{Nds:0},{Fds:0},{$ds:0},{kds:0},{Bds:0},{Wds:0},{Hds:0},{Vds:0},{Uds:0},{jds:0},{_as:0},{Xds:0},{Yds:0},{qds:0},{Kds:0},{zds:0},{Gas:0},{Jds:0},{Qds:0},{Zds:0},{t0s:0},{s0s:0},{ils:0},{e0s:0},{i0s:0},{r0s:0},{isActive:0},{n0s:0},{h0s:0},{o0s:0},{a0s:0},{l0s:0},{Qfs:0},{c0s:0},{Touch:0},{Keyboard:0},{u0s:0},{ge:0},{f0s:0},{pts:0},{Audio:0},{d0s:0},{p0s:0},{C0s:0},{m0s:0},{g0s:0},{S0s:0},{y0s:0},{_0s:0},{T0s:0},{A0s:0},{Number:0},{E0s:0},{I0s:0},{w0s:0},{R0s:0}],self.M0s={dds:class extends self.P5{},pds:class extends self.tjt{},Cds:class extends self.zXt{},mds:class extends self.tjt{},gds:class extends self.tjt{},Sds:class extends self.zXt{},yds:class extends self.tjt{},_ds:class extends self.tjt{},Tds:class extends self.tjt{},Ads:class extends self.tjt{},Eds:class extends self.tjt{},Ids:class extends self.tjt{},wds:class extends self.tjt{},Rds:class extends self.tjt{},Mds:class extends self.tjt{},bds:class extends self.tjt{},Gds:class extends self.Oqt{},vds:class extends self.zXt{},Pds:class extends self.tjt{},Ods:class extends self.tjt{},xds:class extends self.tjt{},Lds:class extends self.zXt{},Dds:class extends self.tjt{},Nds:class extends self.zXt{},Fds:class extends self.tjt{},$ds:class extends self.tjt{},kds:class extends self.tjt{},Bds:class extends self.zXt{},Wds:class extends self.tjt{},Hds:class extends self.zXt{},Vds:class extends self.tjt{},jds:class extends self.tjt{},Yds:class extends self.tjt{},qds:class extends self.Oqt{},Kds:class extends self.tjt{},zds:class extends self.Czt{},Jds:class extends self.Czt{},Qds:class extends self.tjt{},Zds:class extends self.tjt{},t0s:class extends self.tjt{},s0s:class extends self.Czt{},e0s:class extends self.tjt{},i0s:class extends self.tjt{},o0s:class extends self.tjt{},a0s:class extends self.tjt{},l0s:class extends self.Czt{},c0s:class extends self.tjt{},Touch:class extends self.Xk{},Keyboard:class extends self.Xk{},u0s:class extends self.tjt{},ge:class extends self.Xk{},f0s:class extends self.HZt{},pts:class extends self.Xk{},Audio:class extends self.Xk{},d0s:class extends self.Xk{},p0s:class extends self.tjt{}};PK �b[zΕ�� � modernjscheck.jsnu �[��� "use strict";!function(){let p=!0,r=new class{#prop="pass";getProp(){return this.#prop}};(p="pass"!==r.getProp()?!1:p)&&(window["C3_ModernJSSupport_OK"]=!0)}();PK �b[�F��� �� main.jsnu �[��� // Generated by Construct, the game and animation creation tool // Visit: https://www.construct.net "use strict";window.i=class{constructor(t,s){this.h=t,this.o=s,this.l=!1,this.u=()=>this.m()}g(){}v(t,s,e,i){this.h.S(this.o,t,s,e,i)}A(t,s,e,i){return this.h._(this.o,t,s,e,i)}O(t,s,e){this.h.I()?this.v(t,s,e):this.h.R()._OnMessageFromDOM({type:"event",component:this.o,handler:t,dispatchOpts:e||null,data:s,responseId:null})}C(t,s){this.h.P(this.o,t,s)}T(t){for(const[s,e]of t)this.C(s,e)}L(){return this.h}M(){return this.o}D(){this.l||(this.h.F(this.u),this.l=!0)}U(){this.l&&(this.h.G(this.u),this.l=!1)}m(){}},window.W=class{constructor(t,s){this.H=t,this.B=s,this.N=-1,this.V=-1/0,this.j=()=>this.$(),this.K=!1,this.Z=!1}Y(t){this.Z=!!t}J(){if(-1===this.N){const t=Date.now(),s=t-this.V,e=this.B;e<=s&&this.Z?(this.V=t,this.X()):this.N=self.setTimeout(this.j,Math.max(e-s,4))}}X(){this.K=!0,this.H(),this.K=!1}tt(){this.K||(this.st(),this.V=Date.now())}$(){this.N=-1,this.V=Date.now(),this.X()}st(){-1!==this.N&&(self.clearTimeout(this.N),this.N=-1)}et(){this.st(),this.H=null,this.j=null}};{class y{constructor(t){this.it=t,this.nt=!1,this.ht=!0,this.rt=-1,this.ot=-1,this.lt=-1}ct(t){this.ht=!!t}dt(){return this.ht}ut(){return this.nt}wt(){this.nt=!0}ft(){return this.rt}yt(t){this.rt=t}gt(){return this.ot}vt(t){this.ot=t}bt(t){this.lt=t}St(){return this.lt}At(){return this.it}}window._t=class extends self.i{constructor(t,s){super(t,s),this.Ot=new Map,this.It=!0,this.T([["create",t=>this.Rt(t)],["destroy",t=>this.Ct(t)],["set-visible",t=>this.kt(t)],["update-position",t=>this.Pt(t)],["update-state",t=>this.Tt(t)],["focus",t=>this.Lt(t)],["set-css-style",t=>this.Mt(t)],["set-attribute",t=>this.xt(t)],["remove-attribute",t=>this.Et(t)]]),this.Dt("get-element",t=>t)}Ft(t){this.It=!!t}Dt(t,i){this.C(t,t=>{const s=t.elementId,e=this.Ut(s);return i(e,t)})}Gt(t){for(const[s,e]of t)this.Dt(s,e)}Rt(t){const s=t.elementId,e=this.Wt(s,t),i=new y(e),n=(this.Ot.set(s,i),e.style.boxSizing="border-box",e.style.display="none",i.ct(t.isVisible),this.Ht(e)),h=(n.addEventListener("focus",t=>this.Bt(s)),n.addEventListener("blur",t=>this.Nt(s)),t.htmlIndex);if(i.yt(h),i.bt(t.htmlZIndex),this.It){const r=this.L().Vt(h),o=(i.vt(r),this.L().qt(r));o.appendChild(e)}}Wt(t,s){throw new Error("required override")}zt(t){}Ct(t){const s=t.elementId,e=this.Ut(s);this.zt(e),this.It&&e.parentElement.removeChild(e),this.Ot.delete(s)}jt(t,s,e){(e=e||{}).elementId=s,this.v(t,e)}$t(t,s,e){(e=e||{}).elementId=s,this.O(t,e)}kt(t){if(this.It){const s=this.Ot.get(t.elementId),e=s.At();s.ut()?e.style.display=t.isVisible?"":"none":s.ct(t.isVisible)}}Pt(t){if(this.It){const s=this.Ot.get(t.elementId),e=s.At(),i=this.L(),n=(e.style.left=t.left+"px",e.style.top=t.top+"px",e.style.width=t.width+"px",e.style.height=t.height+"px",t.fontSize),h=(null!==n&&(e.style.fontSize=n+"em"),t.htmlIndex),r=(s.yt(h),i.Vt(h));if(r!==s.gt()){e.remove();const a=i.qt(r);a.appendChild(e),s.vt(r),i.Kt()}const o=t.htmlZIndex;o!==s.St()&&(s.bt(o),i.Kt()),s.ut()||(s.wt(),s.dt()&&(e.style.display=""))}}Zt(){if(this.It)for(const t of this.Ot.values()){const s=this.L().Vt(t.ft()),e=t.gt();if(-1!==s&&-1!==e&&s!==e){const i=t.At(),n=(i.remove(),this.L().qt(s));n.appendChild(i),t.vt(s)}}}Yt(){return this.It?[...this.Ot.values()]:null}Tt(t){const s=this.Ut(t.elementId);this.Jt(s,t)}Jt(t,s){throw new Error("required override")}Ht(t){return t}Bt(t){this.jt("elem-focused",t)}Nt(t){this.jt("elem-blurred",t)}Lt(t){const s=this.Ht(this.Ut(t.elementId));t.focus?s.focus():s.blur()}Mt(t){const s=this.Ut(t.elementId),e=t.prop,i=t.val;e.startsWith("--")?s.style.setProperty(e,i):s.style[e]=i}xt(t){const s=this.Ut(t.elementId);s.setAttribute(t.name,t.val)}Et(t){const s=this.Ut(t.elementId);s.removeAttribute(t.name)}Ut(t){const s=this.Ot.get(t);if(s)return s.At();throw new Error("no element with id "+t)}}}{const b0=/(iphone|ipod|ipad|macos|macintosh|mac os x)/i.test(navigator.userAgent),c0=/android/i.test(navigator.userAgent),d0=/safari/i.test(navigator.userAgent)&&!/(chrome|chromium|edg\/|OPR\/|nwjs)/i.test(navigator.userAgent);let n=0;function AddScript(e){const i=document.createElement("script");return i.async=!1,i.type="module",e.Xt?new Promise(t=>{const s="c3_resolve_"+n;++n,self[s]=t,i.textContent=e.str+` self["${s}"]();`,document.head.appendChild(i)}):new Promise((t,s)=>{i.onload=t,i.onerror=s,i.src=e,document.head.appendChild(i)})}async function CheckSupportsWorkerMode(){if(!navigator.userActivation||"undefined"==typeof OffscreenCanvas)return!1;try{let t=!1;const s=new Blob([` self.addEventListener("message", () => { try { const offscreenCanvas = new OffscreenCanvas(32, 32); const gl = offscreenCanvas.getContext("webgl"); self.postMessage(!!gl); } catch (err) { console.warn("Feature detection worker error:", err); self.postMessage(false); } });`],{type:"text/javascript"}),e=new Worker(URL.createObjectURL(s),{get type(){t=!0}}),i=await new Promise(s=>{e.addEventListener("message",t=>{e.terminate(),s(t.data)}),e.postMessage("")});return t&&i}catch(t){return console.warn("Error feature detecting worker mode: ",t),!1}}let t=new Audio;const g0={"audio/webm; codecs=opus":!!t.canPlayType("audio/webm; codecs=opus"),"audio/ogg; codecs=opus":!!t.canPlayType("audio/ogg; codecs=opus"),"audio/webm; codecs=vorbis":!!t.canPlayType("audio/webm; codecs=vorbis"),"audio/ogg; codecs=vorbis":!!t.canPlayType("audio/ogg; codecs=vorbis"),"audio/mp4":!!t.canPlayType("audio/mp4"),"audio/mpeg":!!t.canPlayType("audio/mpeg")};async function BlobToString(t){const s=await BlobToArrayBuffer(t),e=new TextDecoder("utf-8");return e.decode(s)}function BlobToArrayBuffer(i){return new Promise((s,e)=>{const t=new FileReader;t.onload=t=>s(t.target.result),t.onerror=t=>e(t),t.readAsArrayBuffer(i)})}t=null;const h0=[];let i=0;const j0=8,k0=(window.RealFile=window.File,[]),l0=new Map,m0=new Map;let o=0;const o0=[],p0=(self.runOnStartup=function(t){if("function"!=typeof t)throw new Error("runOnStartup called without a function");o0.push(t)},new Set(["cordova","playable-ad-single-file","playable-ad-zip","instant-games"]));function IsWebViewExportType(t){return p0.has(t)}let s=!1;window.Qt=class P0{constructor(t){if(this.ts=t.ss,this.es=null,this.ns="",this.hs=t.scriptFolder,this.rs=null,this.os=null,this.ls=[],this.cs=null,this.ds=!0,this.us=[],this.ws=[],this.fs=!1,this.ps=()=>this.ys(),this.gs=!1,this.vs=0,this.bs=null,this.Ss=-1,this.As=()=>this._s(),this.Os=new Set,this.Is=null,this.Rs=[],this.Cs=t.exportType,this.ks="file"===location.protocol.substr(0,4),this.Ps=[],"playable-ad-single-file"!==this.Cs&&"playable-ad-zip"!==this.Cs&&"instant-games"!==this.Cs||(this.ts=!1),d0&&(this.ts=!1),"cordova"===this.Cs&&this.ts&&c0){const s=/Chrome\/(\d+)/i.exec(navigator.userAgent);s&&90<=parseInt(s[1],10)||(this.ts=!1)}this.Ts()?self.chrome.webview.addEventListener("message",t=>this.Ls(t.data,t.additionalObjects)):"macos-wkwebview"===this.Cs?self.C3WrapperOnMessage=t=>this.Ls(JSON.parse(t)):"linux-cef"===this.Cs&&self.c3_linux_cef_set_message_callback(t=>this.Ls(JSON.parse(t))),this.Ms=null,this.xs=null,"html5"!==this.Cs||window.isSecureContext||console.warn("[Construct] Warning: the browser indicates this is not a secure context. Some features may be unavailable. Use secure (HTTPS) hosting to ensure all features are available."),this.P("canvas","update-size",t=>this.Es(t)),this.P("canvas","set-html-layer-count",t=>this._OnSetHTMLLayerCount(t)),this.P("canvas","cleanup-html-layers",()=>this.Ds()),this.P("canvas","update-html-layer-dom-state",t=>this.Fs(t.layersDomState)),this.P("runtime","cordova-fetch-local-file",t=>this.Us(t)),this.P("runtime","create-job-worker",t=>this.Gs(t)),this.P("runtime","send-wrapper-extension-message",t=>this.Ws(t)),"cordova"===this.Cs?document.addEventListener("deviceready",()=>this.Hs(t)):this.Hs(t),this.Bs=0}et(){this.Ns(),this.es&&(this.es.onmessage=null,this.es=null),this.rs&&(this.rs.terminate(),this.rs=null),this.os&&(this.os.et(),this.os=null);for(const{canvas:t,Vs:s}of this.us)t.remove(),s.remove();this.us.length=0}qs(){return this.us[0].canvas}Vt(t){return Math.min(t,this.us.length-1)}qt(t){if(t<0||t>=this.us.length)throw new RangeError("invalid canvas layer");return this.us[t].Vs}["_GetHTMLWrapElement"](t){return this.qt(t)}zs(){return this.ns}I(){return this.ts}js(){return this.Cs}$s(){return this.ks}Ks(){return this.hs}Zs(){return b0&&"cordova"===this.Cs}Ys(){const t=navigator.userAgent;return b0&&IsWebViewExportType(this.Cs)||navigator.standalone||/crios\/|fxios\/|edgios\//i.test(t)}Js(){return c0}Xs(){return c0&&IsWebViewExportType(this.Cs)}Qs(){return"windows-webview2"===this.Cs||!!("preview"===this.Cs&&window.chrome&&window.chrome.webview&&window.chrome.webview.postMessage)}Ts(){return this.Qs()||"xbox-uwp-webview2"===this.Cs}te(){this.Xs()&&this.Bs++}se(){return this.ee().next().value}*ee(){if(!this.Xs())return!0;yield 0===this.Bs,0<this.Bs&&this.Bs--}async Hs(t){if(this.ts){const e=await CheckSupportsWorkerMode();e||(this.ts=!1)}if("macos-wkwebview"===this.Cs&&this.ie({type:"ready"}),this.Ts()||"macos-wkwebview"===this.Cs||"linux-cef"===this.Cs){this.ne();const i=await this.he();this.Rs=i.registeredComponentIds}if("playable-ad-single-file"===this.Cs&&(this.Ms=self.c3_base64files,this.xs={},await this.re()),"nwjs"===this.Cs&&self.nw){const n=self.nw.Window.get();if(n.on("close",()=>self.nw.App.quit()),self.nw.App.manifest["c3-steam-mode"]){let t=0;this.F(()=>{t++,document.documentElement.style.opacity=t%2==0?"1":"0.999"})}}if(t.runtimeBaseUrl)this.ns=t.runtimeBaseUrl;else{const h=location.origin,r=(this.ns=("null"===h?"file:///":h)+location.pathname,this.ns.lastIndexOf("/"));-1!==r&&(this.ns=this.ns.substr(0,r+1))}const s=new MessageChannel;if(this.es=s.port1,this.es.onmessage=t=>this._OnMessageFromRuntime(t.data),window.c3_addPortMessageHandler&&window.c3_addPortMessageHandler(t=>this.oe(t)),this.bs=new self.ae(this),await this.bs.le(),"object"==typeof window.StatusBar&&window.StatusBar.hide(),"object"==typeof window.AndroidFullScreen)try{await new Promise((t,s)=>{window.AndroidFullScreen.immersiveMode(t,s)})}catch(t){console.error("Failed to enter Android immersive mode: ",t)}this.ts?await this.ce(t,s.port2):await this.de(t,s.port2)}ue(t){return{runtimeBaseUrl:this.ns,previewUrl:location.href,windowInnerWidth:this.we(),windowInnerHeight:this.fe(),cssDisplayMode:this.me(),devicePixelRatio:window.devicePixelRatio,isFullscreen:P0.pe(),swClientId:window.cr_swClientId||"",exportType:t.exportType,isNWjs:"undefined"!=typeof nw,fileMap:globalThis.c3_swFileMap??new Map(Object.entries(this.Ms??{})),scriptFolder:this.hs,isDebug:new URLSearchParams(self.location.search).has("debug"),ife:!!self.ife,jobScheduler:this.bs.ye(),supportedAudioFormats:g0,isFileProtocol:this.ks,isiOSCordova:this.Zs(),isiOSWebView:this.Ys(),isWindowsWebView2:this.Qs(),isAnyWebView2Wrapper:this.Ts(),wrapperComponentIds:this.Rs,isFBInstantAvailable:void 0!==self.FBInstant}}async ce(t,s){const n=t.ge,e=("preview"===this.Cs?(this.rs=new Worker("previewworker.js",{type:"module",name:"Runtime"}),await new Promise((s,e)=>{const i=t=>{this.rs.removeEventListener("message",i),(t.data&&"ok"===t.data.type?s:e)()};this.rs.addEventListener("message",i),this.rs.postMessage({type:"construct-worker-init",import:new URL(n,this.ns).toString()})})):this.rs=await this.ve(n,{type:"module",name:"Runtime"}),document.createElement("canvas")),i=(e.style.display="none",e.transferControlToOffscreen()),h=(document.body.appendChild(e),document.createElement("div"));h.className="c3htmlwrap",h.setAttribute("interactive",""),document.body.appendChild(h),this.us.push({canvas:e,Vs:h,be:{isVisible:!0,opacity:1,isInteractive:!0}}),window.c3canvas=e,self.C3_InsertHTMLPlaceholders&&self.C3_InsertHTMLPlaceholders(),this.rs.postMessage(Object.assign(this.ue(t),{type:"init-runtime",isInWorker:!0,messagePort:s,canvas:i,runtimeScriptList:t.runtimeScriptList,projectMainScriptPath:t.projectMainScriptPath,scriptsInEventsPath:t.scriptsInEventsPath}),[s,i,...this.bs.Se()]),this.ls=k0.map(t=>new t(this)),this.Ae(),this.cs._e(e),this.cs.Oe(h),this.cs.Ie(),self.c3_callFunction=(t,s)=>this.cs.Re(t,s),"preview"===this.Cs&&(self.goToLastErrorScript=()=>this.S("runtime","go-to-last-error-script"))}async de(t,s){const e=document.createElement("canvas"),i=(e.style.display="none",document.body.appendChild(e),document.createElement("div")),n=(i.className="c3htmlwrap",i.setAttribute("interactive",""),document.body.appendChild(i),this.us.push({canvas:e,Vs:i,be:{isVisible:!0,opacity:1,isInteractive:!0}}),window.c3canvas=e,self.C3_InsertHTMLPlaceholders&&self.C3_InsertHTMLPlaceholders(),this.ls=k0.map(t=>new t(this)),this.Ae(),this.cs._e(e),this.cs.Oe(i),await Promise.all(t.runtimeScriptList.map(t=>this.Ce(t)))),h=(await Promise.all(n.map(t=>AddScript(t))),t.projectMainScriptPath),r=t.scriptsInEventsPath;if(h)try{if(await AddScript(h),"preview"===this.Cs&&!globalThis.C3_ProjectMainScriptOK)throw new Error("main script did not run to completion")}catch(t){this.ke(),console.error("Error loading project main script: ",t),alert(`Failed to load the project main script (${h}). Check all your JavaScript code has valid syntax, all imports are written correctly, and that an exception was not thrown running the script. Press F12 and check the console for error details.`)}if(r)try{if(await AddScript(r),"preview"===this.Cs&&!globalThis.C3.ScriptsInEvents)throw new Error("scripts in events did not run to completion")}catch(t){this.ke(),console.error("Error loading scripts in events: ",t),alert("Failed to load scripts in events. Check all your JavaScript code has valid syntax, all imports are written correctly, and that an exception was not thrown running the 'Imports for events' script. Press F12 and check the console for error details.")}const o=Object.assign(this.ue(t),{isInWorker:!1,messagePort:s,canvas:e,runOnStartupFunctions:o0});this.cs.Ie(),this.Pe(),this.os=self.C3_CreateRuntime(o),await self.C3_InitRuntime(this.os,o)}async ve(t,s){if(t.startsWith("blob:"))return new Worker(t,s);if("cordova"===this.Cs&&this.ks){const n=await this.Te(t),h=new Blob([n],{type:"application/javascript"});return new Worker(URL.createObjectURL(h),s)}if("playable-ad-single-file"===this.Cs){const r=this.Ms[t];if(r)return new Worker(URL.createObjectURL(r),s);throw new Error("missing script: "+t)}const e=new URL(t,location.href),i=location.origin!==e.origin;if(i){const o=await fetch(e);if(!o.ok)throw new Error("failed to fetch worker script");const a=await o.blob();return new Worker(URL.createObjectURL(a),s)}return new Worker(e,s)}we(){return Math.max(window.innerWidth,1)}fe(){return Math.max(window.innerHeight,1)}me(){if(this.Ts())return"standalone";const t=this.js(),s=new Set(["cordova","nwjs","macos-wkwebview","linux-cef"]);return s.has(t)?"standalone":window.matchMedia("(display-mode: fullscreen)").matches?"fullscreen":window.matchMedia("(display-mode: standalone)").matches?"standalone":window.matchMedia("(display-mode: minimal-ui)").matches?"minimal-ui":navigator.standalone?"standalone":"browser"}Pe(){this.ke()}ke(){const t=window.cr_previewLoadingElem;t&&(t.parentElement.removeChild(t),window.cr_previewLoadingElem=null)}async Gs(t){const s=await this.bs.Le();return{outputPort:s,transferables:[s]}}Es(t){if(!this.Me()){const s=t.styleWidth+"px",e=t.styleHeight+"px",i=t.marginLeft+"px",n=t.marginTop+"px";for(const{canvas:h,Vs:r}of this.us)h.style.width=s,h.style.height=e,h.style.marginLeft=i,h.style.marginTop=n,r.style.width=s,r.style.height=e,r.style.marginLeft=i,r.style.marginTop=n,this.ds&&(h.style.display="",r.style.display="");document.documentElement.style.setProperty("--construct-scale",t.displayScale),this.ds=!1}}["_OnSetHTMLLayerCount"](t){const e=t.count,s=t.layersDomState,i=t.immediate,n=t.styleWidth+"px",h=t.styleHeight+"px",r=t.marginLeft+"px",o=t.marginTop+"px",a=[],l=[];if(e<this.us.length)for(;this.us.length>e;){const{canvas:c,Vs:d}=this.us.pop();d.remove(),this.ts&&!i?this.ws.push(c):c.remove()}else if(e>this.us.length)for(let t=0,s=e-this.us.length;t<s;++t){const u=document.createElement("canvas");if(u.classList.add("c3overlay"),this.ts){const f=u.transferControlToOffscreen();a.push(f),l.push(f)}else a.push(u);document.body.appendChild(u);const w=document.createElement("div");w.classList.add("c3htmlwrap","c3overlay"),w.setAttribute("interactive",""),document.body.appendChild(w),u.style.width=n,u.style.height=h,u.style.marginLeft=r,u.style.marginTop=o,w.style.width=n,w.style.height=h,w.style.marginLeft=r,w.style.marginTop=o,this.cs._e(u),this.cs.Oe(w),this.us.push({canvas:u,Vs:w,be:{isVisible:!0,opacity:1,isInteractive:!0}})}this.Fs(s);for(const m of this.ls)m instanceof window._t&&m.Zt();return this.Kt(),{addedCanvases:a,transferables:l}}Fs(e){for(let t=0,s=Math.min(this.us.length,e.length);t<s;++t){const{Vs:i,be:n}=this.us[t],h=e[t],r=h.isVisible,o=h.opacity,a=h.isInteractive;r!==n.isVisible&&(i.style.display=r?"":"none",n.isVisible=r),o!==n.opacity&&(i.style.opacity=1===o?"":String(o),n.opacity=o),a!==n.isInteractive&&(i.style.pointerEvents=a?"":"none",a?i.setAttribute("interactive",""):i.removeAttribute("interactive"),n.isInteractive=a)}}Ds(){for(const t of this.ws)t.remove();this.ws.length=0}Kt(){this.fs||(this.fs=!0,this.F(this.ps))}ys(){this.G(this.ps),this.fs=!1;let t=[];for(const h of this.ls)if(h instanceof window._t){const r=h.Yt();r&&t.push(...r)}t.sort((t,s)=>{const e=t.gt(),i=s.gt();if(e!==i)return e-i;const n=t.St(),h=s.St();return n-h});let s=0,e=0,i=0,n=t.length;for(;i<n;++i){const o=t[i];o.gt()!==s&&(this.xe(s,t.slice(e,i)),s=o.gt(),e=i)}e<i&&this.xe(s,t.slice(e,i))}xe(t,s){if(!(s.length<=1||t>=this.us.length)){const i=s.map(t=>t.At()),e=new Set(i),n=this.qt(t),h=Array.from(n.children).filter(t=>e.has(t));for(let t=0,s=0,e=i.length;t<e;++t){const r=i[t],o=h[s];r===o?++s:n.insertBefore(r,o)}}}R(){if(this.ts)throw new Error("not available in worker mode");return this.os}S(t,s,e,i,n){this.es.postMessage({type:"event",component:t,handler:s,dispatchOpts:i||null,data:e,responseId:null},n)}_(t,s,e,i,n){const h=o++,r=new Promise((t,s)=>{m0.set(h,{resolve:t,reject:s})});return this.es.postMessage({type:"event",component:t,handler:s,dispatchOpts:i||null,data:e,responseId:h},n),r}["_OnMessageFromRuntime"](t){const s=t.type;if("event"===s)return this.Ee(t);if("result"===s)this.De(t);else if("runtime-ready"===s)this.Fe();else if("alert-error"===s)this.ke(),alert(t.message);else{if("creating-runtime"!==s)throw new Error(`unknown message '${s}'`);this.Pe()}}Ee(s){const e=s.component,i=s.handler,n=s.data,h=s.responseId,t=l0.get(e);if(t){const r=t.get(i);if(r){let t=null;try{t=r(n)}catch(s){return console.error(`Exception in '${e}' handler '${i}':`,s),void(null!==h&&this.Ue(h,!1,""+s))}if(null===h)return t;t&&t.then?t.then(t=>this.Ue(h,!0,t)).catch(t=>{console.error(`Rejection from '${e}' handler '${i}':`,t),this.Ue(h,!1,""+t)}):this.Ue(h,!0,t)}else console.warn(`[DOM] No handler '${i}' for component '${e}'`)}else console.warn(`[DOM] No event handlers for component '${e}'`)}Ue(t,s,e){let i;e&&e.transferables&&(i=e.transferables),this.es.postMessage({type:"result",responseId:t,isOk:s,result:e},i)}De(t){const s=t.responseId,e=t.isOk,i=t.result,n=m0.get(s);e?n.resolve(i):n.reject(i),m0.delete(s)}P(t,s,e){let i=l0.get(t);if(i||(i=new Map,l0.set(t,i)),i.has(s))throw new Error(`[DOM] Component '${t}' already has handler '${s}'`);i.set(s,e)}static Ge(t){if(k0.includes(t))throw new Error("DOM handler already added");k0.push(t)}Ae(){for(const t of this.ls)if("runtime"===t.M())return void(this.cs=t);throw new Error("cannot find runtime DOM handler")}oe(t){this.S("debugger","message",t)}Fe(){for(const t of this.ls)t.g()}static pe(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||s)}static We(t){s=!!t}async He(){return this._("runtime","get-remote-preview-status-info")}F(t){this.Os.add(t),this.Be()}G(t){this.Os.delete(t),0===this.Os.size&&this.Ns()}Be(){-1===this.Ss&&0<this.Os.size&&(this.Ss=requestAnimationFrame(this.As))}Ns(){-1!==this.Ss&&(cancelAnimationFrame(this.Ss),this.Ss=-1)}_s(){this.Ss=-1;for(const t of this.Os)t();this.Be()}Ne(t){this.cs.Ne(t)}Ve(t){this.cs.Ve(t)}qe(){this.cs.qe()}ze(t){this.cs.ze(t)}je(t){return!!g0[t]}$e(t){this.gs=!0,this.vs=t}Me(){return this.gs}Ke(){return this.vs}Ze(t){return/^(?:[a-z\-]+:)?\/\//.test(t)||"data:"===t.substr(0,5)||"blob:"===t.substr(0,5)}Ye(t){return!this.Ze(t)}async Ce(s){if("cordova"===this.Cs&&(s.startsWith("file:")||this.ks&&this.Ye(s))){let t=s;t.startsWith(this.ns)&&(t=t.substr(this.ns.length));const e=await this.Te(t),i=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(i)}if("playable-ad-single-file"!==this.Cs)return s;if(this.xs.hasOwnProperty(s))return{Xt:!0,str:this.xs[s]};if(this.Ms.hasOwnProperty(s))return URL.createObjectURL(this.Ms[s]);throw new Error("missing script: "+s)}async Us(t){const s=t.filename;switch(t.as){case"text":return this.Je(s);case"buffer":return this.Te(s);default:throw new Error("unsupported type")}}Xe(t){const i=window.cordova.file.applicationDirectory+"www/"+t;return new Promise((s,e)=>{window.resolveLocalFileSystemURL(i,t=>{t.file(s,e)},e)})}async Je(t){const s=await this.Xe(t);return BlobToString(s)}Qe(){if(h0.length&&!(i>=j0)){i++;const t=h0.shift();this.ti(t.filename,t.si,t.ei)}}Te(t){return new Promise((s,e)=>{h0.push({filename:t,si:t=>{i--,this.Qe(),s(t)},ei:t=>{i--,this.Qe(),e(t)}}),this.Qe()})}async ti(t,s,e){try{const i=await this.Xe(t),n=await BlobToArrayBuffer(i);s(n)}catch(t){e(t)}}["_PlayableAdFetchBlob"](t){if(this.Ms.hasOwnProperty(t))return this.Ms[t];throw new Error("missing file: "+t)}ii(){const t=window.cordova&&window.cordova.plugins&&window.cordova.plugins.permissions;if("object"!=typeof t)throw new Error("Permission API is not loaded");return t}ni(t,s){const e=t[s];if("string"!=typeof e)throw new Error("Invalid permission name");return e}hi(e){const i=this.ii();return new Promise((s,t)=>i.checkPermission(this.ni(i,e),t=>s(!!t.hasPermission),t))}ri(e){const i=this.ii();return new Promise((s,t)=>i.requestPermission(this.ni(i,e),t=>s(!!t.hasPermission),t))}async oi(t){if("cordova"===this.js()&&!this.Zs())for(const s of t){const e=await this.hi(s);if(!e){const i=await this.ri(s);if(!1===i)return!1}}return!0}async ai(...t){if(!1===await this.oi(t))throw new Error("Permission not granted")}Ls(t,s){if("object"==typeof t&&t){const e=t.type;if("directory-handles"===e)this.Ps=s;else if("wrapper-init-response"===e)this.Is(t),this.Is=null;else if("fullscreen-change"===e)P0.We(t.isFullscreen),this.cs.li();else if("log-to-console"===e)switch(t.logType){case"error":console.error(t.message);break;case"warning":console.warn(t.message);break;default:console.log(t.message)}else"extension-message"===e?this.S("runtime","wrapper-extension-message",t):console.warn("Unknown wrapper message: ",t)}else console.warn("Unknown wrapper message: ",t)}Ws(t){this.ie({type:"extension-message",componentId:t.componentId,messageId:t.messageId,params:t.params||[],asyncId:t.asyncId})}ie(t){this.Ts()?window.chrome.webview.postMessage(JSON.stringify(t)):"macos-wkwebview"===this.Cs?window.webkit.messageHandlers.C3Wrapper.postMessage(JSON.stringify(t)):"linux-cef"===this.Cs&&window.c3_linux_cef_sendmessage(JSON.stringify(t))}ne(){window.moveTo=(t,s)=>{this.ie({type:"set-window-position",windowX:Math.ceil(t),windowY:Math.ceil(s)})},window.resizeTo=(t,s)=>{this.ie({type:"set-window-size",windowWidth:Math.ceil(t),windowHeight:Math.ceil(s)})}}he(){return new Promise(t=>{this.Is=t,this.ie({type:"wrapper-init"})})}ci(){return this.Ps}async re(){const t=[];for(const[s,e]of Object.entries(this.Ms))t.push(this.di(s,e));await Promise.all(t)}async di(s,e){if("object"==typeof e)this.Ms[s]=new Blob([e.str],{type:e.type}),this.xs[s]=e.str;else{let t=await this.wi(e);t=t||this.fi(e),this.Ms[s]=t}}async wi(t){try{const s=await fetch(t);return await s.blob()}catch(t){return console.warn("Failed to fetch a data: URI. Falling back to a slower workaround. This is probably because the Content Security Policy unnecessarily blocked it. Allow data: URIs in your CSP to avoid this.",t),null}}fi(t){const s=this.mi(t);return this.pi(s.data,s.yi)}mi(t){const s=t.indexOf(",");if(s<0)throw new URIError("expected comma in data: uri");const e=t.substring(5,s),i=t.substring(s+1),n=e.split(";"),h=n[0]||"",r=n[1],o=n[2];return{yi:h,data:("base64"===r||"base64"===o?atob:decodeURIComponent)(i)}}pi(t,s){let e=t.length,i=e>>2,n=new Uint8Array(e),h=new Uint32Array(n.buffer,0,i),r,o;for(r=0,o=0;r<i;++r)h[r]=t.charCodeAt(o++)|t.charCodeAt(o++)<<8|t.charCodeAt(o++)<<16|t.charCodeAt(o++)<<24;let a=3&e;for(;a--;)n[o]=t.charCodeAt(o),++o;return new Blob([n],{type:s})}}}{const Md=self.Qt;function IsCompatibilityMouseEvent(t){return t.sourceCapabilities&&t.sourceCapabilities.firesTouchEvents||t.originalEvent&&t.originalEvent.sourceCapabilities&&t.originalEvent.sourceCapabilities.firesTouchEvents}const Nd=new Map([["OSLeft","MetaLeft"],["OSRight","MetaRight"]]),Od={dispatchRuntimeEvent:!0,dispatchUserScriptEvent:!0},Pd={dispatchUserScriptEvent:!0},Qd={dispatchRuntimeEvent:!0};function AddStyleSheet(i){return new Promise((t,s)=>{const e=document.createElement("link");e.onload=()=>t(e),e.onerror=t=>s(t),e.rel="stylesheet",e.href=i,document.head.appendChild(e)})}function FetchImage(i){return new Promise((t,s)=>{const e=new Image;e.onload=()=>t(e),e.onerror=t=>s(t),e.src=i})}async function BlobToImage(t){const s=URL.createObjectURL(t);try{return await FetchImage(s)}finally{URL.revokeObjectURL(s)}}function BlobToString(i){return new Promise((s,e)=>{let t=new FileReader;t.onload=t=>s(t.target.result),t.onerror=t=>e(t),t.readAsText(i)})}function IsInContentEditable(t){do{if(t.parentNode&&t.hasAttribute("contenteditable"))return!0}while(t=t.parentNode);return!1}const Rd=new Set(["input","textarea","datalist","select"]);function IsKeyboardInputElement(t){return Rd.has(t.tagName.toLowerCase())||IsInContentEditable(t)}const Sd=new Set(["canvas","body","html"]);function PreventDefaultOnCanvasOrDoc(t){if(t.target.tagName){const s=t.target.tagName.toLowerCase();Sd.has(s)&&t.preventDefault()}}function PreventDefaultOnHTMLWrap(t){t.target.tagName&&t.target.classList.contains("c3htmlwrap")&&t.preventDefault()}function BlockWheelZoom(t){(t.metaKey||t.ctrlKey)&&t.preventDefault()}self.C3_GetSvgImageSize=async function(t){const s=await BlobToImage(t);if(0<s.width&&0<s.height)return[s.width,s.height];{s.style.position="absolute",s.style.left="0px",s.style.top="0px",s.style.visibility="hidden",document.body.appendChild(s);const e=s.getBoundingClientRect();return document.body.removeChild(s),[e.width,e.height]}};let t=!(self.C3_RasterSvgImageBlob=async function(t,s,e,i,n){const h=await BlobToImage(t),r=document.createElement("canvas"),o=(r.width=i,r.height=n,r.getContext("2d"));return o.drawImage(h,0,0,s,e),r});function ParentHasFocus(){try{return window.parent&&window.parent.document.hasFocus()}catch(t){return!1}}document.addEventListener("pause",()=>t=!0),document.addEventListener("resume",()=>t=!1);const Ud="runtime",Vd=class extends self.i{constructor(t){super(t,Ud),this.gi=!1,this.vi=-1,this.bi="any",this.Si=!1,this.Ai=!1,this._i=!1,this.Oi=document.createElement("div"),this.Oi.className="c3-screen-reader-text",this.Oi.setAttribute("aria-live","polite"),document.body.appendChild(this.Oi),this.Ii=null,this.Ri=!1,this.Ci="",this.ki=-1,this.Pi=!1,this.Ti=t.we(),this.Li=t.fe(),this.Mi=0,this.xi=0,t.P("runtime","invoke-download",t=>this.Ei(t)),t.P("runtime","load-webfonts",t=>this.Di(t)),t.P("runtime","raster-svg-image",t=>this.Fi(t)),t.P("runtime","get-svg-image-size",t=>this.Ui(t)),t.P("runtime","set-target-orientation",t=>this.Gi(t)),t.P("runtime","register-sw",()=>this.Wi()),t.P("runtime","post-to-debugger",t=>this.Hi(t)),t.P("runtime","go-to-script",t=>this.Hi(t)),t.P("runtime","before-start-ticking",()=>this.Bi()),t.P("runtime","debug-highlight",t=>this.Ni(t)),t.P("runtime","enable-device-orientation",()=>this.Vi()),t.P("runtime","enable-device-motion",()=>this.zi()),t.P("runtime","add-stylesheet",t=>this.ji(t)),t.P("runtime","script-create-worker",t=>this.$i(t)),t.P("runtime","alert",t=>this.Ki(t)),t.P("runtime","screen-reader-text",t=>this.Zi(t)),t.P("runtime","hide-cordova-splash",()=>this.Yi()),t.P("runtime","set-exporting-to-video",t=>this.Ji(t)),t.P("runtime","export-to-video-progress",t=>this.Xi(t)),t.P("runtime","exported-to-video",t=>this.Qi(t)),t.P("runtime","exported-to-image-sequence",t=>this.tn(t));const i=new Set(["input","textarea","datalist"]);if(window.addEventListener("contextmenu",t=>{const s=t.target,e=s.tagName.toLowerCase();i.has(e)||IsInContentEditable(s)||t.preventDefault()}),window.addEventListener("selectstart",PreventDefaultOnCanvasOrDoc),window.addEventListener("gesturehold",PreventDefaultOnCanvasOrDoc),window.addEventListener("touchstart",PreventDefaultOnCanvasOrDoc,{passive:!1}),window.addEventListener("pointerdown",PreventDefaultOnCanvasOrDoc,{passive:!1}),this.sn=0,window.addEventListener("mousedown",t=>{1===t.button&&t.preventDefault()}),window.addEventListener("mousewheel",BlockWheelZoom,{passive:!1}),window.addEventListener("wheel",BlockWheelZoom,{passive:!1}),window.addEventListener("resize",()=>this.en()),window.addEventListener("fullscreenchange",()=>this.li()),window.addEventListener("webkitfullscreenchange",()=>this.li()),window.addEventListener("mozfullscreenchange",()=>this.li()),window.addEventListener("fullscreenerror",t=>this.nn(t)),window.addEventListener("webkitfullscreenerror",t=>this.nn(t)),window.addEventListener("mozfullscreenerror",t=>this.nn(t)),t.Ys()){let s=1/0;window.visualViewport.addEventListener("resize",()=>{const t=window.visualViewport.height;t>s&&(document.scrollingElement.scrollTop=0,document.scrollingElement.scrollLeft=0),s=t}),document.documentElement.setAttribute("ioswebview","")}this.hn=new Set,this.rn=new WeakSet,this.an=!1}_e(t){t.addEventListener("selectstart",PreventDefaultOnCanvasOrDoc),t.addEventListener("gesturehold",PreventDefaultOnCanvasOrDoc),t.addEventListener("pointerdown",PreventDefaultOnCanvasOrDoc)}Oe(t){t.addEventListener("selectstart",PreventDefaultOnHTMLWrap),t.addEventListener("gesturehold",PreventDefaultOnHTMLWrap),t.addEventListener("touchstart",PreventDefaultOnHTMLWrap)}Bi(){return self.setTimeout(()=>{this.Pi=!0},1e3),"cordova"===this.h.js()?(document.addEventListener("pause",()=>this.ln(!0)),document.addEventListener("resume",()=>this.ln(!1))):document.addEventListener("visibilitychange",()=>this.ln("hidden"===document.visibilityState)),this._i=!("hidden"!==document.visibilityState&&!t),{isSuspended:this._i}}g(){window.addEventListener("focus",()=>this.cn("window-focus")),window.addEventListener("blur",()=>{this.cn("window-blur",{parentHasFocus:ParentHasFocus()}),this.sn=0}),window.addEventListener("focusin",t=>{IsKeyboardInputElement(t.target)&&this.cn("keyboard-blur")}),window.addEventListener("keydown",t=>this.dn("keydown",t)),window.addEventListener("keyup",t=>this.dn("keyup",t)),window.addEventListener("mousedown",t=>this.un("mousedown",t,Pd)),window.addEventListener("mousemove",t=>this.un("mousemove",t,Pd)),window.addEventListener("mouseup",t=>this.un("mouseup",t,Pd)),window.addEventListener("dblclick",t=>this.un("dblclick",t,Od)),window.addEventListener("wheel",t=>this.wn("wheel",t,Od)),window.addEventListener("pointerdown",t=>{this.fn(t),this.mn("pointerdown",t)}),this.h.I()&&void 0!==window.onpointerrawupdate&&self===self.top?window.addEventListener("pointerrawupdate",t=>this.pn(t)):window.addEventListener("pointermove",t=>this.mn("pointermove",t)),window.addEventListener("pointerup",t=>this.mn("pointerup",t)),window.addEventListener("pointercancel",t=>this.mn("pointercancel",t));const t=()=>this.qe();window.addEventListener("pointerup",t,!0),window.addEventListener("touchend",t,!0),window.addEventListener("click",t,!0),window.addEventListener("keydown",t,!0),window.addEventListener("gamepadconnected",t,!0),this.h.Js()&&!this.h.Xs()&&navigator.virtualKeyboard&&(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",()=>{this.yn(this.fe(),navigator.virtualKeyboard.boundingRect.height)})),this.h.Ys()&&(document.scrollingElement.scrollTop=0,document.scrollingElement.scrollLeft=0)}yn(s,e){if(document.body.style.position="",document.body.style.overflow="",document.body.style.transform="",(this.xi=0)<e){const i=document.activeElement;if(i){const n=i.getBoundingClientRect(),h=(n.top+n.bottom)/2,r=(s-e)/2;let t=h-r;0<(t=(t=e<t?e:t)<0?0:t)&&(document.body.style.position="absolute",document.body.style.overflow="visible",document.body.style.transform=`translateY(${-t}px)`,this.xi=t)}}}cn(t,s){this.v(t,s||null,Qd)}we(){return this.h.we()}fe(){return this.h.fe()}Ie(){this.gi=!0,this.Ti=this.h.we(),this.Li=this.h.fe()}en(){if(!this.Ri&&this.gi){const t=this.we(),s=this.fe();if(this.h.Xs()){if(this.Pi){const e=this.h.se();if(e&&this.Ti===t&&s<this.Li)return this.Mi=this.Li-s,void this.yn(this.Li,this.Mi);0<this.Mi&&(this.Mi=0,this.yn(s,this.Mi))}this.Ti=t,this.Li=s}this.v("window-resize",{innerWidth:t,innerHeight:s,devicePixelRatio:window.devicePixelRatio,isFullscreen:Md.pe(),cssDisplayMode:this.h.me()}),this.h.Ys()&&(-1!==this.vi&&clearTimeout(this.vi),this.gn(t,s,0))}}vn(t,s,e){-1!==this.vi&&clearTimeout(this.vi),this.vi=setTimeout(()=>this.gn(t,s,e),48)}gn(t,s,e){const i=this.we(),n=this.fe();this.vi=-1,i!=t||n!=s?this.v("window-resize",{innerWidth:i,innerHeight:n,devicePixelRatio:window.devicePixelRatio,isFullscreen:Md.pe(),cssDisplayMode:this.h.me()}):e<10&&this.vn(i,n,e+1)}Gi(t){this.bi=t.targetOrientation}bn(){const s=this.bi;if(screen.orientation&&screen.orientation.lock)screen.orientation.lock(s).catch(t=>console.warn("[Construct] Failed to lock orientation: ",t));else try{let t=!1;screen.lockOrientation?t=screen.lockOrientation(s):screen.webkitLockOrientation?t=screen.webkitLockOrientation(s):screen.mozLockOrientation?t=screen.mozLockOrientation(s):screen.msLockOrientation&&(t=screen.msLockOrientation(s)),t||console.warn("[Construct] Failed to lock orientation")}catch(t){console.warn("[Construct] Failed to lock orientation: ",t)}}li(){if(!this.Ri){const t=Md.pe();t&&"any"!==this.bi&&this.bn(),this.v("fullscreenchange",{isFullscreen:t,innerWidth:this.we(),innerHeight:this.fe()})}}nn(t){console.warn("[Construct] Fullscreen request failed: ",t),this.v("fullscreenerror",{isFullscreen:Md.pe(),innerWidth:this.we(),innerHeight:this.fe()})}ln(t){if(this._i!==t&&((this._i=t)?this.h.Ns():this.h.Be(),this.v("visibilitychange",{hidden:t}),!t)&&this.h.Ys()){const s=()=>{document.scrollingElement.scrollTop=0,document.scrollingElement.scrollLeft=0};setTimeout(s,50),setTimeout(s,100),setTimeout(s,250),setTimeout(s,500)}}dn(t,s){if(void 0!==s.key&&("Backspace"===s.key&&PreventDefaultOnCanvasOrDoc(s),"nwjs"===this.h.js()&&"u"===s.key&&(s.ctrlKey||s.metaKey)&&s.preventDefault(),!this.Ri)){const e=Nd.get(s.code)||s.code;this.O(t,{code:e,key:s.key,which:s.which,repeat:s.repeat,altKey:s.altKey,ctrlKey:s.ctrlKey,metaKey:s.metaKey,shiftKey:s.shiftKey,timeStamp:s.timeStamp},Od)}}wn(t,s,e){this.Ri||this.v(t,{clientX:s.clientX,clientY:s.clientY+this.xi,pageX:s.pageX,pageY:s.pageY+this.xi,deltaX:s.deltaX,deltaY:s.deltaY,deltaZ:s.deltaZ,deltaMode:s.deltaMode,timeStamp:s.timeStamp},e)}un(t,s,e){this.Ri||IsCompatibilityMouseEvent(s)||this.O(t,{button:s.button,buttons:s.buttons,clientX:s.clientX,clientY:s.clientY+this.xi,pageX:s.pageX,pageY:s.pageY+this.xi,movementX:s.movementX||0,movementY:s.movementY||0,timeStamp:s.timeStamp},e)}mn(s,e){if(!this.Ri){let t=0;"mouse"===e.pointerType&&(t=this.sn),this.O(s,{pointerId:e.pointerId,pointerType:e.pointerType,button:e.button,buttons:e.buttons,lastButtons:t,clientX:e.clientX,clientY:e.clientY+this.xi,pageX:e.pageX,pageY:e.pageY+this.xi,movementX:e.movementX||0,movementY:e.movementY||0,width:e.width||0,height:e.height||0,pressure:e.pressure||0,tangentialPressure:e.tangentialPressure||0,tiltX:e.tiltX||0,tiltY:e.tiltY||0,twist:e.twist||0,timeStamp:e.timeStamp},Od),"mouse"===e.pointerType&&(this.sn=e.buttons)}}pn(t){this.mn("pointermove",t)}Sn(e,i){if(!this.Ri)for(let t=0,s=i.changedTouches.length;t<s;++t){const n=i.changedTouches[t];this.O(e,{pointerId:n.identifier,pointerType:"touch",button:0,buttons:0,lastButtons:0,clientX:n.clientX,clientY:n.clientY+this.xi,pageX:n.pageX,pageY:n.pageY+this.xi,movementX:i.movementX||0,movementY:i.movementY||0,width:2*(n.radiusX||n.webkitRadiusX||0),height:2*(n.radiusY||n.webkitRadiusY||0),pressure:n.force||n.webkitForce||0,tangentialPressure:0,tiltX:0,tiltY:0,twist:n.rotationAngle||0,timeStamp:i.timeStamp},Od)}}fn(t){window!==window.top&&window.focus(),this.An(t.target)&&document.activeElement&&!this.An(document.activeElement)&&document.activeElement.blur()}An(t){return!t||t===document||t===window||t===document.body||"canvas"===t.tagName.toLowerCase()}Vi(){this.Si||(this.Si=!0,window.addEventListener("deviceorientation",t=>this._n(t)),window.addEventListener("deviceorientationabsolute",t=>this.On(t)))}zi(){this.Ai||(this.Ai=!0,window.addEventListener("devicemotion",t=>this.In(t)))}_n(t){this.Ri||this.v("deviceorientation",{absolute:!!t.absolute,alpha:t.alpha||0,beta:t.beta||0,gamma:t.gamma||0,timeStamp:t.timeStamp,webkitCompassHeading:t.webkitCompassHeading,webkitCompassAccuracy:t.webkitCompassAccuracy},Od)}On(t){this.Ri||this.v("deviceorientationabsolute",{absolute:!!t.absolute,alpha:t.alpha||0,beta:t.beta||0,gamma:t.gamma||0,timeStamp:t.timeStamp},Od)}In(i){if(!this.Ri){let t=null;const n=i.acceleration;n&&(t={x:n.x||0,y:n.y||0,z:n.z||0});let s=null;const h=i.accelerationIncludingGravity;h&&(s={x:h.x||0,y:h.y||0,z:h.z||0});let e=null;const r=i.rotationRate;r&&(e={alpha:r.alpha||0,beta:r.beta||0,gamma:r.gamma||0}),this.v("devicemotion",{acceleration:t,accelerationIncludingGravity:s,rotationRate:e,interval:i.interval,timeStamp:i.timeStamp},Od)}}Ei(t){const s=t.url,e=t.filename,i=document.createElement("a"),n=document.body;i.textContent=e,i.href=s,i.download=e,n.appendChild(i),i.click(),n.removeChild(i)}async Di(t){const s=t.webfonts;await Promise.all(s.map(async t=>{const s=new FontFace(t.name,`url('${t.url}')`);document.fonts.add(s),await s.load()}))}async Fi(t){const s=t.blob,e=t.imageWidth,i=t.imageHeight,n=t.surfaceWidth,h=t.surfaceHeight,r=t.imageBitmapOpts,o=await self.C3_RasterSvgImageBlob(s,e,i,n,h);let a;return{imageBitmap:a=r?await createImageBitmap(o,r):await createImageBitmap(o),transferables:[a]}}async Ui(t){return self.C3_GetSvgImageSize(t.blob)}async ji(t){await AddStyleSheet(t.url)}qe(){const t=[...this.hn];if(this.hn.clear(),!this.an)for(const s of t){const e=s.play();e&&e.catch(t=>{this.rn.has(s)||this.hn.add(s)})}}Ne(s){if("function"!=typeof s.play)throw new Error("missing play function");this.rn.delete(s);let t;try{t=s.play()}catch(t){return void this.hn.add(s)}t&&t.catch(t=>{this.rn.has(s)||this.hn.add(s)})}Ve(t){this.hn.delete(t),this.rn.add(t)}ze(t){this.an=!!t}Yi(){navigator.splashscreen&&navigator.splashscreen.hide&&navigator.splashscreen.hide()}Ni(t){const s=t.show;if(s){this.Ii||(this.Ii=document.createElement("div"),this.Ii.id="inspectOutline",document.body.appendChild(this.Ii));const e=this.Ii;e.style.display="",e.style.left=t.left-1+"px",e.style.top=t.top-1+"px",e.style.width=t.width+2+"px",e.style.height=t.height+2+"px",e.textContent=t.name}else this.Ii&&(this.Ii.style.display="none")}Wi(){window.C3_RegisterSW&&window.C3_RegisterSW()}Hi(t){window.c3_postToMessagePort&&(t.from="runtime",window.c3_postToMessagePort(t))}Re(t,s){return this.A("js-invoke-function",{name:t,params:s})}$i(t){const s=t.url,e=t.opts,i=t.port2,n=new Worker(s,e);n.postMessage({type:"construct-worker-init",port2:i},[i])}Ki(t){alert(t.message)}Zi(t){const s=t.type;if("create"===s){const e=document.createElement("p");e.id="c3-sr-"+t.id,e.textContent=t.text,this.Oi.appendChild(e)}else if("update"===s){const i=document.getElementById("c3-sr-"+t.id);i?i.textContent=t.text:console.warn("[Construct] Missing screen reader text with id "+t.id)}else if("release"===s){const n=document.getElementById("c3-sr-"+t.id);n?n.remove():console.warn("[Construct] Missing screen reader text with id "+t.id)}else console.warn(`[Construct] Unknown screen reader text update '${s}'`)}Ji(t){this.Ri=!0;const s=document.createElement("h1");s.id="exportToVideoMessage",s.textContent=t.message,document.body.prepend(s),document.body.classList.add("exportingToVideo"),this.L().qs().style.display="",this.h.$e(t.duration)}Xi(t){this.Ci=t.message,-1===this.ki&&(this.ki=setTimeout(()=>this.Rn(),250))}Rn(){this.ki=-1;const t=document.getElementById("exportToVideoMessage");t&&(t.textContent=this.Ci)}Qi(t){window.c3_postToMessagePort({type:"exported-video",arrayBuffer:t.arrayBuffer,contentType:t.contentType,time:t.time})}tn(t){window.c3_postToMessagePort({type:"exported-image-sequence",blobArr:t.blobArr,time:t.time,gif:t.gif})}};Md.Ge(Vd)}{const Af="dispatchworker.js",Bf="jobworker.js";self.ae=class{constructor(t){this.Cn=t,this.kn=Math.min(navigator.hardwareConcurrency||2,16),this.Pn=null,this.Tn=[],this.Ln=null,this.Mn=null}async le(){if(this.xn)throw new Error("already initialised");this.xn=!0;const t=this.Cn.Ks()+Af,s=(this.Pn=await this.Cn.ve(t,{name:"DispatchWorker"}),new MessageChannel);this.Ln=s.port1,this.Pn.postMessage({type:"_init","in-port":s.port2},[s.port2]),this.Mn=await this.Le()}async Le(){const t=this.Tn.length,s=this.Cn.Ks()+Bf,e=await this.Cn.ve(s,{name:"JobWorker"+t}),i=new MessageChannel,n=new MessageChannel;return this.Pn.postMessage({type:"_addJobWorker",port:i.port1},[i.port1]),e.postMessage({type:"init",number:t,"dispatch-port":i.port2,"output-port":n.port2},[i.port2,n.port2]),this.Tn.push(e),n.port1}ye(){return{inputPort:this.Ln,outputPort:this.Mn,maxNumWorkers:this.kn}}Se(){return[this.Ln,this.Mn]}}}{const Kf="touch",Lf=class extends self.i{constructor(t){super(t,Kf),this.C("request-permission",t=>this.En(t))}async En(t){const s=t.type;let e=!0;0===s?e=await this.Dn():1===s&&(e=await this.Fn()),this.v("permission-result",{type:s,result:e})}async Dn(){if(!self.DeviceOrientationEvent||!self.DeviceOrientationEvent.requestPermission)return!0;try{const t=await self.DeviceOrientationEvent.requestPermission();return"granted"===t}catch(t){return console.warn("[Touch] Failed to request orientation permission: ",t),!1}}async Fn(){if(!self.DeviceMotionEvent||!self.DeviceMotionEvent.requestPermission)return!0;try{const t=await self.DeviceMotionEvent.requestPermission();return"granted"===t}catch(t){return console.warn("[Touch] Failed to request motion permission: ",t),!1}}};self.Qt.Ge(Lf)}{const Vf="keyboard",Wf=class extends self.i{constructor(t){super(t,Vf),this.Un=!(!navigator.keyboard||!navigator.keyboard.lock),this.T([["init",()=>this.Gn()],["lock-keyboard",t=>this.Wn(t)],["unlock-keyboard",()=>this.Hn()]])}Gn(){return{isKeyboardLockSupported:this.Un}}async Wn(t){const s=t.keysArr;try{return 0===s.length?await navigator.keyboard.lock():await navigator.keyboard.lock(s),{isOk:!0}}catch(t){return console.error("Error locking keyboard:",t),{isOk:!1}}}Hn(){try{navigator.keyboard.unlock()}catch(t){console.error("Error unlocking keyboard:",t)}}};self.Qt.Ge(Wf)}{let s=null,e=null;function elemsForSelector(t,s){if(t){if(s)return Array.from(document.querySelectorAll(t));{const e=document.querySelector(t);return e?[e]:[]}}return[document.documentElement]}function noop(){}window.addEventListener("beforeinstallprompt",t=>(t.preventDefault(),s=t,e&&e.Bn(),!1));const c5="browser",d5=class extends self.i{constructor(t){super(t,c5),this.Cs="",this.T([["get-initial-state",t=>this.Nn(t)],["ready-for-sw-messages",()=>this.Vn()],["alert",t=>this.Ki(t)],["close",()=>this.qn()],["set-focus",t=>this.Lt(t)],["vibrate",t=>this.zn(t)],["lock-orientation",t=>this.jn(t)],["unlock-orientation",()=>this.$n()],["navigate",t=>this.Kn(t)],["request-fullscreen",t=>this.Zn(t)],["exit-fullscreen",()=>this.Yn()],["set-hash",t=>this.Jn(t)],["set-document-css-style",t=>this.Xn(t)],["get-document-css-style",t=>this.Qn(t)],["set-window-size",t=>this.th(t)],["set-window-position",t=>this.sh(t)],["request-install",()=>this.eh()],["set-warn-on-close",t=>this.ih(t)]]),window.addEventListener("online",()=>this.nh(!0)),window.addEventListener("offline",()=>this.nh(!1)),window.addEventListener("hashchange",()=>this.hh()),this.rh=t=>t.preventDefault(),document.addEventListener("backbutton",()=>this.oh())}g(){s?this.Bn():e=this,window.addEventListener("appinstalled",()=>this.ah())}Nn(t){return this.Cs=t.exportType,{location:location.toString(),isOnline:!!navigator.onLine,referrer:document.referrer,title:document.title,isCookieEnabled:!!navigator.cookieEnabled,screenWidth:screen.width,screenHeight:screen.height,windowOuterWidth:window.outerWidth,windowOuterHeight:window.outerHeight,isConstructArcade:void 0!==window.is_scirra_arcade,windowHasFocus:document.hasFocus()}}Vn(){window.C3_RegisterSW&&window.OfflineClientInfo&&window.OfflineClientInfo.SetMessageCallback(t=>this.v("sw-message",t.data))}Bn(){this.v("install-available")}async eh(){if(!s)return{result:"unavailable"};try{s.prompt();const t=await s.userChoice;return{result:t.outcome}}catch(t){return console.error("[Construct] Requesting install failed: ",t),{result:"failed"}}}ah(){this.v("app-installed")}nh(t){this.v("online-state",{isOnline:t})}oh(){this.v("backbutton")}lh(){return"nwjs"===this.Cs?nw.Window.get():null}Ki(t){alert(t.message)}qn(){navigator.app&&navigator.app.exitApp?navigator.app.exitApp():navigator.device&&navigator.device.exitApp?navigator.device.exitApp():self.nw?self.nw.App.quit():window.close()}Lt(t){const s=t.isFocus;if("nwjs"===this.Cs){const e=this.lh();s?e.focus():e.blur()}else s?window.focus():window.blur()}zn(t){navigator.vibrate&&navigator.vibrate(t.pattern)}jn(t){const s=t.orientation;if(screen.orientation&&screen.orientation.lock)screen.orientation.lock(s).catch(t=>console.warn("[Construct] Failed to lock orientation: ",t));else try{let t=!1;screen.lockOrientation?t=screen.lockOrientation(s):screen.webkitLockOrientation?t=screen.webkitLockOrientation(s):screen.mozLockOrientation?t=screen.mozLockOrientation(s):screen.msLockOrientation&&(t=screen.msLockOrientation(s)),t||console.warn("[Construct] Failed to lock orientation")}catch(t){console.warn("[Construct] Failed to lock orientation: ",t)}}$n(){try{screen.orientation&&screen.orientation.unlock?screen.orientation.unlock():screen.unlockOrientation?screen.unlockOrientation():screen.webkitUnlockOrientation?screen.webkitUnlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()}catch(t){}}Kn(t){const s=t.type;if("back"===s)navigator.app&&navigator.app.backHistory?navigator.app.backHistory():window.history.back();else if("forward"===s)window.history.forward();else if("reload"===s)location.reload();else if("url"===s){const e=t.url,i=t.target,n=t.exportType;self.cordova&&self.cordova.InAppBrowser?self.cordova.InAppBrowser.open(e,"_system"):"preview"===n||"macos-wkwebiew"===n||"linux-cef"===n||this.h.Ts()?window.open(e,"_blank"):this._isConstructArcade||(2===i?window.top.location=e:1===i?window.parent.location=e:window.location=e)}else if("new-window"===s){const h=t.url,r=t.tag;self.cordova&&self.cordova.InAppBrowser?self.cordova.InAppBrowser.open(h,"_system"):window.open(h,r)}}Zn(s){if(this.h.Ts()||"macos-wkwebview"===this.Cs||"linux-cef"===this.Cs)self.Qt.We(!0),this.h.ie({type:"set-fullscreen",fullscreen:!0});else{const e={navigationUI:"auto"},i=s.navUI,n=(1===i?e.navigationUI="hide":2===i&&(e.navigationUI="show"),document.documentElement);let t;n.requestFullscreen?t=n.requestFullscreen(e):n.mozRequestFullScreen?t=n.mozRequestFullScreen(e):n.msRequestFullscreen?t=n.msRequestFullscreen(e):n.webkitRequestFullScreen&&(t=void 0!==Element.ALLOW_KEYBOARD_INPUT?n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):n.webkitRequestFullScreen()),t instanceof Promise&&t.catch(noop)}}Yn(){if(this.h.Ts()||"macos-wkwebview"===this.Cs||"linux-cef"===this.Cs)self.Qt.We(!1),this.h.ie({type:"set-fullscreen",fullscreen:!1});else{let t;document.exitFullscreen?t=document.exitFullscreen():document.mozCancelFullScreen?t=document.mozCancelFullScreen():document.msExitFullscreen?t=document.msExitFullscreen():document.webkitCancelFullScreen&&(t=document.webkitCancelFullScreen()),t instanceof Promise&&t.catch(noop)}}Jn(t){location.hash=t.hash}hh(){this.v("hashchange",{location:location.toString()})}Xn(t){const s=t.prop,e=t.value,i=t.selector,n=t["is-all"];try{const h=elemsForSelector(i,n);for(const t of h)s.startsWith("--")?t.style.setProperty(s,e):t.style[s]=e}catch(t){console.warn("[Browser] Failed to set style: ",t)}}Qn(t){const s=t.prop,e=t.selector;try{const i=document.querySelector(e);if(i){const n=window.getComputedStyle(i);return{isOk:!0,result:n.getPropertyValue(s)}}return{isOk:!1}}catch(t){return console.warn("[Browser] Failed to get style: ",t),{isOk:!1}}}th(t){window.resizeTo(t.windowWidth,t.windowHeight)}sh(t){window.moveTo(t.windowX,t.windowY)}ih(t){const s=t.enabled;s?window.addEventListener("beforeunload",this.rh):window.removeEventListener("beforeunload",this.rh)}};self.Qt.Ge(d5)}{const ng="localstorage",og=class extends self.i{constructor(t){super(t,ng),this.T([["init",()=>this.Hs()],["request-persistent",()=>this.dh()]])}async Hs(){let s=!1;try{s=await navigator.storage.persisted()}catch(t){s=!1,console.warn("[Construct] Error checking storage persisted state: ",t)}return{isPersistent:s}}async dh(){try{const t=await navigator.storage.persist();return{isOk:!0,isPersistent:t}}catch(t){return console.error("[Construct] Error requesting persistent storage: ",t),{isOk:!1}}}};self.Qt.Ge(og)}{const ug=180/Math.PI,vg="audio";self.uh=class extends self.i{constructor(t){super(t,vg),this.wh=null,this.fh=null,this.mh=!1,this.ph=!1,this.yh=()=>this.gh(),this.bh=[],this.Sh=[],this.Ah=null,this._h=[],this.Oh=new Set,this.Ih=-1,this.Rh=new Map,this.Ch=1,this.an=!1,this.kh=0,this.Ph=1,this.Th=0,this.Lh="HRTF",this.Mh="inverse",this.xh=600,this.Eh=1e4,this.Dh=1,this.Fh=[0,0,0],this.Uh=[0,0,-1,0,1,0],this.Gh=!1,this.Wh=null,this.Hh=new Map,this.Bh=new Set,this.Nh=!1,this.Vh=!1,this.qh="",this.zh=null,self.C3Audio_OnMicrophoneStream=(t,s)=>this.jh(t,s),this.$h=null,self.C3Audio_GetOutputStream=()=>this.Kh(),(self.C3Audio_DOMInterface=this).T([["create-audio-context",t=>this.Zh(t)],["play",t=>this.Yh(t)],["stop",t=>this.Jh(t)],["stop-all",()=>this.Xh()],["set-paused",t=>this.Qh(t)],["set-volume",t=>this.tr(t)],["fade-volume",t=>this.sr(t)],["set-master-volume",t=>this.er(t)],["set-muted",t=>this.ir(t)],["set-silent",t=>this.nr(t)],["set-looping",t=>this.hr(t)],["set-playback-rate",t=>this.rr(t)],["set-stereo-pan",t=>this.ar(t)],["seek",t=>this.lr(t)],["preload",t=>this.cr(t)],["unload",t=>this.dr(t)],["unload-all",()=>this.ur()],["set-suspended",t=>this.wr(t)],["add-effect",t=>this.mr(t)],["set-effect-param",t=>this.pr(t)],["remove-effects",t=>this.yr(t)],["tick",t=>this.gr(t)],["load-state",t=>this.vr(t)],["offline-render-audio",t=>this.br(t)],["offline-render-finish",()=>this.Sr()]])}async Zh(t){t.usePlayMusicAsSoundWorkaround&&(this.Gh=!0),this.kh=t.timeScaleMode,this.Lh=["equalpower","HRTF","soundfield"][t.panningModel],this.Mh=["linear","inverse","exponential"][t.distanceModel],this.xh=t.refDistance,this.Eh=t.maxDistance,this.Dh=t.rolloffFactor,this.h.Me()?(this.Gh=!0,this.wh=new OfflineAudioContext({numberOfChannels:2,sampleRate:48e3,length:Math.ceil(48e3*this.h.Ke())})):(this.wh=new AudioContext({latencyHint:t.latencyHint}),this.Ar(),this.wh.onstatechange=()=>{"running"!==this.wh.state&&this.Ar(),this.v("audiocontext-state",{audioContextState:this.wh.state})}),this.fh=this.wh.createGain(),this.fh.connect(this.wh.destination);const s=t.listenerPos;this.Fh[0]=s[0],this.Fh[1]=s[1],this.Fh[2]=s[2],this.wh.listener.setPosition(s[0],s[1],s[2]),this.wh.listener.setOrientation(...this.Uh),self.C3_GetAudioContextCurrentTime=()=>this._r();try{await Promise.all(t.preloadList.map(t=>this.Or(t.originalUrl,t.url,t.type,!1)))}catch(t){console.error("[Construct] Preloading sounds failed: ",t)}return{sampleRate:this.wh.sampleRate,audioContextState:this.wh.state,outputLatency:this.wh.outputLatency||0}}Ar(){this.ph||(this.mh=!1,window.addEventListener("pointerup",this.yh,!0),window.addEventListener("touchend",this.yh,!0),window.addEventListener("click",this.yh,!0),window.addEventListener("keydown",this.yh,!0),this.ph=!0)}Ir(){this.ph&&(this.mh=!0,window.removeEventListener("pointerup",this.yh,!0),window.removeEventListener("touchend",this.yh,!0),window.removeEventListener("click",this.yh,!0),window.removeEventListener("keydown",this.yh,!0),this.ph=!1)}gh(){if(!this.mh){const t=this.wh,s=("suspended"===t.state&&t.resume&&t.resume(),t.createBuffer(1,220,22050)),e=t.createBufferSource();e.buffer=s,e.connect(t.destination),e.start(0),"running"===t.state&&this.Ir()}}Rr(s,t){for(const e of t){let t=!1;for(const i of s)if(self.uh.Cr(i,e)){t=!0;break}if(!t)return!1}return!0}kr(){return this.wh}_r(){return this.wh.currentTime}Pr(){return this.fh}["GetAudioContextExtern"](){return this.kr()}["GetDestinationNodeExtern"](){return this.Pr()}Tr(t){const s=this.Hh.get(t.toLowerCase());return s?s[0].Lr():this.Pr()}Mr(t,s){t=t.toLowerCase();let e=this.Hh.get(t);e||(e=[],this.Hh.set(t,e)),s.Er(e.length),s.Dr(t),e.push(s),this.Fr(t)}Fr(t){t=t.toLowerCase();let s=this.Pr();const e=this.Hh.get(t);if(e&&e.length){s=e[0].Lr();for(let t=0,s=e.length;t<s;++t){const i=e[t];t+1===s?i.Ur(this.Pr()):i.Ur(e[t+1].Lr())}}for(const n of this.Gr(t))n.Wr(s);this.zh&&this.qh===t&&(this.zh.disconnect(),this.zh.connect(s))}Hr(){return this.Ch}Br(){return this.an}Nr(){return this.kh}Vr(){return this.Ph}qr(){return this.Th}zr(){return this.Gh}jr(){return this.Lh}$r(){return this.Mh}Kr(){return this.xh}Zr(){return this.Eh}Yr(){return this.Dh}Ne(t){this.h.Ne(t)}Ve(t){this.h.Ve(t)}Jr(e){let i=0;for(let t=0,s=this.Sh.length;t<s;++t){const n=this.Sh[t];(this.Sh[i]=n).Xr()===e?n.et():++i}this.Sh.length=i}Qr(){let e=0;for(let t=0,s=this.bh.length;t<s;++t){const i=this.bh[t];(this.bh[e]=i).so()&&i!==this.Wh?i.et():++e}this.bh.length=e}*eo(t){if(0<t.length)for(const s of this.Sh)this.Rr(s.io(),t)&&(yield s);else this.Ah&&!this.Ah.no()&&(yield this.Ah)}*Gr(t){if(t)for(const s of this.Sh)self.uh.Cr(s.ho(),t)&&(yield s);else this.Ah&&!this.Ah.no()&&(yield this.Ah)}async Or(t,s,e,i,n){for(const r of this.bh)if(r.ro()===s)return i&&this.Gh&&(this.Wh=r),await r.oo(),r;if(n)return null;i&&this.Gh&&this.Qr();const h=self.lo.ao(this,t,s,e,i);return this.bh.push(h),i&&this.Gh&&(this.Wh=h),await h.oo(),this.Oh.has(t)||(this.v("buffer-metadata",{originalUrl:t,duration:h.co()}),this.Oh.add(t)),h}async do(t,s,e,i,n){for(const o of this.Sh)if(o.ro()===s&&(o.uo()||n))return n&&this.Gh&&(this.Wh=o.Xr()),o.wo(i),o;const h=await this.Or(t,s,e,n);if(h.fo())throw new Error(`buffer '${t}' unloaded while loading`);const r=h.mo(i);return this.Sh.push(r),r}po(t){const e=t.join(" ");let i=this.Rh.get(e);if(!i){let s=null;const n=new Promise(t=>s=t);i={yo:0,promise:n,resolve:s},this.Rh.set(e,i)}i.yo++}vo(t){const s=t.join(" "),e=this.Rh.get(s);if(!e)throw new Error("expected pending tag");e.yo--,0===e.yo&&(e.resolve(),this.Rh.delete(s))}bo(t){const s=(0===t.length?this._h:t).join(" "),e=this.Rh.get(s);return e?e.promise:Promise.resolve()}So(){if(0<this.Bh.size)this.D();else for(const t of this.Sh)if(t.Ao())return void this.D()}m(){for(const e of this.Bh)e.m();const t=this._r();for(const i of this.Sh)i.m(t);const s=this.Sh.filter(t=>t.Ao()).map(t=>t._o());this.v("state",{tickCount:this.Ih,outputLatency:this.wh.outputLatency||0,audioInstances:s,analysers:[...this.Bh].map(t=>t.Oo())}),0===s.length&&0===this.Bh.size&&this.U()}Io(t,s,e){this.v("trigger",{type:t,tags:s,aiid:e})}async Yh(t){const s=t.originalUrl,e=t.url,i=t.type,n=t.isMusic,h=t.tags,r=t.isLooping,o=t.vol,a=t.pos,l=t.panning,c=t.stereoPan;let d=t.off;if(0<d&&!t.trueClock)if(this.wh.getOutputTimestamp){const u=this.wh.getOutputTimestamp();d=d-u.performanceTime/1e3+u.contextTime}else d=d-performance.now()/1e3+this.wh.currentTime;this._h=h.slice(0),this.po(h);try{this.Ah=await this.do(s,e,i,h,n),l?(this.Ah.Ro(!0),this.Ah.Co(l.x,l.y,l.z,l.angle,l.innerAngle,l.outerAngle,l.outerGain),l.hasOwnProperty("uid")&&this.Ah.ko(l.uid)):"number"==typeof c&&0!==c?(this.Ah.Po(!0),this.Ah.To(c)):(this.Ah.Ro(!1),this.Ah.Po(!1)),this.Ah.Play(r,o,a,d)}catch(t){return void console.error("[Construct] Audio: error starting playback: ",t)}finally{this.vo(h)}this.D()}Jh(t){const s=t.tags;for(const e of this.eo(s))e.Lo()}Xh(){for(const t of this.Sh)t.Lo()}Qh(t){const s=t.tags,e=t.paused;for(const i of this.eo(s))e?i.Mo():i.xo();this.So()}tr(t){const s=t.tags,e=t.vol;for(const i of this.eo(s))i.Eo(e)}ar(t){const s=t.tags,e=t.p;for(const i of this.eo(s))i.Po(!0),i.To(e)}async sr(t){const s=t.tags,e=t.vol,i=t.duration,n=t.stopOnEnd;await this.bo(s);for(const h of this.eo(s))h.Do(e,i,n);this.So()}er(t){this.Ch=t.vol,this.fh.gain.value=this.Ch}ir(t){const s=t.tags,e=t.isMuted;for(const i of this.eo(s))i.Fo(e)}nr(t){this.an=t.isSilent,this.h.ze(this.an);for(const s of this.Sh)s.Uo()}hr(t){const s=t.tags,e=t.isLooping;for(const i of this.eo(s))i.Go(e)}async rr(t){const s=t.tags,e=t.rate;await this.bo(s);for(const i of this.eo(s))i.Wo(e)}async lr(t){const s=t.tags,e=t.pos;await this.bo(s);for(const i of this.eo(s))i.Ho(e)}async cr(t){const s=t.originalUrl,e=t.url,i=t.type,n=t.isMusic;try{await this.do(s,e,i,"",n)}catch(t){console.error("[Construct] Audio: error preloading: ",t)}}async dr(t){const s=t.url,e=t.type,i=t.isMusic,n=await this.Or("",s,e,i,!0);if(n){n.et(),this.Wh===n&&(this.Wh=null);const h=this.bh.indexOf(n);-1!==h&&this.bh.splice(h,1)}}ur(){for(const t of this.bh)t.et(),this.Wh===t&&(this.Wh=null);this.bh.length=0}wr(t){const s=t.isSuspended;!s&&this.wh.resume&&this.wh.resume();for(const e of this.Sh)e.Bo(s);s&&this.wh.suspend&&this.wh.suspend()}gr(t){if(this.Ph=t.timeScale,this.Th=t.gameTime,this.Ih=t.tickCount,0!==this.kh)for(const i of this.Sh)i.No();const s=t.listenerPos,e=(!s||this.Fh[0]===s[0]&&this.Fh[1]===s[1]&&this.Fh[2]===s[2]||(this.Fh[0]=s[0],this.Fh[1]=s[1],this.Fh[2]=s[2],this.wh.listener.setPosition(s[0],s[1],s[2])),t.listenerOrientation);if(e&&(this.Uh[0]!==e[0]||this.Uh[1]!==e[1]||this.Uh[2]!==e[2]||this.Uh[3]!==e[3]||this.Uh[4]!==e[4]||this.Uh[5]!==e[5])){for(let t=0;t<6;++t)this.Uh[t]=e[t];this.wh.listener.setOrientation(...this.Uh)}for(const n of t.instPans){const h=n.uid;for(const r of this.Sh)r.Vo()===h&&r.qo(n.x,n.y,n.z,n.angle)}}async mr(t){const s=t.type,e=t.hasOwnProperty("tags")?t.tags:[t.tag],i=t.params;let n,h;if("convolution"===s)try{h=await this.Or(t.bufferOriginalUrl,t.bufferUrl,t.bufferType,!1)}catch(t){return void console.log("[Construct] Audio: error loading convolution: ",t)}for(const r of e){if("filter"===s)n=new self.zo(this,...i);else if("delay"===s)n=new self.jo(this,...i);else if("convolution"===s)(n=new self.Ko(this,h.Zo(),...i)).$o(t.bufferOriginalUrl,t.bufferUrl,t.bufferType);else if("flanger"===s)n=new self.Yo(this,...i);else if("phaser"===s)n=new self.Jo(this,...i);else if("gain"===s)n=new self.Xo(this,...i);else if("stereopan"===s)n=new self.Qo(this,...i);else if("tremolo"===s)n=new self.ta(this,...i);else if("ringmod"===s)n=new self.sa(this,...i);else if("distortion"===s)n=new self.ea(this,...i);else if("compressor"===s)n=new self.ia(this,...i);else{if("analyser"!==s)throw new Error("invalid effect type");n=new self.na(this,...i)}this.Mr(r,n)}this.ha()}pr(t){const s=t.tags,e=t.index,i=t.param,n=t.value,h=t.ramp,r=t.time;for(const o of s){const a=this.Hh.get(o.toLowerCase());!a||e<0||e>=a.length||a[e].ra(i,n,h,r)}this.ha()}yr(t){const s=t.tags;for(const e of s){const i=e.toLowerCase(),n=this.Hh.get(i);if(!n||!n.length)return;for(const h of n)h.et();this.Hh.delete(i),this.Fr(i)}}oa(t){this.Bh.add(t),this.So()}aa(t){this.Bh.delete(t)}ha(){this.Nh||(this.Nh=!0,Promise.resolve().then(()=>this.la()))}la(){const t={};for(const[s,e]of this.Hh)t[s]=e.map(t=>t._o());this.v("fxstate",{fxstate:t}),this.Nh=!1}async vr(t){const s=t.saveLoadMode;if(3!==s){const h=[];for(const r of this.Sh)r.so()&&1===s||!r.so()&&2===s?h.push(r):r.et();this.Sh=h}for(const o of this.Hh.values())for(const a of o)a.et();this.Hh.clear(),this.Ph=t.timeScale,this.Th=t.gameTime;const e=t.listenerPos,i=(this.Fh[0]=e[0],this.Fh[1]=e[1],this.Fh[2]=e[2],this.wh.listener.setPosition(e[0],e[1],e[2]),t.listenerOrientation);if(Array.isArray(i)){for(let t=0;t<6;++t)this.Uh[t]=i[t];this.wh.listener.setOrientation(...this.Uh)}this.an=t.isSilent,this.h.ze(this.an),this.Ch=t.masterVolume,this.fh.gain.value=this.Ch;const n=[];for(const l of Object.values(t.effects))n.push(Promise.all(l.map(t=>this.mr(t))));await Promise.all(n),await Promise.all(t.playing.map(t=>this.ca(t,s))),this.So()}async ca(s,e){if(3!==e){const i=s.bufferOriginalUrl,n=s.bufferUrl,h=s.bufferType,r=s.isMusic,o=s.tags,a=s.isLooping,l=s.volume,c=s.playbackTime;if((!r||1!==e)&&(r||2!==e)){let t=null;try{t=await this.do(i,n,h,o,r)}catch(e){return void console.error("[Construct] Audio: error loading audio state: ",e)}t.da(s.pan),t.ua(s.stereoPan),t.Play(a,l,c,0),s.isPlaying||t.Mo(),t.wa(s)}}}jh(t,s){this.zh&&this.zh.disconnect(),this.qh=s.toLowerCase(),this.zh=this.wh.createMediaStreamSource(t),this.zh.connect(this.Tr(this.qh))}Kh(){return this.$h||(this.$h=this.wh.createMediaStreamDestination(),this.fh.connect(this.$h)),this.$h.stream}async br(t){try{const s=t.time,e=this.wh.suspend(s);this.Vh?this.wh.resume():(this.wh.startRendering().then(t=>this.fa(t)).catch(t=>this.ma(t)),this.Vh=!0),await e}catch(t){this.ma(t)}}Sr(){this.wh.resume()}fa(e){const i=[];for(let t=0,s=e.numberOfChannels;t<s;++t){const n=e.getChannelData(t);i.push(n.buffer)}this.h.S("runtime","offline-audio-render-completed",{duration:e.duration,length:e.length,numberOfChannels:e.numberOfChannels,sampleRate:e.sampleRate,channelData:i},null,i)}ma(t){console.error("[Audio] Offline rendering error: ",t)}static Cr(t,s){return t===s||t.normalize().toLowerCase()===s.normalize().toLowerCase()}static pa(t){return t*ug}static ya(t){return Math.pow(10,t/20)}static ga(t){return Math.max(Math.min(self.uh.ya(t),1),0)}static va(t){return Math.log(t)/Math.log(10)*20}static ba(t){return self.uh.va(Math.max(Math.min(t,1),0))}static Sa(t,s){return 1-Math.exp(-s*t)}},self.Qt.Ge(self.uh)}self.lo=class{constructor(t,s,e,i,n){this.Aa=t,this._a=s,this.Oa=e,this.Ia=i,this.Ra=n,this.Ca="",this.ka="not-loaded",this.Pa=null}et(){this.ka="not-loaded",this.Aa=null,this.Pa=null}fo(){return!this.Aa}static ao(t,s,e,i,n){return new(!n||t.zr()?self.Ta:self.La)(t,s,e,i,n)}mo(t){return new("html5"===this.Ca?self.Ma:self.xa)(this.Aa,this,t)}Ea(){}oo(){return this.Pa||(this.Pa=this.Ea()),this.Pa}Da(){}Fa(){}Ua(){return"failed"===this.ka}kr(){return this.Aa.kr()}Ga(){return this.Ca}Wa(){return this._a}ro(){return this.Oa}Ha(){return this.Ia}so(){return this.Ra}co(){}},self.La=class extends self.lo{constructor(t,s,e,i,n){super(t,s,e,i,n),this.Ca="html5",this.Ba=new Audio,this.Ba.crossOrigin="anonymous",this.Ba.autoplay=!1,this.Ba.preload="auto",this.Na=null,this.Va=null,this.qa=!1,this.Ba.addEventListener("canplaythrough",()=>this.qa=!0),this.za=this.kr().createGain(),this.ja=null,this.Ba.addEventListener("canplay",()=>{this.Na&&(this.ka="loaded",this.Na(),this.Na=null,this.Va=null),!this.ja&&this.Ba&&(this.ja=this.kr().createMediaElementSource(this.Ba),this.ja.connect(this.za))}),this.onended=null,this.Ba.addEventListener("ended",()=>{this.onended&&this.onended()}),this.Ba.addEventListener("error",t=>this.$a(t))}et(){this.Aa.Jr(this),this.za.disconnect(),this.za=null,this.ja.disconnect(),this.ja=null,this.Ba&&!this.Ba.paused&&this.Ba.pause(),this.onended=null,this.Ba=null,super.et()}Ea(){return this.ka="loading",new Promise((t,s)=>{this.Na=t,this.Va=s,this.Ba.src=this.Oa})}$a(t){console.error(`[Construct] Audio '${this.Oa}' error: `,t),this.Va&&(this.ka="failed",this.Va(t),this.Na=null,this.Va=null)}Da(){const t=4<=this.Ba.readyState;return t&&(this.qa=!0),t||this.qa}Fa(){return this.Da()}Ka(){return this.Ba}Za(){return this.za}co(){return this.Ba.duration}},self.Ta=class extends self.lo{constructor(t,s,e,i,n){super(t,s,e,i,n),this.Ca="webaudio",this.Ya=null,this.Ja=null}et(){this.Aa.Jr(this),this.Ya=null,this.Ja=null,super.et()}async Xa(){if(this.Ya)return this.Ya;const t=this.Aa.L();if("cordova"===t.js()&&t.Ye(this.Oa)&&t.$s())this.Ya=await t.Te(this.Oa);else if("playable-ad-single-file"===t.js()&&t.Ye(this.Oa)){const s=t._PlayableAdFetchBlob(this.Oa);this.Ya=await s.arrayBuffer()}else{const e=await fetch(this.Oa);if(!e.ok)throw new Error(`error fetching audio data: ${e.status} `+e.statusText);this.Ya=await e.arrayBuffer()}}async Qa(){if(this.Ja)return this.Ja;const t=this.Aa.kr();this.Ja=await t.decodeAudioData(this.Ya),this.Ya=null}async Ea(){try{this.ka="loading",await this.Xa(),this.fo()||(await this.Qa(),this.ka="loaded")}catch(t){this.ka="failed",console.error(`[Construct] Failed to load audio '${this.Oa}': `,t)}}Da(){return!(!this.Ya&&!this.Ja)}Fa(){return!!this.Ja}Zo(){return this.Ja}co(){return this.Ja?this.Ja.duration:0}};{let n=0;self.tl=class{constructor(t,s,e){this.Aa=t,this.sl=s,this.el=e,this.il=n++,this.nl=this.kr().createGain(),this.nl.connect(this.Pr()),this.hl=null,this.rl=!1,this.ol=[0,0,0],this.al=[0,0,0],this.ll=[0,0,0],this.cl=null,this.dl=!1,this.ul=0,this.wl=!0,this.fl=!1,this.ml=!1,this.pl=!1,this.yl=1,this.gl=!1,this.vl=1;const i=this.Aa.Nr();this.bl=1===i&&!this.so()||2===i,this.Sl=-1,this.Al=-1,this._l=!1}et(){this.Aa=null,this.sl=null,this.hl&&(this.hl.disconnect(),this.hl=null),this.cl&&(this.cl.disconnect(),this.cl=null),this.nl.disconnect(),this.nl=null}kr(){return this.Aa.kr()}wo(t){this.el=t}io(){return this.el}ho(){return 0<this.el.length?this.el[0]:""}Pr(){return this.Aa.Tr(this.ho())}Ol(){return this.bl?this.Aa.qr():performance.now()/1e3}Wa(){return this.sl.Wa()}ro(){return this.sl.ro()}Ha(){return this.sl.Ha()}Xr(){return this.sl}so(){return this.sl.so()}Il(){return this.il}no(){}uo(){}IsPlaying(){return!this.wl&&!this.fl&&!this.no()}Ao(){return!this.wl&&!this.no()}Rl(){}co(t){let s=this.sl.co();return t&&(s/=this.vl||.001),s}Play(t,s,e,i){}Lo(){}Mo(){}Cl(){return this.fl}xo(){}Eo(t){this.yl=t,this.nl.gain.cancelScheduledValues(0),this.Al=-1,this.nl.gain.value=this.kl()}Do(t,s,e){if(!this.Pl()){const i=this.nl.gain,n=(i.cancelScheduledValues(0),this.Aa._r()),h=n+s;i.setValueAtTime(i.value,n),i.linearRampToValueAtTime(t,h),this.yl=t,this.Al=h,this._l=e}}Tl(){this.Eo(this.yl)}m(t){-1!==this.Al&&t>=this.Al&&(this.Al=-1,this._l&&this.Lo(),this.Aa.Io("fade-ended",this.el,this.il))}kl(){const t=this.yl;return isFinite(t)?t:0}Fo(t){this.gl!==(t=!!t)&&(this.gl=t,this.Uo())}Pl(){return this.gl}Br(){return this.Aa.Br()}Uo(){}Go(t){}Ll(){return this.pl}Wo(t){this.vl!==t&&(this.vl=t,this.No())}No(){}Ml(){return this.vl}Ho(t){}Bo(t){}Ro(t){this.rl!==(t=!!t)&&(this.rl=t,(this.rl?(this.Po(!1),this.hl||(this.hl=this.kr().createPanner(),this.hl.panningModel=this.Aa.jr(),this.hl.distanceModel=this.Aa.$r(),this.hl.refDistance=this.Aa.Kr(),this.hl.maxDistance=this.Aa.Zr(),this.hl.rolloffFactor=this.Aa.Yr()),this.nl.disconnect(),this.nl.connect(this.hl),this.hl):(this.hl.disconnect(),this.nl.disconnect(),this.nl)).connect(this.Pr()))}Co(t,s,e,i,n,h,r){if(this.rl){this.qo(t,s,e,i);const o=self.uh.pa;this.ll[0]!==o(n)&&(this.ll[0]=o(n),this.hl.coneInnerAngle=o(n)),this.ll[1]!==o(h)&&(this.ll[1]=o(h),this.hl.coneOuterAngle=o(h)),this.ll[2]!==r&&(this.ll[2]=r,this.hl.coneOuterGain=r)}}qo(t,s,e,i){if(this.rl){const n=this.ol,h=this.al,r=Math.cos(i),o=Math.sin(i);n[0]===t&&n[1]===s&&n[2]===e||(n[0]=t,n[1]=s,n[2]=e,this.hl.setPosition(...n)),h[0]===r&&h[1]===o&&0===h[2]||(h[0]=r,h[1]=o,h[2]=0,this.hl.setOrientation(...h))}}Po(t){this.dl!==(t=!!t)&&(this.dl=t,(this.dl?(this.Ro(!1),this.cl=this.kr().createStereoPanner(),this.nl.disconnect(),this.nl.connect(this.cl),this.cl):(this.cl.disconnect(),this.cl=null,this.nl.disconnect(),this.nl)).connect(this.Pr()))}To(t){this.dl&&this.ul!==t&&(this.cl.pan.value=t,this.ul=t)}ko(t){this.Sl=t}Vo(){return this.Sl}xl(){}Wr(t){const s=this.cl||this.hl||this.nl;s.disconnect(),s.connect(t)}_o(){return{aiid:this.Il(),tags:this.el,duration:this.co(),volume:-1===this.Al?this.yl:this.nl.gain.value,isPlaying:this.IsPlaying(),playbackTime:this.Rl(),playbackRate:this.Ml(),uid:this.Sl,bufferOriginalUrl:this.Wa(),bufferUrl:"",bufferType:this.Ha(),isMusic:this.so(),isLooping:this.Ll(),isMuted:this.Pl(),resumePosition:this.xl(),pan:this.El(),stereoPan:this.Dl()}}wa(t){this.Wo(t.playbackRate),this.Fo(t.isMuted)}El(){if(!this.hl)return null;const t=this.hl;return{pos:this.ol,orient:this.al,cia:t.coneInnerAngle,coa:t.coneOuterAngle,cog:t.coneOuterGain,uid:this.Sl}}da(t){if(t){this.Ro(!0);const s=this.hl,e=t.pos,i=(this.ol[0]=e[0],this.ol[1]=e[1],this.ol[2]=e[2],t.orient);this.al[0]=i[0],this.al[1]=i[1],this.al[2]=i[2],s.setPosition(...this.ol),s.setOrientation(...this.al),this.ll[0]=t.cia,this.ll[1]=t.coa,this.ll[2]=t.cog,s.coneInnerAngle=t.cia,s.coneOuterAngle=t.coa,s.coneOuterGain=t.cog,this.Sl=t.uid}else this.Ro(!1)}Dl(){return this.cl?this.ul:null}ua(t){"number"!=typeof t?this.Po(!1):(this.Po(!0),this.To(t))}}}self.Ma=class extends self.tl{constructor(t,s,e){super(t,s,e),this.sl.Za().connect(this.nl),this.sl.onended=()=>this.Fl()}et(){this.Lo(),this.sl.Za().disconnect(),super.et()}Ka(){return this.sl.Ka()}Fl(){this.wl=!0,this.Sl=-1,this.Aa.Io("ended",this.el,this.il)}no(){return this.Ka().ended}uo(){return!!this.wl||this.no()}Rl(){let t=this.Ka().currentTime;return this.pl?t:Math.min(t,this.co())}Play(t,s,e,i){const n=this.Ka();if(1!==n.playbackRate&&(n.playbackRate=1),n.loop!==t&&(n.loop=t),this.Eo(s),this.gl=!1,n.muted&&(n.muted=!1),n.currentTime!==e)try{n.currentTime=e}catch(t){console.warn(`[Construct] Exception seeking audio '${this.sl.ro()}' to position '${e}': `,t)}this.Aa.Ne(n),this.wl=!1,this.fl=!1,this.pl=t,this.vl=1}Lo(){const t=this.Ka();t.paused||t.pause(),this.Aa.Ve(t),this.wl=!0,this.fl=!1,this.Sl=-1}Mo(){if(!(this.fl||this.wl||this.no())){const t=this.Ka();t.paused||t.pause(),this.Aa.Ve(t),this.fl=!0}}xo(){!this.fl||this.wl||this.no()||(this.Aa.Ne(this.Ka()),this.fl=!1)}Uo(){this.Ka().muted=this.gl||this.Br()}Go(t){this.pl!==(t=!!t)&&(this.pl=t,this.Ka().loop=t)}No(){let s=this.vl;this.bl&&(s*=this.Aa.Vr());try{this.Ka().playbackRate=s}catch(t){console.warn(`[Construct] Unable to set playback rate '${s}':`,t)}}Ho(s){if(!this.wl&&!this.no())try{this.Ka().currentTime=s}catch(t){console.warn(`[Construct] Error seeking audio to '${s}': `,t)}}xl(){return this.Rl()}Bo(t){t?this.IsPlaying()?(this.Ka().pause(),this.ml=!0):this.ml=!1:this.ml&&(this.Aa.Ne(this.Ka()),this.ml=!1)}},self.xa=class extends self.tl{constructor(t,s,e){super(t,s,e),this.Ul=null,this.Gl=t=>this.Fl(t),this.Wl=!0,this.Hl=null,this.Bl=0,this.Nl=0,this.Vl=0,this.ql=1}et(){this.Lo(),this.zl(),this.Gl=null,super.et()}zl(){this.Ul&&(this.Ul.onended=null,this.Ul.disconnect(),this.Ul.buffer=null),this.Ul=null,this.Hl=null}Fl(t){this.fl||this.ml||t.target===this.Hl&&(this.Wl=!0,this.wl=!0,this.Sl=-1,this.zl(),this.Aa.Io("ended",this.el,this.il))}no(){return!(!this.wl&&this.Ul&&this.Ul.loop||this.fl)&&this.Wl}uo(){return!(this.Ul&&!this.wl)||this.no()}Rl(){let t=0;return t=this.fl?this.Vl:this.Nl+(this.Ol()-this.Bl)*this.vl,this.pl?t:Math.min(t,this.co())}Play(t,s,e,i){this.gl=!1,this.ql=1,this.Eo(s),this.zl(),this.Ul=this.kr().createBufferSource(),this.Ul.buffer=this.sl.Zo(),this.Ul.connect(this.nl),this.Hl=this.Ul,this.Ul.onended=this.Gl,this.Ul.loop=t,this.Ul.start(i,e),this.Wl=!1,this.wl=!1,this.fl=!1,this.pl=t,this.vl=1,this.Bl=this.Ol(),this.Nl=e}Lo(){if(this.Ul)try{this.Ul.stop(0)}catch(t){}this.wl=!0,this.fl=!1,this.Sl=-1}Mo(){this.fl||this.wl||this.no()||(this.Vl=this.Rl(),this.pl&&(this.Vl%=this.co()),this.fl=!0,this.Ul.stop(0))}xo(){!this.fl||this.wl||this.no()||(this.zl(),this.Ul=this.kr().createBufferSource(),this.Ul.buffer=this.sl.Zo(),this.Ul.connect(this.nl),this.Hl=this.Ul,this.Ul.onended=this.Gl,this.Ul.loop=this.pl,this.Tl(),this.No(),this.Ul.start(0,this.Vl),this.Bl=this.Ol(),this.Nl=this.Vl,this.fl=!1)}kl(){return super.kl()*this.ql}Uo(){this.ql=this.gl||this.Br()?0:1,this.Tl()}Go(t){this.pl!==(t=!!t)&&(this.pl=t,this.Ul)&&(this.Ul.loop=t)}No(){let t=this.vl;this.bl&&(t*=this.Aa.Vr()),this.Ul&&(this.Ul.playbackRate.value=t)}Ho(t){this.wl||this.no()||(this.fl?this.Vl=t:(this.Mo(),this.Vl=t,this.xo()))}xl(){return this.Vl}Bo(t){t?this.IsPlaying()?(this.ml=!0,this.Vl=this.Rl(),this.pl&&(this.Vl%=this.co()),this.Ul.stop(0)):this.ml=!1:this.ml&&(this.zl(),this.Ul=this.kr().createBufferSource(),this.Ul.buffer=this.sl.Zo(),this.Ul.connect(this.nl),this.Hl=this.Ul,this.Ul.onended=this.Gl,this.Ul.loop=this.pl,this.Tl(),this.No(),this.Ul.start(0,this.Vl),this.Bl=this.Ol(),this.Nl=this.Vl,this.ml=!1)}wa(t){super.wa(t),this.Vl=t.resumePosition}};{class p9{constructor(t){this.Aa=t,this.wh=t.kr(),this.jl=-1,this.$l="",this.Ia="",this.Kl=null}et(){this.wh=null}Er(t){this.jl=t}Zl(){return this.jl}Dr(t){this.$l=t}Yl(){return this.$l}Jl(){return this.wh.createGain()}Lr(){}Ur(t){}Xl(t,s,e,i){if(t.cancelScheduledValues(0),0===i)t.value=s;else{const n=this.wh.currentTime;switch(i+=n,e){case 0:t.setValueAtTime(s,i);break;case 1:t.setValueAtTime(t.value,n),t.linearRampToValueAtTime(s,i);break;case 2:t.setValueAtTime(t.value,n),t.exponentialRampToValueAtTime(s,i)}}}_o(){return{type:this.Ia,tag:this.$l,params:this.Kl}}}self.zo=class extends p9{constructor(t,s,e,i,n,h,r){super(t),this.Ia="filter",this.Kl=[s,e,i,n,h,r],this.Ql=this.Jl(),this.tc=this.Jl(),this.tc.gain.value=r,this.sc=this.Jl(),this.sc.gain.value=1-r,this.ec=this.wh.createBiquadFilter(),this.ec.type=s,this.ec.frequency.value=e,this.ec.detune.value=i,this.ec.Q.value=n,this.ec.gain.vlaue=h,this.Ql.connect(this.ec),this.Ql.connect(this.sc),this.ec.connect(this.tc)}et(){this.Ql.disconnect(),this.ec.disconnect(),this.tc.disconnect(),this.sc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[5]=s,this.Xl(this.tc.gain,s,e,i),this.Xl(this.sc.gain,1-s,e,i);break;case 1:this.Kl[1]=s,this.Xl(this.ec.frequency,s,e,i);break;case 2:this.Kl[2]=s,this.Xl(this.ec.detune,s,e,i);break;case 3:this.Kl[3]=s,this.Xl(this.ec.Q,s,e,i);break;case 4:this.Kl[4]=s,this.Xl(this.ec.gain,s,e,i)}}},self.jo=class extends p9{constructor(t,s,e,i){super(t),this.Ia="delay",this.Kl=[s,e,i],this.Ql=this.Jl(),this.tc=this.Jl(),this.tc.gain.value=i,this.sc=this.Jl(),this.sc.gain.value=1-i,this.ic=this.Jl(),this.nc=this.wh.createDelay(s),this.nc.delayTime.value=s,this.hc=this.Jl(),this.hc.gain.value=e,this.Ql.connect(this.ic),this.Ql.connect(this.sc),this.ic.connect(this.tc),this.ic.connect(this.nc),this.nc.connect(this.hc),this.hc.connect(this.ic)}et(){this.Ql.disconnect(),this.tc.disconnect(),this.sc.disconnect(),this.ic.disconnect(),this.nc.disconnect(),this.hc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){const n=self.uh.ga;switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[2]=s,this.Xl(this.tc.gain,s,e,i),this.Xl(this.sc.gain,1-s,e,i);break;case 4:this.Kl[1]=n(s),this.Xl(this.hc.gain,n(s),e,i);break;case 5:this.Kl[0]=s,this.Xl(this.nc.delayTime,s,e,i)}}},self.Ko=class extends p9{constructor(t,s,e,i){super(t),this.Ia="convolution",this.Kl=[e,i],this.rc="",this.oc="",this.ac="",this.Ql=this.Jl(),this.tc=this.Jl(),this.tc.gain.value=i,this.sc=this.Jl(),this.sc.gain.value=1-i,this.lc=this.wh.createConvolver(),this.lc.normalize=e,this.lc.buffer=s,this.Ql.connect(this.lc),this.Ql.connect(this.sc),this.lc.connect(this.tc)}et(){this.Ql.disconnect(),this.lc.disconnect(),this.tc.disconnect(),this.sc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){0===t&&(s=Math.max(Math.min(s/100,1),0),this.Kl[1]=s,this.Xl(this.tc.gain,s,e,i),this.Xl(this.sc.gain,1-s,e,i))}$o(t,s,e){this.rc=t,this.oc=s,this.ac=e}_o(){const t=super._o();return t.bufferOriginalUrl=this.rc,t.bufferUrl="",t.bufferType=this.ac,t}},self.Yo=class extends p9{constructor(t,s,e,i,n,h){super(t),this.Ia="flanger",this.Kl=[s,e,i,n,h],this.Ql=this.Jl(),this.sc=this.Jl(),this.sc.gain.value=1-h/2,this.tc=this.Jl(),this.tc.gain.value=h/2,this.cc=this.Jl(),this.cc.gain.value=n,this.nc=this.wh.createDelay(s+e),this.nc.delayTime.value=s,this.dc=this.wh.createOscillator(),this.dc.frequency.value=i,this.uc=this.Jl(),this.uc.gain.value=e,this.Ql.connect(this.nc),this.Ql.connect(this.sc),this.nc.connect(this.tc),this.nc.connect(this.cc),this.cc.connect(this.nc),this.dc.connect(this.uc),this.uc.connect(this.nc.delayTime),this.dc.start(0)}et(){this.dc.stop(0),this.Ql.disconnect(),this.nc.disconnect(),this.dc.disconnect(),this.uc.disconnect(),this.sc.disconnect(),this.tc.disconnect(),this.cc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[4]=s,this.Xl(this.tc.gain,s/2,e,i),this.Xl(this.sc.gain,1-s/2,e,i);break;case 6:this.Kl[1]=s/1e3,this.Xl(this.uc.gain,s/1e3,e,i);break;case 7:this.Kl[2]=s,this.Xl(this.dc.frequency,s,e,i);break;case 8:this.Kl[3]=s/100,this.Xl(this.cc.gain,s/100,e,i)}}},self.Jo=class extends p9{constructor(t,s,e,i,n,h,r){super(t),this.Ia="phaser",this.Kl=[s,e,i,n,h,r],this.Ql=this.Jl(),this.sc=this.Jl(),this.sc.gain.value=1-r/2,this.tc=this.Jl(),this.tc.gain.value=r/2,this.ec=this.wh.createBiquadFilter(),this.ec.type="allpass",this.ec.frequency.value=s,this.ec.detune.value=e,this.ec.Q.value=i,this.dc=this.wh.createOscillator(),this.dc.frequency.value=h,this.uc=this.Jl(),this.uc.gain.value=n,this.Ql.connect(this.ec),this.Ql.connect(this.sc),this.ec.connect(this.tc),this.dc.connect(this.uc),this.uc.connect(this.ec.frequency),this.dc.start(0)}et(){this.dc.stop(0),this.Ql.disconnect(),this.ec.disconnect(),this.dc.disconnect(),this.uc.disconnect(),this.sc.disconnect(),this.tc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[5]=s,this.Xl(this.tc.gain,s/2,e,i),this.Xl(this.sc.gain,1-s/2,e,i);break;case 1:this.Kl[0]=s,this.Xl(this.ec.frequency,s,e,i);break;case 2:this.Kl[1]=s,this.Xl(this.ec.detune,s,e,i);break;case 3:this.Kl[2]=s,this.Xl(this.ec.Q,s,e,i);break;case 6:this.Kl[3]=s,this.Xl(this.uc.gain,s,e,i);break;case 7:this.Kl[4]=s,this.Xl(this.dc.frequency,s,e,i)}}},self.Xo=class extends p9{constructor(t,s){super(t),this.Ia="gain",this.Kl=[s],this.wc=this.Jl(),this.wc.gain.value=s}et(){this.wc.disconnect(),super.et()}Ur(t){this.wc.disconnect(),this.wc.connect(t)}Lr(){return this.wc}ra(t,s,e,i){const n=self.uh.ga;4===t&&(this.Kl[0]=n(s),this.Xl(this.wc.gain,n(s),e,i))}},self.Qo=class extends p9{constructor(t,s){super(t),this.Ia="stereopan",this.Kl=[s],this.wc=this.wh.createStereoPanner(),this.wc.pan.value=s}et(){this.wc.disconnect(),super.et()}Ur(t){this.wc.disconnect(),this.wc.connect(t)}Lr(){return this.wc}ra(t,s,e,i){s=Math.min(Math.max(s/100,-1),1),9===t&&(this.Kl[0]=s,this.Xl(this.wc.pan,s,e,i))}},self.ta=class extends p9{constructor(t,s,e){super(t),this.Ia="tremolo",this.Kl=[s,e],this.wc=this.Jl(),this.wc.gain.value=1-e/2,this.dc=this.wh.createOscillator(),this.dc.frequency.value=s,this.uc=this.Jl(),this.uc.gain.value=e/2,this.dc.connect(this.uc),this.uc.connect(this.wc.gain),this.dc.start(0)}et(){this.dc.stop(0),this.dc.disconnect(),this.uc.disconnect(),this.wc.disconnect(),super.et()}Ur(t){this.wc.disconnect(),this.wc.connect(t)}Lr(){return this.wc}ra(t,s,e,i){switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[1]=s,this.Xl(this.wc.gain,1-s/2,e,i),this.Xl(this.uc.gain,s/2,e,i);break;case 7:this.Kl[0]=s,this.Xl(this.dc.frequency,s,e,i)}}},self.sa=class extends p9{constructor(t,s,e){super(t),this.Ia="ringmod",this.Kl=[s,e],this.Ql=this.Jl(),this.tc=this.Jl(),this.tc.gain.value=e,this.sc=this.Jl(),this.sc.gain.value=1-e,this.fc=this.Jl(),this.fc.gain.value=0,this.dc=this.wh.createOscillator(),this.dc.frequency.value=s,this.dc.connect(this.fc.gain),this.dc.start(0),this.Ql.connect(this.fc),this.Ql.connect(this.sc),this.fc.connect(this.tc)}et(){this.dc.stop(0),this.dc.disconnect(),this.fc.disconnect(),this.Ql.disconnect(),this.tc.disconnect(),this.sc.disconnect(),super.et()}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){switch(t){case 0:s=Math.max(Math.min(s/100,1),0),this.Kl[1]=s,this.Xl(this.tc.gain,s,e,i),this.Xl(this.sc.gain,1-s,e,i);break;case 7:this.Kl[0]=s,this.Xl(this.dc.frequency,s,e,i)}}},self.ea=class extends p9{constructor(t,s,e,i,n,h){super(t),this.Ia="distortion",this.Kl=[s,e,i,n,h],this.Ql=this.Jl(),this.mc=this.Jl(),this.yc=this.Jl(),this.vc(i,n),this.tc=this.Jl(),this.tc.gain.value=h,this.sc=this.Jl(),this.sc.gain.value=1-h,this.bc=this.wh.createWaveShaper(),this.Sc=new Float32Array(65536),this.Ac(s,e),this.bc.curve=this.Sc,this.Ql.connect(this.mc),this.Ql.connect(this.sc),this.mc.connect(this.bc),this.bc.connect(this.yc),this.yc.connect(this.tc)}et(){this.Ql.disconnect(),this.mc.disconnect(),this.bc.disconnect(),this.yc.disconnect(),this.tc.disconnect(),this.sc.disconnect(),super.et()}vc(t,s){this.mc.gain.value=t=t<.01?.01:t,this.yc.gain.value=Math.pow(1/t,.6)*s}Ac(e,i){const n=32768;for(let s=0;s<n;++s){let t=s/n;t=this._c(t,e,i),this.Sc[n+s]=t,this.Sc[n-s-1]=-t}}_c(t,s,e){const i=1.05*e*s,n=i-s,h=t<0?-1:1,r=t<0?-t:t;let o=r<s?r:s+n*self.uh.Sa(r-s,1/n);return o*h}Ur(t){this.tc.disconnect(),this.tc.connect(t),this.sc.disconnect(),this.sc.connect(t)}Lr(){return this.Ql}ra(t,s,e,i){0===t&&(s=Math.max(Math.min(s/100,1),0),this.Kl[4]=s,this.Xl(this.tc.gain,s,e,i),this.Xl(this.sc.gain,1-s,e,i))}},self.ia=class extends p9{constructor(t,s,e,i,n,h){super(t),this.Ia="compressor",this.Kl=[s,e,i,n,h],this.wc=this.wh.createDynamicsCompressor(),this.wc.threshold.value=s,this.wc.knee.value=e,this.wc.ratio.value=i,this.wc.attack.value=n,this.wc.release.value=h}et(){this.wc.disconnect(),super.et()}Ur(t){this.wc.disconnect(),this.wc.connect(t)}Lr(){return this.wc}ra(t,s,e,i){}},self.na=class extends p9{constructor(t,s,e){super(t),this.Ia="analyser",this.Kl=[s,e],this.wc=this.wh.createAnalyser(),this.wc.fftSize=s,this.wc.smoothingTimeConstant=e,this.Oc=new Float32Array(this.wc.frequencyBinCount),this.Ic=new Uint8Array(s),this.Rc=0,this.Cc=0,this.Aa.oa(this)}et(){this.Aa.aa(this),this.wc.disconnect(),super.et()}m(){this.wc.getFloatFrequencyData(this.Oc),this.wc.getByteTimeDomainData(this.Ic);const t=this.wc.fftSize;let e=this.Rc=0;for(let s=0;s<t;++s){let t=(this.Ic[s]-128)/128;t<0&&(t=-t),this.Rc<t&&(this.Rc=t),e+=t*t}const s=self.uh.ba;this.Rc=s(this.Rc),this.Cc=s(Math.sqrt(e/t))}Ur(t){this.wc.disconnect(),this.wc.connect(t)}Lr(){return this.wc}ra(t,s,e,i){}Oo(){return{tag:this.Yl(),index:this.Zl(),peak:this.Rc,rms:this.Cc,binCount:this.wc.frequencyBinCount,freqBins:this.Oc}}}}{const cm={};let o=null,t=null;const fm={banner:"ca-app-pub-3940256099942544/2934735716",interstitial:"ca-app-pub-3940256099942544/4411468910",rewarded:"ca-app-pub-3940256099942544/1712485313",rewardedInterstitial:"ca-app-pub-3940256099942544/6978759866"},gm=5e3;let i=!1;function Success(t,s){t(null,s)}function Failure(t,s){t(s,null)}function UpdateAdmobPlusRequest(t,s){cm[t]=s,self.admob.configRequest(cm)}async function StartAdmobPlus(i,n){return n=void 0!==n?n:o.debug,t=t||new Promise((e,t)=>{document.addEventListener("deviceready",async()=>{try{const t=setTimeout(()=>{e(!1),Failure(i,"failure to initialize")},gm);if(await self.admob.start(),clearTimeout(t),n){const s=await TestId();UpdateAdmobPlusRequest("testDeviceIds",[s])}e(!0)}catch(t){e(!1),Failure(i,"Initialization failure")}})})}function HasInitConfigurationOptions(){return!!o}function SetInitConfigureOptions(t,s,e,i,n,h,r){o||(o={id:t,kc:s,Pc:e,Tc:i,Lc:n,debug:h,Mc:r},Object.freeze(o))}async function TestId(){if("android"===self.cordova.platformId)return self.xc(self.device.uuid).toUpperCase();if("ios"===self.cordova.platformId){const t=self.cordova.plugins.idfa,s=await t.getInfo();if(!s.trackingLimited)return i=!0,self.xc(s.idfa).toUpperCase()}}function GetAdUnit(t,s){if("android"===self.cordova.platformId)return t;if("ios"===self.cordova.platformId){const e=!!fm[s];return o.debug&&!i&&e?(console.log("[C3 advert]","USING TEST AD UNITS"),fm[s]):t}}self.Ec={Dc:Success,Fc:Failure,Uc:StartAdmobPlus,Gc:UpdateAdmobPlusRequest,Wc:SetInitConfigureOptions,Hc:HasInitConfigurationOptions,Bc:GetAdUnit,get Nc(){return o},get Vc(){return TestId()}}}{const Hm=self.Ec,Im=Hm.Dc,Jm=Hm.Fc,Km=0,Lm=1,Mm=2,Nm=3,Om=4,Pm=5,Qm={get qc(){return self.admob.Events.adLoad},get zc(){return self.admob.Events.adLoadFail}};class Rm{constructor(t,s,e,i,n,h){if(!t)return Jm(h,"Unit ID not specified");if(!s)return Jm(h,"Ad size not specified");if(!e)return Jm(h,"Ad position not specified");switch(this.jc=t,this.$c=e,this.Kc="",this.Zc=i,this.Yc=!!n,s){case"portrait":case"landscape":this.Kc=Pm;break;case"standard":this.Kc=Km;break;case"large":this.Kc=Lm;break;case"medium":this.Kc=Mm;break;case"full":this.Kc=Nm;break;case"leaderboard":this.Kc=Om;break;default:this.Kc=Pm}this.Jc=null,this.Xc=!1,this.Qc=!1,this.td=null,this.sd=null,this.ed=null}et(){this.td&&this.td(),this.td=null,this.sd=null,this.ed=null,this.Jc=null}oo(t,s){if(this.Jc)return Im(s,"banner ad loaded");_AddLoadListeners.call(this,s);const e={adUnitId:Hm.Bc(this.jc,"banner"),size:this.Kc,position:this.$c,npa:"NON_PERSONALIZED"===t?"1":"0"};this.Yc&&(e.offset=this.Zc),this.Jc=new self.admob.BannerAd(e),this.sd=new Promise(t=>this.ed=t),this.Jc.load()}async nd(t){return this.Jc?this.Xc?Jm(t,"banner ad still loading"):this.Qc?Im(t,"banner ad already shown"):(await this.Jc.show(),this.Qc=!0,Im(t,"banner shown"),void(this.Yc||self.C3MobileAdvertsAPI.real.forceResize())):Jm(t,"banner ad not created")}async hd(t){return this.Jc?this.Xc?Jm(t,"banner ad still loading"):this.Qc?(await this.Jc.hide(),this.Qc=!1,Im(t,"banner ad hidden"),void(this.Yc||self.C3MobileAdvertsAPI.real.forceResize())):Im(t,"banner ad not being shown"):Jm(t,"banner ad not created")}rd(){return this.Xc}od(){return this.Qc}ad(){return this.sd}}function _AddLoadListeners(s){const e=t=>{t.ad===this.Jc&&(this.Xc=!1,Im(s,"banner ad loaded"),document.removeEventListener(Qm.qc,e),document.removeEventListener(Qm.zc,i),this.ed)&&this.ed()},i=t=>{t.ad===this.Jc&&(this.Jc=null,this.Xc=!1,Jm(s,"banner ad failed to load"),document.removeEventListener(Qm.qc,e),document.removeEventListener(Qm.zc,i),this.ed)&&this.ed()};this.td=()=>{document.removeEventListener(Qm.qc,e),document.removeEventListener(Qm.zc,i),document.removeEventListener(Qm.qc,e),document.removeEventListener(Qm.zc,i)},document.addEventListener(Qm.qc,e),document.addEventListener(Qm.zc,i)}self.ld=Rm}{const hn=self.Ec,jn=hn.Dc,kn=hn.Fc,ln={get qc(){return self.admob.Events.adLoad},get zc(){return self.admob.Events.adLoadFail},get dd(){return self.admob.Events.adShow},get ud(){return self.admob.Events.adShowFail},get wd(){return self.admob.Events.adDismiss}};class mn{constructor(t,s){if(!t)return kn(s,"Unit ID not specified");this.jc=t,this.Jc=null,this.Xc=!1,this.Qc=!1,this.fd=!1,this.md=null,this.Pa=this.pd(),document.addEventListener(ln.wd,async t=>{this.Qc=!1,this.Xc=!0,this.fd=!1,this.Pa=null,this.Pa=this.pd(),_AddLoadListeners.call(this),self.C3MobileAdvertsAPI.real.resumeRuntime(),await this.Jc.load()})}pd(){return this.Pa||(this.Pa=new Promise(t=>{this.md=t})),this.Pa}yd(t){this.fd=t,this.md&&this.md(t),this.Pa=null,this.md=null,this.Pa=this.pd()}oo(t,s){const e={adUnitId:hn.Bc(this.jc,"interstitial"),npa:"NON_PERSONALIZED"===t?"1":"0"};this.Xc=!0,this.Qc=!1,this.fd=!1,this.Pa=null,this.Pa=this.pd(),this.Jc=new self.admob.InterstitialAd(e),_AddLoadListeners.call(this,s),this.Jc.load()}gd(t,s){t?hn.Dc(s,"interstitial ad load"):hn.Fc(s,"interstitial ad failed to load")}async nd(t){if(!this.Jc)return kn(t,"interstitial ad not created");if(this.Qc)return jn(t,"interstitial ad already shown");this.Xc&&await this.pd(),this.fd||(_AddLoadListeners.call(this),this.fd=!1,this.Pa=null,this.Jc.load(),await this.pd(),this.fd)?(_AddShowListeners.call(this,t),await this.Jc.show()):kn(t,"interstitial ad failed to load")}rd(){return this.Xc}od(){return this.Qc}}function _AddLoadListeners(s){const e=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!0),s&&jn(s,"interstitial ad load"),document.removeEventListener(ln.qc,e),document.removeEventListener(ln.zc,i))},i=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!1),s&&kn(s,"interstitial ad failed to load"),document.removeEventListener(ln.qc,e),document.removeEventListener(ln.zc,i))};document.addEventListener(ln.qc,e),document.addEventListener(ln.zc,i)}function _AddShowListeners(s){const e=t=>{t.ad===this.Jc&&(this.Qc=!0,self.C3MobileAdvertsAPI.real.suspendRuntime(),s&&jn(s,"interstitial ad show"),document.removeEventListener(ln.dd,e),document.removeEventListener(ln.ud,i))},i=t=>{t.ad===this.Jc&&(this.Qc=!1,s&&kn(s,"interstitial ad failed to show"),document.removeEventListener(ln.dd,e),document.removeEventListener(ln.ud,i))};document.addEventListener(ln.dd,e),document.addEventListener(ln.ud,i)}self.vd=mn}{const Jn=self.Ec,Kn=Jn.Dc,Ln=Jn.Fc,Mn={get qc(){return self.admob.Events.adLoad},get zc(){return self.admob.Events.adLoadFail},get dd(){return self.admob.Events.adShow},get ud(){return self.admob.Events.adShowFail},get wd(){return self.admob.Events.adDismiss},get bd(){return self.admob.Events.adReward}};class Nn{constructor(t,s){if(!t)return Ln(s,"Unit ID not specified");this.jc=t,this.Jc=null,this.Xc=!1,this.Qc=!1,this.fd=!1,this.md=null,this.Pa=this.pd(),this.Sd=null}pd(){return this.Pa||(this.Pa=new Promise(t=>{this.md=t})),this.Pa}yd(t){this.fd=t,this.md&&this.md(t),this.Pa=null,this.md=null,this.Pa=this.pd()}oo(t,s){const e={adUnitId:Jn.Bc(this.jc,"rewarded"),npa:"NON_PERSONALIZED"===t?"1":"0"};this.Xc=!0,this.Qc=!1,this.fd=!1,this.Pa=null,this.Pa=this.pd(),this.Jc=new self.admob.RewardedAd(e),_AddLoadListeners.call(this,s),this.Jc.load()}gd(t,s){t?Jn.Dc(s,"rewarded ad load"):Jn.Fc(s,"rewarded ad failed to load")}async nd(t){if(!this.Jc)return Ln(t,"rewarded ad not created");if(this.Qc)return Kn(t,"rewarded ad already shown");this.Xc&&await this.pd(),this.fd||(_AddLoadListeners.call(this),this.fd=!1,this.Pa=null,this.Jc.load(),await this.pd(),this.fd)?(_AddShowListeners.call(this,t),await this.Jc.show()):Ln(t,"rewarded ad failed to load")}rd(){return this.Xc}od(){return this.Qc}}function _AddLoadListeners(s){const e=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!0),s&&Kn(s,"rewarded ad load"),document.removeEventListener(Mn.qc,e),document.removeEventListener(Mn.zc,i))},i=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!1),s&&Ln(s,"rewarded ad failed to load"),document.removeEventListener(Mn.qc,e),document.removeEventListener(Mn.zc,i))};document.addEventListener(Mn.qc,e),document.addEventListener(Mn.zc,i)}function _AddShowListeners(i){const n=t=>{t.ad===this.Jc&&(this.Qc=!0,self.C3MobileAdvertsAPI.real.suspendRuntime())},h=t=>{t.ad===this.Jc&&(this.Sd=t.reward)},r=t=>{t.ad===this.Jc&&(this.Qc=!1,i&&Ln(i,"rewarded ad failed to show"),document.removeEventListener(Mn.dd,n),document.removeEventListener(Mn.ud,r),document.removeEventListener(Mn.bd,h),document.removeEventListener(Mn.wd,o))},o=t=>{if(t.ad===this.Jc){if(null!==this.Sd){const s=String(this.Sd.type),e=String(this.Sd.amount);i&&Kn(i,JSON.stringify([s,e]))}else i&&Ln(i,"closed with no reward");this.Sd=null,this.Qc=!1,this.Xc=!0,this.fd=!1,this.Pa=null,this.Pa=this.pd(),_AddLoadListeners.call(this),self.C3MobileAdvertsAPI.real.resumeRuntime(),this.Jc.load(),document.removeEventListener(Mn.dd,n),document.removeEventListener(Mn.ud,r),document.removeEventListener(Mn.bd,h),document.removeEventListener(Mn.wd,o)}};document.addEventListener(Mn.dd,n),document.addEventListener(Mn.ud,r),document.addEventListener(Mn.bd,h),document.addEventListener(Mn.wd,o)}self.Ad=Nn}{const oo=self.Ec,po=oo.Dc,qo=oo.Fc,ro={get qc(){return self.admob.Events.adLoad},get zc(){return self.admob.Events.adLoadFail},get dd(){return self.admob.Events.adShow},get ud(){return self.admob.Events.adShowFail},get wd(){return self.admob.Events.adDismiss},get bd(){return self.admob.Events.adReward}};class so{constructor(t,s){if(!t)return qo(s,"Unit ID not specified");this.jc=t,this.Jc=null,this.Xc=!1,this.Qc=!1,this.fd=!1,this.md=null,this.Pa=this.pd(),this.Sd=null}pd(){return this.Pa||(this.Pa=new Promise(t=>{this.md=t})),this.Pa}yd(t){this.fd=t,this.md&&this.md(t),this.Pa=null,this.md=null,this.Pa=this.pd()}oo(t,s){const e={adUnitId:oo.Bc(this.jc,"rewardedInterstitial"),npa:"NON_PERSONALIZED"===t?"1":"0"};this.Xc=!0,this.Qc=!1,this.fd=!1,this.Pa=null,this.Pa=this.pd(),this.Jc=new self.admob.RewardedInterstitialAd(e),_AddLoadListeners.call(this,s),this.Jc.load()}gd(t,s){t?oo.Dc(s,"rewarded interstitial ad load"):oo.Fc(s,"rewarded interstitial ad failed to load")}async nd(t){if(!this.Jc)return qo(t,"rewarded interstitial ad not created");if(this.Qc)return po(t,"rewarded interstitial ad already shown");this.Xc&&await this.pd(),this.fd||(_AddLoadListeners.call(this),this.fd=!1,this.Pa=null,this.Jc.load(),await this.pd(),this.fd)?(_AddShowListeners.call(this,t),await this.Jc.show()):qo(t,"rewarded interstitial ad failed to load")}rd(){return this.Xc}od(){return this.Qc}}function _AddLoadListeners(s){const e=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!0),s&&po(s,"rewarded interstitial ad load"),document.removeEventListener(ro.qc,e),document.removeEventListener(ro.zc,i))},i=t=>{t.ad===this.Jc&&(this.Xc=!1,this.yd(!1),s&&qo(s,"rewarded interstitial ad failed to load"),document.removeEventListener(ro.qc,e),document.removeEventListener(ro.zc,i))};document.addEventListener(ro.qc,e),document.addEventListener(ro.zc,i)}function _AddShowListeners(i){const n=t=>{t.ad===this.Jc&&(this.Qc=!0,self.C3MobileAdvertsAPI.real.suspendRuntime())},h=t=>{t.ad===this.Jc&&(this.Sd=t.reward)},r=t=>{t.ad===this.Jc&&(this.Qc=!1,i&&qo(i,"rewarded interstitial ad failed to show"),document.removeEventListener(ro.dd,n),document.removeEventListener(ro.ud,r),document.removeEventListener(ro.bd,h),document.removeEventListener(ro.wd,o))},o=t=>{if(t.ad===this.Jc){if(null!==this.Sd){const s=String(this.Sd.type),e=String(this.Sd.amount);i&&po(i,JSON.stringify([s,e]))}else i&&qo(i,"closed with no reward");this.Sd=null,this.Qc=!1,this.Xc=!0,this.fd=!1,this.Pa=null,this.Pa=this.pd(),_AddLoadListeners.call(this),self.C3MobileAdvertsAPI.real.resumeRuntime(),this.Jc.load(),document.removeEventListener(ro.dd,n),document.removeEventListener(ro.ud,r),document.removeEventListener(ro.bd,h),document.removeEventListener(ro.wd,o)}};document.addEventListener(ro.dd,n),document.addEventListener(ro.ud,r),document.addEventListener(ro.bd,h),document.addEventListener(ro.wd,o)}self._d=so}{const Uo=self.Ec,Vo=Uo.Dc,Wo=Uo.Fc,Xo=!!self.cordova&&"ios"===self.cordova.platformId,Yo=!!self.cordova&&"android"===self.cordova.platformId,Zo=0,$o=2,_o=1,ap=3;class bp{constructor(){this.Od="UNKNOWN",this.Id="",this.Rd=0,this.Cd="UNKNOWN",this.kd="not-determined",this.Pd=!1}async tt(){Uo.Nc.debug&&await self.consent.reset()}Td(){return this.Od}async Ld(){Xo&&await self.admob.requestTrackingAuthorization()}async Md(){if(Yo)return this.kd="not-determined";const t=self.cordova.plugins.idfa,s=await t.getInfo();if(!s.trackingLimited)return this.kd="authorized";switch(s.trackingPermission){case t.TRACKING_PERMISSION_NOT_DETERMINED:return this.kd="not-determined";case t.TRACKING_PERMISSION_RESTRICTED:case t.TRACKING_PERMISSION_DENIED:return this.kd="denied";case t.TRACKING_PERMISSION_AUTHORIZED:return this.kd="authorized"}}async xd(t){return Yo?Vo(t,"not-determined"):Xo?(await _UpdateRequestLocationInEEAorUnknown.call(this),"true"===this.Id?await this.Ld():(await this.Md(),"not-determined"===this.kd&&(await _HasConsentForm.call(this),this.Pd?await this.Ed():await this.Ld())),await this.Md(),Vo(t,this.kd)):void 0}async Dd(t,s,e){const i=await _RequestInfoUpdateForTesting.call(this,t,s,t=>{t?"object"==typeof t?Wo(e,t.message):Wo(e,t):Wo(e,"requestInfoUpdate error")});return i}async Fd(t,s,e){await _RequestInfoUpdateForTesting.call(this,t,s)}async Ud(t,s=!1){switch(await _UpdateConsentStatus.call(this),t){case"eu":{const e=await _HasConsentForm.call(this),i=_NeedsConsent.call(this);if(i&&e){const n=await self.consent.loadForm();await n.show()}break}case"always":{const h=await _HasConsentForm.call(this),r=await _UpdateRequestLocationInEEAorUnknown.call(this);if(h&&"true"===r){const o=await self.consent.loadForm();await o.show()}else if(h&&s){const a=await self.consent.loadForm();await a.show()}break}}await _UpdateConsentStatus.call(this),await _UpdateRequestLocationInEEAorUnknown.call(this),await _UpdateAdPersonalization.call(this)}async Ed(t){await this.Ud("always",!0)}async Gd(){await _UpdateConsentStatus.call(this),await _UpdateRequestLocationInEEAorUnknown.call(this),await _UpdateAdPersonalization.call(this)}async Wd(t){await this.Md(),Vo(t,`${this.Cd}&&${this.kd}&&`+this.Id)}async Hd(t,s){Wo(t,s)}async Bd(t){await this.Gd(),await this.Md(),Vo(t,`${this.Cd}&&${this.kd}&&`+this.Id)}}async function _HasConsentForm(){const t=await self.consent.getFormStatus();return this.Pd=t===self.consent.FormStatus.Available,this.Pd}async function _UpdateConsentStatus(){const t=await self.consent.getConsentStatus();switch(this.Rd=t,this.Rd){case _o:return this.Cd="REQUIRED";case $o:return this.Cd="NOT_REQUIRED";case ap:return this.Cd="OBTAINED";case Zo:return this.Cd="UNKNOWN"}}function _NeedsConsent(){switch(this.Rd){case _o:return!0;case $o:case ap:return!1;case Zo:return!0}}function _UpdateAdPersonalization(){switch(this.Rd){case _o:return this.Od="NON_PERSONALIZED";case $o:case ap:return this.Od="PERSONALIZED";case Zo:return this.Od="NON_PERSONALIZED"}}async function _UpdateRequestLocationInEEAorUnknown(){if(Yo)switch(this.Rd){case _o:return this.Id="true";case $o:return this.Id="false";case ap:case Zo:return this.Id="true"}if(Xo){const t=await _GetValueFromNativeStorage.call(this,"IABTCF_gdprApplies","getInt");return this.Id=t?"true":"false"}}async function _GetValueFromNativeStorage(e,i){return new Promise((s,t)=>{self.NativeStorage[i](e,t=>s(t),t=>s(1))})}async function _RequestInfoUpdateForTesting(t,s,e){let i="",n=null;if(t){switch(s){case"EEA":i=self.consent.DebugGeography.EEA;break;case"NOT_EEA":i=self.consent.DebugGeography.NotEEA;break;default:i=self.consent.DebugGeography.Disabled}const h=await Uo.Vc;n=[h]}try{return t?await self.consent.requestInfoUpdate({Nd:i,Vd:n}):await self.consent.requestInfoUpdate(),!0}catch(t){return e&&e(t),!1}}self.qd=new bp}{const Qp=(t,s)=>{let e=t[0],i=t[1],n=t[2],h=t[3];e=Sp(e,i,n,h,s[0],7,-680876936),h=Sp(h,e,i,n,s[1],12,-389564586),n=Sp(n,h,e,i,s[2],17,606105819),i=Sp(i,n,h,e,s[3],22,-1044525330),e=Sp(e,i,n,h,s[4],7,-176418897),h=Sp(h,e,i,n,s[5],12,1200080426),n=Sp(n,h,e,i,s[6],17,-1473231341),i=Sp(i,n,h,e,s[7],22,-45705983),e=Sp(e,i,n,h,s[8],7,1770035416),h=Sp(h,e,i,n,s[9],12,-1958414417),n=Sp(n,h,e,i,s[10],17,-42063),i=Sp(i,n,h,e,s[11],22,-1990404162),e=Sp(e,i,n,h,s[12],7,1804603682),h=Sp(h,e,i,n,s[13],12,-40341101),n=Sp(n,h,e,i,s[14],17,-1502002290),i=Sp(i,n,h,e,s[15],22,1236535329),e=Tp(e,i,n,h,s[1],5,-165796510),h=Tp(h,e,i,n,s[6],9,-1069501632),n=Tp(n,h,e,i,s[11],14,643717713),i=Tp(i,n,h,e,s[0],20,-373897302),e=Tp(e,i,n,h,s[5],5,-701558691),h=Tp(h,e,i,n,s[10],9,38016083),n=Tp(n,h,e,i,s[15],14,-660478335),i=Tp(i,n,h,e,s[4],20,-405537848),e=Tp(e,i,n,h,s[9],5,568446438),h=Tp(h,e,i,n,s[14],9,-1019803690),n=Tp(n,h,e,i,s[3],14,-187363961),i=Tp(i,n,h,e,s[8],20,1163531501),e=Tp(e,i,n,h,s[13],5,-1444681467),h=Tp(h,e,i,n,s[2],9,-51403784),n=Tp(n,h,e,i,s[7],14,1735328473),i=Tp(i,n,h,e,s[12],20,-1926607734),e=Up(e,i,n,h,s[5],4,-378558),h=Up(h,e,i,n,s[8],11,-2022574463),n=Up(n,h,e,i,s[11],16,1839030562),i=Up(i,n,h,e,s[14],23,-35309556),e=Up(e,i,n,h,s[1],4,-1530992060),h=Up(h,e,i,n,s[4],11,1272893353),n=Up(n,h,e,i,s[7],16,-155497632),i=Up(i,n,h,e,s[10],23,-1094730640),e=Up(e,i,n,h,s[13],4,681279174),h=Up(h,e,i,n,s[0],11,-358537222),n=Up(n,h,e,i,s[3],16,-722521979),i=Up(i,n,h,e,s[6],23,76029189),e=Up(e,i,n,h,s[9],4,-640364487),h=Up(h,e,i,n,s[12],11,-421815835),n=Up(n,h,e,i,s[15],16,530742520),i=Up(i,n,h,e,s[2],23,-995338651),e=Vp(e,i,n,h,s[0],6,-198630844),h=Vp(h,e,i,n,s[7],10,1126891415),n=Vp(n,h,e,i,s[14],15,-1416354905),i=Vp(i,n,h,e,s[5],21,-57434055),e=Vp(e,i,n,h,s[12],6,1700485571),h=Vp(h,e,i,n,s[3],10,-1894986606),n=Vp(n,h,e,i,s[10],15,-1051523),i=Vp(i,n,h,e,s[1],21,-2054922799),e=Vp(e,i,n,h,s[8],6,1873313359),h=Vp(h,e,i,n,s[15],10,-30611744),n=Vp(n,h,e,i,s[6],15,-1560198380),i=Vp(i,n,h,e,s[13],21,1309151649),e=Vp(e,i,n,h,s[4],6,-145523070),h=Vp(h,e,i,n,s[11],10,-1120210379),n=Vp(n,h,e,i,s[2],15,718787259),i=Vp(i,n,h,e,s[9],21,-343485551),t[0]=r(e,t[0]),t[1]=r(i,t[1]),t[2]=r(n,t[2]),t[3]=r(h,t[3])},Rp=(t,s,e,i,n,h)=>(s=r(r(s,t),r(i,h)),r(s<<n|s>>>32-n,e)),Sp=(t,s,e,i,n,h,r)=>Rp(s&e|~s&i,t,s,n,h,r),Tp=(t,s,e,i,n,h,r)=>Rp(s&i|e&~i,t,s,n,h,r),Up=(t,s,e,i,n,h,r)=>Rp(s^e^i,t,s,n,h,r),Vp=(t,s,e,i,n,h,r)=>Rp(e^(s|~i),t,s,n,h,r),Wp=t=>{const s=t.length,e=[1732584193,-271733879,-1732584194,271733878];let i;for(i=64;i<=t.length;i+=64)Qp(e,Xp(t.substring(i-64,i)));t=t.substring(i-64);const n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<t.length;i++)n[i>>2]|=t.charCodeAt(i)<<(i%4<<3);if(n[i>>2]|=128<<(i%4<<3),55<i)for(Qp(e,n),i=0;i<16;i++)n[i]=0;return n[14]=8*s,Qp(e,n),e},Xp=s=>{const e=[];for(let t=0;t<64;t+=4)e[t>>2]=s.charCodeAt(t)+(s.charCodeAt(t+1)<<8)+(s.charCodeAt(t+2)<<16)+(s.charCodeAt(t+3)<<24);return e},Yp="0123456789abcdef".split(""),Zp=s=>{let e="";for(let t=0;t<4;t++)e+=Yp[s>>8*t+4&15]+Yp[s>>8*t&15];return e},$p=s=>{for(let t=0;t<s.length;t++)s[t]=Zp(s[t]);return s.join("")},_p=t=>$p(Wp(t));let r=(t,s)=>t+s&4294967295;if("5d41402abc4b2a76b9719d911017c592"!=_p("hello")){let t=(t,s)=>{const e=(65535&t)+(65535&s),i=(t>>16)+(s>>16)+(e>>16);return i<<16|65535&e}}self.xc=_p}{const ir=self.Ec,jr=self.qd,kr=self.ld,lr=self.vd,mr=self.Ad,nr=self._d;let l=null,r=null,a=null,c=null,o=null;const tr={},ur=(t,s)=>{tr[t]=s};ur("CreateBannerAdvert",async(t,s,e,i,n,h,r,o)=>{if(await ir.Uc(o,e)){n&&l&&(await l.ad(),await l.hd(()=>!0),l.et(),l=null);const a=await jr.Td();(l=l||new kr(t,s,i,h,r,o)).oo(a,o)}}),ur("ShowBannerAdvert",async t=>{if(!l)return ir.Fc(t,"banner ad not created");l.nd(t)}),ur("HideBannerAdvert",async t=>{if(!l)return ir.Fc(t,"banner ad not created");l.hd(t)}),ur("CreateInterstitialAdvert",async(t,s,e)=>{if(r){if(r.od())return ir.Dc(e,"interstitial ad already showing");if(r.rd()){const i=await r.pd();r.gd(i,e)}else{const n=await jr.Td();r.oo(n,e)}}else if(await ir.Uc(e,s)){const h=await jr.Td();(r=new lr(t,e)).oo(h,e)}}),ur("ShowInterstitialAdvert",async t=>{if(!r)return ir.Fc(t,"interstitial ad not created");r.nd(t)}),ur("CreateVideoAdvert",async(t,s,e)=>{if(a||c){if(c){if(c.od())return ir.Dc(e,"rewarded ad already showing");if(c.rd()){const i=await c.pd();c.gd(i,e)}else{const n=await jr.Td();c.oo(n,e)}return}if(a){if(a.od())return ir.Dc(e,"rewarded ad already showing");if(a.rd()){const h=await a.pd();a.gd(h,e)}else{const r=await jr.Td();a.oo(r,e)}return}}if(await ir.Uc(e,s)){const o=await jr.Td();(a=new mr(t,e)).oo(o,e)}}),ur("ShowVideoAdvert",async t=>{if(!a)return ir.Fc(t,"video ad not created");a.nd(t)}),ur("CreateRewardedAdvert",async(t,s,e)=>{if(c||a){if(c){if(c.od())return ir.Dc(e,"rewarded ad already showing");if(c.rd()){const i=await c.pd();c.gd(i,e)}else{const n=await jr.Td();c.oo(n,e)}return}if(a){if(a.od())return ir.Dc(e,"rewarded ad already showing");if(a.rd()){const h=await a.pd();a.gd(h,e)}else{const r=await jr.Td();a.oo(r,e)}return}}if(await ir.Uc(e,s)){const o=await jr.Td();(c=new mr(t,e)).oo(o,e)}}),ur("ShowRewardedAdvert",async t=>{if(!c)return ir.Fc(t,"rewarded ad not created");c.nd(t)}),ur("CreateRewardedInterstitialAdvert",async(t,s,e)=>{if(o){if(o.od())return ir.Dc(e,"rewarded interstitial ad already showing");if(o.rd()){const i=await o.pd();o.gd(i,e)}else{const n=await jr.Td();o.oo(n,e)}}else if(await ir.Uc(e,s)){const h=await jr.Td();(o=new nr(t,e)).oo(h,e)}}),ur("ShowRewardedInterstitialAdvert",async t=>{if(!o)return ir.Fc(t,"rewarded interstitial ad not created");o.nd(t)}),ur("Configure",async(t,s,e,i,n,h,r,o,a)=>{const l=!ir.Hc();return ir.Wc(t,s,e,i,n,h,r),await ir.Uc(a,h)?(l&&await jr.tt(),await jr.Dd(h,r,a)?(l?o?await jr.Ud("eu"):await jr.Gd():await jr.Ud("always"),void await jr.Wd(a)):jr.Hd(a,"failure to update consent information")):jr.Hd(a,"failure to initialize")}),ur("RequestConsent",async t=>{tr.Configure(ir.Nc.id,ir.Nc.kc,ir.Nc.Pc,ir.Nc.Tc,"always",ir.Nc.debug,ir.Nc.Mc,!1,t)}),ur("SetMaxAdContentRating",async(t,s)=>{if(await ir.Uc(s)){if(!t)return ir.Fc(s,"Label not specified");try{ir.Gc("maxAdContentRating",t),ir.Dc(s,"")}catch(t){ir.Fc(s,"invalid label")}}}),ur("TagForChildDirectedTreatment",async(t,s)=>{if(await ir.Uc(s))try{ir.Gc("tagForChildDirectedTreatment",1===t),ir.Dc(s,"")}catch(t){ir.Fc(s,"invalid label")}}),ur("TagForUnderAgeOfConsent",async(t,s)=>{if(await ir.Uc(s))try{ir.Gc("tagForUnderAgeOfConsent",1===t),ir.Dc(s,"")}catch(t){ir.Fc(s,"invalid label")}}),ur("RequestIDFA",async t=>{await ir.Uc(t)&&jr.xd(t)}),ur("StatusUpdate",async(t,s,e)=>{if(!await ir.Uc(e,t))return jr.Hd(e,"failure to initialize");await jr.Fd(t,s,e),await jr.Bd(e)}),self.C3MobileAdvertsAPI||(self.C3MobileAdvertsAPI={}),self.C3MobileAdvertsAPI.real=tr}{const Hs="PERSONALIZED",Is={},Js=(t,s)=>Is[t]=s,Ks=s=>new Promise(t=>setTimeout(t,s));let e=null,i=null,n=null,h=null,r=null;function getArgument(t,s){const e=s.slice(0,-1),i=s[s.length-1];return console.log(t,e),[e,i]}Js("CreateBannerAdvert",async(...t)=>{const[,s]=getArgument("CreateBannerAdvert",t);await Ks(50),e?s("Banner already exists"):(e="ready",s(null,"Created banner"))}),Js("ShowBannerAdvert",async(...t)=>{const[,s]=getArgument("ShowBannerAdvert",t);await Ks(50),"ready"!=e?s("Banner cannot be shown"):(e="shown",s(null,"Showed banner"))}),Js("HideBannerAdvert",async(...t)=>{const[,s]=getArgument("HideBannerAdvert",t);await Ks(50),"shown"!=e?s("Banner cannot be hidden"):(e=null,s(null,"Hid banner"))}),Js("CreateInterstitialAdvert",async(...t)=>{const[,s]=getArgument("CreateInterstitialAdvert",t);await Ks(50),i?s("Intersitial already exists"):(i="ready",s(null,"Created interstitial"))}),Js("ShowInterstitialAdvert",async(...t)=>{const[,s]=getArgument("ShowInterstitialAdvert",t);await Ks(50),"ready"!=i?s("Cannot show interstitial"):(i=null,s(null,"Interstitial shown"))}),Js("CreateVideoAdvert",async(...t)=>{const[,s]=getArgument("CreateVideoAdvert",t);await Ks(50),n?s("Video already exists"):(n="ready",s(null,"Created video"))}),Js("ShowVideoAdvert",async(...t)=>{const[,s]=getArgument("ShowVideoAdvert",t);await Ks(50),"ready"!=n?s("Cannot show video"):(n=null,s(null,'["example type", 20]'))}),Js("CreateRewardedAdvert",async(...t)=>{const[,s]=getArgument("CreateRewardedAdvert",t);await Ks(50),h?s("Rewarded already exists"):(h="ready",s(null,"Created rewarded"))}),Js("ShowRewardedAdvert",async(...t)=>{const[,s]=getArgument("ShowRewardedAdvert",t);await Ks(50),"ready"!=h?s("Cannot show rewarded"):(h=null,s(null,'["example type", 20]'))}),Js("CreateRewardedInterstitialAdvert",async(...t)=>{const[,s]=getArgument("CreateRewardedInterstitialAdvert",t);await Ks(50),r?s("Rewarded intersitial already exists"):(r="ready",s(null,"Created rewarded interstitial"))}),Js("ShowRewardedInterstitialAdvert",async(...t)=>{const[,s]=getArgument("ShowRewardedInterstitialAdvert",t);await Ks(50),"ready"!=r?s("Cannot show rewarded interstitial"):(r=null,s(null,"Rewarded interstitial shown"))}),Js("Configure",async(...t)=>{const[,s]=getArgument("Configure",t);await Ks(50),s(null,Hs+"&&true")}),Js("RequestConsent",async(...t)=>{const[,s]=getArgument("RequestConsent",t);await Ks(50),s(null,Hs+"&&true")}),Js("RequestIDFA",async(...t)=>{const[,s]=getArgument("RequestIDFA",t);await Ks(50),s(null,"authorized")}),self.C3MobileAdvertsAPI||(self.C3MobileAdvertsAPI={}),self.C3MobileAdvertsAPI.fake=Is}{const yt=self.Ec,zt={},At=(t,s)=>{zt[t]=s};let s=!1,e=null;const Dt=async t=>zt.webAdsScriptLoaded?(s||(self.adsbygoogle=self.adsbygoogle||[],self.adBreak=self.adConfig=t=>self.adsbygoogle.push(t),s=!0),e=e||new Promise((t,s)=>{self.adConfig({preloadAdBreaks:"on",onReady:()=>t(!0)})})):(yt.Fc(t,"advert script not loaded, likely blocked by an ad blocker"),!1),Et=()=>{zt.suspendRuntime&&zt.suspendRuntime()},Ft=()=>{zt.resumeRuntime&&zt.resumeRuntime()};At("CreateBannerAdvert",async(t,s,e,i,n,h,r)=>{yt.Fc(r,"banner ads not supported in web platform")}),At("ShowBannerAdvert",async t=>{yt.Fc(t,"banner ads not supported in web platform")}),At("HideBannerAdvert",async t=>{yt.Fc(t,"banner ads not supported in web platform")}),At("CreateInterstitialAdvert",async(t,s,e)=>{await Dt(e)&&yt.Dc(e,"interstitial ad created")}),At("ShowInterstitialAdvert",async s=>{await Dt(s)&&self.adBreak({type:"next",beforeAd:()=>Et(),afterAd:()=>Ft(),adBreakDone:t=>{switch(t.breakStatus){case"viewed":case"dismissed":yt.Dc(s,"interstitial ad show");break;default:console.table(t),yt.Fc(s,"interstitial ad failed to show")}}})}),At("CreateVideoAdvert",async(t,s,e)=>{yt.Fc(e,"video ads are deprecated")}),At("ShowVideoAdvert",async t=>{yt.Fc(t,"video ads are deprecated")}),At("CreateRewardedAdvert",async(t,s,e)=>{await Dt(e)&&yt.Dc(e,"rewarded ad created")}),At("ShowRewardedAdvert",async s=>{await Dt(s)&&self.adBreak({type:"reward",beforeAd:()=>Et(),afterAd:()=>Ft(),adBreakDone:t=>{switch(t.breakStatus){case"viewed":case"dismissed":yt.Dc(s,"rewarded ad show");break;case"ignored":yt.Fc(s,"rewarded ad ignored");break;default:console.table(t),yt.Fc(s,"rewarded ad failed to show")}},beforeReward:t=>{t()},adDismissed:()=>{yt.Fc(s,"closed with no reward")},adViewed:()=>{yt.Dc(s,JSON.stringify(["Reward",1]))}})}),At("CreateRewardedInterstitialAdvert",async(t,s,e)=>{await Dt(e)&&yt.Dc(e,"rewarded interstitial ad created")}),At("ShowRewardedInterstitialAdvert",async s=>{await Dt(s)&&self.adBreak({type:"reward",beforeAd:()=>Et(),afterAd:()=>Ft(),adBreakDone:t=>{switch(t.breakStatus){case"viewed":case"dismissed":yt.Dc(s,"rewarded interstitial ad show");break;case"ignored":yt.Fc(s,"rewarded interstitial ad ignored");break;default:console.table(t),yt.Fc(s,"rewarded interstitial ad failed to show")}},beforeReward:t=>{t()},adDismissed:()=>{yt.Fc(s,"closed with no reward")},adViewed:()=>{yt.Dc(s,JSON.stringify(["Reward",1]))}})}),At("Configure",async(t,s,e,i,n,h,r,o,a)=>{zt.webAdsScriptLoaded?yt.Dc(a,"UNKNOWN&¬-determined&&true"):yt.Fc(a,"advert script not loaded, likely blocked by an ad blocker")}),At("RequestConsent",async t=>{yt.Dc(t,"UNKNOWN&¬-determined&&true")}),At("SetMaxAdContentRating",async(t,s)=>{yt.Fc(s,"setting max ad content rating not supported in web platform")}),At("TagForChildDirectedTreatment",async(t,s)=>{yt.Fc(s,"tagging for children not supported in web platform")}),At("TagForUnderAgeOfConsent",async(t,s)=>{yt.Fc(s,"tagging for under age of consent not supported in web platform")}),At("RequestIDFA",async t=>{yt.Dc(t,"not-determined")}),At("StatusUpdate",async(t,s,e)=>{yt.Dc(e,"UNKNOWN&¬-determined&&true")}),self.C3MobileAdvertsAPI||(self.C3MobileAdvertsAPI={}),self.C3MobileAdvertsAPI.web=zt}{const Iu="advert",Ju=!1;let t=!1;const Lu=class extends self.i{constructor(t){super(t,Iu);const s=s=>[s,t=>this.zd(s,t)];this.T([s("CreateBannerAdvert"),s("ShowBannerAdvert"),s("HideBannerAdvert"),s("CreateInterstitialAdvert"),s("ShowInterstitialAdvert"),s("CreateVideoAdvert"),s("ShowVideoAdvert"),s("CreateRewardedAdvert"),s("ShowRewardedAdvert"),s("CreateRewardedInterstitialAdvert"),s("ShowRewardedInterstitialAdvert"),s("Configure"),s("RequestConsent"),s("SetUserPersonalisation"),s("SetMaxAdContentRating"),s("TagForChildDirectedTreatment"),s("TagForUnderAgeOfConsent"),s("RequestIDFA"),s("StatusUpdate"),["AddScript",t=>this.jd(t[0],t[1])]])}$d(){return self.cordova?self.C3MobileAdvertsAPI.real:(self.cordova,Ju?Ju?self.C3MobileAdvertsAPI.fake:void 0:self.C3MobileAdvertsAPI.web)}Kd(){const t=this.L();t.S("runtime","visibilitychange",{hidden:!0})}Zd(){const t=this.L();t.S("runtime","visibilitychange",{hidden:!1})}Yd(){const t=this.L();t&&(t.te(),t.S("runtime","window-resize",{innerWidth:t.we(),innerHeight:t.fe(),devicePixelRatio:self.devicePixelRatio,isFullscreen:self.Qt.pe(),cssDisplayMode:t.me()}))}async zd(s,n){const h=this.$d();if(h.suspendRuntime||(h.suspendRuntime=()=>this.Kd()),h.resumeRuntime||(h.resumeRuntime=()=>this.Zd()),h.forceResize||(h.forceResize=()=>this.Yd()),h)return new Promise((e,i)=>{const t=h[s];t(...n,(t,s)=>{t?i(t):e(s)})});throw t||(t=!0,console.warn("The Mobile Advert plugin is not loaded. Please note that it only works in Android or iOS exports")),new Error("advert plugin not loaded")}async jd(i,n=null){const h=this.$d();return h.webAdsScriptLoaded=!1,new Promise((s,t)=>{const e=document.createElement("script");if(n)for(let t in n)e.setAttribute(t,n[t]);e.onload=function(){h.webAdsScriptLoaded=!0,s()},e.onerror=function(t){h.webAdsScriptLoaded=!1,s()},e.src=i,document.head.appendChild(e)})}};self.Qt.Ge(Lu)}if(window.C3_Is_Supported){const iv=!0;window.c3_runtimeInterface=new self.Qt({ss:iv,ge:"workermain.js",runtimeScriptList:["scripts/c3main.js"],scriptFolder:"scripts/",exportType:"html5"})}PK �b[P�S�S S supportcheck.jsnu �[��� PK �b[�)[=ō ō � c3main.jsnu �[��� PK �b[zΕ�� � �� modernjscheck.jsnu �[��� PK �b[�F��� �� p� main.jsnu �[��� PK / �S
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Генераци� �траницы: 0.38 |
proxy
|
phpinfo
|
�а�тройка