{"version":3,"sources":["webpack:///app/javascript/opt/mastodon/app/javascript/flavours/glitch/packs/error.js","webpack:///app/javascript/opt/mastodon/app/javascript/packs/public-path.js","webpack:///app/javascript/opt/mastodon/app/javascript/flavours/glitch/ready.js"],"names":["ready","image","document","querySelector","addEventListener","src","removeOuterSlashes","string","replace","cdnHost","__webpack_public_path__","host","path","formattedHost","test","formatPublicPath","content","process","callback","Promise","resolve","reject","loaded","result","err","then","catch","includes","readyState"],"mappings":"qIAAA,yBAGAA,mBAAM,KACJ,MAAMC,EAAQC,SAASC,cAAc,OAErCF,EAAMG,iBAAiB,cAAc,KACnCH,EAAMI,IAAM,eAGdJ,EAAMG,iBAAiB,cAAc,KACnCH,EAAMI,IAAM,mB,mBCPhB,SAASC,EAAmBC,GAC1B,OAAOA,EAAOC,QAAQ,OAAQ,IAAIA,QAAQ,OAAQ,IAYpD,MAAMC,EAAUP,SAASC,cAAc,uBAGvCO,IAZA,SAA0BC,EAAWC,QAAP,IAAJD,MAAO,SAAQ,IAAJC,MAAO,IAC1C,IAAIC,EAAgBP,EAAmBK,GAKvC,OAJIE,IAAkB,SAASC,KAAKD,KAClCA,EAAiB,KAAIA,KAGf,GAAEA,KADYP,EAAmBM,MAOjBG,CAAiBN,EAAUA,EAAQO,QAAU,GAAIC,U,gCCd5D,SAASjB,EAAMkB,GAC5B,OAAO,IAAIC,SAAQ,CAACC,EAASC,KAC3B,SAASC,IAAU,IAAD,EAChB,IAAIC,EACJ,IACEA,EAASL,IACT,MAAOM,GAGP,YAFAH,EAAOG,GAKmB,mBAAX,OAAb,EAAOD,QAAM,EAAN,EAAQE,MACjBF,EAAOE,KAAKL,GAASM,MAAML,GAE3BD,IAIA,CAAC,cAAe,YAAYO,SAASzB,SAAS0B,YAChDN,IAEApB,SAASE,iBAAiB,mBAAoBkB,MA5BpD,iD","file":"js/flavours/glitch/error-5116726ddd0665967a7f.chunk.js","sourcesContent":["import 'packs/public-path';\nimport ready from 'flavours/glitch/ready';\n\nready(() => {\n const image = document.querySelector('img');\n\n image.addEventListener('mouseenter', () => {\n image.src = '/oops.gif';\n });\n\n image.addEventListener('mouseleave', () => {\n image.src = '/oops.png';\n });\n});\n","// Dynamically set webpack's loading path depending on a meta header, in order\n// to share the same assets regardless of instance configuration.\n// See https://webpack.js.org/guides/public-path/#on-the-fly\n\nfunction removeOuterSlashes(string) {\n return string.replace(/^\\/*/, '').replace(/\\/*$/, '');\n}\n\nfunction formatPublicPath(host = '', path = '') {\n let formattedHost = removeOuterSlashes(host);\n if (formattedHost && !/^http/i.test(formattedHost)) {\n formattedHost = `//${formattedHost}`;\n }\n const formattedPath = removeOuterSlashes(path);\n return `${formattedHost}/${formattedPath}/`;\n}\n\nconst cdnHost = document.querySelector('meta[name=cdn-host]');\n\n// eslint-disable-next-line camelcase, no-undef, no-unused-vars\n__webpack_public_path__ = formatPublicPath(cdnHost ? cdnHost.content : '', process.env.PUBLIC_OUTPUT_PATH);\n","// @ts-check\n\n/**\n * @param {(() => void) | (() => Promise)} callback\n * @returns {Promise}\n */\nexport default function ready(callback) {\n return new Promise((resolve, reject) => {\n function loaded() {\n let result;\n try {\n result = callback();\n } catch (err) {\n reject(err);\n\n return;\n }\n\n if (typeof result?.then === 'function') {\n result.then(resolve).catch(reject);\n } else {\n resolve();\n }\n }\n\n if (['interactive', 'complete'].includes(document.readyState)) {\n loaded();\n } else {\n document.addEventListener('DOMContentLoaded', loaded);\n }\n });\n}\n"],"sourceRoot":""}