From 91f7bd00368a8815b74e5497e00954cdc7afb38d Mon Sep 17 00:00:00 2001 From: Stephen Fairbanks Date: Sat, 13 Jan 2024 11:37:42 +0000 Subject: [PATCH] :construction_worker: build(settings): change github-actions pnpm setup --- .github/workflows/preview.yaml | 23 ++++++++++++++++++++++- .github/workflows/production.yaml | 25 +++++++++++++++++++++++-- public/sw.js | 2 +- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 75e3e93..5814c55 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -17,7 +17,28 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: pnpm/action-setup@v2.4.0 + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index f08dda8..f8c5bc5 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -16,8 +16,29 @@ jobs: node-version: [18.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - - uses: pnpm/action-setup@v2.4.0 + steps: + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 diff --git a/public/sw.js b/public/sw.js index 14c0463..e9a5bac 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1 +1 @@ -if(!self.define){let e,a={};const s=(s,c)=>(s=new URL(s+".js",c).href,a[s]||new Promise((a=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=a,document.head.appendChild(e)}else e=s,importScripts(s),a()})).then((()=>{let e=a[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(c,i)=>{const n=e||("document"in self?document.currentScript.src:"")||location.href;if(a[n])return;let t={};const f=e=>s(e,n),r={module:{uri:n},exports:t,require:f};a[n]=Promise.all(c.map((e=>r[e]||f(e)))).then((e=>(i(...e),t)))}}define(["./workbox-2e6be583"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/static/VKAqccX_Rk8MIZ2FvibdI/_buildManifest.js",revision:"2fe42ec0e1b0a35b58ab1fda85dfad5c"},{url:"/_next/static/VKAqccX_Rk8MIZ2FvibdI/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/302-eff6f28763d0fcc9.js",revision:"eff6f28763d0fcc9"},{url:"/_next/static/chunks/382-4320f557eafbb9af.js",revision:"4320f557eafbb9af"},{url:"/_next/static/chunks/418-09c85c4bb10f0166.js",revision:"09c85c4bb10f0166"},{url:"/_next/static/chunks/5a88cda1-c9be68f9e558b3e3.js",revision:"c9be68f9e558b3e3"},{url:"/_next/static/chunks/662-11bcdd4a3a024fa4.js",revision:"11bcdd4a3a024fa4"},{url:"/_next/static/chunks/946-e39418fd5e3494f6.js",revision:"e39418fd5e3494f6"},{url:"/_next/static/chunks/949e3727-bd4a3217aaeaedc6.js",revision:"bd4a3217aaeaedc6"},{url:"/_next/static/chunks/e570b941-24f9e8caf2edd41d.js",revision:"24f9e8caf2edd41d"},{url:"/_next/static/chunks/framework-98941e4f47e65525.js",revision:"98941e4f47e65525"},{url:"/_next/static/chunks/main-011731329d4ad314.js",revision:"011731329d4ad314"},{url:"/_next/static/chunks/pages/%5B...post%5D-cf729a3b32cce5ea.js",revision:"cf729a3b32cce5ea"},{url:"/_next/static/chunks/pages/_app-598d5a2a260742cd.js",revision:"598d5a2a260742cd"},{url:"/_next/static/chunks/pages/_error-b9e7f2671a1c16e6.js",revision:"b9e7f2671a1c16e6"},{url:"/_next/static/chunks/pages/about-2169a6e177178140.js",revision:"2169a6e177178140"},{url:"/_next/static/chunks/pages/account/deauthorized-5e4a8d4e952ab7fb.js",revision:"5e4a8d4e952ab7fb"},{url:"/_next/static/chunks/pages/account/nuke-c2dd46e441f82d52.js",revision:"c2dd46e441f82d52"},{url:"/_next/static/chunks/pages/account/set-username-0fa56d6879aa5443.js",revision:"0fa56d6879aa5443"},{url:"/_next/static/chunks/pages/account/sign-in-98adf4ec293f4ab8.js",revision:"98adf4ec293f4ab8"},{url:"/_next/static/chunks/pages/account/sign-in/error-fa5589972ff961e4.js",revision:"fa5589972ff961e4"},{url:"/_next/static/chunks/pages/account/sign-in/magic-link-549da0f82fecae0c.js",revision:"549da0f82fecae0c"},{url:"/_next/static/chunks/pages/account/sign-in/success-eff76988ad7c08b5.js",revision:"eff76988ad7c08b5"},{url:"/_next/static/chunks/pages/account/signed-out-1e463922b0182fe9.js",revision:"1e463922b0182fe9"},{url:"/_next/static/chunks/pages/contribute-2f6edc9ac502ff08.js",revision:"2f6edc9ac502ff08"},{url:"/_next/static/chunks/pages/index-f6f4a34ca8b772b7.js",revision:"f6f4a34ca8b772b7"},{url:"/_next/static/chunks/pages/nuke-4b21c69570c42d56.js",revision:"4b21c69570c42d56"},{url:"/_next/static/chunks/pages/post/create-a86411d3a2caa166.js",revision:"a86411d3a2caa166"},{url:"/_next/static/chunks/pages/post/edit-12e466c098fa378a.js",revision:"12e466c098fa378a"},{url:"/_next/static/chunks/pages/post/list-188be70ed522c7cc.js",revision:"188be70ed522c7cc"},{url:"/_next/static/chunks/pages/post/pending-912049943774e9c5.js",revision:"912049943774e9c5"},{url:"/_next/static/chunks/pages/privacy-4162264766251d9b.js",revision:"4162264766251d9b"},{url:"/_next/static/chunks/pages/terms-429952471f96eb9a.js",revision:"429952471f96eb9a"},{url:"/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js",revision:"837c0df77fd5009c9e46d446188ecfd0"},{url:"/_next/static/chunks/webpack-6317c718444a5287.js",revision:"6317c718444a5287"},{url:"/_next/static/css/eff377ce6bb7cd90.css",revision:"eff377ce6bb7cd90"},{url:"/_next/static/media/10ca58f12dc31ec2-s.woff2",revision:"e0df918a07b640f09bb69751b040c517"},{url:"/_next/static/media/1fe05f8c46e9977c-s.p.woff2",revision:"c1fec4a19b3192d4701a6533aab96a61"},{url:"/_next/static/media/1ffa718e60efccd4-s.woff2",revision:"a8662b6d037362c4dc6470530d4bca51"},{url:"/_next/static/media/23f25237a0dd6e5e-s.woff2",revision:"95712b78a4a4cd25725d199575ce922c"},{url:"/_next/static/media/4211d34fd1c6f59f-s.woff2",revision:"10c49f8eebd781ea0feb134d5d895ae1"},{url:"/_next/static/media/46ada7a8096f3625-s.woff2",revision:"190b012a1ea4fa649277742d8aaa952f"},{url:"/_next/static/media/527ad038b46df541-s.woff2",revision:"9d5d33aac7b433227908a50658ebb82c"},{url:"/_next/static/media/590bfc1facaea403-s.woff2",revision:"2890339585a50c5843a89ea9788f0780"},{url:"/_next/static/media/61b81e7bde89ba40-s.p.woff2",revision:"e7c8b3a1196384678e2b2044f8baa115"},{url:"/_next/static/media/95e7cb10eda7a858-s.woff2",revision:"a17f6ed96209e29281424e6d7bab0ec8"},{url:"/_next/static/media/9f705a8904cabecc-s.p.woff2",revision:"d39b3002cb55ab0dba0c94a9132d4cc8"},{url:"/_next/static/media/b34eb5d9a2ebd9de-s.woff2",revision:"1c2eb10dc87812929e90e70cfdc75753"},{url:"/_next/static/media/fe0643d5f2ad0dcb-s.woff2",revision:"6de05c54b2b48e2b12745b95bcdd950d"},{url:"/favicon/android-chrome-192x192.png",revision:"c0d5beb829690c3d18c31cb45174dc67"},{url:"/favicon/android-chrome-256x256.png",revision:"7c9bc14f15d5731e3bb1427c8baba551"},{url:"/favicon/apple-touch-icon.png",revision:"c77ac1e2d104e3e3a68bc70232ab9bba"},{url:"/favicon/browserconfig.xml",revision:"7f2b2f8a4c6863cc7be0a1e4b7963bd9"},{url:"/favicon/favicon-16x16.png",revision:"0e0998bad54483253eb2c54cd52f2620"},{url:"/favicon/favicon-32x32.png",revision:"9fcfab51d2269f5954a245263983cfe4"},{url:"/favicon/favicon-large.png",revision:"789b577c10c52b78fa901f49cc3d5161"},{url:"/favicon/favicon.ico",revision:"e09f15b2d8c043c9819b778811852dc4"},{url:"/favicon/favicon.png",revision:"6e948c4229998491ceb982d67f5ff79a"},{url:"/favicon/mstile-150x150.png",revision:"39bbe4b44f7a26e9f308b178f1c69f6f"},{url:"/favicon/safari-pinned-tab.svg",revision:"e4226dd601fda16790841b9189dcabb5"},{url:"/favicon/site.webmanifest",revision:"ab665afc09201416fecde4c3aa2bba88"},{url:"/robots.txt",revision:"59b5022b914a82f95d18493c2a28d218"},{url:"/sitemap-0.xml",revision:"a3476e156bf09ad4fd23da6e1cc7d9c1"},{url:"/sitemap.xml",revision:"c24dc2f275b85f38caa3c21d559c012f"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:a,event:s,state:c})=>a&&"opaqueredirect"===a.type?new Response(a.body,{status:200,statusText:"OK",headers:a.headers}):a}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const a=e.pathname;return!a.startsWith("/api/auth/")&&!!a.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>!(self.origin===e.origin)),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")})); +if(!self.define){let e,a={};const s=(s,c)=>(s=new URL(s+".js",c).href,a[s]||new Promise((a=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=a,document.head.appendChild(e)}else e=s,importScripts(s),a()})).then((()=>{let e=a[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(c,i)=>{const n=e||("document"in self?document.currentScript.src:"")||location.href;if(a[n])return;let t={};const f=e=>s(e,n),r={module:{uri:n},exports:t,require:f};a[n]=Promise.all(c.map((e=>r[e]||f(e)))).then((e=>(i(...e),t)))}}define(["./workbox-2e6be583"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/static/JplLD0-OiJi5A00UQedxl/_buildManifest.js",revision:"2fe42ec0e1b0a35b58ab1fda85dfad5c"},{url:"/_next/static/JplLD0-OiJi5A00UQedxl/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/302-eff6f28763d0fcc9.js",revision:"eff6f28763d0fcc9"},{url:"/_next/static/chunks/382-4320f557eafbb9af.js",revision:"4320f557eafbb9af"},{url:"/_next/static/chunks/418-09c85c4bb10f0166.js",revision:"09c85c4bb10f0166"},{url:"/_next/static/chunks/5a88cda1-c9be68f9e558b3e3.js",revision:"c9be68f9e558b3e3"},{url:"/_next/static/chunks/662-11bcdd4a3a024fa4.js",revision:"11bcdd4a3a024fa4"},{url:"/_next/static/chunks/946-e39418fd5e3494f6.js",revision:"e39418fd5e3494f6"},{url:"/_next/static/chunks/949e3727-bd4a3217aaeaedc6.js",revision:"bd4a3217aaeaedc6"},{url:"/_next/static/chunks/e570b941-24f9e8caf2edd41d.js",revision:"24f9e8caf2edd41d"},{url:"/_next/static/chunks/framework-98941e4f47e65525.js",revision:"98941e4f47e65525"},{url:"/_next/static/chunks/main-011731329d4ad314.js",revision:"011731329d4ad314"},{url:"/_next/static/chunks/pages/%5B...post%5D-cf729a3b32cce5ea.js",revision:"cf729a3b32cce5ea"},{url:"/_next/static/chunks/pages/_app-598d5a2a260742cd.js",revision:"598d5a2a260742cd"},{url:"/_next/static/chunks/pages/_error-b9e7f2671a1c16e6.js",revision:"b9e7f2671a1c16e6"},{url:"/_next/static/chunks/pages/about-2169a6e177178140.js",revision:"2169a6e177178140"},{url:"/_next/static/chunks/pages/account/deauthorized-5e4a8d4e952ab7fb.js",revision:"5e4a8d4e952ab7fb"},{url:"/_next/static/chunks/pages/account/nuke-c2dd46e441f82d52.js",revision:"c2dd46e441f82d52"},{url:"/_next/static/chunks/pages/account/set-username-0fa56d6879aa5443.js",revision:"0fa56d6879aa5443"},{url:"/_next/static/chunks/pages/account/sign-in-98adf4ec293f4ab8.js",revision:"98adf4ec293f4ab8"},{url:"/_next/static/chunks/pages/account/sign-in/error-fa5589972ff961e4.js",revision:"fa5589972ff961e4"},{url:"/_next/static/chunks/pages/account/sign-in/magic-link-549da0f82fecae0c.js",revision:"549da0f82fecae0c"},{url:"/_next/static/chunks/pages/account/sign-in/success-eff76988ad7c08b5.js",revision:"eff76988ad7c08b5"},{url:"/_next/static/chunks/pages/account/signed-out-1e463922b0182fe9.js",revision:"1e463922b0182fe9"},{url:"/_next/static/chunks/pages/contribute-2f6edc9ac502ff08.js",revision:"2f6edc9ac502ff08"},{url:"/_next/static/chunks/pages/index-f6f4a34ca8b772b7.js",revision:"f6f4a34ca8b772b7"},{url:"/_next/static/chunks/pages/nuke-4b21c69570c42d56.js",revision:"4b21c69570c42d56"},{url:"/_next/static/chunks/pages/post/create-a86411d3a2caa166.js",revision:"a86411d3a2caa166"},{url:"/_next/static/chunks/pages/post/edit-12e466c098fa378a.js",revision:"12e466c098fa378a"},{url:"/_next/static/chunks/pages/post/list-188be70ed522c7cc.js",revision:"188be70ed522c7cc"},{url:"/_next/static/chunks/pages/post/pending-912049943774e9c5.js",revision:"912049943774e9c5"},{url:"/_next/static/chunks/pages/privacy-4162264766251d9b.js",revision:"4162264766251d9b"},{url:"/_next/static/chunks/pages/terms-429952471f96eb9a.js",revision:"429952471f96eb9a"},{url:"/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js",revision:"837c0df77fd5009c9e46d446188ecfd0"},{url:"/_next/static/chunks/webpack-6317c718444a5287.js",revision:"6317c718444a5287"},{url:"/_next/static/css/eff377ce6bb7cd90.css",revision:"eff377ce6bb7cd90"},{url:"/_next/static/media/10ca58f12dc31ec2-s.woff2",revision:"e0df918a07b640f09bb69751b040c517"},{url:"/_next/static/media/1fe05f8c46e9977c-s.p.woff2",revision:"c1fec4a19b3192d4701a6533aab96a61"},{url:"/_next/static/media/1ffa718e60efccd4-s.woff2",revision:"a8662b6d037362c4dc6470530d4bca51"},{url:"/_next/static/media/23f25237a0dd6e5e-s.woff2",revision:"95712b78a4a4cd25725d199575ce922c"},{url:"/_next/static/media/4211d34fd1c6f59f-s.woff2",revision:"10c49f8eebd781ea0feb134d5d895ae1"},{url:"/_next/static/media/46ada7a8096f3625-s.woff2",revision:"190b012a1ea4fa649277742d8aaa952f"},{url:"/_next/static/media/527ad038b46df541-s.woff2",revision:"9d5d33aac7b433227908a50658ebb82c"},{url:"/_next/static/media/590bfc1facaea403-s.woff2",revision:"2890339585a50c5843a89ea9788f0780"},{url:"/_next/static/media/61b81e7bde89ba40-s.p.woff2",revision:"e7c8b3a1196384678e2b2044f8baa115"},{url:"/_next/static/media/95e7cb10eda7a858-s.woff2",revision:"a17f6ed96209e29281424e6d7bab0ec8"},{url:"/_next/static/media/9f705a8904cabecc-s.p.woff2",revision:"d39b3002cb55ab0dba0c94a9132d4cc8"},{url:"/_next/static/media/b34eb5d9a2ebd9de-s.woff2",revision:"1c2eb10dc87812929e90e70cfdc75753"},{url:"/_next/static/media/fe0643d5f2ad0dcb-s.woff2",revision:"6de05c54b2b48e2b12745b95bcdd950d"},{url:"/favicon/android-chrome-192x192.png",revision:"c0d5beb829690c3d18c31cb45174dc67"},{url:"/favicon/android-chrome-256x256.png",revision:"7c9bc14f15d5731e3bb1427c8baba551"},{url:"/favicon/apple-touch-icon.png",revision:"c77ac1e2d104e3e3a68bc70232ab9bba"},{url:"/favicon/browserconfig.xml",revision:"7f2b2f8a4c6863cc7be0a1e4b7963bd9"},{url:"/favicon/favicon-16x16.png",revision:"0e0998bad54483253eb2c54cd52f2620"},{url:"/favicon/favicon-32x32.png",revision:"9fcfab51d2269f5954a245263983cfe4"},{url:"/favicon/favicon-large.png",revision:"789b577c10c52b78fa901f49cc3d5161"},{url:"/favicon/favicon.ico",revision:"e09f15b2d8c043c9819b778811852dc4"},{url:"/favicon/favicon.png",revision:"6e948c4229998491ceb982d67f5ff79a"},{url:"/favicon/mstile-150x150.png",revision:"39bbe4b44f7a26e9f308b178f1c69f6f"},{url:"/favicon/safari-pinned-tab.svg",revision:"e4226dd601fda16790841b9189dcabb5"},{url:"/favicon/site.webmanifest",revision:"ab665afc09201416fecde4c3aa2bba88"},{url:"/robots.txt",revision:"59b5022b914a82f95d18493c2a28d218"},{url:"/sitemap-0.xml",revision:"a3476e156bf09ad4fd23da6e1cc7d9c1"},{url:"/sitemap.xml",revision:"c24dc2f275b85f38caa3c21d559c012f"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:a,event:s,state:c})=>a&&"opaqueredirect"===a.type?new Response(a.body,{status:200,statusText:"OK",headers:a.headers}):a}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const a=e.pathname;return!a.startsWith("/api/auth/")&&!!a.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>!(self.origin===e.origin)),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")}));