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iB,QAEXtnB,IAAfunB,IACAC,EAAUb,eAAeY,IAMP,IADAC,EAAU1f,OAAO8E,WAE/ByY,EAAUU,kBAGXyB,CACX,EClPJ5lB,OAAO2L,aAAe8Y,GAAUoB,UAAU7lB,OAAO2L,aAAc,Q","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/shadow-template.js","webpack://ruffle-selfhosted/../core/pkg/register-element.js","webpack://ruffle-selfhosted/../core/pkg/config.js","webpack://ruffle-selfhosted/../core/pkg/ruffle-player.js","webpack://ruffle-selfhosted/../core/pkg/swf-file-name.js","webpack://ruffle-selfhosted/../core/pkg/plugin-polyfill.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/source-api.js","webpack://ruffle-selfhosted/../core/pkg/public-api.js","webpack://ruffle-selfhosted/./js/ruffle.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\":\"8577203f45cdb0499311\",\"966\":\"7ecc2d52e8f222ff95a4\"}[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.publicPath !== null && 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, referenceTypes, } 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 * @param progressCallback The callback that will be run with Ruffle's download progress.\n * @returns A ruffle constructor that may be used to create new Ruffle\n * instances.\n */\nasync function fetchRuffle(config, progressCallback) {\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 referenceTypes(),\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 let response;\n const wasmUrl = extensionsSupported\n ? new URL(\"../pkg/ruffle_web-wasm_extensions_bg.wasm\", import.meta.url)\n : new URL(\"../pkg/ruffle_web_bg.wasm\", import.meta.url);\n const wasmResponse = await fetch(wasmUrl);\n if (progressCallback) {\n const contentLength = wasmResponse.headers.get(\"content-length\") || \"\";\n let bytesLoaded = 0;\n // Use parseInt rather than Number so the empty string is coerced to NaN instead of 0\n const bytesTotal = parseInt(contentLength);\n response = new Response(new ReadableStream({\n async start(controller) {\n var _a;\n const reader = (_a = wasmResponse.body) === null || _a === void 0 ? void 0 : _a.getReader();\n if (!reader) {\n throw \"Response had no body\";\n }\n progressCallback(bytesLoaded, bytesTotal);\n for (;;) {\n const { done, value } = await reader.read();\n if (done)\n break;\n if (value === null || value === void 0 ? void 0 : value.byteLength)\n bytesLoaded += value === null || value === void 0 ? void 0 : value.byteLength;\n controller.enqueue(value);\n progressCallback(bytesLoaded, bytesTotal);\n }\n controller.close();\n },\n }), wasmResponse);\n }\n else {\n response = wasmResponse;\n }\n await init(response);\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 * @param progressCallback The callback that will be run with Ruffle's download progress.\n * @returns A ruffle constructor that may be used to create new Ruffle\n * instances.\n */\nexport function loadRuffle(config, progressCallback) {\n if (lastLoaded === null) {\n lastLoaded = fetchRuffle(config, progressCallback);\n }\n return lastLoaded;\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 \n
\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 \"./load-options\";\nexport const DEFAULT_CONFIG = {\n allowScriptAccess: false,\n parameters: {},\n autoplay: \"auto\" /* AutoPlay.Auto */,\n backgroundColor: null,\n letterbox: \"fullscreen\" /* Letterbox.Fullscreen */,\n unmuteOverlay: \"visible\" /* UnmuteOverlay.Visible */,\n upgradeToHttps: true,\n warnOnUnsupportedContent: true,\n logLevel: \"error\" /* LogLevel.Error */,\n showSwfDownload: false,\n contextMenu: true,\n preloader: true,\n maxExecutionDuration: { secs: 15, nanos: 0 },\n base: null,\n menu: true,\n salign: \"\",\n quality: \"high\",\n scale: \"showAll\",\n wmode: \"opaque\" /* WindowMode.Opaque */,\n publicPath: null,\n polyfills: true,\n};\n","import { loadRuffle } from \"./load-ruffle\";\nimport { ruffleShadowTemplate } from \"./shadow-template\";\nimport { lookupElement } from \"./register-element\";\nimport { DEFAULT_CONFIG } from \"./config\";\nimport \"./load-options\";\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 // 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 // The effective config loaded upon `.load()`.\n this.loadedConfig = DEFAULT_CONFIG;\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 this.playButton.addEventListener(\"click\", () => this.play());\n this.unmuteOverlay = this.shadow.getElementById(\"unmute_overlay\");\n this.preloader = this.shadow.getElementById(\"preloader\");\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.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() {\n var _a;\n this.destroy();\n if (this.loadedConfig.preloader !== false) {\n this.showPreloader();\n }\n const ruffleConstructor = await loadRuffle(this.loadedConfig, this.onRuffleDownloadProgress.bind(this)).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, this.loadedConfig);\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 invalid values as `AutoPlay.Auto`.\n if (this.loadedConfig.autoplay === \"on\" /* AutoPlay.On */ ||\n (this.loadedConfig.autoplay !== \"off\" /* AutoPlay.Off */ &&\n this.audioState() === \"running\")) {\n this.play();\n if (this.audioState() !== \"running\") {\n // Treat invalid values as `UnmuteOverlay.Visible`.\n if (this.loadedConfig.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 * Uploads the preloader progress bar.\n *\n * @param bytesLoaded The size of the Ruffle WebAssembly file downloaded so far.\n * @param bytesTotal The total size of the Ruffle WebAssembly file.\n */\n onRuffleDownloadProgress(bytesLoaded, bytesTotal) {\n const loadBar = (this.preloader.querySelector(\".loadbarInner\"));\n const outerLoadbar = (this.preloader.querySelector(\".loadbar\"));\n if (Number.isNaN(bytesTotal)) {\n if (outerLoadbar) {\n outerLoadbar.style.display = \"none\";\n }\n }\n else {\n loadBar.style.width = `${100.0 * (bytesLoaded / bytesTotal)}%`;\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 checkOptions(options) {\n if (typeof options === \"string\") {\n return { url: options };\n }\n const check = (condition, message) => {\n if (!condition) {\n const error = new TypeError(message);\n error.ruffleIndexError = 4 /* PanicError.JavascriptConfiguration */;\n this.panic(error);\n throw error;\n }\n };\n check(options !== null && typeof options === \"object\", \"Argument 0 must be a string or object\");\n check(\"url\" in options || \"data\" in options, \"Argument 0 must contain a `url` or `data` key\");\n check(!(\"url\" in options) || typeof options.url === \"string\", \"`url` must be a string\");\n return options;\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 options = this.checkOptions(options);\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 this.loadedConfig = Object.assign(Object.assign(Object.assign(Object.assign({}, DEFAULT_CONFIG), ((_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 this.loadedConfig.allowScriptAccess =\n options.allowScriptAccess === true;\n // Pre-emptively set background color of container while Ruffle/SWF loads.\n if (this.loadedConfig.backgroundColor &&\n this.loadedConfig.wmode !== \"transparent\" /* WindowMode.Transparent */) {\n this.container.style.backgroundColor =\n this.loadedConfig.backgroundColor;\n }\n await this.ensureFreshInstance();\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 this.playButton.style.display = \"none\";\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 * Returns the master volume of the player.\n *\n * @returns The volume. 1.0 is 100% volume.\n */\n get volume() {\n if (this.instance) {\n return this.instance.volume();\n }\n return 1.0;\n }\n /**\n * Sets the master volume of the player.\n *\n * @param value The volume. 1.0 is 100% volume.\n */\n set volume(value) {\n if (this.instance) {\n this.instance.set_volume(value);\n }\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 &&\n this.swfUrl &&\n this.loadedConfig.showSwfDownload === true) {\n items.push(null);\n items.push({\n text: \"Download .swf\",\n onClick: this.downloadSwf.bind(this),\n });\n }\n if (window.isSecureContext) {\n items.push({\n text: \"Copy debug info\",\n onClick: () => navigator.clipboard.writeText(this.getPanicData()),\n });\n }\n items.push(null);\n const extensionString = this.isExtension ? \"extension\" : \"\";\n items.push({\n text: `About Ruffle ${extensionString} (nightly 2022-10-17)`,\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.loadedConfig.contextMenu === false ||\n 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 this.playButton.style.display = \"block\";\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 this.unmuteOverlay.style.display = \"none\";\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 * Get data included in any panic of this ruffle-player\n *\n * @returns A string containing all the data included in the panic.\n */\n getPanicData() {\n const dataArray = [];\n dataArray.push(\"\\n# Player Info\\n\");\n dataArray.push(this.debugPlayerInfo());\n dataArray.push(\"\\n# Page Info\\n\");\n dataArray.push(`Page URL: ${document.location.href}\\n`);\n if (this.swfUrl)\n dataArray.push(`SWF URL: ${this.swfUrl}\\n`);\n dataArray.push(\"\\n# Browser Info\\n\");\n dataArray.push(`User Agent: ${window.navigator.userAgent}\\n`);\n dataArray.push(`Platform: ${window.navigator.platform}\\n`);\n dataArray.push(`Has touch support: ${window.navigator.maxTouchPoints > 0}\\n`);\n dataArray.push(\"\\n# Ruffle Info\\n\");\n dataArray.push(`Version: 0.1.0\\n`);\n dataArray.push(`Name: nightly 2022-10-17\\n`);\n dataArray.push(`Channel: nightly\\n`);\n dataArray.push(`Built: 2022-10-17T00:20:39.827Z\\n`);\n dataArray.push(`Commit: 36844e5e2f2476b1c288e4ecaa1ecefbf2ba6972\\n`);\n dataArray.push(`Is extension: ${this.isExtension}\\n`);\n dataArray.push(\"\\n# Metadata\\n\");\n if (this.metadata) {\n for (const [key, value] of Object.entries(this.metadata)) {\n dataArray.push(`${key}: ${value}\\n`);\n }\n }\n return dataArray.join(\"\");\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 this.hidePreloader();\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 avmStackIndex: -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 if (error.avmStack) {\n const avmStackIndex = errorArray.push(`AVM2 stack:\\n\\`\\`\\`\\n ${error.avmStack\n .trim()\n .replace(/\\t/g, \" \")}\\n\\`\\`\\`\\n`) - 1;\n errorArray.avmStackIndex = avmStackIndex;\n }\n errorArray.stackIndex = stackIndex;\n }\n }\n else {\n errorArray.push(`Error: ${error}\\n`);\n }\n errorArray.push(this.getPanicData());\n const errorText = errorArray.join(\"\");\n const buildDate = new Date(\"2022-10-17T00:20:39.827Z\");\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 if (errorArray.avmStackIndex > -1) {\n errorArray[errorArray.avmStackIndex] = null;\n }\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-10-17T00:20:39.827Z).

    `;\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-10-17T00:20:39.827Z).

    `;\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 this.hidePreloader();\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 let result = `Allows script access: ${this.loadedConfig.allowScriptAccess}\\n`;\n if (this.instance) {\n result += `Renderer: ${this.instance.renderer_name()}\\n`;\n }\n return result;\n }\n hidePreloader() {\n this.preloader.classList.add(\"hidden\");\n this.container.classList.remove(\"hidden\");\n }\n showPreloader() {\n this.preloader.classList.remove(\"hidden\");\n this.container.classList.add(\"hidden\");\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.hidePreloader();\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 * Returns whether the given MIME type is a known flash type.\n *\n * @param mime The MIME type to test.\n * @returns True if the MIME type is a flash MIME type.\n */\nexport function isSwfMimeType(mime) {\n switch (mime.toLowerCase()) {\n case FLASH_MIMETYPE.toLowerCase():\n case FUTURESPLASH_MIMETYPE.toLowerCase():\n case FLASH7_AND_8_MIMETYPE.toLowerCase():\n case FLASH_MOVIE_MIMETYPE.toLowerCase():\n return true;\n default:\n return false;\n }\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