1/** 2 * Welcome to your Workbox-powered service worker! 3 * 4 * You'll need to register this file in your web app and you should 5 * disable HTTP caching for this file too. 6 * See https://goo.gl/nhQhGp 7 * 8 * The rest of the code is auto-generated. Please don't update this file 9 * directly; instead, make changes to your Workbox build configuration 10 * and re-run your build process. 11 * See https://goo.gl/2aRDsh 12 */ 13 14importScripts("workbox-v3.6.3/workbox-sw.js"); 15workbox.setConfig({modulePathPrefix: "workbox-v3.6.3"}); 16 17workbox.core.setCacheNameDetails({prefix: "gatsby-plugin-offline"}); 18 19workbox.skipWaiting(); 20workbox.clientsClaim(); 21 22/** 23 * The workboxSW.precacheAndRoute() method efficiently caches and responds to 24 * requests for URLs in the manifest. 25 * See https://goo.gl/S9QRab 26 */ 27self.__precacheManifest = [ 28 { 29 "url": "webpack-runtime-a7aefc16f2c1b981d34b.js" 30 }, 31 { 32 "url": "framework-22e284bb9c60c9c4a40e.js" 33 }, 34 { 35 "url": "app-d80d3a15c7694b60d7c7.js" 36 }, 37 { 38 "url": "component---node-modules-gatsby-plugin-offline-app-shell-js-4cb84401c05fba7d0760.js" 39 }, 40 { 41 "url": "offline-plugin-app-shell-fallback/index.html", 42 "revision": "3e76884da90e7cc35801ab81b90bf526" 43 }, 44 { 45 "url": "polyfill-d2f9c99f8e015a41e160.js" 46 }, 47 { 48 "url": "manifest.json", 49 "revision": "b773e901ef06ac93343dc05e67540787" 50 }, 51 { 52 "url": "manifest.webmanifest", 53 "revision": "9b89138a20e921ab72222b539a5bcb5e" 54 } 55].concat(self.__precacheManifest || []); 56workbox.precaching.suppressWarnings(); 57workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 58 59workbox.routing.registerRoute(/(\.js$|\.css$|static\/)/, workbox.strategies.cacheFirst(), 'GET'); 60workbox.routing.registerRoute(/^https?:.*\page-data\/.*\/page-data\.json/, workbox.strategies.networkFirst(), 'GET'); 61workbox.routing.registerRoute(/^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/, workbox.strategies.staleWhileRevalidate(), 'GET'); 62workbox.routing.registerRoute(/^https?:\/\/fonts\.googleapis\.com\/css/, workbox.strategies.staleWhileRevalidate(), 'GET'); 63 64/* global importScripts, workbox, idbKeyval */ 65 66importScripts(`idb-keyval-iife.min.js`) 67 68const { NavigationRoute } = workbox.routing 69 70const navigationRoute = new NavigationRoute(async ({ event }) => { 71 let { pathname } = new URL(event.request.url) 72 pathname = pathname.replace(new RegExp(`^`), ``) 73 74 // Check for resources + the app bundle 75 // The latter may not exist if the SW is updating to a new version 76 const resources = await idbKeyval.get(`resources:${pathname}`) 77 if (!resources || !(await caches.match(`/app-d80d3a15c7694b60d7c7.js`))) { 78 return await fetch(event.request) 79 } 80 81 for (const resource of resources) { 82 // As soon as we detect a failed resource, fetch the entire page from 83 // network - that way we won't risk being in an inconsistent state with 84 // some parts of the page failing. 85 if (!(await caches.match(resource))) { 86 return await fetch(event.request) 87 } 88 } 89 90 const offlineShell = `/offline-plugin-app-shell-fallback/index.html` 91 return await caches.match(offlineShell) 92}) 93 94workbox.routing.registerRoute(navigationRoute) 95 96const messageApi = { 97 setPathResources(event, { path, resources }) { 98 event.waitUntil(idbKeyval.set(`resources:${path}`, resources)) 99 }, 100 101 clearPathResources(event) { 102 event.waitUntil(idbKeyval.clear()) 103 }, 104} 105 106self.addEventListener(`message`, event => { 107 const { gatsbyApi } = event.data 108 if (gatsbyApi) messageApi[gatsbyApi](event, event.data) 109})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.