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,GAC9C,OAAOrJ,SAASM,cAAc2C,KDnDpB,W","sources":["webpack://ruffle-selfhosted/webpack/runtime/load script","webpack://ruffle-selfhosted/webpack/bootstrap","webpack://ruffle-selfhosted/webpack/runtime/define property getters","webpack://ruffle-selfhosted/webpack/runtime/ensure chunk","webpack://ruffle-selfhosted/webpack/runtime/get javascript chunk filename","webpack://ruffle-selfhosted/webpack/runtime/global","webpack://ruffle-selfhosted/webpack/runtime/harmony module decorator","webpack://ruffle-selfhosted/webpack/runtime/hasOwnProperty shorthand","webpack://ruffle-selfhosted/webpack/runtime/make namespace object","webpack://ruffle-selfhosted/webpack/runtime/publicPath","webpack://ruffle-selfhosted/webpack/runtime/jsonp chunk loading","webpack://ruffle-selfhosted/../../node_modules/wasm-feature-detect/dist/esm/index.js","webpack://ruffle-selfhosted/../core/pkg/js-polyfills.js","webpack://ruffle-selfhosted/../core/pkg/public-path.js","webpack://ruffle-selfhosted/../core/pkg/load-ruffle.js","webpack://ruffle-selfhosted/../core/pkg/plugin-polyfill.js","webpack://ruffle-selfhosted/../core/pkg/shadow-template.js","webpack://ruffle-selfhosted/../core/pkg/register-element.js","webpack://ruffle-selfhosted/../core/pkg/ruffle-player.js","webpack://ruffle-selfhosted/../core/pkg/swf-file-name.js","webpack://ruffle-selfhosted/../core/pkg/ruffle-embed.js","webpack://ruffle-selfhosted/../core/pkg/ruffle-object.js","webpack://ruffle-selfhosted/../core/pkg/polyfills.js","webpack://ruffle-selfhosted/../core/pkg/version.js","webpack://ruffle-selfhosted/../core/pkg/version-range.js","webpack://ruffle-selfhosted/../core/pkg/public-api.js","webpack://ruffle-selfhosted/./js/ruffle.js","webpack://ruffle-selfhosted/../core/pkg/source-api.js"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"ruffle-selfhosted:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"core.ruffle.\" + {\"662\":\"848d766d6fc336164c2f\",\"966\":\"61b3dd915983ae8a8b16\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = (module) => {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: () => {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"\";","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkruffle_selfhosted\"] = self[\"webpackChunkruffle_selfhosted\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","export const bigInt=()=>(async e=>{try{return(await WebAssembly.instantiate(e)).instance.exports.b(BigInt(0))===BigInt(0)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,126,1,126,3,2,1,0,7,5,1,1,98,0,0,10,6,1,4,0,32,0,11])),bulkMemory=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),exceptions=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),multiValue=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11])),mutableGlobals=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),referenceTypes=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),saturatedFloatToInt=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),signExtensions=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),simd=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),tailCall=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11])),threads=()=>(async e=>{try{return\"undefined\"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));\n","/**\n * Polyfills the `Array.prototype.reduce` method.\n *\n * Production steps of ECMA-262, Edition 5, 15.4.4.21\n * Reference: https://es5.github.io/#x15.4.4.21\n * https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n */\nfunction polyfillArrayPrototypeReduce() {\n Object.defineProperty(Array.prototype, \"reduce\", {\n value(...args) {\n if (args.length === 0 &&\n window.Prototype &&\n window.Prototype.Version &&\n window.Prototype.Version < \"1.6.1\") {\n // Off-spec: compatibility with prototype.js\n return this.length > 1 ? this : this[0];\n }\n const callback = args[0];\n if (this === null) {\n throw new TypeError(\"Array.prototype.reduce called on null or undefined\");\n }\n if (typeof callback !== \"function\") {\n throw new TypeError(`${callback} is not a function`);\n }\n const o = Object(this);\n const len = o.length >>> 0;\n let k = 0;\n let value;\n if (args.length >= 2) {\n value = args[1];\n }\n else {\n while (k < len && !(k in o)) {\n k++;\n }\n if (k >= len) {\n throw new TypeError(\"Reduce of empty array with no initial value\");\n }\n value = o[k++];\n }\n while (k < len) {\n if (k in o) {\n value = callback(value, o[k], k, o);\n }\n k++;\n }\n return value;\n },\n });\n}\n/**\n * Polyfills the `Window` function.\n */\nfunction polyfillWindow() {\n if (typeof window.constructor !== \"function\" ||\n !isNativeFunction(window.constructor)) {\n // Don't polyfill `Window` if `window.constructor` has been overridden.\n return;\n }\n // @ts-expect-error: `Function not assignable to { new (): Window; prototype: Window; }`\n window.Window = window.constructor;\n}\n/**\n * Polyfills the `Reflect` object and members.\n *\n * Currently it's a minimal implementation with only `get` and `set`\n * just enough for wasm-bindgen's stdlib to not crash on pages I've found.\n */\nfunction tryPolyfillReflect() {\n if (window.Reflect === undefined) {\n // @ts-expect-error: {} indeed doesn't implement Reflect's interface.\n window.Reflect = {};\n }\n if (typeof Reflect.get !== \"function\") {\n Object.defineProperty(Reflect, \"get\", {\n value(target, key) {\n return target[key];\n },\n });\n }\n if (typeof Reflect.set !== \"function\") {\n Object.defineProperty(Reflect, \"set\", {\n value(target, key, value) {\n target[key] = value;\n },\n });\n }\n}\n/**\n * Determines whether a function is native or not.\n *\n * @param func The function to test.\n * @returns True if the function hasn't been overridden.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFunction(func) {\n const val = typeof Function.prototype.toString === \"function\"\n ? Function.prototype.toString()\n : null;\n if (typeof val === \"string\" && val.indexOf(\"[native code]\") >= 0) {\n return (Function.prototype.toString.call(func).indexOf(\"[native code]\") >= 0);\n }\n return false;\n}\n/**\n * Checks and applies the polyfills to the current window, if needed.\n */\nexport function setPolyfillsOnLoad() {\n if (typeof Array.prototype.reduce !== \"function\" ||\n !isNativeFunction(Array.prototype.reduce)) {\n // Some external libraries override the `Array.prototype.reduce` method in a way\n // that causes Webpack to crash (#1507, #1865), so we need to override it again.\n polyfillArrayPrototypeReduce();\n }\n if (typeof Window !== \"function\" || !isNativeFunction(Window)) {\n // Overriding the native `Window` function causes issues in wasm-bindgen, as a\n // code like `window instanceof Window` will no longer work.\n polyfillWindow();\n }\n // Some pages override native `Reflect` with a new object without some properties,\n // which causes issues for wasm-bindgen's stdlib implementation.\n tryPolyfillReflect();\n}\n","// This must be in global scope because `document.currentScript`\n// works only while the script is initially being processed.\nlet currentScriptURL = \"\";\ntry {\n if (document.currentScript !== undefined &&\n document.currentScript !== null &&\n \"src\" in document.currentScript &&\n document.currentScript.src !== \"\") {\n let src = document.currentScript.src;\n // CDNs allow omitting the filename. If it's omitted, append a slash to\n // prevent the last component from being dropped.\n if (!src.endsWith(\".js\") && !src.endsWith(\"/\")) {\n src += \"/\";\n }\n currentScriptURL = new URL(\".\", src).href;\n }\n}\ncatch (e) {\n console.warn(\"Unable to get currentScript URL\");\n}\n/**\n * Attempt to discover the public path of the current Ruffle source. This can\n * be used to configure Webpack.\n *\n * A global public path can be specified for all sources using the RufflePlayer\n * config:\n *\n * ```js\n * window.RufflePlayer.config.publicPath = \"/dist/\";\n * ```\n *\n * If no such config is specified, then the parent path of where this script is\n * hosted is assumed, which should be the correct default in most cases.\n *\n * @param config The `window.RufflePlayer.config` object.\n * @returns The public path for the given source.\n */\nexport function publicPath(config) {\n // Default to the directory where this script resides.\n let path = currentScriptURL;\n if (config !== undefined && config.publicPath !== undefined) {\n path = config.publicPath;\n }\n // Webpack expects the paths to end with a slash.\n if (path !== \"\" && !path.endsWith(\"/\")) {\n path += \"/\";\n }\n return path;\n}\n","/**\n * Conditional ruffle loader\n */\nimport { bulkMemory, simd, saturatedFloatToInt, signExtensions, } from \"wasm-feature-detect\";\nimport { setPolyfillsOnLoad } from \"./js-polyfills\";\nimport { publicPath } from \"./public-path\";\n/**\n * Load ruffle from an automatically-detected location.\n *\n * This function returns a new instance of Ruffle and downloads it every time.\n * You should not use it directly; this module will memoize the resource\n * download.\n *\n * @param config The `window.RufflePlayer.config` object.\n * @returns A ruffle constructor that may be used to create new Ruffle\n * instances.\n */\nasync function fetchRuffle(config) {\n // Apply some pure JavaScript polyfills to prevent conflicts with external\n // libraries, if needed.\n setPolyfillsOnLoad();\n // NOTE: Keep this list in sync with $RUSTFLAGS in the CI build config!\n const extensionsSupported = (await Promise.all([\n bulkMemory(),\n simd(),\n saturatedFloatToInt(),\n signExtensions(),\n ])).every(Boolean);\n if (!extensionsSupported) {\n console.log(\"Some WebAssembly extensions are NOT available, falling back to the vanilla WebAssembly module\");\n }\n __webpack_public_path__ = publicPath(config);\n // Note: The argument passed to import() has to be a simple string literal,\n // otherwise some bundler will get confused and won't include the module?\n const { default: init, Ruffle } = await (extensionsSupported\n ? import(\"../pkg/ruffle_web-wasm_extensions\")\n : import(\"../pkg/ruffle_web\"));\n await init();\n return Ruffle;\n}\nlet lastLoaded = null;\n/**\n * Obtain an instance of `Ruffle`.\n *\n * This function returns a promise which yields `Ruffle` asynchronously.\n *\n * @param config The `window.RufflePlayer.config` object.\n * @returns A ruffle constructor that may be used to create new Ruffle\n * instances.\n */\nexport function loadRuffle(config) {\n if (lastLoaded === null) {\n lastLoaded = fetchRuffle(config);\n }\n return lastLoaded;\n}\n","/**\n * Replacement object for `MimeTypeArray` that lets us install new fake mime\n * types.\n *\n * Unlike plugins we can at least enumerate mime types in Firefox, so we don't\n * lose data.\n *\n * We also expose a method called `install` which adds a new plugin. This is\n * used to falsify Flash detection. If the existing `navigator.mimeTypes` has an\n * `install` method, you should not use `RuffleMimeTypeArray` as some other\n * plugin emulator is already present.\n */\nclass RuffleMimeTypeArray {\n constructor(native_mimetype_array) {\n this.__mimetypes = [];\n this.__named_mimetypes = {};\n if (native_mimetype_array) {\n for (let i = 0; i < native_mimetype_array.length; i++) {\n this.install(native_mimetype_array[i]);\n }\n }\n }\n /**\n * Install a MIME Type into the array.\n *\n * @param mimetype The mimetype to install\n */\n install(mimetype) {\n const id = this.__mimetypes.length;\n this.__mimetypes.push(mimetype);\n this.__named_mimetypes[mimetype.type] = mimetype;\n this[mimetype.type] = mimetype;\n this[id] = mimetype;\n }\n item(index) {\n return this.__mimetypes[index];\n }\n namedItem(name) {\n return this.__named_mimetypes[name];\n }\n get length() {\n return this.__mimetypes.length;\n }\n [Symbol.iterator]() {\n return this.__mimetypes[Symbol.iterator]();\n }\n}\n/**\n * Equivalent object to `Plugin` that allows us to falsify plugins.\n */\nclass RufflePlugin extends RuffleMimeTypeArray {\n constructor(name, description, filename, mimetypes) {\n super(mimetypes);\n this.name = name;\n this.description = description;\n this.filename = filename;\n }\n install(mimetype) {\n super.install(mimetype);\n }\n [Symbol.iterator]() {\n return super[Symbol.iterator]();\n }\n}\n/**\n * Replacement object for `PluginArray` that lets us install new fake plugins.\n *\n * This object needs to wrap the native plugin array, since the user might have\n * actual plugins installed. Firefox doesn't let us enumerate the array, though,\n * which has some consequences. Namely, we can't actually perfectly wrap the\n * native plugin array, at least unless there's some secret \"unresolved object\n * property name handler\" that I've never known before in JS...\n *\n * We can still wrap `namedItem` perfectly at least.\n *\n * We also expose a method called `install` which adds a new plugin. This is\n * used to falsify Flash detection. If the existing `navigator.plugins` has an\n * `install` method, you should not use `RufflePluginArray` as some other plugin\n * emulator is already present.\n */\nclass RufflePluginArray {\n constructor(native_plugin_array) {\n this.__plugins = [];\n this.__named_plugins = {};\n for (let i = 0; i < native_plugin_array.length; i++) {\n this.install(native_plugin_array[i]);\n }\n }\n install(plugin) {\n const id = this.__plugins.length;\n this.__plugins.push(plugin);\n this.__named_plugins[plugin.name] = plugin;\n this[plugin.name] = plugin;\n this[id] = plugin;\n }\n item(index) {\n return this.__plugins[index];\n }\n namedItem(name) {\n return this.__named_plugins[name];\n }\n refresh() {\n // Nothing to do, we just need to define the method.\n }\n get length() {\n return this.__plugins.length;\n }\n}\n/**\n * A fake plugin designed to trigger Flash detection scripts.\n */\nexport const FLASH_PLUGIN = new RufflePlugin(\"Shockwave Flash\", \"Shockwave Flash 32.0 r0\", \"ruffle.js\", null);\nFLASH_PLUGIN.install({\n type: \"application/futuresplash\",\n description: \"Shockwave Flash\",\n suffixes: \"spl\",\n enabledPlugin: FLASH_PLUGIN,\n});\nFLASH_PLUGIN.install({\n type: \"application/x-shockwave-flash\",\n description: \"Shockwave Flash\",\n suffixes: \"swf\",\n enabledPlugin: FLASH_PLUGIN,\n});\nFLASH_PLUGIN.install({\n type: \"application/x-shockwave-flash2-preview\",\n description: \"Shockwave Flash\",\n suffixes: \"swf\",\n enabledPlugin: FLASH_PLUGIN,\n});\nFLASH_PLUGIN.install({\n type: \"application/vnd.adobe.flash-movie\",\n description: \"Shockwave Flash\",\n suffixes: \"swf\",\n enabledPlugin: FLASH_PLUGIN,\n});\n/**\n * Install a fake plugin such that detectors will see it in `navigator.plugins`.\n *\n * This function takes care to check if the existing implementation of\n * `navigator.plugins` already accepts fake plugin entries. If so, it will use\n * that version of the plugin array. This allows the plugin polyfill to compose\n * across multiple plugin emulators with the first emulator's polyfill winning.\n *\n * @param plugin The plugin to install\n */\nexport function installPlugin(plugin) {\n if (!(\"install\" in navigator.plugins) || !navigator.plugins[\"install\"]) {\n Object.defineProperty(navigator, \"plugins\", {\n value: new RufflePluginArray(navigator.plugins),\n writable: false,\n });\n }\n const plugins = navigator.plugins;\n plugins.install(plugin);\n if (plugin.length > 0 &&\n (!(\"install\" in navigator.mimeTypes) || !navigator.mimeTypes[\"install\"])) {\n Object.defineProperty(navigator, \"mimeTypes\", {\n value: new RuffleMimeTypeArray(navigator.mimeTypes),\n writable: false,\n });\n }\n const mimeTypes = navigator.mimeTypes;\n for (let i = 0; i < plugin.length; i += 1) {\n mimeTypes.install(plugin[i]);\n }\n}\n","/**\n * The shadow template which is used to fill the actual Ruffle player element\n * on the page.\n */\nexport const ruffleShadowTemplate = document.createElement(\"template\");\nruffleShadowTemplate.innerHTML = `\n \n \n\n
\n
\n
Click to unmute
\n
\n\n \n`;\n","/**\n * Number of times to try defining a custom element.\n */\nconst MAX_TRIES = 999;\n/**\n * A mapping between internal element IDs and DOM element IDs.\n */\nconst privateRegistry = {};\n/**\n * Lookup a previously registered custom element.\n *\n * The returned object will have `name`, `class`, and `internal_name`\n * properties listing the external name, implementing class, and internal name\n * respectively.\n *\n * @param elementName The internal element name, previously used to\n * register the element with the private registry.\n * @returns The element data in the registry, or null if there is\n * no such element name registered.\n */\nexport function lookupElement(elementName) {\n const data = privateRegistry[elementName];\n if (data !== undefined) {\n return {\n internalName: elementName,\n name: data.name,\n class: data.class,\n };\n }\n else {\n return null;\n }\n}\n/**\n * Register a custom element.\n *\n * This function is designed to be tolerant of naming conflicts. If\n * registration fails, we modify the name, and try again. As a result, this\n * function returns the real element name to use.\n *\n * Calling this function multiple times will *not* register multiple elements.\n * We store a private registry mapping internal element names to DOM names.\n * Thus, the proper way to use this function is to call it every time you are\n * about to work with custom element names.\n *\n * @param elementName The internal name of the element.\n * @param elementClass The class of the element.\n *\n * You must call this function with the same class every time.\n * @returns The actual element name.\n * @throws Throws an error if two different elements were registered with the\n * same internal name.\n */\nexport function registerElement(elementName, elementClass) {\n if (privateRegistry[elementName] !== undefined) {\n if (privateRegistry[elementName].class !== elementClass) {\n throw new Error(\"Internal naming conflict on \" + elementName);\n }\n else {\n return privateRegistry[elementName].name;\n }\n }\n let tries = 0;\n if (window.customElements !== undefined) {\n while (tries < MAX_TRIES) {\n let externalName = elementName;\n if (tries > 0) {\n externalName = externalName + \"-\" + tries;\n }\n if (window.customElements.get(externalName) !== undefined) {\n tries += 1;\n continue;\n }\n else {\n window.customElements.define(externalName, elementClass);\n }\n privateRegistry[elementName] = {\n class: elementClass,\n name: externalName,\n internalName: elementName,\n };\n return externalName;\n }\n }\n throw new Error(\"Failed to assign custom element \" + elementName);\n}\n","import { loadRuffle } from \"./load-ruffle\";\nimport { ruffleShadowTemplate } from \"./shadow-template\";\nimport { lookupElement } from \"./register-element\";\nimport { swfFileName } from \"./swf-file-name\";\nexport const FLASH_MIMETYPE = \"application/x-shockwave-flash\";\nexport const FUTURESPLASH_MIMETYPE = \"application/futuresplash\";\nexport const FLASH7_AND_8_MIMETYPE = \"application/x-shockwave-flash2-preview\";\nexport const FLASH_MOVIE_MIMETYPE = \"application/vnd.adobe.flash-movie\";\nexport const FLASH_ACTIVEX_CLASSID = \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\";\nconst RUFFLE_ORIGIN = \"https://ruffle.rs\";\nconst DIMENSION_REGEX = /^\\s*(\\d+(\\.\\d+)?(%)?)/;\nlet isAudioContextUnmuted = false;\n/**\n * Converts arbitrary input to an easy to use record object.\n *\n * @param parameters Parameters to sanitize\n * @returns A sanitized map of param name to param value\n */\nfunction sanitizeParameters(parameters) {\n if (parameters === null || parameters === undefined) {\n return {};\n }\n if (!(parameters instanceof URLSearchParams)) {\n parameters = new URLSearchParams(parameters);\n }\n const output = {};\n for (const [key, value] of parameters) {\n // Every value must be type of string\n output[key] = value.toString();\n }\n return output;\n}\n/**\n * The ruffle player element that should be inserted onto the page.\n *\n * This element will represent the rendered and intractable flash movie.\n */\nexport class RufflePlayer extends HTMLElement {\n /**\n * Constructs a new Ruffle flash player for insertion onto the page.\n */\n constructor() {\n super();\n this.hasContextMenu = false;\n // Allows the user to permanently disable the context menu.\n this.contextMenuForceDisabled = false;\n // Whether this device is a touch device.\n // Set to true when a touch event is encountered.\n this.isTouch = false;\n this.showSwfDownload = false;\n this.panicked = false;\n this.isExtension = false;\n /**\n * Any configuration that should apply to this specific player.\n * This will be defaulted with any global configuration.\n */\n this.config = {};\n this.shadow = this.attachShadow({ mode: \"open\" });\n this.shadow.appendChild(ruffleShadowTemplate.content.cloneNode(true));\n this.dynamicStyles = (this.shadow.getElementById(\"dynamic_styles\"));\n this.container = this.shadow.getElementById(\"container\");\n this.playButton = this.shadow.getElementById(\"play_button\");\n if (this.playButton) {\n this.playButton.addEventListener(\"click\", () => this.play());\n }\n this.unmuteOverlay = this.shadow.getElementById(\"unmute_overlay\");\n this.contextMenuElement = this.shadow.getElementById(\"context-menu\");\n this.addEventListener(\"contextmenu\", this.showContextMenu.bind(this));\n this.addEventListener(\"pointerdown\", this.pointerDown.bind(this));\n this.addEventListener(\"fullscreenchange\", this.fullScreenChange.bind(this));\n this.addEventListener(\"webkitfullscreenchange\", this.fullScreenChange.bind(this));\n window.addEventListener(\"click\", this.hideContextMenu.bind(this));\n this.instance = null;\n this.options = null;\n this.onFSCommand = null;\n this._readyState = 0 /* ReadyState.HaveNothing */;\n this._metadata = null;\n this.lastActivePlayingState = false;\n this.setupPauseOnTabHidden();\n return this;\n }\n /**\n * Indicates the readiness of the playing movie.\n *\n * @returns The `ReadyState` of the player.\n */\n get readyState() {\n return this._readyState;\n }\n /**\n * The metadata of the playing movie (such as movie width and height).\n * These are inherent properties stored in the SWF file and are not affected by runtime changes.\n * For example, `metadata.width` is the width of the SWF file, and not the width of the Ruffle player.\n *\n * @returns The metadata of the movie, or `null` if the movie metadata has not yet loaded.\n */\n get metadata() {\n return this._metadata;\n }\n /**\n * Setup event listener to detect when tab is not active to pause instance playback.\n * this.instance.play() is called when the tab becomes visible only if the\n * the instance was not paused before tab became hidden.\n *\n * See:\n * https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API\n * @ignore\n * @internal\n */\n setupPauseOnTabHidden() {\n document.addEventListener(\"visibilitychange\", () => {\n if (!this.instance)\n return;\n // Tab just changed to be inactive. Record whether instance was playing.\n if (document.hidden) {\n this.lastActivePlayingState = this.instance.is_playing();\n this.instance.pause();\n }\n // Play only if instance was playing originally.\n if (!document.hidden && this.lastActivePlayingState === true) {\n this.instance.play();\n }\n }, false);\n }\n /**\n * @ignore\n * @internal\n */\n connectedCallback() {\n this.updateStyles();\n }\n /**\n * @ignore\n * @internal\n */\n static get observedAttributes() {\n return [\"width\", \"height\"];\n }\n /**\n * @ignore\n * @internal\n */\n attributeChangedCallback(name, _oldValue, _newValue) {\n if (name === \"width\" || name === \"height\") {\n this.updateStyles();\n }\n }\n /**\n * @ignore\n * @internal\n */\n disconnectedCallback() {\n this.destroy();\n }\n /**\n * Updates the internal shadow DOM to reflect any set attributes from\n * this element.\n *\n * @protected\n */\n updateStyles() {\n if (this.dynamicStyles.sheet) {\n if (this.dynamicStyles.sheet.rules) {\n for (let i = 0; i < this.dynamicStyles.sheet.rules.length; i++) {\n this.dynamicStyles.sheet.deleteRule(i);\n }\n }\n const widthAttr = this.attributes.getNamedItem(\"width\");\n if (widthAttr !== undefined && widthAttr !== null) {\n const width = RufflePlayer.htmlDimensionToCssDimension(widthAttr.value);\n if (width !== null) {\n this.dynamicStyles.sheet.insertRule(`:host { width: ${width}; }`);\n }\n }\n const heightAttr = this.attributes.getNamedItem(\"height\");\n if (heightAttr !== undefined && heightAttr !== null) {\n const height = RufflePlayer.htmlDimensionToCssDimension(heightAttr.value);\n if (height !== null) {\n this.dynamicStyles.sheet.insertRule(`:host { height: ${height}; }`);\n }\n }\n }\n }\n /**\n * Determine if this element is the fallback content of another Ruffle\n * player.\n *\n * This heuristic assumes Ruffle objects will never use their fallback\n * content. If this changes, then this code also needs to change.\n *\n * @private\n */\n isUnusedFallbackObject() {\n const element = lookupElement(\"ruffle-object\");\n if (element !== null) {\n let parent = this.parentNode;\n while (parent !== document && parent !== null) {\n if (parent.nodeName === element.name) {\n return true;\n }\n parent = parent.parentNode;\n }\n }\n return false;\n }\n /**\n * Ensure a fresh Ruffle instance is ready on this player before continuing.\n *\n * @throws Any exceptions generated by loading Ruffle Core will be logged\n * and passed on.\n *\n * @private\n */\n async ensureFreshInstance(config) {\n var _a;\n this.destroy();\n const ruffleConstructor = await loadRuffle(config).catch((e) => {\n console.error(`Serious error loading Ruffle: ${e}`);\n // Serious duck typing. In error conditions, let's not make assumptions.\n if (window.location.protocol === \"file:\") {\n e.ruffleIndexError = 2 /* PanicError.FileProtocol */;\n }\n else {\n e.ruffleIndexError = 9 /* PanicError.WasmNotFound */;\n const message = String(e.message).toLowerCase();\n if (message.includes(\"mime\")) {\n e.ruffleIndexError = 8 /* PanicError.WasmMimeType */;\n }\n else if (message.includes(\"networkerror\") ||\n message.includes(\"failed to fetch\")) {\n e.ruffleIndexError = 6 /* PanicError.WasmCors */;\n }\n else if (message.includes(\"disallowed by embedder\")) {\n e.ruffleIndexError = 1 /* PanicError.CSPConflict */;\n }\n else if (e.name === \"CompileError\") {\n e.ruffleIndexError = 3 /* PanicError.InvalidWasm */;\n }\n else if (message.includes(\"could not download wasm module\") &&\n e.name === \"TypeError\") {\n e.ruffleIndexError = 7 /* PanicError.WasmDownload */;\n }\n else if (e.name === \"TypeError\") {\n e.ruffleIndexError = 5 /* PanicError.JavascriptConflict */;\n }\n else if (navigator.userAgent.includes(\"Edg\") &&\n message.includes(\"webassembly is not defined\")) {\n // Microsoft Edge detection.\n e.ruffleIndexError = 10 /* PanicError.WasmDisabledMicrosoftEdge */;\n }\n }\n this.panic(e);\n throw e;\n });\n this.instance = await new ruffleConstructor(this.container, this, config);\n console.log(\"New Ruffle instance created (WebAssembly extensions: \" +\n (ruffleConstructor.is_wasm_simd_used() ? \"ON\" : \"OFF\") +\n \")\");\n // In Firefox, AudioContext.state is always \"suspended\" when the object has just been created.\n // It may change by itself to \"running\" some milliseconds later. So we need to wait a little\n // bit before checking if autoplay is supported and applying the instance config.\n if (this.audioState() !== \"running\") {\n this.container.style.visibility = \"hidden\";\n await new Promise((resolve) => {\n window.setTimeout(() => {\n resolve();\n }, 200);\n });\n this.container.style.visibility = \"\";\n }\n this.unmuteAudioContext();\n // Treat unspecified and invalid values as `AutoPlay.Auto`.\n if (config.autoplay === \"on\" /* AutoPlay.On */ ||\n (config.autoplay !== \"off\" /* AutoPlay.Off */ &&\n this.audioState() === \"running\")) {\n this.play();\n if (this.audioState() !== \"running\") {\n // Treat unspecified and invalid values as `UnmuteOverlay.Visible`.\n if (config.unmuteOverlay !== \"hidden\" /* UnmuteOverlay.Hidden */) {\n this.unmuteOverlay.style.display = \"block\";\n }\n this.container.addEventListener(\"click\", this.unmuteOverlayClicked.bind(this), {\n once: true,\n });\n const audioContext = (_a = this.instance) === null || _a === void 0 ? void 0 : _a.audio_context();\n if (audioContext) {\n audioContext.onstatechange = () => {\n if (audioContext.state === \"running\") {\n this.unmuteOverlayClicked();\n }\n audioContext.onstatechange = null;\n };\n }\n }\n }\n else {\n this.playButton.style.display = \"block\";\n }\n }\n /**\n * Destroys the currently running instance of Ruffle.\n */\n destroy() {\n if (this.instance) {\n this.instance.destroy();\n this.instance = null;\n this._metadata = null;\n this._readyState = 0 /* ReadyState.HaveNothing */;\n console.log(\"Ruffle instance destroyed.\");\n }\n }\n /**\n * Loads a specified movie into this player.\n *\n * This will replace any existing movie that may be playing.\n *\n * @param options One of the following:\n * - A URL, passed as a string, which will load a URL with default options.\n * - A [[URLLoadOptions]] object, to load a URL with options.\n * - A [[DataLoadOptions]] object, to load data with options.\n *\n * The options will be defaulted by the [[config]] field, which itself\n * is defaulted by a global `window.RufflePlayer.config`.\n */\n async load(options) {\n var _a, _b;\n let optionsError = \"\";\n switch (typeof options) {\n case \"string\":\n options = { url: options };\n break;\n case \"object\":\n if (options === null) {\n optionsError = \"Argument 0 must be a string or object\";\n }\n else if (!(\"url\" in options) && !(\"data\" in options)) {\n optionsError =\n \"Argument 0 must contain a `url` or `data` key\";\n }\n else if (\"url\" in options &&\n typeof options.url !== \"string\") {\n optionsError = \"`url` must be a string\";\n }\n break;\n default:\n optionsError = \"Argument 0 must be a string or object\";\n break;\n }\n if (optionsError.length > 0) {\n const error = new TypeError(optionsError);\n error.ruffleIndexError = 4 /* PanicError.JavascriptConfiguration */;\n this.panic(error);\n throw error;\n }\n if (!this.isConnected || this.isUnusedFallbackObject()) {\n console.warn(\"Ignoring attempt to play a disconnected or suspended Ruffle element\");\n return;\n }\n if (isFallbackElement(this)) {\n // Silently fail on attempt to play a Ruffle element inside a specific node.\n return;\n }\n try {\n const config = Object.assign(Object.assign(Object.assign({}, ((_b = (_a = window.RufflePlayer) === null || _a === void 0 ? void 0 : _a.config) !== null && _b !== void 0 ? _b : {})), this.config), options);\n // `allowScriptAccess` can only be set in `options`.\n config.allowScriptAccess = options.allowScriptAccess;\n this.showSwfDownload = config.showSwfDownload === true;\n this.options = options;\n this.hasContextMenu = config.contextMenu !== false;\n // Pre-emptively set background color of container while Ruffle/SWF loads.\n if (config.backgroundColor &&\n config.wmode !== \"transparent\" /* WindowMode.Transparent */) {\n this.container.style.backgroundColor = config.backgroundColor;\n }\n await this.ensureFreshInstance(config);\n if (\"url\" in options) {\n console.log(`Loading SWF file ${options.url}`);\n this.swfUrl = new URL(options.url, document.baseURI);\n const parameters = Object.assign(Object.assign({}, sanitizeParameters(options.url.substring(options.url.indexOf(\"?\")))), sanitizeParameters(options.parameters));\n this.instance.stream_from(this.swfUrl.href, parameters);\n }\n else if (\"data\" in options) {\n console.log(\"Loading SWF data\");\n this.instance.load_data(new Uint8Array(options.data), sanitizeParameters(options.parameters));\n }\n }\n catch (err) {\n console.error(`Serious error occurred loading SWF file: ${err}`);\n throw err;\n }\n }\n /**\n * Plays or resumes the movie.\n */\n play() {\n if (this.instance) {\n this.instance.play();\n if (this.playButton) {\n this.playButton.style.display = \"none\";\n }\n }\n }\n /**\n * Whether this player is currently playing.\n *\n * @returns True if this player is playing, false if it's paused or hasn't started yet.\n */\n get isPlaying() {\n if (this.instance) {\n return this.instance.is_playing();\n }\n return false;\n }\n /**\n * Checks if this player is allowed to be fullscreen by the browser.\n *\n * @returns True if you may call [[enterFullscreen]].\n */\n get fullscreenEnabled() {\n return !!(document.fullscreenEnabled || document.webkitFullscreenEnabled);\n }\n /**\n * Checks if this player is currently fullscreen inside the browser.\n *\n * @returns True if it is fullscreen.\n */\n get isFullscreen() {\n return ((document.fullscreenElement || document.webkitFullscreenElement) ===\n this);\n }\n /**\n * Exported function that requests the browser to change the fullscreen state if\n * it is allowed.\n *\n * @param isFull Whether to set to fullscreen or return to normal.\n */\n setFullscreen(isFull) {\n if (this.fullscreenEnabled) {\n if (isFull) {\n this.enterFullscreen();\n }\n else {\n this.exitFullscreen();\n }\n }\n }\n /**\n * Requests the browser to make this player fullscreen.\n *\n * This is not guaranteed to succeed, please check [[fullscreenEnabled]] first.\n */\n enterFullscreen() {\n const options = {\n navigationUI: \"hide\",\n };\n if (this.requestFullscreen) {\n this.requestFullscreen(options);\n }\n else if (this.webkitRequestFullscreen) {\n this.webkitRequestFullscreen(options);\n }\n else if (this.webkitRequestFullScreen) {\n this.webkitRequestFullScreen(options);\n }\n }\n /**\n * Requests the browser to no longer make this player fullscreen.\n */\n exitFullscreen() {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n }\n else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n }\n else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n }\n /**\n * Called when entering / leaving fullscreen\n */\n fullScreenChange() {\n var _a;\n (_a = this.instance) === null || _a === void 0 ? void 0 : _a.set_fullscreen(this.isFullscreen);\n }\n pointerDown(event) {\n // Give option to disable context menu when touch support is being used\n // to avoid a long press triggering the context menu. (#1972)\n if (event.pointerType === \"touch\" || event.pointerType === \"pen\") {\n this.isTouch = true;\n }\n }\n /**\n * Fetches the loaded SWF and downloads it.\n */\n async downloadSwf() {\n try {\n if (this.swfUrl) {\n console.log(\"Downloading SWF: \" + this.swfUrl);\n const response = await fetch(this.swfUrl.href);\n if (!response.ok) {\n console.error(\"SWF download failed\");\n return;\n }\n const blob = await response.blob();\n const blobUrl = URL.createObjectURL(blob);\n const swfDownloadA = document.createElement(\"a\");\n swfDownloadA.style.display = \"none\";\n swfDownloadA.href = blobUrl;\n swfDownloadA.download = swfFileName(this.swfUrl);\n document.body.appendChild(swfDownloadA);\n swfDownloadA.click();\n document.body.removeChild(swfDownloadA);\n URL.revokeObjectURL(blobUrl);\n }\n else {\n console.error(\"SWF download failed\");\n }\n }\n catch (err) {\n console.error(\"SWF download failed\");\n }\n }\n contextMenuItems() {\n const CHECKMARK = String.fromCharCode(0x2713);\n const items = [];\n if (this.instance) {\n const customItems = this.instance.prepare_context_menu();\n customItems.forEach((item, index) => {\n if (item.separatorBefore)\n items.push(null);\n items.push({\n // TODO: better checkboxes\n text: item.caption + (item.checked ? ` (${CHECKMARK})` : ``),\n onClick: () => { var _a; return (_a = this.instance) === null || _a === void 0 ? void 0 : _a.run_context_menu_callback(index); },\n enabled: item.enabled,\n });\n });\n }\n items.push(null);\n if (this.fullscreenEnabled) {\n if (this.isFullscreen) {\n items.push({\n text: \"Exit fullscreen\",\n onClick: () => { var _a; return (_a = this.instance) === null || _a === void 0 ? void 0 : _a.set_fullscreen(false); },\n });\n }\n else {\n items.push({\n text: \"Enter fullscreen\",\n onClick: () => { var _a; return (_a = this.instance) === null || _a === void 0 ? void 0 : _a.set_fullscreen(true); },\n });\n }\n }\n if (this.instance && this.swfUrl && this.showSwfDownload) {\n items.push(null);\n items.push({\n text: `Download .swf`,\n onClick: this.downloadSwf.bind(this),\n });\n }\n items.push(null);\n const extensionString = this.isExtension ? \"extension\" : \"\";\n items.push({\n text: `About Ruffle ${extensionString} (nightly 2022-07-12)`,\n onClick() {\n window.open(RUFFLE_ORIGIN, \"_blank\");\n },\n });\n if (this.isTouch) {\n items.push(null);\n items.push({\n text: \"Hide this menu\",\n onClick: () => (this.contextMenuForceDisabled = true),\n });\n }\n return items;\n }\n showContextMenu(e) {\n e.preventDefault();\n if (!this.hasContextMenu || this.contextMenuForceDisabled) {\n return;\n }\n // Clear all context menu items.\n while (this.contextMenuElement.firstChild) {\n this.contextMenuElement.removeChild(this.contextMenuElement.firstChild);\n }\n // Populate context menu items.\n for (const item of this.contextMenuItems()) {\n if (item === null) {\n if (!this.contextMenuElement.lastElementChild)\n continue; // don't start with separators\n if (this.contextMenuElement.lastElementChild.classList.contains(\"menu_separator\"))\n continue; // don't repeat separators\n const menuSeparator = document.createElement(\"li\");\n menuSeparator.className = \"menu_separator\";\n const hr = document.createElement(\"hr\");\n menuSeparator.appendChild(hr);\n this.contextMenuElement.appendChild(menuSeparator);\n }\n else {\n const { text, onClick, enabled } = item;\n const menuItem = document.createElement(\"li\");\n menuItem.className = \"menu_item\";\n menuItem.textContent = text;\n this.contextMenuElement.appendChild(menuItem);\n if (enabled !== false) {\n menuItem.addEventListener(\"click\", onClick);\n }\n else {\n menuItem.classList.add(\"disabled\");\n }\n }\n }\n // Place a context menu in the top-left corner, so\n // its `clientWidth` and `clientHeight` are not clamped.\n this.contextMenuElement.style.left = \"0\";\n this.contextMenuElement.style.top = \"0\";\n this.contextMenuElement.style.display = \"block\";\n const rect = this.getBoundingClientRect();\n const x = e.clientX - rect.x;\n const y = e.clientY - rect.y;\n const maxX = rect.width - this.contextMenuElement.clientWidth - 1;\n const maxY = rect.height - this.contextMenuElement.clientHeight - 1;\n this.contextMenuElement.style.left =\n Math.floor(Math.min(x, maxX)) + \"px\";\n this.contextMenuElement.style.top =\n Math.floor(Math.min(y, maxY)) + \"px\";\n }\n hideContextMenu() {\n var _a;\n (_a = this.instance) === null || _a === void 0 ? void 0 : _a.clear_custom_menu_items();\n this.contextMenuElement.style.display = \"none\";\n }\n /**\n * Pauses this player.\n *\n * No more frames, scripts or sounds will be executed.\n * This movie will be considered inactive and will not wake up until resumed.\n */\n pause() {\n if (this.instance) {\n this.instance.pause();\n if (this.playButton) {\n this.playButton.style.display = \"block\";\n }\n }\n }\n audioState() {\n if (this.instance) {\n const audioContext = this.instance.audio_context();\n return (audioContext && audioContext.state) || \"running\";\n }\n return \"suspended\";\n }\n unmuteOverlayClicked() {\n if (this.instance) {\n if (this.audioState() !== \"running\") {\n const audioContext = this.instance.audio_context();\n if (audioContext) {\n audioContext.resume();\n }\n }\n if (this.unmuteOverlay) {\n this.unmuteOverlay.style.display = \"none\";\n }\n }\n }\n /**\n * Plays a silent sound based on the AudioContext's sample rate.\n *\n * This is used to unmute audio on iOS and iPadOS when silent mode is enabled on the device (issue 1552).\n */\n unmuteAudioContext() {\n // No need to play the dummy sound again once audio is unmuted.\n if (isAudioContextUnmuted)\n return;\n // TODO: Use `navigator.userAgentData` to detect the platform when support improves?\n if (navigator.maxTouchPoints < 1) {\n isAudioContextUnmuted = true;\n return;\n }\n this.container.addEventListener(\"click\", () => {\n var _a;\n if (isAudioContextUnmuted)\n return;\n const audioContext = (_a = this.instance) === null || _a === void 0 ? void 0 : _a.audio_context();\n if (!audioContext)\n return;\n const audio = new Audio();\n audio.src = (() => {\n // Returns a seven samples long 8 bit mono WAVE file.\n // This is required to prevent the AudioContext from desyncing and crashing.\n const arrayBuffer = new ArrayBuffer(10);\n const dataView = new DataView(arrayBuffer);\n const sampleRate = audioContext.sampleRate;\n dataView.setUint32(0, sampleRate, true);\n dataView.setUint32(4, sampleRate, true);\n dataView.setUint16(8, 1, true);\n const missingCharacters = window\n .btoa(String.fromCharCode(...new Uint8Array(arrayBuffer)))\n .slice(0, 13);\n return `data:audio/wav;base64,UklGRisAAABXQVZFZm10IBAAAAABAAEA${missingCharacters}AgAZGF0YQcAAACAgICAgICAAAA=`;\n })();\n audio.load();\n audio\n .play()\n .then(() => {\n isAudioContextUnmuted = true;\n })\n .catch((err) => {\n console.warn(`Failed to play dummy sound: ${err}`);\n });\n }, { once: true });\n }\n /**\n * Copies attributes and children from another element to this player element.\n * Used by the polyfill elements, RuffleObject and RuffleEmbed.\n *\n * @param elem The element to copy all attributes from.\n * @protected\n */\n copyElement(elem) {\n if (elem) {\n for (let i = 0; i < elem.attributes.length; i++) {\n const attrib = elem.attributes[i];\n if (attrib.specified) {\n // Issue 468: Chrome \"Click to Active Flash\" box stomps on title attribute\n if (attrib.name === \"title\" &&\n attrib.value === \"Adobe Flash Player\") {\n continue;\n }\n try {\n this.setAttribute(attrib.name, attrib.value);\n }\n catch (err) {\n // The embed may have invalid attributes, so handle these gracefully.\n console.warn(`Unable to set attribute ${attrib.name} on Ruffle instance`);\n }\n }\n }\n for (const node of Array.from(elem.children)) {\n this.appendChild(node);\n }\n }\n }\n /**\n * Converts a dimension attribute on an HTML embed/object element to a valid CSS dimension.\n * HTML element dimensions are unitless, but can also be percentages.\n * Add a 'px' unit unless the value is a percentage.\n * Returns null if this is not a valid dimension.\n *\n * @param attribute The attribute to convert\n *\n * @private\n */\n static htmlDimensionToCssDimension(attribute) {\n if (attribute) {\n const match = attribute.match(DIMENSION_REGEX);\n if (match) {\n let out = match[1];\n if (!match[3]) {\n // Unitless -- add px for CSS.\n out += \"px\";\n }\n return out;\n }\n }\n return null;\n }\n /**\n * When a movie presents a new callback through `ExternalInterface.addCallback`,\n * we are informed so that we can expose the method on any relevant DOM element.\n *\n * This should only be called by Ruffle itself and not by users.\n *\n * @param name The name of the callback that is now available.\n *\n * @internal\n * @ignore\n */\n onCallbackAvailable(name) {\n const instance = this.instance;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this[name] = (...args) => {\n return instance === null || instance === void 0 ? void 0 : instance.call_exposed_callback(name, args);\n };\n }\n /**\n * Sets a trace observer on this flash player.\n *\n * The observer will be called, as a function, for each message that the playing movie will \"trace\" (output).\n *\n * @param observer The observer that will be called for each trace.\n */\n set traceObserver(observer) {\n var _a;\n (_a = this.instance) === null || _a === void 0 ? void 0 : _a.set_trace_observer(observer);\n }\n /**\n * Panics this specific player, forcefully destroying all resources and displays an error message to the user.\n *\n * This should be called when something went absolutely, incredibly and disastrously wrong and there is no chance\n * of recovery.\n *\n * Ruffle will attempt to isolate all damage to this specific player instance, but no guarantees can be made if there\n * was a core issue which triggered the panic. If Ruffle is unable to isolate the cause to a specific player, then\n * all players will panic and Ruffle will become \"poisoned\" - no more players will run on this page until it is\n * reloaded fresh.\n *\n * @param error The error, if any, that triggered this panic.\n */\n panic(error) {\n var _a;\n if (this.panicked) {\n // Only show the first major error, not any repeats - they aren't as important\n return;\n }\n this.panicked = true;\n if (error instanceof Error &&\n (error.name === \"AbortError\" ||\n error.message.includes(\"AbortError\"))) {\n // Firefox: Don't display the panic screen if the user leaves the page while something is still loading\n return;\n }\n const errorIndex = (_a = error === null || error === void 0 ? void 0 : error.ruffleIndexError) !== null && _a !== void 0 ? _a : 0 /* PanicError.Unknown */;\n const errorArray = Object.assign([], {\n stackIndex: -1,\n });\n errorArray.push(\"# Error Info\\n\");\n if (error instanceof Error) {\n errorArray.push(`Error name: ${error.name}\\n`);\n errorArray.push(`Error message: ${error.message}\\n`);\n if (error.stack) {\n const stackIndex = errorArray.push(`Error stack:\\n\\`\\`\\`\\n${error.stack}\\n\\`\\`\\`\\n`) - 1;\n errorArray.stackIndex = stackIndex;\n }\n }\n else {\n errorArray.push(`Error: ${error}\\n`);\n }\n errorArray.push(\"\\n# Player Info\\n\");\n errorArray.push(this.debugPlayerInfo());\n errorArray.push(\"\\n# Page Info\\n\");\n errorArray.push(`Page URL: ${document.location.href}\\n`);\n if (this.swfUrl)\n errorArray.push(`SWF URL: ${this.swfUrl}\\n`);\n errorArray.push(\"\\n# Browser Info\\n\");\n errorArray.push(`User Agent: ${window.navigator.userAgent}\\n`);\n errorArray.push(`Platform: ${window.navigator.platform}\\n`);\n errorArray.push(`Has touch support: ${window.navigator.maxTouchPoints > 0}\\n`);\n errorArray.push(\"\\n# Ruffle Info\\n\");\n errorArray.push(`Version: 0.1.0\\n`);\n errorArray.push(`Name: nightly 2022-07-12\\n`);\n errorArray.push(`Channel: nightly\\n`);\n errorArray.push(`Built: 2022-07-12T00:16:32.758Z\\n`);\n errorArray.push(`Commit: 13a0eb3d929ca979513db13717a55abe2b693f6b\\n`);\n errorArray.push(`Is extension: ${this.isExtension}\\n`);\n const errorText = errorArray.join(\"\");\n const buildDate = new Date(\"2022-07-12T00:16:32.758Z\");\n const monthsPrior = new Date();\n monthsPrior.setMonth(monthsPrior.getMonth() - 6); // 6 months prior\n const isBuildOutdated = monthsPrior > buildDate;\n // Create a link to GitHub with all of the error data, if the build is not outdated.\n // Otherwise, create a link to the downloads section on the Ruffle website.\n let actionTag;\n if (!isBuildOutdated) {\n // Remove query params for the issue title.\n const pageUrl = document.location.href.split(/[?#]/)[0];\n const issueTitle = `Error on ${pageUrl}`;\n let issueLink = `https://github.com/ruffle-rs/ruffle/issues/new?title=${encodeURIComponent(issueTitle)}&template=error_report.md&labels=error-report&body=`;\n let issueBody = encodeURIComponent(errorText);\n if (errorArray.stackIndex > -1 &&\n String(issueLink + issueBody).length > 8195) {\n // Strip the stack error from the array when the produced URL is way too long.\n // This should prevent \"414 Request-URI Too Large\" errors on GitHub.\n errorArray[errorArray.stackIndex] = null;\n issueBody = encodeURIComponent(errorArray.join(\"\"));\n }\n issueLink += issueBody;\n actionTag = `Report Bug`;\n }\n else {\n actionTag = `Update Ruffle`;\n }\n // Clears out any existing content (ie play button or canvas) and replaces it with the error screen\n let errorBody, errorFooter;\n switch (errorIndex) {\n case 2 /* PanicError.FileProtocol */:\n // General error: Running on the `file:` protocol\n errorBody = `\n

