sinzmise-cetastories-en 2.0.0-1731680885028 → 2.0.0-1732430657092

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. package/404.html +1 -0
  2. package/archives/2023/12/index.html +1 -1
  3. package/archives/2023/index.html +1 -1
  4. package/archives/index.html +1 -1
  5. package/assets/404_1.jpg +0 -0
  6. package/assets/c10.cur +0 -0
  7. package/assets/c11.cur +0 -0
  8. package/assets/c3.cur +0 -0
  9. package/assets/c4.cur +0 -0
  10. package/assets/c7.cur +0 -0
  11. package/assets/c8.cur +0 -0
  12. package/assets/c9.cur +0 -0
  13. package/assets/close.webp +0 -0
  14. package/assets/coffee.png +0 -0
  15. package/assets/gulp/404.jpg +0 -0
  16. package/assets/gulp/comment_bg.png +0 -0
  17. package/assets/gulp/friend_404.gif +0 -0
  18. package/assets/gulp/loading.gif +0 -0
  19. package/assets/loading2.gif +0 -0
  20. package/assets/loading3.gif +0 -0
  21. package/assets/open.webp +0 -0
  22. package/assets/pusheencode.webp +0 -0
  23. package/assets/r1.jpg +0 -0
  24. package/assets/r2.jpg +0 -0
  25. package/atom.xml +2 -2
  26. package/baidu_verify_codeva-NA6uDlCuZg.html +1 -1
  27. package/baidusitemap.xml +7 -0
  28. package/categories/Test/index.html +1 -1
  29. package/categories/index.html +1 -1
  30. package/comments/index.html +1 -0
  31. package/config.yaml +36 -3
  32. package/content.json +1 -1
  33. package/css/coin.css +1 -0
  34. package/css/custom2.css +1 -2
  35. package/css/hbe.style.css +1 -0
  36. package/css/index.css +1 -0
  37. package/css/kslink.css +1 -0
  38. package/css/pace/big-counter.css +1 -2
  39. package/css/pace/corner-indicator.css +1 -2
  40. package/css/pace/flash.css +1 -2
  41. package/css/pace/mac-osx.css +1 -2
  42. package/css/pace/pace.css +1 -2
  43. package/css/plane.css +1 -2
  44. package/css/tags.css +1 -2
  45. package/css/var.css +0 -0
  46. package/cw.js +1 -0
  47. package/friend.json +1 -0
  48. package/google8073542809160a67.html +1 -1
  49. package/images/siteicon/android/android-launchericon-144-144.png +0 -0
  50. package/images/siteicon/android/android-launchericon-192-192.png +0 -0
  51. package/images/siteicon/android/android-launchericon-48-48.png +0 -0
  52. package/images/siteicon/android/android-launchericon-512-512.png +0 -0
  53. package/images/siteicon/android/android-launchericon-72-72.png +0 -0
  54. package/images/siteicon/android/android-launchericon-96-96.png +0 -0
  55. package/images/siteicon/apple-touch-icon.png +0 -0
  56. package/images/siteicon/favicon-96x96.png +0 -0
  57. package/images/siteicon/favicon.ico +0 -0
  58. package/images/siteicon/favicon.svg +1 -1
  59. package/images/siteicon/ios/100.png +0 -0
  60. package/images/siteicon/ios/1024.png +0 -0
  61. package/images/siteicon/ios/114.png +0 -0
  62. package/images/siteicon/ios/120.png +0 -0
  63. package/images/siteicon/ios/128.png +0 -0
  64. package/images/siteicon/ios/144.png +0 -0
  65. package/images/siteicon/ios/152.png +0 -0
  66. package/images/siteicon/ios/16.png +0 -0
  67. package/images/siteicon/ios/167.png +0 -0
  68. package/images/siteicon/ios/180.png +0 -0
  69. package/images/siteicon/ios/192.png +0 -0
  70. package/images/siteicon/ios/20.png +0 -0
  71. package/images/siteicon/ios/256.png +0 -0
  72. package/images/siteicon/ios/29.png +0 -0
  73. package/images/siteicon/ios/32.png +0 -0
  74. package/images/siteicon/ios/40.png +0 -0
  75. package/images/siteicon/ios/50.png +0 -0
  76. package/images/siteicon/ios/512.png +0 -0
  77. package/images/siteicon/ios/57.png +0 -0
  78. package/images/siteicon/ios/58.png +0 -0
  79. package/images/siteicon/ios/60.png +0 -0
  80. package/images/siteicon/ios/64.png +0 -0
  81. package/images/siteicon/ios/72.png +0 -0
  82. package/images/siteicon/ios/76.png +0 -0
  83. package/images/siteicon/ios/80.png +0 -0
  84. package/images/siteicon/ios/87.png +0 -0
  85. package/images/siteicon/web-app-manifest-192x192.png +0 -0
  86. package/images/siteicon/web-app-manifest-512x512.png +0 -0
  87. package/images/siteicon/windows11/LargeTile.scale-100.png +0 -0
  88. package/images/siteicon/windows11/LargeTile.scale-125.png +0 -0
  89. package/images/siteicon/windows11/LargeTile.scale-150.png +0 -0
  90. package/images/siteicon/windows11/LargeTile.scale-200.png +0 -0
  91. package/images/siteicon/windows11/LargeTile.scale-400.png +0 -0
  92. package/images/siteicon/windows11/SmallTile.scale-100.png +0 -0
  93. package/images/siteicon/windows11/SmallTile.scale-125.png +0 -0
  94. package/images/siteicon/windows11/SmallTile.scale-150.png +0 -0
  95. package/images/siteicon/windows11/SmallTile.scale-200.png +0 -0
  96. package/images/siteicon/windows11/SmallTile.scale-400.png +0 -0
  97. package/images/siteicon/windows11/SplashScreen.scale-100.png +0 -0
  98. package/images/siteicon/windows11/SplashScreen.scale-125.png +0 -0
  99. package/images/siteicon/windows11/SplashScreen.scale-150.png +0 -0
  100. package/images/siteicon/windows11/SplashScreen.scale-200.png +0 -0
  101. package/images/siteicon/windows11/SplashScreen.scale-400.png +0 -0
  102. package/images/siteicon/windows11/Square150x150Logo.scale-100.png +0 -0
  103. package/images/siteicon/windows11/Square150x150Logo.scale-125.png +0 -0
  104. package/images/siteicon/windows11/Square150x150Logo.scale-150.png +0 -0
  105. package/images/siteicon/windows11/Square150x150Logo.scale-200.png +0 -0
  106. package/images/siteicon/windows11/Square150x150Logo.scale-400.png +0 -0
  107. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-16.png +0 -0
  108. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-20.png +0 -0
  109. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-24.png +0 -0
  110. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-256.png +0 -0
  111. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-30.png +0 -0
  112. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-32.png +0 -0
  113. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-36.png +0 -0
  114. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-40.png +0 -0
  115. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-44.png +0 -0
  116. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-48.png +0 -0
  117. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-60.png +0 -0
  118. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-64.png +0 -0
  119. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-72.png +0 -0
  120. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-80.png +0 -0
  121. package/images/siteicon/windows11/Square44x44Logo.altform-lightunplated_targetsize-96.png +0 -0
  122. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-16.png +0 -0
  123. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-20.png +0 -0
  124. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-24.png +0 -0
  125. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-256.png +0 -0
  126. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-30.png +0 -0
  127. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-32.png +0 -0
  128. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-36.png +0 -0
  129. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-40.png +0 -0
  130. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-44.png +0 -0
  131. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-48.png +0 -0
  132. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-60.png +0 -0
  133. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-64.png +0 -0
  134. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-72.png +0 -0
  135. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-80.png +0 -0
  136. package/images/siteicon/windows11/Square44x44Logo.altform-unplated_targetsize-96.png +0 -0
  137. package/images/siteicon/windows11/Square44x44Logo.scale-100.png +0 -0
  138. package/images/siteicon/windows11/Square44x44Logo.scale-125.png +0 -0
  139. package/images/siteicon/windows11/Square44x44Logo.scale-150.png +0 -0
  140. package/images/siteicon/windows11/Square44x44Logo.scale-200.png +0 -0
  141. package/images/siteicon/windows11/Square44x44Logo.scale-400.png +0 -0
  142. package/images/siteicon/windows11/Square44x44Logo.targetsize-16.png +0 -0
  143. package/images/siteicon/windows11/Square44x44Logo.targetsize-20.png +0 -0
  144. package/images/siteicon/windows11/Square44x44Logo.targetsize-24.png +0 -0
  145. package/images/siteicon/windows11/Square44x44Logo.targetsize-256.png +0 -0
  146. package/images/siteicon/windows11/Square44x44Logo.targetsize-30.png +0 -0
  147. package/images/siteicon/windows11/Square44x44Logo.targetsize-32.png +0 -0
  148. package/images/siteicon/windows11/Square44x44Logo.targetsize-36.png +0 -0
  149. package/images/siteicon/windows11/Square44x44Logo.targetsize-40.png +0 -0
  150. package/images/siteicon/windows11/Square44x44Logo.targetsize-44.png +0 -0
  151. package/images/siteicon/windows11/Square44x44Logo.targetsize-48.png +0 -0
  152. package/images/siteicon/windows11/Square44x44Logo.targetsize-60.png +0 -0
  153. package/images/siteicon/windows11/Square44x44Logo.targetsize-64.png +0 -0
  154. package/images/siteicon/windows11/Square44x44Logo.targetsize-72.png +0 -0
  155. package/images/siteicon/windows11/Square44x44Logo.targetsize-80.png +0 -0
  156. package/images/siteicon/windows11/Square44x44Logo.targetsize-96.png +0 -0
  157. package/images/siteicon/windows11/StoreLogo.scale-100.png +0 -0
  158. package/images/siteicon/windows11/StoreLogo.scale-125.png +0 -0
  159. package/images/siteicon/windows11/StoreLogo.scale-150.png +0 -0
  160. package/images/siteicon/windows11/StoreLogo.scale-200.png +0 -0
  161. package/images/siteicon/windows11/StoreLogo.scale-400.png +0 -0
  162. package/images/siteicon/windows11/Wide310x150Logo.scale-100.png +0 -0
  163. package/images/siteicon/windows11/Wide310x150Logo.scale-125.png +0 -0
  164. package/images/siteicon/windows11/Wide310x150Logo.scale-150.png +0 -0
  165. package/images/siteicon/windows11/Wide310x150Logo.scale-200.png +0 -0
  166. package/images/siteicon/windows11/Wide310x150Logo.scale-400.png +0 -0
  167. package/img/404.jpg +0 -0
  168. package/img/favicon.png +0 -0
  169. package/index.html +1 -1
  170. package/js/Gold-ingot.js +1 -0
  171. package/js/autoload.js +1 -2
  172. package/js/bibi.js +1 -0
  173. package/js/census.js +1 -0
  174. package/js/clock.js +1 -2
  175. package/js/coin.js +1 -0
  176. package/js/fomal.js +1 -0
  177. package/js/kslink.js +1 -2
  178. package/js/main.js +1 -0
  179. package/js/newyear.js +1 -2
  180. package/js/plane.js +1 -2
  181. package/js/search/algolia.js +1 -2
  182. package/js/search/local-search.js +1 -0
  183. package/js/tw_cn.js +1 -0
  184. package/js/txmap.js +1 -2
  185. package/js/utils.js +1 -0
  186. package/lib/hbe.js +1 -0
  187. package/load.html +1 -1
  188. package/package.json +1 -1
  189. package/posts/46521/index.html +1 -1
  190. package/search.xml +28 -11
  191. package/sitemap.xml +110 -0
  192. package/sw-dom.js +54 -0
  193. package/sw.js +1 -2
  194. package/tags/Test/index.html +1 -1
  195. package/tags/index.html +1 -1
  196. package/assets/algolia/algoliasearch.js +0 -11
  197. package/assets/algolia/algoliasearch.min.js +0 -4
  198. package/assets/algolia/algoliasearchLite.js +0 -11
  199. package/assets/algolia/algoliasearchLite.min.js +0 -3
  200. package/css/first.css +0 -2
  201. package/css/style.css +0 -2
  202. package/games +0 -4104
  203. package/images/siteicon/favicon-16x16.png +0 -0
  204. package/images/siteicon/favicon-32x32.png +0 -0
  205. package/images/siteicon/favicon-48x48.png +0 -0
  206. package/js/app.js +0 -2
  207. package/js/ceta/fancybox.css +0 -2
  208. package/js/ceta/fancybox.umd.js +0 -2
  209. package/js/ceta/iconfontInkss.js +0 -2
  210. package/js/ceta/lazyload.min.js +0 -1
  211. package/js/ceta/message.css +0 -2
  212. package/js/ceta/message.js +0 -2
  213. package/js/ceta/pjax.min.js +0 -1
  214. package/js/plugins/aplayer.js +0 -2
  215. package/js/plugins/parallax.js +0 -2
  216. package/js/plugins/rightMenus.js +0 -2
  217. package/js/plugins/tags/contributors.js +0 -2
  218. package/js/plugins/tags/friends.js +0 -2
  219. package/js/plugins/tags/sites.js +0 -2
  220. package/js/search/hexo.js +0 -2
  221. package/js/search/meilisearch.js +0 -2
  222. package/maps/assets/algolia/algoliasearch.js.map +0 -1
  223. package/maps/assets/algolia/algoliasearchLite.js.map +0 -1
  224. package/maps/css/custom2.css.map +0 -1
  225. package/maps/css/first.css.map +0 -1
  226. package/maps/css/pace/big-counter.css.map +0 -1
  227. package/maps/css/pace/corner-indicator.css.map +0 -1
  228. package/maps/css/pace/flash.css.map +0 -1
  229. package/maps/css/pace/mac-osx.css.map +0 -1
  230. package/maps/css/pace/pace.css.map +0 -1
  231. package/maps/css/plane.css.map +0 -1
  232. package/maps/css/style.css.map +0 -1
  233. package/maps/css/tags.css.map +0 -1
  234. package/maps/js/app.js.map +0 -1
  235. package/maps/js/autoload.js.map +0 -1
  236. package/maps/js/ceta/fancybox.css.map +0 -1
  237. package/maps/js/ceta/fancybox.umd.js.map +0 -1
  238. package/maps/js/ceta/iconfontInkss.js.map +0 -1
  239. package/maps/js/ceta/message.css.map +0 -1
  240. package/maps/js/ceta/message.js.map +0 -1
  241. package/maps/js/clock.js.map +0 -1
  242. package/maps/js/kslink.js.map +0 -1
  243. package/maps/js/newyear.js.map +0 -1
  244. package/maps/js/plane.js.map +0 -1
  245. package/maps/js/plugins/aplayer.js.map +0 -1
  246. package/maps/js/plugins/parallax.js.map +0 -1
  247. package/maps/js/plugins/rightMenus.js.map +0 -1
  248. package/maps/js/plugins/tags/contributors.js.map +0 -1
  249. package/maps/js/plugins/tags/friends.js.map +0 -1
  250. package/maps/js/plugins/tags/sites.js.map +0 -1
  251. package/maps/js/search/algolia.js.map +0 -1
  252. package/maps/js/search/hexo.js.map +0 -1
  253. package/maps/js/search/meilisearch.js.map +0 -1
  254. package/maps/js/txmap.js.map +0 -1
  255. package/maps/sw.js.map +0 -1
