-
Notifications
You must be signed in to change notification settings - Fork 0
/
sw.js
1 lines (1 loc) · 9.13 KB
/
sw.js
1
"use strict";var precacheConfig=[["/about/index.html","6ab68f34246882c7a37790dc5f71ef3b"],["/archives/2020/03/index.html","842d51f69006925607734d8c75ae6ae3"],["/archives/2020/04/index.html","104430b82f26b33b81d73d1279ec73e1"],["/archives/2020/07/index.html","01d4b3beeb736fcdf639d462308815b6"],["/archives/2020/index.html","a90f1cd1881ef4e95519e6ba34d91ad0"],["/archives/2021/02/index.html","aa52fd327367033f983ff867ac07b9cb"],["/archives/2021/index.html","a57f197cd08c95da709e0eecf24400d3"],["/archives/index.html","7b21e663e96ef03e0523d589ca00151f"],["/artitalk/index.html","697c11291a234ebb0d79ba5377425b42"],["/assets/douban-loading.gif","b86c6b435fc25c1366acaafc3fb5c252"],["/assets/fonts/UnidreamLED.ttf","12fc160800285847a53d4592b2357737"],["/assets/weather/01d.png","401e66803935b7035675d2b71e49ab91"],["/assets/weather/01n.png","44c6f1ba041fe91a6ae4163b38139cd1"],["/assets/weather/02d.png","b1fac6b809a3b0904d10489e490d8959"],["/assets/weather/02n.png","af1c78e11ba987fb7bd105e535e5b071"],["/assets/weather/03d.png","988ec2e80f00b7416979a3991b255e9b"],["/assets/weather/03n.png","988ec2e80f00b7416979a3991b255e9b"],["/assets/weather/04d.png","6d64f09619af982e81997c72b42f4b16"],["/assets/weather/04n.png","6d64f09619af982e81997c72b42f4b16"],["/assets/weather/09d.png","353840d24a6212e62afd2925a1fe8e47"],["/assets/weather/09n.png","353840d24a6212e62afd2925a1fe8e47"],["/assets/weather/10d.png","a80420158756c8841c58ef0af68d1ceb"],["/assets/weather/10n.png","a2c315e3c04072f33aa8b60f466b79d9"],["/assets/weather/11d.png","479324978fd9afe7c281efba79210e13"],["/assets/weather/11n.png","479324978fd9afe7c281efba79210e13"],["/assets/weather/13d.png","ca0f0747e18b9f5a8f646c780aa53620"],["/assets/weather/13n.png","ca0f0747e18b9f5a8f646c780aa53620"],["/assets/weather/50d.png","18ea6a4ca6604ae4c29ce6053c4c4819"],["/assets/weather/50n.png","18ea6a4ca6604ae4c29ce6053c4c4819"],["/assets/weather/hu.png","3754a3ea92275cc8158606e544b132a7"],["/assets/weather/loading.gif","b8c45314a21e9b46abcd38a3a69bd07d"],["/bangumis/index.html","88a74cf6b5aadb27eff86d807ce07972"],["/books/index.html","b47a412b1c7c89aad8c23b6fb21b201b"],["/categories/Git/index.html","ca7ce43ad5bf11ec66be9218c03700ab"],["/categories/Hexo/index.html","3ab10fb464fbf6570a668acaaba73cf3"],["/categories/RSS/index.html","f567409eab6ea925534c3970517b4636"],["/categories/index.html","867db4c05ec488024941c4e2e61cc825"],["/categories/日记/index.html","a7b9ed6ca978a9315e7ab996f3ffa1a4"],["/categories/服务器/index.html","43e5ba70f2a9e6d4935e243421d8bf3f"],["/categories/笔记/index.html","0536b2aa0bad175c3cae93cd945b773b"],["/css/background.css","6faa569072e635938900354a5360416d"],["/css/hbe.style.css","a8bc819e01e001d3bc6ae03a2afad957"],["/css/index.css","1948abbd454333382c60f4626e5918d9"],["/css/var.css","d41d8cd98f00b204e9800998ecf8427e"],["/gallery/index.html","d4e786225c9f3879307bef0e2257f770"],["/games/index.html","fdf9009ee2f70adb702cfa1bcb900bd8"],["/img/404.jpg","4ef3cfb882b6dd4128da4c8745e9a507"],["/img/avatar.png","3665be944abde5706a3abc7b1729cabc"],["/img/favicon (3).png","7a8c47cb5a2149c1a1af21e90ecd9ca7"],["/img/favicon.png","f70f847702a45107760a04dc0a597bc1"],["/img/friend_404.gif","68af0be9d22722e74665ef44dd532ba8"],["/img/movie.gif","327093e9dd15fd0bc7446c2c7502c45e"],["/img/siteicon/README.html","d4bf59b7fa3bbe1b35a6cc32e3c4ec84"],["/img/siteicon/android-chrome-144x144.png","ce85813a6dceb7f22c2b2b3ec792da9d"],["/img/siteicon/android-chrome-192x192.png","4422f7c2cdb98f422eb79dd549e22787"],["/img/siteicon/android-chrome-256x256 - Copy.png","15c4b1cb1b9729bb74d58802432f19b7"],["/img/siteicon/android-chrome-256x256.png","15c4b1cb1b9729bb74d58802432f19b7"],["/img/siteicon/android-chrome-36x36.png","1d2c2d4e70b2994a76be053e7034999e"],["/img/siteicon/android-chrome-384x384.png","d2530a49644b7471a69d5a2c2df86b16"],["/img/siteicon/android-chrome-48x48.png","e5dd8aac3e7e49f8f6b239d22bb8a211"],["/img/siteicon/android-chrome-512x512.png","92aa712f5a347e2c3a53e08ffae1d6a7"],["/img/siteicon/android-chrome-72x72.png","e2533454866100234307967c11ed3bc2"],["/img/siteicon/android-chrome-96x96.png","9a92f4c789bc05ffd549429149faa543"],["/img/siteicon/apple-touch-icon.png","e4f1a1235171e5b2962bb510a425ed41"],["/img/siteicon/favicon-16x16.png","cc2840bef66db858486e353fe269d899"],["/img/siteicon/favicon-32x32.png","36238305ab04c27f15e2bc49ed6455a1"],["/img/siteicon/favicon.png","f70f847702a45107760a04dc0a597bc1"],["/img/siteicon/mstile-150x150.png","dfa665717c827127912bd57cf2c96932"],["/img/siteicon/safari-pinned-tab.svg","b3aae41d39e7e23421e5eac20f47d057"],["/img/wallpaper.jpg","f83038e43622d79426c29ed6b577d59a"],["/index.html","21395fb83e14905f314ea6ce9a0be568"],["/js/background.js","7b370436ecd2d0f43b614d374894ab0d"],["/js/main.js","c2d6628801fd2dc0ea1739901cf5d99b"],["/js/modify.js","d641573a0547cac694092962bdd1e253"],["/js/search/algolia.js","d36a279469bce7854189f9481d3d0860"],["/js/search/local-search.js","4f79884e04a163f9348c3961cf84d50e"],["/js/tw_cn.js","b3810513e04b13b2d18c6b779c883f85"],["/js/utils.js","24971090b8b1bd5d3f538d414e270fd3"],["/lib/hbe.js","4a7e94ac7224adfce4b0572ca5c57fef"],["/link/index.html","d39abbb91aca5a2fc8388c5c0d1aa581"],["/messageboard/index.html","fa743143e522273524466fcf230fdefc"],["/movies/index.html","dffa6b96ed3778959b23f8f972748f68"],["/music/index.html","aee5b3c1cb6f1c2fb753dde81a4bfad7"],["/photos/index.html","bea59b18d9451e1a8cd141e9b9ff49f1"],["/posts/3b49ac76/index.html","8ce0ac09ad8a4604fc3574a56a0d6377"],["/posts/4d0299b9/index.html","d4ecca3246205d35e66f28e510bd5744"],["/posts/50bac2e6/index.html","b87f614c0bb0734272383ac3376f1e3c"],["/posts/5cf5b17a/index.html","7ff85df6b732690eba978b3b6a52b929"],["/posts/68ae36ec/index.html","44742724f820f1f7ecbe12f18b3804e7"],["/posts/95736992/index.html","e8e29ffa2342a9028a3711de23ec2803"],["/posts/b6ef4fe0/index.html","d0cf93cf7cd2c9972430489afffd8acc"],["/posts/cb24ed77/index.html","552e1114067a889a01c0ed8b97623cee"],["/sw-register.js","8e1b92a11245a4b637c1cc9f33d52199"],["/tags/Diary/index.html","7f66e73c0b1382b3baa03a082c90b4d2"],["/tags/Git/index.html","b33ef4bddaaf439f9207d853a3dd339e"],["/tags/index.html","d21fb13d990dff956afc5fa70b3d09aa"],["/tags/笔记/index.html","7c7193161e0d3202d182143309a748b8"]],cacheName="sw-precache-v3--"+(self.registration?self.registration.scope:""),firstRegister=1,ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,a){var c=new URL(e);return"/"===c.pathname.slice(-1)&&(c.pathname+=a),c.toString()},cleanResponse=function(e){return e.redirected?("body"in e?Promise.resolve(e.body):e.blob()).then((function(a){return new Response(a,{headers:e.headers,status:e.status,statusText:e.statusText})})):Promise.resolve(e)},createCacheKey=function(e,a,c,t){var n=new URL(e);return t&&n.pathname.match(t)||(n.search+=(n.search?"&":"")+encodeURIComponent(a)+"="+encodeURIComponent(c)),n.toString()},isPathWhitelisted=function(e,a){if(0===e.length)return!0;var c=new URL(a).pathname;return e.some((function(e){return c.match(e)}))},stripIgnoredUrlParameters=function(e,a){var c=new URL(e);return c.hash="",c.search=c.search.slice(1).split("&").map((function(e){return e.split("=")})).filter((function(e){return a.every((function(a){return!a.test(e[0])}))})).map((function(e){return e.join("=")})).join("&"),c.toString()},hashParamName=(addDirectoryIndex=function(e,a){var c=new URL(e);return"/"===c.pathname.slice(-1)&&(c.pathname+=a),c.toString()},"_sw-precache"),urlsToCacheKeys=new Map(precacheConfig.map((function(e){var a=e[0],c=e[1],t=new URL(a,self.location),n=createCacheKey(t,hashParamName,c,!1);return[t.toString(),n]})));function setOfCachedUrls(e){return e.keys().then((function(e){return e&&e.length>0&&(firstRegister=0),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(e){return setOfCachedUrls(e).then((function(a){return Promise.all(Array.from(urlsToCacheKeys.values()).map((function(c){if(!a.has(c)){var t=new Request(c,{credentials:"same-origin"});return fetch(t).then((function(a){if(!a.ok)throw new Error("Request for "+c+" returned a response with status "+a.status);return cleanResponse(a).then((function(a){return e.put(c,a)}))}))}})))}))})).then((function(){return self.skipWaiting()})))})),self.addEventListener("activate",(function(e){var a=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then((function(e){return e.keys().then((function(c){return Promise.all(c.map((function(c){if(!a.has(c.url))return e.delete(c)})))}))})).then((function(){return self.clients.claim()})).then((function(){if(!firstRegister)return self.clients.matchAll().then((function(e){e&&e.length&&e.forEach((function(e){e.postMessage("sw.update")}))}))})))})),self.addEventListener("fetch",(function(e){if("GET"===e.request.method){var a,c=stripIgnoredUrlParameters(e.request.url,ignoreUrlParametersMatching),t="index.html";(a=urlsToCacheKeys.has(c))||(c=addDirectoryIndex(c,t),a=urlsToCacheKeys.has(c));0,a&&e.respondWith(caches.open(cacheName).then((function(e){return e.match(urlsToCacheKeys.get(c)).then((function(e){if(e)return e;throw Error("The cached response that was expected is missing.")}))})).catch((function(a){return console.warn('Couldn\'t serve response for "%s" from cache: %O',e.request.url,a),fetch(e.request)})))}}));