{"version":3,"sources":["../../src/client/bootstrap.js"],"names":["HTMLScriptElement","prototype","s","document","createElement","type","src","head","append"],"mappings":"yBAsBA,GADuB,aAAcA,kBAAkBC,UACnC,CACnB,MAAMC,EAAIC,SAASC,cAAc,UACjCF,EAAEG,KAAO,SAETH,EAAEI,IAAM,0BACRH,SAASI,KAAKC,OAAON","sourcesContent":["/**\r\n * @fileoverview Bootstrap code run by all browsers inside `script defer`.\r\n *\r\n * Used to trigger basic Analytics, including with our known previous signed-in\r\n * state that was cached in `localStorage`.\r\n *\r\n * * This file is built with Rollup, but separately to our core bundle: don't\r\n * import any core site code as it'll be duplicated.\r\n *\r\n * * It's run in all browsers as a regular script (not \"module\"), and this\r\n * includes all ancient browsers, e.g., IE11 or older.\r\n *\r\n * * It runs _before_ our core bundle (for supported browsers), as it inserts\r\n * the \"entrypoint\" script tag as part of its work.\r\n */\r\n\r\nimport entrypoint from 'webdev_entrypoint';\r\n// import removeServiceWorkers from './utils/sw-remove';\r\n\r\n// In future, we can feature-detect other things here and prevent loading core\r\n// site code. This includes Shadow DOM.\r\nconst browserSupport = 'noModule' in HTMLScriptElement.prototype;\r\nif (browserSupport) {\r\n\tconst s = document.createElement('script');\r\n\ts.type = 'module';\r\n\t// s.src = '/' + entrypoint;\r\n\ts.src = '/static/' + entrypoint;\r\n\tdocument.head.append(s);\r\n} else {\r\n\t// If we've transitioned into becoming an unsupported browser, then any\r\n\t// previous Service Worker won't be updated. Aggressively remove on load.\r\n\t// removeServiceWorkers();\r\n}\r\n"]}