package/sw.js CHANGED
@@ -1,2 +1 @@
1
- const prefix="sinzmise-cetastories-en",cacheSuffixVersion="00000018-0.2868400152695496",CACHE_NAME=prefix+"-v"+cacheSuffixVersion,PreCachlist=["/css/style.css","/js/app.js","/js/search/hexo.js"];let NPMMirror=!1;const NPMPackage="sinzmise-cetastories-en";let NPMPackageVersion="latest",debug=!0;const handleFetch=async e=>{const t=e.request.url;return/hm\.baidu\.com/.test(t)||/collect-perf\.51\.la/.test(t)||/sdk\.51\.la/.test(t)||/www\.google-analytics\.com/.test(t)?NetworkOnly(e):/@latest/.test(t)?CacheFirst(e):/cdnjs\.cloudflare\.com/.test(t)||/music\.126\.net/.test(t)||/files\.blog\.sinzmise\.top/.test(t)||/qqmusic\.qq\.com/.test(t)||/jsd\.cdn\.storisinz\.site/.test(t)||/jsdelivr\.net/.test(t)||/npm\.elemecdn\.com/.test(t)||/unpkg\.com/.test(t)||/.*\.(?:png|jpg|jpeg|svg|gif|webp|ico|eot|ttf|woff|woff2|mp3)$/.test(t)||/.*\.(css|js)$/.test(t)?CacheAlways(e):CacheFirst(e)},cdn={gh:{jsdelivr:"https://cdn.jsdelivr.net/gh",fastly:"https://fastly.jsdelivr.net/gh",gcore:"https://gcore.jsdelivr.net/gh",testingcf:"https://testingcf.jsdelivr.net/gh",test1:"https://test1.jsdelivr.net/gh",storisinz:"https://jsd.cdn.storisinz.site/gh",webcache:"https://code.webcache.cn/gh"},combine:{jsdelivr:"https://cdn.jsdelivr.net/combine",fastly:"https://fastly.jsdelivr.net/combine",gcore:"https://gcore.jsdelivr.net/combine",testingcf:"https://testingcf.jsdelivr.net/combine",test1:"https://test1.jsdelivr.net/combine",storisinz:"https://jsd.cdn.storisinz.site/combine"},npm:{jsdelivr:"https://cdn.jsdelivr.net/npm",fastly:"https://fastly.jsdelivr.net/npm",gcore:"https://gcore.jsdelivr.net/npm",testingcf:"https://testingcf.jsdelivr.net/npm",test1:"https://test1.jsdelivr.net/npm",unpkg:"https://unpkg.com",eleme:"https://npm.elemecdn.com",storisinz:"https://jsd.cdn.storisinz.site/npm",webcache:"https://npm.webcache.cn"},cdnjs:{cdnjs:"https://cdnjs.cloudflare.com/ajax/libs",baomitu:"https://lib.baomitu.com",bytedance:"https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M",sustech:"https://mirrors.sustech.edu.cn/cdnjs/ajax/libs",webcache:"https://cdnjs.webstatic.cn/ajax/libs"}},cdn_match_list=[];for(const e in cdn)for(const t in cdn[e])cdn_match_list.push({type:e,key:cdn[e][t]});const _console=console,color={black:"#000000",red:"#FF0000",green:"#008000",yellow:"#FFFF00",blue:"#0000FF",magenta:"#FF00FF",cyan:"#00FFFF",white:"#FFFFFF"},add=(...e)=>{let t=[[]];for(let r=0;r<e.length;r++){const[n,...o]=e[r];t[0]+=n,t=t.concat(o)}return t},createlog=e=>(...t)=>{("error"==e?_console[e]:_console.log).apply(void 0,t)},creategroup=e=>(...e)=>{_console.groupCollapsed.apply(void 0,e)},colorUtils={bold:e=>{if("string"==typeof e||"number"==typeof e)return`${e};font-weight: bold;`;for(let t=1;t<e.length;t++)e[t]+=";font-weight: bold;";return e}},colorHash={log:"black",wait:"cyan",error:"red",warn:"yellow",ready:"green",info:"blue",event:"magenta"},createChalk=e=>(...t)=>{if("object"==typeof t[0])return void createlog(e)(...add(colorUtils.bold(colorUtils[colorHash[e]](`[${firstToUpperCase(e)}] `)),...t));let r=t;"string"!=typeof t&&"number"!=typeof t||(r=colorUtils[colorHash[e]](t)),createlog(e)(...add(colorUtils.bold(colorUtils[colorHash[e]](`[${firstToUpperCase(e)}] `)),r))},createChalkBg=e=>(...t)=>{if("object"==typeof t[0])return void createlog(e)(...add(colorUtils.bold(colorUtils[`bg${firstToUpperCase(colorHash[e])}`](`[${firstToUpperCase(e)}] `)),...t));let r=t;"string"!=typeof t&&"number"!=typeof t||(r=colorUtils[colorHash[e]](t)),createlog(e)(...add(colorUtils.bold(colorUtils[`bg${firstToUpperCase(colorHash[e])}`](`[${firstToUpperCase(e)}] `)),r))},createChalkGroup=e=>(...t)=>{if("object"==typeof t[0])return void creategroup()(...add(colorUtils.bold(colorUtils[colorHash[e]](`[${firstToUpperCase(e)}] `)),...t));let r=t;"string"!=typeof t&&"number"!=typeof t||(r=colorUtils[colorHash[e]](t)),creategroup()(...add(colorUtils.bold(colorUtils[colorHash[e]](`[${firstToUpperCase(e)}] `)),r))},chalk={group:{end:_console.groupEnd},bg:{}};Object.keys(colorHash).forEach((e=>{chalk[e]=createChalk(e),chalk.group[e]=createChalkGroup(e),chalk.bg[e]=createChalkBg(e)}));const firstToUpperCase=e=>e.toLowerCase().replace(/( |^)[a-z]/g,(e=>e.toUpperCase()));Object.keys(color).forEach((e=>{colorUtils[e]=t=>{if("string"==typeof t||"number"==typeof t)return[`%c${t}`,`color:${color[e]}`];for(let r=1;r<t.length;r++)t[r]+=`;color:${color[e]}`;return t},colorUtils[`bg${firstToUpperCase(e)}`]=t=>{if("string"==typeof t||"number"==typeof t)return[`%c${t}`,`padding: 2px 4px; border-radius: 3px; color: ${"white"===e?"#000":"#fff"}; font-weight: bold; background:${color[e]};`];for(let r=1;r<t.length;r++)t[r]+=`;padding: 2px 4px; border-radius: 3px; font-weight: bold; background:${color[e]};`;return t}})),self.logger={add:add,...chalk,...colorUtils},debug||(logger={log:()=>{},wait:()=>{},error:()=>{},warn:()=>{},ready:()=>{},info:()=>{},event:()=>{},group:{log:()=>{},wait:()=>{},error:()=>{},warn:()=>{},ready:()=>{},info:()=>{},event:()=>{},end:()=>{}},bg:{log:()=>{},wait:()=>{},error:()=>{},warn:()=>{},ready:()=>{},info:()=>{},event:()=>{}}},console.log=()=>{});const generate_uuid=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}));self.db={read:(e,t)=>(t||(t={type:"text"}),new Promise(((t,r)=>{caches.open(CACHE_NAME).then((r=>{r.match(new Request(`https://LOCALCACHE/${encodeURIComponent(e)}`)).then((function(e){e||t(null),e.text().then((e=>t(e)))})).catch((()=>{t(null)}))}))}))),write:(e,t)=>new Promise(((r,n)=>{caches.open(CACHE_NAME).then((function(n){n.put(new Request(`https://LOCALCACHE/${encodeURIComponent(e)}`),new Response(t)),r()})).catch((()=>{n()}))}))};const compareVersion=(e,t)=>{let r=e.split("."),n=t.split(".");const o=Math.max(r.length,n.length);for(;r.length<o;)r.push("0");for(;n.length<o;)n.push("0");for(let a=0;a<o;a++){const o=parseInt(r[a]),s=parseInt(n[a]);if(o>s)return e;if(o<s)return t}return e},mirrors=[`https://registry.npmjs.org/${NPMPackage}/latest`,`https://mirrors.cloud.tencent.com/npm/${NPMPackage}/latest`],getLocalVersion=async()=>{NPMPackageVersion=await db.read("blog_version")||NPMPackageVersion,logger.bg.info(`Local Version: ${NPMPackage}@${NPMPackageVersion}`)};let mirror_time=0;const setNewestVersion=async()=>{if(!NPMMirror)return;let e=null;return e=mirror_time%(mirrors.length+1)?fetch(mirrors[mirror_time%(mirrors.length+1)-1]):FetchEngine(mirrors),mirror_time++,e.then((e=>e.json())).then((async e=>{if(!e.version)throw"No Version Found!";NPMPackageVersion=compareVersion(e.version,await db.read("blog_version")||NPMPackageVersion),logger.bg.ready(`${NPMPackage}@${NPMPackageVersion}`),await db.write("blog_version",NPMPackageVersion)})).catch((e=>{logger.error("[Set Newest Version] "+(e.stack||e))}))};setInterval((async()=>{await setNewestVersion()}),6e4),setTimeout((async()=>{await setNewestVersion()}),5e3);const installFunction=async()=>(await getLocalVersion(),caches.open(CACHE_NAME+"-precache").then((async function(e){if(await db.read("uuid")||await db.write("uuid",generate_uuid()),PreCachlist.length){logger.group.event(`Precaching ${PreCachlist.length} files.`);let t=0;PreCachlist.forEach((function(r){e.match(new Request(r)).then((function(n){n?logger.ready(`Precaching ${r}`):(logger.wait(`Precaching ${r}`),e.add(new Request(r))),t++,t===PreCachlist.length&&(logger.ready(`Precached ${PreCachlist.length} files.`),logger.group.end())}))}))}})).catch((e=>{logger.error("[install] "+(e.stack||e))})));self.addEventListener("install",(async function(e){logger.bg.event("service worker install event listening");try{self.skipWaiting(),e.waitUntil(installFunction()),logger.bg.ready("service worker install sucess!")}catch(e){logger.error("[install] "+(e.stack||e))}})),self.addEventListener("activate",(async e=>{logger.bg.event("service worker activate event listening");try{e.waitUntil(caches.keys().then((e=>Promise.all(e.map((e=>{e.includes(cacheSuffixVersion)||(caches.delete(e),logger.bg.ready("Deleted Outdated Cache: "+e))}))))).catch((e=>{logger.error("[activate] "+(e.stack||e))}))),await self.clients.claim(),logger.bg.ready("service worker activate sucess!")}catch(e){logger.error("[activate] "+(e.stack||e))}})),self.addEventListener("fetch",(async e=>{e.respondWith(handleFetch(e).catch((t=>{logger.error("[fetch] "+e.request.url+"\n[error] "+(t.stack||t))})))}));const NetworkOnly=async e=>(logger.group.info("NetworkOnly: "+new URL(e.request.url).pathname),logger.wait("service worker fetch: "+e.request.url),logger.group.end(),fetch(e.request)),CacheFirst=async e=>caches.match(e.request).then((function(t){return logger.group.info("CacheFirst: "+new URL(e.request.url).pathname),logger.wait("service worker fetch: "+e.request.url),t?(logger.group.ready("Cache Hit"),console.log(t),logger.group.end(),logger.group.end(),e.waitUntil(CacheRuntime(e.request)),t):(logger.warn("Cache Miss"),logger.group.end(),CacheRuntime(e.request))})),CacheAlways=async e=>caches.match(e.request).then((function(t){return logger.group.info("CacheAlways: "+new URL(e.request.url).pathname),logger.wait("service worker fetch: "+e.request.url),t?(logger.group.ready("Cache Hit"),console.log(t),logger.group.end(),logger.group.end(),t):(logger.warn("Cache Miss"),logger.group.end(),CacheRuntime(e.request))})),matchCache=async e=>caches.match(e.request).then((function(t){return logger.group.info("service worker fetch: "+e.request.url),t?(logger.group.ready("Cache Hit"),console.log(t),logger.group.end(),logger.group.end(),t):(logger.warn("Cache Miss"),logger.group.end(),CacheRuntime(e.request))}));async function CacheRuntime(e){const t=new URL(e.url);let r=await matchCDN(e);if(r||(r=await fetch(e).catch((()=>null))),logger.group.event(`Cache Runtime ${t.pathname}`),logger.wait(`Caching url: ${e.url}`),console.log(r),"GET"===e.method&&"https:"==t.protocol){(await caches.open(CACHE_NAME+"-runtime")).put(e,r.clone()).catch((e=>{logger.error("[Cache Runtime] "+(e.stack||e)),"QuotaExceededError"===e.name&&(caches.delete(CACHE_NAME+"-runtime"),logger.ready("deleted cache"))})),logger.ready(`Cached url: ${e.url}`)}else logger.warn(`Not Cached url: ${e.url}`);return logger.group.end(),r}const matchCDN=async e=>{const t=navigator,{saveData:r,effectiveType:n}=t.connection||t.mozConnection||t.webkitConnection||{};if(r||/2g/.test(n))return logger.warn("Slow Network: Transparent Proxy"),fetch(e);const o=[];let a,s=new URL(e.url).pathname.split("/")[1],c="";if(NPMMirror&&new RegExp(location.origin).test(e.url)){logger.group.ready("Match NPM Mirror: "+e.url);for(const t in cdn.npm){let r=cdn.npm[t]+"/"+NPMPackage+"@"+NPMPackageVersion+e.url.replace(location.origin,"");r=fullPath(fullPath(r)),console.log(r),o.push(r)}logger.group.end()}if(!o.length){for(const t of cdn_match_list)if(new RegExp(t.key).test(e.url)){s=t.type,c=new RegExp(t.key).exec(e.url)[0];break}for(const t in cdn)if(t===s){logger.group.ready(`Match CDN ${s}: `+e.url);for(const r in cdn[t]){const n=cdn[t][r]+e.url.replace(c,"");console.log(n),o.push(n)}logger.group.end()}}if(a=o.length?FetchEngine(o):fetch(e),a&&NPMMirror&&new RegExp(location.origin).test(e.url)){const t=fullPath(fullPath(e.url)).split(".").pop(),r=getContentType(t);a=a.then((e=>e.arrayBuffer())).then((e=>new Response(e,{headers:{"Content-Type":r}}))).catch((()=>null))}return a},fullPath=e=>{if((e=e.split("?")[0].split("#")[0]).endsWith("/"))e+="index.html";else{const t=e.split("/");-1===t[t.length-1].indexOf(".")&&(e+=".html")}return e};async function progress(e){return new Response(await e.arrayBuffer(),{status:e.status,headers:e.headers})}function createPromiseAny(){Promise.any=function(e){return new Promise(((t,r)=>{let n=(e=Array.isArray(e)?e:[]).length,o=[];if(0===n)return r(new AggregateError("All promises were rejected"));e.forEach((e=>{e instanceof Promise?e.then((e=>t(e)),(e=>{n--,o.push(e),0===n&&r(new AggregateError(o))})):r(e)}))}))}}function fetchAny(e){const t=new AbortController;return e.map((e=>new Promise(((r,n)=>{fetch(e,{signal:t.signal}).then(progress).then((e=>{t.abort(),200!==e.status?n(null):r(e)})).catch((()=>n(null)))}))))}function fetchParallel(e){const t=new Event("abortOtherInstance"),r=new EventTarget;return e.map((async e=>{const n=new AbortController;let o=!1;return r.addEventListener(t.type,(()=>{o||n.abort()})),new Promise(((a,s)=>{fetch(e,{signal:n.signal}).then((e=>{o=!0,r.dispatchEvent(t),200!==e.status?s(null):a(e)})).catch((()=>s(null)))}))}))}const FetchEngine=e=>(Promise.any||createPromiseAny(),Promise.any(fetchParallel(e)).then((e=>e)).catch((t=>"AggregateError: All promises were rejected"==t?Promise.any(fetchAny(e)).then((e=>e)).catch((()=>null)):null))),getContentType=e=>{switch(e){case"js":return"text/javascript";case"html":return"text/html";case"css":return"text/css";case"json":case"map":return"application/json";case"webp":return"image/webp";case"jpg":return"image/jpg";case"jpeg":return"image/jpeg";case"png":return"image/png";case"gif":return"image/gif";case"xml":case"xsl":return"text/xml";case"webmanifest":return"text/webmanifest";case"bcmap":case"wbmp":return"image/vnd.wap.wbmp";case"bmp":return"image/bmp";case"ico":return"image/vnd.microsoft.icon";case"tiff":case"tif":return"image/tiff";case"svg":case"svgz":return"image/svg+xml";case"woff":return"application/font-woff";case"woff2":return"application/font-woff2";case"ttf":return"application/font-ttf";case"otf":return"application/font-otf";case"eot":return"application/vnd.ms-fontobject";case"zip":return"application/zip";case"tar":return"application/x-tar";case"gz":return"application/gzip";case"bz2":return"application/x-bzip2";case"rar":return"application/x-rar-compressed";case"7z":return"application/x-7z-compressed";case"doc":return"application/msword";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"xls":return"application/vnd.ms-excel";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"ppt":return"application/vnd.ms-powerpoint";case"pptx":return"application/vnd.openxmlformats-officedocument.presentationml.presentation";case"pdf":return"application/pdf";case"txt":default:return"text/plain";case"rtf":return"application/rtf";case"mp3":return"audio/mpeg";case"wav":return"audio/x-wav";case"ogg":return"audio/ogg";case"mp4":return"video/mp4";case"m4v":return"video/x-m4v";case"mov":return"video/quicktime";case"avi":return"video/x-msvideo";case"wmv":return"video/x-ms-wmv";case"flv":return"video/x-flv";case"swf":return"application/x-shockwave-flash";case"mpg":case"mpeg":case"mpe":case"mpv":case"m2v":return"video/mpeg";case"m4a":return"audio/mp4";case"aac":return"audio/aac";case"m3u":return"audio/x-mpegurl";case"m3u8":return"application/vnd.apple.mpegurl";case"pls":return"audio/x-scpls";case"cue":return"application/x-cue";case"wma":return"audio/x-ms-wma";case"flac":return"audio/flac";case"aif":case"aiff":case"aifc":return"audio/x-aiff";case"au":case"snd":return"audio/basic";case"mid":case"midi":case"kar":return"audio/midi"}};
2
- //# sourceMappingURL=maps/sw.js.map
1
+ (()=>{const e="CetaHouseEnCache",t="https://id.v3/",s="X-Swpp-Invalid",n="X-Swpp-Time",a=e=>{const t=t=>{const s=e.value;if(Array.isArray(s)){for(let e of s)if(t(e))return!0;return!1}return t(s)};switch(e.flag){case"html":return e=>/\/$|\.html$/.test(e);case"suf":return e=>t((t=>e.endsWith(t)));case"pre":return e=>t((t=>e.startsWith(t)));case"str":return e=>t((t=>e.includes(t)));case"reg":return e=>t((t=>new RegExp(t,"i").test(e)));default:throw e}},r=t=>caches.match(t,{cacheName:e}),i=async(t,s,a)=>{if(a){const e=new Headers(s.headers);e.set(n,(new Date).toISOString()),s=new Response(s.body,{status:s.status,headers:e})}const r=await caches.open(e);await r.put(t,s)},l=e=>r(e).then((t=>{if(!t)return;const n=new Headers(t.headers);return n.set(s,"1"),i(e,new Response(t.body,{status:t.status,headers:n}))})),c=()=>r(t).then((e=>e?.json?.())),o=e=>(e.tp=Date.now(),i(t,new Response(JSON.stringify(e)))),u=async(e,t,...s)=>{s.length||(s=await clients.matchAll());const n={type:e,data:t};for(let e of s)e.postMessage(n)},h=async(s,n)=>{if(!n&&s&&Date.now()-s.tp<6e5)return;const r=await(await fetch("swpp/update.json",{priority:"high"})).json(),{global:i,info:c}=r,u={global:i,local:c[0].version,escape:0};if(!s)return await o(u),s?1:-1;if(s.global===i&&s.local===u.local)return;const h=[];for(let n of c){if(n.version===s.local){const s=[];return await caches.open(e).then((e=>e.keys())).then((async e=>{for(let n of e){const e=n.url;e!==t&&h.find((t=>t(e)))&&(await l(n),s.push(e))}})),s}const r=n.change;if(r)for(let e of r)h.push(a(e))}return await caches.delete(e).then((()=>o(u))),2},d=e=>{let t=e.request;if("GET"!==t.method||!t.url.startsWith("http"))return;const s=null;new URL((n=t.url).endsWith("/index.html")?n.substring(0,n.length-10):n.endsWith(".html")?n.substring(0,n.length-5):n);var n;const a=!1};self.addEventListener("install",(e=>{skipWaiting()})),self.addEventListener("activate",(e=>e.waitUntil(clients.claim()))),self.addEventListener("fetch",(e=>d(e))),self.addEventListener("periodicSync",(e=>{"update"===e.tag&&e.waitUntil(h(!0))})),self.addEventListener("message",(async e=>{if("update"===e.data.type){const e=await c(),t=await h(e);if(!t)return;switch(t){case-1:return u("new",null);case 1:return u("revise",null);case 2:return u("update",null);default:if(Array.isArray(t))return u("update",t)}}}))})();