It appears you are running Ruffle on the \"file:\" protocol.

\n

This doesn't work as browsers block many features from working for security reasons.

\n

Instead, we invite you to setup a local server or either use the web demo or the desktop application.

\n `;\n errorFooter = `\n
  • Web Demo
  • \n
  • Desktop Application
  • \n `;\n break;\n case 4 /* PanicError.JavascriptConfiguration */:\n // General error: Incorrect JavaScript configuration\n errorBody = `\n

    Ruffle has encountered a major issue due to an incorrect JavaScript configuration.

    \n

    If you are the server administrator, we invite you to check the error details to find out which parameter is at fault.

    \n

    You can also consult the Ruffle wiki for help.

    \n `;\n errorFooter = `\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n `;\n break;\n case 9 /* PanicError.WasmNotFound */:\n // Self hosted: Cannot load `.wasm` file - file not found\n errorBody = `\n

    Ruffle failed to load the required \".wasm\" file component.

    \n

    If you are the server administrator, please ensure the file has correctly been uploaded.

    \n

    If the issue persists, you may need to use the \"publicPath\" setting: please consult the Ruffle wiki for help.

    \n `;\n errorFooter = `\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n `;\n break;\n case 8 /* PanicError.WasmMimeType */:\n // Self hosted: Cannot load `.wasm` file - incorrect MIME type\n errorBody = `\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    This web server is not serving \".wasm\" files with the correct MIME type.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n `;\n errorFooter = `\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n `;\n break;\n case 11 /* PanicError.SwfFetchError */:\n errorBody = `\n

    Ruffle failed to load the Flash SWF file.

    \n

    The most likely reason is that the file no longer exists, so there is nothing for Ruffle to load.

    \n

    Try contacting the website administrator for help.

    \n `;\n errorFooter = `\n
  • View Error Details
  • \n `;\n break;\n case 6 /* PanicError.WasmCors */:\n // Self hosted: Cannot load `.wasm` file - CORS issues\n errorBody = `\n

    Ruffle failed to load the required \".wasm\" file component.

    \n

    Access to fetch has likely been blocked by CORS policy.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n `;\n errorFooter = `\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n `;\n break;\n case 3 /* PanicError.InvalidWasm */:\n // Self hosted: Cannot load `.wasm` file - incorrect configuration or missing files\n errorBody = `\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    It seems like this page has missing or invalid files for running Ruffle.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n `;\n errorFooter = `\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n `;\n break;\n case 7 /* PanicError.WasmDownload */:\n // Usually a transient network error or botched deployment\n errorBody = `\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    This can often resolve itself, so you can try reloading the page.

    \n

    Otherwise, please contact the website administrator.

    \n `;\n errorFooter = `\n
  • View Error Details
  • \n `;\n break;\n case 10 /* PanicError.WasmDisabledMicrosoftEdge */:\n // Self hosted: User has disabled WebAssembly in Microsoft Edge through the\n // \"Enhance your Security on the web\" setting.\n errorBody = `\n

    Ruffle failed to load the required \".wasm\" file component.

    \n

    To fix this, try opening your browser's settings, clicking \"Privacy, search, and services\", scrolling down, and turning off \"Enhance your security on the web\".

    \n

    This will allow your browser to load the required \".wasm\" files.

    \n

    If the issue persists, you might have to use a different browser.

    \n `;\n errorFooter = `\n
  • More Information
  • \n
  • View Error Details
  • \n `;\n break;\n case 5 /* PanicError.JavascriptConflict */:\n // Self hosted: Cannot load `.wasm` file - a native object / function is overriden\n errorBody = `\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    It seems like this page uses JavaScript code that conflicts with Ruffle.

    \n

    If you are the server administrator, we invite you to try loading the file on a blank page.

    \n `;\n if (isBuildOutdated) {\n errorBody += `

    You can also try to upload a more recent version of Ruffle that may circumvent the issue (current build is outdated: 2022-07-12T00:16:32.758Z).

    `;\n }\n errorFooter = `\n
  • ${actionTag}
  • \n
  • View Error Details
  • \n `;\n break;\n case 1 /* PanicError.CSPConflict */:\n // General error: Cannot load `.wasm` file - a native object / function is overriden\n errorBody = `\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    This web server's Content Security Policy does not allow the required \".wasm\" component to run.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n `;\n errorFooter = `\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n `;\n break;\n default:\n // Unknown error\n errorBody = `

    Ruffle has encountered a major issue whilst trying to display this Flash content.

    `;\n if (!isBuildOutdated) {\n errorBody += `

    This isn't supposed to happen, so we'd really appreciate if you could file a bug!

    `;\n }\n else {\n errorBody += `

    If you are the server administrator, please try to upload a more recent version of Ruffle (current build is outdated: 2022-07-12T00:16:32.758Z).

    `;\n }\n errorFooter = `\n
  • ${actionTag}
  • \n
  • View Error Details
  • \n `;\n break;\n }\n this.container.innerHTML = `\n
    \n
    Something went wrong :(
    \n
    ${errorBody}
    \n
    \n \n
    \n
    \n `;\n const viewDetails = (this.container.querySelector(\"#panic-view-details\"));\n if (viewDetails) {\n viewDetails.onclick = () => {\n const panicBody = (this.container.querySelector(\"#panic-body\"));\n panicBody.classList.add(\"details\");\n panicBody.innerHTML = ``;\n return false;\n };\n }\n // Do this last, just in case it causes any cascading issues.\n this.destroy();\n }\n displayRootMovieDownloadFailedMessage() {\n if (window.location.origin === this.swfUrl.origin ||\n !this.isExtension ||\n !window.location.protocol.includes(\"http\")) {\n const error = new Error(\"Failed to fetch: \" + this.swfUrl);\n error.ruffleIndexError = 11 /* PanicError.SwfFetchError */;\n this.panic(error);\n return;\n }\n const div = document.createElement(\"div\");\n div.id = \"message_overlay\";\n div.innerHTML = `
    \n

    Ruffle wasn't able to run the Flash embedded in this page.

    \n

    You can try to open the file in a separate tab, to sidestep this issue.

    \n
    \n Open in a new tab\n
    \n
    `;\n this.container.prepend(div);\n }\n displayUnsupportedMessage() {\n const div = document.createElement(\"div\");\n div.id = \"message_overlay\";\n // TODO: Change link to https://ruffle.rs/faq or similar\n // TODO: Pause content until message is dismissed\n div.innerHTML = `
    \n

    The Ruffle emulator does not yet support ActionScript 3, required by this content.

    \n

    If you choose to run it anyway, interactivity will be missing or limited.

    \n
    \n More info\n \n
    \n
    `;\n this.container.prepend(div);\n const button = div.querySelector(\"#run-anyway-btn\");\n button.onclick = () => {\n div.parentNode.removeChild(div);\n };\n }\n displayMessage(message) {\n // Show a dismissible message in front of the player\n const div = document.createElement(\"div\");\n div.id = \"message_overlay\";\n div.innerHTML = `
    \n

    ${message}

    \n
    \n \n
    \n
    `;\n this.container.prepend(div);\n (this.container.querySelector(\"#continue-btn\")).onclick = () => {\n div.parentNode.removeChild(div);\n };\n }\n debugPlayerInfo() {\n var _a, _b;\n return `Allows script access: ${(_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.allowScriptAccess) !== null && _b !== void 0 ? _b : false}\\n`;\n }\n setMetadata(metadata) {\n this._metadata = metadata;\n // TODO: Switch this to ReadyState.Loading when we have streaming support.\n this._readyState = 2 /* ReadyState.Loaded */;\n this.dispatchEvent(new Event(RufflePlayer.LOADED_METADATA));\n // TODO: Move this to whatever function changes the ReadyState to Loaded when we have streaming support.\n this.dispatchEvent(new Event(RufflePlayer.LOADED_DATA));\n }\n setIsExtension(isExtension) {\n this.isExtension = isExtension;\n }\n}\n/**\n * Triggered when a movie metadata has been loaded (such as movie width and height).\n *\n * @event RufflePlayer#loadedmetadata\n */\nRufflePlayer.LOADED_METADATA = \"loadedmetadata\";\n/**\n * Triggered when a movie is fully loaded.\n *\n * @event RufflePlayer#loadeddata\n */\nRufflePlayer.LOADED_DATA = \"loadeddata\";\n/**\n * Returns whether a SWF file can call JavaScript code in the surrounding HTML file.\n *\n * @param access The value of the `allowScriptAccess` attribute.\n * @param url The URL of the SWF file.\n * @returns True if script access is allowed.\n */\nexport function isScriptAccessAllowed(access, url) {\n if (!access) {\n access = \"sameDomain\";\n }\n switch (access.toLowerCase()) {\n case \"always\":\n return true;\n case \"never\":\n return false;\n case \"samedomain\":\n default:\n try {\n return (new URL(window.location.href).origin ===\n new URL(url, window.location.href).origin);\n }\n catch (_a) {\n return false;\n }\n }\n}\n/**\n * Returns whether a SWF file should show the built-in context menu items.\n *\n * @param menu The value of the `menu` attribute.\n * @returns True if the built-in context items should be shown.\n */\nexport function isBuiltInContextMenuVisible(menu) {\n if (menu === null || menu.toLowerCase() === \"true\") {\n return true;\n }\n return false;\n}\n/**\n * Returns whether the given filename is a Youtube Flash source.\n *\n * @param filename The filename to test.\n * @returns True if the filename is a Youtube Flash source.\n */\nexport function isYoutubeFlashSource(filename) {\n if (filename) {\n let pathname = \"\";\n let cleaned_hostname = \"\";\n try {\n // A base URL is required if `filename` is a relative URL, but we don't need to detect the real URL origin.\n const url = new URL(filename, RUFFLE_ORIGIN);\n pathname = url.pathname;\n cleaned_hostname = url.hostname.replace(\"www.\", \"\");\n }\n catch (err) {\n // Some invalid filenames, like `///`, could raise a TypeError. Let's fail silently in this situation.\n }\n // See https://wiki.mozilla.org/QA/Youtube_Embedded_Rewrite\n if (pathname.startsWith(\"/v/\") &&\n (cleaned_hostname === \"youtube.com\" ||\n cleaned_hostname === \"youtube-nocookie.com\")) {\n return true;\n }\n }\n return false;\n}\n/**\n * Workaround Youtube mixed content if upgradeToHttps is true.\n *\n * @param elem The element to change.\n * @param attr The attribute to adjust.\n */\nexport function workaroundYoutubeMixedContent(elem, attr) {\n var _a, _b;\n const elem_attr = elem.getAttribute(attr);\n const window_config = (_b = (_a = window.RufflePlayer) === null || _a === void 0 ? void 0 : _a.config) !== null && _b !== void 0 ? _b : {};\n if (elem_attr) {\n try {\n const url = new URL(elem_attr);\n if (url.protocol === \"http:\" &&\n window.location.protocol === \"https:\" &&\n window_config.upgradeToHttps !== false) {\n url.protocol = \"https:\";\n elem.setAttribute(attr, url.toString());\n }\n }\n catch (err) {\n // Some invalid filenames, like `///`, could raise a TypeError. Let's fail silently in this situation.\n }\n }\n}\n/**\n * Returns whether the given filename ends in a known flash extension.\n *\n * @param filename The filename to test.\n * @returns True if the filename is a flash movie (swf or spl).\n */\nexport function isSwfFilename(filename) {\n if (filename) {\n let pathname = \"\";\n try {\n // A base URL is required if `filename` is a relative URL, but we don't need to detect the real URL origin.\n pathname = new URL(filename, RUFFLE_ORIGIN).pathname;\n }\n catch (err) {\n // Some invalid filenames, like `///`, could raise a TypeError. Let's fail silently in this situation.\n }\n if (pathname && pathname.length >= 4) {\n const extension = pathname.slice(-4).toLowerCase();\n if (extension === \".swf\" || extension === \".spl\") {\n return true;\n }\n }\n }\n return false;\n}\n/**\n * Determine if an element is a child of a node that was not supported\n * in non-HTML5 compliant browsers. If so, the element was meant to be\n * used as a fallback content.\n *\n * @param elem The element to test.\n * @returns True if the element is inside an