| "sourcesContent": ["/*!\n * @license\n * Copyright 2020 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nconst fetchButton = document.querySelector('.js-fetchButton');\nif (fetchButton) {\n fetchButton.addEventListener('click', e => {\n e.preventDefault();\n fetchPath();\n });\n}\n\nasync function fetchPath() {\n const fetchMessageEl = document.querySelector<HTMLHeadingElement>('.js-fetchMessage');\n const fetchMessageSecondary = document.querySelector<HTMLParagraphElement>(\n '.js-fetchMessageSecondary'\n );\n const fetchButton = document.querySelector<HTMLButtonElement>('.js-fetchButton');\n const fetchLoading = document.querySelector<HTMLDivElement>('.js-fetchLoading');\n if (!(fetchMessageEl && fetchMessageSecondary && fetchButton && fetchLoading)) {\n return;\n }\n fetchMessageEl.textContent = `Fetching ${fetchMessageEl.dataset.path}`;\n fetchMessageSecondary.textContent =\n 'Feel free to navigate away and check back later, we\u2019ll keep working on it!';\n fetchButton.style.display = 'none';\n fetchLoading.style.display = 'block';\n\n const response = await fetch(`/fetch${window.location.pathname}`, { method: 'POST' });\n if (response.ok) {\n window.location.reload();\n return;\n }\n const responseText = await response.text();\n fetchLoading.style.display = 'none';\n fetchMessageSecondary.textContent = '';\n const responseTextParsedDOM = new DOMParser().parseFromString(responseText, 'text/html');\n fetchMessageEl.innerHTML = responseTextParsedDOM.documentElement.textContent ?? '';\n}\n\nexport {};\n"], |
| "mappings": "AAAA,AAOA,GAAM,GAAc,SAAS,cAAc,mBAC3C,AAAI,GACF,EAAY,iBAAiB,QAAS,GAAK,CACzC,EAAE,iBACF,MAIJ,kBAA2B,CAf3B,MAgBE,GAAM,GAAiB,SAAS,cAAkC,oBAC5D,EAAwB,SAAS,cACrC,6BAEI,EAAc,SAAS,cAAiC,mBACxD,EAAe,SAAS,cAA8B,oBAC5D,GAAI,CAAE,IAAkB,GAAyB,GAAe,GAC9D,OAEF,EAAe,YAAc,YAAY,EAAe,QAAQ,OAChE,EAAsB,YACpB,kFACF,EAAY,MAAM,QAAU,OAC5B,EAAa,MAAM,QAAU,QAE7B,GAAM,GAAW,KAAM,OAAM,SAAS,OAAO,SAAS,WAAY,CAAE,OAAQ,SAC5E,GAAI,EAAS,GAAI,CACf,OAAO,SAAS,SAChB,OAEF,GAAM,GAAe,KAAM,GAAS,OACpC,EAAa,MAAM,QAAU,OAC7B,EAAsB,YAAc,GACpC,GAAM,GAAwB,GAAI,aAAY,gBAAgB,EAAc,aAC5E,EAAe,UAAY,KAAsB,gBAAgB,cAAtC,OAAqD", |