functionPointer_stringify(s,len){warnOnce("The JavaScript function 'Pointer_stringify(ptrToSomeCString)' is obsoleted and will be removed in a future Unity version. Please call 'UTF8ToString(ptrToSomeCString)' instead.");returnUTF8ToString(s,len)}Module["Pointer_stringify"]=Pointer_stringify;varstackTraceReference="(^|\\n)(\\s+at\\s+|)jsStackTrace(\\s+\\(|@)([^\\n]+):\\d+:\\d+(\\)|)(\\n|$)";varstackTraceReferenceMatch=jsStackTrace().match(newRegExp(stackTraceReference));if(stackTraceReferenceMatch)Module.stackTraceRegExp=newRegExp(stackTraceReference.replace("([^\\n]+)",stackTraceReferenceMatch[4].replace(/[\\^${}[\]().*+?|]/g,"\\$&")).replace("jsStackTrace","[^\\n]+"));varabort=function(what){if(ABORT)return;ABORT=true;EXITSTATUS=1;if(typeofENVIRONMENT_IS_PTHREAD!=="undefined"&&ENVIRONMENT_IS_PTHREAD)console.error("Pthread aborting at "+(newError).stack);if(what!==undefined){out(what);err(what);what=JSON.stringify(what)}else{what=""}varmessage="abort("+what+") at "+stackTrace();if(Module.abortHandler&&Module.abortHandler(message))return;throwmessage};Module["SetFullscreen"]=function(fullscreen){if(typeofruntimeInitialized==="undefined"||!runtimeInitialized){console.log("Runtime not initialized yet.")}elseif(typeofJSEvents==="undefined"){console.log("Player not loaded yet.")}else{vartmp=JSEvents.canPerformEventHandlerRequests;JSEvents.canPerformEventHandlerRequests=function(){return1};Module.ccall("SetFullscreen",null,["number"],[fullscreen]);JSEvents.canPerformEventHandlerRequests=tmp}};if(!Module["ENVIRONMENT_IS_PTHREAD"]){Module["preRun"].push(function(){varunityFileSystemInit=Module["unityFileSystemInit"]||function(){FS.mkdir("/idbfs");FS.mount(IDBFS,{},"/idbfs");Module.addRunDependency("JS_FileSystem_Mount");FS.syncfs(true,function(err){if(err)console.log("IndexedDB is not available. Data will not persist in cache and PlayerPrefs will not be saved.");Module.removeRunDependency("JS_FileSystem_Mount")})};unityFileSystemInit()})}varvideoInputDevices=[];varvideoInputDevicesEnumerated=false;varremoveEnumerateMediaDevicesRunDependency;varenumerateWatchdog=null;functionmatchToOldDevice(newDevice){varoldDevices=Object.keys(videoInputDevices);for(vari=0;i<oldDevices.length;++i){varold=videoInputDevices[oldDevices[i]];if(old.deviceId&&old.deviceId==newDevice.deviceId)returnold}for(vari=0;i<oldDevices.length;++i){varold=videoInputDevices[oldDevices[i]];if(old==newDevice)returnold}for(vari=0;i<oldDevices.length;++i){varold=videoInputDevices[oldDevices[i]];if(old.label&&old.label==newDevice.label)returnold}for(vari=0;i<oldDevices.length;++i){varold=videoInputDevices[oldDevices[i]];if(old.groupId&&old.kind&&old.groupId==newDevice.groupId&&old.kind==newDevice.kind)returnold}}functionassignNewVideoInputId(){for(vari=0;;++i){if(!videoInputDevices[i])returni}}functionupdateVideoInputDevices(devices){removeEnumerateMediaDevicesRunDependency();videoInputDevices=[];varretainedDevices={};varnewDevices=[];devices.forEach(function(device){if(device.kind==="videoinput"){varoldDevice=matchToOldDevice(device);if(oldDevice){retainedDevices[oldDevice.id]=oldDevice}else{newDevices.push(device)}}});videoInputDevices=retainedDevices;newDevices.forEach(function(device){if(!device.id){device.id=assignNewVideoInputId();device.name=device.label||"Video input #"+(device.id+1);device.isFrontFacing=device.name.toLowerCase().includes("front")||!device.name.toLowerCase().includes("front")&&!device.name.toLowerCase().includes("back");videoInputDevices[device.id]=device}})}functionenumerateMediaDeviceList(){if(!videoInputDevices)return;navigator.mediaDevices.enumerateDevices().then(function(devices){updateVideoInputDevices(devices);videoInputDevicesEnumerated=true}).catch(function(e){console.warn("Unable to enumerate media devices: "+e+"\nWebcams will not be available.");disableAccessToMediaDevices()});if(/Firefox/.test(navigator.userAgent)){setTimeout(enumerateMediaDeviceList,6e4);warnOnce("Applying workaround to Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=1397977")}}functiondisableAccessToMediaDevic