"use strict";window.g_aKX=class{constructor(e,a){this.g_aog=e,this.g_aKY=a,this.g_aKZ=!1,this.g_anl=()=>this.g_Jj()}g_aK_(){}g_aK$(e,a,g,_){this.g_aog.g_aLa(this.g_aKY,e,a,g,_)}g_aLb(e,a,g,_){return this.g_aog.g_aLc(this.g_aKY,e,a,g,_)}g_aLd(e,a,g){this.g_aog.g_aLe()?this.g_aK$(e,a,g):this.g_aog.g_aLf()._OnMessageFromDOM({type:"event",component:this.g_aKY,handler:e,dispatchOpts:g||null,data:a,responseId:null})}g_aLg(e,a){this.g_aog.g_aLh(this.g_aKY,e,a)}g_aLi(e){for(const[a,g]of e)this.g_aLg(a,g)}g_aLj(){return this.g_aog}g_aLk(){return this.g_aKY}g_abF(){this.g_aKZ||(this.g_aog.g_aLl(this.g_anl),this.g_aKZ=!0)}g_abq(){this.g_aKZ&&(this.g_aog.g_aLm(this.g_anl),this.g_aKZ=!1)}g_Jj(){}},"use strict",window.g_aLn=class extends g_aKX{constructor(e,a){super(e,a),this.g_aLo=new Map,this.g_aLp=!0,this.g_aLg("create",e=>this.g_aLq(e)),this.g_aLg("destroy",e=>this.g_aLr(e)),this.g_aLg("set-visible",e=>this.g_aLs(e)),this.g_aLg("update-position",e=>this.g_aLt(e)),this.g_aLg("update-state",e=>this.g_aDj(e)),this.g_aLg("focus",e=>this.g_aLu(e)),this.g_aLg("set-css-style",e=>this.g_aLv(e))}g_aLw(e){this.g_aLp=!!e}g_aLx(e,g){this.g_aLg(e,e=>{const a=e.elementId,_=this.g_aLo.get(a);return g(_,e)})}g_aLq(e){const a=e.elementId,g=this.g_acd(a,e);this.g_aLo.set(a,g),e.isVisible||(g.style.display="none"),this.g_aLp&&document.body.appendChild(g)}g_acd(){throw new Error("required override")}g_aLy(){}g_aLr(e){const a=e.elementId,g=this.g_aLo.get(a);this.g_aLy(g),this.g_aLp&&g.parentElement.removeChild(g),this.g_aLo.delete(a)}g_aLz(e,a,g){g||(g={}),g.elementId=a,this.g_aK$(e,g)}g_aLA(e,a,g){g||(g={}),g.elementId=a,this.g_aLd(e,g)}g_aLs(e){if(this.g_aLp){const a=this.g_aLo.get(e.elementId);a.style.display=e.isVisible?"":"none"}}g_aLt(e){if(this.g_aLp){const a=this.g_aLo.get(e.elementId);a.style.left=e.left+"px",a.style.top=e.top+"px",a.style.width=e.width+"px",a.style.height=e.height+"px";const g=e.fontSize;null!==g&&(a.style.fontSize=g+"em")}}g_aDj(e){const a=this.g_aLo.get(e.elementId);this.g_aLB(a,e)}g_aLB(){throw new Error("required override")}g_aLu(e){const a=this.g_aLo.get(e.elementId);e.focus?a.focus():a.blur()}g_aLv(e){const a=this.g_aLo.get(e.elementId);a.style[e.prop]=e.val}g_aLC(e){return this.g_aLo.get(e)}},"use strict";{function _(e){return new Promise((a,g)=>{const _=document.createElement("script");_.onload=a,_.onerror=g,_.async=!1,_.src=e,document.head.appendChild(_)})}async function t(e){const a=await n(e),g=new TextDecoder("utf-8");return g.decode(a)}function n(e){return new Promise((g,_)=>{const a=new FileReader;a.onload=e=>g(e.target.result),a.onerror=e=>_(e),a.readAsArrayBuffer(e)})}const a=/(iphone|ipod|ipad)/i.test(navigator.userAgent);let o=new Audio;const r={"audio/webm; codecs=opus":!!o.canPlayType("audio/webm; codecs=opus"),"audio/ogg; codecs=opus":!!o.canPlayType("audio/ogg; codecs=opus"),"audio/webm; codecs=vorbis":!!o.canPlayType("audio/webm; codecs=vorbis"),"audio/ogg; codecs=vorbis":!!o.canPlayType("audio/ogg; codecs=vorbis"),"audio/mp4":!!o.canPlayType("audio/mp4"),"audio/mpeg":!!o.canPlayType("audio/mpeg")};o=null;const e=[];let g=0;window.RealFile=window.File;const s=[],i=new Map,u=new Map;let Q=0;const l=[];self.g_aLD=function(e){if("function"!=typeof e)throw new Error("runOnStartup called without a function");l.push(e)},window.g_aLE=class o{constructor(e){this.g_aLF=e.g_aLG,this.g_aLH=null,this.g_amk="",this.g_aLI=e.g_aLJ,this.g_aLK={},this.g_aLL=null,this.g_aLM=null,this.g_aLN=[],this.g_aLO=null,this.g_akl=null,this.g_aoa=null,this.g_akU=-1,this.g_aLP=()=>this.g_aLQ(),this.g_aLR=[],this.g_amp=e.g_aLS,"cordova"===this.g_amp&&this.g_aLF&&(console.warn("[C3 runtime] Worker mode is enabled and supported, but is disabled in Cordova due to crbug.com/939775. Reverting to DOM mode."),this.g_aLF=!1),/CrOS/.test(navigator.userAgent)&&(console.warn("[C3 runtime] Worker mode is enabled and supported, but is disabled in Chrome OS due to reports of crashes. Reverting to DOM mode."),this.g_aLF=!1),this.g_aLT=!1,this.g_aLU=null,("html5"===this.g_amp||"playable-ad"===this.g_amp)&&"file"===location.protocol.substr(0,4)&&alert("Exported games won't work until you upload them. (When running on the file: protocol, browsers block many features from working for security reasons.)"),this.g_aLh("runtime","cordova-fetch-local-file",e=>this.g_aLV(e)),this.g_aLh("runtime","create-job-worker",e=>this.g_aLW(e)),"cordova"===this.g_amp?document.addEventListener("deviceready",()=>this.g_aat(e)):this.g_aat(e)}g_em(){this.g_aLX(),this.g_aLH&&(this.g_aLH.onmessage=null,this.g_aLH=null),this.g_aLL&&(this.g_aLL.terminate(),this.g_aLL=null),this.g_aLM&&(this.g_aLM.g_em(),this.g_aLM=null),this.g_akl&&(this.g_akl.parentElement.removeChild(this.g_akl),this.g_akl=null)}g_aLY(){return this.g_akl}g_fg(){return this.g_amk}g_aLe(){return this.g_aLF}g_apG(){return this.g_amp}g_aoy(){return"cordova"===this.g_amp&&a}g_aLZ(){return"cordova"===this.g_amp&&!1===a}async g_aat(e){if("playable-ad"===this.g_amp){this.g_aLU=self.c3_base64files,await this.g_aL_();for(let a=0,g=e.g_aL$.length;athis._OnMessageFromRuntime(e.data),window.c3_addPortMessageHandler&&window.c3_addPortMessageHandler(e=>this.g_aMc(e)),this.g_aoa=new self.g_aMd(this),await this.g_aoa.g_ahs(),this.g_aMe(),"object"==typeof window.StatusBar&&window.StatusBar.hide(),"object"==typeof window.AndroidFullScreen&&window.AndroidFullScreen.immersiveMode(),await this.g_aMf(),this.g_aLF?await this.g_aMg(e,a.port2):await this.g_aMh(e,a.port2)}g_aMi(e){return this.g_aLK.hasOwnProperty(e)?this.g_aLK[e]:e.endsWith("../../../workermain.html")&&this.g_aLK.hasOwnProperty("workermain.html")?this.g_aLK["workermain.js"]:"playable-ad"===this.g_amp&&this.g_aLU.hasOwnProperty(e.toLowerCase())?URL.createObjectURL(this.g_aLU[e.toLowerCase()]):e}async g_aMj(g,a,_){if(g.startsWith("blob:"))return new Worker(g,_);if(this.g_aoy()){const a=await this.g_As(this.g_aLI+g),e=new Blob([a],{type:"application/javascript"});return new Worker(URL.createObjectURL(e),_)}const t=new URL(g%2ca.html),n=location.origin!==t.origin;if(n){const e=await fetch(t);if(!e.ok)throw new Error("failed to fetch worker script");const a=await e.blob();return new Worker(URL.createObjectURL(a),_)}return new Worker(t,_)}g_aMe(){if(this.g_aoy()){const g=document.documentElement.style,a=document.body.style,_=window.innerWidthnew e(this)),this.g_aMs(),self.c3_callFunction=(e,a)=>this.g_aLO.g_SY(e,a),"preview"===this.g_amp&&(self.goToLastErrorScript=()=>this.g_aLa("runtime","go-to-last-error-script"))}async g_aMh(a,g){this.g_akl=document.createElement("canvas"),this.g_akl.style.display="none",document.body.appendChild(this.g_akl),window.c3canvas=this.g_akl,this.g_aLN=s.map(e=>new e(this)),this.g_aMs();const t=a.g_aL$.map(e=>new URL(e%2cthis.html).toString());if(Array.isArray(a.g_aMp)&&t.unshift(...a.g_aMp),await Promise.all(t.map(a=>_(a))),a.g_aMt&&0_(a[1]))),Object.values(e).some(e=>!e))return void self.setTimeout(()=>this.g_aMu(e),100)}catch(g){return console.error("[Preview] Error loading project scripts: ",g),void self.setTimeout(()=>this.g_aMu(e),100)}}if("preview"===this.g_amp&&"object"!=typeof self.g_aQ.g_aKW)return console.error("[C3 runtime] Failed to load JavaScript code used in events. Check all your JavaScript code has valid syntax."),void alert("Failed to load JavaScript code used in events. Check all your JavaScript code has valid syntax.");const n=Object.assign(this.g_aMk(a),{isInWorker:!1,messagePort:g,canvas:this.g_akl,runOnStartupFunctions:l});this.g_aLM=self.C3_CreateRuntime(n),await self.C3_InitRuntime(this.g_aLM,n)}g_aMu(e){const a=Object.entries(e).filter(e=>!e[1]).map(e=>e[0]),g=`Failed to load project script '${a[0]}'. Check all your JavaScript code has valid syntax.`;console.error("[Preview] "+g),alert(g)}async g_aLW(){const e=await this.g_aoa.g_aMv();return{outputPort:e,transferables:[e]}}g_aLf(){if(this.g_aLF)throw new Error("not available in worker mode");return this.g_aLM}g_aLa(g,a,_,t,n){this.g_aLH.postMessage({type:"event",component:g,handler:a,dispatchOpts:t||null,data:_,responseId:null},this.g_aLT?void 0:n)}g_aLc(_,a,t,n,i){const e=Q++,o=new Promise((g,a)=>{u.set(e,{resolve:g,reject:a})});return this.g_aLH.postMessage({type:"event",component:_,handler:a,dispatchOpts:n||null,data:t,responseId:e},this.g_aLT?void 0:i),o}["_OnMessageFromRuntime"](e){const a=e.type;if("event"===a)this.g_aMw(e);else if("result"===a)this.g_aMx(e);else if("runtime-ready"===a)this.g_aMy();else if("alert"===a)alert(e.message);else throw new Error(`unknown message '${a}'`)}g_aMw(_){const t=_.component,n=_.handler,a=_.data,o=_.responseId,e=i.get(t);if(!e)return void console.warn(`[DOM] No event handlers for component '${t}'`);const r=e.get(n);if(!r)return void console.warn(`[DOM] No handler '${n}' for component '${t}'`);let g=null;try{g=r(a)}catch(e){return console.error(`Exception in '${t}' handler '${n}':`,e),void(null!==o&&this.g_aMz(o,!1,e.toString()))}null!==o&&(g&&g.then?g.then(e=>this.g_aMz(o,!0,e)).catch(e=>{console.error(`Rejection from '${t}' handler '${n}':`,e),this.g_aMz(o,!1,e.toString())}):this.g_aMz(o,!0,g))}g_aMz(e,a,g){let _;g&&g.transferables&&(_=g.transferables),this.g_aLH.postMessage({type:"result",responseId:e,isOk:a,result:g},_)}g_aMx(g){const a=g.responseId,_=g.isOk,t=g.result,n=u.get(a);_?n.resolve(t):n.reject(t),u.delete(a)}g_aLh(e,a,g){let _=i.get(e);if(_||(_=new Map,i.set(e,_)),_.has(a))throw new Error(`[DOM] Component '${e}' already has handler '${a}'`);_.set(a,g)}static g_aMA(e){if(s.includes(e))throw new Error("DOM handler already added");s.push(e)}g_aMs(){for(const e of this.g_aLN)if("runtime"===e.g_aLk())return void(this.g_aLO=e);throw new Error("cannot find runtime DOM handler")}g_aMc(e){this.g_aLa("debugger","message",e)}g_aMy(){for(const e of this.g_aLN)e.g_aK_()}static g_alw(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)}async g_aMB(){return await this.g_aLc("runtime","get-remote-preview-status-info")}g_aLl(e){this.g_aLR.push(e),this.g_aMC()}g_aLm(e){const a=this.g_aLR.indexOf(e);if(-1===a)throw new Error("invalid callback");this.g_aLR.splice(a,1),this.g_aLR.length||this.g_aLX()}g_aMC(){-1===this.g_akU&&this.g_aLR.length&&(this.g_akU=requestAnimationFrame(this.g_aLP))}g_aLX(){-1!==this.g_akU&&(cancelAnimationFrame(this.g_akU),this.g_akU=-1)}g_aLQ(){this.g_akU=-1;for(const e of this.g_aLR)e();this.g_aMC()}g_aMD(e){this.g_aLO.g_aMD(e)}g_aME(e){this.g_aLO.g_aME(e)}g_aMF(){this.g_aLO.g_aMF()}g_aDV(e){this.g_aLO.g_aDV(e)}g_AP(e){return!!r[e]}async g_adu(e){const a=await this.g_aLc("runtime","opus-decode",{arrayBuffer:e},null,[e]);return new Float32Array(a)}g_fS(e){return /^(?:[a-z]+:)?\/\//.test(e)||"data:"===e.substr(0,5)||"blob:"===e.substr(0,5)}g_fT(e){return!this.g_fS(e)}async g_aLV(e){const a=e.filename;switch(e.as){case"text":return await this.g_At(a);case"buffer":return await this.g_As(a);default:throw new Error("unsupported type");}}g_aMG(e){const g=window.cordova.file.applicationDirectory+"www/"+e.toLowerCase();return new Promise((e,a)=>{window.resolveLocalFileSystemURL(g,g=>{g.file(e,a)},a)})}async g_At(e){const a=await this.g_aMG(e);return await t(a)}g_aMH(){if(e.length&&!(8<=g)){g++;const _=e.shift();this.g_aMI(_.filename,_.g_aMJ,_.g_aMK)}}g_As(_){return new Promise((t,n)=>{e.push({filename:_,g_aMJ:e=>{g--,this.g_aMH(),t(e)},g_aMK:e=>{g--,this.g_aMH(),n(e)}}),this.g_aMH()})}async g_aMI(g,a,e){try{const _=await this.g_aMG(g),t=await n(_);a(t)}catch(g){e(g)}}async g_aL_(){const e=[];for(const[a,g]of Object.entries(this.g_aLU))e.push(this.g_aML(a,g));await Promise.all(e)}async g_aML(e,a){if("object"==typeof a)this.g_aLU[e]=new Blob([a.str],{type:a.type});else{const g=await fetch(a),_=await g.blob();this.g_aLU[e]=_}}g_aMf(){let e=null;const g=new Promise(a=>e=a),_=new ArrayBuffer(1),t=new MessageChannel;return t.port2.onmessage=a=>{a.data&&a.data.arrayBuffer||(this.g_aLT=!0,console.warn("MessageChannel transfers determined to be broken. Disabling transferables.")),e()},t.port1.postMessage({arrayBuffer:_},[_]),g}}}{function _(e){return e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||e.originalEvent&&e.originalEvent.sourceCapabilities&&e.originalEvent.sourceCapabilities.firesTouchEvents}function t(e){return new Promise((a,g)=>{const _=document.createElement("link");_.onload=()=>a(_),_.onerror=e=>g(e),_.rel="stylesheet",_.href=e,document.head.appendChild(_)})}function a(e){return new Promise((a,g)=>{const _=new Image;_.onload=()=>a(_),_.onerror=e=>g(e),_.src=e})}async function r(e){const g=URL.createObjectURL(e);try{return await a(g)}finally{URL.revokeObjectURL(g)}}function s(e){do{if(e.parentNode&&e.hasAttribute("contenteditable"))return!0;e=e.parentNode}while(e);return!1}function d(e){const a=e.target.tagName.toLowerCase();l.has(a)&&e.preventDefault()}function e(e){(e.metaKey||e.ctrlKey)&&e.preventDefault()}function g(){try{return window.parent&&window.parent.document.hasFocus()}catch(e){return!1}}const u=new Map([["OSLeft","MetaLeft"],["OSRight","MetaRight"]]),i={dispatchRuntimeEvent:!0,dispatchUserScriptEvent:!0},Q={dispatchUserScriptEvent:!0},c={dispatchRuntimeEvent:!0},l=new Set(["canvas","body","html"]);self.C3_RasterSvgImage=async function(g,a,_){const t=document.createElement("canvas");t.width=a,t.height=_;const n=t.getContext("2d");return n.drawImage(g,0,0,a,_),t};let p=!1;document.addEventListener("pause",()=>p=!0),document.addEventListener("resume",()=>p=!1);const n=class extends g_aKX{constructor(g){super(g,"runtime"),this.g_aMM=!0,this.g_aMN=-1,this.g_aMO="any",this.g_aMP=!1,this.g_aMQ=!1,this.g_aMR=null,g.g_aLh("canvas","update-size",e=>this.g_aMS(e)),g.g_aLh("runtime","invoke-download",e=>this.g_aMT(e)),g.g_aLh("runtime","raster-svg-image",e=>this.g_aMU(e)),g.g_aLh("runtime","set-target-orientation",e=>this.g_aMV(e)),g.g_aLh("runtime","register-sw",()=>this.g_aMW()),g.g_aLh("runtime","post-to-debugger",e=>this.g_aMX(e)),g.g_aLh("runtime","go-to-script",e=>this.g_aMX(e)),g.g_aLh("runtime","before-start-ticking",()=>this.g_aMY()),g.g_aLh("runtime","debug-highlight",e=>this.g_aMZ(e)),g.g_aLh("runtime","enable-device-orientation",()=>this.g_aM_()),g.g_aLh("runtime","enable-device-motion",()=>this.g_aM$()),g.g_aLh("runtime","add-stylesheet",e=>this.g_aNa(e));const _=new Set(["input","textarea","datalist"]);window.addEventListener("contextmenu",e=>{const a=e.target,g=a.tagName.toLowerCase();_.has(g)||s(a)||e.preventDefault()}),window.addEventListener("selectstart",d),window.addEventListener("gesturehold",d),window.addEventListener("touchstart",d,{passive:!1});const a=g.g_aLY();"undefined"==typeof PointerEvent?a.addEventListener("touchstart",d):(window.addEventListener("pointerdown",d,{passive:!1}),a.addEventListener("pointerdown",d)),this.g_aNb=0,window.addEventListener("mousedown",e=>{1===e.button&&e.preventDefault()}),window.addEventListener("mousewheel",e,{passive:!1}),window.addEventListener("wheel",e,{passive:!1}),window.addEventListener("resize",()=>this.g_alj()),this.g_aNc=new Set,this.g_aNd=new WeakSet,this.g_aDb=!1}g_aMY(){return document.addEventListener("visibilitychange",()=>this.g_aoc(document.hidden)),document.addEventListener("pause",()=>this.g_aoc(!0)),document.addEventListener("resume",()=>this.g_aoc(!1)),{isSuspended:!!(document.hidden||p)}}g_aK_(){window.addEventListener("focus",()=>this.g_aNe("window-focus")),window.addEventListener("blur",()=>{this.g_aNe("window-blur",{parentHasFocus:g()}),this.g_aNb=0}),window.addEventListener("fullscreenchange",()=>this.g_alk()),window.addEventListener("webkitfullscreenchange",()=>this.g_alk()),window.addEventListener("mozfullscreenchange",()=>this.g_alk()),window.addEventListener("fullscreenerror",e=>this.g_all(e)),window.addEventListener("webkitfullscreenerror",e=>this.g_all(e)),window.addEventListener("mozfullscreenerror",e=>this.g_all(e)),window.addEventListener("keydown",e=>this.g_aNf("keydown",e)),window.addEventListener("keyup",e=>this.g_aNf("keyup",e)),window.addEventListener("dblclick",e=>this.g_aNg("dblclick",e,i)),window.addEventListener("wheel",e=>this.g_aNh("wheel",e)),"undefined"==typeof PointerEvent?(window.addEventListener("mousedown",e=>this.g_aNi("pointerdown",e)),window.addEventListener("mousemove",e=>this.g_aNi("pointermove",e)),window.addEventListener("mouseup",e=>this.g_aNi("pointerup",e)),window.addEventListener("touchstart",e=>this.g_aNj("pointerdown",e)),window.addEventListener("touchmove",e=>this.g_aNj("pointermove",e)),window.addEventListener("touchend",e=>this.g_aNj("pointerup",e)),window.addEventListener("touchcancel",e=>this.g_aNj("pointercancel",e))):(window.addEventListener("pointerdown",e=>this.g_aNk("pointerdown",e)),window.addEventListener("pointermove",e=>this.g_aNk("pointermove",e)),window.addEventListener("pointerup",e=>this.g_aNk("pointerup",e)),window.addEventListener("pointercancel",e=>this.g_aNk("pointercancel",e)));const e=()=>this.g_aMF();window.addEventListener("pointerup",e,!0),window.addEventListener("touchend",e,!0),window.addEventListener("click",e,!0),window.addEventListener("keydown",e,!0),window.addEventListener("gamepadconnected",e,!0)}g_aNe(e,a){this.g_aK$(e,a||null,c)}g_alj(){const e=window.innerWidth,a=window.innerHeight;this.g_aNe("window-resize",{innerWidth:e,innerHeight:a,devicePixelRatio:window.devicePixelRatio}),this.g_aog.g_aoy()&&(-1!==this.g_aMN&&clearTimeout(this.g_aMN),this.g_aNl(e,a,0))}g_aNm(e,a,g){-1!==this.g_aMN&&clearTimeout(this.g_aMN),this.g_aMN=setTimeout(()=>this.g_aNl(e,a,g),48)}g_aNl(g,a,_){const t=window.innerWidth,n=window.innerHeight;this.g_aMN=-1,t!=g||n!=a?this.g_aNe("window-resize",{innerWidth:t,innerHeight:n,devicePixelRatio:window.devicePixelRatio}):10>_&&this.g_aNm(t,n,_+1)}g_aMV(e){this.g_aMO=e.targetOrientation}g_aNn(){const e=this.g_aMO;if(screen.orientation&&screen.orientation.lock)screen.orientation.lock(e).catch(e=>console.warn("[Construct 3] Failed to lock orientation: ",e));else try{let a=!1;screen.lockOrientation?a=screen.lockOrientation(e):screen.webkitLockOrientation?a=screen.webkitLockOrientation(e):screen.mozLockOrientation?a=screen.mozLockOrientation(e):screen.msLockOrientation&&(a=screen.msLockOrientation(e)),a||console.warn("[Construct 3] Failed to lock orientation")}catch(e){console.warn("[Construct 3] Failed to lock orientation: ",e)}}g_alk(){const e=g_aLE.g_alw();e&&"any"!==this.g_aMO&&this.g_aNn(),this.g_aK$("fullscreenchange",{isFullscreen:e,innerWidth:window.innerWidth,innerHeight:window.innerHeight})}g_all(e){console.warn("[Construct 3] Fullscreen request failed: ",e),this.g_aK$("fullscreenerror",{isFullscreen:g_aLE.g_alw(),innerWidth:window.innerWidth,innerHeight:window.innerHeight})}g_aoc(e){e?this.g_aog.g_aLX():this.g_aog.g_aMC(),this.g_aK$("visibilitychange",{hidden:e})}g_aNf(e,a){const g=u.get(a.code)||a.code;this.g_aLd(e,{code:g,key:a.key,which:a.which,repeat:a.repeat,altKey:a.altKey,ctrlKey:a.ctrlKey,metaKey:a.metaKey,shiftKey:a.shiftKey,timeStamp:a.timeStamp},i)}g_aNh(e,a){this.g_aK$(e,{clientX:a.clientX,clientY:a.clientY,deltaX:a.deltaX,deltaY:a.deltaY,deltaZ:a.deltaZ,deltaMode:a.deltaMode,timeStamp:a.timeStamp},i)}g_aNg(a,e,g){_(e)||("mousedown"===a&&window!==window.top&&window.focus(),this.g_aLd(a,{button:e.button,buttons:e.buttons,clientX:e.clientX,clientY:e.clientY,timeStamp:e.timeStamp},g))}g_aNi(a,e){if(!_(e)){"pointerdown"===a&&window!==window.top&&window.focus();const g=this.g_aNb;"pointerdown"===a&&0!==g?a="pointermove":"pointerup"==a&&0!==e.buttons&&(a="pointermove"),this.g_aLd(a,{pointerId:1,pointerType:"mouse",button:e.button,buttons:e.buttons,lastButtons:g,clientX:e.clientX,clientY:e.clientY,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,timeStamp:e.timeStamp},i),this.g_aNb=e.buttons,this.g_aNg(e.type,e,Q)}}g_aNk(e,a){"pointerdown"===e&&window!==window.top&&window.focus();let g=0;if("mouse"===a.pointerType&&(g=this.g_aNb),this.g_aLd(e,{pointerId:a.pointerId,pointerType:a.pointerType,button:a.button,buttons:a.buttons,lastButtons:g,clientX:a.clientX,clientY:a.clientY,width:a.width||0,height:a.height||0,pressure:a.pressure||0,tangentialPressure:a.tangentialPressure||0,tiltX:a.tiltX||0,tiltY:a.tiltY||0,twist:a.twist||0,timeStamp:a.timeStamp},i),"mouse"===a.pointerType){let g="mousemove";"pointerdown"===e?g="mousedown":"pointerup"==e&&(g="pointerup"),this.g_aNg(g,a,Q),this.g_aNb=a.buttons}}g_aNj(e,a){"pointerdown"===e&&window!==window.top&&window.focus();for(let g=0,_=a.changedTouches.length;g<_;++g){const _=a.changedTouches[g];this.g_aLd(e,{pointerId:_.identifier,pointerType:"touch",button:0,buttons:0,lastButtons:0,clientX:_.clientX,clientY:_.clientY,width:2*(_.radiusX||_.webkitRadiusX||0),height:2*(_.radiusY||_.webkitRadiusY||0),pressure:_.force||_.webkitForce||0,tangentialPressure:0,tiltX:0,tiltY:0,twist:_.rotationAngle||0,timeStamp:a.timeStamp},i)}}g_aM_(){this.g_aMP||(this.g_aMP=!0,window.addEventListener("deviceorientation",e=>this.g_azV(e)))}g_aM$(){this.g_aMQ||(this.g_aMQ=!0,window.addEventListener("devicemotion",e=>this.g_azW(e)))}g_azV(e){this.g_aK$("deviceorientation",{alpha:e.alpha||0,beta:e.beta||0,gamma:e.gamma||0,timeStamp:e.timeStamp},i)}g_azW(_){let a=null;const t=_.acceleration;t&&(a={x:t.x||0,y:t.y||0,z:t.z||0});let n=null;const o=_.accelerationIncludingGravity;o&&(n={x:o.x||0,y:o.y||0,z:o.z||0});let e=null;const r=_.rotationRate;r&&(e={alpha:r.alpha||0,beta:r.beta||0,gamma:r.gamma||0}),this.g_aK$("devicemotion",{acceleration:a,accelerationIncludingGravity:n,rotationRate:e,interval:_.interval,timeStamp:_.timeStamp},i)}g_aMS(e){const a=this.g_aLj(),g=a.g_aLY();g.style.width=e.styleWidth+"px",g.style.height=e.styleHeight+"px",g.style.marginLeft=e.marginLeft+"px",g.style.marginTop=e.marginTop+"px",a.g_aMe(),this.g_aMM&&(g.style.display="",this.g_aMM=!1)}g_aMT(g){const _=g.url,t=g.filename,n=document.createElement("a"),e=document.body;n.textContent=t,n.href=_,n.download=t,e.appendChild(n),n.click(),e.removeChild(n)}async g_aMU(_){const a=_.blob,t=_.width,n=_.height,e=await r(a),i=await self.C3_RasterSvgImage(e,t,n);return await createImageBitmap(i)}async g_aNa(e){await t(e.url)}g_aMF(){const e=[...this.g_aNc];if(this.g_aNc.clear(),!this.g_aDb)for(const g of e){const e=g.play();e&&e.catch(()=>{this.g_aNd.has(g)||this.g_aNc.add(g)})}}g_aMD(e){if("function"!=typeof e.play)throw new Error("missing play function");this.g_aNd.delete(e);let a;try{a=e.play()}catch(a){return void this.g_aNc.add(e)}a&&a.catch(()=>{this.g_aNd.has(e)||this.g_aNc.add(e)})}g_aME(e){this.g_aNc.delete(e),this.g_aNd.add(e)}g_aDV(e){this.g_aDb=!!e}g_aMZ(e){const a=e.show;if(!a)return void(this.g_aMR&&(this.g_aMR.style.display="none"));this.g_aMR||(this.g_aMR=document.createElement("div"),this.g_aMR.id="inspectOutline",document.body.appendChild(this.g_aMR));const g=this.g_aMR;g.style.display="",g.style.left=e.left-1+"px",g.style.top=e.top-1+"px",g.style.width=e.width+2+"px",g.style.height=e.height+2+"px",g.textContent=e.name}g_aMW(){window.C3_RegisterSW&&window.C3_RegisterSW()}g_aMX(e){window.c3_postToMessagePort&&(e.from="runtime",window.c3_postToMessagePort(e))}g_SY(e,a){return this.g_aLb("js-invoke-function",{name:e,params:a})}};g_aLE.g_aMA(n)}{const e=document.currentScript.src;self.g_aMd=class{constructor(a){this.g_aNo=a,this.g_amk=e?e.substr(0,e.lastIndexOf("../../../index.html")+1):a.g_fg(),this.g_aql=Math.min(navigator.hardwareConcurrency||2,16),this.g_aNp=null,this.g_aNq=[],this.g_aqj=null,this.g_aNr=null}async g_ahs(){if(this.g_aNs)throw new Error("already initialised");this.g_aNs=!0;const e=this.g_aNo.g_aMi("dispatchworker.html");this.g_aNp=await this.g_aNo.g_aMj(e,this.g_amk,{name:"DispatchWorker"});const a=new MessageChannel;this.g_aqj=a.port1,this.g_aNp.postMessage({type:"_init","in-port":a.port2},[a.port2]),this.g_aNr=await this.g_aMv()}async g_aMv(){const g=this.g_aNq.length,a=this.g_aNo.g_aMi("jobworker.html"),_=await this.g_aNo.g_aMj(a,this.g_amk,{name:"JobWorker"+g}),t=new MessageChannel,n=new MessageChannel;return this.g_aNp.postMessage({type:"_addJobWorker",port:t.port1},[t.port1]),_.postMessage({type:"init",number:g,"dispatch-port":t.port2,"output-port":n.port2},[t.port2,n.port2]),this.g_aNq.push(_),n.port1}g_aMn(){return{inputPort:this.g_aqj,outputPort:this.g_aNr,maxNumWorkers:this.g_aql}}g_aMr(){return[this.g_aqj,this.g_aNr]}}}if("use strict",window.C3_IsSupported){"undefined"!=typeof OffscreenCanvas;window.c3_runtimeInterface=new g_aLE({g_aLG:!1,g_aMo:"workermain.js",g_aL$:["scripts/c3runtime.js"],g_aLJ:"scripts/",g_aMp:[],g_aLS:"html5"})}{const e=class extends g_aKX{constructor(e){super(e,"touch"),this.g_aLg("request-permission",e=>this.g_aNt(e))}async g_aNt(e){const a=e.type;let g=!0;0===a?g=await this.g_aNu():1===a&&(g=await this.g_aNv()),this.g_aK$("permission-result",{type:a,result:g})}async g_aNu(){if(!self.DeviceOrientationEvent||!self.DeviceOrientationEvent.requestPermission)return!0;try{const e=await self.DeviceOrientationEvent.requestPermission();return"granted"===e}catch(e){return console.warn("[Touch] Failed to request orientation permission: ",e),!1}}async g_aNv(){if(!self.DeviceMotionEvent||!self.DeviceMotionEvent.requestPermission)return!0;try{const e=await self.DeviceMotionEvent.requestPermission();return"granted"===e}catch(e){return console.warn("[Touch] Failed to request motion permission: ",e),!1}}};g_aLE.g_aMA(e)}{const e=class extends g_aKX{constructor(e){super(e,"browser"),this.g_amp="",this.g_aLg("get-initial-state",e=>this.g_aNw(e)),this.g_aLg("ready-for-sw-messages",()=>this.g_aNx()),this.g_aLg("alert",e=>this.g_aNy(e)),this.g_aLg("close",()=>this.g_aNz()),this.g_aLg("set-focus",e=>this.g_aLu(e)),this.g_aLg("vibrate",e=>this.g_aNA(e)),this.g_aLg("lock-orientation",e=>this.g_aNB(e)),this.g_aLg("unlock-orientation",()=>this.g_aNC()),this.g_aLg("navigate",e=>this.g_aND(e)),this.g_aLg("request-fullscreen",e=>this.g_aNE(e)),this.g_aLg("exit-fullscreen",()=>this.g_aNF()),window.addEventListener("online",()=>this.g_aBu(!0)),window.addEventListener("offline",()=>this.g_aBu(!1)),document.addEventListener("backbutton",()=>this.g_aNG()),"undefined"!=typeof Windows&&Windows.UI.Core.SystemNavigationManager.getForCurrentView().addEventListener("backrequested",e=>this.g_aNH(e))}g_aNw(e){return this.g_amp=e.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,isScirraArcade:"undefined"!=typeof window.is_scirra_arcade}}g_aNx(){window.C3_RegisterSW&&window.OfflineClientInfo&&window.OfflineClientInfo.SetMessageCallback(e=>this.g_aK$("sw-message",e.data))}g_aBu(e){this.g_aK$("online-state",{isOnline:e})}g_aNG(){this.g_aK$("backbutton")}g_aNH(e){e.handled=!0,this.g_aK$("backbutton")}g_aNI(){return"nwjs"===this.g_amp?nw.Window.get():null}g_aNy(e){alert(e.message)}g_aNz(){navigator.app&&navigator.app.exitApp?navigator.app.exitApp():navigator.device&&navigator.device.exitApp?navigator.device.exitApp():window.close()}g_aLu(e){const g=e.isFocus;if("nwjs"===this.g_amp){const e=this.g_aNI();g?e.focus():e.blur()}else g?window.focus():window.blur()}g_aNA(e){navigator.vibrate&&navigator.vibrate(e.pattern)}g_aNB(e){const g=e.orientation;if(screen.orientation&&screen.orientation.lock)screen.orientation.lock(g).catch(e=>console.warn("[Construct 3] Failed to lock orientation: ",e));else try{let e=!1;screen.lockOrientation?e=screen.lockOrientation(g):screen.webkitLockOrientation?e=screen.webkitLockOrientation(g):screen.mozLockOrientation?e=screen.mozLockOrientation(g):screen.msLockOrientation&&(e=screen.msLockOrientation(g)),e||console.warn("[Construct 3] Failed to lock orientation")}catch(e){console.warn("[Construct 3] Failed to lock orientation: ",e)}}g_aNC(){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(e){}}g_aND(e){const a=e.type;if("back"===a)navigator.app&&navigator.app.backHistory?navigator.app.backHistory():window.back();else if("forward"===a)window.forward();else if("home"===a)window.g_aNJ();else if("reload"===a)location.reload();else if("url"===a){const a=e.url,g=e.target,_=e.exportType;"windows-uwp"===_&&"undefined"!=typeof Windows?Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri(a)):navigator.app&&navigator.app.loadUrl?navigator.app.loadUrl(a,{openExternal:!0}):"cordova"===_?window.open(a,"_system"):"preview"===_?window.open(a,"_blank"):!this.g_aBt&&(2===g?window.top.location=a:1===g?window.parent.location=a:window.location=a)}else if("new-window"===a){const a=e.url,g=e.tag,_=e.exportType;"windows-uwp"===_&&"undefined"!=typeof Windows?Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri(a)):navigator.app&&navigator.app.loadUrl?navigator.app.loadUrl(a,{openExternal:!0}):"cordova"===_?window.open(a,"_system"):window.open(a,g)}}g_aNE(e){const a={navigationUI:"auto"},g=e.navUI;1===g?a.navigationUI="hide":2===g&&(a.navigationUI="show");const _=document.documentElement;_.requestFullscreen?_.requestFullscreen(a):_.mozRequestFullScreen?_.mozRequestFullScreen(a):_.msRequestFullscreen?_.msRequestFullscreen(a):_.webkitRequestFullScreen&&("undefined"==typeof Element.ALLOW_KEYBOARD_INPUT?_.webkitRequestFullScreen():_.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT))}g_aNF(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}};g_aLE.g_aMA(e)}{function e(e,g){return e.length===g.length&&(e===g||e.toLowerCase()===g.toLowerCase())}const a=class extends g_aKX{constructor(e){super(e,"audio"),this.g_aNK=null,this.g_aNL=null,this.g_aNM=!1,this.g_aNN=()=>this.g_aNO(),this.g_aNP=[],this.g_aNQ=[],this.g_aNR=null,this.g_aNS="",this.g_aNT=-1,this.g_aNU=new Map,this.g_aDa=1,this.g_aDb=!1,this.g_aCP=0,this.g_aho=1,this.g_anB=0,this.g_aCS="HRTF",this.g_aCT="inverse",this.g_aNV=600,this.g_aCY=1e4,this.g_aCZ=1,this.g_aNW=!1,this.g_aNX=!1,this.g_aNY=this.g_aog.g_AP("audio/webm; codecs=opus"),this.g_aNZ=new Map,this.g_aN_=new Set,this.g_aN$=!1,this.g_aOa="",this.g_aOb=null,self.C3Audio_OnMicrophoneStream=(e,a)=>this.g_aOc(e,a),this.g_aOd=null,self.C3Audio_GetOutputStream=()=>this.g_aOe(),this.g_aLi([["create-audio-context",e=>this.g_aOf(e)],["play",e=>this.g_aOg(e)],["stop",e=>this.g_aOh(e)],["stop-all",()=>this.g_aOi()],["set-paused",e=>this.g_aOj(e)],["set-volume",e=>this.g_aOk(e)],["fade-volume",e=>this.g_aOl(e)],["set-master-volume",e=>this.g_aOm(e)],["set-muted",e=>this.g_aOn(e)],["set-silent",e=>this.g_aOo(e)],["set-looping",e=>this.g_aOp(e)],["set-playback-rate",e=>this.g_aOq(e)],["seek",e=>this.g_aOr(e)],["preload",e=>this.g_aOs(e)],["unload",e=>this.g_F_(e)],["unload-all",()=>this.g_aOt()],["set-suspended",e=>this.g_aOu(e)],["add-effect",e=>this.g_aOv(e)],["set-effect-param",e=>this.g_aOw(e)],["remove-effects",e=>this.g_aOx(e)],["tick",e=>this.g_Ip(e)],["load-state",e=>this.g_aOy(e)]])}async g_aOf(e){e.isWKWebView&&(this.g_aNW=!0),this.g_aCP=e.timeScaleMode,this.g_aCS=["equalpower","HRTF","soundfield"][e.panningModel],this.g_aCT=["linear","inverse","exponential"][e.distanceModel],this.g_aNV=e.refDistance,this.g_aCY=e.maxDistance,this.g_aCZ=e.rolloffFactor;const a={latencyHint:e.latencyHint};if("undefined"!=typeof AudioContext)this.g_aNK=new AudioContext(a);else if("undefined"!=typeof webkitAudioContext)this.g_aNK=new webkitAudioContext(a);else throw new Error("Web Audio API not supported");this.g_aNL=this.g_aNK.createGain(),this.g_aNL.connect(this.g_aNK.destination);const g=e.listenerPos;this.g_aNK.listener.setPosition(g[0],g[1],g[2]),this.g_aNK.listener.setOrientation(0,0,1,0,-1,0),window.addEventListener("pointerup",this.g_aNN,!0),window.addEventListener("touchend",this.g_aNN,!0),window.addEventListener("click",this.g_aNN,!0),window.addEventListener("keydown",this.g_aNN,!0),self.C3_GetAudioContextCurrentTime=()=>this.g_aOz();try{await Promise.all(e.preloadList.map(e=>this.g_aOA(e.originalUrl,e.url,e.type,!1)))}catch(e){console.error("[Construct 3] Preloading sounds failed: ",e)}return{sampleRate:this.g_aNK.sampleRate}}g_aNO(){if(!this.g_aNM){const e=this.g_aNK;"suspended"===e.state&&e.resume&&e.resume();const a=e.createBuffer(1,220,22050),g=e.createBufferSource();g.buffer=a,g.connect(e.destination),g.start(0),"running"===e.state&&(this.g_aNM=!0,window.removeEventListener("pointerup",this.g_aNN,!0),window.removeEventListener("touchend",this.g_aNN,!0),window.removeEventListener("click",this.g_aNN,!0),window.removeEventListener("keydown",this.g_aNN,!0),this.g_aNN=null)}}g_aOB(){return this.g_aNK}g_aOz(){return this.g_aNK.currentTime}g_aOC(){return this.g_aNL}g_aOD(e){const a=this.g_aNZ.get(e.toLowerCase());return a?a[0].g_aOE():this.g_aOC()}g_aOF(e,g){e=e.toLowerCase();let _=this.g_aNZ.get(e);_||(_=[],this.g_aNZ.set(e,_)),g.g_aiX(_.length),g.g_aOG(e),_.push(g),this.g_aOH(e)}g_aOH(e){let a=this.g_aOC();const g=this.g_aNZ.get(e);if(g&&g.length){a=g[0].g_aOE();for(let e=0,a=g.length;e{const a=this.g_aNK.createBuffer(1,e.length,48e3),g=a.getChannelData(0);return g.set(e),a}):new Promise((a,g)=>{this.g_aNK.decodeAudioData(e,a,g)})}g_aMD(e){this.g_aog.g_aMD(e)}g_aME(e){this.g_aog.g_aME(e)}g_aOW(a){let g=0;for(let _=0,e=this.g_aNQ.length;_g=e);a={g_aPg:0,promise:_,resolve:g},this.g_aNU.set(e,a)}a.g_aPg++}g_aPh(e){const a=this.g_aNU.get(e);if(!a)throw new Error("expected pending tag");a.g_aPg--,0===a.g_aPg&&(a.resolve(),this.g_aNU.delete(e))}g_aPi(e){e||(e=this.g_aNS);const g=this.g_aNU.get(e);return g?g.promise:Promise.resolve()}g_aPj(){if(0a.g_VJ()).map(a=>a.g_aPk());this.g_aK$("state",{tickCount:this.g_aNT,audioInstances:a,analysers:[...this.g_aN_].map(a=>a.g_aPl())}),0===a.length&&0===this.g_aN_.size&&this.g_abq()}g_aPm(e,a){this.g_aK$("trigger",{type:e,tag:a})}async g_aOg(_){const a=_.originalUrl,t=_.url,n=_.type,o=_.isMusic,e=_.tag,r=_.isLooping,g=_.vol,s=_.pos,i=_.panning;let d=_.off;if(0t||t>=g.length||(g[t].g_aPJ(n,i,e,o),this.g_aPI())}g_aOx(e){const a=e.tag.toLowerCase(),g=this.g_aNZ.get(a);if(g&&g.length){for(const e of g)e.g_em();this.g_aNZ.delete(a),this.g_aOH(a)}}g_aPK(e){this.g_aN_.add(e),this.g_aPj()}g_aPL(e){this.g_aN_.delete(e)}g_aPI(){this.g_aN$||(this.g_aN$=!0,Promise.resolve().then(()=>this.g_aPM()))}g_aPM(){const e={};for(const[a,g]of this.g_aNZ)e[a]=g.map(e=>e.g_aPk());this.g_aK$("fxstate",{fxstate:e}),this.g_aN$=!1}async g_aOy(e){const g=e.saveLoadMode;if(3!==g)for(const e of this.g_aNQ)e.g_aOZ()&&1===g||!e.g_aOZ()&&2===g||e.g_Iz();for(const g of this.g_aNZ.values())for(const e of g)e.g_em();this.g_aNZ.clear(),this.g_aho=e.timeScale,this.g_anB=e.gameTime;const a=e.listenerPos;this.g_aNK.listener.setPosition(a[0],a[1],a[2]),this.g_aDb=e.isSilent,this.g_aog.g_aDV(this.g_aDb),this.g_aDa=e.masterVolume;const _=[];for(const a of Object.values(e.effects))_.push(Promise.all(a.map(e=>this.g_aOv(e))));await Promise.all(_),await Promise.all(e.playing.map(e=>this.g_aPN(e,g))),this.g_aPj()}async g_aPN(_,a){if(3===a)return;const t=_.bufferOriginalUrl,n=_.bufferUrl,o=_.bufferType,e=_.isMusic,r=_.tag,g=_.isLooping,s=_.volume,i=_.playbackTime;if(e&&1===a)return;if(!e&&2===a)return;let d=null;try{d=await this.g_aPc(t,n,o,r,e)}catch(e){return void console.error("[Construct 3] Audio: error loading audio state: ",e)}d.g_aPO(_.pan),d.g_KQ(g,s,i,0),_.isPlaying||d.g_aPq(),d.g_aPP(_)}g_aOc(e,a){this.g_aOb&&this.g_aOb.disconnect(),this.g_aOa=a.toLowerCase(),this.g_aOb=this.g_aNK.createMediaStreamSource(e),this.g_aOb.connect(this.g_aOD(this.g_aOa))}g_aOe(){return this.g_aOd||(this.g_aOd=this.g_aNK.createMediaStreamDestination(),this.g_aNL.connect(this.g_aOd)),this.g_aOd.stream}};g_aLE.g_aMA(a)}"use strict",self.g_aPb=class{constructor(g,a,_,t,n){this.g_aPQ=g,this.g_aPR=a,this.g_Bd=_,this.g_ko=t,this.g_aPS=n,this.g_aPT="",this.g_aPU="not-loaded",this.g_Bi=null}g_em(){this.g_aPU="not-loaded",this.g_aPQ=null,this.g_Bi=null}static g_pB(g,a,_,t,n){const e="audio/webm; codecs=opus"===t&&!g.g_aOO();return n&&e&&g.g_aOP(),!n||g.g_aON()||e?new g_aPV(g,a,_,t,n,e):new g_aPW(g,a,_,t,n)}g_adJ(e){return"html5"===this.g_aPT?new g_aPX(this.g_aPQ,this,e):new g_aPY(this.g_aPQ,this,e)}g_FU(){}g_AE(){return this.g_Bi||(this.g_Bi=this.g_FU()),this.g_Bi}g_Bj(){}g_aPZ(){}g_aP_(){return"failed"===this.g_aPU}g_aOB(){return this.g_aPQ.g_aOB()}g_aP$(){return this.g_aPT}g_aQa(){return this.g_aPR}g_aPa(){return this.g_Bd}g_aQb(){return this.g_ko}g_aOZ(){return this.g_aPS}g_afk(){}},"use strict",self.g_aPW=class extends g_aPb{constructor(g,a,_,t,n){super(g,a,_,t,n),this.g_aPT="html5",this.g_aQc=new Audio,this.g_aQc.crossOrigin="anonymous",this.g_aQc.autoplay=!1,this.g_aQc.preload="auto",this.g_aQd=null,this.g_aQe=null,this.g_aQf=!1,this.g_aQc.addEventListener("canplaythrough",()=>this.g_aQf=!0),this.g_aQg=this.g_aOB().createGain(),this.g_aQh=null,this.g_aQc.addEventListener("canplay",()=>{this.g_aQd&&(this.g_aPU="loaded",this.g_aQd(),this.g_aQd=null,this.g_aQe=null),this.g_aQh||!this.g_aQc||(this.g_aQh=this.g_aOB().createMediaElementSource(this.g_aQc),this.g_aQh.connect(this.g_aQg))}),this.onended=null,this.g_aQc.addEventListener("ended",()=>{this.onended&&this.onended()}),this.g_aQc.addEventListener("error",e=>this.g_aQi(e))}g_em(){this.g_aPQ.g_aOW(this),this.g_aQg.disconnect(),this.g_aQg=null,this.g_aQh.disconnect(),this.g_aQh=null,this.g_aQc&&!this.g_aQc.paused&&this.g_aQc.pause(),this.onended=null,this.g_aQc=null,super.g_em()}g_FU(){return this.g_aPU="loading",new Promise((e,a)=>{this.g_aQd=e,this.g_aQe=a,this.g_aQc.src=this.g_Bd})}g_aQi(e){console.error(`[Construct 3] Audio '${this.g_Bd}' error: `,e),this.g_aQe&&(this.g_aPU="failed",this.g_aQe(e),this.g_aQd=null,this.g_aQe=null)}g_Bj(){const e=4<=this.g_aQc.readyState;return e&&(this.g_aQf=!0),e||this.g_aQf}g_aPZ(){return this.g_Bj()}g_aQj(){return this.g_aQc}g_aQk(){return this.g_aQg}g_afk(){return this.g_aQc.duration}},"use strict",self.g_aPV=class extends g_aPb{constructor(g,a,_,t,n,e){super(g,a,_,t,n),this.g_aPT="webaudio",this.g_aQl=null,this.g_aQm=null,this.g_aQn=!!e}g_em(){this.g_aPQ.g_aOW(this),this.g_aQl=null,this.g_aQm=null,super.g_em()}async g_aQo(){if(this.g_aQl)return this.g_aQl;const e=this.g_aPQ.g_aLj();if("cordova"===e.g_apG()&&e.g_fT(this.g_Bd))this.g_aQl=await e.g_As(this.g_Bd);else{const e=await fetch(this.g_Bd);if(!e.ok)throw new Error(`error fetching audio data: ${e.status} ${e.statusText}`);this.g_aQl=await e.arrayBuffer()}}async g_aQp(){return this.g_aQm?this.g_aQm:void(this.g_aQm=await this.g_aPQ.g_aOV(this.g_aQl,this.g_aQn),this.g_aQl=null)}async g_FU(){try{this.g_aPU="loading",await this.g_aQo(),await this.g_aQp(),this.g_aPU="loaded"}catch(e){this.g_aPU="failed",console.error(`[Construct 3] Failed to load audio '${this.g_Bd}': `,e)}}g_Bj(){return!!(this.g_aQl||this.g_aQm)}g_aPZ(){return!!this.g_aQm}g_aPy(){return this.g_aQm}g_afk(){return this.g_aQm?this.g_aQm.duration:0}},"use strict";{function _(g){return g*e}const e=180/Math.PI;self.g_aQq=class{constructor(e,a,g){this.g_aPQ=e,this.g_vg=a,this.g_aQr=g,this.g_aQs=this.g_aOB().createGain(),this.g_aQs.connect(this.g_aOC()),this.g_aQt=null,this.g_aQu=!1,this.g_St=!0,this.g_aQv=!1,this.g_aQw=!1,this.g_ZC=!1,this.g_aQx=1,this.g_aQy=!1,this.g_Jw=1;const _=this.g_aPQ.g_aOM();this.g_aQz=1===_&&!this.g_aOZ()||2===_,this.g_aQA=-1,this.g_aQB=-1,this.g_aQC=!1}g_em(){this.g_aPQ=null,this.g_vg=null,this.g_aQt&&(this.g_aQt.disconnect(),this.g_aQt=null),this.g_aQs.disconnect(),this.g_aQs=null}g_aOB(){return this.g_aPQ.g_aOB()}g_aOC(){return this.g_aPQ.g_aOD(this.g_aQr)}g_aOL(){return this.g_aPQ.g_aOL()}g_aQD(){return this.g_aQz?this.g_aPQ.g_EK():performance.now()/1e3}g_aQa(){return this.g_vg.g_aQa()}g_aPa(){return this.g_vg.g_aPa()}g_aQb(){return this.g_vg.g_aQb()}g_aOX(){return this.g_vg}g_aOZ(){return this.g_vg.g_aOZ()}g_aPe(e){this.g_aQr=e}g_aO_(){return this.g_aQr}g_aO$(){}g_aPd(){}g_Kf(){return!this.g_St&&!this.g_aQv&&!this.g_aO$()}g_VJ(){return!this.g_St&&!this.g_aO$()}g_aQE(){}g_afk(e){let a=this.g_vg.g_afk();return e&&(a/=this.g_Jw||.001),a}g_KQ(){}g_Iz(){}g_aPq(){}g_aQF(){return this.g_aQv}g_KP(){}g_aDO(e){this.g_aQx=e,this.g_aQs.gain.cancelScheduledValues(0),this.g_aQB=-1,this.g_aQs.gain.value=this.g_aQG()}g_aDP(g,_,t){if(!this.g_aQH()){g*=this.g_aOL();const a=this.g_aQs.gain;a.cancelScheduledValues(0);const n=this.g_aPQ.g_aOz(),e=n+_;a.setValueAtTime(this.g_aQG(),n),a.linearRampToValueAtTime(g,e),this.g_aQx=g,this.g_aQB=e,this.g_aQC=t}}g_aPr(){this.g_aDO(this.g_aQx)}g_Jj(e){-1!==this.g_aQB&&e>=this.g_aQB&&(this.g_aQB=-1,this.g_aQC&&this.g_Iz(),this.g_aPQ.g_aPm("fade-ended",this.g_aQr))}g_aQG(){const e=this.g_aQx*this.g_aOL();return isFinite(e)?e:0}g_aDN(e){e=!!e,this.g_aQy===e||(this.g_aQy=e,this.g_aPs())}g_aQH(){return this.g_aQy}g_aDE(){return this.g_aPQ.g_aDE()}g_aPs(){}g_aDM(){}g_Xr(){return this.g_ZC}g_Kc(e){this.g_Jw===e||(this.g_Jw=e,this.g_aPt())}g_aPt(){}g_Kd(){return this.g_Jw}g_aDU(){}g_aoV(){}g_aPn(e){e=!!e,this.g_aQu===e||(this.g_aQu=e,this.g_aQu?(!this.g_aQt&&(this.g_aQt=this.g_aOB().createPanner(),this.g_aQt.panningModel=this.g_aPQ.g_aOQ(),this.g_aQt.distanceModel=this.g_aPQ.g_aOR(),this.g_aQt.refDistance=this.g_aPQ.g_aOS(),this.g_aQt.maxDistance=this.g_aPQ.g_aOT(),this.g_aQt.rolloffFactor=this.g_aPQ.g_aOU()),this.g_aQs.disconnect(),this.g_aQs.connect(this.g_aQt),this.g_aQt.connect(this.g_aOC())):(this.g_aQt.disconnect(),this.g_aQs.disconnect(),this.g_aQs.connect(this.g_aOC())))}g_aPo(a,t,n,i,e,o){this.g_aQu&&(this.g_aPu(a,t,n),this.g_aQt.coneInnerAngle=_(i),this.g_aQt.coneOuterAngle=_(e),this.g_aQt.coneOuterGain=o)}g_aPu(e,a,g){this.g_aQu&&(this.g_aQt.setPosition(e,a,0),this.g_aQt.setOrientation(Math.cos(g),Math.sin(g),0))}g_aPp(e){this.g_aQA=e}g_CJ(){return this.g_aQA}g_aQI(){}g_aOK(e){const a=this.g_aQt||this.g_aQs;a.disconnect(),a.connect(e)}g_aPk(){return{tag:this.g_aQr,duration:this.g_afk(),volume:this.g_aQx,isPlaying:this.g_Kf(),playbackTime:this.g_aQE(),playbackRate:this.g_Kd(),uid:this.g_aQA,bufferOriginalUrl:this.g_aQa(),bufferUrl:"",bufferType:this.g_aQb(),isMusic:this.g_aOZ(),isLooping:this.g_Xr(),isMuted:this.g_aQH(),resumePosition:this.g_aQI(),pan:this.g_aQJ()}}g_aPP(e){this.g_Kc(e.playbackRate),this.g_aDN(e.isMuted)}g_aQJ(){if(!this.g_aQt)return null;const e=this.g_aQt;return{pos:[e.positionX.value,e.positionY.value,e.positionZ.value],orient:[e.orientationX.value,e.orientationY.value,e.orientationZ.value],cia:e.coneInnerAngle,coa:e.coneOuterAngle,cog:e.coneOuterGain,uid:this.g_aQA}}g_aPO(e){if(!e)return void this.g_aPn(!1);this.g_aPn(!0);const a=this.g_aQt;a.setPosition(...a.pos),a.setOrientation(...a.orient),a.coneInnerAngle=a.cia,a.coneOuterAngle=a.coa,a.coneOuterGain=a.cog,this.g_aQA=a.uid}}}"use strict",self.g_aPX=class extends g_aQq{constructor(e,a,g){super(e,a,g),this.g_vg.g_aQk().connect(this.g_aQs),this.g_vg.onended=()=>this.g_aQK()}g_em(){this.g_Iz(),this.g_vg.g_aQk().disconnect(),super.g_em()}g_aQj(){return this.g_vg.g_aQj()}g_aQK(){this.g_St=!0,this.g_aQA=-1,this.g_aPQ.g_aPm("ended",this.g_aQr)}g_aO$(){return this.g_aQj().ended}g_aPd(){return!!this.g_St||this.g_aO$()}g_aQE(e){let a=this.g_aQj().currentTime;return e&&(a*=this.g_Jw),this.g_ZC||(a=Math.min(a,this.g_afk())),a}g_KQ(e,a,g){const _=this.g_aQj();if(1!==_.playbackRate&&(_.playbackRate=1),_.loop!==e&&(_.loop=e),this.g_aDO(a),_.muted&&(_.muted=!1),_.currentTime!==g)try{_.currentTime=g}catch(e){console.warn(`[Construct 3] Exception seeking audio '${this.g_vg.g_aPa()}' to position '${g}': `,e)}this.g_aPQ.g_aMD(_),this.g_St=!1,this.g_aQv=!1,this.g_ZC=e,this.g_Jw=1}g_Iz(){const e=this.g_aQj();e.paused||e.pause(),this.g_aPQ.g_aME(e),this.g_St=!0,this.g_aQv=!1,this.g_aQA=-1}g_aPq(){if(!(this.g_aQv||this.g_St||this.g_aO$())){const e=this.g_aQj();e.paused||e.pause(),this.g_aPQ.g_aME(e),this.g_aQv=!0}}g_KP(){!this.g_aQv||this.g_St||this.g_aO$()||(this.g_aPQ.g_aMD(this.g_aQj()),this.g_aQv=!1)}g_aPs(){this.g_aQj().muted=this.g_aQy||this.g_aDE()}g_aDM(e){e=!!e,this.g_ZC===e||(this.g_ZC=e,this.g_aQj().loop=e)}g_aPt(){let e=this.g_Jw;this.g_aQz&&(e*=this.g_aPQ.g_Jh());try{this.g_aQj().playbackRate=e}catch(a){console.warn(`[Construct 3] Unable to set playback rate '${e}':`,a)}}g_aDU(e){if(!(this.g_St||this.g_aO$()))try{this.g_aQj().currentTime=e}catch(a){console.warn(`[Construct 3] Error seeking audio to '${e}': `,a)}}g_aQI(){return this.g_aQE()}g_aoV(e){e?this.g_Kf()?(this.g_aQj().pause(),this.g_aQw=!0):this.g_aQw=!1:this.g_aQw&&(this.g_aPQ.g_aMD(this.g_aQj()),this.g_aQw=!1)}},"use strict",self.g_aPY=class extends g_aQq{constructor(e,a,g){super(e,a,g),this.g_aQL=null,this.g_aQM=e=>this.g_aQK(e),this.g_aQN=!0,this.g_aQO=null,this.g_anw=0,this.g_aQP=0,this.g_aQQ=1}g_em(){this.g_Iz(),this.g_aQR(),this.g_aQM=null,super.g_em()}g_aQR(){this.g_aQL&&this.g_aQL.disconnect(),this.g_aQL=null,this.g_aQO=null}g_aQK(e){this.g_aQv||this.g_aQw||e.target!==this.g_aQO||(this.g_aQN=!0,this.g_St=!0,this.g_aQA=-1,this.g_aQR(),this.g_aPQ.g_aPm("ended",this.g_aQr))}g_aO$(){return!(!this.g_St&&this.g_aQL&&this.g_aQL.loop)&&!this.g_aQv&&this.g_aQN}g_aPd(){return!this.g_aQL||this.g_St||this.g_aO$()}g_aQE(e){let a=0;return a=this.g_aQv?this.g_aQP:this.g_aQD()-this.g_anw,e&&(a*=this.g_Jw),this.g_ZC||(a=Math.min(a,this.g_afk())),a}g_KQ(e,a,g,_){this.g_aQQ=1,this.g_aDO(a),this.g_aQR(),this.g_aQL=this.g_aOB().createBufferSource(),this.g_aQL.buffer=this.g_vg.g_aPy(),this.g_aQL.connect(this.g_aQs),this.g_aQO=this.g_aQL,this.g_aQL.onended=this.g_aQM,this.g_aQL.loop=e,this.g_aQL.start(_,g),this.g_aQN=!1,this.g_St=!1,this.g_aQv=!1,this.g_ZC=e,this.g_Jw=1,this.g_anw=this.g_aQD()-g}g_Iz(){this.g_aQL&&this.g_aQL.stop(0),this.g_St=!0,this.g_aQv=!1,this.g_aQA=-1}g_aPq(){this.g_aQv||this.g_St||this.g_aO$()||(this.g_aQP=this.g_aQE(!0),this.g_ZC&&(this.g_aQP%=this.g_afk()),this.g_aQv=!0,this.g_aQL.stop(0))}g_KP(){!this.g_aQv||this.g_St||this.g_aO$()||(this.g_aQR(),this.g_aQL=this.g_aOB().createBufferSource(),this.g_aQL.buffer=this.g_vg.g_aPy(),this.g_aQL.connect(this.g_aQs),this.g_aQO=this.g_aQL,this.g_aQL.onended=this.g_aQM,this.g_aQL.loop=this.g_ZC,this.g_aPr(),this.g_aPt(),this.g_anw=this.g_aQD()-this.g_aQP/(this.g_Jw||.001),this.g_aQL.start(0,this.g_aQP),this.g_aQv=!1)}g_aQG(){return super.g_aQG()*this.g_aQQ}g_aPs(){this.g_aQQ=this.g_aQy||this.g_aDE()?0:1,this.g_aPr()}g_aDM(e){e=!!e,this.g_ZC===e||(this.g_ZC=e,this.g_aQL&&(this.g_aQL.loop=e))}g_aPt(){let e=this.g_Jw;this.g_aQz&&(e*=this.g_aPQ.g_Jh()),this.g_aQL&&(this.g_aQL.playbackRate.value=e)}g_aDU(e){this.g_St||this.g_aO$()||(this.g_aQv?this.g_aQP=e:(this.g_aPq(),this.g_aQP=e,this.g_KP()))}g_aQI(){return this.g_aQP}g_aoV(e){e?this.g_Kf()?(this.g_aQw=!0,this.g_aQP=this.g_aQE(!0),this.g_ZC&&(this.g_aQP%=this.g_afk()),this.g_aQL.stop(0)):this.g_aQw=!1:this.g_aQw&&(this.g_aQR(),this.g_aQL=this.g_aOB().createBufferSource(),this.g_aQL.buffer=this.g_vg.g_aPy(),this.g_aQL.connect(this.g_aQs),this.g_aQO=this.g_aQL,this.g_aQL.onended=this.g_aQM,this.g_aQL.loop=this.g_ZC,this.g_aPr(),this.g_aPt(),this.g_anw=this.g_aQD()-this.g_aQP/(this.g_Jw||.001),this.g_aQL.start(0,this.g_aQP),this.g_aQw=!1)}g_aPP(e){super.g_aPP(e),this.g_aQP=e.resumePosition}},"use strict";{function g(e){return Math.pow(10,e/20)}function _(a){return Math.max(Math.min(g(a),1),0)}function t(e){return 20*(Math.log(e)/2.302585092994046)}function n(e){return t(Math.max(Math.min(e,1),0))}function i(e,a){return 1-Math.exp(-a*e)}class a{constructor(e){this.g_aPQ=e,this.g_aNK=e.g_aOB(),this.g_BS=-1,this.g_aQr="",this.g_ko="",this.g_aQS=null}g_em(){this.g_aNK=null}g_aiX(e){this.g_BS=e}g_Dl(){return this.g_BS}g_aOG(e){this.g_aQr=e}g_aO_(){return this.g_aQr}g_aQT(){return this.g_aNK.createGain()}g_aOE(){}g_aOI(){}g_aQU(g,a,_,t){if(g.cancelScheduledValues(0),0===t)return void(g.value=a);const n=this.g_aNK.currentTime;t+=n,0===_?g.setValueAtTime(a,t):1===_?(g.setValueAtTime(g.value,n),g.linearRampToValueAtTime(a,t)):2===_?(g.setValueAtTime(g.value,n),g.exponentialRampToValueAtTime(a,t)):void 0}g_aPk(){return{type:this.g_ko,tag:this.g_aQr,params:this.g_aQS}}}self.g_aPv=class extends a{constructor(_,a,t,n,i,e,o){super(_),this.g_ko="filter",this.g_aQS=[a,t,n,i,e,o],this.g_aQV=this.g_aQT(),this.g_aQW=this.g_aQT(),this.g_aQW.gain.value=o,this.g_aQX=this.g_aQT(),this.g_aQX.gain.value=1-o,this.g_aQY=this.g_aNK.createBiquadFilter(),this.g_aQY.type=a,this.g_aQY.frequency.value=t,this.g_aQY.detune.value=n,this.g_aQY.Q.value=i,this.g_aQY.gain.vlaue=e,this.g_aQV.connect(this.g_aQY),this.g_aQV.connect(this.g_aQX),this.g_aQY.connect(this.g_aQW)}g_em(){this.g_aQV.disconnect(),this.g_aQY.disconnect(),this.g_aQW.disconnect(),this.g_aQX.disconnect(),super.g_em()}g_aOI(e){this.g_aQW.disconnect(),this.g_aQW.connect(e),this.g_aQX.disconnect(),this.g_aQX.connect(e)}g_aOE(){return this.g_aQV}g_aPJ(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aQS[5]=a,this.g_aQU(this.g_aQW.gain,a,g,_),this.g_aQU(this.g_aQX.gain,1-a,g,_)):1===e?(this.g_aQS[1]=a,this.g_aQU(this.g_aQY.frequency,a,g,_)):2===e?(this.g_aQS[2]=a,this.g_aQU(this.g_aQY.detune,a,g,_)):3===e?(this.g_aQS[3]=a,this.g_aQU(this.g_aQY.Q,a,g,_)):4===e?(this.g_aQS[4]=a,this.g_aQU(this.g_aQY.gain,a,g,_)):void 0}},self.g_aPw=class extends a{constructor(e,a,g,_){super(e),this.g_ko="delay",this.g_aQS=[a,g,_],this.g_aQV=this.g_aQT(),this.g_aQW=this.g_aQT(),this.g_aQW.gain.value=_,this.g_aQX=this.g_aQT(),this.g_aQX.gain.value=1-_,this.g_aQZ=this.g_aQT(),this.g_aQ_=this.g_aNK.createDelay(a),this.g_aQ_.delayTime.value=a,this.g_aQ$=this.g_aQT(),this.g_aQ$.gain.value=g,this.g_aQV.connect(this.g_aQZ),this.g_aQV.connect(this.g_aQX),this.g_aQZ.connect(this.g_aQW),this.g_aQZ.connect(this.g_aQ_),this.g_aQ_.connect(this.g_aQ$),this.g_aQ$.connect(this.g_aQZ)}g_em(){this.g_aQV.disconnect(),this.g_aQW.disconnect(),this.g_aQX.disconnect(),this.g_aQZ.disconnect(),this.g_aQ_.disconnect(),this.g_aQ$.disconnect(),super.g_em()}g_aOI(e){this.g_aQW.disconnect(),this.g_aQW.connect(e),this.g_aQX.disconnect(),this.g_aQX.connect(e)}g_aOE(){return this.g_aQV}g_aPJ(g,a,t,n){0===g?(a=Math.max(Math.min(a/100,1),0),this.g_aQS[2]=a,this.g_aQU(this.g_aQW.gain,a,t,n),this.g_aQU(this.g_aQX.gain,1-a,t,n)):4===g?(this.g_aQS[1]=_(a),this.g_aQU(this.g_aQ$.gain,_(a),t,n)):5===g?(this.g_aQS[0]=a,this.g_aQU(this.g_aQ_.delayTime,a,t,n)):void 0}},self.g_aPx=class extends a{constructor(e,a,g,_){super(e),this.g_ko="convolution",this.g_aQS=[g,_],this.g_aRa="",this.g_aRb="",this.g_aRc="",this.g_aQV=this.g_aQT(),this.g_aQW=this.g_aQT(),this.g_aQW.gain.value=_,this.g_aQX=this.g_aQT(),this.g_aQX.gain.value=1-_,this.g_aRd=this.g_aNK.createConvolver(),this.g_aRd.normalize=g,this.g_aRd.buffer=a,this.g_aQV.connect(this.g_aRd),this.g_aQV.connect(this.g_aQX),this.g_aRd.connect(this.g_aQW)}g_em(){this.g_aQV.disconnect(),this.g_aRd.disconnect(),this.g_aQW.disconnect(),this.g_aQX.disconnect(),super.g_em()}g_aOI(e){this.g_aQW.disconnect(),this.g_aQW.connect(e),this.g_aQX.disconnect(),this.g_aQX.connect(e)}g_aOE(){return this.g_aQV}g_aPJ(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aQS[1]=a,this.g_aQU(this.g_aQW.gain,a,g,_),this.g_aQU(this.g_aQX.gain,1-a,g,_)):void 0}g_aPz(e,a,g){this.g_aRa=e,this.g_aRb=a,this.g_aRc=g}g_aPk(){const e=super.g_aPk();return e.bufferOriginalUrl=this.g_aRa,e.bufferUrl="",e.bufferType=this.g_aRc,e}},self.g_aPA=class extends a{constructor(g,a,_,t,n,e){super(g),this.g_ko="flanger",this.g_aQS=[a,_,t,n,e],this.g_aQV=this.g_aQT(),this.g_aQX=this.g_aQT(),this.g_aQX.gain.value=1-e/2,this.g_aQW=this.g_aQT(),this.g_aQW.gain.value=e/2,this.g_aRe=this.g_aQT(),this.g_aRe.gain.value=n,this.g_aQ_=this.g_aNK.createDelay(a+_),this.g_aQ_.delayTime.value=a,this.g_aRf=this.g_aNK.createOscillator(),this.g_aRf.frequency.value=t,this.g_aRg=this.g_aQT(),this.g_aRg.gain.value=_,this.g_aQV.connect(this.g_aQ_),this.g_aQV.connect(this.g_aQX),this.g_aQ_.connect(this.g_aQW),this.g_aQ_.connect(this.g_aRe),this.g_aRe.connect(this.g_aQ_),this.g_aRf.connect(this.g_aRg),this.g_aRg.connect(this.g_aQ_.delayTime),this.g_aRf.start(0)}g_em(){this.g_aRf.stop(0),this.g_aQV.disconnect(),this.g_aQ_.disconnect(),this.g_aRf.disconnect(),this.g_aRg.disconnect(),this.g_aQX.disconnect(),this.g_aQW.disconnect(),this.g_aRe.disconnect(),super.g_em()}g_aOI(e){this.g_aQW.disconnect(),this.g_aQW.connect(e),this.g_aQX.disconnect(),this.g_aQX.connect(e)}g_aOE(){return this.g_aQV}g_aPJ(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aQS[4]=a,this.g_aQU(this.g_aQW.gain,a/2,g,_),this.g_aQU(this.g_aQX.gain,1-a/2,g,_)):6===e?(this.g_aQS[1]=a/1e3,this.g_aQU(this.g_aRg.gain,a/1e3,g,_)):7===e?(this.g_aQS[2]=a,this.g_aQU(this.g_aRf.frequency,a,g,_)):8===e?(this.g_aQS[3]=a/100,this.g_aQU(this.g_aRe.gain,a/100,g,_)):void 0}},self.g_aPB=class extends a{constructor(_,a,t,n,i,e,o){super(_),this.g_ko="phaser",this.g_aQS=[a,t,n,i,e,o],this.g_aQV=this.g_aQT(),this.g_aQX=this.g_aQT(),this.g_aQX.gain.value=1-o/2,this.g_aQW=this.g_aQT(),this.g_aQW.gain.value=o/2,this.g_aQY=this.g_aNK.createBiquadFilter(),this.g_aQY.type="allpass",this.g_aQY.frequency.value=a,this.g_aQY.detune.value=t,this.g_aQY.Q.value=n,this.g_aRf=this.g_aNK.createOscillator(),this.g_aRf.frequency.value=e,this.g_aRg=this.g_aQT(),this.g_aRg.gain.value=i,this.g_aQV.connect(this.g_aQY),this.g_aQV.connect(this.g_aQX),this.g_aQY.connect(this.g_aQW),this.g_aRf.connect(this.g_aRg),this.g_aRg.connect(this.g_aQY.frequency),this.g_aRf.start(0)}g_em(){this.g_aRf.stop(0),this.g_aQV.disconnect(),this.g_aQY.disconnect(),this.g_aRf.disconnect(),this.g_aRg.disconnect(),this.g_aQX.disconnect(),this.g_aQW.disconnect(),super.g_em()}g_aOI(e){this.g_aQW.disconnect(),this.g_aQW.connect(e),this.g_aQX.disconnect(),this.g_aQX.connect(e)}g_aOE(){return this.g_aQV}g_aPJ(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aQS[5]=a,this.g_aQU(this.g_aQW.gain,a/2,g,_),this.g_aQU(this.g_aQX.gain,1-a/2,g,_)):1===e?(this.g_aQS[0]=a,this.g_aQU(this.g_aQY.frequency,a,g,_)):2===e?(this.g_aQS[1]=a,this.g_aQU(this.g_aQY.detune,a,g,_)):3===e?(this.g_aQS[2]=a,this.g_aQU(this.g_aQY.Q,a,g,_)):6===e?(this.g_aQS[3]=a,this.g_aQU(this.g_aRg.gain,a,g,_)):7===e?(this.g_aQS[4]=a,this.g_aQU(this.g_aRf.frequency,a,g,_)):void 0}},self.g_aPC=class extends a{constructor(e,a){super(e),this.g_ko="gain",this.g_aQS=[a],this.g_aRh=this.g_aQT(),this.g_aRh.gain.value=a}g_em(){this.g_aRh.disconnect(),super.g_em()}g_aOI(e){this.g_aRh.disconnect(),this.g_aRh.connect(e)}g_aOE(){return this.g_aRh}g_aPJ(g,a,t,n){4===g?(this.g_aQS[0]=_(a),this.g_aQU(this.g_aRh.gain,_(a),t,n)):void 0}},self.g_aPD=class extends a{constructor(e,a,g){super(e),this.g_ko="tremolo",this.g_aQS=[a,g],this.g_aRh=this.g_aQT(),this.g_aRh.gain.value=1-g/2,this.g_aRf=this.g_aNK.createOscillator(),this.g_aRf.frequency.value=a,this.g_aRg=this.g_aQT(),this.g_aRg.gain.value=g/2,this.g_aRf.connect(this.g_aRg),this.g_aRg.connect(this.g_aRh.gain),this.g_aRf.start(0)}g_em(){this.g_aRf.stop(0),this.g_aRf.disconnect(),this.g_aRg.disconnect(),this.g_aRh.disconnect(),super.g_em()}g_aOI(e){this.g_aRh.disconnect(),this.g_aRh.connect(e)}g_aOE(){return this.g_aRh}g_aPJ(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aQS[1]=a,this.g_aQU(this.g_aRh.gain.value,1-a/2,g,_),this.g_aQU(this.g_aRg.gain.value,a/2,g,_)):7===e?(this.g_aQS[0]=a,this.g_aQU(this.g_aRf.frequency,a,g,_)):void 0}},self.g_aPE=class extends a{constructor(e,a,g){super(e),this.g_ko="ringmod",this.g_aQS=[a,g],this.g_aQV=this.g_aQT(),this.g_aQW=this.g_aQT(),this.g_aQW.gain.value=g,this.g_aQX=this.g_aQT(),this.g_aQX.gain.value=1-g,this.g_aRi=this.g_aQT(),this.g_aRi.gain.value=0,this.g_aRf=this.g_aNK.createOscillator(),this.g_aRf.frequency.value=a,this.g_aRf.connect(this.g_aRi.gain),this.g_aRf.start(0),this.g_aQV.connect(this.g_aRi),this.g_aQV.connect(this.g_aQX),this.g_aRi.connect(this.g_aQW)}g_em(){this.g_aRf.stop(0),this.g_aRf.disconnect(),this.g_aRi.disconnect(),this.g_aQV.disconnect(),this.g_aQW.disconnect(),this.g_aQX.disconnect(),super.g_em()}g_aOI(e){this.g_aQW.disconnect(),this.g_aQW.connect(e),this.g_aQX.disconnect(),this.g_aQX.connect(e)}g_aOE(){return this.g_aQV}g_aPJ(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aQS[1]=a,this.g_aQU(this.g_aQW.gain,a,g,_),this.g_aQU(this.g_aQX.gain,1-a,g,_)):7===e?(this.g_aQS[0]=a,this.g_aQU(this.g_aRf.frequency,a,g,_)):void 0}},self.g_aPF=class extends a{constructor(g,a,_,t,n,e){super(g),this.g_ko="distortion",this.g_aQS=[a,_,t,n,e],this.g_aQV=this.g_aQT(),this.g_aRj=this.g_aQT(),this.g_aRk=this.g_aQT(),this.g_aRl(t,n),this.g_aQW=this.g_aQT(),this.g_aQW.gain.value=e,this.g_aQX=this.g_aQT(),this.g_aQX.gain.value=1-e,this.g_aRm=this.g_aNK.createWaveShaper(),this.g_aRn=new Float32Array(65536),this.g_aRo(a,_),this.g_aRm.curve=this.g_aRn,this.g_aQV.connect(this.g_aRj),this.g_aQV.connect(this.g_aQX),this.g_aRj.connect(this.g_aRm),this.g_aRm.connect(this.g_aRk),this.g_aRk.connect(this.g_aQW)}g_em(){this.g_aQV.disconnect(),this.g_aRj.disconnect(),this.g_aRm.disconnect(),this.g_aRk.disconnect(),this.g_aQW.disconnect(),this.g_aQX.disconnect(),super.g_em()}g_aRl(e,g){.01>e&&(e=.01),this.g_aRj.gain.value=e,this.g_aRk.gain.value=Math.pow(1/e,.6)*g}g_aRo(e,a){for(let g,_=0;32768>_;++_)g=_/32768,g=this.g_aRp(g,e,a),this.g_aRn[32768+_]=g,this.g_aRn[32768-_-1]=-g}g_aRp(e,a,_){const t=1.05*_*a-a,n=0>e?-1:1,o=0>e?-e:e;let g=og&&(g=-g),this.g_aRsthis.g_aNw()),window.addEventListener("resize",()=>this.g_aRu())}g_aNw(){return{screenWidth:screen.width,screenHeight:screen.height,windowOuterWidth:window.outerWidth,windowOuterHeight:window.outerHeight}}g_aRu(){this.g_aK$("window-resize",{windowOuterWidth:window.outerWidth,windowOuterHeight:window.outerHeight})}};g_aLE.g_aMA(e)}