-
Notifications
You must be signed in to change notification settings - Fork 1
/
service-worker.js
1 lines (1 loc) · 4.73 KB
/
service-worker.js
1
"use strict";var precacheConfig=[["/index.html","a9ed2a6b7e33bb712bf2f208bc9e2301"],["/static/css/main.e3b45043.css","355bc7af22d21352b976d9ab76a31d0f"],["/static/js/main.8ce37037.js","68f236e03ce2a5cd42368f045635e843"],["/static/media/clouds.d38e168d.png","d38e168d0e49430d2d414d7d91602dd4"],["/static/media/clouds.ddc23917.png","ddc2391743fb0b7da29f04eafe8812d7"],["/static/media/condoms.1d0a17d4.png","1d0a17d46069d19988752a2eb6a3790d"],["/static/media/dungeon.1fed9c11.png","1fed9c1169684793765f6fdd4a723c6a"],["/static/media/fey.55b04c75.jpg","55b04c75198e16d3cc96f68beb182561"],["/static/media/fontawesome-webfont.674f50d2.eot","674f50d287a8c48dc19ba404d20fe713"],["/static/media/fontawesome-webfont.912ec66d.svg","912ec66d7572ff821749319396470bde"],["/static/media/fontawesome-webfont.af7ae505.woff2","af7ae505a9eed503f8b8e6982036873e"],["/static/media/fontawesome-webfont.b06871f2.ttf","b06871f281fee6b241d60582ae9369b9"],["/static/media/fontawesome-webfont.fee66e71.woff","fee66e712a8a08eef5805a46892932ad"],["/static/media/galaxy3.355b39cc.jpg","355b39cc90d2156607e9992131cdc138"],["/static/media/galaxy3.cfcad8ad.jpg","cfcad8ad5d266475495fd36ca1c88365"],["/static/media/mara.ec836864.jpg","ec8368643b3550c353bb65151e09fe1c"],["/static/media/plaid-variant.e1bf05cf.jpg","e1bf05cf7b94b39693031fc378f78c77"],["/static/media/plaid.83c23114.jpg","83c231142284e6f5a0052ba0f17f5a9a"],["/static/media/room.acb6320a.png","acb6320aa3f6b7cefc93a7dc79f5de10"],["/static/media/room.cbf07b7f.png","cbf07b7f9f4ecf16020466879ad1a237"],["/static/media/sharks.e661a6d7.jpg","e661a6d72188ac1016247c1518e3ad42"],["/static/media/sharks.fd758fe9.jpg","fd758fe959d442485a0f13deda4f7be3"],["/static/media/sparkle.490243f9.png","490243f987c169292268ee1bf0375f5f"],["/static/media/sparkle.d4eb13d5.png","d4eb13d501d6ccab0acc24dba6cb1750"],["/static/media/yumyums.1b02b3fa.png","1b02b3face7f1fafac586c3d62561ff8"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,a){var t=new URL(e);return"/"===t.pathname.slice(-1)&&(t.pathname+=a),t.toString()},cleanResponse=function(a){return a.redirected?("body"in a?Promise.resolve(a.body):a.blob()).then(function(e){return new Response(e,{headers:a.headers,status:a.status,statusText:a.statusText})}):Promise.resolve(a)},createCacheKey=function(e,a,t,n){var c=new URL(e);return n&&c.pathname.match(n)||(c.search+=(c.search?"&":"")+encodeURIComponent(a)+"="+encodeURIComponent(t)),c.toString()},isPathWhitelisted=function(e,a){if(0===e.length)return!0;var t=new URL(a).pathname;return e.some(function(e){return t.match(e)})},stripIgnoredUrlParameters=function(e,t){var a=new URL(e);return a.hash="",a.search=a.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(a){return t.every(function(e){return!e.test(a[0])})}).map(function(e){return e.join("=")}).join("&"),a.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var a=e[0],t=e[1],n=new URL(a,self.location),c=createCacheKey(n,hashParamName,t,/\.\w{8}\./);return[n.toString(),c]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(n){return setOfCachedUrls(n).then(function(t){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(a){if(!t.has(a)){var e=new Request(a,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+a+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return n.put(a,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var t=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(a){return a.keys().then(function(e){return Promise.all(e.map(function(e){if(!t.has(e.url))return a.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(a){if("GET"===a.request.method){var e,t=stripIgnoredUrlParameters(a.request.url,ignoreUrlParametersMatching),n="index.html";(e=urlsToCacheKeys.has(t))||(t=addDirectoryIndex(t,n),e=urlsToCacheKeys.has(t));var c="/index.html";!e&&"navigate"===a.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],a.request.url)&&(t=new URL(c,self.location).toString(),e=urlsToCacheKeys.has(t)),e&&a.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(t)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',a.request.url,e),fetch(a.request)}))}});