function createUnityInstance(r,t,l){function d(e,r){if(!d.aborted&&t.showBanner)return"error"==r&&(d.aborted=!0),t.showBanner(e,r);switch(r){case"error":console.error(e);break;case"warning":console.warn(e);break;default:console.log(e)}}function n(e){var r=e.reason||e.error,t=r?r.toString():e.message||e.reason||"",n=r&&r.stack?r.stack.toString():"";(t+="\n"+(n=n.startsWith(t)?n.substring(t.length):n).trim())&&p.stackTraceRegExp&&p.stackTraceRegExp.test(t)&&m(t,e.filename||r&&(r.fileName||r.sourceURL)||"",e.lineno||r&&(r.lineNumber||r.line)||0)}function e(e,r,t){var n=e[r];void 0!==n&&n||(console.warn('Config option "'+r+'" is missing or empty. Falling back to default value: "'+t+'". Consider updating your WebGL template to include the missing config option.'),e[r]=t)}l=l||function(){};var o,p={canvas:r,webglContextAttributes:{preserveDrawingBuffer:!1,powerPreference:2},streamingAssetsUrl:"StreamingAssets",downloadProgress:{},deinitializers:[],intervals:{},setInterval:function(e,r){e=window.setInterval(e,r);return this.intervals[e]=!0,e},clearInterval:function(e){delete this.intervals[e],window.clearInterval(e)},preRun:[],postRun:[],print:function(e){console.log(e)},printErr:function(e){console.error(e),"string"==typeof e&&-1!=e.indexOf("wasm streaming compile failed")&&(-1!=e.toLowerCase().indexOf("mime")?d('HTTP Response Header "Content-Type" configured incorrectly on the server for file '+p.codeUrl+' , should be "application/wasm". Startup time performance will suffer.',"warning"):d('WebAssembly streaming compilation failed! This can happen for example if "Content-Encoding" HTTP header is incorrectly enabled on the server for file '+p.codeUrl+", but the file is not pre-compressed on disk (or vice versa). Check the Network tab in browser Devtools to debug server header configuration.","warning"))},locateFile:function(e){return"build.wasm"==e?this.codeUrl:e},disabledCanvasEvents:["contextmenu","dragstart"]};for(o in e(t,"companyName","Unity"),e(t,"productName","WebGL Player"),e(t,"productVersion","1.0"),t)p[o]=t[o];p.streamingAssetsUrl=new URL(p.streamingAssetsUrl,document.URL).href;var i=p.disabledCanvasEvents.slice();function a(e){e.preventDefault()}i.forEach(function(e){r.addEventListener(e,a)}),window.addEventListener("error",n),window.addEventListener("unhandledrejection",n);var s="",u="";function c(e){document.webkitCurrentFullScreenElement===r?r.style.width&&(s=r.style.width,u=r.style.height,r.style.width="100%",r.style.height="100%"):s&&(r.style.width=s,r.style.height=u,u=s="")}document.addEventListener("webkitfullscreenchange",c),p.deinitializers.push(function(){for(var e in p.disableAccessToMediaDevices(),i.forEach(function(e){r.removeEventListener(e,a)}),window.removeEventListener("error",n),window.removeEventListener("unhandledrejection",n),document.removeEventListener("webkitfullscreenchange",c),p.intervals)window.clearInterval(e);p.intervals={}}),p.QuitCleanup=function(){for(var e=0;e>2],usedWASMHeapSize:p.HEAPU32[r>>2],totalJSHeapSize:p.HEAPF64[t>>3],usedJSHeapSize:p.HEAPF64[n>>3],pageLoadTime:p.HEAPU32[o>>2],pageLoadTimeToFrame1:p.HEAPU32[i>>2],fps:p.HEAPF64[a>>3],movingAverageFps:p.HEAPF64[s>>3],assetLoadTime:p.HEAPU32[l>>2],webAssemblyStartupTime:p.HEAPU32[d>>2]-(p.webAssemblyTimeStart||0),codeDownloadTime:p.HEAPU32[u>>2],gameStartupTime:p.HEAPU32[c>>2],numJankedFrames:p.HEAPU32[c+4>>2]}}};function f(e,r,t){-1==e.indexOf("fullscreen error")&&(p.startupErrorHandler?p.startupErrorHandler(e,r,t):p.errorHandler&&p.errorHandler(e,r,t)||(console.log("Invoking error handler due to\n"+e),"function"==typeof dump&&dump("Invoking error handler due to\n"+e),f.didShowErrorMessage||(-1!=(e="An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:\n"+e).indexOf("DISABLE_EXCEPTION_CATCHING")?e="An exception has occurred, but exception handling has been disabled in this build. If you are the developer of this content, enable exceptions in your project WebGL player settings to be able to catch the exception or see the stack trace.":-1!=e.indexOf("Cannot enlarge memory arrays")?e="Out of memory. If you are the developer of this content, try allocating more memory to your WebGL build in the WebGL player settings.":-1==e.indexOf("Invalid array buffer length")&&-1==e.indexOf("Invalid typed array length")&&-1==e.indexOf("out of memory")&&-1==e.indexOf("could not allocate memory")||(e="The browser could not allocate enough memory for the WebGL content. If you are the developer of this content, try allocating less memory to your WebGL build in the WebGL player settings."),alert(e),f.didShowErrorMessage=!0)))}function g(e,r){var t="(wasm-function\\[)(\\d+)(\\])",n=new RegExp(t);return e.replace(new RegExp(t,"g"),function(e){e=e.match(n);return e[1]+(r[e[2]]?r[e[2]]+"@":"")+e[2]+e[3]})}function m(n,o,i){p.symbols?f(g(n,p.symbols),o,i):p.symbolsUrl?y("symbolsUrl").then(function(e){for(var r="",t=0;te.length||31!=e[0]||139!=e[1])return!1;var n=e[3];if(4&n){if(r+2>e.length)return!1;if((r+=2+e[r]+(e[r+1]<<8))>e.length)return!1}if(8&n){for(;re.length)return!1;r++}return 16&n&&String.fromCharCode.apply(null,e.subarray(r,r+t.length+1))==t+"\0"}},br:{hasUnityMarker:function(e){var r="UnityWeb Compressed Content (brotli)";if(!e.length)return!1;var t=1&e[0]?14&e[0]?4:7:1,n=e[0]&(1<>3);if(commentOffset=1+t+2+1+2+(o<<3)+7>>3,17==n||commentOffset>e.length)return!1;for(var i=n+(6+(o<<4)+(r.length-1<<6)<>>=8)if(e[a]!=(255&i))return!1;return String.fromCharCode.apply(null,e.subarray(commentOffset,commentOffset+r.length))==r}}};function y(r){b(r);var e=p.fetchWithProgress,s=p[r],t=/file:\/\//.exec(s)?"same-origin":void 0;return e(p[r],{method:"GET",companyName:p.companyName,productName:p.productName,productVersion:p.productVersion,control:"no-store",mode:t,onProgress:function(e){b(r,e)}}).then(function(e){var r,t,n,o,i,a;return w.gzip.hasUnityMarker(e.parsedBody)&&(r=["gzip","gzip"]),(r=w.br.hasUnityMarker(e.parsedBody)?["brotli","br"]:r)&&(t=e.headers.get("Content-Type"),n=e.headers.get("Content-Encoding"),i=0<(o=e.headers.get("Content-Length"))&&e.parsedBody.length!=o,a=0If using custom web server, verify that web server is sending .br files with HTTP Response Header "Content-Encoding: br". Brotli compression may not be supported in Firefox over HTTP connections. '+n+' See https://bugzilla.mozilla.org/show_bug.cgi?id=1670675 for more information.':"Unable to parse "+p.frameworkUrl+'!
If using custom web server, verify that web server is sending .br files with HTTP Response Header "Content-Encoding: br". Brotli compression may not be supported over HTTP connections. Migrate your server to use HTTPS.'),void d(t,"error"))}d("Unable to parse "+p.frameworkUrl+"! The file is corrupt, or compression was misconfigured? (check Content-Encoding HTTP Response Header on web server)","error")}var o=unityFramework;unityFramework=null,a.onload=null,i(o)},a.onerror=function(e){d("Unable to load file "+p.frameworkUrl+"! Check that the file exists on the remote server. (also check browser Console and Devtools Network tab to debug)","error")},document.body.appendChild(a),p.deinitializers.push(function(){document.body.removeChild(a)})}).then(function(e){p.webAssemblyTimeStart=performance.now(),e(p),p.codeDownloadTimeEnd=performance.now()-r}),performance.now()),e=y("dataUrl");p.preRun.push(function(){p.addRunDependency("dataUrl"),e.then(function(r){var e=new TextDecoder("utf-8"),t=0;function n(){var e=(r[t]|r[t+1]<<8|r[t+2]<<16|r[t+3]<<24)>>>0;return t+=4,e}function o(e){if(w.gzip.hasUnityMarker(r))throw e+'. Failed to parse binary data file, because it is still gzip-compressed and should have been uncompressed by the browser. Web server has likely provided gzip-compressed data without specifying the HTTP Response Header "Content-Encoding: gzip" with it to instruct the browser to decompress it. Please verify your web server hosting configuration.';if(w.br.hasUnityMarker(r))throw e+'. Failed to parse binary data file, because it is still brotli-compressed and should have been uncompressed by the browser. Web server has likely provided brotli-compressed data without specifying the HTTP Response Header "Content-Encoding: br" with it to instruct the browser to decompress it. Please verify your web server hosting configuration.';throw e}var i="UnityWebData1.0\0",a=e.decode(r.subarray(0,i.length)),s=(a!=i&&o('Unknown data format (id="'+a+'")'),t+=i.length,n());for(t+s>r.length&&o("Invalid binary data file header! (pos="+t+", headerSize="+s+", file length="+r.length+")");tr.length&&o("Invalid binary data file size! (offset="+l+", size="+d+", file length="+r.length+")"),n()),c=(t+u>r.length&&o("Invalid binary data file path name! (pos="+t+", length="+u+", file length="+r.length+")"),e.decode(r.subarray(t,t+u)));t+=u;for(var h=0,f=c.indexOf("/",h)+1;0