{"version":3,"sources":["webpack:///app/javascript/opt/mastodon/app/javascript/core/embed.js","webpack:///app/javascript/opt/mastodon/app/javascript/packs/public-path.js"],"names":["window","addEventListener","e","data","setEmbedHeight","parent","postMessage","type","id","height","document","getElementsByTagName","scrollHeight","includes","readyState","removeOuterSlashes","string","replace","cdnHost","querySelector","__webpack_public_path__","host","path","formattedHost","test","formatPublicPath","content","process"],"mappings":"oIAAA,aAIAA,OAAOC,iBAAiB,WAAW,SAAAC,GACjC,IAAMC,EAAOD,EAAEC,MAAQ,GAMvB,SAASC,IACPJ,OAAOK,OAAOC,YAAY,CACxBC,KAAM,YACNC,GAAIL,EAAKK,GACTC,OAAQC,SAASC,qBAAqB,QAAQ,GAAGC,cAChD,KATAZ,OAAOK,QAAwB,cAAdF,EAAKI,OAYvB,CAAC,cAAe,YAAYM,SAASH,SAASI,YAChDV,IAEAM,SAAST,iBAAiB,mBAAoBG,Q,mBClBlD,SAASW,EAAmBC,GAC1B,OAAOA,EAAOC,QAAQ,OAAQ,IAAIA,QAAQ,OAAQ,IAYpD,IAAMC,EAAUR,SAASS,cAAc,uBAGvCC,IAZA,SAA0BC,EAAWC,QAAW,IAAtBD,MAAO,SAAe,IAAXC,MAAO,IAC1C,IAAIC,EAAgBR,EAAmBM,GAKvC,OAJIE,IAAkB,SAASC,KAAKD,KAClCA,EAAa,KAAQA,GAGbA,EAAV,IADsBR,EAAmBO,GACzC,IAMwBG,CAAiBP,EAAUA,EAAQQ,QAAU,GAAIC,W","file":"js/core/embed-28171f95848c050d12e2.chunk.js","sourcesContent":["// This file will be loaded on embed pages, regardless of theme.\n\nimport 'packs/public-path';\n\nwindow.addEventListener('message', e => {\n const data = e.data || {};\n\n if (!window.parent || data.type !== 'setHeight') {\n return;\n }\n\n function setEmbedHeight () {\n window.parent.postMessage({\n type: 'setHeight',\n id: data.id,\n height: document.getElementsByTagName('html')[0].scrollHeight,\n }, '*');\n };\n\n if (['interactive', 'complete'].includes(document.readyState)) {\n setEmbedHeight();\n } else {\n document.addEventListener('DOMContentLoaded', setEmbedHeight);\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"],"sourceRoot":""}