diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 00000000..6705be06 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,8 @@ +{ + "permissions": { + "allow": [ + "Bash(pnpm add *)", + "Bash(gh pr *)" + ] + } +} diff --git a/docs/_headers b/docs/_headers new file mode 100644 index 00000000..f87fb7a0 --- /dev/null +++ b/docs/_headers @@ -0,0 +1,5 @@ +/* + X-Frame-Options: SAMEORIGIN + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), microphone=(), geolocation=() diff --git a/docs/about/adam/index.html b/docs/about/adam/index.html index d82c338d..a1043f2f 100644 --- a/docs/about/adam/index.html +++ b/docs/about/adam/index.html @@ -115,16 +115,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -134,9 +134,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/about/resume/index.html b/docs/about/resume/index.html index 4a7fb560..997ec1f8 100644 --- a/docs/about/resume/index.html +++ b/docs/about/resume/index.html @@ -152,16 +152,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -171,9 +171,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/apps/gamesandthings.html b/docs/apps/gamesandthings.html index 92b833bf..49501741 100644 --- a/docs/apps/gamesandthings.html +++ b/docs/apps/gamesandthings.html @@ -107,16 +107,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -126,9 +126,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/apps/index.html b/docs/apps/index.html index 8110fe15..8d927751 100644 --- a/docs/apps/index.html +++ b/docs/apps/index.html @@ -119,16 +119,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -138,9 +138,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/apps/magiccollection.html b/docs/apps/magiccollection.html index 4796ad2a..ff1cccff 100644 --- a/docs/apps/magiccollection.html +++ b/docs/apps/magiccollection.html @@ -119,16 +119,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -138,9 +138,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/apps/moonsilver.html b/docs/apps/moonsilver.html index 813d81e6..e3ae291c 100644 --- a/docs/apps/moonsilver.html +++ b/docs/apps/moonsilver.html @@ -108,16 +108,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -127,9 +127,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/apps/privacy.html b/docs/apps/privacy.html index 8e0de721..bee4a1d8 100644 --- a/docs/apps/privacy.html +++ b/docs/apps/privacy.html @@ -112,16 +112,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -131,9 +131,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/apps/soccer.html b/docs/apps/soccer.html index cdeb1e54..093774a1 100644 --- a/docs/apps/soccer.html +++ b/docs/apps/soccer.html @@ -105,16 +105,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -124,9 +124,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/apps/support.html b/docs/apps/support.html index d62afa1a..42fee008 100644 --- a/docs/apps/support.html +++ b/docs/apps/support.html @@ -106,16 +106,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -125,9 +125,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/apps/taskstat-privacy.html b/docs/apps/taskstat-privacy.html index f964a3d9..839e88f9 100644 --- a/docs/apps/taskstat-privacy.html +++ b/docs/apps/taskstat-privacy.html @@ -352,16 +352,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -371,9 +371,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/apps/taskstat.html b/docs/apps/taskstat.html index 5b58a267..6bb2f5d3 100644 --- a/docs/apps/taskstat.html +++ b/docs/apps/taskstat.html @@ -200,16 +200,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -219,9 +219,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/apps/timetracker.html b/docs/apps/timetracker.html index c762f9fe..e403ff69 100644 --- a/docs/apps/timetracker.html +++ b/docs/apps/timetracker.html @@ -108,16 +108,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -127,9 +127,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/archives/index.html b/docs/archives/index.html index b8a8b671..8f20dad1 100644 --- a/docs/archives/index.html +++ b/docs/archives/index.html @@ -105,16 +105,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -124,9 +124,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/archives/town-selectman.html b/docs/archives/town-selectman.html index acd843b9..a47cf0d8 100644 --- a/docs/archives/town-selectman.html +++ b/docs/archives/town-selectman.html @@ -247,16 +247,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -266,9 +266,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/case-studies/color-picker/index.html b/docs/case-studies/color-picker/index.html index 413789fe..7d4fde92 100644 --- a/docs/case-studies/color-picker/index.html +++ b/docs/case-studies/color-picker/index.html @@ -166,16 +166,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -185,9 +185,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/case-studies/index.html b/docs/case-studies/index.html index 4dd858cd..378f920e 100644 --- a/docs/case-studies/index.html +++ b/docs/case-studies/index.html @@ -175,16 +175,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -194,9 +194,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/case-studies/soccertracker/index.html b/docs/case-studies/soccertracker/index.html index 6ef58625..e34bcf76 100644 --- a/docs/case-studies/soccertracker/index.html +++ b/docs/case-studies/soccertracker/index.html @@ -283,16 +283,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -302,9 +302,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/credits/index.html b/docs/credits/credits/index.html similarity index 95% rename from docs/credits/index.html rename to docs/credits/credits/index.html index bd778606..c6f6b733 100644 --- a/docs/credits/index.html +++ b/docs/credits/credits/index.html @@ -161,16 +161,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -180,9 +180,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/credits/open-source/index.html b/docs/credits/open-source/index.html new file mode 100644 index 00000000..9ea48472 --- /dev/null +++ b/docs/credits/open-source/index.html @@ -0,0 +1,234 @@ + + + + + + Open Source | Adam Jolicoeur + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Open Source

+

+ + +
+

Built on Open Source #

+

I’ve built this site with open source in mind (which is why this is hosted on GitHub in a public repository) and wanted to call out the open source projects that I use as part of it.

+

Site Defaults #

+ +

Plugins #

+

Eleventy:

+ + +
+ + +
+ + + + + + + + + diff --git a/docs/css/containers.css b/docs/css/containers.css index 2a7b4e39..2c9c593f 100644 --- a/docs/css/containers.css +++ b/docs/css/containers.css @@ -1,2 +1,82 @@ -.cards-row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;gap:var(--space-lg,1.5rem)}.prose-section:nth-child(2){margin-top:0}.prose-section .card,section .card{margin-bottom:var(--space-lg,1.5rem)}.card h2,.card h3,.card h4{margin-bottom:var(--space-sm,.75rem);margin-top:0}.card>h3{border-bottom:var(--border-thin,2px) solid var(--earth-sand);margin-bottom:var(--space-md,1rem);padding-bottom:var(--space-md,1rem)}.card ol:last-child,.card p:last-child,.card ul:last-child{margin-bottom:0}.prose-section .card-shadow{background:var(--earth-cream);border:none;border-radius:var(--radius-lg,16px);-webkit-box-shadow:10px 10px 0 var(--shadow-heavy);box-shadow:10px 10px 0 var(--shadow-heavy);padding:var(--space-md,1.5rem)}.prose-section .card-shadow>h3{border-bottom:var(--border-thin,2px) solid var(--earth-brown);margin-bottom:var(--space-md,1rem);padding-bottom:var(--space-md,1rem)}.prose-section .card-basic{background:var(--earth-sand);border:4px solid var(--earth-brown);border-radius:var(--radius-lg,16px);-webkit-box-shadow:6px 6px 0 var(--shadow-heavy);box-shadow:6px 6px 0 var(--shadow-heavy);padding:var(--space-md,1.5rem);-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.prose-section .card-basic>h3{border-bottom:var(--border-thin,2px) solid var(--earth-brown);margin-bottom:var(--space-md,1rem);padding-bottom:var(--space-md,1rem)}blockquote{background:var(--earth-sand-light);border-left:var(--border-medium) solid var(--accent-coral);color:var(--text-primary);font-size:clamp(1rem,1.5vw,1.1rem);font-weight:600;line-height:1.6;margin:var(--space-lg,1.5rem);padding:var(--space-lg,1.5rem)} -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYXNzL2NvbnRhaW5lcnMuc2NzcyIsImNvbnRhaW5lcnMuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLFdBQ0UsbUJBQUEsQ0FBQSxtQkFBQSxDQUFBLFlBQUEsQ0FDQSxrQkFBQSxDQUFBLGNBQUEsQ0FDQSw2QkFBQSxDQUFBLDRCQUFBLENBQUEsc0JBQUEsQ0FBQSxrQkFBQSxDQUNBLDBCQ0NGLENEWUEsNEJBQ0UsWUNSRixDRFlBLG1DQUVFLG9DQ1JGLENEWUEsMkJBSUUsb0NBQUEsQ0FEQSxZQ1BGLENEVUEsU0FHRSw0REFBQSxDQUZBLGtDQUFBLENBQ0EsbUNDTkYsQ0RVQSwyREFHRSxlQ1BGLENEU0EsNEJBQ0UsNkJBQUEsQ0FDQSxXQUFBLENBQ0EsbUNBQUEsQ0FFQSxrREFBQSxDQUFBLDBDQUFBLENBREEsOEJDTEYsQ0RRQSwrQkFHRSw2REFBQSxDQUZBLGtDQUFBLENBQ0EsbUNDSkYsQ0RPQSwyQkFDRSw0QkFBQSxDQUNBLG1DQUFBLENBQ0EsbUNBQUEsQ0FFQSxnREFBQSxDQUFBLHdDQUFBLENBREEsOEJBQUEsQ0FFQSx3Q0FBQSxDQUFBLGdDQUFBLENBQUEsd0JBQUEsQ0FBQSw4Q0NKRixDRE1BLDhCQUdFLDZEQUFBLENBRkEsa0NBQUEsQ0FDQSxtQ0NGRixDRE1BLFdBT0Usa0NBQUEsQ0FDQSwwREFBQSxDQUpBLHlCQUFBLENBSEEsa0NBQUEsQ0FFQSxlQUFBLENBREEsZUFBQSxDQUdBLDZCQUFBLENBQ0EsOEJDREYiLCJmaWxlIjoiY29udGFpbmVycy5jc3MifQ== */ \ No newline at end of file +@charset "UTF-8"; +/* Markdown container blocks — loaded only on pages with containers: true */ +/* Grid row for adjacent card blocks */ +.cards-row { + display: flex; + flex-wrap: wrap; + flex-direction: row; + gap: var(--space-lg, 1.5rem); +} + +/* Semantic prose section with spacing */ +.prose-section:nth-child(2) { + margin-top: 0; +} + +/* Card container in prose context — extends base .card with spacing for markdown content */ +.prose-section .card, +section .card { + margin-bottom: var(--space-lg, 1.5rem); +} + +/* Ensure headings inside cards have correct spacing */ +.card h2, +.card h3, +.card h4 { + margin-top: 0; + margin-bottom: var(--space-sm, 0.75rem); +} + +.card > h3 { + margin-bottom: var(--space-md, 1rem); + padding-bottom: var(--space-md, 1rem); + border-bottom: var(--border-thin, 2px) solid var(--earth-sand); +} + +.card p:last-child, +.card ul:last-child, +.card ol:last-child { + margin-bottom: 0; +} + +.prose-section .card-shadow { + background: var(--earth-cream); + border: none; + border-radius: var(--radius-lg, 16px); + padding: var(--space-md, 1.5rem); + box-shadow: 10px 10px 0 var(--shadow-heavy); +} + +.prose-section .card-shadow > h3 { + margin-bottom: var(--space-md, 1rem); + padding-bottom: var(--space-md, 1rem); + border-bottom: var(--border-thin, 2px) solid var(--earth-brown); +} + +.prose-section .card-basic { + background: var(--earth-sand); + border: 4px solid var(--earth-brown); + border-radius: var(--radius-lg, 16px); + padding: var(--space-md, 1.5rem); + box-shadow: 6px 6px 0 var(--shadow-heavy); + transition: transform 0.3s; +} + +.prose-section .card-basic > h3 { + margin-bottom: var(--space-md, 1rem); + padding-bottom: var(--space-md, 1rem); + border-bottom: var(--border-thin, 2px) solid var(--earth-brown); +} + +blockquote { + font-size: clamp(1rem, 1.5vw, 1.1rem); + line-height: 1.6; + font-weight: 600; + color: var(--text-primary); + margin: var(--space-lg, 1.5rem); + padding: var(--space-lg, 1.5rem); + background: var(--earth-sand-light); + border-left: var(--border-medium) solid var(--accent-coral); +} + +/*# sourceMappingURL=containers.css.map */ diff --git a/docs/css/markdown.css b/docs/css/markdown.css index 957ddb3d..576fc100 100644 --- a/docs/css/markdown.css +++ b/docs/css/markdown.css @@ -1,2 +1,24 @@ -pre{background-color:var(--earth-cream);border-radius:var(--radius-md,12px);padding:var(--space-md,1rem)}section h2{margin-top:var(--space-lg,2rem)!important}section h3,section ol,section ul{margin-bottom:var(--space-md,1rem)!important}.card>h2:after{display:none} -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYXNzL21hcmtkb3duLnNjc3MiLCJtYXJrZG93bi5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFDRSxtQ0FBQSxDQUVBLG1DQUFBLENBREEsNEJDRUYsQ0RFQSxXQUNFLHlDQ0NGLENESUEsaUNBRUUsNENDR0YsQ0RBRSxlQUNFLFlDR0oiLCJmaWxlIjoibWFya2Rvd24uY3NzIn0= */ \ No newline at end of file +pre { + background-color: var(--earth-cream); + padding: var(--space-md, 1rem); + border-radius: var(--radius-md, 12px); +} + +section h2 { + margin-top: var(--space-lg, 2rem) !important; +} + +section h3 { + margin-bottom: var(--space-md, 1rem) !important; +} + +section ul, +section ol { + margin-bottom: var(--space-md, 1rem) !important; +} + +.card > h2::after { + display: none; +} + +/*# sourceMappingURL=markdown.css.map */ diff --git a/docs/css/print.css b/docs/css/print.css index ea157f8b..8822d634 100644 --- a/docs/css/print.css +++ b/docs/css/print.css @@ -1,2 +1,196 @@ -@media print{body{background:#fff!important;color:#000;font:12pt Times New Roman,Times,serif;line-height:1.3}#footer,#header,.adslot,.hero,.menu,aside,footer,form,header,iframe,nav{display:none}#footer,#navigation{display:none!important}content,main{display:block!important;float:none;margin:0;max-width:8.5in!important;width:100%}.section-hero,section{margin:16px 0 0!important;padding:0!important}.row{display:block!important}.col-md-6{width:100%!important}.mt-2,.mt-3,.mt-4{margin-top:2pt!important}.mb-2,.mb-3,.mb-4{margin-bottom:2pt!important}.my-2,.my-3,.my-4{margin-bottom:0!important;margin-top:0!important}.py-2,.py-3,.py-4{padding-bottom:0!important;padding-top:0!important}.pb-2,.pb-3,.pb-4{padding-bottom:2pt!important}*{background-image:none!important}img,svg{display:none!important}img,svg,table{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid}.text-bg-light{background-color:transparent!important}.hide-on-print,.row-badges{display:none!important}.print{display:block!important}.h1,.text-h1,h1{font-size:22pt;-webkit-column-break-before:always;-moz-column-break-before:always;break-before:always;font-family:Times New Roman,Times,serif;text-shadow:none}.h2,.text-h2,h2{font-family:Times New Roman,Times,serif!important;font-size:19pt;margin-bottom:8px;margin-top:16px}.h2:after,.text-h2:after,h2:after{display:none}.h3,.text-h3,h3{font-size:17pt}.h3,.h4,.text-h3,.text-h4,h3,h4{font-family:Times New Roman,Times,serif!important;margin-bottom:8px;margin-top:16px}.h4,.text-h4,h4{font-size:14pt}.h5,.text-h5,h5{margin-top:16px}.h5,.paragraph,.text-h5,h5,p{font-family:Times New Roman,Times,serif!important;font-size:12pt;margin-bottom:8px}blockquote{page-break-inside:avoid}h1,h2,h3,h4,h5,h6,img{page-break-after:avoid}h1,h2,h3,h4,h5,h6,img,pre,table{page-break-inside:avoid}dl,ol,ul{page-break-before:avoid}a{page-break-inside:avoid}a,a:link,a:visited{background:transparent;color:#520;font-weight:700;text-align:left;text-decoration:underline}.badge{border-color:#000!important;color:#000!important}.badge,.card{background:transparent!important}.card{border-color:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important;padding:0!important;-webkit-transform:none!important;transform:none!important;-webkit-transition:none!important;transition:none!important}} -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYXNzL3ByaW50LnNjc3MiLCJwcmludC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS0EsYUFDRSxLQUdFLHlCQUFBLENBQ0EsVUFBQSxDQU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0FFQSxlQUFBLENBREEseUJDQUYsQ0RnQkEsT0FDRSwyQkFBQSxDQUNBLG9CQ2JGLENEZ0JBLGFBRkUsZ0NDTkYsQ0RRQSxNQUVFLGtDQUFBLENBRUEsaUNBQUEsQ0FBQSx5QkFBQSxDQURBLG1CQUFBLENBR0EsZ0NBQUEsQ0FBQSx3QkFBQSxDQURBLGlDQUFBLENBQUEseUJDYkYsQ0FDRiIsImZpbGUiOiJwcmludC5jc3MifQ== */ \ No newline at end of file +/** + ** Print stylesheet for Resume + ** Copyright 2008-2024 Adam J. Jolicoeur + ** https://www.adamjolicoeur.com +**/ +@media print { + body { + font: 12pt "Times New Roman", Times, serif; + line-height: 1.3; + background: #fff !important; + color: #000; + } + header, + #header, + footer, + #footer, + aside, + nav, + form, + iframe, + .menu, + .hero, + .adslot { + display: none; + } + #navigation, + #footer { + display: none !important; + } + main, + content { + display: block !important; + max-width: 8.5in !important; + width: 100%; + margin: 0; + float: none; + } + section, + .section-hero { + padding: 0 !important; + margin: 0 !important; + margin-top: 16px !important; + } + .row { + display: block !important; + } + .col-md-6 { + width: 100% !important; + } + .mt-4, .mt-3, .mt-2 { + margin-top: 2pt !important; + } + .mb-4, .mb-3, .mb-2 { + margin-bottom: 2pt !important; + } + .my-4, .my-3, .my-2 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + .py-4, .py-3, .py-2 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + .pb-4, .pb-3, .pb-2 { + padding-bottom: 2pt !important; + } + * { + background-image: none !important; + } + img, + svg { + display: none !important; + } + table, + img, + svg { + break-inside: avoid; + } + .text-bg-light { + background-color: transparent !important; + } + .row-badges { + display: none !important; + } + .hide-on-print { + display: none !important; + } + .print { + display: block !important; + } + h1, + .h1, + .text-h1 { + font-size: 22pt; + break-before: always; + text-shadow: none; + font-family: "Times New Roman", Times, serif; + } + h2, + .h2, + .text-h2 { + font-size: 19pt; + margin-top: 16px; + margin-bottom: 8px; + font-family: "Times New Roman", Times, serif !important; + } + h2::after, + .h2::after, + .text-h2::after { + display: none; + } + h3, + .h3, + .text-h3 { + font-size: 17pt; + margin-top: 16px; + margin-bottom: 8px; + font-family: "Times New Roman", Times, serif !important; + } + h4, + .h4, + .text-h4 { + font-size: 14pt; + margin-top: 16px; + margin-bottom: 8px; + font-family: "Times New Roman", Times, serif !important; + } + h5, + .h5, + .text-h5 { + font-size: 12pt; + margin-top: 16px; + margin-bottom: 8px; + font-family: "Times New Roman", Times, serif !important; + } + p, + .paragraph { + font-size: 12pt; + margin-bottom: 8px; + font-family: "Times New Roman", Times, serif !important; + } + /* Defining all page breaks */ + blockquote { + page-break-inside: avoid; + } + h1, + h2, + h3, + h4, + h5, + h6 { + page-break-after: avoid; + page-break-inside: avoid; + } + img { + page-break-inside: avoid; + page-break-after: avoid; + } + table, + pre { + page-break-inside: avoid; + } + ul, + ol, + dl { + page-break-before: avoid; + } + /* Displaying link color and link behavior */ + a { + page-break-inside: avoid; + } + a, + a:link, + a:visited { + background: transparent; + color: #520; + font-weight: bold; + text-decoration: underline; + text-align: left; + } + .badge { + border-color: #000 !important; + color: #000 !important; + background: transparent !important; + } + .card { + background: transparent !important; + border-color: transparent !important; + padding: 0 !important; + box-shadow: none !important; + transition: none !important; + transform: none !important; + } +} + +/*# sourceMappingURL=print.css.map */ diff --git a/docs/css/prism.css b/docs/css/prism.css index 8d6c8d95..0ace8b1d 100644 --- a/docs/css/prism.css +++ b/docs/css/prism.css @@ -1,2 +1,154 @@ -code[class*=language-],pre[class*=language-]{background:0 0;color:#000;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;text-shadow:0 1px #fff;white-space:pre;word-break:normal;word-spacing:normal;word-wrap:normal;-ms-hyphens:none;hyphens:none;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{background:#b3d4fc;text-shadow:none}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{background:#b3d4fc;text-shadow:none}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{margin:.5em 0;overflow:auto;padding:1em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{border-radius:.3em;padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{background:hsla(0,0%,100%,.5);color:#9a6e3a}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}div.code-toolbar{position:relative}div.code-toolbar>.toolbar{opacity:0;position:absolute;right:.2em;top:.3em;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;z-index:10}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{background:#f5f2f0;background:hsla(0,0%,88%,.2);border-radius:.5em;-webkit-box-shadow:0 2px 0 0 rgba(0,0,0,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);color:#bbb;font-size:.8em;padding:0 .5em}div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{color:inherit;text-decoration:none} -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYXNzL3ByaXNtLnNjc3MiLCJwcmlzbS5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsNkNBQTRELGNBQUEsQ0FBWCxVQUFBLENBQWlELDZEQUFBLENBQWtFLGFBQUEsQ0FBYyxlQUFBLENBQXZHLHNCQUFBLENBQXVILGVBQUEsQ0FBb0MsaUJBQUEsQ0FBcEIsbUJBQUEsQ0FBc0MsZ0JBQUEsQ0FBNEMsZ0JBQUEsQ0FBQSxZQUFBLENBQTNCLGVBQUEsQ0FBZ0IsZUFBQSxDQUFBLGFBQUEsQ0FBQSxVQ2N6UixDRGRxZSw0SkFBaUssa0JBQUEsQ0FBakIsZ0JDd0JybkIsQ0R4QnFlLHdJQUFpSyxrQkFBQSxDQUFqQixnQkN3QnJuQixDRHhCeXBCLGFBQWEsNkNBQWlELGdCQzZCcnRCLENBQ0YsQ0Q5Qnl1QixzQkFBb0MsYUFBQSxDQUFjLGFBQUEsQ0FBMUIsV0NtQ2p3QixDRG5DeXlCLHVEQUEyRCxrQkN1Q3AyQixDRHZDdTNCLGlDQUFnRCxrQkFBQSxDQUFiLFlBQUEsQ0FBZ0Msa0JDNkMxN0IsQ0Q3QzY4Qix5REFBeUQsYUNpRHRnQyxDRGpEb2hDLG1CQUFtQixVQ3FEdmlDLENEckRrakMsaUJBQWlCLFVDeURua0MsQ0R6RDhrQyxxR0FBcUcsVUM2RG5yQyxDRDdEOHJDLDBGQUEwRixVQ2lFeHhDLENEakVteUMsMEZBQXdHLDZCQUFBLENBQWQsYUNzRTczQyxDRHRFNDZDLCtDQUErQyxVQzBFMzlDLENEMUVzK0Msa0NBQWtDLGFDOEV4Z0QsQ0Q5RXNoRCw4Q0FBOEMsVUNrRnBrRCxDRGxGK2tELDZCQUE2QixlQ3NGNW1ELENEdEY0bkQsY0FBYyxpQkMwRjFvRCxDRDFGNHBELGNBQWMsV0M4RjFxRCxDRDdGQSxpQkFBaUIsaUJDaUdqQixDRGpHbUMsMEJBQThHLFNBQUEsQ0FBcEYsaUJBQUEsQ0FBc0MsVUFBQSxDQUFULFFBQUEsQ0FBb0IsMENBQUEsQ0FBQSxrQ0FBQSxDQUEvQixVQzBHL0UsQ0QxRzJKLGdDQUFnQyxTQzhHM0wsQ0Q5R3FNLHVDQUF1QyxTQ2tINU8sQ0RsSHNQLHdDQUF3QyxvQkNzSDlSLENEdEhtVCwwQ0FBMEMsY0MwSDdWLENEMUg0VywrQ0FBK0MsY0FBQSxDQUFlLFFBQUEsQ0FBUyxhQUFBLENBQWMsWUFBQSxDQUFhLGtCQUFBLENBQW1CLGdCQUFBLENBQWlCLFNBQUEsQ0FBVSx3QkFBQSxDQUFBLHFCQUFBLENBQUEsb0JBQUEsQ0FBQSxnQkNxSTVmLENEckk2Z0Isc0lBQStLLGtCQUFBLENBQW1CLDRCQUFBLENBQW9FLGtCQUFBLENBQXBDLDJDQUFBLENBQUEsbUNBQUEsQ0FBNUYsVUFBQSxDQUFXLGNBQUEsQ0FBZSxjQytJN3FCLENEL0lzeUIsZ1RBQWdULGFBQUEsQ0FBYyxvQkNvSnBtQyIsImZpbGUiOiJwcmlzbS5jc3MifQ== */ \ No newline at end of file +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+markdown+scss&plugins=show-language+toolbar */ +code[class*=language-], pre[class*=language-] { + color: #000; + background: 0 0; + text-shadow: 0 1px #fff; + font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; + font-size: 1em; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + tab-size: 4; + hyphens: none; +} + +code[class*=language-] ::selection, code[class*=language-]::selection, pre[class*=language-] ::selection, pre[class*=language-]::selection { + text-shadow: none; + background: #b3d4fc; +} + +code[class*=language-] ::selection, code[class*=language-]::selection, pre[class*=language-] ::selection, pre[class*=language-]::selection { + text-shadow: none; + background: #b3d4fc; +} + +@media print { + code[class*=language-], pre[class*=language-] { + text-shadow: none; + } +} +pre[class*=language-] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; +} + +:not(pre) > code[class*=language-], pre[class*=language-] { + background: #f5f2f0; +} + +:not(pre) > code[class*=language-] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; +} + +.token.cdata, .token.comment, .token.doctype, .token.prolog { + color: #708090; +} + +.token.punctuation { + color: #999; +} + +.token.namespace { + opacity: 0.7; +} + +.token.boolean, .token.constant, .token.deleted, .token.number, .token.property, .token.symbol, .token.tag { + color: #905; +} + +.token.attr-name, .token.builtin, .token.char, .token.inserted, .token.selector, .token.string { + color: #690; +} + +.language-css .token.string, .style .token.string, .token.entity, .token.operator, .token.url { + color: #9a6e3a; + background: hsla(0, 0%, 100%, 0.5); +} + +.token.atrule, .token.attr-value, .token.keyword { + color: #07a; +} + +.token.class-name, .token.function { + color: #dd4a68; +} + +.token.important, .token.regex, .token.variable { + color: #e90; +} + +.token.bold, .token.important { + font-weight: 700; +} + +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +div.code-toolbar { + position: relative; +} + +div.code-toolbar > .toolbar { + position: absolute; + z-index: 10; + top: 0.3em; + right: 0.2em; + transition: opacity 0.3s ease-in-out; + opacity: 0; +} + +div.code-toolbar:hover > .toolbar { + opacity: 1; +} + +div.code-toolbar:focus-within > .toolbar { + opacity: 1; +} + +div.code-toolbar > .toolbar > .toolbar-item { + display: inline-block; +} + +div.code-toolbar > .toolbar > .toolbar-item > a { + cursor: pointer; +} + +div.code-toolbar > .toolbar > .toolbar-item > button { + background: 0 0; + border: 0; + color: inherit; + font: inherit; + line-height: normal; + overflow: visible; + padding: 0; + user-select: none; +} + +div.code-toolbar > .toolbar > .toolbar-item > a, div.code-toolbar > .toolbar > .toolbar-item > button, div.code-toolbar > .toolbar > .toolbar-item > span { + color: #bbb; + font-size: 0.8em; + padding: 0 0.5em; + background: #f5f2f0; + background: rgba(224, 224, 224, 0.2); + box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); + border-radius: 0.5em; +} + +div.code-toolbar > .toolbar > .toolbar-item > a:focus, div.code-toolbar > .toolbar > .toolbar-item > a:hover, div.code-toolbar > .toolbar > .toolbar-item > button:focus, div.code-toolbar > .toolbar > .toolbar-item > button:hover, div.code-toolbar > .toolbar > .toolbar-item > span:focus, div.code-toolbar > .toolbar > .toolbar-item > span:hover { + color: inherit; + text-decoration: none; +} + +/*# sourceMappingURL=prism.css.map */ diff --git a/docs/css/slides.css b/docs/css/slides.css index 187b5105..5da54723 100644 --- a/docs/css/slides.css +++ b/docs/css/slides.css @@ -1,2 +1,63 @@ -.slider{overflow:hidden;text-align:center}.slides{display:-webkit-box;display:-ms-flexbox;display:flex;overflow-x:auto;scroll-behavior:smooth;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}.slides::-webkit-scrollbar{width:16px}.slides::-webkit-scrollbar-thumb{background:var(--earth-sage);background-clip:content-box;border:2px solid transparent;border-radius:2rem}.slides::-webkit-scrollbar-track{background:transparent;border:1px solid transparent;border-radius:2rem;padding:0 2px}.slides>div{scroll-snap-align:start;-ms-flex-negative:0;background:transparent;border-radius:10px;display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;height:300px;margin-right:50px;position:relative;-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:center center;transform-origin:center center;-webkit-transition:-webkit-transform .5s;transition:-webkit-transform .5s;transition:transform .5s;transition:transform .5s,-webkit-transform .5s;width:300px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:100px}.carousel img{height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;top:0;width:100%} -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYXNzL3NsaWRlcy5zY3NzIiwic2xpZGVzLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSxRQUdFLGVBQUEsQ0FEQSxpQkNBRixDRElBLFFBQ0UsbUJBQUEsQ0FBQSxtQkFBQSxDQUFBLFlBQUEsQ0FFQSxlQUFBLENBR0Esc0JBQUEsQ0FGQSxnQ0FBQSxDQUFBLDRCQUFBLENBR0EsZ0NDSEYsQ0RLQSwyQkFDRSxVQ0ZGLENESUEsaUNBQ0UsNEJBQUEsQ0FHQSwyQkFBQSxDQURBLDRCQUFBLENBREEsa0JDQ0YsQ0RHQSxpQ0FDRSxzQkFBQSxDQUdBLDRCQUFBLENBREEsa0JBQUEsQ0FEQSxhQ0VGLENERUEsWUFDRSx1QkFBQSxDQUNBLG1CQUFBLENBS0Esc0JBQUEsQ0FEQSxrQkFBQSxDQU9BLG1CQUFBLENBQUEsbUJBQUEsQ0FBQSxZQUFBLENBWEEsYUFBQSxDQUVBLFlBQUEsQ0FDQSxpQkFBQSxDQU1BLGlCQUFBLENBRkEsMEJBQUEsQ0FBQSxrQkFBQSxDQURBLHNDQUFBLENBQUEsOEJBQUEsQ0FFQSx3Q0FBQSxDQUFBLGdDQUFBLENBQUEsd0JBQUEsQ0FBQSw4Q0FBQSxDQVBBLFdBQUEsQ0FXQSx1QkFBQSxDQUFBLG9CQUFBLENBQUEsc0JBQUEsQ0FDQSx3QkFBQSxDQUFBLHFCQUFBLENBQUEsa0JBQUEsQ0FDQSxlQ0FGLENERUEsY0FNRSxXQUFBLENBRkEsTUFBQSxDQUhBLG1CQUFBLENBQUEsZ0JBQUEsQ0FDQSxpQkFBQSxDQUNBLEtBQUEsQ0FFQSxVQ0VGIiwiZmlsZSI6InNsaWRlcy5jc3MifQ== */ \ No newline at end of file +/* +** Based on the CodePen from Chirs Coyier +** https://codepen.io/chriscoyier/pen/XwbNwX +*/ +.slider { + text-align: center; + overflow: hidden; +} + +.slides { + display: flex; + overflow-x: auto; + scroll-snap-type: x mandatory; + scroll-behavior: smooth; + -webkit-overflow-scrolling: touch; +} + +.slides::-webkit-scrollbar { + width: 16px; +} + +.slides::-webkit-scrollbar-thumb { + background: var(--earth-sage); + border-radius: 2rem; + border: 2px solid transparent; + background-clip: content-box; +} + +.slides::-webkit-scrollbar-track { + background: transparent; + padding: 0 2px; + border-radius: 2rem; + border: 1px solid transparent; +} + +.slides > div { + scroll-snap-align: start; + flex-shrink: 0; + width: 300px; + height: 300px; + margin-right: 50px; + border-radius: 10px; + background: transparent; + transform-origin: center center; + transform: scale(1); + transition: transform 0.5s; + position: relative; + display: flex; + justify-content: center; + align-items: center; + font-size: 100px; +} + +.carousel img { + object-fit: cover; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +/*# sourceMappingURL=slides.css.map */ diff --git a/docs/css/style.css b/docs/css/style.css index d5eab905..74e16b42 100644 --- a/docs/css/style.css +++ b/docs/css/style.css @@ -1,2 +1,1798 @@ -:root{--font-family-sans:"Inter",system-ui,-apple-system,blinkmacsystemfont,"Segoe UI",roboto,"Helvetica Neue",arial,sans-serif;--font-family-serif:"Playfair Display",serif;--font-family-mono:"Fira Code","Courier New",courier,monospace;--font-family-heading:"Pirata One",cursive;--white:#f0f0f0;--black:#010101;--earth-dark:#2d1f12;--earth-brown:#4a3426;--earth-sage:#5a6b4f;--earth-sand:#c9b89a;--earth-cream:#f5f1e8;--accent-coral:#d35f3d;--accent-coral-dark:#b34a2d;--text-primary:#2d1f12;--text-secondary:#4a3426;--text-muted:#6b5d52;--shadow:rgba(45,31,18,.15);--shadow-heavy:rgba(45,31,18,.25);--shadow-light:rgba(45,31,18,.08);--bg-canvas:var(--earth-cream);--border-brown:var(--earth-brown);--font-size-xs:0.75rem;--font-size-sm:0.875rem;--font-size-md:1rem;--font-size-lg:1.125rem;--font-size-xl:1.25rem;--font-size-2xl:1.5rem;--font-size-3xl:2rem;--font-size-4xl:2.5rem;--font-size-5xl:3rem;--font-size-6xl:4rem;--space-2xs:0.25rem;--space-xs:0.5rem;--space-sm:0.75rem;--space-md:1rem;--space-lg:1.5rem;--space-xl:2rem;--space-2xl:3rem;--space-3xl:6rem;--radius-sm:8px;--radius-md:12px;--radius-lg:16px;--radius-xl:20px;--radius-pill:50px;--border-thin:2px;--border-medium:4px;--border-thick:6px;--border-extra-thick:8px}*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0}:focus-visible{outline:var(--border-thin) solid var(--accent-coral);outline-offset:2px}html{scroll-behavior:smooth}body{background:linear-gradient(135deg,var(--earth-cream) 0,#e8dcc8 100%);color:var(--text-primary);font-family:var(--font-family-sans);line-height:1.6;min-height:100vh;position:relative}::-webkit-scrollbar,html::-webkit-scrollbar{width:16px}::-webkit-scrollbar-thumb,html::-webkit-scrollbar-thumb{background:linear-gradient(var(--accent-coral-dark),var(--accent-coral));background-clip:content-box;border:2px solid transparent;border-radius:2rem}::-webkit-scrollbar-track,html::-webkit-scrollbar-track{background:transparent;border:1px solid var(--earth-sage);border-radius:2rem;padding:0 2px}@media (prefers-reduced-motion:reduce){.animated-element{-webkit-animation:none;animation:none;opacity:1;-webkit-transition:none;transition:none}body{scroll-behavior:auto}*,:after,:before{-webkit-animation-duration:.01ms!important;animation-duration:.01ms!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important;-webkit-transition-duration:.01ms!important;transition-duration:.01ms!important}}.d-none,.display-none{display:none!important}.hero{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:0 auto;max-width:900px;padding:6rem 2rem;text-align:center}.rounded{border-radius:var(--radius-xl,20px)!important}.circle{border-radius:999px!important;padding:1rem!important}.fade-in{opacity:0;-webkit-transition:opacity .5s ease-in,visibility 0s linear .5s;transition:opacity .5s ease-in,visibility 0s linear .5s;visibility:hidden}.fade-in.show,.show{opacity:1;-webkit-transition-delay:0s;transition-delay:0s;visibility:visible}.hide{opacity:0;-webkit-transition:opacity .5s ease-in,visibility 0s linear .5s;transition:opacity .5s ease-in,visibility 0s linear .5s;visibility:hidden}.hide-on-screen{display:none!important}@media (width <= 768px){.hero h1{font-size:var(--font-size-5xl,3rem)}.no-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.hide-on-mobile{display:none!important}.callouts-grid,.work-grid{grid-template-columns:1fr}h2{font-size:var(--font-size-3xl,2rem)}}figcaption{color:var(--text-secondary);font-size:var(--font-size-sm,.875rem);font-style:italic;line-height:1.4;text-align:center}.arrows{bottom:20px;height:72px;left:50%;margin-left:-30px;position:absolute;width:60px}.arrows path{-webkit-animation:arrow 2s infinite;animation:arrow 2s infinite;fill:transparent;stroke:#bfe7fa;stroke-width:1px}@-webkit-keyframes arrow{0%{opacity:0}40%{opacity:1}80%{opacity:0}to{opacity:0}}@keyframes arrow{0%{opacity:0}40%{opacity:1}80%{opacity:0}to{opacity:0}}.arrows path.a1{-webkit-animation-delay:-1s;animation-delay:-1s}.arrows path.a2{-webkit-animation-delay:-.5s;animation-delay:-.5s}.arrows path.a3{-webkit-animation-delay:0s;animation-delay:0s}.pirata-one-regular{font-family:Pirata One,system-ui;font-style:normal;font-weight:400}.inter-400{font-optical-sizing:auto;font-style:normal;font-weight:400}.inter-400,.inter-500{font-family:Inter,sans-serif}.inter-500{font-optical-sizing:auto;font-style:normal;font-weight:500}.inter-600{font-optical-sizing:auto;font-style:normal;font-weight:600}.inter-600,.inter-700{font-family:Inter,sans-serif}.inter-700{font-optical-sizing:auto;font-style:normal;font-weight:700}.inter-800{font-optical-sizing:auto;font-style:normal;font-weight:800}.inter-800,.inter-900{font-family:Inter,sans-serif}.inter-900{font-optical-sizing:auto;font-style:normal;font-weight:900}.playfair-display-400{font-family:Playfair Display,serif;font-optical-sizing:auto;font-style:normal;font-weight:400}.playfair-display-500{font-family:Playfair Display,serif;font-optical-sizing:auto;font-style:normal;font-weight:500}.playfair-display-600{font-family:Playfair Display,serif;font-optical-sizing:auto;font-style:normal;font-weight:600}.playfair-display-700{font-family:Playfair Display,serif;font-optical-sizing:auto;font-style:normal;font-weight:700}.playfair-display-800{font-family:Playfair Display,serif;font-optical-sizing:auto;font-style:normal;font-weight:800}.playfair-display-900{font-family:Playfair Display,serif;font-optical-sizing:auto;font-style:normal;font-weight:900}.text-h1,h1{font-size:clamp(2.5rem,8vw,5rem);line-height:1.2}.text-display,.text-h1,h1{color:var(--text-primary);font-family:Pirata One,cursive;letter-spacing:2px;text-shadow:3px 3px 0 var(--accent-coral)}.text-display{font-size:clamp(3rem,10vw,6rem);line-height:1.1}.hero h1{font-family:var(--font-family-heading);letter-spacing:2px;line-height:1.2;margin-bottom:1rem;text-shadow:3px 3px 0 var(--accent-coral)}.hero h1,.text-h2,h2{color:var(--text-primary)}.text-h2,h2{font-family:Playfair Display,serif;font-size:clamp(2rem,5vw,3rem);font-weight:700;line-height:1.3;margin-bottom:var(--space-md,1.5rem)}.text-h2.no-underline:after{display:none;margin-bottom:var(--space-2xs,.25rem)}.text-h2:after,h2:after{background:var(--accent-coral);border:3px solid var(--earth-brown);content:"";display:block;height:5px;margin:1rem auto;width:100px}.text-h3,h3{font-size:clamp(1.5rem,3vw,2rem);line-height:1.3}.text-h3,.text-h4,h3,h4{color:var(--text-primary);font-family:Playfair Display,serif;font-weight:600}.text-h4,h4{font-size:clamp(1.25rem,2.5vw,1.5rem);line-height:1.4}.text-h5,h5{font-size:clamp(1.1rem,2vw,1.25rem)}.text-h5,.text-h6,h5,h6{color:var(--text-primary);font-family:Inter,sans-serif;font-weight:700;line-height:1.4}.text-h6,h6{font-size:1rem;letter-spacing:.5px;text-transform:uppercase}.text-body-lg{font-size:clamp(1.1rem,1.5vw,1.25rem)!important;line-height:1.7!important}.text-body,p{color:var(--text-primary);font-size:clamp(.95rem,1.5vw,1rem);line-height:1.7;padding-bottom:var(--space-xs,.5rem)}.text-body:last-child,p:last-child{margin-bottom:0}.hero p{color:var(--earth-brown);font-size:clamp(1.1rem,2vw,1.25rem);margin:0 auto;max-width:720px}.card-body .text-body:first-of-type,.card-body p:first-of-type{margin-top:var(--space-md,16px)}.text-body-sm{font-size:clamp(.85rem,1.2vw,.9rem);line-height:1.6}.text-caption{color:var(--text-muted);font-size:clamp(var(--space-sm),1vw,.85rem);line-height:1.5}.text-callout{background:var(--earth-sand-light);border-left:var(--border-medium) solid var(--accent-coral);color:var(--text-primary);font-size:clamp(1rem,1.5vw,1.1rem);font-weight:600;line-height:1.6;margin:var(--space-lg,1.5rem);padding:var(--space-lg,1.5rem)}.code,code{font-family:var(--font-family-mono);font-size:clamp(.85rem,1vw,.9rem)}.code.code-inline,code.code-inline{background:var(--earth-sand);border-radius:var(--radius-sm);padding:.1rem .3rem}.code-block{background:var(--earth-sand);border:var(--border-thin) solid var(--earth-sage);border-radius:var(--radius-md);display:block;font-size:clamp(.85rem,1vw,.9rem);overflow-x:auto;padding:1rem}.text-muted{color:var(--text-muted)}.text-secondary{color:var(--text-secondary)}.text-accent{color:var(--accent-coral)}.text-semibold{font-weight:600}.text-bold{font-weight:700}.text-center{text-align:center}.lead,.text-lead{color:var(--text-secondary);font-size:clamp(1.1rem,2vw,1.35rem);line-height:1.7}.link,a{border-bottom:1px solid var(--earth-sage);color:var(--earth-sage);font-weight:var(--font-weight-semibold,600);text-decoration:none;-webkit-transition:all .2s;transition:all .2s}.link:focus,.link:hover,a:focus,a:hover{border-bottom-color:var(--earth-brown);color:var(--earth-brown)}.link-brackets{margin-left:var(--space-md)!important}.link-brackets:after{content:"]";margin-left:.2rem}.link-brackets:after,.link-brackets:before{color:var(--earth-sage);position:absolute;-webkit-transition:all .2s;transition:all .2s}.link-brackets:before{content:"[";margin-left:-.8rem}.link-brackets:focus:after,.link-brackets:focus:before,.link-brackets:hover:after,.link-brackets:hover:before{color:var(--accent-coral)}.blockquote,blockquote{border-left:var(--border-thin) solid var(--earth-brown);color:var(--text-secondary);font-style:italic;margin:var(--space-lg,1.5rem) 0;padding-left:var(--space-md,1rem)}.mb-1{margin-bottom:var(--space-2xs)!important}.mb-2{margin-bottom:var(--space-xs)!important}.mb-3{margin-bottom:var(--space-sm)!important}.mb-4{margin-bottom:var(--space-md)!important}.mb-5{margin-bottom:var(--space-xl)!important}.mt-1{margin-top:var(--space-2xs)!important}.mt-2{margin-top:var(--space-xs)!important}.mt-3{margin-top:var(--space-sm)!important}.mt-4{margin-top:var(--space-md)!important}.mt-5{margin-top:var(--space-xl)!important}.ml-1{margin-left:var(--space-2xs)!important}.ml-2{margin-left:var(--space-xs)!important}.ml-3{margin-left:var(--space-sm)!important}.ml-4{margin-left:var(--space-md)!important}.ml-5{margin-left:var(--space-xl)!important}.mr-1{margin-right:var(--space-2xs)!important}.mr-2{margin-right:var(--space-xs)!important}.mr-3{margin-right:var(--space-sm)!important}.mr-4{margin-right:var(--space-md)!important}.mr-5{margin-right:var(--space-xl)!important}.p-1{padding:var(--space-2xs)!important}.p-2{padding:var(--space-xs)!important}.p-3{padding:var(--space-sm)!important}.p-4{padding:var(--space-md)!important}.p-5{padding:var(--space-xl)!important}.pt-1{padding-top:var(--space-2xs)!important}.pt-2{padding-top:var(--space-xs)!important}.pt-3{padding-top:var(--space-sm)!important}.pt-4{padding-top:var(--space-md)!important}.pt-5{padding-top:var(--space-xl)!important}.pb-1{padding-bottom:var(--space-2xs)!important}.pb-2{padding-bottom:var(--space-xs)!important}.pb-3{padding-bottom:var(--space-sm)!important}.pb-4{padding-bottom:var(--space-md)!important}.pb-5{padding-bottom:var(--space-xl)!important}.pl-1{padding-left:var(--space-2xs)!important}.pl-2{padding-left:var(--space-xs)!important}.pl-3{padding-left:var(--space-sm)!important}.pl-4{padding-left:var(--space-md)!important}.pl-5{padding-left:var(--space-xl)!important}.pr-1{padding-right:var(--space-2xs)!important}.pr-2{padding-right:var(--space-xs)!important}.pr-3{padding-right:var(--space-sm)!important}.pr-4{padding-right:var(--space-md)!important}.pr-5{padding-right:var(--space-xl)!important}section{margin:0 auto;max-width:1200px;padding:var(--space-3xl,6rem) var(--space-lg,2rem)}.justify-content-center{-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-webkit-box-pack:justify!important;-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.justify-content-end{-webkit-box-pack:end!important;-ms-flex-pack:end!important;justify-content:flex-end!important}.row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--space-lg,2rem)}@media (width >= 768px){.row{gap:var(--space-sm,.5rem)}.card-body .row{gap:0}}.button-row{gap:1rem}.no-wrap{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.d-flex{display:-webkit-box;display:-ms-flexbox;display:flex}.flex-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.align-items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.work-grid{display:grid;gap:var(--space-lg,2rem);grid-template-columns:repeat(auto-fit,minmax(300px,1fr));margin-bottom:var(--space-lg,2rem)}.divider{background:var(--accent-coral);border:var(--border-medium,4px) outset var(--earth-dark);display:block;height:var(--space-md,1.5rem);margin:0 auto;width:50%}.divider.vertical{background:var(--earth-dark);border:none!important;border-radius:var(--radius-sm);height:100%;margin:0;width:var(--space-2xs,.25rem)}.card-body ol,.card-body ul,ol,ol.list,ul,ul.list{margin-left:var(--space-lg)!important;padding-left:var(--space-md)!important}.highlight-block{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.header-highlight{margin:var(--space-md) auto;padding:var(--space-md);text-align:center;width:100%}nav{backdrop-filter:blur(24px);background:rgba(245,241,232,.5);border:var(--border-medium,4px) solid var(--earth-brown);border-radius:50px;-webkit-box-shadow:0 8px 24px var(--shadow-heavy);box-shadow:0 8px 24px var(--shadow-heavy);-webkit-filter:url(#lensFilter) saturate(120%) brightness(1.15);filter:url(#lensFilter) saturate(120%) brightness(1.15);left:50%;padding:var(--space-sm) 2rem;position:fixed;top:2rem;-webkit-transform:translateX(-50%);transform:translateX(-50%);z-index:1000}.main-nav{left:0;margin:0 auto;position:sticky;right:0;top:2rem;-webkit-transform:none!important;transform:none!important;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}nav ul{display:-webkit-box;display:-ms-flexbox;display:flex;list-style:none;-webkit-box-pack:center;-ms-flex-pack:center;gap:2rem;justify-content:center;margin-left:0!important;padding-left:0!important}nav a{border-bottom:none;color:var(--text-primary);font-size:.95rem;font-weight:500;padding:var(--space-2xs) var(--space-xs,.5rem);text-decoration:none;-webkit-transition:color .3s;transition:color .3s}nav a:focus,nav a:hover{outline:var(--border-thin) solid var(--accent-coral);outline-offset:2px}nav a.active,nav a:focus,nav a:hover{color:var(--accent-coral)}nav a.sub-page{outline:var(--border-thin) solid var(--text-secondary);outline-offset:2px}nav a.sub-page:hover{outline-color:var(--accent-coral)}@media (width <= 768px){nav{margin:0 auto!important;padding:var(--space-xs,.5rem) var(--space-sm,1rem)!important;top:var(--space-sm,1rem)!important}nav ul{gap:var(--space-sm,1rem)}}footer{background:var(--earth-dark);border-top:var(--border-extra-thick,8px) solid var(--earth-brown);-webkit-box-shadow:0 -10px 30px var(--shadow);box-shadow:0 -10px 30px var(--shadow);color:var(--earth-cream);margin-top:var(--space-3xl,6rem);padding:var(--space-2xl,3rem) var(--space-xl,2rem)}.footer-content{display:grid;gap:3rem;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));margin:0 auto;max-width:1200px}.footer-section h3{color:var(--accent-coral);font-size:clamp(1.2rem,2vw,1.5rem)}.footer-section h3,.footer-section h4{font-family:Playfair Display,serif;margin-bottom:var(--space-md,1rem)}.footer-section h4{color:hsla(0,0%,100%,.5)!important;font-size:clamp(1.1rem,1.25vw,1.125rem)}.footer-section li,.footer-section p{color:var(--earth-cream);line-height:1.6;margin-bottom:var(--space-xs,.5rem)}.footer-section ul{list-style:none;padding:0}.footer-section li{margin-bottom:var(--space-xs,.5rem)}.footer-bottom{border-top:var(--border-medium,4px) solid var(--earth-brown);color:var(--earth-sand);margin-top:var(--space-2xl,3rem);padding-top:var(--space-xl,2rem);text-align:center}.footer-bottom p{color:var(--earth-cream);font-size:var(--font-size-sm);margin:0}.footer-bottom a,.footer-section a{color:var(--earth-cream);text-decoration:underline}.footer-bottom a:hover,.footer-section a:hover{color:var(--accent-coral)}.badge{background:var(--earth-sage);border:var(--border-thin,2px) solid var(--earth-brown);border-radius:var(--radius-pill);color:var(--earth-cream);display:inline-block;font-size:.85rem;font-weight:600;padding:var(--space-2xs,.25rem) var(--space-sm,.75rem)}.badge-accent{background:var(--accent-coral-dark)}.badge-outline{background:transparent;color:inherit}.badges,.row-badges{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--space-2xs,.25rem)}.btn{border:none;border-radius:var(--radius-md,12px);cursor:pointer;display:inline-block;font-family:var(--font-family-sans);font-size:var(--font-size-md,1rem);font-weight:600;padding:var(--space-sm,.75rem) var(--space-lg,1.5rem);text-align:center;text-decoration:none;-webkit-transition:all .2s;transition:all .2s}.btn:focus,.btn:hover{-webkit-box-shadow:2px 2px 0 var(--earth-brown);box-shadow:2px 2px 0 var(--earth-brown);-webkit-transform:translate(2px,2px);transform:translate(2px,2px)}.btn-primary{border:var(--border-medium,4px) solid var(--earth-brown);-webkit-box-shadow:4px 4px 0 var(--earth-brown);box-shadow:4px 4px 0 var(--earth-brown)}.btn-primary,.btn-primary:focus,.btn-primary:hover{background:var(--accent-coral-dark);color:var(--white)}.btn-secondary{background:var(--earth-cream);border:var(--border-medium,4px) solid var(--earth-brown);-webkit-box-shadow:4px 4px 0 var(--earth-sage);box-shadow:4px 4px 0 var(--earth-sage);color:var(--text-primary)}.btn-secondary:focus,.btn-secondary:hover{background:var(--earth-sand);-webkit-box-shadow:2px 2px 0 var(--earth-sage);box-shadow:2px 2px 0 var(--earth-sage);color:var(--text-primary);outline:var(--border-thin) solid var(--earth-dark);-webkit-transform:translate(2px,2px);transform:translate(2px,2px)}.btn-outline{backdrop-filter:blur(24px);background:hsla(0,0%,100%,.5)!important;border:var(--border-medium,4px) solid var(--earth-brown)!important;-webkit-box-shadow:none!important;box-shadow:none!important;color:var(--text-primary)!important;-webkit-filter:url(#lensFilter) saturate(120%) brightness(1.15);filter:url(#lensFilter) saturate(120%) brightness(1.15)}.btn-outline:focus,.btn-outline:hover{color:var(--earth-cream);text-decoration:underline}.btn-sm{border-width:var(--border-thin)!important;font-size:.9rem!important;padding:var(--space-xs,.5rem) var(--space-md,1rem)!important}.btn-lg{font-size:1.1rem!important;padding:var(--space-md,1rem) var(--space-xl,2rem)!important}.skip-link{background:var(--accent-coral);border:var(--border-medium,4px) solid var(--earth-brown);color:var(--white);font-weight:600;left:0;padding:var(--space-sm,.75rem) var(--space-lg,1.5rem);position:absolute;text-decoration:none;top:-100px;z-index:2000;clip:rect(0,0,0,0);overflow:hidden}.skip-link:focus{left:1rem;top:1rem;clip:auto;overflow:visible}.social-links{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:1rem}.social-link{background:var(--earth-sage);border:var(--border-medium,4px) solid var(--earth-sand);border-radius:8px;color:var(--white);display:inline-block;font-size:.95rem;font-weight:500;padding:var(--space-xs,.5rem) var(--space-md,1rem);text-decoration:none!important;-webkit-transition:all .3s;transition:all .3s}.social-link:focus,.social-link:hover{background:var(--accent-coral);color:var(--white)!important;-webkit-transform:translateY(-2px);transform:translateY(-2px)}.card{background:var(--earth-cream);border:var(--border-thick,6px) solid var(--earth-brown);border-radius:var(--radius-xl,20px);-webkit-box-shadow:8px 8px 0 var(--shadow-heavy);box-shadow:8px 8px 0 var(--shadow-heavy);padding:var(--space-lg,1.5rem);-webkit-transition:-webkit-transform .3s,-webkit-box-shadow .3s;transition:-webkit-transform .3s,-webkit-box-shadow .3s;transition:transform .3s,box-shadow .3s;transition:transform .3s,box-shadow .3s,-webkit-transform .3s,-webkit-box-shadow .3s}.card:focus-within,.card:hover{-webkit-box-shadow:12px 12px 0 var(--shadow-heavy);box-shadow:12px 12px 0 var(--shadow-heavy);-webkit-transform:translateY(-5px);transform:translateY(-5px)}.card-layered{border:var(--border-thick,6px) solid var(--earth-brown);border-radius:var(--radius-xl,20px);-webkit-box-shadow:12px 12px 0 var(--earth-sage),12px 12px 0 5px var(--earth-brown);box-shadow:12px 12px 0 var(--earth-sage),12px 12px 0 5px var(--earth-brown);padding:var(--space-xl,2rem)}.card-layered,.card-shadow{background:var(--earth-cream)}.card-shadow{border:none;border-radius:var(--radius-lg,16px);-webkit-box-shadow:10px 10px 0 var(--shadow-heavy);box-shadow:10px 10px 0 var(--shadow-heavy);padding:var(--space-md,1.5rem)}.card-accent{background:var(--earth-cream);border:var(--border-extra-thick,8px) solid var(--earth-brown);border-radius:var(--radius-xl,20px);-webkit-box-shadow:16px 16px 0 var(--accent-coral),16px 16px 0 6px var(--earth-brown);box-shadow:16px 16px 0 var(--accent-coral),16px 16px 0 6px var(--earth-brown);overflow:hidden}.card-flex{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.card-flex p{-webkit-box-flex:1;-ms-flex:1 0;flex:1 0}.card-with-columns .row{gap:var(--space-md,1rem);-ms-flex-item-align:stretch}.card-with-columns .column,.card-with-columns .row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;align-self:stretch}.card-with-columns .column{-webkit-box-flex:1;-ms-flex:1 0 0px;flex:1 0 0;-ms-flex-item-align:stretch}.card-header{border-bottom:var(--border-thin,2px) solid var(--earth-sand);margin-bottom:var(--space-md,1rem);padding-bottom:var(--space-md,1rem)}.card-body{margin-bottom:var(--space-md)}.card-body img{-o-object-fit:cover;object-fit:cover;width:100%}@media (width >= 768px){.img-thumbnail{max-width:50%}}.card-body:last-child{margin-bottom:0}.card-footer{border-top:var(--border-thin,2px) solid var(--earth-sand);margin-top:var(--space-md,1rem);padding-top:var(--space-md,1rem)}.showcase-content{padding:var(--space-lg,2rem)}.showcase-content h3{color:var(--text-primary);font-family:var(--font-family-serif);font-size:clamp(1.3rem,2.5vw,1.8rem);margin-bottom:var(--space-sm,1rem)}.showcase-content p{color:var(--text-secondary);font-size:clamp(.95rem,1.5vw,1rem);margin-bottom:var(--space-md,1.5rem)}.showcase-small{background:var(--earth-sand);border:4px solid var(--earth-brown);border-radius:var(--radius-lg,16px);-webkit-box-shadow:6px 6px 0 var(--shadow-heavy);box-shadow:6px 6px 0 var(--shadow-heavy);padding:var(--space-md,1.5rem);-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.showcase-small:focus-within,.showcase-small:hover{-webkit-transform:translateY(-4px);transform:translateY(-4px)}.showcase-small h4{color:var(--text-primary);font-family:var(--font-family-serif);font-size:clamp(1.1rem,2vw,1.3rem);margin-bottom:var(--space-xs,.5rem)}.showcase-small p{color:var(--text-secondary);font-size:clamp(.9rem,1.5vw,.95rem)}.about-card{background:var(--earth-cream);border:var(--border-thick,6px) solid var(--earth-brown);border-radius:var(--border-radius-xl,20px);-webkit-box-shadow:12px 12px 0 var(--earth-sage),12px 12px 0 5px var(--earth-brown);box-shadow:12px 12px 0 var(--earth-sage),12px 12px 0 5px var(--earth-brown);margin:0 auto;padding:var(--space-2xl,3rem)}@media (width <= 768px){.about-card{-webkit-box-shadow:6px 6px 0 var(--earth-sage),6px 6px 0 4px var(--earth-brown);box-shadow:6px 6px 0 var(--earth-sage),6px 6px 0 4px var(--earth-brown);padding:var(--space-md,1rem)}.about-grid{grid-template-columns:1fr!important}}.about-card p{color:var(--text-primary);font-size:clamp(1rem,1.5vw,1.1rem);line-height:1.8;margin-bottom:var(--space-lg,1.5rem)}.about-card p:last-child{margin-bottom:0}.about-grid{display:grid;gap:var(--space-xl,2rem);grid-template-columns:repeat(auto-fit,minmax(350px,1fr));margin-top:var(--space-xl,2rem)}.showcase-large{background:var(--earth-cream);border:var(--border-thick,6px) solid var(--earth-brown);border-radius:var(--radius-xl,20px);-webkit-box-shadow:12px 12px 0 var(--accent-coral),12px 12px 0 6px var(--earth-brown);box-shadow:12px 12px 0 var(--accent-coral),12px 12px 0 6px var(--earth-brown);overflow:hidden;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}@media (width <= 768px){.showcase-large{-webkit-box-shadow:6px 6px 0 var(--accent-coral),6px 6px 0 4px var(--earth-brown);box-shadow:6px 6px 0 var(--accent-coral),6px 6px 0 4px var(--earth-brown)}}.showcase-large:focus-within,.showcase-large:hover{-webkit-transform:translateY(-8px);transform:translateY(-8px)}.showcase-image{background:linear-gradient(135deg,var(--earth-sage) 0,var(--earth-sand) 100%);display:-webkit-box;display:-ms-flexbox;display:flex;height:300px;width:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;border-bottom:var(--border-thick,6px) solid var(--earth-brown);color:var(--earth-cream);font-size:var(--font-size-5xl,3rem);justify-content:center;-o-object-fit:contain;object-fit:contain;padding:var(--space-md,1rem)}.showcase-image-dark{background:linear-gradient(135deg,var(--black) 0,var(--earth-dark) 100%)}.small-showcase-cards{display:grid;gap:var(--space-md,1.5rem);grid-column:1/-1;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));margin-top:var(--space-sm,1rem)}.callouts-grid{display:grid;gap:2rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));margin-top:2rem}.callout{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:justify;-ms-flex-pack:justify;background:var(--earth-cream);border:var(--border-thick,6px) solid var(--accent-coral-dark);border-radius:var(--radius-xl,20px);-webkit-box-shadow:8px 8px 0 var(--shadow-heavy);box-shadow:8px 8px 0 var(--shadow-heavy);justify-content:space-between;padding:2rem;position:relative;-webkit-transition:-webkit-transform .3s,-webkit-box-shadow .3s;transition:-webkit-transform .3s,-webkit-box-shadow .3s;transition:transform .3s,box-shadow .3s;transition:transform .3s,box-shadow .3s,-webkit-transform .3s,-webkit-box-shadow .3s}.callout:focus-within,.callout:hover{-webkit-box-shadow:12px 12px 0 var(--shadow-heavy);box-shadow:12px 12px 0 var(--shadow-heavy);-webkit-transform:translateY(-5px);transform:translateY(-5px)}.callout:before{color:var(--accent-coral);content:'"';font-family:var(--font-family-serif);font-size:var(--font-size-6xl,4rem);left:20px;line-height:1;position:absolute;top:10px}.callout-text{color:var(--text-primary);font-style:italic;margin-bottom:var(--space-md,1.5rem);padding-top:var(--space-sm,1rem)}.callout-author{color:var(--text-primary);display:block;font-weight:600}.callout-role{color:var(--text-secondary);font-size:var(--font-size-sm,.9rem)}.card-image{border:var(--border-medium,4px) solid var(--border-border,#4a3426);border-radius:var(--radius-xl,20px);-webkit-box-shadow:6px 6px 0 0 var(--shadow-light,rgba(45,31,18,.08));box-shadow:6px 6px 0 0 var(--shadow-light,rgba(45,31,18,.08));padding:var(--space-lg,1.5rem);-webkit-transition:-webkit-transform .3s,-webkit-box-shadow .3s;transition:-webkit-transform .3s,-webkit-box-shadow .3s;transition:transform .3s,box-shadow .3s;transition:transform .3s,box-shadow .3s,-webkit-transform .3s,-webkit-box-shadow .3s}.card-image,.card-image .image-top{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;background:var(--bg-canvas,#f5f1e8)}.card-image .image-top{-ms-flex-item-align:stretch;align-self:stretch;border-bottom:var(--border-medium) solid var(--border-brown,#4a3426);border:var(--border-extra-thick,8px) solid #000;border-radius:var(--radius-lg,16px);-webkit-box-shadow:0 0 12px var(--shadow-heavy,rgba(45,31,18,.25));box-shadow:0 0 12px var(--shadow-heavy,rgba(45,31,18,.25));margin-bottom:var(--space-xs,.5rem);max-height:300px;-o-object-fit:cover;object-fit:cover}.card-image .card-content{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start;-ms-flex-item-align:stretch;align-self:stretch;padding:var(--space-md) var(--space-xl) var(--space-xl) var(--space-xl)}.card-image .card-content,.card-image>.card-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:start}.card-image>.card-body{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:justify;-ms-flex-pack:justify;height:100%;justify-content:space-between}h3.two-line-header{height:82px;min-height:82px}.gallery{--size:100px;display:grid;gap:5px;grid-auto-rows:var(--size);grid-template-columns:repeat(6,var(--size));margin-bottom:var(--size);place-items:start center}.gallery:has(:focus) picture:not(:focus),.gallery:has(:hover) picture:not(:hover){-webkit-filter:brightness(.5) contrast(.5);filter:brightness(.5) contrast(.5)}.gallery picture{border-radius:5px;clip-path:path("M90,10 C100,0 100,0 110,10 190,90 190,90 190,90 200,100 200,100 190,110 190,110 110,190 110,190 100,200 100,200 90,190 90,190 10,110 10,110 0,100 0,100 10,90Z");grid-column:auto/span 2;height:calc(var(--size)*2);-o-object-fit:cover;object-fit:cover;-webkit-transition:clip-path .25s,-webkit-filter .75s;transition:clip-path .25s,-webkit-filter .75s;transition:clip-path .25s,filter .75s;transition:clip-path .25s,filter .75s,-webkit-filter .75s;width:calc(var(--size)*2)}.gallery picture:nth-child(5n-1){grid-column:2/span 2}.gallery picture:focus,.gallery picture:hover{clip-path:path("M0,0 C0,0 200,0 200,0 200,0 200,100 200,100 200,100 200,200 200,200 200,200 100,200 100,200 100,200 100,200 0,200 0,200 0,100 0,100 0,100 0,100 0,100Z");-webkit-transition:clip-path .25s,-webkit-filter .25s;transition:clip-path .25s,-webkit-filter .25s;transition:clip-path .25s,filter .25s;transition:clip-path .25s,filter .25s,-webkit-filter .25s;z-index:1}.gallery picture:focus{outline:1px dashed #000;outline-offset:-5px}.carousel>input{height:1px;width:1px;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);margin:-1px;overflow:hidden;padding:0;position:absolute}.carousel>input:nth-of-type(15):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-1400%}.carousel>input:nth-of-type(14):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-1300%}.carousel>input:nth-of-type(13):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-1200%}.carousel>input:nth-of-type(12):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-1100%}.carousel>input:nth-of-type(11):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-1000%}.carousel>input:nth-of-type(10):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-900%}.carousel>input:nth-of-type(9):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-800%}.carousel>input:nth-of-type(8):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-700%}.carousel>input:nth-of-type(7):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-600%}.carousel>input:nth-of-type(6):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-500%}.carousel>input:nth-of-type(5):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-400%}.carousel>input:nth-of-type(4):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-300%}.carousel>input:nth-of-type(3):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-200%}.carousel>input:nth-of-type(2):checked~.carousel__slides .carousel__slide:first-of-type{margin-left:-100%}.carousel>input:first-of-type:checked~.carousel__slides .carousel__slide:first-of-type{margin-left:0}.carousel>input:first-of-type:checked~.carousel__thumbnails li:first-of-type,.carousel>input:nth-of-type(10):checked~.carousel__thumbnails li:nth-of-type(10),.carousel>input:nth-of-type(11):checked~.carousel__thumbnails li:nth-of-type(11),.carousel>input:nth-of-type(12):checked~.carousel__thumbnails li:nth-of-type(12),.carousel>input:nth-of-type(13):checked~.carousel__thumbnails li:nth-of-type(13),.carousel>input:nth-of-type(14):checked~.carousel__thumbnails li:nth-of-type(14),.carousel>input:nth-of-type(15):checked~.carousel__thumbnails li:nth-of-type(15),.carousel>input:nth-of-type(2):checked~.carousel__thumbnails li:nth-of-type(2),.carousel>input:nth-of-type(3):checked~.carousel__thumbnails li:nth-of-type(3),.carousel>input:nth-of-type(4):checked~.carousel__thumbnails li:nth-of-type(4),.carousel>input:nth-of-type(5):checked~.carousel__thumbnails li:nth-of-type(5),.carousel>input:nth-of-type(6):checked~.carousel__thumbnails li:nth-of-type(6),.carousel>input:nth-of-type(7):checked~.carousel__thumbnails li:nth-of-type(7),.carousel>input:nth-of-type(8):checked~.carousel__thumbnails li:nth-of-type(8),.carousel>input:nth-of-type(9):checked~.carousel__thumbnails li:nth-of-type(9){-webkit-box-shadow:0 0 0 5px rgba(0,0,255,.5);box-shadow:0 0 0 5px rgba(0,0,255,.5)}.carousel__slides{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0;padding:0;white-space:nowrap;z-index:1}.carousel__slide,.carousel__slides{-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;position:relative}.carousel__slide{display:block;-webkit-box-flex:1;-ms-flex:1 0 100%;flex:1 0 100%;height:100%;-webkit-transition:all .3s ease-out;transition:all .3s ease-out;vertical-align:top;white-space:normal;width:100%}.carousel__slide figure{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0}.carousel__slide div{position:relative}.carousel__slide div:before{content:"";display:block;padding-top:66.6666666667%;width:100%}.carousel__slide div>img{height:100%;inset:0;position:absolute;width:100%}.carousel__slide div{width:100%}.carousel__slide img{display:block;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;-o-object-fit:cover;object-fit:cover}.carousel__slide figcaption{-ms-flex-item-align:center;align-self:center;padding:20px 20px 0;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;min-width:150px;width:25%}.carousel__slide .credit{color:rgba(0,0,0,.5);display:block;margin-top:1rem}.carousel__slide.scrollable{overflow-y:scroll}.carousel__thumbnails{display:-webkit-box;display:-ms-flexbox;display:flex;list-style:none;margin:0 -10px;padding:0}.carousel__slides+.carousel__thumbnails{margin-top:20px}.carousel__thumbnails li{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;margin:0 10px;max-width:calc(16.66667% - 20px);-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.carousel__thumbnails label{display:block;position:relative}.carousel__thumbnails label:before{content:"";display:block;padding-top:100%;width:100%}.carousel__thumbnails label>img{height:100%;inset:0;position:absolute;width:100%}.carousel__thumbnails label:focus,.carousel__thumbnails label:hover{cursor:pointer}.carousel__thumbnails label:focus img,.carousel__thumbnails label:hover img{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.25);box-shadow:0 0 0 1px rgba(0,0,0,.25);-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.carousel__thumbnails img{display:block;height:100%;-o-object-fit:cover;object-fit:cover;width:100%} -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zYXNzL192YXJpYWJsZXMuc2NzcyIsInN0eWxlLmNzcyIsIi4uLy4uL3NyYy9zY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2MxOENJLG9FQUVFLGNkMjhDTixDY3o4Q00sNEVBQ0UsNENBQUEsQ0FBQSxvQ0FBQSxDQUNBLHNDQUFBLENBQUEsOEJkMjhDUixDY3Q4Q0UsMEJBQ0UsYUFBQSxDQUVBLFdBQUEsQ0FDQSxtQkFBQSxDQUFBLGdCQUFBLENBRkEsVWQwOENKIiwiZmlsZSI6InN0eWxlLmNzcyJ9 */ \ No newline at end of file +@charset "UTF-8"; +/** + ** Copyright 2008-2025 Adam J. Jolicoeur + ** https://www.adamjolicoeur.com +**/ +:root { + /* Font Families */ + --font-family-sans: + 'Inter', system-ui, -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, + 'Helvetica Neue', arial, sans-serif; + --font-family-serif: 'Playfair Display', serif; + --font-family-mono: 'Fira Code', 'Courier New', courier, monospace; + --font-family-heading: 'Pirata One', cursive; + /* Colors */ + --white: #f0f0f0; + --black: #010101; + --earth-dark: #2d1f12; + --earth-brown: #4a3426; + --earth-sage: #5a6b4f; + --earth-sand: #c9b89a; + --earth-cream: #f5f1e8; + --accent-coral: #d35f3d; + --accent-coral-dark: #b34a2d; + --text-primary: #2d1f12; + --text-secondary: #4a3426; + --text-muted: #6b5d52; + --shadow: rgb(45, 31, 18, 15%); + --shadow-heavy: rgb(45, 31, 18, 25%); + --shadow-light: rgb(45, 31, 18, 8%); + --bg-canvas: var(--earth-cream); + --border-brown: var(--earth-brown); + /* Font Sizes */ + --font-size-xs: 0.75rem; + --font-size-sm: 0.875rem; + --font-size-md: 1rem; + --font-size-lg: 1.125rem; + --font-size-xl: 1.25rem; + --font-size-2xl: 1.5rem; + --font-size-3xl: 2rem; + --font-size-4xl: 2.5rem; + --font-size-5xl: 3rem; + --font-size-6xl: 4rem; + /* Spacing */ + --space-2xs: 0.25rem; + --space-xs: 0.5rem; + --space-sm: 0.75rem; + --space-md: 1rem; + --space-lg: 1.5rem; + --space-xl: 2rem; + --space-2xl: 3rem; + --space-3xl: 6rem; + /* Border radius */ + --radius-sm: 8px; + --radius-md: 12px; + --radius-lg: 16px; + --radius-xl: 20px; + --radius-pill: 50px; + /* Borders */ + --border-thin: 2px; + --border-medium: 4px; + --border-thick: 6px; + --border-extra-thick: 8px; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +/* Focus visible styles for keyboard navigation */ +*:focus-visible { + outline: var(--border-thin) solid var(--accent-coral); + outline-offset: 2px; +} + +html { + scroll-behavior: smooth; +} + +body { + font-family: var(--font-family-sans); + background: linear-gradient(135deg, var(--earth-cream) 0%, #e8dcc8 100%); + color: var(--text-primary); + line-height: 1.6; + min-height: 100vh; + position: relative; +} + +html::-webkit-scrollbar, +::-webkit-scrollbar { + width: 16px; +} + +html::-webkit-scrollbar-thumb, +::-webkit-scrollbar-thumb { + background: linear-gradient(var(--accent-coral-dark), var(--accent-coral)); + border-radius: 2rem; + border: 2px solid transparent; + background-clip: content-box; +} + +html::-webkit-scrollbar-track, +::-webkit-scrollbar-track { + background: transparent; + padding: 0 2px; + border-radius: 2rem; + border: 1px solid var(--earth-sage); +} + +/* Styles for users who prefer reduced motion */ +@media (prefers-reduced-motion: reduce) { + .animated-element { + animation: none; /* Disable animations */ + transition: none; /* Disable transitions */ + /* You can also provide alternative, less motion-intensive styles here */ + /* For example, for a hover effect, you might change opacity instead of scaling */ + opacity: 1; /* Ensure element is visible if animation was for visibility */ + } + /* You can also target specific elements or properties */ + body { + scroll-behavior: auto; /* Disable smooth scrolling if enabled */ + } + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} +.display-none, +.d-none { + display: none !important; +} + +/* Hero Section */ +.hero { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 6rem 2rem; + text-align: center; + max-width: 900px; + margin: 0 auto; +} + +.rounded { + border-radius: var(--radius-xl, 20px) !important; +} + +.circle { + border-radius: 999px !important; + padding: 1rem !important; +} + +/* Work Highlights */ +.fade-in { + opacity: 0; + visibility: hidden; + transition: opacity 0.5s ease-in, visibility 0s linear 0.5s; /* 0.5s for opacity transition, 0s visibility transition after 0.5s delay */ +} + +.fade-in.show { + opacity: 1; + visibility: visible; + transition-delay: 0s; /* Override the delay for fade-in */ +} + +.show { + opacity: 1; + visibility: visible; + transition-delay: 0s; +} + +.hide { + opacity: 0; + visibility: hidden; + transition: opacity 0.5s ease-in, visibility 0s linear 0.5s; /* 0.5s for opacity transition, 0s visibility transition after 0.5s delay */ +} + +.hide-on-screen { + display: none !important; +} + +/* Responsive */ +@media (width <= 768px) { + .hero h1 { + font-size: var(--font-size-5xl, 3rem); + } + .no-wrap { + flex-wrap: wrap !important; + } + .hide-on-mobile { + display: none !important; + } + .work-grid { + grid-template-columns: 1fr; + } + .callouts-grid { + grid-template-columns: 1fr; + } + h2 { + font-size: var(--font-size-3xl, 2rem); + } +} +figcaption { + font-size: var(--font-size-sm, 0.875rem); + line-height: 1.4; + color: var(--text-secondary); + text-align: center; + font-style: italic; +} + +/* stylint-disable */ +/* +** Arrow animations from https://codepen.io/postor/pen/vYpNYg +*/ +.arrows { + width: 60px; + height: 72px; + position: absolute; + left: 50%; + margin-left: -30px; + bottom: 20px; +} + +.arrows path { + stroke: #bfe7fa; + fill: transparent; + stroke-width: 1px; + animation: arrow 2s infinite; +} + +@keyframes arrow { + 0% { + opacity: 0; + } + 40% { + opacity: 1; + } + 80% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes arrow /*Safari and Chrome*/ { + 0% { + opacity: 0; + } + 40% { + opacity: 1; + } + 80% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +.arrows path.a1 { + animation-delay: -1s; + /* Safari 和 Chrome */ +} + +.arrows path.a2 { + animation-delay: -0.5s; + /* Safari 和 Chrome */ +} + +.arrows path.a3 { + animation-delay: 0s; + /* Safari 和 Chrome */ +} + +.pirata-one-regular { + font-family: "Pirata One", system-ui; + font-weight: 400; + font-style: normal; +} + +.inter-400 { + font-family: Inter, sans-serif; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; +} + +.inter-500 { + font-family: Inter, sans-serif; + font-optical-sizing: auto; + font-weight: 500; + font-style: normal; +} + +.inter-600 { + font-family: Inter, sans-serif; + font-optical-sizing: auto; + font-weight: 600; + font-style: normal; +} + +.inter-700 { + font-family: Inter, sans-serif; + font-optical-sizing: auto; + font-weight: 700; + font-style: normal; +} + +.inter-800 { + font-family: Inter, sans-serif; + font-optical-sizing: auto; + font-weight: 800; + font-style: normal; +} + +.inter-900 { + font-family: Inter, sans-serif; + font-optical-sizing: auto; + font-weight: 900; + font-style: normal; +} + +.playfair-display-400 { + font-family: "Playfair Display", serif; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; +} + +.playfair-display-500 { + font-family: "Playfair Display", serif; + font-optical-sizing: auto; + font-weight: 500; + font-style: normal; +} + +.playfair-display-600 { + font-family: "Playfair Display", serif; + font-optical-sizing: auto; + font-weight: 600; + font-style: normal; +} + +.playfair-display-700 { + font-family: "Playfair Display", serif; + font-optical-sizing: auto; + font-weight: 700; + font-style: normal; +} + +.playfair-display-800 { + font-family: "Playfair Display", serif; + font-optical-sizing: auto; + font-weight: 800; + font-style: normal; +} + +.playfair-display-900 { + font-family: "Playfair Display", serif; + font-optical-sizing: auto; + font-weight: 900; + font-style: normal; +} + +/* Heading 1 */ +h1, +.text-h1 { + font-family: "Pirata One", cursive; + font-size: clamp(2.5rem, 8vw, 5rem); + color: var(--text-primary); + line-height: 1.2; + letter-spacing: 2px; + text-shadow: 3px 3px 0 var(--accent-coral); +} + +.text-display { + font-family: "Pirata One", cursive; + font-size: clamp(3rem, 10vw, 6rem); + color: var(--text-primary); + line-height: 1.1; + letter-spacing: 2px; + text-shadow: 3px 3px 0 var(--accent-coral); +} + +.hero h1 { + font-family: var(--font-family-heading); + color: var(--text-primary); + margin-bottom: 1rem; + text-shadow: 3px 3px 0 var(--accent-coral); + letter-spacing: 2px; + line-height: 1.2; +} + +/* Heading 2 */ +h2, +.text-h2 { + font-family: "Playfair Display", serif; + font-size: clamp(2rem, 5vw, 3rem); + color: var(--text-primary); + line-height: 1.3; + font-weight: 700; + margin-bottom: var(--space-md, 1.5rem); +} + +.text-h2.no-underline::after { + display: none; + margin-bottom: var(--space-2xs, 0.25rem); +} + +h2::after, +.text-h2::after { + content: ""; + display: block; + width: 100px; + height: 5px; + background: var(--accent-coral); + margin: 1rem auto; + border: 3px solid var(--earth-brown); +} + +/* Heading 3 */ +h3, +.text-h3 { + font-family: "Playfair Display", serif; + font-size: clamp(1.5rem, 3vw, 2rem); + color: var(--text-primary); + line-height: 1.3; + font-weight: 600; +} + +/* Heading 4 */ +h4, +.text-h4 { + font-family: "Playfair Display", serif; + font-size: clamp(1.25rem, 2.5vw, 1.5rem); + color: var(--text-primary); + line-height: 1.4; + font-weight: 600; +} + +/* Heading 5 */ +h5, +.text-h5 { + font-family: Inter, sans-serif; + font-size: clamp(1.1rem, 2vw, 1.25rem); + color: var(--text-primary); + line-height: 1.4; + font-weight: 700; +} + +/* Heading 6 */ +h6, +.text-h6 { + font-family: Inter, sans-serif; + font-size: 1rem; + color: var(--text-primary); + line-height: 1.4; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +/* Body text sizes */ +.text-body-lg { + font-size: clamp(1.1rem, 1.5vw, 1.25rem) !important; + line-height: 1.7 !important; +} + +p, +.text-body { + font-size: clamp(0.95rem, 1.5vw, 1rem); + line-height: 1.7; + color: var(--text-primary); + padding-bottom: var(--space-xs, 0.5rem); +} + +p:last-child, +.text-body:last-child { + margin-bottom: 0; +} + +.hero p { + font-size: clamp(1.1rem, 2vw, 1.25rem); + color: var(--earth-brown); + max-width: 720px; + margin: 0 auto; +} + +.card-body p:first-of-type, +.card-body .text-body:first-of-type { + margin-top: var(--space-md, 16px); +} + +.text-body-sm { + font-size: clamp(0.85rem, 1.2vw, 0.9rem); + line-height: 1.6; +} + +.text-caption { + font-size: clamp(var(--space-sm), 1vw, 0.85rem); + line-height: 1.5; + color: var(--text-muted); +} + +.text-callout { + font-size: clamp(1rem, 1.5vw, 1.1rem); + line-height: 1.6; + font-weight: 600; + color: var(--text-primary); + margin: var(--space-lg, 1.5rem); + padding: var(--space-lg, 1.5rem); + background: var(--earth-sand-light); + border-left: var(--border-medium) solid var(--accent-coral); +} + +code, +.code { + font-family: var(--font-family-mono); + font-size: clamp(0.85rem, 1vw, 0.9rem); +} + +code.code-inline, +.code.code-inline { + background: var(--earth-sand); + padding: 0.1rem 0.3rem; + border-radius: var(--radius-sm); +} + +.code-block { + display: block; + background: var(--earth-sand); + padding: 1rem; + border-radius: var(--radius-md); + font-size: clamp(0.85rem, 1vw, 0.9rem); + overflow-x: auto; + border: var(--border-thin) solid var(--earth-sage); +} + +/* Text utilities */ +.text-muted { + color: var(--text-muted); +} + +.text-secondary { + color: var(--text-secondary); +} + +.text-accent { + color: var(--accent-coral); +} + +.text-semibold { + font-weight: 600; +} + +.text-bold { + font-weight: 700; +} + +.text-center { + text-align: center; +} + +/* Lead paragraph */ +.lead, +.text-lead { + font-size: clamp(1.1rem, 2vw, 1.35rem); + line-height: 1.7; + color: var(--text-secondary); +} + +/* Links */ +a, +.link { + color: var(--earth-sage); + border-bottom: 1px solid var(--earth-sage); + text-decoration: none; + transition: all 0.2s; + font-weight: var(--font-weight-semibold, 600); +} + +a:hover, +a:focus, +.link:hover, +.link:focus { + color: var(--earth-brown); + border-bottom-color: var(--earth-brown); +} + +.link-brackets { + margin-left: var(--space-md) !important; +} +.link-brackets::after { + content: "]"; + position: absolute; + margin-left: 0.2rem; + color: var(--earth-sage); + transition: all 0.2s; +} +.link-brackets::before { + content: "["; + position: absolute; + margin-left: -0.8rem; + color: var(--earth-sage); + transition: all 0.2s; +} +.link-brackets:hover::after, .link-brackets:hover::before, .link-brackets:focus::after, .link-brackets:focus::before { + color: var(--accent-coral); +} + +/* Blockquote */ +blockquote, +.blockquote { + border-left: var(--border-thin) solid var(--earth-brown); + padding-left: var(--space-md, 1rem); + margin: var(--space-lg, 1.5rem) 0; + font-style: italic; + color: var(--text-secondary); +} + +.mb-1 { + margin-bottom: var(--space-2xs) !important; +} + +.mb-2 { + margin-bottom: var(--space-xs) !important; +} + +.mb-3 { + margin-bottom: var(--space-sm) !important; +} + +.mb-4 { + margin-bottom: var(--space-md) !important; +} + +.mb-5 { + margin-bottom: var(--space-xl) !important; +} + +.mt-1 { + margin-top: var(--space-2xs) !important; +} + +.mt-2 { + margin-top: var(--space-xs) !important; +} + +.mt-3 { + margin-top: var(--space-sm) !important; +} + +.mt-4 { + margin-top: var(--space-md) !important; +} + +.mt-5 { + margin-top: var(--space-xl) !important; +} + +.ml-1 { + margin-left: var(--space-2xs) !important; +} + +.ml-2 { + margin-left: var(--space-xs) !important; +} + +.ml-3 { + margin-left: var(--space-sm) !important; +} + +.ml-4 { + margin-left: var(--space-md) !important; +} + +.ml-5 { + margin-left: var(--space-xl) !important; +} + +.mr-1 { + margin-right: var(--space-2xs) !important; +} + +.mr-2 { + margin-right: var(--space-xs) !important; +} + +.mr-3 { + margin-right: var(--space-sm) !important; +} + +.mr-4 { + margin-right: var(--space-md) !important; +} + +.mr-5 { + margin-right: var(--space-xl) !important; +} + +.p-1 { + padding: var(--space-2xs) !important; +} + +.p-2 { + padding: var(--space-xs) !important; +} + +.p-3 { + padding: var(--space-sm) !important; +} + +.p-4 { + padding: var(--space-md) !important; +} + +.p-5 { + padding: var(--space-xl) !important; +} + +.pt-1 { + padding-top: var(--space-2xs) !important; +} + +.pt-2 { + padding-top: var(--space-xs) !important; +} + +.pt-3 { + padding-top: var(--space-sm) !important; +} + +.pt-4 { + padding-top: var(--space-md) !important; +} + +.pt-5 { + padding-top: var(--space-xl) !important; +} + +.pb-1 { + padding-bottom: var(--space-2xs) !important; +} + +.pb-2 { + padding-bottom: var(--space-xs) !important; +} + +.pb-3 { + padding-bottom: var(--space-sm) !important; +} + +.pb-4 { + padding-bottom: var(--space-md) !important; +} + +.pb-5 { + padding-bottom: var(--space-xl) !important; +} + +.pl-1 { + padding-left: var(--space-2xs) !important; +} + +.pl-2 { + padding-left: var(--space-xs) !important; +} + +.pl-3 { + padding-left: var(--space-sm) !important; +} + +.pl-4 { + padding-left: var(--space-md) !important; +} + +.pl-5 { + padding-left: var(--space-xl) !important; +} + +.pr-1 { + padding-right: var(--space-2xs) !important; +} + +.pr-2 { + padding-right: var(--space-xs) !important; +} + +.pr-3 { + padding-right: var(--space-sm) !important; +} + +.pr-4 { + padding-right: var(--space-md) !important; +} + +.pr-5 { + padding-right: var(--space-xl) !important; +} + +/* Section Styles */ +section { + max-width: 1200px; + margin: 0 auto; + padding: var(--space-3xl, 6rem) var(--space-lg, 2rem); +} + +.justify-content-center { + justify-content: center !important; +} + +.justify-content-between { + justify-content: space-between !important; +} + +.justify-content-around { + justify-content: space-around !important; +} + +.justify-content-end { + justify-content: flex-end !important; +} + +.row { + display: flex; + flex-wrap: wrap; + gap: var(--space-lg, 2rem); +} + +@media (width >= 768px) { + .row { + gap: var(--space-sm, 0.5rem); + } +} +@media (width >= 768px) { + .card-body .row { + gap: 0; + } +} +.button-row { + gap: 1rem; +} + +.no-wrap { + flex-wrap: nowrap; +} + +.d-flex { + display: flex; +} + +.flex-column { + flex-direction: column; +} + +.align-items-center { + align-items: center; +} + +.work-grid { + display: grid; + gap: var(--space-lg, 2rem); + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + margin-bottom: var(--space-lg, 2rem); +} + +.divider { + display: block; + width: 50%; + height: var(--space-md, 1.5rem); + background: var(--accent-coral); + border: var(--border-medium, 4px) outset var(--earth-dark); + margin: 0 auto; +} + +.divider.vertical { + width: var(--space-2xs, 0.25rem); + height: 100%; + background: var(--earth-dark); + border-radius: var(--radius-sm); + border: none !important; + margin: 0; +} + +ul, +ol, +.card-body ul, +.card-body ol, +ul.list, ol.list { + margin-left: var(--space-lg) !important; + padding-left: var(--space-md) !important; +} + +.highlight-block { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; +} + +.header-highlight { + text-align: center; + margin: var(--space-md) auto; + padding: var(--space-md); + width: 100%; +} + +/* Navigation */ +nav { + position: fixed; + top: 2rem; + left: 50%; + transform: translateX(-50%); + z-index: 1000; + background: rgba(245, 241, 232, 0.5); + backdrop-filter: blur(24px); + filter: url("#lensFilter") saturate(120%) brightness(1.15); + border: var(--border-medium, 4px) solid var(--earth-brown); + border-radius: 50px; + padding: var(--space-sm) 2rem; + box-shadow: 0 8px 24px var(--shadow-heavy); +} + +.main-nav { + position: sticky; + top: 2rem; + margin: 0 auto; + width: fit-content; + transform: none !important; + left: 0; + right: 0; +} + +nav ul { + list-style: none; + display: flex; + justify-content: center; + gap: 2rem; + margin-left: 0 !important; + padding-left: 0 !important; +} + +nav a { + text-decoration: none; + color: var(--text-primary); + font-weight: 500; + font-size: 0.95rem; + transition: color 0.3s; + padding: var(--space-2xs) var(--space-xs, 0.5rem); + border-bottom: none; +} + +nav a:hover, +nav a:focus { + color: var(--accent-coral); + outline: var(--border-thin) solid var(--accent-coral); + outline-offset: 2px; +} + +nav a.active { + color: var(--accent-coral); +} + +nav a.sub-page { + outline: var(--border-thin) solid var(--text-secondary); + outline-offset: 2px; +} + +nav a.sub-page:hover { + outline-color: var(--accent-coral); +} + +@media (width <= 768px) { + nav { + top: var(--space-sm, 1rem) !important; + padding: var(--space-xs, 0.5rem) var(--space-sm, 1rem) !important; + margin: 0 auto !important; + } + nav ul { + gap: var(--space-sm, 1rem); + } +} +/* Footer */ +footer { + background: var(--earth-dark); + color: var(--earth-cream); + padding: var(--space-2xl, 3rem) var(--space-xl, 2rem); + margin-top: var(--space-3xl, 6rem); + border-top: var(--border-extra-thick, 8px) solid var(--earth-brown); + box-shadow: 0 -10px 30px var(--shadow); +} + +.footer-content { + max-width: 1200px; + margin: 0 auto; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 3rem; +} + +.footer-section h3 { + font-family: "Playfair Display", serif; + color: var(--accent-coral); + margin-bottom: var(--space-md, 1rem); + font-size: clamp(1.2rem, 2vw, 1.5rem); +} + +.footer-section h4 { + font-family: "Playfair Display", serif; + color: rgba(255, 255, 255, 0.5) !important; + margin-bottom: var(--space-md, 1rem); + font-size: clamp(1.1rem, 1.25vw, 1.125rem); +} + +.footer-section p, +.footer-section li { + color: var(--earth-cream); + line-height: 1.6; + margin-bottom: var(--space-xs, 0.5rem); +} + +.footer-section ul { + list-style: none; + padding: 0; +} + +.footer-section li { + margin-bottom: var(--space-xs, 0.5rem); +} + +.footer-bottom { + text-align: center; + margin-top: var(--space-2xl, 3rem); + padding-top: var(--space-xl, 2rem); + border-top: var(--border-medium, 4px) solid var(--earth-brown); + color: var(--earth-sand); +} + +.footer-bottom p { + margin: 0; + font-size: var(--font-size-sm); + color: var(--earth-cream); +} + +.footer-section a, +.footer-bottom a { + color: var(--earth-cream); + text-decoration: underline; +} + +.footer-section a:hover, +.footer-bottom a:hover { + color: var(--accent-coral); +} + +/* Badge */ +.badge { + display: inline-block; + padding: var(--space-2xs, 0.25rem) var(--space-sm, 0.75rem); + font-size: 0.85rem; + font-weight: 600; + background: var(--earth-sage); + color: var(--earth-cream); + border: var(--border-thin, 2px) solid var(--earth-brown); + border-radius: var(--radius-pill); +} + +.badge-accent { + background: var(--accent-coral-dark); +} + +.badge-outline { + background: transparent; + color: inherit; +} + +.badges, .row-badges { + display: flex; + gap: var(--space-2xs, 0.25rem); + flex-wrap: wrap; +} + +/* Base button styles */ +.btn { + display: inline-block; + padding: var(--space-sm, 0.75rem) var(--space-lg, 1.5rem); + font-family: var(--font-family-sans); + font-size: var(--font-size-md, 1rem); + font-weight: 600; + text-decoration: none; + border-radius: var(--radius-md, 12px); + transition: all 0.2s; + cursor: pointer; + border: none; + text-align: center; +} + +.btn:hover, +.btn:focus { + transform: translate(2px, 2px); + box-shadow: 2px 2px 0 var(--earth-brown); +} + +/* Primary button */ +.btn-primary { + background: var(--accent-coral-dark); + color: var(--white); + border: var(--border-medium, 4px) solid var(--earth-brown); + box-shadow: 4px 4px 0 var(--earth-brown); +} + +.btn-primary:hover, +.btn-primary:focus { + background: var(--accent-coral-dark); + color: var(--white); +} + +/* Secondary button */ +.btn-secondary { + background: var(--earth-cream); + color: var(--text-primary); + border: var(--border-medium, 4px) solid var(--earth-brown); + box-shadow: 4px 4px 0 var(--earth-sage); +} + +.btn-secondary:hover, +.btn-secondary:focus { + background: var(--earth-sand); + color: var(--text-primary); + transform: translate(2px, 2px); + box-shadow: 2px 2px 0 var(--earth-sage); + outline: var(--border-thin) solid var(--earth-dark); +} + +/* Outline button */ +.btn-outline { + background: rgba(255, 255, 255, 0.5) !important; + backdrop-filter: blur(24px); + filter: url("#lensFilter") saturate(120%) brightness(1.15); + color: var(--text-primary) !important; + border: var(--border-medium, 4px) solid var(--earth-brown) !important; + box-shadow: none !important; +} + +.btn-outline:hover, +.btn-outline:focus { + color: var(--earth-cream); + text-decoration: underline; +} + +/* Button sizes */ +.btn-sm { + padding: var(--space-xs, 0.5rem) var(--space-md, 1rem) !important; + font-size: 0.9rem !important; + border-width: var(--border-thin) !important; +} + +.btn-lg { + padding: var(--space-md, 1rem) var(--space-xl, 2rem) !important; + font-size: 1.1rem !important; +} + +/* Skip to main content link */ +.skip-link { + position: absolute; + top: -100px; + left: 0; + background: var(--accent-coral); + color: var(--white); + padding: var(--space-sm, 0.75rem) var(--space-lg, 1.5rem); + text-decoration: none; + font-weight: 600; + border: var(--border-medium, 4px) solid var(--earth-brown); + z-index: 2000; + clip: rect(0, 0, 0, 0); + overflow: hidden; +} + +.skip-link:focus { + top: 1rem; + left: 1rem; + clip: auto; + overflow: visible; +} + +.social-links { + display: flex; + gap: 1rem; + flex-wrap: wrap; +} + +.social-link { + display: inline-block; + padding: var(--space-xs, 0.5rem) var(--space-md, 1rem); + background: var(--earth-sage); + color: var(--white); + text-decoration: none !important; + border: var(--border-medium, 4px) solid var(--earth-sand); + border-radius: 8px; + font-weight: 500; + transition: all 0.3s; + font-size: 0.95rem; +} + +.social-link:hover, +.social-link:focus { + background: var(--accent-coral); + transform: translateY(-2px); + color: var(--white) !important; +} + +/* Base card */ +.card { + background: var(--earth-cream); + border: var(--border-thick, 6px) solid var(--earth-brown); + border-radius: var(--radius-xl, 20px); + padding: var(--space-lg, 1.5rem); + box-shadow: 8px 8px 0 var(--shadow-heavy); + transition: transform 0.3s, box-shadow 0.3s; +} + +.card:hover, +.card:focus-within { + transform: translateY(-5px); + box-shadow: 12px 12px 0 var(--shadow-heavy); +} + +/* Card with layered shadow */ +.card-layered { + background: var(--earth-cream); + border: var(--border-thick, 6px) solid var(--earth-brown); + border-radius: var(--radius-xl, 20px); + padding: var(--space-xl, 2rem); + box-shadow: 12px 12px 0 var(--earth-sage), 12px 12px 0 5px var(--earth-brown); +} + +/* Card with only shadow */ +.card-shadow { + background: var(--earth-cream); + border: none; + border-radius: var(--radius-lg, 16px); + padding: var(--space-md, 1.5rem); + box-shadow: 10px 10px 0 var(--shadow-heavy); +} + +/* Card with accent shadow */ +.card-accent { + background: var(--earth-cream); + border: var(--border-extra-thick, 8px) solid var(--earth-brown); + border-radius: var(--radius-xl, 20px); + overflow: hidden; + box-shadow: 16px 16px 0 var(--accent-coral), 16px 16px 0 6px var(--earth-brown); +} + +/* Simple card (minimal shadow) */ +.card-flex { + display: flex; + flex-direction: column; +} + +.card-flex p { + flex: 1 0; +} + +.card-with-columns .row { + display: flex; + align-items: flex-start; + gap: var(--space-md, 1rem); + align-self: stretch; +} +.card-with-columns .column { + display: flex; + align-items: flex-start; + flex: 1 0 0; + align-self: stretch; +} + +/* Card header */ +.card-header { + margin-bottom: var(--space-md, 1rem); + padding-bottom: var(--space-md, 1rem); + border-bottom: var(--border-thin, 2px) solid var(--earth-sand); +} + +/* Card body */ +.card-body { + margin-bottom: var(--space-md); +} + +.card-body img { + object-fit: cover; + width: 100%; +} + +@media (width >= 768px) { + .img-thumbnail { + max-width: 50%; + } +} +.card-body:last-child { + margin-bottom: 0; +} + +/* Card footer */ +.card-footer { + margin-top: var(--space-md, 1rem); + padding-top: var(--space-md, 1rem); + border-top: var(--border-thin, 2px) solid var(--earth-sand); +} + +.showcase-content { + padding: var(--space-lg, 2rem); +} + +.showcase-content h3 { + font-family: var(--font-family-serif); + font-size: clamp(1.3rem, 2.5vw, 1.8rem); + color: var(--text-primary); + margin-bottom: var(--space-sm, 1rem); +} + +.showcase-content p { + color: var(--text-secondary); + margin-bottom: var(--space-md, 1.5rem); + font-size: clamp(0.95rem, 1.5vw, 1rem); +} + +.showcase-small { + background: var(--earth-sand); + border: 4px solid var(--earth-brown); + border-radius: var(--radius-lg, 16px); + padding: var(--space-md, 1.5rem); + box-shadow: 6px 6px 0 var(--shadow-heavy); + transition: transform 0.3s; +} + +.showcase-small:hover, +.showcase-small:focus-within { + transform: translateY(-4px); +} + +.showcase-small h4 { + font-family: var(--font-family-serif); + font-size: clamp(1.1rem, 2vw, 1.3rem); + color: var(--text-primary); + margin-bottom: var(--space-xs, 0.5rem); +} + +.showcase-small p { + color: var(--text-secondary); + font-size: clamp(0.9rem, 1.5vw, 0.95rem); +} + +/* About Section */ +.about-card { + background: var(--earth-cream); + border: var(--border-thick, 6px) solid var(--earth-brown); + padding: var(--space-2xl, 3rem); + border-radius: var(--border-radius-xl, 20px); + box-shadow: 12px 12px 0 var(--earth-sage), 12px 12px 0 5px var(--earth-brown); + margin: 0 auto; +} + +@media (width <= 768px) { + .about-card { + box-shadow: 6px 6px 0 var(--earth-sage), 6px 6px 0 4px var(--earth-brown); + padding: var(--space-md, 1rem); + } + .about-grid { + grid-template-columns: 1fr !important; + } +} +.about-card p { + font-size: clamp(1rem, 1.5vw, 1.1rem); + line-height: 1.8; + color: var(--text-primary); + margin-bottom: var(--space-lg, 1.5rem); +} + +.about-card p:last-child { + margin-bottom: 0; +} + +.about-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); + gap: var(--space-xl, 2rem); + margin-top: var(--space-xl, 2rem); +} + +.showcase-large { + background: var(--earth-cream); + border: var(--border-thick, 6px) solid var(--earth-brown); + border-radius: var(--radius-xl, 20px); + overflow: hidden; + box-shadow: 12px 12px 0 var(--accent-coral), 12px 12px 0 6px var(--earth-brown); + transition: transform 0.3s; +} + +@media (width <= 768px) { + .showcase-large { + box-shadow: 6px 6px 0 var(--accent-coral), 6px 6px 0 4px var(--earth-brown); + } +} +.showcase-large:hover, +.showcase-large:focus-within { + transform: translateY(-8px); +} + +.showcase-image { + width: 100%; + height: 300px; + background: linear-gradient(135deg, var(--earth-sage) 0%, var(--earth-sand) 100%); + display: flex; + align-items: center; + justify-content: center; + padding: var(--space-md, 1rem); + font-size: var(--font-size-5xl, 3rem); + color: var(--earth-cream); + border-bottom: var(--border-thick, 6px) solid var(--earth-brown); + object-fit: contain; +} + +.showcase-image-dark { + background: linear-gradient(135deg, var(--black) 0%, var(--earth-dark) 100%); +} + +/* Small Projects */ +.small-showcase-cards { + grid-column: 1/-1; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: var(--space-md, 1.5rem); + margin-top: var(--space-sm, 1rem); +} + +/* Callouts */ +.callouts-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 2rem; + margin-top: 2rem; +} + +.callout { + display: flex; + flex-direction: column; + align-items: flex-end; + justify-content: space-between; + background: var(--earth-cream); + border: var(--border-thick, 6px) solid var(--accent-coral-dark); + padding: 2rem; + border-radius: var(--radius-xl, 20px); + box-shadow: 8px 8px 0 var(--shadow-heavy); + position: relative; + transition: transform 0.3s, box-shadow 0.3s; +} + +.callout:hover, +.callout:focus-within { + transform: translateY(-5px); + box-shadow: 12px 12px 0 var(--shadow-heavy); +} + +.callout::before { + content: '"'; + font-family: var(--font-family-serif); + font-size: var(--font-size-6xl, 4rem); + color: var(--accent-coral); + position: absolute; + top: 10px; + left: 20px; + line-height: 1; +} + +.callout-text { + font-style: italic; + margin-bottom: var(--space-md, 1.5rem); + padding-top: var(--space-sm, 1rem); + color: var(--text-primary); +} + +.callout-author { + font-weight: 600; + color: var(--text-primary); + display: block; +} + +.callout-role { + font-size: var(--font-size-sm, 0.9rem); + color: var(--text-secondary); +} + +.card-image { + display: flex; + flex-direction: column; + align-items: flex-start; + background: var(--bg-canvas, #f5f1e8); + border-radius: var(--radius-xl, 20px); + padding: var(--space-lg, 1.5rem); + border: var(--border-medium, 4px) solid var(--border-border, #4a3426); + box-shadow: 6px 6px 0 0 var(--shadow-light, rgba(45, 31, 18, 0.08)); + transition: transform 0.3s, box-shadow 0.3s; +} + +.card-image .image-top { + display: flex; + flex-direction: column; + align-items: flex-start; + align-self: stretch; + border-bottom: var(--border-medium) solid var(--border-brown, #4a3426); + background: var(--bg-canvas, #f5f1e8); + border: var(--border-extra-thick, 8px) solid #000000; + border-radius: var(--radius-lg, 16px); + box-shadow: 0 0 12px var(--shadow-heavy, rgba(45, 31, 18, 0.25)); + margin-bottom: var(--space-xs, 0.5rem); + max-height: 300px; + object-fit: cover; +} + +.card-image .card-content { + display: flex; + flex-direction: column; + align-items: start; + align-self: stretch; + padding: var(--space-md) var(--space-xl) var(--space-xl) var(--space-xl); +} + +.card-image > .card-body { + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: space-between; + height: 100%; +} + +h3.two-line-header { + min-height: 82px; + height: 82px; +} + +/* stylelint-disable */ +.gallery { + --size: 100px; + display: grid; + grid-template-columns: repeat(6, var(--size)); + grid-auto-rows: var(--size); + margin-bottom: var(--size); + place-items: start center; + gap: 5px; +} +.gallery:has(:hover) picture:not(:hover), .gallery:has(:focus) picture:not(:focus) { + filter: brightness(0.5) contrast(0.5); +} +.gallery picture { + object-fit: cover; + width: calc(var(--size) * 2); + height: calc(var(--size) * 2); + clip-path: path("M90,10 C100,0 100,0 110,10 190,90 190,90 190,90 200,100 200,100 190,110 190,110 110,190 110,190 100,200 100,200 90,190 90,190 10,110 10,110 0,100 0,100 10,90Z"); + transition: clip-path 0.25s, filter 0.75s; + grid-column: auto/span 2; + border-radius: 5px; +} +.gallery picture:nth-child(5n-1) { + grid-column: 2/span 2; +} +.gallery picture:hover, .gallery picture:focus { + clip-path: path("M0,0 C0,0 200,0 200,0 200,0 200,100 200,100 200,100 200,200 200,200 200,200 100,200 100,200 100,200 100,200 0,200 0,200 0,100 0,100 0,100 0,100 0,100Z"); + z-index: 1; + transition: clip-path 0.25s, filter 0.25s; +} +.gallery picture:focus { + outline: 1px dashed black; + outline-offset: -5px; +} + +/* Carousel */ +.carousel > input { + width: 1px; + height: 1px; + clip: rect(1px, 1px, 1px, 1px); + clip-path: inset(50%); + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; +} +.carousel > input:nth-of-type(15):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -1400%; +} +.carousel > input:nth-of-type(14):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -1300%; +} +.carousel > input:nth-of-type(13):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -1200%; +} +.carousel > input:nth-of-type(12):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -1100%; +} +.carousel > input:nth-of-type(11):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -1000%; +} +.carousel > input:nth-of-type(10):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -900%; +} +.carousel > input:nth-of-type(9):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -800%; +} +.carousel > input:nth-of-type(8):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -700%; +} +.carousel > input:nth-of-type(7):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -600%; +} +.carousel > input:nth-of-type(6):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -500%; +} +.carousel > input:nth-of-type(5):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -400%; +} +.carousel > input:nth-of-type(4):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -300%; +} +.carousel > input:nth-of-type(3):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -200%; +} +.carousel > input:nth-of-type(2):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: -100%; +} +.carousel > input:nth-of-type(1):checked ~ .carousel__slides .carousel__slide:first-of-type { + margin-left: 0%; +} +.carousel > input:nth-of-type(1):checked ~ .carousel__thumbnails li:nth-of-type(1) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(2):checked ~ .carousel__thumbnails li:nth-of-type(2) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(3):checked ~ .carousel__thumbnails li:nth-of-type(3) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(4):checked ~ .carousel__thumbnails li:nth-of-type(4) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(5):checked ~ .carousel__thumbnails li:nth-of-type(5) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(6):checked ~ .carousel__thumbnails li:nth-of-type(6) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(7):checked ~ .carousel__thumbnails li:nth-of-type(7) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(8):checked ~ .carousel__thumbnails li:nth-of-type(8) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(9):checked ~ .carousel__thumbnails li:nth-of-type(9) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(10):checked ~ .carousel__thumbnails li:nth-of-type(10) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(11):checked ~ .carousel__thumbnails li:nth-of-type(11) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(12):checked ~ .carousel__thumbnails li:nth-of-type(12) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(13):checked ~ .carousel__thumbnails li:nth-of-type(13) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(14):checked ~ .carousel__thumbnails li:nth-of-type(14) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} +.carousel > input:nth-of-type(15):checked ~ .carousel__thumbnails li:nth-of-type(15) { + box-shadow: 0 0 0 5px rgba(0, 0, 255, 0.5); +} + +.carousel__slides { + position: relative; + z-index: 1; + padding: 0; + margin: 0; + overflow: hidden; + white-space: nowrap; + box-sizing: border-box; + display: flex; +} + +.carousel__slide { + position: relative; + display: block; + flex: 1 0 100%; + width: 100%; + height: 100%; + overflow: hidden; + transition: all 300ms ease-out; + vertical-align: top; + box-sizing: border-box; + white-space: normal; +} +.carousel__slide figure { + display: flex; + flex-direction: column; + margin: 0; +} +.carousel__slide div { + position: relative; +} +.carousel__slide div::before { + display: block; + content: ""; + width: 100%; + padding-top: 66.6666666667%; +} +.carousel__slide div > img { + position: absolute; + inset: 0; + width: 100%; + height: 100%; +} +.carousel__slide div { + width: 100%; +} +.carousel__slide img { + display: block; + flex: 1 1 auto; + object-fit: cover; +} +.carousel__slide figcaption { + align-self: center; + padding: 20px 20px 0; + flex: 0 0 auto; + width: 25%; + min-width: 150px; +} +.carousel__slide .credit { + margin-top: 1rem; + color: rgba(0, 0, 0, 0.5); + display: block; +} +.carousel__slide.scrollable { + overflow-y: scroll; +} + +.carousel__thumbnails { + list-style: none; + padding: 0; + display: flex; + margin: 0 -10px; +} +.carousel__slides + .carousel__thumbnails { + margin-top: 20px; +} +.carousel__thumbnails li { + flex: 1 1 auto; + max-width: calc(16.6666666667% - 20px); + margin: 0 10px; + transition: all 300ms ease-in-out; +} +.carousel__thumbnails label { + display: block; + position: relative; +} +.carousel__thumbnails label::before { + display: block; + content: ""; + width: 100%; + padding-top: 100%; +} +.carousel__thumbnails label > img { + position: absolute; + inset: 0; + width: 100%; + height: 100%; +} +.carousel__thumbnails label:hover, .carousel__thumbnails label:focus { + cursor: pointer; +} +.carousel__thumbnails label:hover img, .carousel__thumbnails label:focus img { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); + transition: all 300ms ease-in-out; +} +.carousel__thumbnails img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; +} + +/* stylelint-enable */ +/* stylint-enable */ + +/*# sourceMappingURL=style.css.map */ diff --git a/docs/designs/alm/index.html b/docs/designs/alm/index.html index c7517400..7f94c0b6 100644 --- a/docs/designs/alm/index.html +++ b/docs/designs/alm/index.html @@ -341,16 +341,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -360,9 +360,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/designs/component-library/index.html b/docs/designs/component-library/index.html index 4d470494..39fb33b1 100644 --- a/docs/designs/component-library/index.html +++ b/docs/designs/component-library/index.html @@ -240,16 +240,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -259,9 +259,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/designs/customer-engagement/index.html b/docs/designs/customer-engagement/index.html index 2a2e4fa0..386cffa8 100644 --- a/docs/designs/customer-engagement/index.html +++ b/docs/designs/customer-engagement/index.html @@ -345,16 +345,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -364,9 +364,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/designs/dashboard-analytics/index.html b/docs/designs/dashboard-analytics/index.html index 7aa2b00b..8cfd50b8 100644 --- a/docs/designs/dashboard-analytics/index.html +++ b/docs/designs/dashboard-analytics/index.html @@ -133,16 +133,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -152,9 +152,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/designs/task-it/index.html b/docs/designs/task-it/index.html index 0c2d99b4..174039bb 100644 --- a/docs/designs/task-it/index.html +++ b/docs/designs/task-it/index.html @@ -365,16 +365,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -384,9 +384,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/development/archparser/index.html b/docs/development/archparser/index.html index 580026a7..0f9618f0 100644 --- a/docs/development/archparser/index.html +++ b/docs/development/archparser/index.html @@ -469,16 +469,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -488,9 +488,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/development/code/index.html b/docs/development/code/index.html index dcf3d044..c29f4084 100644 --- a/docs/development/code/index.html +++ b/docs/development/code/index.html @@ -112,16 +112,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -131,9 +131,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/development/examples/index.html b/docs/development/examples/index.html index 373a6d20..769d663d 100644 --- a/docs/development/examples/index.html +++ b/docs/development/examples/index.html @@ -150,16 +150,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -169,9 +169,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/development/index.html b/docs/development/index.html index 89cd5a49..7e144833 100644 --- a/docs/development/index.html +++ b/docs/development/index.html @@ -284,16 +284,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -303,9 +303,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/development/prototypes/index.html b/docs/development/prototypes/index.html index a6128c08..d4aeba57 100644 --- a/docs/development/prototypes/index.html +++ b/docs/development/prototypes/index.html @@ -153,16 +153,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -172,9 +172,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/development/timetracker/index.html b/docs/development/timetracker/index.html index faf0287a..81d87bec 100644 --- a/docs/development/timetracker/index.html +++ b/docs/development/timetracker/index.html @@ -310,16 +310,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -329,9 +329,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/feed.json b/docs/feed.json index ff53c438..4581fb5e 100644 --- a/docs/feed.json +++ b/docs/feed.json @@ -26,6 +26,38 @@ "url": "" }, "items": [ + { + "id": "/credits/open-source/", + "url": "/credits/open-source/", + "title": "Open Source", + "date_published": "2026-05-27T15:59:21Z", + "date": "2026-05-27T15:59:21Z" + } + , + { + "id": "/credits/credits/", + "url": "/credits/credits/", + "title": "Credits", + "date_published": "2026-05-27T15:59:21Z", + "date": "2026-05-27T15:59:21Z" + } + , + { + "id": "/reference/", + "url": "/reference/", + "title": "Reference links", + "date_published": "2026-05-20T11:47:07Z", + "date": "2026-05-20T11:47:07Z" + } + , + { + "id": "/archives/town-selectman.html", + "url": "/archives/town-selectman.html", + "title": "Archived", + "date_published": "2026-05-20T11:47:07Z", + "date": "2026-05-20T11:47:07Z" + } + , { "id": "/portfolio/", "url": "/portfolio/", @@ -50,22 +82,6 @@ "date": "2026-04-08T16:48:47Z" } , - { - "id": "/reference/", - "url": "/reference/", - "title": "Reference links", - "date_published": "2026-04-02T20:03:04Z", - "date": "2026-04-02T20:03:04Z" - } - , - { - "id": "/archives/town-selectman.html", - "url": "/archives/town-selectman.html", - "title": "Archived", - "date_published": "2026-04-02T20:03:04Z", - "date": "2026-04-02T20:03:04Z" - } - , { "id": "/case-studies/soccertracker/", "url": "/case-studies/soccertracker/", @@ -258,14 +274,6 @@ "date": "2025-11-26T17:47:39Z" } , - { - "id": "/credits/", - "url": "/credits/", - "title": "Credits", - "date_published": "2025-11-26T17:47:39Z", - "date": "2025-11-26T17:47:39Z" - } - , { "id": "/about/adam/", "url": "/about/adam/", diff --git a/docs/index.html b/docs/index.html index 2ca87018..a57c59e7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -277,16 +277,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -296,9 +296,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/portfolio/index.html b/docs/portfolio/index.html index 909ebde2..157dd325 100644 --- a/docs/portfolio/index.html +++ b/docs/portfolio/index.html @@ -153,16 +153,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -172,9 +172,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/presentations/color-picker/index.html b/docs/presentations/color-picker/index.html index b1e36bf7..c9eb5a02 100644 --- a/docs/presentations/color-picker/index.html +++ b/docs/presentations/color-picker/index.html @@ -249,16 +249,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -268,9 +268,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/presentations/index.html b/docs/presentations/index.html index 3e0bff5c..7e696eea 100644 --- a/docs/presentations/index.html +++ b/docs/presentations/index.html @@ -140,16 +140,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -159,9 +159,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/presentations/portfolio/index.html b/docs/presentations/portfolio/index.html index 94175fd2..b2fb77f4 100644 --- a/docs/presentations/portfolio/index.html +++ b/docs/presentations/portfolio/index.html @@ -403,16 +403,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -422,9 +422,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/reference/index.html b/docs/reference/index.html index dc91a074..8ef98e17 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -126,16 +126,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -145,9 +145,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index d39639a9..ca5b9d85 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -31,11 +31,6 @@ 2025-11-26T17:47:39.000Z - - https://www.adamjolicoeur.com/credits/ - 2025-11-26T17:47:39.000Z - - https://www.adamjolicoeur.com/designs/dashboard-analytics/ 2025-11-26T17:47:39.000Z @@ -156,39 +151,49 @@ 2026-03-26T18:42:05.000Z + + https://www.adamjolicoeur.com/case-studies/ + 2026-04-08T16:48:47.000Z + + + + https://www.adamjolicoeur.com/case-studies/color-picker/ + 2026-04-08T16:48:47.000Z + + + + https://www.adamjolicoeur.com/portfolio/ + 2026-04-08T16:48:47.000Z + + https://www.adamjolicoeur.com/404.html - 2026-04-02T20:03:04.904Z + 2026-05-20T11:47:07.577Z https://www.adamjolicoeur.com/ - 2026-04-02T20:03:04.904Z + 2026-05-20T11:47:07.765Z https://www.adamjolicoeur.com/archives/town-selectman.html - 2026-04-02T20:03:04.905Z + 2026-05-20T11:47:07.768Z https://www.adamjolicoeur.com/reference/ - 2026-04-02T20:03:04.905Z - - - - https://www.adamjolicoeur.com/case-studies/ - 2026-04-08T16:48:47.000Z + 2026-05-20T11:47:07.770Z - https://www.adamjolicoeur.com/case-studies/color-picker/ - 2026-04-08T16:48:47.000Z + https://www.adamjolicoeur.com/credits/credits/ + 2026-05-27T15:59:21.860Z - https://www.adamjolicoeur.com/portfolio/ - 2026-04-08T16:48:47.000Z + https://www.adamjolicoeur.com/credits/open-source/ + 2026-05-27T15:59:21.862Z diff --git a/docs/sw.js b/docs/sw.js index 942dba1b..a7c46a98 100755 --- a/docs/sw.js +++ b/docs/sw.js @@ -1,4 +1,6 @@ -importScripts('/workbox-v7.4.1/workbox-sw.js'); +importScripts( + 'https://storage.googleapis.com/workbox-cdn/releases/7.3.0/workbox-sw.js' +); // This is your Service Worker, you can put any of your custom Service Worker // code in this file, above the `precacheAndRoute` line. @@ -55,4 +57,4 @@ const updateName = async (event) => { await self.widgets.updateByInstanceId(event.instanceId, payload); } -workbox.precaching.precacheAndRoute([{"revision":"09cb38ed3b7bc2fcbe6ab6c1880c60e3","url":"sitemap.xml"},{"revision":"68b329da9893e34099c7d8ad5cb9c940","url":"robots.txt"},{"revision":"bf1b1eafbf32cd649582c296e3c1e410","url":"keybase.txt"},{"revision":"0f0e992579258c84a1f37d8068bd5d5a","url":"index.html"},{"revision":"b9f35d5aa796c926f5f83735569af340","url":"icon-512.png"},{"revision":"80f557e066b1bf1cf6b4024dc7d8c196","url":"icon-32.png"},{"revision":"9c0c1ba1a9b18361b13951c04d9f0601","url":"icon-192.png"},{"revision":"f86e8f687b00070596c88e22c3cf0d89","url":"icon-180.png"},{"revision":"2a0efdd4e7d1c56fac653dacb258ab94","url":"icon-16.png"},{"revision":"f3c974f5cf7ce654dec9b07bba5e5d29","url":"cache-polyfill.js"},{"revision":"5e770c9f96c102f5ee78d6221ee4bb37","url":"android-launchericon-72-72.png"},{"revision":"6e2fcb738c641cf953675fa6c4a606d6","url":"404.html"},{"revision":"61ae4f9abf0c5eb80e9ca33a2c46c0d9","url":"year-in-review/2025/index.html"},{"revision":"ffc80840c59566d908d161f9f2b3c17e","url":"uses/index.html"},{"revision":"1c0d1313840217819d5744092bcbe5f4","url":"sass/style.css"},{"revision":"669d49df2d6df8154fe2c6387c8931d5","url":"sass/slides.css"},{"revision":"332dfc6843ef01d55b0495da18172305","url":"sass/prism.css"},{"revision":"f6d02b1f173059e19875104e40aced77","url":"sass/print.css"},{"revision":"0474ac8abc69e4049c8aeabcf1ea2a8b","url":"sass/markdown.css"},{"revision":"80e5fcd35709cd44f70acb63949b3547","url":"sass/containers.css"},{"revision":"f4d0ab792af9ab364839225984639f48","url":"reference/index.html"},{"revision":"888352acebaaf546f2842ee2d343c773","url":"presentations/index.html"},{"revision":"9c3d859d92f6e3eac359fab584fd3b09","url":"presentations/portfolio/index.html"},{"revision":"98289d9d81042b51d35db77c28bc93ee","url":"presentations/color-picker/index.html"},{"revision":"1aad3eecd68137ab542f69a45aa13321","url":"portfolio/index.html"},{"revision":"a30818d4fee9c0a2a3e1195ff6cef0ca","url":"js/webawesome.js"},{"revision":"9b48518e883f72c162cbd05bae30f3a0","url":"js/prism.js"},{"revision":"41ce35a0e956bcad7b29c71dd673d5bd","url":"js/jolicoeur.js"},{"revision":"ee48d090cf92a53e8eb8b3077d63b738","url":"js/icon-component.js"},{"revision":"f23c0ee4a5baa7bb7f8e9279b59eb09b","url":"development/index.html"},{"revision":"28418ef22d2704236975668844304510","url":"development/timetracker/index.html"},{"revision":"66f119f450a70e8634323e7ed7932220","url":"development/prototypes/index.html"},{"revision":"b5c664ff4eea5791f8ffb8f7062836fe","url":"development/examples/index.html"},{"revision":"c65cbc2bdc6c9cdca310b050b19e5217","url":"development/code/index.html"},{"revision":"a31387b32d661879f632620d73ab738c","url":"development/archparser/index.html"},{"revision":"06ac5f33e9229aaceaed126e7f2eb1f4","url":"designs/task-it/index.html"},{"revision":"60600583e4895a0cf662f1ec7bd8e45c","url":"designs/dashboard-analytics/index.html"},{"revision":"55ad35442301cc9793a7cbe7fd7f494b","url":"designs/customer-engagement/index.html"},{"revision":"57762f29a57b7122f6cbb69b57e1d433","url":"designs/component-library/index.html"},{"revision":"4eb714659d9457996c9c58ff1fda2957","url":"designs/alm/index.html"},{"revision":"36d02dc46b0dda924e3fcba99370938d","url":"css/style.css"},{"revision":"68f6783bcc9196c54adf8af6c295fa10","url":"css/slides.css"},{"revision":"e9c5a94869f580f0198c64765f703c5f","url":"css/prism.css"},{"revision":"d782446ab6bd034fc4dea0273951b41e","url":"css/print.css"},{"revision":"69dd9693a6a5d88eb603105189028922","url":"css/markdown.css"},{"revision":"39476b5a019b1a52fccc76a1c6495047","url":"css/containers.css"},{"revision":"3160e6ac38cd9e566b99dcf729c7eb5a","url":"credits/index.html"},{"revision":"6eca1c1528abb3532c42c7db053237f0","url":"case-studies/index.html"},{"revision":"a66edf1d86870ec06f1274d721f33e44","url":"case-studies/soccertracker/index.html"},{"revision":"b502ae1526875efb3c406aaff75ce95d","url":"case-studies/color-picker/index.html"},{"revision":"a554edd15479158c1f6fc332554ac5f6","url":"assets/img/timetracker-weekly-report.webp"},{"revision":"5b7c2c048cba923e77dec9b988d1374c","url":"assets/img/timetracker-weekly-report-thumb.webp"},{"revision":"fb7a81d32639c2b6ab48b48e90e591bd","url":"assets/img/timetracker-tone-standup.webp"},{"revision":"8fa00dfde111924a2f80235b53e9d5d5","url":"assets/img/timetracker-tone-standup-thumb.webp"},{"revision":"186617d749caeba721de5e4c2fe80b8b","url":"assets/img/timetracker-tone-retro.webp"},{"revision":"b415eb31a528752e093316ee60b7bd41","url":"assets/img/timetracker-tone-retro-thumb.webp"},{"revision":"0db80338a4503475f311347f1d04bd81","url":"assets/img/timetracker-tone-client.webp"},{"revision":"94c33e1e68c31c2725047f8271d15410","url":"assets/img/timetracker-tone-client-thumb.webp"},{"revision":"1bd4b9ae567252a9e0a14430a4d4ffdb","url":"assets/img/timetracker-start.webp"},{"revision":"d0e7c57d7178ed02d485cf174e11885b","url":"assets/img/timetracker-start-thumb.webp"},{"revision":"c4b5f323d98a3a5631834c98cb2f6e66","url":"assets/img/timetracker-loading-state.webp"},{"revision":"2f319a319aeb5b78f7c273b444c93183","url":"assets/img/timetracker-loading-state-thumb.webp"},{"revision":"16d202459315a8949bd3712fc083a0d2","url":"assets/img/timetracker-loading-state-screen.webp"},{"revision":"7f749352f5788e8d5531c3936b4db0a8","url":"assets/img/timetracker-loading-state-screen-thumb.webp"},{"revision":"66e242f202c124d0125e72afd0604207","url":"assets/img/timetracker-generated-summary.webp"},{"revision":"2fa7960fe260de1712231f8e91e53f86","url":"assets/img/timetracker-generated-summary-thumb.webp"},{"revision":"7a2354bd990f20478981c6f09a529a04","url":"assets/img/thumbnail_RHDM.webp"},{"revision":"47342aff1a249a2e0ebd6725afbb0e02","url":"assets/img/thumbnail_RHDM-thumb.webp"},{"revision":"e911ae355cc243ed420785f5651696a2","url":"assets/img/thumbnail_PatternFly.webp"},{"revision":"74695c97d44769fac58ab96168ceac61","url":"assets/img/thumbnail_PatternFly-thumb.webp"},{"revision":"97958dfa36296de585d2ecd3b49ececa","url":"assets/img/theproxyguy-membership-card-patreon.webp"},{"revision":"1e2cc81056f7bfc062627b62f41ac8d6","url":"assets/img/theproxyguy-membership-card-patreon-thumb.webp"},{"revision":"742457e5f67c034b1521b207ba61dce7","url":"assets/img/taskstat-screenshot-settings.webp"},{"revision":"3363ddffb5099f18c626280e28ad284f","url":"assets/img/taskstat-screenshot-settings-thumb.webp"},{"revision":"836b22b2563cf3aaf4a482da8ab093f6","url":"assets/img/taskstat-screenshot-list.webp"},{"revision":"595d608dfc592687d2bab469bc72f0fa","url":"assets/img/taskstat-screenshot-list-thumb.webp"},{"revision":"69d522ab71e7564c1a9a2e8156c023d5","url":"assets/img/taskstat-screenshot-details.webp"},{"revision":"bd68672fa475f6f2b0337416877f0077","url":"assets/img/taskstat-screenshot-details-thumb.webp"},{"revision":"8ccc64badd6e5d58fdd6e98ac1bc8ca4","url":"assets/img/taskstat-screenshot-dashboard.webp"},{"revision":"feee9cb3200de55412cd90d09d4cc758","url":"assets/img/taskstat-screenshot-dashboard-thumb.webp"},{"revision":"aab85ddf44ffa3e3226fda20f012eec0","url":"assets/img/task-it_user-survey.webp"},{"revision":"5831c18645ae169a7f81f2f8684f3eba","url":"assets/img/task-it_user-survey-thumb.webp"},{"revision":"25b1e84cbe6385caed8a720162dcbbb4","url":"assets/img/task-it_user-states.webp"},{"revision":"90cc88a7ca02603455d35e3b73ef376d","url":"assets/img/task-it_user-states-thumb.webp"},{"revision":"12955eaedbaa4ded12204a07a4ca088e","url":"assets/img/task-it_user-flow.webp"},{"revision":"0cbc1998385fd7c0375cc68eb268fb8f","url":"assets/img/task-it_user-flow-thumb.webp"},{"revision":"f1fc93ce0624c46efa82e8edd442ac6a","url":"assets/img/task-it_task-details_wireframe.webp"},{"revision":"b7626c38be2437a240927c2feb7e1d14","url":"assets/img/task-it_task-details_wireframe-thumb.webp"},{"revision":"97ff6a1f881c0f106c4b45eca3a3f18e","url":"assets/img/task-it_task-details_mockup4.webp"},{"revision":"e9798f70d424a29655c0ec577829eae2","url":"assets/img/task-it_task-details_mockup4-thumb.webp"},{"revision":"e83acfeb83e57f1fceefb1b0b6ea7389","url":"assets/img/task-it_task-details_mockup3.webp"},{"revision":"0edb4e930a93395291b7a7d074b9e05d","url":"assets/img/task-it_task-details_mockup3-thumb.webp"},{"revision":"cdb7226d2bfe4832c23bb783559cb162","url":"assets/img/task-it_task-details_mockup2.webp"},{"revision":"97d3fde7c23c4a7cfc6fd9b4ee21fe4f","url":"assets/img/task-it_task-details_mockup2-thumb.webp"},{"revision":"b728f2cc6553d903f704ff37f5ebd45c","url":"assets/img/task-it_task-details_mockup1.webp"},{"revision":"ce3835098ca55aae0c99f2d212bbee75","url":"assets/img/task-it_task-details_mockup1-thumb.webp"},{"revision":"54df988b366f417aee52ca54d81bf473","url":"assets/img/task-it_product.webp"},{"revision":"2788e0046c3a081e22211da021589c70","url":"assets/img/task-it_product-thumb.webp"},{"revision":"06d9bd55302bfdd80073d802c42be242","url":"assets/img/task-it_intro.webp"},{"revision":"459407b7b5a0c8943c16c4eb3bb6a028","url":"assets/img/task-it_intro-thumb.webp"},{"revision":"25f0caf6a27b65ecce597b98d1a5109f","url":"assets/img/task-it_flow-success.webp"},{"revision":"38091038a3c886f6b9f80bc75940ce7c","url":"assets/img/task-it_flow-success-thumb.webp"},{"revision":"fd5ee4dcd504bb92110c34dd175d6aa8","url":"assets/img/task-it_flow-errors-general.webp"},{"revision":"ea9f700c458a1c4cdaf4ad4c70671bdd","url":"assets/img/task-it_flow-errors-general-thumb.webp"},{"revision":"c724ef6cd473b10f6e2f00996c6149bf","url":"assets/img/task-it_flow-errors-forms.webp"},{"revision":"9afe61286c92642c72773f6ce3fd8da2","url":"assets/img/task-it_flow-errors-forms-thumb.webp"},{"revision":"ce482c2f227787404d86e8c37f5803e2","url":"assets/img/social_template.webp"},{"revision":"0c98b2cd208d6390a9ad843957098712","url":"assets/img/social_template-thumb.webp"},{"revision":"39cb862b3953c9db7f64c49acfad1e46","url":"assets/img/soccergametracker-substitutionsummary.webp"},{"revision":"24a3bec19ed92ed363528f23701e402c","url":"assets/img/soccergametracker-substitutionsummary-thumb.webp"},{"revision":"1062a8fc9f7233e6136ee84a037f8923","url":"assets/img/soccergametracker-substituteprompt.webp"},{"revision":"7e406b49d2d3143b36a87c92a46d4ffa","url":"assets/img/soccergametracker-substituteprompt-thumb.webp"},{"revision":"093aafb1e94ec1ccb979f679766a0009","url":"assets/img/soccergametracker-startgame.webp"},{"revision":"22b5d1acfa6b7ec0aa1b09f14bf93c12","url":"assets/img/soccergametracker-startgame-thumb.webp"},{"revision":"ea2b8854f559794298c1636af1dd4d7c","url":"assets/img/soccergametracker-secondhalfsummary.webp"},{"revision":"270e4c35b63d882676b82672a5eab885","url":"assets/img/soccergametracker-secondhalfsummary-thumb.webp"},{"revision":"25c8ca9c2bee8dd71ef1e72c19de691e","url":"assets/img/soccergametracker-roster.webp"},{"revision":"408ed6668c1bc9ad201d3a3f2781758f","url":"assets/img/soccergametracker-roster-thumb.webp"},{"revision":"2fa5770b304caf498a5ec92ea5892370","url":"assets/img/soccergametracker-playerstats02.webp"},{"revision":"fd1ace0059ef6838741333ffad80bbed","url":"assets/img/soccergametracker-playerstats02-thumb.webp"},{"revision":"5bef776a1763e1b2a35468d7244bf85b","url":"assets/img/soccergametracker-playerstats01.webp"},{"revision":"f6e2c461686b7bc3967f2db107657bcb","url":"assets/img/soccergametracker-playerstats01-thumb.webp"},{"revision":"0f592694c112a2da0b9294fc1c1e0e3d","url":"assets/img/soccergametracker-phone-summary.webp"},{"revision":"82f4ae2c74a198dfc252164b8b398f3d","url":"assets/img/soccergametracker-phone-summary-thumb.webp"},{"revision":"b192123e7df641faed582dac33dcc15c","url":"assets/img/soccergametracker-phone-subs-03.webp"},{"revision":"c3dce3bbb41f6eab0ef8340129672ea0","url":"assets/img/soccergametracker-phone-subs-03-thumb.webp"},{"revision":"a5e457ebfe9ce6bb43822edd0c78d891","url":"assets/img/soccergametracker-phone-subs-02.webp"},{"revision":"3364ae4674fad6666af387a09b1af08f","url":"assets/img/soccergametracker-phone-subs-02-thumb.webp"},{"revision":"56fcf131f4f797a76871e58484fe84c0","url":"assets/img/soccergametracker-phone-subs-01.webp"},{"revision":"3f38d866ff6075a0480b0c8d81e7c1e8","url":"assets/img/soccergametracker-phone-subs-01-thumb.webp"},{"revision":"d5b8eae6fe93c90dce4149a7945a4961","url":"assets/img/soccergametracker-phone-rosters.webp"},{"revision":"b483fb5a6f3558fa9583b4c1b07f7767","url":"assets/img/soccergametracker-phone-rosters-thumb.webp"},{"revision":"a2717bd9761b76970fff72ba016f027e","url":"assets/img/soccergametracker-phone-newgame.webp"},{"revision":"5c00a07dc4e0613b4c48c684b0a093f1","url":"assets/img/soccergametracker-phone-newgame-thumb.webp"},{"revision":"12feaa0afc8d5983363238a2cbd429dc","url":"assets/img/soccergametracker-phone-livegame.webp"},{"revision":"77ca192ff880f54ed50f5ae97a046e78","url":"assets/img/soccergametracker-phone-livegame-thumb.webp"},{"revision":"40699182f9c81bb8386976d8329d8738","url":"assets/img/soccergametracker-phone-history.webp"},{"revision":"12db7bf6ea3b5f148645b2f932c87c63","url":"assets/img/soccergametracker-phone-history-thumb.webp"},{"revision":"ccc26d62fb6e0df9ebeeb73bc3f15579","url":"assets/img/soccergametracker-phone-history-details.webp"},{"revision":"58cfb8900e6671fb0154ed013cf95e85","url":"assets/img/soccergametracker-phone-history-details-thumb.webp"},{"revision":"f28e5b095d2eb9b265ee54b31d398083","url":"assets/img/soccergametracker-newgame.webp"},{"revision":"122b9610e9b57eaaaa52e1075321e003","url":"assets/img/soccergametracker-newgame-thumb.webp"},{"revision":"d47f758d002e1e05ef66763b2df7de61","url":"assets/img/soccergametracker-history02.webp"},{"revision":"b62eccdf42e39465a1536a81f26aa1fe","url":"assets/img/soccergametracker-history02-thumb.webp"},{"revision":"048799ab588b26da5ff8cfe0c6ebb468","url":"assets/img/soccergametracker-history.webp"},{"revision":"18a00b82f95f6ecfefda45435686c761","url":"assets/img/soccergametracker-history-thumb.webp"},{"revision":"21614ffe3988ed4b5a79f0daf4ee9f9e","url":"assets/img/soccergametracker-halftime.webp"},{"revision":"585f4736958a32fa6ace9565396d0cb8","url":"assets/img/soccergametracker-halftime-thumb.webp"},{"revision":"6f110f50359959a7ed3c032b75aa2aaf","url":"assets/img/soccergametracker-goalassignment.webp"},{"revision":"e5de355ebc7aa7d6ef570322a53b881e","url":"assets/img/soccergametracker-goalassignment-thumb.webp"},{"revision":"aed3dc0e2cf301bbb77daec6a24bd8d2","url":"assets/img/soccergametracker-gamedetails.webp"},{"revision":"cdb8c6f6852a66417d5e6e06052d95d3","url":"assets/img/soccergametracker-gamedetails-thumb.webp"},{"revision":"cb88f26757bb9a7a7b44062bf3dafab4","url":"assets/img/soccergametracker-firsthalfsummary.webp"},{"revision":"f6f5bb02dc1a1ac6e7329b3b0da003d9","url":"assets/img/soccergametracker-firsthalfsummary-thumb.webp"},{"revision":"bd864aad3a649b36516aed3a929a2fff","url":"assets/img/soccergametracker-endgame.webp"},{"revision":"8dce5d6f9384f28cc0b32bea7cd39443","url":"assets/img/soccergametracker-endgame-thumb.webp"},{"revision":"55ccb2c5bf71dc7e72247b77028caed4","url":"assets/img/soccergametracker-addnewplayer.webp"},{"revision":"5d5c29af73e634aa6cce276dd3b19bea","url":"assets/img/soccergametracker-addnewplayer-thumb.webp"},{"revision":"9f8cfe9c2be3b7f730b05635c6c50246","url":"assets/img/soccergametracker- ingamesummary.webp"},{"revision":"682b5f90dc56d88c62ae532788d4b31f","url":"assets/img/soccergametracker- ingamesummary-thumb.webp"},{"revision":"df76a4fc60a02b85fa69c5db1017ae96","url":"assets/img/screenshot-try_openshift.webp"},{"revision":"73a3a039a2c095b12c26d96af2f70b4b","url":"assets/img/screenshot-try_openshift-thumb.webp"},{"revision":"15533d48a081b5b957608fdf4d3fae92","url":"assets/img/screenshot-patternflyorg.webp"},{"revision":"e4dc17adf226adfe1db4a1362c6c6c53","url":"assets/img/screenshot-patternflyorg-thumb.webp"},{"revision":"196d0c092863bad1fff8fcac8c1a124c","url":"assets/img/screenshot-kubevirtio2.webp"},{"revision":"9d89247c1e21c4083db0daa00b7274ff","url":"assets/img/screenshot-kubevirtio2-thumb.webp"},{"revision":"8ad6fd8ff89213ce25f83a7a74c71400","url":"assets/img/screenshot-kubevirtio.webp"},{"revision":"03991435c0de2418b5aa7968a84016cb","url":"assets/img/screenshot-kubevirtio-thumb.webp"},{"revision":"df400a9363d70f03611c7d501010088f","url":"assets/img/screenshot-kubevirtio-mobile.webp"},{"revision":"538604c6ef6f0accd6e54728006b3eb0","url":"assets/img/screenshot-kubevirtio-mobile-thumb.webp"},{"revision":"92fa09a9c79e9267d761be12cc9bbf52","url":"assets/img/rh_integration.webp"},{"revision":"90a27e33062e0d0ae811814da8b996d0","url":"assets/img/rh_integration-thumb.webp"},{"revision":"7570bb5ca79951ef7ef8ba78a5c8371d","url":"assets/img/portfolio8.webp"},{"revision":"6be552369711e2cb858465265f161592","url":"assets/img/portfolio8-thumb.webp"},{"revision":"43336abb4d4a111e13052f45cbcdc1e0","url":"assets/img/portfolio7.webp"},{"revision":"d7bbd36092287ab08c1da094487e02f2","url":"assets/img/portfolio7-thumb.webp"},{"revision":"11c183180cce749fb0069f1964f4c021","url":"assets/img/portfolio6.webp"},{"revision":"49eebfe17360ab09ab97dc886d4c5e1c","url":"assets/img/portfolio6-thumb.webp"},{"revision":"0a30bba10c0abbf914592a105836350c","url":"assets/img/portfolio5.webp"},{"revision":"5f731fe83e2d5789b61e5dd1e79ece49","url":"assets/img/portfolio5-thumb.webp"},{"revision":"32f36e70b31b1834fc8f3a80719a95bd","url":"assets/img/portfolio4.webp"},{"revision":"d1eaaafd7ed0064f8e6c0e31c08955e0","url":"assets/img/portfolio4-thumb.webp"},{"revision":"846ac04a48788cf36d7f6634fa59d333","url":"assets/img/portfolio3.webp"},{"revision":"5eb23594433b04ea12eddc05b77de9fd","url":"assets/img/portfolio3-thumb.webp"},{"revision":"c29889f4fca47323eb4a8e65de22b259","url":"assets/img/portfolio2.webp"},{"revision":"3032bb55a2ec5f0dced98db8cfa0230f","url":"assets/img/portfolio2-thumb.webp"},{"revision":"f5a3d9d03f57a409426499565020a41b","url":"assets/img/portfolio2-5.webp"},{"revision":"8ae0dd2774339b0020f37d6bf0cb7596","url":"assets/img/portfolio2-5-thumb.webp"},{"revision":"f256eded7782da157ed156600772cf26","url":"assets/img/portfolio14.webp"},{"revision":"2b3ffee9232c49c80e863a97387b9d08","url":"assets/img/portfolio14-thumb.webp"},{"revision":"d65d2d81de42e0b82e19cd29a5888192","url":"assets/img/portfolio13.webp"},{"revision":"8bd96dfbdd93125e423128e666c6d55f","url":"assets/img/portfolio13-thumb.webp"},{"revision":"0dfdd429be6efca8877ea059fe3ceebf","url":"assets/img/portfolio12.webp"},{"revision":"425d64886d3880558a250bd1adb8fb33","url":"assets/img/portfolio12-thumb.webp"},{"revision":"11242bfbab21a6a90afa4b71f62bbfaa","url":"assets/img/portfolio11.webp"},{"revision":"e7626db47388099c6af6349026398c79","url":"assets/img/portfolio11-thumb.webp"},{"revision":"0cfbaed59674e72bfb8e6f7b08cdc077","url":"assets/img/portfolio10.webp"},{"revision":"856dada5ecb0b1ad9e8ea713beea4e84","url":"assets/img/portfolio10-thumb.webp"},{"revision":"87464b168510102f4f0d7e14c01bf190","url":"assets/img/portfolio1.webp"},{"revision":"e56e79ee5afcc0df53f5de32ff1ceb09","url":"assets/img/portfolio1-thumb.webp"},{"revision":"7360096b18e7d1f89a66d50672035804","url":"assets/img/portfolio0.webp"},{"revision":"cdf46010a44d19622a4d7333e1425feb","url":"assets/img/portfolio0-thumb.webp"},{"revision":"c9eafc05dc16e232519504f23492efcd","url":"assets/img/navbar-logo.webp"},{"revision":"273e283b319534485caeee039f123415","url":"assets/img/navbar-logo-thumb.webp"},{"revision":"c62b2d43cea163553c271ab6f9a5db9c","url":"assets/img/icon.webp"},{"revision":"1826d4996e96faf5a88566ef91d714f3","url":"assets/img/icon-thumb.webp"},{"revision":"c62b2d43cea163553c271ab6f9a5db9c","url":"assets/img/icon-512.webp"},{"revision":"1826d4996e96faf5a88566ef91d714f3","url":"assets/img/icon-512-thumb.webp"},{"revision":"bce015258f98a4f95fbda457859db7f2","url":"assets/img/icon-32.webp"},{"revision":"4a91b036a202b8e2a29c1b60907bd415","url":"assets/img/icon-32-thumb.webp"},{"revision":"057d98801fc03d65baaea0047c98c74e","url":"assets/img/icon-256.webp"},{"revision":"86956a974ddbcf23e7326cda668be17d","url":"assets/img/icon-256-thumb.webp"},{"revision":"d395e0a1a07948f23ca61f5b77774cc3","url":"assets/img/icon-192.webp"},{"revision":"17a5ab3ee79e102ef81e10163d1d63f5","url":"assets/img/icon-192-thumb.webp"},{"revision":"4ecf764dbb5066aca71d468d90b25322","url":"assets/img/icon-180.webp"},{"revision":"bbf757bf37e52ee21db4bf86eba59f63","url":"assets/img/icon-180-thumb.webp"},{"revision":"9ca53cc308de7c30a70aa23148c6c461","url":"assets/img/icon-16.webp"},{"revision":"c5bedc124e3721ed5d40b4a77ef5026b","url":"assets/img/icon-16-thumb.webp"},{"revision":"3830aee687988a363775107696c6e3d8","url":"assets/img/headshot.webp"},{"revision":"9555b76029dc1f47d8b321cf7881a7ab","url":"assets/img/headshot-thumb.webp"},{"revision":"54b0d648b08b80d09565809d47e647fd","url":"assets/img/headshot-hires.webp"},{"revision":"5f74b985f6f4746fad3394d4710a96c9","url":"assets/img/headshot-hires-thumb.webp"},{"revision":"e50c6ed7d86d6887f70e577ebc961305","url":"assets/img/fabric8-package.webp"},{"revision":"b7e58602dc4ef9bab71ffadf0de0094e","url":"assets/img/fabric8-package-thumb.webp"},{"revision":"ea52c8ad2e516b92a8874e465ef3c7c4","url":"assets/img/dashboard_minimal.webp"},{"revision":"b7ab806c347bc3f6d5df0785b7087982","url":"assets/img/dashboard_minimal-thumb.webp"},{"revision":"6feac75443e59e71a4b4ea977cda9f61","url":"assets/img/curved-lines@2x.webp"},{"revision":"1f025eaa42c982e1adaf0a8e2bf996b0","url":"assets/img/curved-lines@2x-thumb.webp"},{"revision":"17257af0402ee2bb41dc29f5a18d0787","url":"assets/img/colorPicker5.webp"},{"revision":"36e153f7e9f1552a2f7f448af4a9df6c","url":"assets/img/colorPicker5-thumb.webp"},{"revision":"a516b6ecc01a78670d80b5ae8cbc6d82","url":"assets/img/colorPicker4.webp"},{"revision":"311b14b91cc4fb424807f43799fa5e98","url":"assets/img/colorPicker4-thumb.webp"},{"revision":"d5d5e71f0bed2f22f76d717644cfe6fe","url":"assets/img/colorPicker3.webp"},{"revision":"ded1b9058af5a15163d4f828ed962641","url":"assets/img/colorPicker3-thumb.webp"},{"revision":"af0010b14ab44f9d81e41fb5519dd787","url":"assets/img/colorPicker2.webp"},{"revision":"812e791f3d78c54c63b8b16e79cd122c","url":"assets/img/colorPicker2-thumb.webp"},{"revision":"d73e99bab804356c862b9fc340c8d7b2","url":"assets/img/colorPicker1.webp"},{"revision":"72e26e5b794910d93d1dc4406bcc8252","url":"assets/img/colorPicker1-thumb.webp"},{"revision":"dc0e2333709ca7563fce6b742880852f","url":"assets/img/colorPicker0.webp"},{"revision":"22f25a9cb5cbee2e888eeea8456fd93e","url":"assets/img/colorPicker0-thumb.webp"},{"revision":"b9721d6b8b8970fd19a082d95293902d","url":"assets/img/colorPicker-logo.webp"},{"revision":"6a88a0d2651a5fa13908576725f0a1c2","url":"assets/img/colorPicker-logo-thumb.webp"},{"revision":"5141b7c72c2d92e481ca9c21406137ab","url":"assets/img/colorPalette02.webp"},{"revision":"add6199afd9681558b83a618061d94ef","url":"assets/img/colorPalette02-thumb.webp"},{"revision":"1208df405ed7b224278b02f7bac71f27","url":"assets/img/colorPalette01.webp"},{"revision":"cc9039ad86847d5ad2608b61ffb436b6","url":"assets/img/colorPalette01-thumb.webp"},{"revision":"272e426dbe2f4095849f539f4b4caccb","url":"assets/img/colorPalette.webp"},{"revision":"53bd526c030174e75bffbbfd9f6c7429","url":"assets/img/colorPalette-thumb.webp"},{"revision":"1a36fda5b92d2162ccd249dc01540333","url":"assets/img/avatar.webp"},{"revision":"04ab878b9cff127bec70bc1c64f24e7f","url":"assets/img/avatar-thumb.webp"},{"revision":"aac5c008eb12374d6d038ab5c20441e9","url":"assets/img/avatar-hires.webp"},{"revision":"3e1632af753edbeb05bb0410047c74be","url":"assets/img/avatar-hires-thumb.webp"},{"revision":"9eae032d416d302c99878f65df7d594f","url":"assets/img/archparser_template-creator.webp"},{"revision":"13204cd38474962b4fb13a10af6a013e","url":"assets/img/archparser_template-creator-thumb.webp"},{"revision":"1ea67d3d5c578da6c5abf2028b393fc8","url":"assets/img/archparser_template-creator-loaded.webp"},{"revision":"d11eca34c10ee1bfdca30103b6c563e7","url":"assets/img/archparser_template-creator-loaded-thumb.webp"},{"revision":"7e564783ec89e09da2046fdd3ce99084","url":"assets/img/archparser_filtering.webp"},{"revision":"9ceb90661bac1462ef86101efcac0808","url":"assets/img/archparser_filtering-thumb.webp"},{"revision":"e02548efe023d67caa80a4789a01efc7","url":"assets/img/archparser_export.webp"},{"revision":"0a9a26b73ab18cb68335c0e343548a1c","url":"assets/img/archparser_export-thumb.webp"},{"revision":"4ff3335abf2106dd75654774652de72b","url":"assets/img/archparser_drawing-set-details.webp"},{"revision":"e6c52fbe00c9b99c41fdc692e77f1627","url":"assets/img/archparser_drawing-set-details-thumb.webp"},{"revision":"43ca7f394f9194a6001a3ac594c16d3f","url":"assets/img/archparser_drawing-list.webp"},{"revision":"bd4c34bf6604754168110b24c4a398a1","url":"assets/img/archparser_drawing-list-thumb.webp"},{"revision":"78762991b7fd838bd3d561013bdec99a","url":"assets/img/archparser_drawing-details.webp"},{"revision":"260a3a6c2455697acafcf5aef009c0c5","url":"assets/img/archparser_drawing-details-thumb.webp"},{"revision":"0c11fba09203fab86b8142d5ecdc43b1","url":"assets/img/archparser_desktop_2.webp"},{"revision":"c8a58459e1657892552774f2b273c07c","url":"assets/img/archparser_desktop_2-thumb.webp"},{"revision":"90524f3d3c911984e069f21b5a89e935","url":"assets/img/archparser_desktop_1.webp"},{"revision":"c69451a4cf8efa17305eceded4612465","url":"assets/img/archparser_desktop_1-thumb.webp"},{"revision":"c3ed2b9fe36f12e56cf0dba0c00cd7fb","url":"assets/img/archparser_desktop_0.webp"},{"revision":"76d0f03e35e4d482c596f6a56c10ab77","url":"assets/img/archparser_desktop_0-thumb.webp"},{"revision":"67a14ffa594911421af6466d35ca310d","url":"assets/img/archparser_dashboard2.webp"},{"revision":"a2ce7f2e356e3c57abbdd79eb744dc39","url":"assets/img/archparser_dashboard2-thumb.webp"},{"revision":"3552ad539e3f3f3e8b752b1c80fc75b6","url":"assets/img/archparser_dashboard1.webp"},{"revision":"da530adeca400d428a9cd20d8c383c67","url":"assets/img/archparser_dashboard1-thumb.webp"},{"revision":"182d719f704464d1e3355d18e17b5f77","url":"assets/img/android-launchericon-72-72.webp"},{"revision":"5228df6fa1740653cbd301215254610b","url":"assets/img/android-launchericon-72-72-thumb.webp"},{"revision":"c62b2d43cea163553c271ab6f9a5db9c","url":"assets/img/android-launchericon-512-512.webp"},{"revision":"1826d4996e96faf5a88566ef91d714f3","url":"assets/img/android-launchericon-512-512-thumb.webp"},{"revision":"360e0ca76504da1d6cf3f7c00ee2cbb4","url":"assets/img/android-launchericon-48-48.webp"},{"revision":"1dc8986e1d0f058da734f6daf9a2a65e","url":"assets/img/android-launchericon-48-48-thumb.webp"},{"revision":"d395e0a1a07948f23ca61f5b77774cc3","url":"assets/img/android-launchericon-192-192.webp"},{"revision":"17a5ab3ee79e102ef81e10163d1d63f5","url":"assets/img/android-launchericon-192-192-thumb.webp"},{"revision":"d04a09a8d8145ffed14bfbc8a4c00f10","url":"assets/img/ajolicoeur_wordcloud_writing.webp"},{"revision":"4b1a296031a7ec99c02f8488ad957ffe","url":"assets/img/ajolicoeur_wordcloud_writing-thumb.webp"},{"revision":"0abeab5dcff2c3676f46186d4033c252","url":"assets/img/ajolicoeur_wordcloud.webp"},{"revision":"2d696a1f6f69dbcec3ad1e80a3c2d67a","url":"assets/img/ajolicoeur_wordcloud-thumb.webp"},{"revision":"710d860b89cdc83289512b9f16242de5","url":"assets/img/adamj-github.webp"},{"revision":"af5faaa1112edf542cda17e8167d6f13","url":"assets/img/adamj-github-thumb.webp"},{"revision":"319dae8e43de4e95b6f4320cfd9b7099","url":"assets/img/adam-j.webp"},{"revision":"5214446a385513f5e5061d3877f8ede7","url":"assets/img/adam-j-thumb.webp"},{"revision":"2fe50a62ceed5e12399144d9bd73169d","url":"assets/img/Timetrak.webp"},{"revision":"c0e88831e0dbb6e3c46bd0d7c77debee","url":"assets/img/Timetrak-thumb.webp"},{"revision":"3af619d28c891a713ae129bf5eef317b","url":"assets/img/TimeTrackerPro-1920x1080.webp"},{"revision":"e0a9bc110bf0e715d51e28cf9fb0e3ae","url":"assets/img/TimeTrackerPro-1920x1080-thumb.webp"},{"revision":"9f57204931cf30c63a860313571368f0","url":"assets/img/TheMagicCollection-icon-light.webp"},{"revision":"3d875ec2b7b17176fb5c99789a7a50d9","url":"assets/img/TheMagicCollection-icon-light-thumb.webp"},{"revision":"317c66ca0ddfc78dbb653912a7fd93f7","url":"assets/img/TheMagicCollection-icon-dark.webp"},{"revision":"4a60ae9a9f83f273ca065d4c86d2f0e2","url":"assets/img/TheMagicCollection-icon-dark-thumb.webp"},{"revision":"67fa19db9600f3f49138e7a70acd653d","url":"assets/img/TaskStat_Tinted.webp"},{"revision":"b9cb8765b277ee699b533332719a25d9","url":"assets/img/TaskStat_Tinted-thumb.webp"},{"revision":"46aa1797d8ea81b53ae4a60795070a2b","url":"assets/img/TaskStat_Default.webp"},{"revision":"cf654b8a56b590a1d1a766952a957894","url":"assets/img/TaskStat_Default-thumb.webp"},{"revision":"5032c83a01940d912a486c684b90b88f","url":"assets/img/TaskStat_Dark.webp"},{"revision":"084df8edb245ea60c692df90bc1aa069","url":"assets/img/TaskStat_Dark-thumb.webp"},{"revision":"f7bafadf62c4750319b225c342460475","url":"assets/img/TLG2012.webp"},{"revision":"2383cbde9b69ce33de90a8795f5378e4","url":"assets/img/TLG2012-thumb.webp"},{"revision":"6e8f13e5693e4e42fa7ac4c841f11841","url":"assets/img/Storybook-GettingStarted.webp"},{"revision":"fe190c4a545b13c565ba27b7bc1033d4","url":"assets/img/Storybook-GettingStarted-thumb.webp"},{"revision":"c8423d88345b8eeb38a9780740ff290a","url":"assets/img/Sitemap_alpha.webp"},{"revision":"ce4b331615b15f0a3bee3f6165b1856d","url":"assets/img/Sitemap_alpha-thumb.webp"},{"revision":"41ad2368af9a2427a4ca2e53a584c5cb","url":"assets/img/Screenshot_charts.webp"},{"revision":"fcee433e2bb9a1d201e2b4287ae795b9","url":"assets/img/Screenshot_charts-thumb.webp"},{"revision":"3c599b13093c355ecdae68590c33ac26","url":"assets/img/Scouters.webp"},{"revision":"174e6dae382b58aae17472214666ee9a","url":"assets/img/Scouters-thumb.webp"},{"revision":"aad3018b7741d98491b6b58cb2b88feb","url":"assets/img/SC_logo_cloud2.webp"},{"revision":"80ab29e4473a3b5e1bfd0ea9ff028ce9","url":"assets/img/SC_logo_cloud2-thumb.webp"},{"revision":"af13f791c0eb6593d7a24f7f134446ae","url":"assets/img/SC_logo_cloud.webp"},{"revision":"808de57760b15603349620c143b01903","url":"assets/img/SC_logo_cloud-thumb.webp"},{"revision":"cf418139b5fb0dfec2df23eee0cd9c57","url":"assets/img/SC_demo.webp"},{"revision":"fb81145afefc1704a1ff707f27db1b45","url":"assets/img/SC_demo-thumb.webp"},{"revision":"a24864136287441f6d60a118bbc82853","url":"assets/img/RHDManual_Home.webp"},{"revision":"129468c15bb33e0561a378af2f367d62","url":"assets/img/RHDManual_Home-thumb.webp"},{"revision":"0888385eac9865f4dae2fd4c88516b9b","url":"assets/img/RHDManual_DesignResources.webp"},{"revision":"8741f30ea31175a5603a1ed21a45d8c3","url":"assets/img/RHDManual_DesignResources-thumb.webp"},{"revision":"63a99404d9881981fb74666e9d8797db","url":"assets/img/RHDManual_CreateArticles.webp"},{"revision":"78a08d7ff0717df57b429c2550f8a242","url":"assets/img/RHDManual_CreateArticles-thumb.webp"},{"revision":"3e8a5f9a2ddfadfea1733d61d7f5af34","url":"assets/img/OSIO-laptop-screen-1200.webp"},{"revision":"60994a3d98a89b81697b96b8b51f67b8","url":"assets/img/OSIO-laptop-screen-1200-thumb.webp"},{"revision":"010b9e7f2c3fbf86cdb12d349becc003","url":"assets/img/LightColors.webp"},{"revision":"00af04d4efb90e9d68123abd8b404239","url":"assets/img/LightColors-thumb.webp"},{"revision":"5bc91e190efed3ab24e1b269b4f68100","url":"assets/img/Jolicoeur_iOS.webp"},{"revision":"211d68312e3679a4611ad30cf864c814","url":"assets/img/Jolicoeur_iOS-thumb.webp"},{"revision":"df552a9cb2abc9730f37762d625a541d","url":"assets/img/Dashboardwireframe.webp"},{"revision":"8a50dbbf47fcb0a69a1ce425d8a0e302","url":"assets/img/Dashboardwireframe-thumb.webp"},{"revision":"cf3536dfac28462c000debb44c90c6f6","url":"assets/img/DarkColors.webp"},{"revision":"f6ace4955d415d17add752fe3645d979","url":"assets/img/DarkColors-thumb.webp"},{"revision":"4726abae8fe9ba5ead703a4860617959","url":"assets/img/CEA_wireframe_first.webp"},{"revision":"0dd77ece98b33351957899ebaecb84eb","url":"assets/img/CEA_wireframe_first-thumb.webp"},{"revision":"10cff4c88902eb7fb095d560ebe08656","url":"assets/img/CEA_Settings.webp"},{"revision":"3664367535e022b298c8bf6bbdbbffc1","url":"assets/img/CEA_Settings-thumb.webp"},{"revision":"34f0f0d7bc803f3cd6faf6cb0dc39225","url":"assets/img/CEA_Palette.webp"},{"revision":"6b3e5d1ab141c2ad819e377f4821422a","url":"assets/img/CEA_Palette-thumb.webp"},{"revision":"6b3ccbc3f3f413bf62753ac7c969964a","url":"assets/img/CEA_Navigation.webp"},{"revision":"c532e6b816e46658a38b397ba088445e","url":"assets/img/CEA_Navigation-thumb.webp"},{"revision":"aaad0b2d435ade2ec9cda576ea4142d8","url":"assets/img/CEA_Engagement.webp"},{"revision":"66ac4c66baccd03d9fbd0cedfb3b7598","url":"assets/img/CEA_Engagement-thumb.webp"},{"revision":"f0ffeeb9e7b285246b88f5f2ca9df038","url":"assets/img/CEA_Dashboard_fix.webp"},{"revision":"a4b972ec6c684809656744d8dd62d8e6","url":"assets/img/CEA_Dashboard_fix-thumb.webp"},{"revision":"c3f56cedb2cf5394e6fed82e7613caba","url":"assets/img/CEA_Dashboard.webp"},{"revision":"ed6c72c7ad1f6f5671f93ce316511cca","url":"assets/img/CEA_Dashboard-thumb.webp"},{"revision":"02fd80f0cdf881953d8e73fe2d5e4ee5","url":"assets/img/CEA_ClientDetail.webp"},{"revision":"fc473a8e11b5c02479a21fd350be5255","url":"assets/img/CEA_ClientDetail-thumb.webp"},{"revision":"d7cea3ab5ca61c495309fc293962e0c9","url":"assets/img/CEA_AssetExamples.webp"},{"revision":"1aa9dd2de2cebf72313733745e7b05f9","url":"assets/img/CEA_AssetExamples-thumb.webp"},{"revision":"adf60e7d3a0b9f753879631e69029cf3","url":"assets/img/CAS-Typography.webp"},{"revision":"8765be50ca0df38f5848f5279a863257","url":"assets/img/CAS-Typography-thumb.webp"},{"revision":"6d1a3c3096fc4cdcb5b9bd39c391956b","url":"assets/img/CAS-TextInputs.webp"},{"revision":"7d1863ea8aece00e1083c60204591309","url":"assets/img/CAS-TextInputs-thumb.webp"},{"revision":"d94f76e20fc6476dec7a7ef6492a0409","url":"assets/img/CAS-Table-Component.webp"},{"revision":"4550e54dd441bc9ceaf91cf01ad59935","url":"assets/img/CAS-Table-Component-thumb.webp"},{"revision":"bd0e2fd78e0039db0dbf99f42b353b31","url":"assets/img/CAS-SpacingSizing.webp"},{"revision":"215e8c83cf2099d1d23de00dd1d9db86","url":"assets/img/CAS-SpacingSizing-thumb.webp"},{"revision":"418910b5b68d458d75abf85f162912c8","url":"assets/img/CAS-Icons.webp"},{"revision":"0d219367cf5e7c921caaf7df76ec60b6","url":"assets/img/CAS-Icons-thumb.webp"},{"revision":"e6bd2045862159025593e402df49d7a4","url":"assets/img/CAS-Foreground-Light.webp"},{"revision":"666f5e15c3b2f398101ae2ac42269735","url":"assets/img/CAS-Foreground-Light-thumb.webp"},{"revision":"d3f003045df4396221549a4692c0120f","url":"assets/img/CAS-Foreground-Dark.webp"},{"revision":"d2428d176e3acbacb950c7a7c2e79a4e","url":"assets/img/CAS-Foreground-Dark-thumb.webp"},{"revision":"806bb3ad0ca68993cfb31fcac0487245","url":"assets/img/CAS-DropdownExamples.webp"},{"revision":"42f932585fcf01fb57e5cdfeae2ea0eb","url":"assets/img/CAS-DropdownExamples-thumb.webp"},{"revision":"5853e66bb82f46cec1a5e46757760339","url":"assets/img/CAS-ColorPalette.webp"},{"revision":"9f43f6e10dc11bb3a6445b553805b2f9","url":"assets/img/CAS-ColorPalette-thumb.webp"},{"revision":"c62ad87675d9f81b43f31a3b9d38f3a4","url":"assets/img/CAS-Cards.webp"},{"revision":"2c534735535164eb5e61e0e8bcca5031","url":"assets/img/CAS-Cards-thumb.webp"},{"revision":"2ebc94f65e8dc2f0fa431b75748c0833","url":"assets/img/CAS-ButtonExamples.webp"},{"revision":"ac68c3c0a09bc8a3e12d5269d4949f10","url":"assets/img/CAS-ButtonExamples-thumb.webp"},{"revision":"b5063a109a0b597a6208c030cb2de23e","url":"assets/img/AdamJolicoeur_dot_com.webp"},{"revision":"a868bf90f3bbdc3c44c47a8f953e887e","url":"assets/img/AdamJolicoeur_dot_com-thumb.webp"},{"revision":"c27ba3c061ebf387f9a341a86cb4184a","url":"assets/img/AdamJolicoeur_dot_com-minimal.webp"},{"revision":"cf1bc28847a4e7fbe752d2440642a282","url":"assets/img/AdamJolicoeur_dot_com-minimal-thumb.webp"},{"revision":"b71fa97efce4679de124df270f035013","url":"assets/img/ALM_workflow.webp"},{"revision":"755f8c5038a7146767790551bca98bd1","url":"assets/img/ALM_workflow-thumb.webp"},{"revision":"801d46e1fd02938b100bf1ee970a4239","url":"assets/img/ALM_wireframe.webp"},{"revision":"cb2a35fb98857a8d86db346128f72916","url":"assets/img/ALM_wireframe-thumb.webp"},{"revision":"8c9ff5c4b809bbaa3039959ca701a9f8","url":"assets/img/ALM_step3.webp"},{"revision":"b884074bbdb4a23c47fa6a3a427afcf1","url":"assets/img/ALM_step3-thumb.webp"},{"revision":"da1dd79707014450d07779a1ee5882fa","url":"assets/img/ALM_step2.webp"},{"revision":"b5a1d25be3b51c2d4a1dce9595fe53cc","url":"assets/img/ALM_step2-thumb.webp"},{"revision":"c8d4961cb79dd3c742e99bb9554a2b17","url":"assets/img/ALM_step1.webp"},{"revision":"4aefd7692611d52ca7ed593d60e4ad78","url":"assets/img/ALM_step1-thumb.webp"},{"revision":"ea08d9e2896de73786bacf2f2093d735","url":"assets/img/ALM_planner.webp"},{"revision":"e927157eac95fa3d1b5f04751b0217c0","url":"assets/img/ALM_planner-thumb.webp"},{"revision":"9e9ac4c97d57417093cb1ed019282851","url":"assets/img/404_lost_tree.webp"},{"revision":"3017430f1bb7266f7833291cdc19c6ab","url":"assets/img/404_lost_tree-thumb.webp"},{"revision":"20e08660153a3f7e3f0088c579751b51","url":"assets/img/2025-chatgpt-trophy.webp"},{"revision":"9d9db767fa1ebb66ca5d63dbc1089894","url":"assets/img/2025-chatgpt-trophy-thumb.webp"},{"revision":"da91e835ced244ccda3b852cb69a8aee","url":"assets/img/2025-chatgpt-still.webp"},{"revision":"8823c8a692ed160dd06d2e8d2fea9b74","url":"assets/img/2025-chatgpt-still-thumb.webp"},{"revision":"1cb637ff184f8408dd67b1f06709b7f7","url":"assets/img/2025-chatgpt-sticker.webp"},{"revision":"f69254bcd1ee8ffeefb7f561dc908089","url":"assets/img/2025-chatgpt-sticker-thumb.webp"},{"revision":"7d58965881d5c818a7064bd487c52642","url":"assets/img/2025-chatgpt-badges.webp"},{"revision":"498bdcc52d700a5fe56bd0382acd81ef","url":"assets/img/2025-chatgpt-badges-thumb.webp"},{"revision":"732fa5e085f5544809f189be6501f9b3","url":"archives/town-selectman.html"},{"revision":"1368222adf8140a6d97e4b42cc6040ba","url":"archives/index.html"},{"revision":"5e09e307c8c73f087e0650c94d9fbe09","url":"apps/timetracker.html"},{"revision":"ae7866e3faaf15ebd087c1e6a53d6e90","url":"apps/taskstat.html"},{"revision":"66d0cea0a37ea3f01f669838273d42ca","url":"apps/taskstat-privacy.html"},{"revision":"483e65b139826d1f97793e48e1bac1ee","url":"apps/support.html"},{"revision":"9e2d7ee1db0477fa9476d0bdc5e5aad5","url":"apps/soccer.html"},{"revision":"9633401d40f3cf15cc68d6103fc5133e","url":"apps/privacy.html"},{"revision":"6e6a746bbe8374f7722ba0e9333c4088","url":"apps/moonsilver.html"},{"revision":"b8f9a026887898b2df755e7c999f1c67","url":"apps/magiccollection.html"},{"revision":"5b228152aea58765882e01091b83f84b","url":"apps/index.html"},{"revision":"5f5994d35047fb22f1e9f5792e2cd6e5","url":"apps/gamesandthings.html"},{"revision":"59fdeb87a454012fa3ae7f11eca2bec0","url":"about/resume/index.html"},{"revision":"5da44b56a8ac7cf1477bb8b83b3b54ba","url":"about/adam/index.html"}] || []); +workbox.precaching.precacheAndRoute(self.__WB_MANIFEST || []); diff --git a/docs/uses/index.html b/docs/uses/index.html index dc47869d..d8e0fc13 100644 --- a/docs/uses/index.html +++ b/docs/uses/index.html @@ -187,16 +187,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -206,9 +206,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/docs/workbox-v7.4.1/workbox-background-sync.dev.js b/docs/workbox-v7.4.1/workbox-background-sync.dev.js deleted file mode 100644 index 00c1ff03..00000000 --- a/docs/workbox-v7.4.1/workbox-background-sync.dev.js +++ /dev/null @@ -1,1082 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.backgroundSync = (function (exports, WorkboxError_js, logger_js, assert_js, getFriendlyURL_js) { - 'use strict'; - - function _extends() { - return _extends = Object.assign ? Object.assign.bind() : function (n) { - for (var e = 1; e < arguments.length; e++) { - var t = arguments[e]; - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); - } - return n; - }, _extends.apply(null, arguments); - } - - const instanceOfAny = (object, constructors) => constructors.some(c => object instanceof c); - let idbProxyableTypes; - let cursorAdvanceMethods; - // This is a function to prevent it throwing up in node environments. - function getIdbProxyableTypes() { - return idbProxyableTypes || (idbProxyableTypes = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction]); - } - // This is a function to prevent it throwing up in node environments. - function getCursorAdvanceMethods() { - return cursorAdvanceMethods || (cursorAdvanceMethods = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey]); - } - const cursorRequestMap = new WeakMap(); - const transactionDoneMap = new WeakMap(); - const transactionStoreNamesMap = new WeakMap(); - const transformCache = new WeakMap(); - const reverseTransformCache = new WeakMap(); - function promisifyRequest(request) { - const promise = new Promise((resolve, reject) => { - const unlisten = () => { - request.removeEventListener('success', success); - request.removeEventListener('error', error); - }; - const success = () => { - resolve(wrap(request.result)); - unlisten(); - }; - const error = () => { - reject(request.error); - unlisten(); - }; - request.addEventListener('success', success); - request.addEventListener('error', error); - }); - promise.then(value => { - // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval - // (see wrapFunction). - if (value instanceof IDBCursor) { - cursorRequestMap.set(value, request); - } - // Catching to avoid "Uncaught Promise exceptions" - }).catch(() => {}); - // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This - // is because we create many promises from a single IDBRequest. - reverseTransformCache.set(promise, request); - return promise; - } - function cacheDonePromiseForTransaction(tx) { - // Early bail if we've already created a done promise for this transaction. - if (transactionDoneMap.has(tx)) return; - const done = new Promise((resolve, reject) => { - const unlisten = () => { - tx.removeEventListener('complete', complete); - tx.removeEventListener('error', error); - tx.removeEventListener('abort', error); - }; - const complete = () => { - resolve(); - unlisten(); - }; - const error = () => { - reject(tx.error || new DOMException('AbortError', 'AbortError')); - unlisten(); - }; - tx.addEventListener('complete', complete); - tx.addEventListener('error', error); - tx.addEventListener('abort', error); - }); - // Cache it for later retrieval. - transactionDoneMap.set(tx, done); - } - let idbProxyTraps = { - get(target, prop, receiver) { - if (target instanceof IDBTransaction) { - // Special handling for transaction.done. - if (prop === 'done') return transactionDoneMap.get(target); - // Polyfill for objectStoreNames because of Edge. - if (prop === 'objectStoreNames') { - return target.objectStoreNames || transactionStoreNamesMap.get(target); - } - // Make tx.store return the only store in the transaction, or undefined if there are many. - if (prop === 'store') { - return receiver.objectStoreNames[1] ? undefined : receiver.objectStore(receiver.objectStoreNames[0]); - } - } - // Else transform whatever we get back. - return wrap(target[prop]); - }, - set(target, prop, value) { - target[prop] = value; - return true; - }, - has(target, prop) { - if (target instanceof IDBTransaction && (prop === 'done' || prop === 'store')) { - return true; - } - return prop in target; - } - }; - function replaceTraps(callback) { - idbProxyTraps = callback(idbProxyTraps); - } - function wrapFunction(func) { - // Due to expected object equality (which is enforced by the caching in `wrap`), we - // only create one new func per func. - // Edge doesn't support objectStoreNames (booo), so we polyfill it here. - if (func === IDBDatabase.prototype.transaction && !('objectStoreNames' in IDBTransaction.prototype)) { - return function (storeNames, ...args) { - const tx = func.call(unwrap(this), storeNames, ...args); - transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]); - return wrap(tx); - }; - } - // Cursor methods are special, as the behaviour is a little more different to standard IDB. In - // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the - // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense - // with real promises, so each advance methods returns a new promise for the cursor object, or - // undefined if the end of the cursor has been reached. - if (getCursorAdvanceMethods().includes(func)) { - return function (...args) { - // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use - // the original object. - func.apply(unwrap(this), args); - return wrap(cursorRequestMap.get(this)); - }; - } - return function (...args) { - // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use - // the original object. - return wrap(func.apply(unwrap(this), args)); - }; - } - function transformCachableValue(value) { - if (typeof value === 'function') return wrapFunction(value); - // This doesn't return, it just creates a 'done' promise for the transaction, - // which is later returned for transaction.done (see idbObjectHandler). - if (value instanceof IDBTransaction) cacheDonePromiseForTransaction(value); - if (instanceOfAny(value, getIdbProxyableTypes())) return new Proxy(value, idbProxyTraps); - // Return the same value back if we're not going to transform it. - return value; - } - function wrap(value) { - // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because - // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached. - if (value instanceof IDBRequest) return promisifyRequest(value); - // If we've already transformed this value before, reuse the transformed value. - // This is faster, but it also provides object equality. - if (transformCache.has(value)) return transformCache.get(value); - const newValue = transformCachableValue(value); - // Not all types are transformed. - // These may be primitive types, so they can't be WeakMap keys. - if (newValue !== value) { - transformCache.set(value, newValue); - reverseTransformCache.set(newValue, value); - } - return newValue; - } - const unwrap = value => reverseTransformCache.get(value); - - /** - * Open a database. - * - * @param name Name of the database. - * @param version Schema version. - * @param callbacks Additional callbacks. - */ - function openDB(name, version, { - blocked, - upgrade, - blocking, - terminated - } = {}) { - const request = indexedDB.open(name, version); - const openPromise = wrap(request); - if (upgrade) { - request.addEventListener('upgradeneeded', event => { - upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction)); - }); - } - if (blocked) request.addEventListener('blocked', () => blocked()); - openPromise.then(db => { - if (terminated) db.addEventListener('close', () => terminated()); - if (blocking) db.addEventListener('versionchange', () => blocking()); - }).catch(() => {}); - return openPromise; - } - const readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count']; - const writeMethods = ['put', 'add', 'delete', 'clear']; - const cachedMethods = new Map(); - function getMethod(target, prop) { - if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === 'string')) { - return; - } - if (cachedMethods.get(prop)) return cachedMethods.get(prop); - const targetFuncName = prop.replace(/FromIndex$/, ''); - const useIndex = prop !== targetFuncName; - const isWrite = writeMethods.includes(targetFuncName); - if ( - // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge. - !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))) { - return; - } - const method = async function (storeName, ...args) { - // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :( - const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly'); - let target = tx.store; - if (useIndex) target = target.index(args.shift()); - // Must reject if op rejects. - // If it's a write operation, must reject if tx.done rejects. - // Must reject with op rejection first. - // Must resolve with op value. - // Must handle both promises (no unhandled rejections) - return (await Promise.all([target[targetFuncName](...args), isWrite && tx.done]))[0]; - }; - cachedMethods.set(prop, method); - return method; - } - replaceTraps(oldTraps => _extends({}, oldTraps, { - get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver), - has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop) - })); - - // @ts-ignore - try { - self['workbox:background-sync:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2021 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const DB_VERSION = 3; - const DB_NAME = 'workbox-background-sync'; - const REQUEST_OBJECT_STORE_NAME = 'requests'; - const QUEUE_NAME_INDEX = 'queueName'; - /** - * A class to interact directly an IndexedDB created specifically to save and - * retrieve QueueStoreEntries. This class encapsulates all the schema details - * to store the representation of a Queue. - * - * @private - */ - class QueueDb { - constructor() { - this._db = null; - } - /** - * Add QueueStoreEntry to underlying db. - * - * @param {UnidentifiedQueueStoreEntry} entry - */ - async addEntry(entry) { - const db = await this.getDb(); - const tx = db.transaction(REQUEST_OBJECT_STORE_NAME, 'readwrite', { - durability: 'relaxed' - }); - await tx.store.add(entry); - await tx.done; - } - /** - * Returns the first entry id in the ObjectStore. - * - * @return {number | undefined} - */ - async getFirstEntryId() { - const db = await this.getDb(); - const cursor = await db.transaction(REQUEST_OBJECT_STORE_NAME).store.openCursor(); - return cursor === null || cursor === void 0 ? void 0 : cursor.value.id; - } - /** - * Get all the entries filtered by index - * - * @param queueName - * @return {Promise} - */ - async getAllEntriesByQueueName(queueName) { - const db = await this.getDb(); - const results = await db.getAllFromIndex(REQUEST_OBJECT_STORE_NAME, QUEUE_NAME_INDEX, IDBKeyRange.only(queueName)); - return results ? results : new Array(); - } - /** - * Returns the number of entries filtered by index - * - * @param queueName - * @return {Promise} - */ - async getEntryCountByQueueName(queueName) { - const db = await this.getDb(); - return db.countFromIndex(REQUEST_OBJECT_STORE_NAME, QUEUE_NAME_INDEX, IDBKeyRange.only(queueName)); - } - /** - * Deletes a single entry by id. - * - * @param {number} id the id of the entry to be deleted - */ - async deleteEntry(id) { - const db = await this.getDb(); - await db.delete(REQUEST_OBJECT_STORE_NAME, id); - } - /** - * - * @param queueName - * @returns {Promise} - */ - async getFirstEntryByQueueName(queueName) { - return await this.getEndEntryFromIndex(IDBKeyRange.only(queueName), 'next'); - } - /** - * - * @param queueName - * @returns {Promise} - */ - async getLastEntryByQueueName(queueName) { - return await this.getEndEntryFromIndex(IDBKeyRange.only(queueName), 'prev'); - } - /** - * Returns either the first or the last entries, depending on direction. - * Filtered by index. - * - * @param {IDBCursorDirection} direction - * @param {IDBKeyRange} query - * @return {Promise} - * @private - */ - async getEndEntryFromIndex(query, direction) { - const db = await this.getDb(); - const cursor = await db.transaction(REQUEST_OBJECT_STORE_NAME).store.index(QUEUE_NAME_INDEX).openCursor(query, direction); - return cursor === null || cursor === void 0 ? void 0 : cursor.value; - } - /** - * Returns an open connection to the database. - * - * @private - */ - async getDb() { - if (!this._db) { - this._db = await openDB(DB_NAME, DB_VERSION, { - upgrade: this._upgradeDb - }); - } - return this._db; - } - /** - * Upgrades QueueDB - * - * @param {IDBPDatabase} db - * @param {number} oldVersion - * @private - */ - _upgradeDb(db, oldVersion) { - if (oldVersion > 0 && oldVersion < DB_VERSION) { - if (db.objectStoreNames.contains(REQUEST_OBJECT_STORE_NAME)) { - db.deleteObjectStore(REQUEST_OBJECT_STORE_NAME); - } - } - const objStore = db.createObjectStore(REQUEST_OBJECT_STORE_NAME, { - autoIncrement: true, - keyPath: 'id' - }); - objStore.createIndex(QUEUE_NAME_INDEX, QUEUE_NAME_INDEX, { - unique: false - }); - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A class to manage storing requests from a Queue in IndexedDB, - * indexed by their queue name for easier access. - * - * Most developers will not need to access this class directly; - * it is exposed for advanced use cases. - */ - class QueueStore { - /** - * Associates this instance with a Queue instance, so entries added can be - * identified by their queue name. - * - * @param {string} queueName - */ - constructor(queueName) { - this._queueName = queueName; - this._queueDb = new QueueDb(); - } - /** - * Append an entry last in the queue. - * - * @param {Object} entry - * @param {Object} entry.requestData - * @param {number} [entry.timestamp] - * @param {Object} [entry.metadata] - */ - async pushEntry(entry) { - { - assert_js.assert.isType(entry, 'object', { - moduleName: 'workbox-background-sync', - className: 'QueueStore', - funcName: 'pushEntry', - paramName: 'entry' - }); - assert_js.assert.isType(entry.requestData, 'object', { - moduleName: 'workbox-background-sync', - className: 'QueueStore', - funcName: 'pushEntry', - paramName: 'entry.requestData' - }); - } - // Don't specify an ID since one is automatically generated. - delete entry.id; - entry.queueName = this._queueName; - await this._queueDb.addEntry(entry); - } - /** - * Prepend an entry first in the queue. - * - * @param {Object} entry - * @param {Object} entry.requestData - * @param {number} [entry.timestamp] - * @param {Object} [entry.metadata] - */ - async unshiftEntry(entry) { - { - assert_js.assert.isType(entry, 'object', { - moduleName: 'workbox-background-sync', - className: 'QueueStore', - funcName: 'unshiftEntry', - paramName: 'entry' - }); - assert_js.assert.isType(entry.requestData, 'object', { - moduleName: 'workbox-background-sync', - className: 'QueueStore', - funcName: 'unshiftEntry', - paramName: 'entry.requestData' - }); - } - const firstId = await this._queueDb.getFirstEntryId(); - if (firstId) { - // Pick an ID one less than the lowest ID in the object store. - entry.id = firstId - 1; - } else { - // Otherwise let the auto-incrementor assign the ID. - delete entry.id; - } - entry.queueName = this._queueName; - await this._queueDb.addEntry(entry); - } - /** - * Removes and returns the last entry in the queue matching the `queueName`. - * - * @return {Promise} - */ - async popEntry() { - return this._removeEntry(await this._queueDb.getLastEntryByQueueName(this._queueName)); - } - /** - * Removes and returns the first entry in the queue matching the `queueName`. - * - * @return {Promise} - */ - async shiftEntry() { - return this._removeEntry(await this._queueDb.getFirstEntryByQueueName(this._queueName)); - } - /** - * Returns all entries in the store matching the `queueName`. - * - * @param {Object} options See {@link workbox-background-sync.Queue~getAll} - * @return {Promise>} - */ - async getAll() { - return await this._queueDb.getAllEntriesByQueueName(this._queueName); - } - /** - * Returns the number of entries in the store matching the `queueName`. - * - * @param {Object} options See {@link workbox-background-sync.Queue~size} - * @return {Promise} - */ - async size() { - return await this._queueDb.getEntryCountByQueueName(this._queueName); - } - /** - * Deletes the entry for the given ID. - * - * WARNING: this method does not ensure the deleted entry belongs to this - * queue (i.e. matches the `queueName`). But this limitation is acceptable - * as this class is not publicly exposed. An additional check would make - * this method slower than it needs to be. - * - * @param {number} id - */ - async deleteEntry(id) { - await this._queueDb.deleteEntry(id); - } - /** - * Removes and returns the first or last entry in the queue (based on the - * `direction` argument) matching the `queueName`. - * - * @return {Promise} - * @private - */ - async _removeEntry(entry) { - if (entry) { - await this.deleteEntry(entry.id); - } - return entry; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const serializableProperties = ['method', 'referrer', 'referrerPolicy', 'mode', 'credentials', 'cache', 'redirect', 'integrity', 'keepalive']; - /** - * A class to make it easier to serialize and de-serialize requests so they - * can be stored in IndexedDB. - * - * Most developers will not need to access this class directly; - * it is exposed for advanced use cases. - */ - class StorableRequest { - /** - * Converts a Request object to a plain object that can be structured - * cloned or JSON-stringified. - * - * @param {Request} request - * @return {Promise} - */ - static async fromRequest(request) { - const requestData = { - url: request.url, - headers: {} - }; - // Set the body if present. - if (request.method !== 'GET') { - // Use ArrayBuffer to support non-text request bodies. - // NOTE: we can't use Blobs becuse Safari doesn't support storing - // Blobs in IndexedDB in some cases: - // https://github.com/dfahlander/Dexie.js/issues/618#issuecomment-398348457 - requestData.body = await request.clone().arrayBuffer(); - } - // Convert the headers from an iterable to an object. - for (const [key, value] of request.headers.entries()) { - requestData.headers[key] = value; - } - // Add all other serializable request properties - for (const prop of serializableProperties) { - if (request[prop] !== undefined) { - requestData[prop] = request[prop]; - } - } - return new StorableRequest(requestData); - } - /** - * Accepts an object of request data that can be used to construct a - * `Request` but can also be stored in IndexedDB. - * - * @param {Object} requestData An object of request data that includes the - * `url` plus any relevant properties of - * [requestInit]{@link https://fetch.spec.whatwg.org/#requestinit}. - */ - constructor(requestData) { - { - assert_js.assert.isType(requestData, 'object', { - moduleName: 'workbox-background-sync', - className: 'StorableRequest', - funcName: 'constructor', - paramName: 'requestData' - }); - assert_js.assert.isType(requestData.url, 'string', { - moduleName: 'workbox-background-sync', - className: 'StorableRequest', - funcName: 'constructor', - paramName: 'requestData.url' - }); - } - // If the request's mode is `navigate`, convert it to `same-origin` since - // navigation requests can't be constructed via script. - if (requestData['mode'] === 'navigate') { - requestData['mode'] = 'same-origin'; - } - this._requestData = requestData; - } - /** - * Returns a deep clone of the instances `_requestData` object. - * - * @return {Object} - */ - toObject() { - const requestData = Object.assign({}, this._requestData); - requestData.headers = Object.assign({}, this._requestData.headers); - if (requestData.body) { - requestData.body = requestData.body.slice(0); - } - return requestData; - } - /** - * Converts this instance to a Request. - * - * @return {Request} - */ - toRequest() { - return new Request(this._requestData.url, this._requestData); - } - /** - * Creates and returns a deep clone of the instance. - * - * @return {StorableRequest} - */ - clone() { - return new StorableRequest(this.toObject()); - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const TAG_PREFIX = 'workbox-background-sync'; - const MAX_RETENTION_TIME = 60 * 24 * 7; // 7 days in minutes - const queueNames = new Set(); - /** - * Converts a QueueStore entry into the format exposed by Queue. This entails - * converting the request data into a real request and omitting the `id` and - * `queueName` properties. - * - * @param {UnidentifiedQueueStoreEntry} queueStoreEntry - * @return {Queue} - * @private - */ - const convertEntry = queueStoreEntry => { - const queueEntry = { - request: new StorableRequest(queueStoreEntry.requestData).toRequest(), - timestamp: queueStoreEntry.timestamp - }; - if (queueStoreEntry.metadata) { - queueEntry.metadata = queueStoreEntry.metadata; - } - return queueEntry; - }; - /** - * A class to manage storing failed requests in IndexedDB and retrying them - * later. All parts of the storing and replaying process are observable via - * callbacks. - * - * @memberof workbox-background-sync - */ - class Queue { - /** - * Creates an instance of Queue with the given options - * - * @param {string} name The unique name for this queue. This name must be - * unique as it's used to register sync events and store requests - * in IndexedDB specific to this instance. An error will be thrown if - * a duplicate name is detected. - * @param {Object} [options] - * @param {Function} [options.onSync] A function that gets invoked whenever - * the 'sync' event fires. The function is invoked with an object - * containing the `queue` property (referencing this instance), and you - * can use the callback to customize the replay behavior of the queue. - * When not set the `replayRequests()` method is called. - * Note: if the replay fails after a sync event, make sure you throw an - * error, so the browser knows to retry the sync event later. - * @param {number} [options.maxRetentionTime=7 days] The amount of time (in - * minutes) a request may be retried. After this amount of time has - * passed, the request will be deleted from the queue. - * @param {boolean} [options.forceSyncFallback=false] If `true`, instead - * of attempting to use background sync events, always attempt to replay - * queued request at service worker startup. Most folks will not need - * this, unless you explicitly target a runtime like Electron that - * exposes the interfaces for background sync, but does not have a working - * implementation. - */ - constructor(name, { - forceSyncFallback, - onSync, - maxRetentionTime - } = {}) { - this._syncInProgress = false; - this._requestsAddedDuringSync = false; - // Ensure the store name is not already being used - if (queueNames.has(name)) { - throw new WorkboxError_js.WorkboxError('duplicate-queue-name', { - name - }); - } else { - queueNames.add(name); - } - this._name = name; - this._onSync = onSync || this.replayRequests; - this._maxRetentionTime = maxRetentionTime || MAX_RETENTION_TIME; - this._forceSyncFallback = Boolean(forceSyncFallback); - this._queueStore = new QueueStore(this._name); - this._addSyncListener(); - } - /** - * @return {string} - */ - get name() { - return this._name; - } - /** - * Stores the passed request in IndexedDB (with its timestamp and any - * metadata) at the end of the queue. - * - * @param {QueueEntry} entry - * @param {Request} entry.request The request to store in the queue. - * @param {Object} [entry.metadata] Any metadata you want associated with the - * stored request. When requests are replayed you'll have access to this - * metadata object in case you need to modify the request beforehand. - * @param {number} [entry.timestamp] The timestamp (Epoch time in - * milliseconds) when the request was first added to the queue. This is - * used along with `maxRetentionTime` to remove outdated requests. In - * general you don't need to set this value, as it's automatically set - * for you (defaulting to `Date.now()`), but you can update it if you - * don't want particular requests to expire. - */ - async pushRequest(entry) { - { - assert_js.assert.isType(entry, 'object', { - moduleName: 'workbox-background-sync', - className: 'Queue', - funcName: 'pushRequest', - paramName: 'entry' - }); - assert_js.assert.isInstance(entry.request, Request, { - moduleName: 'workbox-background-sync', - className: 'Queue', - funcName: 'pushRequest', - paramName: 'entry.request' - }); - } - await this._addRequest(entry, 'push'); - } - /** - * Stores the passed request in IndexedDB (with its timestamp and any - * metadata) at the beginning of the queue. - * - * @param {QueueEntry} entry - * @param {Request} entry.request The request to store in the queue. - * @param {Object} [entry.metadata] Any metadata you want associated with the - * stored request. When requests are replayed you'll have access to this - * metadata object in case you need to modify the request beforehand. - * @param {number} [entry.timestamp] The timestamp (Epoch time in - * milliseconds) when the request was first added to the queue. This is - * used along with `maxRetentionTime` to remove outdated requests. In - * general you don't need to set this value, as it's automatically set - * for you (defaulting to `Date.now()`), but you can update it if you - * don't want particular requests to expire. - */ - async unshiftRequest(entry) { - { - assert_js.assert.isType(entry, 'object', { - moduleName: 'workbox-background-sync', - className: 'Queue', - funcName: 'unshiftRequest', - paramName: 'entry' - }); - assert_js.assert.isInstance(entry.request, Request, { - moduleName: 'workbox-background-sync', - className: 'Queue', - funcName: 'unshiftRequest', - paramName: 'entry.request' - }); - } - await this._addRequest(entry, 'unshift'); - } - /** - * Removes and returns the last request in the queue (along with its - * timestamp and any metadata). The returned object takes the form: - * `{request, timestamp, metadata}`. - * - * @return {Promise} - */ - async popRequest() { - return this._removeRequest('pop'); - } - /** - * Removes and returns the first request in the queue (along with its - * timestamp and any metadata). The returned object takes the form: - * `{request, timestamp, metadata}`. - * - * @return {Promise} - */ - async shiftRequest() { - return this._removeRequest('shift'); - } - /** - * Returns all the entries that have not expired (per `maxRetentionTime`). - * Any expired entries are removed from the queue. - * - * @return {Promise>} - */ - async getAll() { - const allEntries = await this._queueStore.getAll(); - const now = Date.now(); - const unexpiredEntries = []; - for (const entry of allEntries) { - // Ignore requests older than maxRetentionTime. Call this function - // recursively until an unexpired request is found. - const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000; - if (now - entry.timestamp > maxRetentionTimeInMs) { - await this._queueStore.deleteEntry(entry.id); - } else { - unexpiredEntries.push(convertEntry(entry)); - } - } - return unexpiredEntries; - } - /** - * Returns the number of entries present in the queue. - * Note that expired entries (per `maxRetentionTime`) are also included in this count. - * - * @return {Promise} - */ - async size() { - return await this._queueStore.size(); - } - /** - * Adds the entry to the QueueStore and registers for a sync event. - * - * @param {Object} entry - * @param {Request} entry.request - * @param {Object} [entry.metadata] - * @param {number} [entry.timestamp=Date.now()] - * @param {string} operation ('push' or 'unshift') - * @private - */ - async _addRequest({ - request, - metadata, - timestamp = Date.now() - }, operation) { - const storableRequest = await StorableRequest.fromRequest(request.clone()); - const entry = { - requestData: storableRequest.toObject(), - timestamp - }; - // Only include metadata if it's present. - if (metadata) { - entry.metadata = metadata; - } - switch (operation) { - case 'push': - await this._queueStore.pushEntry(entry); - break; - case 'unshift': - await this._queueStore.unshiftEntry(entry); - break; - } - { - logger_js.logger.log(`Request for '${getFriendlyURL_js.getFriendlyURL(request.url)}' has ` + `been added to background sync queue '${this._name}'.`); - } - // Don't register for a sync if we're in the middle of a sync. Instead, - // we wait until the sync is complete and call register if - // `this._requestsAddedDuringSync` is true. - if (this._syncInProgress) { - this._requestsAddedDuringSync = true; - } else { - await this.registerSync(); - } - } - /** - * Removes and returns the first or last (depending on `operation`) entry - * from the QueueStore that's not older than the `maxRetentionTime`. - * - * @param {string} operation ('pop' or 'shift') - * @return {Object|undefined} - * @private - */ - async _removeRequest(operation) { - const now = Date.now(); - let entry; - switch (operation) { - case 'pop': - entry = await this._queueStore.popEntry(); - break; - case 'shift': - entry = await this._queueStore.shiftEntry(); - break; - } - if (entry) { - // Ignore requests older than maxRetentionTime. Call this function - // recursively until an unexpired request is found. - const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000; - if (now - entry.timestamp > maxRetentionTimeInMs) { - return this._removeRequest(operation); - } - return convertEntry(entry); - } else { - return undefined; - } - } - /** - * Loops through each request in the queue and attempts to re-fetch it. - * If any request fails to re-fetch, it's put back in the same position in - * the queue (which registers a retry for the next sync event). - */ - async replayRequests() { - let entry; - while (entry = await this.shiftRequest()) { - try { - await fetch(entry.request.clone()); - if ("dev" !== 'production') { - logger_js.logger.log(`Request for '${getFriendlyURL_js.getFriendlyURL(entry.request.url)}' ` + `has been replayed in queue '${this._name}'`); - } - } catch (error) { - await this.unshiftRequest(entry); - { - logger_js.logger.log(`Request for '${getFriendlyURL_js.getFriendlyURL(entry.request.url)}' ` + `failed to replay, putting it back in queue '${this._name}'`); - } - throw new WorkboxError_js.WorkboxError('queue-replay-failed', { - name: this._name - }); - } - } - { - logger_js.logger.log(`All requests in queue '${this.name}' have successfully ` + `replayed; the queue is now empty!`); - } - } - /** - * Registers a sync event with a tag unique to this instance. - */ - async registerSync() { - // See https://github.com/GoogleChrome/workbox/issues/2393 - if ('sync' in self.registration && !this._forceSyncFallback) { - try { - await self.registration.sync.register(`${TAG_PREFIX}:${this._name}`); - } catch (err) { - // This means the registration failed for some reason, possibly due to - // the user disabling it. - { - logger_js.logger.warn(`Unable to register sync event for '${this._name}'.`, err); - } - } - } - } - /** - * In sync-supporting browsers, this adds a listener for the sync event. - * In non-sync-supporting browsers, or if _forceSyncFallback is true, this - * will retry the queue on service worker startup. - * - * @private - */ - _addSyncListener() { - // See https://github.com/GoogleChrome/workbox/issues/2393 - if ('sync' in self.registration && !this._forceSyncFallback) { - self.addEventListener('sync', event => { - if (event.tag === `${TAG_PREFIX}:${this._name}`) { - { - logger_js.logger.log(`Background sync for tag '${event.tag}' ` + `has been received`); - } - const syncComplete = async () => { - this._syncInProgress = true; - let syncError; - try { - await this._onSync({ - queue: this - }); - } catch (error) { - if (error instanceof Error) { - syncError = error; - // Rethrow the error. Note: the logic in the finally clause - // will run before this gets rethrown. - throw syncError; - } - } finally { - // New items may have been added to the queue during the sync, - // so we need to register for a new sync if that's happened... - // Unless there was an error during the sync, in which - // case the browser will automatically retry later, as long - // as `event.lastChance` is not true. - if (this._requestsAddedDuringSync && !(syncError && !event.lastChance)) { - await this.registerSync(); - } - this._syncInProgress = false; - this._requestsAddedDuringSync = false; - } - }; - event.waitUntil(syncComplete()); - } - }); - } else { - { - logger_js.logger.log(`Background sync replaying without background sync event`); - } - // If the browser doesn't support background sync, or the developer has - // opted-in to not using it, retry every time the service worker starts up - // as a fallback. - void this._onSync({ - queue: this - }); - } - } - /** - * Returns the set of queue names. This is primarily used to reset the list - * of queue names in tests. - * - * @return {Set} - * - * @private - */ - static get _queueNames() { - return queueNames; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A class implementing the `fetchDidFail` lifecycle callback. This makes it - * easier to add failed requests to a background sync Queue. - * - * @memberof workbox-background-sync - */ - class BackgroundSyncPlugin { - /** - * @param {string} name See the {@link workbox-background-sync.Queue} - * documentation for parameter details. - * @param {Object} [options] See the - * {@link workbox-background-sync.Queue} documentation for - * parameter details. - */ - constructor(name, options) { - /** - * @param {Object} options - * @param {Request} options.request - * @private - */ - this.fetchDidFail = async ({ - request - }) => { - await this._queue.pushRequest({ - request - }); - }; - this._queue = new Queue(name, options); - } - } - - exports.BackgroundSyncPlugin = BackgroundSyncPlugin; - exports.Queue = Queue; - exports.QueueStore = QueueStore; - exports.StorableRequest = StorableRequest; - - return exports; - -})({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private); -//# sourceMappingURL=workbox-background-sync.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-background-sync.dev.js.map b/docs/workbox-v7.4.1/workbox-background-sync.dev.js.map deleted file mode 100644 index f05b35c4..00000000 --- a/docs/workbox-v7.4.1/workbox-background-sync.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-background-sync.dev.js","sources":["../node_modules/idb/build/wrap-idb-value.js","../node_modules/idb/build/index.js","../_version.js","../lib/QueueDb.js","../lib/QueueStore.js","../lib/StorableRequest.js","../Queue.js","../BackgroundSyncPlugin.js"],"sourcesContent":["const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction));\n });\n }\n if (blocked)\n request.addEventListener('blocked', () => blocked());\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking)\n db.addEventListener('versionchange', () => blocking());\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked)\n request.addEventListener('blocked', () => blocked());\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:background-sync:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2021 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { openDB } from 'idb';\nimport '../_version.js';\nconst DB_VERSION = 3;\nconst DB_NAME = 'workbox-background-sync';\nconst REQUEST_OBJECT_STORE_NAME = 'requests';\nconst QUEUE_NAME_INDEX = 'queueName';\n/**\n * A class to interact directly an IndexedDB created specifically to save and\n * retrieve QueueStoreEntries. This class encapsulates all the schema details\n * to store the representation of a Queue.\n *\n * @private\n */\nexport class QueueDb {\n constructor() {\n this._db = null;\n }\n /**\n * Add QueueStoreEntry to underlying db.\n *\n * @param {UnidentifiedQueueStoreEntry} entry\n */\n async addEntry(entry) {\n const db = await this.getDb();\n const tx = db.transaction(REQUEST_OBJECT_STORE_NAME, 'readwrite', {\n durability: 'relaxed',\n });\n await tx.store.add(entry);\n await tx.done;\n }\n /**\n * Returns the first entry id in the ObjectStore.\n *\n * @return {number | undefined}\n */\n async getFirstEntryId() {\n const db = await this.getDb();\n const cursor = await db\n .transaction(REQUEST_OBJECT_STORE_NAME)\n .store.openCursor();\n return cursor === null || cursor === void 0 ? void 0 : cursor.value.id;\n }\n /**\n * Get all the entries filtered by index\n *\n * @param queueName\n * @return {Promise}\n */\n async getAllEntriesByQueueName(queueName) {\n const db = await this.getDb();\n const results = await db.getAllFromIndex(REQUEST_OBJECT_STORE_NAME, QUEUE_NAME_INDEX, IDBKeyRange.only(queueName));\n return results ? results : new Array();\n }\n /**\n * Returns the number of entries filtered by index\n *\n * @param queueName\n * @return {Promise}\n */\n async getEntryCountByQueueName(queueName) {\n const db = await this.getDb();\n return db.countFromIndex(REQUEST_OBJECT_STORE_NAME, QUEUE_NAME_INDEX, IDBKeyRange.only(queueName));\n }\n /**\n * Deletes a single entry by id.\n *\n * @param {number} id the id of the entry to be deleted\n */\n async deleteEntry(id) {\n const db = await this.getDb();\n await db.delete(REQUEST_OBJECT_STORE_NAME, id);\n }\n /**\n *\n * @param queueName\n * @returns {Promise}\n */\n async getFirstEntryByQueueName(queueName) {\n return await this.getEndEntryFromIndex(IDBKeyRange.only(queueName), 'next');\n }\n /**\n *\n * @param queueName\n * @returns {Promise}\n */\n async getLastEntryByQueueName(queueName) {\n return await this.getEndEntryFromIndex(IDBKeyRange.only(queueName), 'prev');\n }\n /**\n * Returns either the first or the last entries, depending on direction.\n * Filtered by index.\n *\n * @param {IDBCursorDirection} direction\n * @param {IDBKeyRange} query\n * @return {Promise}\n * @private\n */\n async getEndEntryFromIndex(query, direction) {\n const db = await this.getDb();\n const cursor = await db\n .transaction(REQUEST_OBJECT_STORE_NAME)\n .store.index(QUEUE_NAME_INDEX)\n .openCursor(query, direction);\n return cursor === null || cursor === void 0 ? void 0 : cursor.value;\n }\n /**\n * Returns an open connection to the database.\n *\n * @private\n */\n async getDb() {\n if (!this._db) {\n this._db = await openDB(DB_NAME, DB_VERSION, {\n upgrade: this._upgradeDb,\n });\n }\n return this._db;\n }\n /**\n * Upgrades QueueDB\n *\n * @param {IDBPDatabase} db\n * @param {number} oldVersion\n * @private\n */\n _upgradeDb(db, oldVersion) {\n if (oldVersion > 0 && oldVersion < DB_VERSION) {\n if (db.objectStoreNames.contains(REQUEST_OBJECT_STORE_NAME)) {\n db.deleteObjectStore(REQUEST_OBJECT_STORE_NAME);\n }\n }\n const objStore = db.createObjectStore(REQUEST_OBJECT_STORE_NAME, {\n autoIncrement: true,\n keyPath: 'id',\n });\n objStore.createIndex(QUEUE_NAME_INDEX, QUEUE_NAME_INDEX, { unique: false });\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { QueueDb, } from './QueueDb.js';\nimport '../_version.js';\n/**\n * A class to manage storing requests from a Queue in IndexedDB,\n * indexed by their queue name for easier access.\n *\n * Most developers will not need to access this class directly;\n * it is exposed for advanced use cases.\n */\nexport class QueueStore {\n /**\n * Associates this instance with a Queue instance, so entries added can be\n * identified by their queue name.\n *\n * @param {string} queueName\n */\n constructor(queueName) {\n this._queueName = queueName;\n this._queueDb = new QueueDb();\n }\n /**\n * Append an entry last in the queue.\n *\n * @param {Object} entry\n * @param {Object} entry.requestData\n * @param {number} [entry.timestamp]\n * @param {Object} [entry.metadata]\n */\n async pushEntry(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'pushEntry',\n paramName: 'entry',\n });\n assert.isType(entry.requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'pushEntry',\n paramName: 'entry.requestData',\n });\n }\n // Don't specify an ID since one is automatically generated.\n delete entry.id;\n entry.queueName = this._queueName;\n await this._queueDb.addEntry(entry);\n }\n /**\n * Prepend an entry first in the queue.\n *\n * @param {Object} entry\n * @param {Object} entry.requestData\n * @param {number} [entry.timestamp]\n * @param {Object} [entry.metadata]\n */\n async unshiftEntry(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'unshiftEntry',\n paramName: 'entry',\n });\n assert.isType(entry.requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'unshiftEntry',\n paramName: 'entry.requestData',\n });\n }\n const firstId = await this._queueDb.getFirstEntryId();\n if (firstId) {\n // Pick an ID one less than the lowest ID in the object store.\n entry.id = firstId - 1;\n }\n else {\n // Otherwise let the auto-incrementor assign the ID.\n delete entry.id;\n }\n entry.queueName = this._queueName;\n await this._queueDb.addEntry(entry);\n }\n /**\n * Removes and returns the last entry in the queue matching the `queueName`.\n *\n * @return {Promise}\n */\n async popEntry() {\n return this._removeEntry(await this._queueDb.getLastEntryByQueueName(this._queueName));\n }\n /**\n * Removes and returns the first entry in the queue matching the `queueName`.\n *\n * @return {Promise}\n */\n async shiftEntry() {\n return this._removeEntry(await this._queueDb.getFirstEntryByQueueName(this._queueName));\n }\n /**\n * Returns all entries in the store matching the `queueName`.\n *\n * @param {Object} options See {@link workbox-background-sync.Queue~getAll}\n * @return {Promise>}\n */\n async getAll() {\n return await this._queueDb.getAllEntriesByQueueName(this._queueName);\n }\n /**\n * Returns the number of entries in the store matching the `queueName`.\n *\n * @param {Object} options See {@link workbox-background-sync.Queue~size}\n * @return {Promise}\n */\n async size() {\n return await this._queueDb.getEntryCountByQueueName(this._queueName);\n }\n /**\n * Deletes the entry for the given ID.\n *\n * WARNING: this method does not ensure the deleted entry belongs to this\n * queue (i.e. matches the `queueName`). But this limitation is acceptable\n * as this class is not publicly exposed. An additional check would make\n * this method slower than it needs to be.\n *\n * @param {number} id\n */\n async deleteEntry(id) {\n await this._queueDb.deleteEntry(id);\n }\n /**\n * Removes and returns the first or last entry in the queue (based on the\n * `direction` argument) matching the `queueName`.\n *\n * @return {Promise}\n * @private\n */\n async _removeEntry(entry) {\n if (entry) {\n await this.deleteEntry(entry.id);\n }\n return entry;\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\nconst serializableProperties = [\n 'method',\n 'referrer',\n 'referrerPolicy',\n 'mode',\n 'credentials',\n 'cache',\n 'redirect',\n 'integrity',\n 'keepalive',\n];\n/**\n * A class to make it easier to serialize and de-serialize requests so they\n * can be stored in IndexedDB.\n *\n * Most developers will not need to access this class directly;\n * it is exposed for advanced use cases.\n */\nclass StorableRequest {\n /**\n * Converts a Request object to a plain object that can be structured\n * cloned or JSON-stringified.\n *\n * @param {Request} request\n * @return {Promise}\n */\n static async fromRequest(request) {\n const requestData = {\n url: request.url,\n headers: {},\n };\n // Set the body if present.\n if (request.method !== 'GET') {\n // Use ArrayBuffer to support non-text request bodies.\n // NOTE: we can't use Blobs becuse Safari doesn't support storing\n // Blobs in IndexedDB in some cases:\n // https://github.com/dfahlander/Dexie.js/issues/618#issuecomment-398348457\n requestData.body = await request.clone().arrayBuffer();\n }\n // Convert the headers from an iterable to an object.\n for (const [key, value] of request.headers.entries()) {\n requestData.headers[key] = value;\n }\n // Add all other serializable request properties\n for (const prop of serializableProperties) {\n if (request[prop] !== undefined) {\n requestData[prop] = request[prop];\n }\n }\n return new StorableRequest(requestData);\n }\n /**\n * Accepts an object of request data that can be used to construct a\n * `Request` but can also be stored in IndexedDB.\n *\n * @param {Object} requestData An object of request data that includes the\n * `url` plus any relevant properties of\n * [requestInit]{@link https://fetch.spec.whatwg.org/#requestinit}.\n */\n constructor(requestData) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'StorableRequest',\n funcName: 'constructor',\n paramName: 'requestData',\n });\n assert.isType(requestData.url, 'string', {\n moduleName: 'workbox-background-sync',\n className: 'StorableRequest',\n funcName: 'constructor',\n paramName: 'requestData.url',\n });\n }\n // If the request's mode is `navigate`, convert it to `same-origin` since\n // navigation requests can't be constructed via script.\n if (requestData['mode'] === 'navigate') {\n requestData['mode'] = 'same-origin';\n }\n this._requestData = requestData;\n }\n /**\n * Returns a deep clone of the instances `_requestData` object.\n *\n * @return {Object}\n */\n toObject() {\n const requestData = Object.assign({}, this._requestData);\n requestData.headers = Object.assign({}, this._requestData.headers);\n if (requestData.body) {\n requestData.body = requestData.body.slice(0);\n }\n return requestData;\n }\n /**\n * Converts this instance to a Request.\n *\n * @return {Request}\n */\n toRequest() {\n return new Request(this._requestData.url, this._requestData);\n }\n /**\n * Creates and returns a deep clone of the instance.\n *\n * @return {StorableRequest}\n */\n clone() {\n return new StorableRequest(this.toObject());\n }\n}\nexport { StorableRequest };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { QueueStore } from './lib/QueueStore.js';\nimport { StorableRequest } from './lib/StorableRequest.js';\nimport './_version.js';\nconst TAG_PREFIX = 'workbox-background-sync';\nconst MAX_RETENTION_TIME = 60 * 24 * 7; // 7 days in minutes\nconst queueNames = new Set();\n/**\n * Converts a QueueStore entry into the format exposed by Queue. This entails\n * converting the request data into a real request and omitting the `id` and\n * `queueName` properties.\n *\n * @param {UnidentifiedQueueStoreEntry} queueStoreEntry\n * @return {Queue}\n * @private\n */\nconst convertEntry = (queueStoreEntry) => {\n const queueEntry = {\n request: new StorableRequest(queueStoreEntry.requestData).toRequest(),\n timestamp: queueStoreEntry.timestamp,\n };\n if (queueStoreEntry.metadata) {\n queueEntry.metadata = queueStoreEntry.metadata;\n }\n return queueEntry;\n};\n/**\n * A class to manage storing failed requests in IndexedDB and retrying them\n * later. All parts of the storing and replaying process are observable via\n * callbacks.\n *\n * @memberof workbox-background-sync\n */\nclass Queue {\n /**\n * Creates an instance of Queue with the given options\n *\n * @param {string} name The unique name for this queue. This name must be\n * unique as it's used to register sync events and store requests\n * in IndexedDB specific to this instance. An error will be thrown if\n * a duplicate name is detected.\n * @param {Object} [options]\n * @param {Function} [options.onSync] A function that gets invoked whenever\n * the 'sync' event fires. The function is invoked with an object\n * containing the `queue` property (referencing this instance), and you\n * can use the callback to customize the replay behavior of the queue.\n * When not set the `replayRequests()` method is called.\n * Note: if the replay fails after a sync event, make sure you throw an\n * error, so the browser knows to retry the sync event later.\n * @param {number} [options.maxRetentionTime=7 days] The amount of time (in\n * minutes) a request may be retried. After this amount of time has\n * passed, the request will be deleted from the queue.\n * @param {boolean} [options.forceSyncFallback=false] If `true`, instead\n * of attempting to use background sync events, always attempt to replay\n * queued request at service worker startup. Most folks will not need\n * this, unless you explicitly target a runtime like Electron that\n * exposes the interfaces for background sync, but does not have a working\n * implementation.\n */\n constructor(name, { forceSyncFallback, onSync, maxRetentionTime } = {}) {\n this._syncInProgress = false;\n this._requestsAddedDuringSync = false;\n // Ensure the store name is not already being used\n if (queueNames.has(name)) {\n throw new WorkboxError('duplicate-queue-name', { name });\n }\n else {\n queueNames.add(name);\n }\n this._name = name;\n this._onSync = onSync || this.replayRequests;\n this._maxRetentionTime = maxRetentionTime || MAX_RETENTION_TIME;\n this._forceSyncFallback = Boolean(forceSyncFallback);\n this._queueStore = new QueueStore(this._name);\n this._addSyncListener();\n }\n /**\n * @return {string}\n */\n get name() {\n return this._name;\n }\n /**\n * Stores the passed request in IndexedDB (with its timestamp and any\n * metadata) at the end of the queue.\n *\n * @param {QueueEntry} entry\n * @param {Request} entry.request The request to store in the queue.\n * @param {Object} [entry.metadata] Any metadata you want associated with the\n * stored request. When requests are replayed you'll have access to this\n * metadata object in case you need to modify the request beforehand.\n * @param {number} [entry.timestamp] The timestamp (Epoch time in\n * milliseconds) when the request was first added to the queue. This is\n * used along with `maxRetentionTime` to remove outdated requests. In\n * general you don't need to set this value, as it's automatically set\n * for you (defaulting to `Date.now()`), but you can update it if you\n * don't want particular requests to expire.\n */\n async pushRequest(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'pushRequest',\n paramName: 'entry',\n });\n assert.isInstance(entry.request, Request, {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'pushRequest',\n paramName: 'entry.request',\n });\n }\n await this._addRequest(entry, 'push');\n }\n /**\n * Stores the passed request in IndexedDB (with its timestamp and any\n * metadata) at the beginning of the queue.\n *\n * @param {QueueEntry} entry\n * @param {Request} entry.request The request to store in the queue.\n * @param {Object} [entry.metadata] Any metadata you want associated with the\n * stored request. When requests are replayed you'll have access to this\n * metadata object in case you need to modify the request beforehand.\n * @param {number} [entry.timestamp] The timestamp (Epoch time in\n * milliseconds) when the request was first added to the queue. This is\n * used along with `maxRetentionTime` to remove outdated requests. In\n * general you don't need to set this value, as it's automatically set\n * for you (defaulting to `Date.now()`), but you can update it if you\n * don't want particular requests to expire.\n */\n async unshiftRequest(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'unshiftRequest',\n paramName: 'entry',\n });\n assert.isInstance(entry.request, Request, {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'unshiftRequest',\n paramName: 'entry.request',\n });\n }\n await this._addRequest(entry, 'unshift');\n }\n /**\n * Removes and returns the last request in the queue (along with its\n * timestamp and any metadata). The returned object takes the form:\n * `{request, timestamp, metadata}`.\n *\n * @return {Promise}\n */\n async popRequest() {\n return this._removeRequest('pop');\n }\n /**\n * Removes and returns the first request in the queue (along with its\n * timestamp and any metadata). The returned object takes the form:\n * `{request, timestamp, metadata}`.\n *\n * @return {Promise}\n */\n async shiftRequest() {\n return this._removeRequest('shift');\n }\n /**\n * Returns all the entries that have not expired (per `maxRetentionTime`).\n * Any expired entries are removed from the queue.\n *\n * @return {Promise>}\n */\n async getAll() {\n const allEntries = await this._queueStore.getAll();\n const now = Date.now();\n const unexpiredEntries = [];\n for (const entry of allEntries) {\n // Ignore requests older than maxRetentionTime. Call this function\n // recursively until an unexpired request is found.\n const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000;\n if (now - entry.timestamp > maxRetentionTimeInMs) {\n await this._queueStore.deleteEntry(entry.id);\n }\n else {\n unexpiredEntries.push(convertEntry(entry));\n }\n }\n return unexpiredEntries;\n }\n /**\n * Returns the number of entries present in the queue.\n * Note that expired entries (per `maxRetentionTime`) are also included in this count.\n *\n * @return {Promise}\n */\n async size() {\n return await this._queueStore.size();\n }\n /**\n * Adds the entry to the QueueStore and registers for a sync event.\n *\n * @param {Object} entry\n * @param {Request} entry.request\n * @param {Object} [entry.metadata]\n * @param {number} [entry.timestamp=Date.now()]\n * @param {string} operation ('push' or 'unshift')\n * @private\n */\n async _addRequest({ request, metadata, timestamp = Date.now() }, operation) {\n const storableRequest = await StorableRequest.fromRequest(request.clone());\n const entry = {\n requestData: storableRequest.toObject(),\n timestamp,\n };\n // Only include metadata if it's present.\n if (metadata) {\n entry.metadata = metadata;\n }\n switch (operation) {\n case 'push':\n await this._queueStore.pushEntry(entry);\n break;\n case 'unshift':\n await this._queueStore.unshiftEntry(entry);\n break;\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(request.url)}' has ` +\n `been added to background sync queue '${this._name}'.`);\n }\n // Don't register for a sync if we're in the middle of a sync. Instead,\n // we wait until the sync is complete and call register if\n // `this._requestsAddedDuringSync` is true.\n if (this._syncInProgress) {\n this._requestsAddedDuringSync = true;\n }\n else {\n await this.registerSync();\n }\n }\n /**\n * Removes and returns the first or last (depending on `operation`) entry\n * from the QueueStore that's not older than the `maxRetentionTime`.\n *\n * @param {string} operation ('pop' or 'shift')\n * @return {Object|undefined}\n * @private\n */\n async _removeRequest(operation) {\n const now = Date.now();\n let entry;\n switch (operation) {\n case 'pop':\n entry = await this._queueStore.popEntry();\n break;\n case 'shift':\n entry = await this._queueStore.shiftEntry();\n break;\n }\n if (entry) {\n // Ignore requests older than maxRetentionTime. Call this function\n // recursively until an unexpired request is found.\n const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000;\n if (now - entry.timestamp > maxRetentionTimeInMs) {\n return this._removeRequest(operation);\n }\n return convertEntry(entry);\n }\n else {\n return undefined;\n }\n }\n /**\n * Loops through each request in the queue and attempts to re-fetch it.\n * If any request fails to re-fetch, it's put back in the same position in\n * the queue (which registers a retry for the next sync event).\n */\n async replayRequests() {\n let entry;\n while ((entry = await this.shiftRequest())) {\n try {\n await fetch(entry.request.clone());\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(entry.request.url)}' ` +\n `has been replayed in queue '${this._name}'`);\n }\n }\n catch (error) {\n await this.unshiftRequest(entry);\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(entry.request.url)}' ` +\n `failed to replay, putting it back in queue '${this._name}'`);\n }\n throw new WorkboxError('queue-replay-failed', { name: this._name });\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`All requests in queue '${this.name}' have successfully ` +\n `replayed; the queue is now empty!`);\n }\n }\n /**\n * Registers a sync event with a tag unique to this instance.\n */\n async registerSync() {\n // See https://github.com/GoogleChrome/workbox/issues/2393\n if ('sync' in self.registration && !this._forceSyncFallback) {\n try {\n await self.registration.sync.register(`${TAG_PREFIX}:${this._name}`);\n }\n catch (err) {\n // This means the registration failed for some reason, possibly due to\n // the user disabling it.\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to register sync event for '${this._name}'.`, err);\n }\n }\n }\n }\n /**\n * In sync-supporting browsers, this adds a listener for the sync event.\n * In non-sync-supporting browsers, or if _forceSyncFallback is true, this\n * will retry the queue on service worker startup.\n *\n * @private\n */\n _addSyncListener() {\n // See https://github.com/GoogleChrome/workbox/issues/2393\n if ('sync' in self.registration && !this._forceSyncFallback) {\n self.addEventListener('sync', (event) => {\n if (event.tag === `${TAG_PREFIX}:${this._name}`) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Background sync for tag '${event.tag}' ` + `has been received`);\n }\n const syncComplete = async () => {\n this._syncInProgress = true;\n let syncError;\n try {\n await this._onSync({ queue: this });\n }\n catch (error) {\n if (error instanceof Error) {\n syncError = error;\n // Rethrow the error. Note: the logic in the finally clause\n // will run before this gets rethrown.\n throw syncError;\n }\n }\n finally {\n // New items may have been added to the queue during the sync,\n // so we need to register for a new sync if that's happened...\n // Unless there was an error during the sync, in which\n // case the browser will automatically retry later, as long\n // as `event.lastChance` is not true.\n if (this._requestsAddedDuringSync &&\n !(syncError && !event.lastChance)) {\n await this.registerSync();\n }\n this._syncInProgress = false;\n this._requestsAddedDuringSync = false;\n }\n };\n event.waitUntil(syncComplete());\n }\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Background sync replaying without background sync event`);\n }\n // If the browser doesn't support background sync, or the developer has\n // opted-in to not using it, retry every time the service worker starts up\n // as a fallback.\n void this._onSync({ queue: this });\n }\n }\n /**\n * Returns the set of queue names. This is primarily used to reset the list\n * of queue names in tests.\n *\n * @return {Set}\n *\n * @private\n */\n static get _queueNames() {\n return queueNames;\n }\n}\nexport { Queue };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Queue } from './Queue.js';\nimport './_version.js';\n/**\n * A class implementing the `fetchDidFail` lifecycle callback. This makes it\n * easier to add failed requests to a background sync Queue.\n *\n * @memberof workbox-background-sync\n */\nclass BackgroundSyncPlugin {\n /**\n * @param {string} name See the {@link workbox-background-sync.Queue}\n * documentation for parameter details.\n * @param {Object} [options] See the\n * {@link workbox-background-sync.Queue} documentation for\n * parameter details.\n */\n constructor(name, options) {\n /**\n * @param {Object} options\n * @param {Request} options.request\n * @private\n */\n this.fetchDidFail = async ({ request }) => {\n await this._queue.pushRequest({ request });\n };\n this._queue = new Queue(name, options);\n }\n}\nexport { BackgroundSyncPlugin };\n"],"names":["instanceOfAny","object","constructors","some","c","idbProxyableTypes","cursorAdvanceMethods","getIdbProxyableTypes","IDBDatabase","IDBObjectStore","IDBIndex","IDBCursor","IDBTransaction","getCursorAdvanceMethods","prototype","advance","continue","continuePrimaryKey","cursorRequestMap","WeakMap","transactionDoneMap","transactionStoreNamesMap","transformCache","reverseTransformCache","promisifyRequest","request","promise","Promise","resolve","reject","unlisten","removeEventListener","success","error","wrap","result","addEventListener","then","value","set","catch","cacheDonePromiseForTransaction","tx","has","done","complete","DOMException","idbProxyTraps","get","target","prop","receiver","objectStoreNames","undefined","objectStore","replaceTraps","callback","wrapFunction","func","transaction","storeNames","args","call","unwrap","sort","includes","apply","transformCachableValue","Proxy","IDBRequest","newValue","openDB","name","version","blocked","upgrade","blocking","terminated","indexedDB","open","openPromise","event","oldVersion","newVersion","db","readMethods","writeMethods","cachedMethods","Map","getMethod","targetFuncName","replace","useIndex","isWrite","method","storeName","store","index","shift","all","oldTraps","_extends","self","_","e","DB_VERSION","DB_NAME","REQUEST_OBJECT_STORE_NAME","QUEUE_NAME_INDEX","QueueDb","constructor","_db","addEntry","entry","getDb","durability","add","getFirstEntryId","cursor","openCursor","id","getAllEntriesByQueueName","queueName","results","getAllFromIndex","IDBKeyRange","only","Array","getEntryCountByQueueName","countFromIndex","deleteEntry","delete","getFirstEntryByQueueName","getEndEntryFromIndex","getLastEntryByQueueName","query","direction","_upgradeDb","contains","deleteObjectStore","objStore","createObjectStore","autoIncrement","keyPath","createIndex","unique","QueueStore","_queueName","_queueDb","pushEntry","assert","isType","moduleName","className","funcName","paramName","requestData","unshiftEntry","firstId","popEntry","_removeEntry","shiftEntry","getAll","size","serializableProperties","StorableRequest","fromRequest","url","headers","body","clone","arrayBuffer","key","entries","_requestData","toObject","Object","assign","slice","toRequest","Request","TAG_PREFIX","MAX_RETENTION_TIME","queueNames","Set","convertEntry","queueStoreEntry","queueEntry","timestamp","metadata","Queue","forceSyncFallback","onSync","maxRetentionTime","_syncInProgress","_requestsAddedDuringSync","WorkboxError","_name","_onSync","replayRequests","_maxRetentionTime","_forceSyncFallback","Boolean","_queueStore","_addSyncListener","pushRequest","isInstance","_addRequest","unshiftRequest","popRequest","_removeRequest","shiftRequest","allEntries","now","Date","unexpiredEntries","maxRetentionTimeInMs","push","operation","storableRequest","logger","log","getFriendlyURL","registerSync","fetch","process","registration","sync","register","err","warn","tag","syncComplete","syncError","queue","Error","lastChance","waitUntil","_queueNames","BackgroundSyncPlugin","options","fetchDidFail","_queue"],"mappings":";;;;;;;;;;;;;;EAAA,MAAMA,aAAa,GAAGA,CAACC,MAAM,EAAEC,YAAY,KAAKA,YAAY,CAACC,IAAI,CAAEC,CAAC,IAAKH,MAAM,YAAYG,CAAC,CAAC;EAE7F,IAAIC,iBAAiB;EACrB,IAAIC,oBAAoB;EACxB;EACA,SAASC,oBAAoBA,GAAG;EAC5B,EAAA,OAAQF,iBAAiB,KACpBA,iBAAiB,GAAG,CACjBG,WAAW,EACXC,cAAc,EACdC,QAAQ,EACRC,SAAS,EACTC,cAAc,CACjB,CAAC;EACV;EACA;EACA,SAASC,uBAAuBA,GAAG;IAC/B,OAAQP,oBAAoB,KACvBA,oBAAoB,GAAG,CACpBK,SAAS,CAACG,SAAS,CAACC,OAAO,EAC3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;MACQ,IAAI,CAACC,YAAY,GAAG,OAAO;EAAExN,MAAAA;EAAQ,KAAC,KAAK;EACvC,MAAA,MAAM,IAAI,CAACyN,MAAM,CAACrC,WAAW,CAAC;EAAEpL,QAAAA;EAAQ,OAAC,CAAC;MAC9C,CAAC;MACD,IAAI,CAACyN,MAAM,GAAG,IAAIpD,KAAK,CAACtH,IAAI,EAAEwK,OAAO,CAAC;EAC1C,EAAA;EACJ;;;;;;;;;;;;;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-background-sync.prod.js b/docs/workbox-v7.4.1/workbox-background-sync.prod.js deleted file mode 100644 index 894723f1..00000000 --- a/docs/workbox-v7.4.1/workbox-background-sync.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.backgroundSync=function(t,e,s,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;ee.some((e=>t instanceof e));let i,c;const o=new WeakMap,u=new WeakMap,h=new WeakMap,y=new WeakMap,w=new WeakMap;let f={get(t,e,s){if(t instanceof IDBTransaction){if("done"===e)return u.get(t);if("objectStoreNames"===e)return t.objectStoreNames||h.get(t);if("store"===e)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return m(t[e])},set:(t,e,s)=>(t[e]=s,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function l(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(c||(c=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(p(this),e),m(o.get(this))}:function(...e){return m(t.apply(p(this),e))}:function(e,...s){const n=t.call(p(this),e,...s);return h.set(n,e.sort?e.sort():[e]),m(n)}}function d(t){return"function"==typeof t?l(t):(t instanceof IDBTransaction&&function(t){if(u.has(t))return;const e=new Promise(((e,s)=>{const n=()=>{t.removeEventListener("complete",r),t.removeEventListener("error",a),t.removeEventListener("abort",a)},r=()=>{e(),n()},a=()=>{s(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",r),t.addEventListener("error",a),t.addEventListener("abort",a)}));u.set(t,e)}(t),a(t,i||(i=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(t,f):t)}function m(t){if(t instanceof IDBRequest)return function(t){const e=new Promise(((e,s)=>{const n=()=>{t.removeEventListener("success",r),t.removeEventListener("error",a)},r=()=>{e(m(t.result)),n()},a=()=>{s(t.error),n()};t.addEventListener("success",r),t.addEventListener("error",a)}));return e.then((e=>{e instanceof IDBCursor&&o.set(e,t)})).catch((()=>{})),w.set(e,t),e}(t);if(y.has(t))return y.get(t);const e=d(t);return e!==t&&(y.set(t,e),w.set(e,t)),e}const p=t=>w.get(t);const g=["get","getKey","getAll","getAllKeys","count"],D=["put","add","delete","clear"],b=new Map;function B(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(b.get(e))return b.get(e);const s=e.replace(/FromIndex$/,""),n=e!==s,r=D.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!r&&!g.includes(s))return;const a=async function(t,...e){const a=this.transaction(t,r?"readwrite":"readonly");let i=a.store;return n&&(i=i.index(e.shift())),(await Promise.all([i[s](...e),r&&a.done]))[0]};return b.set(e,a),a}f=(t=>r({},t,{get:(e,s,n)=>B(e,s)||t.get(e,s,n),has:(e,s)=>!!B(e,s)||t.has(e,s)}))(f);try{self["workbox:background-sync:7.4.0"]&&_()}catch(t){}const I="requests",q="queueName";class k{constructor(){this.A=null}async addEntry(t){const e=(await this.getDb()).transaction(I,"readwrite",{durability:"relaxed"});await e.store.add(t),await e.done}async getFirstEntryId(){const t=await this.getDb(),e=await t.transaction(I).store.openCursor();return null==e?void 0:e.value.id}async getAllEntriesByQueueName(t){const e=await this.getDb(),s=await e.getAllFromIndex(I,q,IDBKeyRange.only(t));return s||new Array}async getEntryCountByQueueName(t){return(await this.getDb()).countFromIndex(I,q,IDBKeyRange.only(t))}async deleteEntry(t){const e=await this.getDb();await e.delete(I,t)}async getFirstEntryByQueueName(t){return await this.getEndEntryFromIndex(IDBKeyRange.only(t),"next")}async getLastEntryByQueueName(t){return await this.getEndEntryFromIndex(IDBKeyRange.only(t),"prev")}async getEndEntryFromIndex(t,e){const s=await this.getDb(),n=await s.transaction(I).store.index(q).openCursor(t,e);return null==n?void 0:n.value}async getDb(){return this.A||(this.A=await function(t,e,{blocked:s,upgrade:n,blocking:r,terminated:a}={}){const i=indexedDB.open(t,e),c=m(i);return n&&i.addEventListener("upgradeneeded",(t=>{n(m(i.result),t.oldVersion,t.newVersion,m(i.transaction))})),s&&i.addEventListener("blocked",(()=>s())),c.then((t=>{a&&t.addEventListener("close",(()=>a())),r&&t.addEventListener("versionchange",(()=>r()))})).catch((()=>{})),c}("workbox-background-sync",3,{upgrade:this.J})),this.A}J(t,e){e>0&&e<3&&t.objectStoreNames.contains(I)&&t.deleteObjectStore(I);t.createObjectStore(I,{autoIncrement:!0,keyPath:"id"}).createIndex(q,q,{unique:!1})}}class E{constructor(t){this.yt=t,this.wt=new k}async pushEntry(t){delete t.id,t.queueName=this.yt,await this.wt.addEntry(t)}async unshiftEntry(t){const e=await this.wt.getFirstEntryId();e?t.id=e-1:delete t.id,t.queueName=this.yt,await this.wt.addEntry(t)}async popEntry(){return this.gt(await this.wt.getLastEntryByQueueName(this.yt))}async shiftEntry(){return this.gt(await this.wt.getFirstEntryByQueueName(this.yt))}async getAll(){return await this.wt.getAllEntriesByQueueName(this.yt)}async size(){return await this.wt.getEntryCountByQueueName(this.yt)}async deleteEntry(t){await this.wt.deleteEntry(t)}async gt(t){return t&&await this.deleteEntry(t.id),t}}const R=["method","referrer","referrerPolicy","mode","credentials","cache","redirect","integrity","keepalive"];class x{static async fromRequest(t){const e={url:t.url,headers:{}};"GET"!==t.method&&(e.body=await t.clone().arrayBuffer());for(const[s,n]of t.headers.entries())e.headers[s]=n;for(const s of R)void 0!==t[s]&&(e[s]=t[s]);return new x(e)}constructor(t){"navigate"===t.mode&&(t.mode="same-origin"),this.Dt=t}toObject(){const t=Object.assign({},this.Dt);return t.headers=Object.assign({},this.Dt.headers),t.body&&(t.body=t.body.slice(0)),t}toRequest(){return new Request(this.Dt.url,this.Dt)}clone(){return new x(this.toObject())}}const v="workbox-background-sync",j=new Set,S=t=>{const e={request:new x(t.requestData).toRequest(),timestamp:t.timestamp};return t.metadata&&(e.metadata=t.metadata),e};class A{constructor(t,{forceSyncFallback:s,onSync:n,maxRetentionTime:r}={}){if(this.bt=!1,this.Bt=!1,j.has(t))throw new e.WorkboxError("duplicate-queue-name",{name:t});j.add(t),this.It=t,this.qt=n||this.replayRequests,this.kt=r||10080,this.Et=Boolean(s),this.Rt=new E(this.It),this.xt()}get name(){return this.It}async pushRequest(t){await this.vt(t,"push")}async unshiftRequest(t){await this.vt(t,"unshift")}async popRequest(){return this.jt("pop")}async shiftRequest(){return this.jt("shift")}async getAll(){const t=await this.Rt.getAll(),e=Date.now(),s=[];for(const n of t){const t=60*this.kt*1e3;e-n.timestamp>t?await this.Rt.deleteEntry(n.id):s.push(S(n))}return s}async size(){return await this.Rt.size()}async vt({request:t,metadata:e,timestamp:s=Date.now()},n){const r={requestData:(await x.fromRequest(t.clone())).toObject(),timestamp:s};switch(e&&(r.metadata=e),n){case"push":await this.Rt.pushEntry(r);break;case"unshift":await this.Rt.unshiftEntry(r)}this.bt?this.Bt=!0:await this.registerSync()}async jt(t){const e=Date.now();let s;switch(t){case"pop":s=await this.Rt.popEntry();break;case"shift":s=await this.Rt.shiftEntry()}if(s){const n=60*this.kt*1e3;return e-s.timestamp>n?this.jt(t):S(s)}}async replayRequests(){let t;for(;t=await this.shiftRequest();)try{await fetch(t.request.clone())}catch(s){throw await this.unshiftRequest(t),new e.WorkboxError("queue-replay-failed",{name:this.It})}}async registerSync(){if("sync"in self.registration&&!this.Et)try{await self.registration.sync.register(`${v}:${this.It}`)}catch(t){}}xt(){"sync"in self.registration&&!this.Et?self.addEventListener("sync",(t=>{if(t.tag===`${v}:${this.It}`){const e=async()=>{let e;this.bt=!0;try{await this.qt({queue:this})}catch(t){if(t instanceof Error)throw e=t,e}finally{!this.Bt||e&&!t.lastChance||await this.registerSync(),this.bt=!1,this.Bt=!1}};t.waitUntil(e())}})):this.qt({queue:this})}static get St(){return j}}return t.BackgroundSyncPlugin=class{constructor(t,e){this.fetchDidFail=async({request:t})=>{await this.At.pushRequest({request:t})},this.At=new A(t,e)}},t.Queue=A,t.QueueStore=E,t.StorableRequest=x,t}({},workbox.core._private,workbox.core._private,workbox.core._private); -//# sourceMappingURL=workbox-background-sync.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-background-sync.prod.js.map b/docs/workbox-v7.4.1/workbox-background-sync.prod.js.map deleted file mode 100644 index 43492bd7..00000000 --- a/docs/workbox-v7.4.1/workbox-background-sync.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-background-sync.prod.js","sources":["../node_modules/idb/build/wrap-idb-value.js","../node_modules/idb/build/index.js","../_version.js","../lib/QueueDb.js","../lib/QueueStore.js","../lib/StorableRequest.js","../Queue.js","../BackgroundSyncPlugin.js"],"sourcesContent":["const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction));\n });\n }\n if (blocked)\n request.addEventListener('blocked', () => blocked());\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking)\n db.addEventListener('versionchange', () => blocking());\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked)\n request.addEventListener('blocked', () => blocked());\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:background-sync:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2021 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { openDB } from 'idb';\nimport '../_version.js';\nconst DB_VERSION = 3;\nconst DB_NAME = 'workbox-background-sync';\nconst REQUEST_OBJECT_STORE_NAME = 'requests';\nconst QUEUE_NAME_INDEX = 'queueName';\n/**\n * A class to interact directly an IndexedDB created specifically to save and\n * retrieve QueueStoreEntries. This class encapsulates all the schema details\n * to store the representation of a Queue.\n *\n * @private\n */\nexport class QueueDb {\n constructor() {\n this._db = null;\n }\n /**\n * Add QueueStoreEntry to underlying db.\n *\n * @param {UnidentifiedQueueStoreEntry} entry\n */\n async addEntry(entry) {\n const db = await this.getDb();\n const tx = db.transaction(REQUEST_OBJECT_STORE_NAME, 'readwrite', {\n durability: 'relaxed',\n });\n await tx.store.add(entry);\n await tx.done;\n }\n /**\n * Returns the first entry id in the ObjectStore.\n *\n * @return {number | undefined}\n */\n async getFirstEntryId() {\n const db = await this.getDb();\n const cursor = await db\n .transaction(REQUEST_OBJECT_STORE_NAME)\n .store.openCursor();\n return cursor === null || cursor === void 0 ? void 0 : cursor.value.id;\n }\n /**\n * Get all the entries filtered by index\n *\n * @param queueName\n * @return {Promise}\n */\n async getAllEntriesByQueueName(queueName) {\n const db = await this.getDb();\n const results = await db.getAllFromIndex(REQUEST_OBJECT_STORE_NAME, QUEUE_NAME_INDEX, IDBKeyRange.only(queueName));\n return results ? results : new Array();\n }\n /**\n * Returns the number of entries filtered by index\n *\n * @param queueName\n * @return {Promise}\n */\n async getEntryCountByQueueName(queueName) {\n const db = await this.getDb();\n return db.countFromIndex(REQUEST_OBJECT_STORE_NAME, QUEUE_NAME_INDEX, IDBKeyRange.only(queueName));\n }\n /**\n * Deletes a single entry by id.\n *\n * @param {number} id the id of the entry to be deleted\n */\n async deleteEntry(id) {\n const db = await this.getDb();\n await db.delete(REQUEST_OBJECT_STORE_NAME, id);\n }\n /**\n *\n * @param queueName\n * @returns {Promise}\n */\n async getFirstEntryByQueueName(queueName) {\n return await this.getEndEntryFromIndex(IDBKeyRange.only(queueName), 'next');\n }\n /**\n *\n * @param queueName\n * @returns {Promise}\n */\n async getLastEntryByQueueName(queueName) {\n return await this.getEndEntryFromIndex(IDBKeyRange.only(queueName), 'prev');\n }\n /**\n * Returns either the first or the last entries, depending on direction.\n * Filtered by index.\n *\n * @param {IDBCursorDirection} direction\n * @param {IDBKeyRange} query\n * @return {Promise}\n * @private\n */\n async getEndEntryFromIndex(query, direction) {\n const db = await this.getDb();\n const cursor = await db\n .transaction(REQUEST_OBJECT_STORE_NAME)\n .store.index(QUEUE_NAME_INDEX)\n .openCursor(query, direction);\n return cursor === null || cursor === void 0 ? void 0 : cursor.value;\n }\n /**\n * Returns an open connection to the database.\n *\n * @private\n */\n async getDb() {\n if (!this._db) {\n this._db = await openDB(DB_NAME, DB_VERSION, {\n upgrade: this._upgradeDb,\n });\n }\n return this._db;\n }\n /**\n * Upgrades QueueDB\n *\n * @param {IDBPDatabase} db\n * @param {number} oldVersion\n * @private\n */\n _upgradeDb(db, oldVersion) {\n if (oldVersion > 0 && oldVersion < DB_VERSION) {\n if (db.objectStoreNames.contains(REQUEST_OBJECT_STORE_NAME)) {\n db.deleteObjectStore(REQUEST_OBJECT_STORE_NAME);\n }\n }\n const objStore = db.createObjectStore(REQUEST_OBJECT_STORE_NAME, {\n autoIncrement: true,\n keyPath: 'id',\n });\n objStore.createIndex(QUEUE_NAME_INDEX, QUEUE_NAME_INDEX, { unique: false });\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { QueueDb, } from './QueueDb.js';\nimport '../_version.js';\n/**\n * A class to manage storing requests from a Queue in IndexedDB,\n * indexed by their queue name for easier access.\n *\n * Most developers will not need to access this class directly;\n * it is exposed for advanced use cases.\n */\nexport class QueueStore {\n /**\n * Associates this instance with a Queue instance, so entries added can be\n * identified by their queue name.\n *\n * @param {string} queueName\n */\n constructor(queueName) {\n this._queueName = queueName;\n this._queueDb = new QueueDb();\n }\n /**\n * Append an entry last in the queue.\n *\n * @param {Object} entry\n * @param {Object} entry.requestData\n * @param {number} [entry.timestamp]\n * @param {Object} [entry.metadata]\n */\n async pushEntry(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'pushEntry',\n paramName: 'entry',\n });\n assert.isType(entry.requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'pushEntry',\n paramName: 'entry.requestData',\n });\n }\n // Don't specify an ID since one is automatically generated.\n delete entry.id;\n entry.queueName = this._queueName;\n await this._queueDb.addEntry(entry);\n }\n /**\n * Prepend an entry first in the queue.\n *\n * @param {Object} entry\n * @param {Object} entry.requestData\n * @param {number} [entry.timestamp]\n * @param {Object} [entry.metadata]\n */\n async unshiftEntry(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'unshiftEntry',\n paramName: 'entry',\n });\n assert.isType(entry.requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'unshiftEntry',\n paramName: 'entry.requestData',\n });\n }\n const firstId = await this._queueDb.getFirstEntryId();\n if (firstId) {\n // Pick an ID one less than the lowest ID in the object store.\n entry.id = firstId - 1;\n }\n else {\n // Otherwise let the auto-incrementor assign the ID.\n delete entry.id;\n }\n entry.queueName = this._queueName;\n await this._queueDb.addEntry(entry);\n }\n /**\n * Removes and returns the last entry in the queue matching the `queueName`.\n *\n * @return {Promise}\n */\n async popEntry() {\n return this._removeEntry(await this._queueDb.getLastEntryByQueueName(this._queueName));\n }\n /**\n * Removes and returns the first entry in the queue matching the `queueName`.\n *\n * @return {Promise}\n */\n async shiftEntry() {\n return this._removeEntry(await this._queueDb.getFirstEntryByQueueName(this._queueName));\n }\n /**\n * Returns all entries in the store matching the `queueName`.\n *\n * @param {Object} options See {@link workbox-background-sync.Queue~getAll}\n * @return {Promise>}\n */\n async getAll() {\n return await this._queueDb.getAllEntriesByQueueName(this._queueName);\n }\n /**\n * Returns the number of entries in the store matching the `queueName`.\n *\n * @param {Object} options See {@link workbox-background-sync.Queue~size}\n * @return {Promise}\n */\n async size() {\n return await this._queueDb.getEntryCountByQueueName(this._queueName);\n }\n /**\n * Deletes the entry for the given ID.\n *\n * WARNING: this method does not ensure the deleted entry belongs to this\n * queue (i.e. matches the `queueName`). But this limitation is acceptable\n * as this class is not publicly exposed. An additional check would make\n * this method slower than it needs to be.\n *\n * @param {number} id\n */\n async deleteEntry(id) {\n await this._queueDb.deleteEntry(id);\n }\n /**\n * Removes and returns the first or last entry in the queue (based on the\n * `direction` argument) matching the `queueName`.\n *\n * @return {Promise}\n * @private\n */\n async _removeEntry(entry) {\n if (entry) {\n await this.deleteEntry(entry.id);\n }\n return entry;\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\nconst serializableProperties = [\n 'method',\n 'referrer',\n 'referrerPolicy',\n 'mode',\n 'credentials',\n 'cache',\n 'redirect',\n 'integrity',\n 'keepalive',\n];\n/**\n * A class to make it easier to serialize and de-serialize requests so they\n * can be stored in IndexedDB.\n *\n * Most developers will not need to access this class directly;\n * it is exposed for advanced use cases.\n */\nclass StorableRequest {\n /**\n * Converts a Request object to a plain object that can be structured\n * cloned or JSON-stringified.\n *\n * @param {Request} request\n * @return {Promise}\n */\n static async fromRequest(request) {\n const requestData = {\n url: request.url,\n headers: {},\n };\n // Set the body if present.\n if (request.method !== 'GET') {\n // Use ArrayBuffer to support non-text request bodies.\n // NOTE: we can't use Blobs becuse Safari doesn't support storing\n // Blobs in IndexedDB in some cases:\n // https://github.com/dfahlander/Dexie.js/issues/618#issuecomment-398348457\n requestData.body = await request.clone().arrayBuffer();\n }\n // Convert the headers from an iterable to an object.\n for (const [key, value] of request.headers.entries()) {\n requestData.headers[key] = value;\n }\n // Add all other serializable request properties\n for (const prop of serializableProperties) {\n if (request[prop] !== undefined) {\n requestData[prop] = request[prop];\n }\n }\n return new StorableRequest(requestData);\n }\n /**\n * Accepts an object of request data that can be used to construct a\n * `Request` but can also be stored in IndexedDB.\n *\n * @param {Object} requestData An object of request data that includes the\n * `url` plus any relevant properties of\n * [requestInit]{@link https://fetch.spec.whatwg.org/#requestinit}.\n */\n constructor(requestData) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'StorableRequest',\n funcName: 'constructor',\n paramName: 'requestData',\n });\n assert.isType(requestData.url, 'string', {\n moduleName: 'workbox-background-sync',\n className: 'StorableRequest',\n funcName: 'constructor',\n paramName: 'requestData.url',\n });\n }\n // If the request's mode is `navigate`, convert it to `same-origin` since\n // navigation requests can't be constructed via script.\n if (requestData['mode'] === 'navigate') {\n requestData['mode'] = 'same-origin';\n }\n this._requestData = requestData;\n }\n /**\n * Returns a deep clone of the instances `_requestData` object.\n *\n * @return {Object}\n */\n toObject() {\n const requestData = Object.assign({}, this._requestData);\n requestData.headers = Object.assign({}, this._requestData.headers);\n if (requestData.body) {\n requestData.body = requestData.body.slice(0);\n }\n return requestData;\n }\n /**\n * Converts this instance to a Request.\n *\n * @return {Request}\n */\n toRequest() {\n return new Request(this._requestData.url, this._requestData);\n }\n /**\n * Creates and returns a deep clone of the instance.\n *\n * @return {StorableRequest}\n */\n clone() {\n return new StorableRequest(this.toObject());\n }\n}\nexport { StorableRequest };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { QueueStore } from './lib/QueueStore.js';\nimport { StorableRequest } from './lib/StorableRequest.js';\nimport './_version.js';\nconst TAG_PREFIX = 'workbox-background-sync';\nconst MAX_RETENTION_TIME = 60 * 24 * 7; // 7 days in minutes\nconst queueNames = new Set();\n/**\n * Converts a QueueStore entry into the format exposed by Queue. This entails\n * converting the request data into a real request and omitting the `id` and\n * `queueName` properties.\n *\n * @param {UnidentifiedQueueStoreEntry} queueStoreEntry\n * @return {Queue}\n * @private\n */\nconst convertEntry = (queueStoreEntry) => {\n const queueEntry = {\n request: new StorableRequest(queueStoreEntry.requestData).toRequest(),\n timestamp: queueStoreEntry.timestamp,\n };\n if (queueStoreEntry.metadata) {\n queueEntry.metadata = queueStoreEntry.metadata;\n }\n return queueEntry;\n};\n/**\n * A class to manage storing failed requests in IndexedDB and retrying them\n * later. All parts of the storing and replaying process are observable via\n * callbacks.\n *\n * @memberof workbox-background-sync\n */\nclass Queue {\n /**\n * Creates an instance of Queue with the given options\n *\n * @param {string} name The unique name for this queue. This name must be\n * unique as it's used to register sync events and store requests\n * in IndexedDB specific to this instance. An error will be thrown if\n * a duplicate name is detected.\n * @param {Object} [options]\n * @param {Function} [options.onSync] A function that gets invoked whenever\n * the 'sync' event fires. The function is invoked with an object\n * containing the `queue` property (referencing this instance), and you\n * can use the callback to customize the replay behavior of the queue.\n * When not set the `replayRequests()` method is called.\n * Note: if the replay fails after a sync event, make sure you throw an\n * error, so the browser knows to retry the sync event later.\n * @param {number} [options.maxRetentionTime=7 days] The amount of time (in\n * minutes) a request may be retried. After this amount of time has\n * passed, the request will be deleted from the queue.\n * @param {boolean} [options.forceSyncFallback=false] If `true`, instead\n * of attempting to use background sync events, always attempt to replay\n * queued request at service worker startup. Most folks will not need\n * this, unless you explicitly target a runtime like Electron that\n * exposes the interfaces for background sync, but does not have a working\n * implementation.\n */\n constructor(name, { forceSyncFallback, onSync, maxRetentionTime } = {}) {\n this._syncInProgress = false;\n this._requestsAddedDuringSync = false;\n // Ensure the store name is not already being used\n if (queueNames.has(name)) {\n throw new WorkboxError('duplicate-queue-name', { name });\n }\n else {\n queueNames.add(name);\n }\n this._name = name;\n this._onSync = onSync || this.replayRequests;\n this._maxRetentionTime = maxRetentionTime || MAX_RETENTION_TIME;\n this._forceSyncFallback = Boolean(forceSyncFallback);\n this._queueStore = new QueueStore(this._name);\n this._addSyncListener();\n }\n /**\n * @return {string}\n */\n get name() {\n return this._name;\n }\n /**\n * Stores the passed request in IndexedDB (with its timestamp and any\n * metadata) at the end of the queue.\n *\n * @param {QueueEntry} entry\n * @param {Request} entry.request The request to store in the queue.\n * @param {Object} [entry.metadata] Any metadata you want associated with the\n * stored request. When requests are replayed you'll have access to this\n * metadata object in case you need to modify the request beforehand.\n * @param {number} [entry.timestamp] The timestamp (Epoch time in\n * milliseconds) when the request was first added to the queue. This is\n * used along with `maxRetentionTime` to remove outdated requests. In\n * general you don't need to set this value, as it's automatically set\n * for you (defaulting to `Date.now()`), but you can update it if you\n * don't want particular requests to expire.\n */\n async pushRequest(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'pushRequest',\n paramName: 'entry',\n });\n assert.isInstance(entry.request, Request, {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'pushRequest',\n paramName: 'entry.request',\n });\n }\n await this._addRequest(entry, 'push');\n }\n /**\n * Stores the passed request in IndexedDB (with its timestamp and any\n * metadata) at the beginning of the queue.\n *\n * @param {QueueEntry} entry\n * @param {Request} entry.request The request to store in the queue.\n * @param {Object} [entry.metadata] Any metadata you want associated with the\n * stored request. When requests are replayed you'll have access to this\n * metadata object in case you need to modify the request beforehand.\n * @param {number} [entry.timestamp] The timestamp (Epoch time in\n * milliseconds) when the request was first added to the queue. This is\n * used along with `maxRetentionTime` to remove outdated requests. In\n * general you don't need to set this value, as it's automatically set\n * for you (defaulting to `Date.now()`), but you can update it if you\n * don't want particular requests to expire.\n */\n async unshiftRequest(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'unshiftRequest',\n paramName: 'entry',\n });\n assert.isInstance(entry.request, Request, {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'unshiftRequest',\n paramName: 'entry.request',\n });\n }\n await this._addRequest(entry, 'unshift');\n }\n /**\n * Removes and returns the last request in the queue (along with its\n * timestamp and any metadata). The returned object takes the form:\n * `{request, timestamp, metadata}`.\n *\n * @return {Promise}\n */\n async popRequest() {\n return this._removeRequest('pop');\n }\n /**\n * Removes and returns the first request in the queue (along with its\n * timestamp and any metadata). The returned object takes the form:\n * `{request, timestamp, metadata}`.\n *\n * @return {Promise}\n */\n async shiftRequest() {\n return this._removeRequest('shift');\n }\n /**\n * Returns all the entries that have not expired (per `maxRetentionTime`).\n * Any expired entries are removed from the queue.\n *\n * @return {Promise>}\n */\n async getAll() {\n const allEntries = await this._queueStore.getAll();\n const now = Date.now();\n const unexpiredEntries = [];\n for (const entry of allEntries) {\n // Ignore requests older than maxRetentionTime. Call this function\n // recursively until an unexpired request is found.\n const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000;\n if (now - entry.timestamp > maxRetentionTimeInMs) {\n await this._queueStore.deleteEntry(entry.id);\n }\n else {\n unexpiredEntries.push(convertEntry(entry));\n }\n }\n return unexpiredEntries;\n }\n /**\n * Returns the number of entries present in the queue.\n * Note that expired entries (per `maxRetentionTime`) are also included in this count.\n *\n * @return {Promise}\n */\n async size() {\n return await this._queueStore.size();\n }\n /**\n * Adds the entry to the QueueStore and registers for a sync event.\n *\n * @param {Object} entry\n * @param {Request} entry.request\n * @param {Object} [entry.metadata]\n * @param {number} [entry.timestamp=Date.now()]\n * @param {string} operation ('push' or 'unshift')\n * @private\n */\n async _addRequest({ request, metadata, timestamp = Date.now() }, operation) {\n const storableRequest = await StorableRequest.fromRequest(request.clone());\n const entry = {\n requestData: storableRequest.toObject(),\n timestamp,\n };\n // Only include metadata if it's present.\n if (metadata) {\n entry.metadata = metadata;\n }\n switch (operation) {\n case 'push':\n await this._queueStore.pushEntry(entry);\n break;\n case 'unshift':\n await this._queueStore.unshiftEntry(entry);\n break;\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(request.url)}' has ` +\n `been added to background sync queue '${this._name}'.`);\n }\n // Don't register for a sync if we're in the middle of a sync. Instead,\n // we wait until the sync is complete and call register if\n // `this._requestsAddedDuringSync` is true.\n if (this._syncInProgress) {\n this._requestsAddedDuringSync = true;\n }\n else {\n await this.registerSync();\n }\n }\n /**\n * Removes and returns the first or last (depending on `operation`) entry\n * from the QueueStore that's not older than the `maxRetentionTime`.\n *\n * @param {string} operation ('pop' or 'shift')\n * @return {Object|undefined}\n * @private\n */\n async _removeRequest(operation) {\n const now = Date.now();\n let entry;\n switch (operation) {\n case 'pop':\n entry = await this._queueStore.popEntry();\n break;\n case 'shift':\n entry = await this._queueStore.shiftEntry();\n break;\n }\n if (entry) {\n // Ignore requests older than maxRetentionTime. Call this function\n // recursively until an unexpired request is found.\n const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000;\n if (now - entry.timestamp > maxRetentionTimeInMs) {\n return this._removeRequest(operation);\n }\n return convertEntry(entry);\n }\n else {\n return undefined;\n }\n }\n /**\n * Loops through each request in the queue and attempts to re-fetch it.\n * If any request fails to re-fetch, it's put back in the same position in\n * the queue (which registers a retry for the next sync event).\n */\n async replayRequests() {\n let entry;\n while ((entry = await this.shiftRequest())) {\n try {\n await fetch(entry.request.clone());\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(entry.request.url)}' ` +\n `has been replayed in queue '${this._name}'`);\n }\n }\n catch (error) {\n await this.unshiftRequest(entry);\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(entry.request.url)}' ` +\n `failed to replay, putting it back in queue '${this._name}'`);\n }\n throw new WorkboxError('queue-replay-failed', { name: this._name });\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`All requests in queue '${this.name}' have successfully ` +\n `replayed; the queue is now empty!`);\n }\n }\n /**\n * Registers a sync event with a tag unique to this instance.\n */\n async registerSync() {\n // See https://github.com/GoogleChrome/workbox/issues/2393\n if ('sync' in self.registration && !this._forceSyncFallback) {\n try {\n await self.registration.sync.register(`${TAG_PREFIX}:${this._name}`);\n }\n catch (err) {\n // This means the registration failed for some reason, possibly due to\n // the user disabling it.\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to register sync event for '${this._name}'.`, err);\n }\n }\n }\n }\n /**\n * In sync-supporting browsers, this adds a listener for the sync event.\n * In non-sync-supporting browsers, or if _forceSyncFallback is true, this\n * will retry the queue on service worker startup.\n *\n * @private\n */\n _addSyncListener() {\n // See https://github.com/GoogleChrome/workbox/issues/2393\n if ('sync' in self.registration && !this._forceSyncFallback) {\n self.addEventListener('sync', (event) => {\n if (event.tag === `${TAG_PREFIX}:${this._name}`) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Background sync for tag '${event.tag}' ` + `has been received`);\n }\n const syncComplete = async () => {\n this._syncInProgress = true;\n let syncError;\n try {\n await this._onSync({ queue: this });\n }\n catch (error) {\n if (error instanceof Error) {\n syncError = error;\n // Rethrow the error. Note: the logic in the finally clause\n // will run before this gets rethrown.\n throw syncError;\n }\n }\n finally {\n // New items may have been added to the queue during the sync,\n // so we need to register for a new sync if that's happened...\n // Unless there was an error during the sync, in which\n // case the browser will automatically retry later, as long\n // as `event.lastChance` is not true.\n if (this._requestsAddedDuringSync &&\n !(syncError && !event.lastChance)) {\n await this.registerSync();\n }\n this._syncInProgress = false;\n this._requestsAddedDuringSync = false;\n }\n };\n event.waitUntil(syncComplete());\n }\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Background sync replaying without background sync event`);\n }\n // If the browser doesn't support background sync, or the developer has\n // opted-in to not using it, retry every time the service worker starts up\n // as a fallback.\n void this._onSync({ queue: this });\n }\n }\n /**\n * Returns the set of queue names. This is primarily used to reset the list\n * of queue names in tests.\n *\n * @return {Set}\n *\n * @private\n */\n static get _queueNames() {\n return queueNames;\n }\n}\nexport { Queue };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Queue } from './Queue.js';\nimport './_version.js';\n/**\n * A class implementing the `fetchDidFail` lifecycle callback. This makes it\n * easier to add failed requests to a background sync Queue.\n *\n * @memberof workbox-background-sync\n */\nclass BackgroundSyncPlugin {\n /**\n * @param {string} name See the {@link workbox-background-sync.Queue}\n * documentation for parameter details.\n * @param {Object} [options] See the\n * {@link workbox-background-sync.Queue} documentation for\n * parameter details.\n */\n constructor(name, options) {\n /**\n * @param {Object} options\n * @param {Request} options.request\n * @private\n */\n this.fetchDidFail = async ({ request }) => {\n await this._queue.pushRequest({ request });\n };\n this._queue = new Queue(name, options);\n }\n}\nexport { BackgroundSyncPlugin };\n"],"names":["instanceOfAny","object","constructors","some","c","idbProxyableTypes","cursorAdvanceMethods","cursorRequestMap","WeakMap","transactionDoneMap","transactionStoreNamesMap","transformCache","reverseTransformCache","idbProxyTraps","get","target","prop","receiver","IDBTransaction","objectStoreNames","undefined","objectStore","wrap","set","value","has","wrapFunction","func","IDBDatabase","prototype","transaction","IDBCursor","advance","continue","continuePrimaryKey","includes","args","apply","unwrap","this","storeNames","tx","call","sort","transformCachableValue","done","Promise","resolve","reject","unlisten","removeEventListener","complete","error","DOMException","addEventListener","cacheDonePromiseForTransaction","IDBObjectStore","IDBIndex","Proxy","IDBRequest","request","promise","success","result","then","catch","promisifyRequest","newValue","readMethods","writeMethods","cachedMethods","Map","getMethod","targetFuncName","replace","useIndex","isWrite","method","async","storeName","store","index","shift","all","oldTraps","_extends","callback","self","_","e","REQUEST_OBJECT_STORE_NAME","QUEUE_NAME_INDEX","QueueDb","constructor","_db","entry","getDb","durability","add","db","cursor","openCursor","id","queueName","results","getAllFromIndex","IDBKeyRange","only","Array","countFromIndex","delete","getEndEntryFromIndex","query","direction","name","version","blocked","upgrade","blocking","terminated","indexedDB","open","openPromise","event","oldVersion","newVersion","openDB","_upgradeDb","contains","deleteObjectStore","createObjectStore","autoIncrement","keyPath","createIndex","unique","QueueStore","_queueName","_queueDb","addEntry","firstId","getFirstEntryId","_removeEntry","getLastEntryByQueueName","getFirstEntryByQueueName","getAllEntriesByQueueName","getEntryCountByQueueName","deleteEntry","serializableProperties","StorableRequest","static","requestData","url","headers","body","clone","arrayBuffer","key","entries","_requestData","toObject","Object","assign","slice","toRequest","Request","TAG_PREFIX","queueNames","Set","convertEntry","queueStoreEntry","queueEntry","timestamp","metadata","Queue","forceSyncFallback","onSync","maxRetentionTime","_syncInProgress","_requestsAddedDuringSync","WorkboxError","_name","_onSync","replayRequests","_maxRetentionTime","_forceSyncFallback","Boolean","_queueStore","_addSyncListener","_addRequest","_removeRequest","allEntries","getAll","now","Date","unexpiredEntries","maxRetentionTimeInMs","push","size","operation","fromRequest","pushEntry","unshiftEntry","registerSync","popEntry","shiftEntry","shiftRequest","fetch","unshiftRequest","registration","sync","register","err","tag","syncComplete","syncError","queue","Error","lastChance","waitUntil","_queueNames","options","fetchDidFail","_queue","pushRequest"],"mappings":"iTAAA,MAAMA,EAAgBA,CAACC,EAAQC,IAAiBA,EAAaC,MAAMC,GAAMH,aAAkBG,IAE3F,IAAIC,EACAC,EAqBJ,MAAMC,EAAmB,IAAIC,QACvBC,EAAqB,IAAID,QACzBE,EAA2B,IAAIF,QAC/BG,EAAiB,IAAIH,QACrBI,EAAwB,IAAIJ,QA0DlC,IAAIK,EAAgB,CAChBC,IAAIC,EAAQC,EAAMC,GACd,GAAIF,aAAkBG,eAAgB,CAElC,GAAa,SAATF,EACA,OAAOP,EAAmBK,IAAIC,GAElC,GAAa,qBAATC,EACA,OAAOD,EAAOI,kBAAoBT,EAAyBI,IAAIC,GAGnE,GAAa,UAATC,EACA,OAAOC,EAASE,iBAAiB,QAC3BC,EACAH,EAASI,YAAYJ,EAASE,iBAAiB,GAE7D,CAEA,OAAOG,EAAKP,EAAOC,GACvB,EACAO,IAAGA,CAACR,EAAQC,EAAMQ,KACdT,EAAOC,GAAQQ,GACR,GAEXC,IAAGA,CAACV,EAAQC,IACJD,aAAkBG,iBACR,SAATF,GAA4B,UAATA,IAGjBA,KAAQD,GAMvB,SAASW,EAAaC,GAIlB,OAAIA,IAASC,YAAYC,UAAUC,aAC7B,qBAAsBZ,eAAeW,WA7GnCvB,IACHA,EAAuB,CACpByB,UAAUF,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AUS,KAAKyH,eAAiBzK,KAAKiJ,GACrC,UACUjG,KAAKyH,aAAaC,KAAKC,SAAU,GAAE7C,KAAc9H,KAAK6I,KAChE,CACA,MAAO+B,GAMP,CAER,CAQAxB,KAEQ,SAAUpG,KAAKyH,eAAiBzK,KAAKiJ,GACrCjG,KAAKjC,iBAAiB,QAASqE,IAC3B,GAAIA,EAAMyF,MAAS,GAAE/C,KAAc9H,KAAK6I,KAAS,CAI7C,MAAMiC,EAAevI,UAEjB,IAAIwI,EADJ/K,KAAK0I,IAAkB,EAEvB,UACU1I,KAAK8I,GAAQ,CAAEkC,MAAOhL,MAChC,CACA,MAAOa,GACH,GAAIA,aAAiBoK,MAIjB,MAHAF,EAAYlK,EAGNkK,CAEd,CAAC,SAOO/K,KAAK2I,IACHoC,IAAc3F,EAAM8F,kBAChBlL,KAAKmK,eAEfnK,KAAK0I,IAAkB,EACvB1I,KAAK2I,IAA2B,CACpC,GAEJvD,EAAM+F,UAAUL,IACpB,KAUC9K,KAAK8I,GAAQ,CAAEkC,MAAOhL,MAEnC,CASWoL,gBACP,OAAOrD,CACX,gCC/XJ,MAQIzE,YAAYqB,EAAM0G,GAMdrL,KAAKsL,aAAe/I,OAASlB,oBACnBrB,KAAKuL,GAAOC,YAAY,CAAEnK,WAAU,EAE9CrB,KAAKuL,GAAS,IAAIjD,EAAM3D,EAAM0G,EAClC","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-broadcast-update.dev.js b/docs/workbox-v7.4.1/workbox-broadcast-update.dev.js deleted file mode 100644 index 9b26ecc0..00000000 --- a/docs/workbox-v7.4.1/workbox-broadcast-update.dev.js +++ /dev/null @@ -1,282 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.broadcastUpdate = (function (exports, assert_js, timeout_js, resultingClientExists_js, logger_js, WorkboxError_js, dontWaitFor_js) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:broadcast-update:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Given two `Response's`, compares several header values to see if they are - * the same or not. - * - * @param {Response} firstResponse - * @param {Response} secondResponse - * @param {Array} headersToCheck - * @return {boolean} - * - * @memberof workbox-broadcast-update - */ - const responsesAreSame = (firstResponse, secondResponse, headersToCheck) => { - { - if (!(firstResponse instanceof Response && secondResponse instanceof Response)) { - throw new WorkboxError_js.WorkboxError('invalid-responses-are-same-args'); - } - } - const atLeastOneHeaderAvailable = headersToCheck.some(header => { - return firstResponse.headers.has(header) && secondResponse.headers.has(header); - }); - if (!atLeastOneHeaderAvailable) { - { - logger_js.logger.warn(`Unable to determine where the response has been updated ` + `because none of the headers that would be checked are present.`); - logger_js.logger.debug(`Attempting to compare the following: `, firstResponse, secondResponse, headersToCheck); - } - // Just return true, indicating the that responses are the same, since we - // can't determine otherwise. - return true; - } - return headersToCheck.every(header => { - const headerStateComparison = firstResponse.headers.has(header) === secondResponse.headers.has(header); - const headerValueComparison = firstResponse.headers.get(header) === secondResponse.headers.get(header); - return headerStateComparison && headerValueComparison; - }); - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const CACHE_UPDATED_MESSAGE_TYPE = 'CACHE_UPDATED'; - const CACHE_UPDATED_MESSAGE_META = 'workbox-broadcast-update'; - const NOTIFY_ALL_CLIENTS = true; - const DEFAULT_HEADERS_TO_CHECK = ['content-length', 'etag', 'last-modified']; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - // UA-sniff Safari: https://stackoverflow.com/questions/7944460/detect-safari-browser - // TODO(philipwalton): remove once this Safari bug fix has been released. - // https://bugs.webkit.org/show_bug.cgi?id=201169 - const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); - /** - * Generates the default payload used in update messages. By default the - * payload includes the `cacheName` and `updatedURL` fields. - * - * @return Object - * @private - */ - function defaultPayloadGenerator(data) { - return { - cacheName: data.cacheName, - updatedURL: data.request.url - }; - } - /** - * Uses the `postMessage()` API to inform any open windows/tabs when a cached - * response has been updated. - * - * For efficiency's sake, the underlying response bodies are not compared; - * only specific response headers are checked. - * - * @memberof workbox-broadcast-update - */ - class BroadcastCacheUpdate { - /** - * Construct a BroadcastCacheUpdate instance with a specific `channelName` to - * broadcast messages on - * - * @param {Object} [options] - * @param {Array} [options.headersToCheck=['content-length', 'etag', 'last-modified']] - * A list of headers that will be used to determine whether the responses - * differ. - * @param {string} [options.generatePayload] A function whose return value - * will be used as the `payload` field in any cache update messages sent - * to the window clients. - * @param {boolean} [options.notifyAllClients=true] If true (the default) then - * all open clients will receive a message. If false, then only the client - * that make the original request will be notified of the update. - */ - constructor({ - generatePayload, - headersToCheck, - notifyAllClients - } = {}) { - this._headersToCheck = headersToCheck || DEFAULT_HEADERS_TO_CHECK; - this._generatePayload = generatePayload || defaultPayloadGenerator; - this._notifyAllClients = notifyAllClients !== null && notifyAllClients !== void 0 ? notifyAllClients : NOTIFY_ALL_CLIENTS; - } - /** - * Compares two [Responses](https://developer.mozilla.org/en-US/docs/Web/API/Response) - * and sends a message (via `postMessage()`) to all window clients if the - * responses differ. Neither of the Responses can be - * [opaque](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). - * - * The message that's posted has the following format (where `payload` can - * be customized via the `generatePayload` option the instance is created - * with): - * - * ``` - * { - * type: 'CACHE_UPDATED', - * meta: 'workbox-broadcast-update', - * payload: { - * cacheName: 'the-cache-name', - * updatedURL: 'https://example.com/' - * } - * } - * ``` - * - * @param {Object} options - * @param {Response} [options.oldResponse] Cached response to compare. - * @param {Response} options.newResponse Possibly updated response to compare. - * @param {Request} options.request The request. - * @param {string} options.cacheName Name of the cache the responses belong - * to. This is included in the broadcast message. - * @param {Event} options.event event The event that triggered - * this possible cache update. - * @return {Promise} Resolves once the update is sent. - */ - async notifyIfUpdated(options) { - { - assert_js.assert.isType(options.cacheName, 'string', { - moduleName: 'workbox-broadcast-update', - className: 'BroadcastCacheUpdate', - funcName: 'notifyIfUpdated', - paramName: 'cacheName' - }); - assert_js.assert.isInstance(options.newResponse, Response, { - moduleName: 'workbox-broadcast-update', - className: 'BroadcastCacheUpdate', - funcName: 'notifyIfUpdated', - paramName: 'newResponse' - }); - assert_js.assert.isInstance(options.request, Request, { - moduleName: 'workbox-broadcast-update', - className: 'BroadcastCacheUpdate', - funcName: 'notifyIfUpdated', - paramName: 'request' - }); - } - // Without two responses there is nothing to compare. - if (!options.oldResponse) { - return; - } - if (!responsesAreSame(options.oldResponse, options.newResponse, this._headersToCheck)) { - { - logger_js.logger.log(`Newer response found (and cached) for:`, options.request.url); - } - const messageData = { - type: CACHE_UPDATED_MESSAGE_TYPE, - meta: CACHE_UPDATED_MESSAGE_META, - payload: this._generatePayload(options) - }; - // For navigation requests, wait until the new window client exists - // before sending the message - if (options.request.mode === 'navigate') { - let resultingClientId; - if (options.event instanceof FetchEvent) { - resultingClientId = options.event.resultingClientId; - } - const resultingWin = await resultingClientExists_js.resultingClientExists(resultingClientId); - // Safari does not currently implement postMessage buffering and - // there's no good way to feature detect that, so to increase the - // chances of the message being delivered in Safari, we add a timeout. - // We also do this if `resultingClientExists()` didn't return a client, - // which means it timed out, so it's worth waiting a bit longer. - if (!resultingWin || isSafari) { - // 3500 is chosen because (according to CrUX data) 80% of mobile - // websites hit the DOMContentLoaded event in less than 3.5 seconds. - // And presumably sites implementing service worker are on the - // higher end of the performance spectrum. - await timeout_js.timeout(3500); - } - } - if (this._notifyAllClients) { - const windows = await self.clients.matchAll({ - type: 'window' - }); - for (const win of windows) { - win.postMessage(messageData); - } - } else { - // See https://github.com/GoogleChrome/workbox/issues/2895 - if (options.event instanceof FetchEvent) { - const client = await self.clients.get(options.event.clientId); - client === null || client === void 0 ? void 0 : client.postMessage(messageData); - } - } - } - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * This plugin will automatically broadcast a message whenever a cached response - * is updated. - * - * @memberof workbox-broadcast-update - */ - class BroadcastUpdatePlugin { - /** - * Construct a {@link workbox-broadcast-update.BroadcastUpdate} instance with - * the passed options and calls its `notifyIfUpdated` method whenever the - * plugin's `cacheDidUpdate` callback is invoked. - * - * @param {Object} [options] - * @param {Array} [options.headersToCheck=['content-length', 'etag', 'last-modified']] - * A list of headers that will be used to determine whether the responses - * differ. - * @param {string} [options.generatePayload] A function whose return value - * will be used as the `payload` field in any cache update messages sent - * to the window clients. - */ - constructor(options) { - /** - * A "lifecycle" callback that will be triggered automatically by the - * `workbox-sw` and `workbox-runtime-caching` handlers when an entry is - * added to a cache. - * - * @private - * @param {Object} options The input object to this function. - * @param {string} options.cacheName Name of the cache being updated. - * @param {Response} [options.oldResponse] The previous cached value, if any. - * @param {Response} options.newResponse The new value in the cache. - * @param {Request} options.request The request that triggered the update. - * @param {Request} options.event The event that triggered the update. - */ - this.cacheDidUpdate = async options => { - dontWaitFor_js.dontWaitFor(this._broadcastUpdate.notifyIfUpdated(options)); - }; - this._broadcastUpdate = new BroadcastCacheUpdate(options); - } - } - - exports.BroadcastCacheUpdate = BroadcastCacheUpdate; - exports.BroadcastUpdatePlugin = BroadcastUpdatePlugin; - exports.responsesAreSame = responsesAreSame; - - return exports; - -})({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private); -//# sourceMappingURL=workbox-broadcast-update.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-broadcast-update.dev.js.map b/docs/workbox-v7.4.1/workbox-broadcast-update.dev.js.map deleted file mode 100644 index de6fe0ba..00000000 --- a/docs/workbox-v7.4.1/workbox-broadcast-update.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-broadcast-update.dev.js","sources":["../_version.js","../responsesAreSame.js","../utils/constants.js","../BroadcastCacheUpdate.js","../BroadcastUpdatePlugin.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:broadcast-update:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport './_version.js';\n/**\n * Given two `Response's`, compares several header values to see if they are\n * the same or not.\n *\n * @param {Response} firstResponse\n * @param {Response} secondResponse\n * @param {Array} headersToCheck\n * @return {boolean}\n *\n * @memberof workbox-broadcast-update\n */\nconst responsesAreSame = (firstResponse, secondResponse, headersToCheck) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(firstResponse instanceof Response && secondResponse instanceof Response)) {\n throw new WorkboxError('invalid-responses-are-same-args');\n }\n }\n const atLeastOneHeaderAvailable = headersToCheck.some((header) => {\n return (firstResponse.headers.has(header) && secondResponse.headers.has(header));\n });\n if (!atLeastOneHeaderAvailable) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to determine where the response has been updated ` +\n `because none of the headers that would be checked are present.`);\n logger.debug(`Attempting to compare the following: `, firstResponse, secondResponse, headersToCheck);\n }\n // Just return true, indicating the that responses are the same, since we\n // can't determine otherwise.\n return true;\n }\n return headersToCheck.every((header) => {\n const headerStateComparison = firstResponse.headers.has(header) === secondResponse.headers.has(header);\n const headerValueComparison = firstResponse.headers.get(header) === secondResponse.headers.get(header);\n return headerStateComparison && headerValueComparison;\n });\n};\nexport { responsesAreSame };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nexport const CACHE_UPDATED_MESSAGE_TYPE = 'CACHE_UPDATED';\nexport const CACHE_UPDATED_MESSAGE_META = 'workbox-broadcast-update';\nexport const NOTIFY_ALL_CLIENTS = true;\nexport const DEFAULT_HEADERS_TO_CHECK = [\n 'content-length',\n 'etag',\n 'last-modified',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { timeout } from 'workbox-core/_private/timeout.js';\nimport { resultingClientExists } from 'workbox-core/_private/resultingClientExists.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { responsesAreSame } from './responsesAreSame.js';\nimport { CACHE_UPDATED_MESSAGE_META, CACHE_UPDATED_MESSAGE_TYPE, DEFAULT_HEADERS_TO_CHECK, NOTIFY_ALL_CLIENTS, } from './utils/constants.js';\nimport './_version.js';\n// UA-sniff Safari: https://stackoverflow.com/questions/7944460/detect-safari-browser\n// TODO(philipwalton): remove once this Safari bug fix has been released.\n// https://bugs.webkit.org/show_bug.cgi?id=201169\nconst isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n/**\n * Generates the default payload used in update messages. By default the\n * payload includes the `cacheName` and `updatedURL` fields.\n *\n * @return Object\n * @private\n */\nfunction defaultPayloadGenerator(data) {\n return {\n cacheName: data.cacheName,\n updatedURL: data.request.url,\n };\n}\n/**\n * Uses the `postMessage()` API to inform any open windows/tabs when a cached\n * response has been updated.\n *\n * For efficiency's sake, the underlying response bodies are not compared;\n * only specific response headers are checked.\n *\n * @memberof workbox-broadcast-update\n */\nclass BroadcastCacheUpdate {\n /**\n * Construct a BroadcastCacheUpdate instance with a specific `channelName` to\n * broadcast messages on\n *\n * @param {Object} [options]\n * @param {Array} [options.headersToCheck=['content-length', 'etag', 'last-modified']]\n * A list of headers that will be used to determine whether the responses\n * differ.\n * @param {string} [options.generatePayload] A function whose return value\n * will be used as the `payload` field in any cache update messages sent\n * to the window clients.\n * @param {boolean} [options.notifyAllClients=true] If true (the default) then\n * all open clients will receive a message. If false, then only the client\n * that make the original request will be notified of the update.\n */\n constructor({ generatePayload, headersToCheck, notifyAllClients, } = {}) {\n this._headersToCheck = headersToCheck || DEFAULT_HEADERS_TO_CHECK;\n this._generatePayload = generatePayload || defaultPayloadGenerator;\n this._notifyAllClients = notifyAllClients !== null && notifyAllClients !== void 0 ? notifyAllClients : NOTIFY_ALL_CLIENTS;\n }\n /**\n * Compares two [Responses](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * and sends a message (via `postMessage()`) to all window clients if the\n * responses differ. Neither of the Responses can be\n * [opaque](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses).\n *\n * The message that's posted has the following format (where `payload` can\n * be customized via the `generatePayload` option the instance is created\n * with):\n *\n * ```\n * {\n * type: 'CACHE_UPDATED',\n * meta: 'workbox-broadcast-update',\n * payload: {\n * cacheName: 'the-cache-name',\n * updatedURL: 'https://example.com/'\n * }\n * }\n * ```\n *\n * @param {Object} options\n * @param {Response} [options.oldResponse] Cached response to compare.\n * @param {Response} options.newResponse Possibly updated response to compare.\n * @param {Request} options.request The request.\n * @param {string} options.cacheName Name of the cache the responses belong\n * to. This is included in the broadcast message.\n * @param {Event} options.event event The event that triggered\n * this possible cache update.\n * @return {Promise} Resolves once the update is sent.\n */\n async notifyIfUpdated(options) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(options.cacheName, 'string', {\n moduleName: 'workbox-broadcast-update',\n className: 'BroadcastCacheUpdate',\n funcName: 'notifyIfUpdated',\n paramName: 'cacheName',\n });\n assert.isInstance(options.newResponse, Response, {\n moduleName: 'workbox-broadcast-update',\n className: 'BroadcastCacheUpdate',\n funcName: 'notifyIfUpdated',\n paramName: 'newResponse',\n });\n assert.isInstance(options.request, Request, {\n moduleName: 'workbox-broadcast-update',\n className: 'BroadcastCacheUpdate',\n funcName: 'notifyIfUpdated',\n paramName: 'request',\n });\n }\n // Without two responses there is nothing to compare.\n if (!options.oldResponse) {\n return;\n }\n if (!responsesAreSame(options.oldResponse, options.newResponse, this._headersToCheck)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Newer response found (and cached) for:`, options.request.url);\n }\n const messageData = {\n type: CACHE_UPDATED_MESSAGE_TYPE,\n meta: CACHE_UPDATED_MESSAGE_META,\n payload: this._generatePayload(options),\n };\n // For navigation requests, wait until the new window client exists\n // before sending the message\n if (options.request.mode === 'navigate') {\n let resultingClientId;\n if (options.event instanceof FetchEvent) {\n resultingClientId = options.event.resultingClientId;\n }\n const resultingWin = await resultingClientExists(resultingClientId);\n // Safari does not currently implement postMessage buffering and\n // there's no good way to feature detect that, so to increase the\n // chances of the message being delivered in Safari, we add a timeout.\n // We also do this if `resultingClientExists()` didn't return a client,\n // which means it timed out, so it's worth waiting a bit longer.\n if (!resultingWin || isSafari) {\n // 3500 is chosen because (according to CrUX data) 80% of mobile\n // websites hit the DOMContentLoaded event in less than 3.5 seconds.\n // And presumably sites implementing service worker are on the\n // higher end of the performance spectrum.\n await timeout(3500);\n }\n }\n if (this._notifyAllClients) {\n const windows = await self.clients.matchAll({ type: 'window' });\n for (const win of windows) {\n win.postMessage(messageData);\n }\n }\n else {\n // See https://github.com/GoogleChrome/workbox/issues/2895\n if (options.event instanceof FetchEvent) {\n const client = await self.clients.get(options.event.clientId);\n client === null || client === void 0 ? void 0 : client.postMessage(messageData);\n }\n }\n }\n }\n}\nexport { BroadcastCacheUpdate };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { BroadcastCacheUpdate, } from './BroadcastCacheUpdate.js';\nimport './_version.js';\n/**\n * This plugin will automatically broadcast a message whenever a cached response\n * is updated.\n *\n * @memberof workbox-broadcast-update\n */\nclass BroadcastUpdatePlugin {\n /**\n * Construct a {@link workbox-broadcast-update.BroadcastUpdate} instance with\n * the passed options and calls its `notifyIfUpdated` method whenever the\n * plugin's `cacheDidUpdate` callback is invoked.\n *\n * @param {Object} [options]\n * @param {Array} [options.headersToCheck=['content-length', 'etag', 'last-modified']]\n * A list of headers that will be used to determine whether the responses\n * differ.\n * @param {string} [options.generatePayload] A function whose return value\n * will be used as the `payload` field in any cache update messages sent\n * to the window clients.\n */\n constructor(options) {\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox-sw` and `workbox-runtime-caching` handlers when an entry is\n * added to a cache.\n *\n * @private\n * @param {Object} options The input object to this function.\n * @param {string} options.cacheName Name of the cache being updated.\n * @param {Response} [options.oldResponse] The previous cached value, if any.\n * @param {Response} options.newResponse The new value in the cache.\n * @param {Request} options.request The request that triggered the update.\n * @param {Request} options.event The event that triggered the update.\n */\n this.cacheDidUpdate = async (options) => {\n dontWaitFor(this._broadcastUpdate.notifyIfUpdated(options));\n };\n this._broadcastUpdate = new BroadcastCacheUpdate(options);\n }\n}\nexport { BroadcastUpdatePlugin };\n"],"names":["self","_","e","responsesAreSame","firstResponse","secondResponse","headersToCheck","Response","WorkboxError","atLeastOneHeaderAvailable","some","header","headers","has","logger","warn","debug","every","headerStateComparison","headerValueComparison","get","CACHE_UPDATED_MESSAGE_TYPE","CACHE_UPDATED_MESSAGE_META","NOTIFY_ALL_CLIENTS","DEFAULT_HEADERS_TO_CHECK","isSafari","test","navigator","userAgent","defaultPayloadGenerator","data","cacheName","updatedURL","request","url","BroadcastCacheUpdate","constructor","generatePayload","notifyAllClients","_headersToCheck","_generatePayload","_notifyAllClients","notifyIfUpdated","options","assert","isType","moduleName","className","funcName","paramName","isInstance","newResponse","Request","oldResponse","log","messageData","type","meta","payload","mode","resultingClientId","event","FetchEvent","resultingWin","resultingClientExists","timeout","windows","clients","matchAll","win","postMessage","client","clientId","BroadcastUpdatePlugin","cacheDidUpdate","dontWaitFor","_broadcastUpdate"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,gCAAgC,CAAC,IAAIC,CAAC,EAAE;IACjD,CAAC,CACD,OAAOC,CAAC,EAA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ACO,OAAO,EAAE;IACjB;IACR;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACQ,IAAA,IAAI,CAAC+B,cAAc,GAAG,MAAO/B,OAAO,IAAK;UACrCgC,0BAAW,CAAC,IAAI,CAACC,gBAAgB,CAAClC,eAAe,CAACC,OAAO,CAAC,CAAC;QAC/D,CAAC;IACD,IAAA,IAAI,CAACiC,gBAAgB,GAAG,IAAIzC,oBAAoB,CAACQ,OAAO,CAAC;IAC7D,EAAA;IACJ;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-broadcast-update.prod.js b/docs/workbox-v7.4.1/workbox-broadcast-update.prod.js deleted file mode 100644 index 8f062c89..00000000 --- a/docs/workbox-v7.4.1/workbox-broadcast-update.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.broadcastUpdate=function(t,s,a,e){"use strict";try{self["workbox:broadcast-update:7.4.0"]&&_()}catch(t){}const n=(t,s,a)=>!a.some((a=>t.headers.has(a)&&s.headers.has(a)))||a.every((a=>{const e=t.headers.has(a)===s.headers.has(a),n=t.headers.get(a)===s.headers.get(a);return e&&n})),i=["content-length","etag","last-modified"],o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function c(t){return{cacheName:t.cacheName,updatedURL:t.request.url}}class r{constructor({generatePayload:t,headersToCheck:s,notifyAllClients:a}={}){this.ht=s||i,this.ft=t||c,this.lt=null==a||a}async notifyIfUpdated(t){if(t.oldResponse&&!n(t.oldResponse,t.newResponse,this.ht)){const e={type:"CACHE_UPDATED",meta:"workbox-broadcast-update",payload:this.ft(t)};if("navigate"===t.request.mode){let e;t.event instanceof FetchEvent&&(e=t.event.resultingClientId);await a.resultingClientExists(e)&&!o||await s.timeout(3500)}if(this.lt){const t=await self.clients.matchAll({type:"window"});for(const s of t)s.postMessage(e)}else if(t.event instanceof FetchEvent){const s=await self.clients.get(t.event.clientId);null==s||s.postMessage(e)}}}}return t.BroadcastCacheUpdate=r,t.BroadcastUpdatePlugin=class{constructor(t){this.cacheDidUpdate=async t=>{e.dontWaitFor(this.dt.notifyIfUpdated(t))},this.dt=new r(t)}},t.responsesAreSame=n,t}({},workbox.core._private,workbox.core._private,workbox.core._private); -//# sourceMappingURL=workbox-broadcast-update.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-broadcast-update.prod.js.map b/docs/workbox-v7.4.1/workbox-broadcast-update.prod.js.map deleted file mode 100644 index f7c6ea56..00000000 --- a/docs/workbox-v7.4.1/workbox-broadcast-update.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-broadcast-update.prod.js","sources":["../_version.js","../responsesAreSame.js","../utils/constants.js","../BroadcastCacheUpdate.js","../BroadcastUpdatePlugin.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:broadcast-update:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport './_version.js';\n/**\n * Given two `Response's`, compares several header values to see if they are\n * the same or not.\n *\n * @param {Response} firstResponse\n * @param {Response} secondResponse\n * @param {Array} headersToCheck\n * @return {boolean}\n *\n * @memberof workbox-broadcast-update\n */\nconst responsesAreSame = (firstResponse, secondResponse, headersToCheck) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(firstResponse instanceof Response && secondResponse instanceof Response)) {\n throw new WorkboxError('invalid-responses-are-same-args');\n }\n }\n const atLeastOneHeaderAvailable = headersToCheck.some((header) => {\n return (firstResponse.headers.has(header) && secondResponse.headers.has(header));\n });\n if (!atLeastOneHeaderAvailable) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to determine where the response has been updated ` +\n `because none of the headers that would be checked are present.`);\n logger.debug(`Attempting to compare the following: `, firstResponse, secondResponse, headersToCheck);\n }\n // Just return true, indicating the that responses are the same, since we\n // can't determine otherwise.\n return true;\n }\n return headersToCheck.every((header) => {\n const headerStateComparison = firstResponse.headers.has(header) === secondResponse.headers.has(header);\n const headerValueComparison = firstResponse.headers.get(header) === secondResponse.headers.get(header);\n return headerStateComparison && headerValueComparison;\n });\n};\nexport { responsesAreSame };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nexport const CACHE_UPDATED_MESSAGE_TYPE = 'CACHE_UPDATED';\nexport const CACHE_UPDATED_MESSAGE_META = 'workbox-broadcast-update';\nexport const NOTIFY_ALL_CLIENTS = true;\nexport const DEFAULT_HEADERS_TO_CHECK = [\n 'content-length',\n 'etag',\n 'last-modified',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { timeout } from 'workbox-core/_private/timeout.js';\nimport { resultingClientExists } from 'workbox-core/_private/resultingClientExists.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { responsesAreSame } from './responsesAreSame.js';\nimport { CACHE_UPDATED_MESSAGE_META, CACHE_UPDATED_MESSAGE_TYPE, DEFAULT_HEADERS_TO_CHECK, NOTIFY_ALL_CLIENTS, } from './utils/constants.js';\nimport './_version.js';\n// UA-sniff Safari: https://stackoverflow.com/questions/7944460/detect-safari-browser\n// TODO(philipwalton): remove once this Safari bug fix has been released.\n// https://bugs.webkit.org/show_bug.cgi?id=201169\nconst isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n/**\n * Generates the default payload used in update messages. By default the\n * payload includes the `cacheName` and `updatedURL` fields.\n *\n * @return Object\n * @private\n */\nfunction defaultPayloadGenerator(data) {\n return {\n cacheName: data.cacheName,\n updatedURL: data.request.url,\n };\n}\n/**\n * Uses the `postMessage()` API to inform any open windows/tabs when a cached\n * response has been updated.\n *\n * For efficiency's sake, the underlying response bodies are not compared;\n * only specific response headers are checked.\n *\n * @memberof workbox-broadcast-update\n */\nclass BroadcastCacheUpdate {\n /**\n * Construct a BroadcastCacheUpdate instance with a specific `channelName` to\n * broadcast messages on\n *\n * @param {Object} [options]\n * @param {Array} [options.headersToCheck=['content-length', 'etag', 'last-modified']]\n * A list of headers that will be used to determine whether the responses\n * differ.\n * @param {string} [options.generatePayload] A function whose return value\n * will be used as the `payload` field in any cache update messages sent\n * to the window clients.\n * @param {boolean} [options.notifyAllClients=true] If true (the default) then\n * all open clients will receive a message. If false, then only the client\n * that make the original request will be notified of the update.\n */\n constructor({ generatePayload, headersToCheck, notifyAllClients, } = {}) {\n this._headersToCheck = headersToCheck || DEFAULT_HEADERS_TO_CHECK;\n this._generatePayload = generatePayload || defaultPayloadGenerator;\n this._notifyAllClients = notifyAllClients !== null && notifyAllClients !== void 0 ? notifyAllClients : NOTIFY_ALL_CLIENTS;\n }\n /**\n * Compares two [Responses](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * and sends a message (via `postMessage()`) to all window clients if the\n * responses differ. Neither of the Responses can be\n * [opaque](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses).\n *\n * The message that's posted has the following format (where `payload` can\n * be customized via the `generatePayload` option the instance is created\n * with):\n *\n * ```\n * {\n * type: 'CACHE_UPDATED',\n * meta: 'workbox-broadcast-update',\n * payload: {\n * cacheName: 'the-cache-name',\n * updatedURL: 'https://example.com/'\n * }\n * }\n * ```\n *\n * @param {Object} options\n * @param {Response} [options.oldResponse] Cached response to compare.\n * @param {Response} options.newResponse Possibly updated response to compare.\n * @param {Request} options.request The request.\n * @param {string} options.cacheName Name of the cache the responses belong\n * to. This is included in the broadcast message.\n * @param {Event} options.event event The event that triggered\n * this possible cache update.\n * @return {Promise} Resolves once the update is sent.\n */\n async notifyIfUpdated(options) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(options.cacheName, 'string', {\n moduleName: 'workbox-broadcast-update',\n className: 'BroadcastCacheUpdate',\n funcName: 'notifyIfUpdated',\n paramName: 'cacheName',\n });\n assert.isInstance(options.newResponse, Response, {\n moduleName: 'workbox-broadcast-update',\n className: 'BroadcastCacheUpdate',\n funcName: 'notifyIfUpdated',\n paramName: 'newResponse',\n });\n assert.isInstance(options.request, Request, {\n moduleName: 'workbox-broadcast-update',\n className: 'BroadcastCacheUpdate',\n funcName: 'notifyIfUpdated',\n paramName: 'request',\n });\n }\n // Without two responses there is nothing to compare.\n if (!options.oldResponse) {\n return;\n }\n if (!responsesAreSame(options.oldResponse, options.newResponse, this._headersToCheck)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Newer response found (and cached) for:`, options.request.url);\n }\n const messageData = {\n type: CACHE_UPDATED_MESSAGE_TYPE,\n meta: CACHE_UPDATED_MESSAGE_META,\n payload: this._generatePayload(options),\n };\n // For navigation requests, wait until the new window client exists\n // before sending the message\n if (options.request.mode === 'navigate') {\n let resultingClientId;\n if (options.event instanceof FetchEvent) {\n resultingClientId = options.event.resultingClientId;\n }\n const resultingWin = await resultingClientExists(resultingClientId);\n // Safari does not currently implement postMessage buffering and\n // there's no good way to feature detect that, so to increase the\n // chances of the message being delivered in Safari, we add a timeout.\n // We also do this if `resultingClientExists()` didn't return a client,\n // which means it timed out, so it's worth waiting a bit longer.\n if (!resultingWin || isSafari) {\n // 3500 is chosen because (according to CrUX data) 80% of mobile\n // websites hit the DOMContentLoaded event in less than 3.5 seconds.\n // And presumably sites implementing service worker are on the\n // higher end of the performance spectrum.\n await timeout(3500);\n }\n }\n if (this._notifyAllClients) {\n const windows = await self.clients.matchAll({ type: 'window' });\n for (const win of windows) {\n win.postMessage(messageData);\n }\n }\n else {\n // See https://github.com/GoogleChrome/workbox/issues/2895\n if (options.event instanceof FetchEvent) {\n const client = await self.clients.get(options.event.clientId);\n client === null || client === void 0 ? void 0 : client.postMessage(messageData);\n }\n }\n }\n }\n}\nexport { BroadcastCacheUpdate };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { BroadcastCacheUpdate, } from './BroadcastCacheUpdate.js';\nimport './_version.js';\n/**\n * This plugin will automatically broadcast a message whenever a cached response\n * is updated.\n *\n * @memberof workbox-broadcast-update\n */\nclass BroadcastUpdatePlugin {\n /**\n * Construct a {@link workbox-broadcast-update.BroadcastUpdate} instance with\n * the passed options and calls its `notifyIfUpdated` method whenever the\n * plugin's `cacheDidUpdate` callback is invoked.\n *\n * @param {Object} [options]\n * @param {Array} [options.headersToCheck=['content-length', 'etag', 'last-modified']]\n * A list of headers that will be used to determine whether the responses\n * differ.\n * @param {string} [options.generatePayload] A function whose return value\n * will be used as the `payload` field in any cache update messages sent\n * to the window clients.\n */\n constructor(options) {\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox-sw` and `workbox-runtime-caching` handlers when an entry is\n * added to a cache.\n *\n * @private\n * @param {Object} options The input object to this function.\n * @param {string} options.cacheName Name of the cache being updated.\n * @param {Response} [options.oldResponse] The previous cached value, if any.\n * @param {Response} options.newResponse The new value in the cache.\n * @param {Request} options.request The request that triggered the update.\n * @param {Request} options.event The event that triggered the update.\n */\n this.cacheDidUpdate = async (options) => {\n dontWaitFor(this._broadcastUpdate.notifyIfUpdated(options));\n };\n this._broadcastUpdate = new BroadcastCacheUpdate(options);\n }\n}\nexport { BroadcastUpdatePlugin };\n"],"names":["self","_","e","responsesAreSame","firstResponse","secondResponse","headersToCheck","some","header","headers","has","every","headerStateComparison","headerValueComparison","get","DEFAULT_HEADERS_TO_CHECK","isSafari","test","navigator","userAgent","defaultPayloadGenerator","data","cacheName","updatedURL","request","url","BroadcastCacheUpdate","constructor","generatePayload","notifyAllClients","this","_headersToCheck","_generatePayload","_notifyAllClients","async","options","oldResponse","newResponse","messageData","type","meta","payload","mode","resultingClientId","event","FetchEvent","resultingClientExists","timeout","windows","clients","matchAll","win","postMessage","client","clientId","cacheDidUpdate","dontWaitFor","_broadcastUpdate","notifyIfUpdated"],"mappings":"0FAEA,IACIA,KAAK,mCAAqCC,GAC9C,CACA,MAAOC,GAAK,CCgBZ,MAAMC,EAAmBA,CAACC,EAAeC,EAAgBC,KAMnBA,EAAeC,MAAMC,GAC3CJ,EAAcK,QAAQC,IAAIF,IAAWH,EAAeI,QAAQC,IAAIF,MAYrEF,EAAeK,OAAOH,IACzB,MAAMI,EAAwBR,EAAcK,QAAQC,IAAIF,KAAYH,EAAeI,QAAQC,IAAIF,GACzFK,EAAwBT,EAAcK,QAAQK,IAAIN,KAAYH,EAAeI,QAAQK,IAAIN,GAC/F,OAAOI,GAAyBC,CAAqB,IChChDE,EAA2B,CACpC,iBACA,OACA,iBCGEC,EAAW,iCAAiCC,KAAKC,UAAUC,WAQjE,SAASC,EAAwBC,GAC7B,MAAO,CACHC,UAAWD,EAAKC,UAChBC,WAAYF,EAAKG,QAAQC,IAEjC,CAUA,MAAMC,EAgBFC,aAAYC,gBAAEA,EAAetB,eAAEA,EAAcuB,iBAAEA,GAAsB,IACjEC,KAAKC,GAAkBzB,GAAkBS,EACzCe,KAAKE,GAAmBJ,GAAmBR,EAC3CU,KAAKG,GAAoBJ,SAA2DA,CACxF,CAgCAK,sBAAsBC,GAsBlB,GAAKA,EAAQC,cAGRjC,EAAiBgC,EAAQC,YAAaD,EAAQE,YAAaP,KAAKC,IAAkB,CAInF,MAAMO,EAAc,CAChBC,KDlH0B,gBCmH1BC,KDlH0B,2BCmH1BC,QAASX,KAAKE,GAAiBG,IAInC,GAA6B,aAAzBA,EAAQX,QAAQkB,KAAqB,CACrC,IAAIC,EACAR,EAAQS,iBAAiBC,aACzBF,EAAoBR,EAAQS,MAAMD,yBAEXG,EAAAA,sBAAsBH,KAM5B3B,SAKX+B,EAAAA,QAAQ,KAEtB,CACA,GAAIjB,KAAKG,GAAmB,CACxB,MAAMe,QAAgBhD,KAAKiD,QAAQC,SAAS,CAAEX,KAAM,WACpD,IAAK,MAAMY,KAAOH,EACdG,EAAIC,YAAYd,EAExB,MAGI,GAAIH,EAAQS,iBAAiBC,WAAY,CACrC,MAAMQ,QAAerD,KAAKiD,QAAQnC,IAAIqB,EAAQS,MAAMU,UACpDD,SAAgDA,EAAOD,YAAYd,EACvE,CAER,CACJ,0DCjJJ,MAcIX,YAAYQ,GAcRL,KAAKyB,eAAiBrB,UAClBsB,EAAAA,YAAY1B,KAAK2B,GAAiBC,gBAAgBvB,GAAS,EAE/DL,KAAK2B,GAAmB,IAAI/B,EAAqBS,EACrD"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-cacheable-response.dev.js b/docs/workbox-v7.4.1/workbox-cacheable-response.dev.js deleted file mode 100644 index f2d2f9ff..00000000 --- a/docs/workbox-v7.4.1/workbox-cacheable-response.dev.js +++ /dev/null @@ -1,176 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.cacheableResponse = (function (exports, assert_js, WorkboxError_js, getFriendlyURL_js, logger_js) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:cacheable-response:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * This class allows you to set up rules determining what - * status codes and/or headers need to be present in order for a - * [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) - * to be considered cacheable. - * - * @memberof workbox-cacheable-response - */ - class CacheableResponse { - /** - * To construct a new CacheableResponse instance you must provide at least - * one of the `config` properties. - * - * If both `statuses` and `headers` are specified, then both conditions must - * be met for the `Response` to be considered cacheable. - * - * @param {Object} config - * @param {Array} [config.statuses] One or more status codes that a - * `Response` can have and be considered cacheable. - * @param {Object} [config.headers] A mapping of header names - * and expected values that a `Response` can have and be considered cacheable. - * If multiple headers are provided, only one needs to be present. - */ - constructor(config = {}) { - { - if (!(config.statuses || config.headers)) { - throw new WorkboxError_js.WorkboxError('statuses-or-headers-required', { - moduleName: 'workbox-cacheable-response', - className: 'CacheableResponse', - funcName: 'constructor' - }); - } - if (config.statuses) { - assert_js.assert.isArray(config.statuses, { - moduleName: 'workbox-cacheable-response', - className: 'CacheableResponse', - funcName: 'constructor', - paramName: 'config.statuses' - }); - } - if (config.headers) { - assert_js.assert.isType(config.headers, 'object', { - moduleName: 'workbox-cacheable-response', - className: 'CacheableResponse', - funcName: 'constructor', - paramName: 'config.headers' - }); - } - } - this._statuses = config.statuses; - this._headers = config.headers; - } - /** - * Checks a response to see whether it's cacheable or not, based on this - * object's configuration. - * - * @param {Response} response The response whose cacheability is being - * checked. - * @return {boolean} `true` if the `Response` is cacheable, and `false` - * otherwise. - */ - isResponseCacheable(response) { - { - assert_js.assert.isInstance(response, Response, { - moduleName: 'workbox-cacheable-response', - className: 'CacheableResponse', - funcName: 'isResponseCacheable', - paramName: 'response' - }); - } - let cacheable = true; - if (this._statuses) { - cacheable = this._statuses.includes(response.status); - } - if (this._headers && cacheable) { - cacheable = Object.keys(this._headers).some(headerName => { - return response.headers.get(headerName) === this._headers[headerName]; - }); - } - { - if (!cacheable) { - logger_js.logger.groupCollapsed(`The request for ` + `'${getFriendlyURL_js.getFriendlyURL(response.url)}' returned a response that does ` + `not meet the criteria for being cached.`); - logger_js.logger.groupCollapsed(`View cacheability criteria here.`); - logger_js.logger.log(`Cacheable statuses: ` + JSON.stringify(this._statuses)); - logger_js.logger.log(`Cacheable headers: ` + JSON.stringify(this._headers, null, 2)); - logger_js.logger.groupEnd(); - const logFriendlyHeaders = {}; - response.headers.forEach((value, key) => { - logFriendlyHeaders[key] = value; - }); - logger_js.logger.groupCollapsed(`View response status and headers here.`); - logger_js.logger.log(`Response status: ${response.status}`); - logger_js.logger.log(`Response headers: ` + JSON.stringify(logFriendlyHeaders, null, 2)); - logger_js.logger.groupEnd(); - logger_js.logger.groupCollapsed(`View full response details here.`); - logger_js.logger.log(response.headers); - logger_js.logger.log(response); - logger_js.logger.groupEnd(); - logger_js.logger.groupEnd(); - } - } - return cacheable; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it - * easier to add in cacheability checks to requests made via Workbox's built-in - * strategies. - * - * @memberof workbox-cacheable-response - */ - class CacheableResponsePlugin { - /** - * To construct a new CacheableResponsePlugin instance you must provide at - * least one of the `config` properties. - * - * If both `statuses` and `headers` are specified, then both conditions must - * be met for the `Response` to be considered cacheable. - * - * @param {Object} config - * @param {Array} [config.statuses] One or more status codes that a - * `Response` can have and be considered cacheable. - * @param {Object} [config.headers] A mapping of header names - * and expected values that a `Response` can have and be considered cacheable. - * If multiple headers are provided, only one needs to be present. - */ - constructor(config) { - /** - * @param {Object} options - * @param {Response} options.response - * @return {Response|null} - * @private - */ - this.cacheWillUpdate = async ({ - response - }) => { - if (this._cacheableResponse.isResponseCacheable(response)) { - return response; - } - return null; - }; - this._cacheableResponse = new CacheableResponse(config); - } - } - - exports.CacheableResponse = CacheableResponse; - exports.CacheableResponsePlugin = CacheableResponsePlugin; - - return exports; - -})({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private); -//# sourceMappingURL=workbox-cacheable-response.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-cacheable-response.dev.js.map b/docs/workbox-v7.4.1/workbox-cacheable-response.dev.js.map deleted file mode 100644 index 7c0b6516..00000000 --- a/docs/workbox-v7.4.1/workbox-cacheable-response.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-cacheable-response.dev.js","sources":["../_version.js","../CacheableResponse.js","../CacheableResponsePlugin.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:cacheable-response:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport './_version.js';\n/**\n * This class allows you to set up rules determining what\n * status codes and/or headers need to be present in order for a\n * [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * to be considered cacheable.\n *\n * @memberof workbox-cacheable-response\n */\nclass CacheableResponse {\n /**\n * To construct a new CacheableResponse instance you must provide at least\n * one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.statuses || config.headers)) {\n throw new WorkboxError('statuses-or-headers-required', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n });\n }\n if (config.statuses) {\n assert.isArray(config.statuses, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.statuses',\n });\n }\n if (config.headers) {\n assert.isType(config.headers, 'object', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.headers',\n });\n }\n }\n this._statuses = config.statuses;\n this._headers = config.headers;\n }\n /**\n * Checks a response to see whether it's cacheable or not, based on this\n * object's configuration.\n *\n * @param {Response} response The response whose cacheability is being\n * checked.\n * @return {boolean} `true` if the `Response` is cacheable, and `false`\n * otherwise.\n */\n isResponseCacheable(response) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(response, Response, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'isResponseCacheable',\n paramName: 'response',\n });\n }\n let cacheable = true;\n if (this._statuses) {\n cacheable = this._statuses.includes(response.status);\n }\n if (this._headers && cacheable) {\n cacheable = Object.keys(this._headers).some((headerName) => {\n return response.headers.get(headerName) === this._headers[headerName];\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!cacheable) {\n logger.groupCollapsed(`The request for ` +\n `'${getFriendlyURL(response.url)}' returned a response that does ` +\n `not meet the criteria for being cached.`);\n logger.groupCollapsed(`View cacheability criteria here.`);\n logger.log(`Cacheable statuses: ` + JSON.stringify(this._statuses));\n logger.log(`Cacheable headers: ` + JSON.stringify(this._headers, null, 2));\n logger.groupEnd();\n const logFriendlyHeaders = {};\n response.headers.forEach((value, key) => {\n logFriendlyHeaders[key] = value;\n });\n logger.groupCollapsed(`View response status and headers here.`);\n logger.log(`Response status: ${response.status}`);\n logger.log(`Response headers: ` + JSON.stringify(logFriendlyHeaders, null, 2));\n logger.groupEnd();\n logger.groupCollapsed(`View full response details here.`);\n logger.log(response.headers);\n logger.log(response);\n logger.groupEnd();\n logger.groupEnd();\n }\n }\n return cacheable;\n }\n}\nexport { CacheableResponse };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { CacheableResponse, } from './CacheableResponse.js';\nimport './_version.js';\n/**\n * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it\n * easier to add in cacheability checks to requests made via Workbox's built-in\n * strategies.\n *\n * @memberof workbox-cacheable-response\n */\nclass CacheableResponsePlugin {\n /**\n * To construct a new CacheableResponsePlugin instance you must provide at\n * least one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config) {\n /**\n * @param {Object} options\n * @param {Response} options.response\n * @return {Response|null}\n * @private\n */\n this.cacheWillUpdate = async ({ response }) => {\n if (this._cacheableResponse.isResponseCacheable(response)) {\n return response;\n }\n return null;\n };\n this._cacheableResponse = new CacheableResponse(config);\n }\n}\nexport { CacheableResponsePlugin };\n"],"names":["self","_","e","CacheableResponse","constructor","config","statuses","headers","WorkboxError","moduleName","className","funcName","assert","isArray","paramName","isType","_statuses","_headers","isResponseCacheable","response","isInstance","Response","cacheable","includes","status","Object","keys","some","headerName","get","logger","groupCollapsed","getFriendlyURL","url","log","JSON","stringify","groupEnd","logFriendlyHeaders","forEach","value","key","CacheableResponsePlugin","cacheWillUpdate","_cacheableResponse"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,kCAAkC,CAAC,IAAIC,CAAC,EAAE;IACnD,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;ICLZ;IACA;;IAEA;IACA;IACA;IACA;IAMA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAMC,iBAAiB,CAAC;IACpB;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACIC,EAAAA,WAAWA,CAACC,MAAM,GAAG,EAAE,EAAE;IACrB,IAA2C;UACvC,IAAI,EAAEA,MAAM,CAACC,QAAQ,IAAID,MAAM,CAACE,OAAO,CAAC,EAAE;IACtC,QAAA,MAAM,IAAIC,4BAAY,CAAC,8BAA8B,EAAE;IACnDC,UAAAA,UAAU,EAAE,4BAA4B;IACxCC,UAAAA,SAAS,EAAE,mBAAmB;IAC9BC,UAAAA,QAAQ,EAAE;IACd,SAAC,CAAC;IACN,MAAA;UACA,IAAIN,MAAM,CAACC,QAAQ,EAAE;IACjBM,QAAAA,gBAAM,CAACC,OAAO,CAACR,MAAM,CAACC,QAA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EAAE;IACjBP,QAAAA,gBAAM,CAACC,cAAc,CAAE,CAAA,gCAAA,CAAiC,CAAC;IACzDD,QAAAA,gBAAM,CAACI,GAAG,CAACf,QAAQ,CAACZ,OAAO,CAAC;IAC5BuB,QAAAA,gBAAM,CAACI,GAAG,CAACf,QAAQ,CAAC;YACpBW,gBAAM,CAACO,QAAQ,EAAE;YACjBP,gBAAM,CAACO,QAAQ,EAAE;IACrB,MAAA;IACJ,IAAA;IACA,IAAA,OAAOf,SAAS;IACpB,EAAA;IACJ;;ICrHA;IACA;;IAEA;IACA;IACA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAMoB,uBAAuB,CAAC;IAC1B;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACItC,WAAWA,CAACC,MAAM,EAAE;IAChB;IACR;IACA;IACA;IACA;IACA;QACQ,IAAI,CAACsC,eAAe,GAAG,OAAO;IAAExB,MAAAA;IAAS,KAAC,KAAK;UAC3C,IAAI,IAAI,CAACyB,kBAAkB,CAAC1B,mBAAmB,CAACC,QAAQ,CAAC,EAAE;IACvD,QAAA,OAAOA,QAAQ;IACnB,MAAA;IACA,MAAA,OAAO,IAAI;QACf,CAAC;IACD,IAAA,IAAI,CAACyB,kBAAkB,GAAG,IAAIzC,iBAAiB,CAACE,MAAM,CAAC;IAC3D,EAAA;IACJ;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-cacheable-response.prod.js b/docs/workbox-v7.4.1/workbox-cacheable-response.prod.js deleted file mode 100644 index 7cea515d..00000000 --- a/docs/workbox-v7.4.1/workbox-cacheable-response.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.cacheableResponse=function(s){"use strict";try{self["workbox:cacheable-response:7.4.0"]&&_()}catch(s){}class t{constructor(s={}){this.ss=s.statuses,this.ts=s.headers}isResponseCacheable(s){let t=!0;return this.ss&&(t=this.ss.includes(s.status)),this.ts&&t&&(t=Object.keys(this.ts).some((t=>s.headers.get(t)===this.ts[t]))),t}}return s.CacheableResponse=t,s.CacheableResponsePlugin=class{constructor(s){this.cacheWillUpdate=async({response:s})=>this.hs.isResponseCacheable(s)?s:null,this.hs=new t(s)}},s}({}); -//# sourceMappingURL=workbox-cacheable-response.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-cacheable-response.prod.js.map b/docs/workbox-v7.4.1/workbox-cacheable-response.prod.js.map deleted file mode 100644 index d19f92b8..00000000 --- a/docs/workbox-v7.4.1/workbox-cacheable-response.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-cacheable-response.prod.js","sources":["../_version.js","../CacheableResponse.js","../CacheableResponsePlugin.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:cacheable-response:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport './_version.js';\n/**\n * This class allows you to set up rules determining what\n * status codes and/or headers need to be present in order for a\n * [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * to be considered cacheable.\n *\n * @memberof workbox-cacheable-response\n */\nclass CacheableResponse {\n /**\n * To construct a new CacheableResponse instance you must provide at least\n * one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.statuses || config.headers)) {\n throw new WorkboxError('statuses-or-headers-required', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n });\n }\n if (config.statuses) {\n assert.isArray(config.statuses, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.statuses',\n });\n }\n if (config.headers) {\n assert.isType(config.headers, 'object', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.headers',\n });\n }\n }\n this._statuses = config.statuses;\n this._headers = config.headers;\n }\n /**\n * Checks a response to see whether it's cacheable or not, based on this\n * object's configuration.\n *\n * @param {Response} response The response whose cacheability is being\n * checked.\n * @return {boolean} `true` if the `Response` is cacheable, and `false`\n * otherwise.\n */\n isResponseCacheable(response) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(response, Response, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'isResponseCacheable',\n paramName: 'response',\n });\n }\n let cacheable = true;\n if (this._statuses) {\n cacheable = this._statuses.includes(response.status);\n }\n if (this._headers && cacheable) {\n cacheable = Object.keys(this._headers).some((headerName) => {\n return response.headers.get(headerName) === this._headers[headerName];\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!cacheable) {\n logger.groupCollapsed(`The request for ` +\n `'${getFriendlyURL(response.url)}' returned a response that does ` +\n `not meet the criteria for being cached.`);\n logger.groupCollapsed(`View cacheability criteria here.`);\n logger.log(`Cacheable statuses: ` + JSON.stringify(this._statuses));\n logger.log(`Cacheable headers: ` + JSON.stringify(this._headers, null, 2));\n logger.groupEnd();\n const logFriendlyHeaders = {};\n response.headers.forEach((value, key) => {\n logFriendlyHeaders[key] = value;\n });\n logger.groupCollapsed(`View response status and headers here.`);\n logger.log(`Response status: ${response.status}`);\n logger.log(`Response headers: ` + JSON.stringify(logFriendlyHeaders, null, 2));\n logger.groupEnd();\n logger.groupCollapsed(`View full response details here.`);\n logger.log(response.headers);\n logger.log(response);\n logger.groupEnd();\n logger.groupEnd();\n }\n }\n return cacheable;\n }\n}\nexport { CacheableResponse };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { CacheableResponse, } from './CacheableResponse.js';\nimport './_version.js';\n/**\n * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it\n * easier to add in cacheability checks to requests made via Workbox's built-in\n * strategies.\n *\n * @memberof workbox-cacheable-response\n */\nclass CacheableResponsePlugin {\n /**\n * To construct a new CacheableResponsePlugin instance you must provide at\n * least one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config) {\n /**\n * @param {Object} options\n * @param {Response} options.response\n * @return {Response|null}\n * @private\n */\n this.cacheWillUpdate = async ({ response }) => {\n if (this._cacheableResponse.isResponseCacheable(response)) {\n return response;\n }\n return null;\n };\n this._cacheableResponse = new CacheableResponse(config);\n }\n}\nexport { CacheableResponsePlugin };\n"],"names":["self","_","e","CacheableResponse","constructor","config","this","_statuses","statuses","_headers","headers","isResponseCacheable","response","cacheable","includes","status","Object","keys","some","headerName","get","cacheWillUpdate","async","_cacheableResponse"],"mappings":"sFAEA,IACIA,KAAK,qCAAuCC,GAChD,CACA,MAAOC,GAAK,CCeZ,MAAMC,EAeFC,YAAYC,EAAS,IA0BjBC,KAAKC,GAAYF,EAAOG,SACxBF,KAAKG,GAAWJ,EAAOK,OAC3B,CAUAC,oBAAoBC,GAShB,IAAIC,GAAY,EAiChB,OAhCIP,KAAKC,KACLM,EAAYP,KAAKC,GAAUO,SAASF,EAASG,SAE7CT,KAAKG,IAAYI,IACjBA,EAAYG,OAAOC,KAAKX,KAAKG,IAAUS,MAAMC,GAClCP,EAASF,QAAQU,IAAID,KAAgBb,KAAKG,GAASU,MA2B3DN,CACX,yDCpGJ,MAeIT,YAAYC,GAORC,KAAKe,gBAAkBC,OAASV,cACxBN,KAAKiB,GAAmBZ,oBAAoBC,GACrCA,EAEJ,KAEXN,KAAKiB,GAAqB,IAAIpB,EAAkBE,EACpD"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-core.dev.js b/docs/workbox-v7.4.1/workbox-core.dev.js deleted file mode 100644 index c8a79aa0..00000000 --- a/docs/workbox-v7.4.1/workbox-core.dev.js +++ /dev/null @@ -1,1060 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.core = (function (exports) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:core:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const logger = (() => { - // Don't overwrite this value if it's already set. - // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923 - if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) { - self.__WB_DISABLE_DEV_LOGS = false; - } - let inGroup = false; - const methodToColorMap = { - debug: `#7f8c8d`, - log: `#2ecc71`, - warn: `#f39c12`, - error: `#c0392b`, - groupCollapsed: `#3498db`, - groupEnd: null // No colored prefix on groupEnd - }; - const print = function (method, args) { - if (self.__WB_DISABLE_DEV_LOGS) { - return; - } - if (method === 'groupCollapsed') { - // Safari doesn't print all console.groupCollapsed() arguments: - // https://bugs.webkit.org/show_bug.cgi?id=182754 - if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { - console[method](...args); - return; - } - } - const styles = [`background: ${methodToColorMap[method]}`, `border-radius: 0.5em`, `color: white`, `font-weight: bold`, `padding: 2px 0.5em`]; - // When in a group, the workbox prefix is not displayed. - const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')]; - console[method](...logPrefix, ...args); - if (method === 'groupCollapsed') { - inGroup = true; - } - if (method === 'groupEnd') { - inGroup = false; - } - }; - // eslint-disable-next-line @typescript-eslint/ban-types - const api = {}; - const loggerMethods = Object.keys(methodToColorMap); - for (const key of loggerMethods) { - const method = key; - api[method] = (...args) => { - print(method, args); - }; - } - return api; - })(); - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const messages = { - 'invalid-value': ({ - paramName, - validValueDescription, - value - }) => { - if (!paramName || !validValueDescription) { - throw new Error(`Unexpected input to 'invalid-value' error.`); - } - return `The '${paramName}' parameter was given a value with an ` + `unexpected value. ${validValueDescription} Received a value of ` + `${JSON.stringify(value)}.`; - }, - 'not-an-array': ({ - moduleName, - className, - funcName, - paramName - }) => { - if (!moduleName || !className || !funcName || !paramName) { - throw new Error(`Unexpected input to 'not-an-array' error.`); - } - return `The parameter '${paramName}' passed into ` + `'${moduleName}.${className}.${funcName}()' must be an array.`; - }, - 'incorrect-type': ({ - expectedType, - paramName, - moduleName, - className, - funcName - }) => { - if (!expectedType || !paramName || !moduleName || !funcName) { - throw new Error(`Unexpected input to 'incorrect-type' error.`); - } - const classNameStr = className ? `${className}.` : ''; - return `The parameter '${paramName}' passed into ` + `'${moduleName}.${classNameStr}` + `${funcName}()' must be of type ${expectedType}.`; - }, - 'incorrect-class': ({ - expectedClassName, - paramName, - moduleName, - className, - funcName, - isReturnValueProblem - }) => { - if (!expectedClassName || !moduleName || !funcName) { - throw new Error(`Unexpected input to 'incorrect-class' error.`); - } - const classNameStr = className ? `${className}.` : ''; - if (isReturnValueProblem) { - return `The return value from ` + `'${moduleName}.${classNameStr}${funcName}()' ` + `must be an instance of class ${expectedClassName}.`; - } - return `The parameter '${paramName}' passed into ` + `'${moduleName}.${classNameStr}${funcName}()' ` + `must be an instance of class ${expectedClassName}.`; - }, - 'missing-a-method': ({ - expectedMethod, - paramName, - moduleName, - className, - funcName - }) => { - if (!expectedMethod || !paramName || !moduleName || !className || !funcName) { - throw new Error(`Unexpected input to 'missing-a-method' error.`); - } - return `${moduleName}.${className}.${funcName}() expected the ` + `'${paramName}' parameter to expose a '${expectedMethod}' method.`; - }, - 'add-to-cache-list-unexpected-type': ({ - entry - }) => { - return `An unexpected entry was passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' The entry ` + `'${JSON.stringify(entry)}' isn't supported. You must supply an array of ` + `strings with one or more characters, objects with a url property or ` + `Request objects.`; - }, - 'add-to-cache-list-conflicting-entries': ({ - firstEntry, - secondEntry - }) => { - if (!firstEntry || !secondEntry) { - throw new Error(`Unexpected input to ` + `'add-to-cache-list-duplicate-entries' error.`); - } - return `Two of the entries passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` + `${firstEntry} but different revision details. Workbox is ` + `unable to cache and version the asset correctly. Please remove one ` + `of the entries.`; - }, - 'plugin-error-request-will-fetch': ({ - thrownErrorMessage - }) => { - if (!thrownErrorMessage) { - throw new Error(`Unexpected input to ` + `'plugin-error-request-will-fetch', error.`); - } - return `An error was thrown by a plugins 'requestWillFetch()' method. ` + `The thrown error message was: '${thrownErrorMessage}'.`; - }, - 'invalid-cache-name': ({ - cacheNameId, - value - }) => { - if (!cacheNameId) { - throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`); - } - return `You must provide a name containing at least one character for ` + `setCacheDetails({${cacheNameId}: '...'}). Received a value of ` + `'${JSON.stringify(value)}'`; - }, - 'unregister-route-but-not-found-with-method': ({ - method - }) => { - if (!method) { - throw new Error(`Unexpected input to ` + `'unregister-route-but-not-found-with-method' error.`); - } - return `The route you're trying to unregister was not previously ` + `registered for the method type '${method}'.`; - }, - 'unregister-route-route-not-registered': () => { - return `The route you're trying to unregister was not previously ` + `registered.`; - }, - 'queue-replay-failed': ({ - name - }) => { - return `Replaying the background sync queue '${name}' failed.`; - }, - 'duplicate-queue-name': ({ - name - }) => { - return `The Queue name '${name}' is already being used. ` + `All instances of backgroundSync.Queue must be given unique names.`; - }, - 'expired-test-without-max-age': ({ - methodName, - paramName - }) => { - return `The '${methodName}()' method can only be used when the ` + `'${paramName}' is used in the constructor.`; - }, - 'unsupported-route-type': ({ - moduleName, - className, - funcName, - paramName - }) => { - return `The supplied '${paramName}' parameter was an unsupported type. ` + `Please check the docs for ${moduleName}.${className}.${funcName} for ` + `valid input types.`; - }, - 'not-array-of-class': ({ - value, - expectedClass, - moduleName, - className, - funcName, - paramName - }) => { - return `The supplied '${paramName}' parameter must be an array of ` + `'${expectedClass}' objects. Received '${JSON.stringify(value)},'. ` + `Please check the call to ${moduleName}.${className}.${funcName}() ` + `to fix the issue.`; - }, - 'max-entries-or-age-required': ({ - moduleName, - className, - funcName - }) => { - return `You must define either config.maxEntries or config.maxAgeSeconds` + `in ${moduleName}.${className}.${funcName}`; - }, - 'statuses-or-headers-required': ({ - moduleName, - className, - funcName - }) => { - return `You must define either config.statuses or config.headers` + `in ${moduleName}.${className}.${funcName}`; - }, - 'invalid-string': ({ - moduleName, - funcName, - paramName - }) => { - if (!paramName || !moduleName || !funcName) { - throw new Error(`Unexpected input to 'invalid-string' error.`); - } - return `When using strings, the '${paramName}' parameter must start with ` + `'http' (for cross-origin matches) or '/' (for same-origin matches). ` + `Please see the docs for ${moduleName}.${funcName}() for ` + `more info.`; - }, - 'channel-name-required': () => { - return `You must provide a channelName to construct a ` + `BroadcastCacheUpdate instance.`; - }, - 'invalid-responses-are-same-args': () => { - return `The arguments passed into responsesAreSame() appear to be ` + `invalid. Please ensure valid Responses are used.`; - }, - 'expire-custom-caches-only': () => { - return `You must provide a 'cacheName' property when using the ` + `expiration plugin with a runtime caching strategy.`; - }, - 'unit-must-be-bytes': ({ - normalizedRangeHeader - }) => { - if (!normalizedRangeHeader) { - throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`); - } - return `The 'unit' portion of the Range header must be set to 'bytes'. ` + `The Range header provided was "${normalizedRangeHeader}"`; - }, - 'single-range-only': ({ - normalizedRangeHeader - }) => { - if (!normalizedRangeHeader) { - throw new Error(`Unexpected input to 'single-range-only' error.`); - } - return `Multiple ranges are not supported. Please use a single start ` + `value, and optional end value. The Range header provided was ` + `"${normalizedRangeHeader}"`; - }, - 'invalid-range-values': ({ - normalizedRangeHeader - }) => { - if (!normalizedRangeHeader) { - throw new Error(`Unexpected input to 'invalid-range-values' error.`); - } - return `The Range header is missing both start and end values. At least ` + `one of those values is needed. The Range header provided was ` + `"${normalizedRangeHeader}"`; - }, - 'no-range-header': () => { - return `No Range header was found in the Request provided.`; - }, - 'range-not-satisfiable': ({ - size, - start, - end - }) => { - return `The start (${start}) and end (${end}) values in the Range are ` + `not satisfiable by the cached response, which is ${size} bytes.`; - }, - 'attempt-to-cache-non-get-request': ({ - url, - method - }) => { - return `Unable to cache '${url}' because it is a '${method}' request and ` + `only 'GET' requests can be cached.`; - }, - 'cache-put-with-no-response': ({ - url - }) => { - return `There was an attempt to cache '${url}' but the response was not ` + `defined.`; - }, - 'no-response': ({ - url, - error - }) => { - let message = `The strategy could not generate a response for '${url}'.`; - if (error) { - message += ` The underlying error is ${error}.`; - } - return message; - }, - 'bad-precaching-response': ({ - url, - status - }) => { - return `The precaching request for '${url}' failed` + (status ? ` with an HTTP status of ${status}.` : `.`); - }, - 'non-precached-url': ({ - url - }) => { - return `createHandlerBoundToURL('${url}') was called, but that URL is ` + `not precached. Please pass in a URL that is precached instead.`; - }, - 'add-to-cache-list-conflicting-integrities': ({ - url - }) => { - return `Two of the entries passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` + `${url} with different integrity values. Please remove one of them.`; - }, - 'missing-precache-entry': ({ - cacheName, - url - }) => { - return `Unable to find a precached response in ${cacheName} for ${url}.`; - }, - 'cross-origin-copy-response': ({ - origin - }) => { - return `workbox-core.copyResponse() can only be used with same-origin ` + `responses. It was passed a response with origin ${origin}.`; - }, - 'opaque-streams-source': ({ - type - }) => { - const message = `One of the workbox-streams sources resulted in an ` + `'${type}' response.`; - if (type === 'opaqueredirect') { - return `${message} Please do not use a navigation request that results ` + `in a redirect as a source.`; - } - return `${message} Please ensure your sources are CORS-enabled.`; - } - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const generatorFunction = (code, details = {}) => { - const message = messages[code]; - if (!message) { - throw new Error(`Unable to find message for code '${code}'.`); - } - return message(details); - }; - const messageGenerator = generatorFunction; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Workbox errors should be thrown with this class. - * This allows use to ensure the type easily in tests, - * helps developers identify errors from workbox - * easily and allows use to optimise error - * messages correctly. - * - * @private - */ - class WorkboxError extends Error { - /** - * - * @param {string} errorCode The error code that - * identifies this particular error. - * @param {Object=} details Any relevant arguments - * that will help developers identify issues should - * be added as a key on the context object. - */ - constructor(errorCode, details) { - const message = messageGenerator(errorCode, details); - super(message); - this.name = errorCode; - this.details = details; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /* - * This method throws if the supplied value is not an array. - * The destructed values are required to produce a meaningful error for users. - * The destructed and restructured object is so it's clear what is - * needed. - */ - const isArray = (value, details) => { - if (!Array.isArray(value)) { - throw new WorkboxError('not-an-array', details); - } - }; - const hasMethod = (object, expectedMethod, details) => { - const type = typeof object[expectedMethod]; - if (type !== 'function') { - details['expectedMethod'] = expectedMethod; - throw new WorkboxError('missing-a-method', details); - } - }; - const isType = (object, expectedType, details) => { - if (typeof object !== expectedType) { - details['expectedType'] = expectedType; - throw new WorkboxError('incorrect-type', details); - } - }; - const isInstance = (object, - // Need the general type to do the check later. - // eslint-disable-next-line @typescript-eslint/ban-types - expectedClass, details) => { - if (!(object instanceof expectedClass)) { - details['expectedClassName'] = expectedClass.name; - throw new WorkboxError('incorrect-class', details); - } - }; - const isOneOf = (value, validValues, details) => { - if (!validValues.includes(value)) { - details['validValueDescription'] = `Valid values are ${JSON.stringify(validValues)}.`; - throw new WorkboxError('invalid-value', details); - } - }; - const isArrayOfClass = (value, - // Need general type to do check later. - expectedClass, - // eslint-disable-line - details) => { - const error = new WorkboxError('not-array-of-class', details); - if (!Array.isArray(value)) { - throw error; - } - for (const item of value) { - if (!(item instanceof expectedClass)) { - throw error; - } - } - }; - const finalAssertExports = { - hasMethod, - isArray, - isInstance, - isOneOf, - isType, - isArrayOfClass - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - // Callbacks to be executed whenever there's a quota error. - // Can't change Function type right now. - // eslint-disable-next-line @typescript-eslint/ban-types - const quotaErrorCallbacks = new Set(); - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Adds a function to the set of quotaErrorCallbacks that will be executed if - * there's a quota error. - * - * @param {Function} callback - * @memberof workbox-core - */ - // Can't change Function type - // eslint-disable-next-line @typescript-eslint/ban-types - function registerQuotaErrorCallback(callback) { - { - finalAssertExports.isType(callback, 'function', { - moduleName: 'workbox-core', - funcName: 'register', - paramName: 'callback' - }); - } - quotaErrorCallbacks.add(callback); - { - logger.log('Registered a callback to respond to quota errors.', callback); - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const _cacheNameDetails = { - googleAnalytics: 'googleAnalytics', - precache: 'precache-v2', - prefix: 'workbox', - runtime: 'runtime', - suffix: typeof registration !== 'undefined' ? registration.scope : '' - }; - const _createCacheName = cacheName => { - return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix].filter(value => value && value.length > 0).join('-'); - }; - const eachCacheNameDetail = fn => { - for (const key of Object.keys(_cacheNameDetails)) { - fn(key); - } - }; - const cacheNames$1 = { - updateDetails: details => { - eachCacheNameDetail(key => { - if (typeof details[key] === 'string') { - _cacheNameDetails[key] = details[key]; - } - }); - }, - getGoogleAnalyticsName: userCacheName => { - return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics); - }, - getPrecacheName: userCacheName => { - return userCacheName || _createCacheName(_cacheNameDetails.precache); - }, - getPrefix: () => { - return _cacheNameDetails.prefix; - }, - getRuntimeName: userCacheName => { - return userCacheName || _createCacheName(_cacheNameDetails.runtime); - }, - getSuffix: () => { - return _cacheNameDetails.suffix; - } - }; - - /* - Copyright 2020 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - function stripParams(fullURL, ignoreParams) { - const strippedURL = new URL(fullURL); - for (const param of ignoreParams) { - strippedURL.searchParams.delete(param); - } - return strippedURL.href; - } - /** - * Matches an item in the cache, ignoring specific URL params. This is similar - * to the `ignoreSearch` option, but it allows you to ignore just specific - * params (while continuing to match on the others). - * - * @private - * @param {Cache} cache - * @param {Request} request - * @param {Object} matchOptions - * @param {Array} ignoreParams - * @return {Promise} - */ - async function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) { - const strippedRequestURL = stripParams(request.url, ignoreParams); - // If the request doesn't include any ignored params, match as normal. - if (request.url === strippedRequestURL) { - return cache.match(request, matchOptions); - } - // Otherwise, match by comparing keys - const keysOptions = Object.assign(Object.assign({}, matchOptions), { - ignoreSearch: true - }); - const cacheKeys = await cache.keys(request, keysOptions); - for (const cacheKey of cacheKeys) { - const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams); - if (strippedRequestURL === strippedCacheKeyURL) { - return cache.match(cacheKey, matchOptions); - } - } - return; - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - let supportStatus$1; - /** - * A utility function that determines whether the current browser supports - * constructing a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream) - * object. - * - * @return {boolean} `true`, if the current browser can successfully - * construct a `ReadableStream`, `false` otherwise. - * - * @private - */ - function canConstructReadableStream() { - if (supportStatus$1 === undefined) { - // See https://github.com/GoogleChrome/workbox/issues/1473 - try { - new ReadableStream({ - start() {} - }); - supportStatus$1 = true; - } catch (error) { - supportStatus$1 = false; - } - } - return supportStatus$1; - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - let supportStatus; - /** - * A utility function that determines whether the current browser supports - * constructing a new `Response` from a `response.body` stream. - * - * @return {boolean} `true`, if the current browser can successfully - * construct a `Response` from a `response.body` stream, `false` otherwise. - * - * @private - */ - function canConstructResponseFromBodyStream() { - if (supportStatus === undefined) { - const testResponse = new Response(''); - if ('body' in testResponse) { - try { - new Response(testResponse.body); - supportStatus = true; - } catch (error) { - supportStatus = false; - } - } - supportStatus = false; - } - return supportStatus; - } - - /* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A helper function that prevents a promise from being flagged as unused. - * - * @private - **/ - function dontWaitFor(promise) { - // Effective no-op. - void promise.then(() => {}); - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * The Deferred class composes Promises in a way that allows for them to be - * resolved or rejected from outside the constructor. In most cases promises - * should be used directly, but Deferreds can be necessary when the logic to - * resolve a promise must be separate. - * - * @private - */ - class Deferred { - /** - * Creates a promise and exposes its resolve and reject functions as methods. - */ - constructor() { - this.promise = new Promise((resolve, reject) => { - this.resolve = resolve; - this.reject = reject; - }); - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Runs all of the callback functions, one at a time sequentially, in the order - * in which they were registered. - * - * @memberof workbox-core - * @private - */ - async function executeQuotaErrorCallbacks() { - { - logger.log(`About to run ${quotaErrorCallbacks.size} ` + `callbacks to clean up caches.`); - } - for (const callback of quotaErrorCallbacks) { - await callback(); - { - logger.log(callback, 'is complete.'); - } - } - { - logger.log('Finished running callbacks.'); - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const getFriendlyURL = url => { - const urlObj = new URL(String(url), location.href); - // See https://github.com/GoogleChrome/workbox/issues/2323 - // We want to include everything, except for the origin if it's same-origin. - return urlObj.href.replace(new RegExp(`^${location.origin}`), ''); - }; - - /* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Returns a promise that resolves and the passed number of milliseconds. - * This utility is an async/await-friendly version of `setTimeout`. - * - * @param {number} ms - * @return {Promise} - * @private - */ - function timeout(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); - } - - /* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const MAX_RETRY_TIME = 2000; - /** - * Returns a promise that resolves to a window client matching the passed - * `resultingClientId`. For browsers that don't support `resultingClientId` - * or if waiting for the resulting client to apper takes too long, resolve to - * `undefined`. - * - * @param {string} [resultingClientId] - * @return {Promise} - * @private - */ - async function resultingClientExists(resultingClientId) { - if (!resultingClientId) { - return; - } - let existingWindows = await self.clients.matchAll({ - type: 'window' - }); - const existingWindowIds = new Set(existingWindows.map(w => w.id)); - let resultingWindow; - const startTime = performance.now(); - // Only wait up to `MAX_RETRY_TIME` to find a matching client. - while (performance.now() - startTime < MAX_RETRY_TIME) { - existingWindows = await self.clients.matchAll({ - type: 'window' - }); - resultingWindow = existingWindows.find(w => { - if (resultingClientId) { - // If we have a `resultingClientId`, we can match on that. - return w.id === resultingClientId; - } else { - // Otherwise match on finding a window not in `existingWindowIds`. - return !existingWindowIds.has(w.id); - } - }); - if (resultingWindow) { - break; - } - // Sleep for 100ms and retry. - await timeout(100); - } - return resultingWindow; - } - - /* - Copyright 2020 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A utility method that makes it easier to use `event.waitUntil` with - * async functions and return the result. - * - * @param {ExtendableEvent} event - * @param {Function} asyncFn - * @return {Function} - * @private - */ - function waitUntil(event, asyncFn) { - const returnPromise = asyncFn(); - event.waitUntil(returnPromise); - return returnPromise; - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - // We either expose defaults or we expose every named export. - - var _private = /*#__PURE__*/Object.freeze({ - __proto__: null, - Deferred: Deferred, - WorkboxError: WorkboxError, - assert: finalAssertExports, - cacheMatchIgnoreParams: cacheMatchIgnoreParams, - cacheNames: cacheNames$1, - canConstructReadableStream: canConstructReadableStream, - canConstructResponseFromBodyStream: canConstructResponseFromBodyStream, - dontWaitFor: dontWaitFor, - executeQuotaErrorCallbacks: executeQuotaErrorCallbacks, - getFriendlyURL: getFriendlyURL, - logger: logger, - resultingClientExists: resultingClientExists, - timeout: timeout, - waitUntil: waitUntil - }); - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Get the current cache names and prefix/suffix used by Workbox. - * - * `cacheNames.precache` is used for precached assets, - * `cacheNames.googleAnalytics` is used by `workbox-google-analytics` to - * store `analytics.js`, and `cacheNames.runtime` is used for everything else. - * - * `cacheNames.prefix` can be used to retrieve just the current prefix value. - * `cacheNames.suffix` can be used to retrieve just the current suffix value. - * - * @return {Object} An object with `precache`, `runtime`, `prefix`, and - * `googleAnalytics` properties. - * - * @memberof workbox-core - */ - const cacheNames = { - get googleAnalytics() { - return cacheNames$1.getGoogleAnalyticsName(); - }, - get precache() { - return cacheNames$1.getPrecacheName(); - }, - get prefix() { - return cacheNames$1.getPrefix(); - }, - get runtime() { - return cacheNames$1.getRuntimeName(); - }, - get suffix() { - return cacheNames$1.getSuffix(); - } - }; - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Allows developers to copy a response and modify its `headers`, `status`, - * or `statusText` values (the values settable via a - * [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax} - * object in the constructor). - * To modify these values, pass a function as the second argument. That - * function will be invoked with a single object with the response properties - * `{headers, status, statusText}`. The return value of this function will - * be used as the `ResponseInit` for the new `Response`. To change the values - * either modify the passed parameter(s) and return it, or return a totally - * new object. - * - * This method is intentionally limited to same-origin responses, regardless of - * whether CORS was used or not. - * - * @param {Response} response - * @param {Function} modifier - * @memberof workbox-core - */ - async function copyResponse(response, modifier) { - let origin = null; - // If response.url isn't set, assume it's cross-origin and keep origin null. - if (response.url) { - const responseURL = new URL(response.url); - origin = responseURL.origin; - } - if (origin !== self.location.origin) { - throw new WorkboxError('cross-origin-copy-response', { - origin - }); - } - const clonedResponse = response.clone(); - // Create a fresh `ResponseInit` object by cloning the headers. - const responseInit = { - headers: new Headers(clonedResponse.headers), - status: clonedResponse.status, - statusText: clonedResponse.statusText - }; - // Apply any user modifications. - const modifiedResponseInit = modifier ? modifier(responseInit) : responseInit; - // Create the new response from the body stream and `ResponseInit` - // modifications. Note: not all browsers support the Response.body stream, - // so fall back to reading the entire body into memory as a blob. - const body = canConstructResponseFromBodyStream() ? clonedResponse.body : await clonedResponse.blob(); - return new Response(body, modifiedResponseInit); - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Claim any currently available clients once the service worker - * becomes active. This is normally used in conjunction with `skipWaiting()`. - * - * @memberof workbox-core - */ - function clientsClaim() { - self.addEventListener('activate', () => self.clients.claim()); - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Modifies the default cache names used by the Workbox packages. - * Cache names are generated as `--`. - * - * @param {Object} details - * @param {Object} [details.prefix] The string to add to the beginning of - * the precache and runtime cache names. - * @param {Object} [details.suffix] The string to add to the end of - * the precache and runtime cache names. - * @param {Object} [details.precache] The cache name to use for precache - * caching. - * @param {Object} [details.runtime] The cache name to use for runtime caching. - * @param {Object} [details.googleAnalytics] The cache name to use for - * `workbox-google-analytics` caching. - * - * @memberof workbox-core - */ - function setCacheNameDetails(details) { - { - Object.keys(details).forEach(key => { - finalAssertExports.isType(details[key], 'string', { - moduleName: 'workbox-core', - funcName: 'setCacheNameDetails', - paramName: `details.${key}` - }); - }); - if ('precache' in details && details['precache'].length === 0) { - throw new WorkboxError('invalid-cache-name', { - cacheNameId: 'precache', - value: details['precache'] - }); - } - if ('runtime' in details && details['runtime'].length === 0) { - throw new WorkboxError('invalid-cache-name', { - cacheNameId: 'runtime', - value: details['runtime'] - }); - } - if ('googleAnalytics' in details && details['googleAnalytics'].length === 0) { - throw new WorkboxError('invalid-cache-name', { - cacheNameId: 'googleAnalytics', - value: details['googleAnalytics'] - }); - } - } - cacheNames$1.updateDetails(details); - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * This method is deprecated, and will be removed in Workbox v7. - * - * Calling self.skipWaiting() is equivalent, and should be used instead. - * - * @memberof workbox-core - */ - function skipWaiting() { - // Just call self.skipWaiting() directly. - // See https://github.com/GoogleChrome/workbox/issues/2525 - { - logger.warn(`skipWaiting() from workbox-core is no longer recommended ` + `and will be removed in Workbox v7. Using self.skipWaiting() instead ` + `is equivalent.`); - } - void self.skipWaiting(); - } - - exports._private = _private; - exports.cacheNames = cacheNames; - exports.clientsClaim = clientsClaim; - exports.copyResponse = copyResponse; - exports.registerQuotaErrorCallback = registerQuotaErrorCallback; - exports.setCacheNameDetails = setCacheNameDetails; - exports.skipWaiting = skipWaiting; - - return exports; - -})({}); -//# sourceMappingURL=workbox-core.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-core.dev.js.map b/docs/workbox-v7.4.1/workbox-core.dev.js.map deleted file mode 100644 index 697b2601..00000000 --- a/docs/workbox-v7.4.1/workbox-core.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-core.dev.js","sources":["../_version.js","../_private/logger.js","../models/messages/messages.js","../models/messages/messageGenerator.js","../_private/WorkboxError.js","../_private/assert.js","../models/quotaErrorCallbacks.js","../registerQuotaErrorCallback.js","../_private/cacheNames.js","../_private/cacheMatchIgnoreParams.js","../_private/canConstructReadableStream.js","../_private/canConstructResponseFromBodyStream.js","../_private/dontWaitFor.js","../_private/Deferred.js","../_private/executeQuotaErrorCallbacks.js","../_private/getFriendlyURL.js","../_private/timeout.js","../_private/resultingClientExists.js","../_private/waitUntil.js","../_private.js","../cacheNames.js","../copyResponse.js","../clientsClaim.js","../setCacheNameDetails.js","../skipWaiting.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production'\n ? null\n : (() => {\n // Don't overwrite this value if it's already set.\n // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923\n if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) {\n self.__WB_DISABLE_DEV_LOGS = false;\n }\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null, // No colored prefix on groupEnd\n };\n const print = function (method, args) {\n if (self.__WB_DISABLE_DEV_LOGS) {\n return;\n }\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n })());\nexport { logger };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../../_version.js';\nexport const messages = {\n 'invalid-value': ({ paramName, validValueDescription, value }) => {\n if (!paramName || !validValueDescription) {\n throw new Error(`Unexpected input to 'invalid-value' error.`);\n }\n return (`The '${paramName}' parameter was given a value with an ` +\n `unexpected value. ${validValueDescription} Received a value of ` +\n `${JSON.stringify(value)}.`);\n },\n 'not-an-array': ({ moduleName, className, funcName, paramName }) => {\n if (!moduleName || !className || !funcName || !paramName) {\n throw new Error(`Unexpected input to 'not-an-array' error.`);\n }\n return (`The parameter '${paramName}' passed into ` +\n `'${moduleName}.${className}.${funcName}()' must be an array.`);\n },\n 'incorrect-type': ({ expectedType, paramName, moduleName, className, funcName, }) => {\n if (!expectedType || !paramName || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'incorrect-type' error.`);\n }\n const classNameStr = className ? `${className}.` : '';\n return (`The parameter '${paramName}' passed into ` +\n `'${moduleName}.${classNameStr}` +\n `${funcName}()' must be of type ${expectedType}.`);\n },\n 'incorrect-class': ({ expectedClassName, paramName, moduleName, className, funcName, isReturnValueProblem, }) => {\n if (!expectedClassName || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'incorrect-class' error.`);\n }\n const classNameStr = className ? `${className}.` : '';\n if (isReturnValueProblem) {\n return (`The return value from ` +\n `'${moduleName}.${classNameStr}${funcName}()' ` +\n `must be an instance of class ${expectedClassName}.`);\n }\n return (`The parameter '${paramName}' passed into ` +\n `'${moduleName}.${classNameStr}${funcName}()' ` +\n `must be an instance of class ${expectedClassName}.`);\n },\n 'missing-a-method': ({ expectedMethod, paramName, moduleName, className, funcName, }) => {\n if (!expectedMethod ||\n !paramName ||\n !moduleName ||\n !className ||\n !funcName) {\n throw new Error(`Unexpected input to 'missing-a-method' error.`);\n }\n return (`${moduleName}.${className}.${funcName}() expected the ` +\n `'${paramName}' parameter to expose a '${expectedMethod}' method.`);\n },\n 'add-to-cache-list-unexpected-type': ({ entry }) => {\n return (`An unexpected entry was passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' The entry ` +\n `'${JSON.stringify(entry)}' isn't supported. You must supply an array of ` +\n `strings with one or more characters, objects with a url property or ` +\n `Request objects.`);\n },\n 'add-to-cache-list-conflicting-entries': ({ firstEntry, secondEntry }) => {\n if (!firstEntry || !secondEntry) {\n throw new Error(`Unexpected input to ` + `'add-to-cache-list-duplicate-entries' error.`);\n }\n return (`Two of the entries passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` +\n `${firstEntry} but different revision details. Workbox is ` +\n `unable to cache and version the asset correctly. Please remove one ` +\n `of the entries.`);\n },\n 'plugin-error-request-will-fetch': ({ thrownErrorMessage }) => {\n if (!thrownErrorMessage) {\n throw new Error(`Unexpected input to ` + `'plugin-error-request-will-fetch', error.`);\n }\n return (`An error was thrown by a plugins 'requestWillFetch()' method. ` +\n `The thrown error message was: '${thrownErrorMessage}'.`);\n },\n 'invalid-cache-name': ({ cacheNameId, value }) => {\n if (!cacheNameId) {\n throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`);\n }\n return (`You must provide a name containing at least one character for ` +\n `setCacheDetails({${cacheNameId}: '...'}). Received a value of ` +\n `'${JSON.stringify(value)}'`);\n },\n 'unregister-route-but-not-found-with-method': ({ method }) => {\n if (!method) {\n throw new Error(`Unexpected input to ` +\n `'unregister-route-but-not-found-with-method' error.`);\n }\n return (`The route you're trying to unregister was not previously ` +\n `registered for the method type '${method}'.`);\n },\n 'unregister-route-route-not-registered': () => {\n return (`The route you're trying to unregister was not previously ` +\n `registered.`);\n },\n 'queue-replay-failed': ({ name }) => {\n return `Replaying the background sync queue '${name}' failed.`;\n },\n 'duplicate-queue-name': ({ name }) => {\n return (`The Queue name '${name}' is already being used. ` +\n `All instances of backgroundSync.Queue must be given unique names.`);\n },\n 'expired-test-without-max-age': ({ methodName, paramName }) => {\n return (`The '${methodName}()' method can only be used when the ` +\n `'${paramName}' is used in the constructor.`);\n },\n 'unsupported-route-type': ({ moduleName, className, funcName, paramName }) => {\n return (`The supplied '${paramName}' parameter was an unsupported type. ` +\n `Please check the docs for ${moduleName}.${className}.${funcName} for ` +\n `valid input types.`);\n },\n 'not-array-of-class': ({ value, expectedClass, moduleName, className, funcName, paramName, }) => {\n return (`The supplied '${paramName}' parameter must be an array of ` +\n `'${expectedClass}' objects. Received '${JSON.stringify(value)},'. ` +\n `Please check the call to ${moduleName}.${className}.${funcName}() ` +\n `to fix the issue.`);\n },\n 'max-entries-or-age-required': ({ moduleName, className, funcName }) => {\n return (`You must define either config.maxEntries or config.maxAgeSeconds` +\n `in ${moduleName}.${className}.${funcName}`);\n },\n 'statuses-or-headers-required': ({ moduleName, className, funcName }) => {\n return (`You must define either config.statuses or config.headers` +\n `in ${moduleName}.${className}.${funcName}`);\n },\n 'invalid-string': ({ moduleName, funcName, paramName }) => {\n if (!paramName || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'invalid-string' error.`);\n }\n return (`When using strings, the '${paramName}' parameter must start with ` +\n `'http' (for cross-origin matches) or '/' (for same-origin matches). ` +\n `Please see the docs for ${moduleName}.${funcName}() for ` +\n `more info.`);\n },\n 'channel-name-required': () => {\n return (`You must provide a channelName to construct a ` +\n `BroadcastCacheUpdate instance.`);\n },\n 'invalid-responses-are-same-args': () => {\n return (`The arguments passed into responsesAreSame() appear to be ` +\n `invalid. Please ensure valid Responses are used.`);\n },\n 'expire-custom-caches-only': () => {\n return (`You must provide a 'cacheName' property when using the ` +\n `expiration plugin with a runtime caching strategy.`);\n },\n 'unit-must-be-bytes': ({ normalizedRangeHeader }) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`);\n }\n return (`The 'unit' portion of the Range header must be set to 'bytes'. ` +\n `The Range header provided was \"${normalizedRangeHeader}\"`);\n },\n 'single-range-only': ({ normalizedRangeHeader }) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'single-range-only' error.`);\n }\n return (`Multiple ranges are not supported. Please use a single start ` +\n `value, and optional end value. The Range header provided was ` +\n `\"${normalizedRangeHeader}\"`);\n },\n 'invalid-range-values': ({ normalizedRangeHeader }) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'invalid-range-values' error.`);\n }\n return (`The Range header is missing both start and end values. At least ` +\n `one of those values is needed. The Range header provided was ` +\n `\"${normalizedRangeHeader}\"`);\n },\n 'no-range-header': () => {\n return `No Range header was found in the Request provided.`;\n },\n 'range-not-satisfiable': ({ size, start, end }) => {\n return (`The start (${start}) and end (${end}) values in the Range are ` +\n `not satisfiable by the cached response, which is ${size} bytes.`);\n },\n 'attempt-to-cache-non-get-request': ({ url, method }) => {\n return (`Unable to cache '${url}' because it is a '${method}' request and ` +\n `only 'GET' requests can be cached.`);\n },\n 'cache-put-with-no-response': ({ url }) => {\n return (`There was an attempt to cache '${url}' but the response was not ` +\n `defined.`);\n },\n 'no-response': ({ url, error }) => {\n let message = `The strategy could not generate a response for '${url}'.`;\n if (error) {\n message += ` The underlying error is ${error}.`;\n }\n return message;\n },\n 'bad-precaching-response': ({ url, status }) => {\n return (`The precaching request for '${url}' failed` +\n (status ? ` with an HTTP status of ${status}.` : `.`));\n },\n 'non-precached-url': ({ url }) => {\n return (`createHandlerBoundToURL('${url}') was called, but that URL is ` +\n `not precached. Please pass in a URL that is precached instead.`);\n },\n 'add-to-cache-list-conflicting-integrities': ({ url }) => {\n return (`Two of the entries passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` +\n `${url} with different integrity values. Please remove one of them.`);\n },\n 'missing-precache-entry': ({ cacheName, url }) => {\n return `Unable to find a precached response in ${cacheName} for ${url}.`;\n },\n 'cross-origin-copy-response': ({ origin }) => {\n return (`workbox-core.copyResponse() can only be used with same-origin ` +\n `responses. It was passed a response with origin ${origin}.`);\n },\n 'opaque-streams-source': ({ type }) => {\n const message = `One of the workbox-streams sources resulted in an ` +\n `'${type}' response.`;\n if (type === 'opaqueredirect') {\n return (`${message} Please do not use a navigation request that results ` +\n `in a redirect as a source.`);\n }\n return `${message} Please ensure your sources are CORS-enabled.`;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messages } from './messages.js';\nimport '../../_version.js';\nconst fallback = (code, ...args) => {\n let msg = code;\n if (args.length > 0) {\n msg += ` :: ${JSON.stringify(args)}`;\n }\n return msg;\n};\nconst generatorFunction = (code, details = {}) => {\n const message = messages[code];\n if (!message) {\n throw new Error(`Unable to find message for code '${code}'.`);\n }\n return message(details);\n};\nexport const messageGenerator = process.env.NODE_ENV === 'production' ? fallback : generatorFunction;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messageGenerator } from '../models/messages/messageGenerator.js';\nimport '../_version.js';\n/**\n * Workbox errors should be thrown with this class.\n * This allows use to ensure the type easily in tests,\n * helps developers identify errors from workbox\n * easily and allows use to optimise error\n * messages correctly.\n *\n * @private\n */\nclass WorkboxError extends Error {\n /**\n *\n * @param {string} errorCode The error code that\n * identifies this particular error.\n * @param {Object=} details Any relevant arguments\n * that will help developers identify issues should\n * be added as a key on the context object.\n */\n constructor(errorCode, details) {\n const message = messageGenerator(errorCode, details);\n super(message);\n this.name = errorCode;\n this.details = details;\n }\n}\nexport { WorkboxError };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from '../_private/WorkboxError.js';\nimport '../_version.js';\n/*\n * This method throws if the supplied value is not an array.\n * The destructed values are required to produce a meaningful error for users.\n * The destructed and restructured object is so it's clear what is\n * needed.\n */\nconst isArray = (value, details) => {\n if (!Array.isArray(value)) {\n throw new WorkboxError('not-an-array', details);\n }\n};\nconst hasMethod = (object, expectedMethod, details) => {\n const type = typeof object[expectedMethod];\n if (type !== 'function') {\n details['expectedMethod'] = expectedMethod;\n throw new WorkboxError('missing-a-method', details);\n }\n};\nconst isType = (object, expectedType, details) => {\n if (typeof object !== expectedType) {\n details['expectedType'] = expectedType;\n throw new WorkboxError('incorrect-type', details);\n }\n};\nconst isInstance = (object, \n// Need the general type to do the check later.\n// eslint-disable-next-line @typescript-eslint/ban-types\nexpectedClass, details) => {\n if (!(object instanceof expectedClass)) {\n details['expectedClassName'] = expectedClass.name;\n throw new WorkboxError('incorrect-class', details);\n }\n};\nconst isOneOf = (value, validValues, details) => {\n if (!validValues.includes(value)) {\n details['validValueDescription'] = `Valid values are ${JSON.stringify(validValues)}.`;\n throw new WorkboxError('invalid-value', details);\n }\n};\nconst isArrayOfClass = (value, \n// Need general type to do check later.\nexpectedClass, // eslint-disable-line\ndetails) => {\n const error = new WorkboxError('not-array-of-class', details);\n if (!Array.isArray(value)) {\n throw error;\n }\n for (const item of value) {\n if (!(item instanceof expectedClass)) {\n throw error;\n }\n }\n};\nconst finalAssertExports = process.env.NODE_ENV === 'production'\n ? null\n : {\n hasMethod,\n isArray,\n isInstance,\n isOneOf,\n isType,\n isArrayOfClass,\n };\nexport { finalAssertExports as assert };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n// Callbacks to be executed whenever there's a quota error.\n// Can't change Function type right now.\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst quotaErrorCallbacks = new Set();\nexport { quotaErrorCallbacks };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from './_private/logger.js';\nimport { assert } from './_private/assert.js';\nimport { quotaErrorCallbacks } from './models/quotaErrorCallbacks.js';\nimport './_version.js';\n/**\n * Adds a function to the set of quotaErrorCallbacks that will be executed if\n * there's a quota error.\n *\n * @param {Function} callback\n * @memberof workbox-core\n */\n// Can't change Function type\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction registerQuotaErrorCallback(callback) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(callback, 'function', {\n moduleName: 'workbox-core',\n funcName: 'register',\n paramName: 'callback',\n });\n }\n quotaErrorCallbacks.add(callback);\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered a callback to respond to quota errors.', callback);\n }\n}\nexport { registerQuotaErrorCallback };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst _cacheNameDetails = {\n googleAnalytics: 'googleAnalytics',\n precache: 'precache-v2',\n prefix: 'workbox',\n runtime: 'runtime',\n suffix: typeof registration !== 'undefined' ? registration.scope : '',\n};\nconst _createCacheName = (cacheName) => {\n return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]\n .filter((value) => value && value.length > 0)\n .join('-');\n};\nconst eachCacheNameDetail = (fn) => {\n for (const key of Object.keys(_cacheNameDetails)) {\n fn(key);\n }\n};\nexport const cacheNames = {\n updateDetails: (details) => {\n eachCacheNameDetail((key) => {\n if (typeof details[key] === 'string') {\n _cacheNameDetails[key] = details[key];\n }\n });\n },\n getGoogleAnalyticsName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n },\n getPrecacheName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.precache);\n },\n getPrefix: () => {\n return _cacheNameDetails.prefix;\n },\n getRuntimeName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.runtime);\n },\n getSuffix: () => {\n return _cacheNameDetails.suffix;\n },\n};\n","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nfunction stripParams(fullURL, ignoreParams) {\n const strippedURL = new URL(fullURL);\n for (const param of ignoreParams) {\n strippedURL.searchParams.delete(param);\n }\n return strippedURL.href;\n}\n/**\n * Matches an item in the cache, ignoring specific URL params. This is similar\n * to the `ignoreSearch` option, but it allows you to ignore just specific\n * params (while continuing to match on the others).\n *\n * @private\n * @param {Cache} cache\n * @param {Request} request\n * @param {Object} matchOptions\n * @param {Array} ignoreParams\n * @return {Promise}\n */\nasync function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {\n const strippedRequestURL = stripParams(request.url, ignoreParams);\n // If the request doesn't include any ignored params, match as normal.\n if (request.url === strippedRequestURL) {\n return cache.match(request, matchOptions);\n }\n // Otherwise, match by comparing keys\n const keysOptions = Object.assign(Object.assign({}, matchOptions), { ignoreSearch: true });\n const cacheKeys = await cache.keys(request, keysOptions);\n for (const cacheKey of cacheKeys) {\n const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);\n if (strippedRequestURL === strippedCacheKeyURL) {\n return cache.match(cacheKey, matchOptions);\n }\n }\n return;\n}\nexport { cacheMatchIgnoreParams };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nlet supportStatus;\n/**\n * A utility function that determines whether the current browser supports\n * constructing a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n * object.\n *\n * @return {boolean} `true`, if the current browser can successfully\n * construct a `ReadableStream`, `false` otherwise.\n *\n * @private\n */\nfunction canConstructReadableStream() {\n if (supportStatus === undefined) {\n // See https://github.com/GoogleChrome/workbox/issues/1473\n try {\n new ReadableStream({ start() { } });\n supportStatus = true;\n }\n catch (error) {\n supportStatus = false;\n }\n }\n return supportStatus;\n}\nexport { canConstructReadableStream };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nlet supportStatus;\n/**\n * A utility function that determines whether the current browser supports\n * constructing a new `Response` from a `response.body` stream.\n *\n * @return {boolean} `true`, if the current browser can successfully\n * construct a `Response` from a `response.body` stream, `false` otherwise.\n *\n * @private\n */\nfunction canConstructResponseFromBodyStream() {\n if (supportStatus === undefined) {\n const testResponse = new Response('');\n if ('body' in testResponse) {\n try {\n new Response(testResponse.body);\n supportStatus = true;\n }\n catch (error) {\n supportStatus = false;\n }\n }\n supportStatus = false;\n }\n return supportStatus;\n}\nexport { canConstructResponseFromBodyStream };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A helper function that prevents a promise from being flagged as unused.\n *\n * @private\n **/\nexport function dontWaitFor(promise) {\n // Effective no-op.\n void promise.then(() => { });\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from '../_private/logger.js';\nimport { quotaErrorCallbacks } from '../models/quotaErrorCallbacks.js';\nimport '../_version.js';\n/**\n * Runs all of the callback functions, one at a time sequentially, in the order\n * in which they were registered.\n *\n * @memberof workbox-core\n * @private\n */\nasync function executeQuotaErrorCallbacks() {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`About to run ${quotaErrorCallbacks.size} ` +\n `callbacks to clean up caches.`);\n }\n for (const callback of quotaErrorCallbacks) {\n await callback();\n if (process.env.NODE_ENV !== 'production') {\n logger.log(callback, 'is complete.');\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Finished running callbacks.');\n }\n}\nexport { executeQuotaErrorCallbacks };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst getFriendlyURL = (url) => {\n const urlObj = new URL(String(url), location.href);\n // See https://github.com/GoogleChrome/workbox/issues/2323\n // We want to include everything, except for the origin if it's same-origin.\n return urlObj.href.replace(new RegExp(`^${location.origin}`), '');\n};\nexport { getFriendlyURL };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns a promise that resolves and the passed number of milliseconds.\n * This utility is an async/await-friendly version of `setTimeout`.\n *\n * @param {number} ms\n * @return {Promise}\n * @private\n */\nexport function timeout(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { timeout } from './timeout.js';\nimport '../_version.js';\nconst MAX_RETRY_TIME = 2000;\n/**\n * Returns a promise that resolves to a window client matching the passed\n * `resultingClientId`. For browsers that don't support `resultingClientId`\n * or if waiting for the resulting client to apper takes too long, resolve to\n * `undefined`.\n *\n * @param {string} [resultingClientId]\n * @return {Promise}\n * @private\n */\nexport async function resultingClientExists(resultingClientId) {\n if (!resultingClientId) {\n return;\n }\n let existingWindows = await self.clients.matchAll({ type: 'window' });\n const existingWindowIds = new Set(existingWindows.map((w) => w.id));\n let resultingWindow;\n const startTime = performance.now();\n // Only wait up to `MAX_RETRY_TIME` to find a matching client.\n while (performance.now() - startTime < MAX_RETRY_TIME) {\n existingWindows = await self.clients.matchAll({ type: 'window' });\n resultingWindow = existingWindows.find((w) => {\n if (resultingClientId) {\n // If we have a `resultingClientId`, we can match on that.\n return w.id === resultingClientId;\n }\n else {\n // Otherwise match on finding a window not in `existingWindowIds`.\n return !existingWindowIds.has(w.id);\n }\n });\n if (resultingWindow) {\n break;\n }\n // Sleep for 100ms and retry.\n await timeout(100);\n }\n return resultingWindow;\n}\n","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A utility method that makes it easier to use `event.waitUntil` with\n * async functions and return the result.\n *\n * @param {ExtendableEvent} event\n * @param {Function} asyncFn\n * @return {Function}\n * @private\n */\nfunction waitUntil(event, asyncFn) {\n const returnPromise = asyncFn();\n event.waitUntil(returnPromise);\n return returnPromise;\n}\nexport { waitUntil };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n// We either expose defaults or we expose every named export.\nimport { assert } from './_private/assert.js';\nimport { cacheNames } from './_private/cacheNames.js';\nimport { cacheMatchIgnoreParams } from './_private/cacheMatchIgnoreParams.js';\nimport { canConstructReadableStream } from './_private/canConstructReadableStream.js';\nimport { canConstructResponseFromBodyStream } from './_private/canConstructResponseFromBodyStream.js';\nimport { dontWaitFor } from './_private/dontWaitFor.js';\nimport { Deferred } from './_private/Deferred.js';\nimport { executeQuotaErrorCallbacks } from './_private/executeQuotaErrorCallbacks.js';\nimport { getFriendlyURL } from './_private/getFriendlyURL.js';\nimport { logger } from './_private/logger.js';\nimport { resultingClientExists } from './_private/resultingClientExists.js';\nimport { timeout } from './_private/timeout.js';\nimport { waitUntil } from './_private/waitUntil.js';\nimport { WorkboxError } from './_private/WorkboxError.js';\nimport './_version.js';\nexport { assert, cacheMatchIgnoreParams, cacheNames, canConstructReadableStream, canConstructResponseFromBodyStream, dontWaitFor, Deferred, executeQuotaErrorCallbacks, getFriendlyURL, logger, resultingClientExists, timeout, waitUntil, WorkboxError, };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { cacheNames as _cacheNames } from './_private/cacheNames.js';\nimport './_version.js';\n/**\n * Get the current cache names and prefix/suffix used by Workbox.\n *\n * `cacheNames.precache` is used for precached assets,\n * `cacheNames.googleAnalytics` is used by `workbox-google-analytics` to\n * store `analytics.js`, and `cacheNames.runtime` is used for everything else.\n *\n * `cacheNames.prefix` can be used to retrieve just the current prefix value.\n * `cacheNames.suffix` can be used to retrieve just the current suffix value.\n *\n * @return {Object} An object with `precache`, `runtime`, `prefix`, and\n * `googleAnalytics` properties.\n *\n * @memberof workbox-core\n */\nconst cacheNames = {\n get googleAnalytics() {\n return _cacheNames.getGoogleAnalyticsName();\n },\n get precache() {\n return _cacheNames.getPrecacheName();\n },\n get prefix() {\n return _cacheNames.getPrefix();\n },\n get runtime() {\n return _cacheNames.getRuntimeName();\n },\n get suffix() {\n return _cacheNames.getSuffix();\n },\n};\nexport { cacheNames };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { canConstructResponseFromBodyStream } from './_private/canConstructResponseFromBodyStream.js';\nimport { WorkboxError } from './_private/WorkboxError.js';\nimport './_version.js';\n/**\n * Allows developers to copy a response and modify its `headers`, `status`,\n * or `statusText` values (the values settable via a\n * [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}\n * object in the constructor).\n * To modify these values, pass a function as the second argument. That\n * function will be invoked with a single object with the response properties\n * `{headers, status, statusText}`. The return value of this function will\n * be used as the `ResponseInit` for the new `Response`. To change the values\n * either modify the passed parameter(s) and return it, or return a totally\n * new object.\n *\n * This method is intentionally limited to same-origin responses, regardless of\n * whether CORS was used or not.\n *\n * @param {Response} response\n * @param {Function} modifier\n * @memberof workbox-core\n */\nasync function copyResponse(response, modifier) {\n let origin = null;\n // If response.url isn't set, assume it's cross-origin and keep origin null.\n if (response.url) {\n const responseURL = new URL(response.url);\n origin = responseURL.origin;\n }\n if (origin !== self.location.origin) {\n throw new WorkboxError('cross-origin-copy-response', { origin });\n }\n const clonedResponse = response.clone();\n // Create a fresh `ResponseInit` object by cloning the headers.\n const responseInit = {\n headers: new Headers(clonedResponse.headers),\n status: clonedResponse.status,\n statusText: clonedResponse.statusText,\n };\n // Apply any user modifications.\n const modifiedResponseInit = modifier ? modifier(responseInit) : responseInit;\n // Create the new response from the body stream and `ResponseInit`\n // modifications. Note: not all browsers support the Response.body stream,\n // so fall back to reading the entire body into memory as a blob.\n const body = canConstructResponseFromBodyStream()\n ? clonedResponse.body\n : await clonedResponse.blob();\n return new Response(body, modifiedResponseInit);\n}\nexport { copyResponse };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * Claim any currently available clients once the service worker\n * becomes active. This is normally used in conjunction with `skipWaiting()`.\n *\n * @memberof workbox-core\n */\nfunction clientsClaim() {\n self.addEventListener('activate', () => self.clients.claim());\n}\nexport { clientsClaim };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from './_private/assert.js';\nimport { cacheNames } from './_private/cacheNames.js';\nimport { WorkboxError } from './_private/WorkboxError.js';\nimport './_version.js';\n/**\n * Modifies the default cache names used by the Workbox packages.\n * Cache names are generated as `--`.\n *\n * @param {Object} details\n * @param {Object} [details.prefix] The string to add to the beginning of\n * the precache and runtime cache names.\n * @param {Object} [details.suffix] The string to add to the end of\n * the precache and runtime cache names.\n * @param {Object} [details.precache] The cache name to use for precache\n * caching.\n * @param {Object} [details.runtime] The cache name to use for runtime caching.\n * @param {Object} [details.googleAnalytics] The cache name to use for\n * `workbox-google-analytics` caching.\n *\n * @memberof workbox-core\n */\nfunction setCacheNameDetails(details) {\n if (process.env.NODE_ENV !== 'production') {\n Object.keys(details).forEach((key) => {\n assert.isType(details[key], 'string', {\n moduleName: 'workbox-core',\n funcName: 'setCacheNameDetails',\n paramName: `details.${key}`,\n });\n });\n if ('precache' in details && details['precache'].length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'precache',\n value: details['precache'],\n });\n }\n if ('runtime' in details && details['runtime'].length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'runtime',\n value: details['runtime'],\n });\n }\n if ('googleAnalytics' in details &&\n details['googleAnalytics'].length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'googleAnalytics',\n value: details['googleAnalytics'],\n });\n }\n }\n cacheNames.updateDetails(details);\n}\nexport { setCacheNameDetails };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from './_private/logger.js';\nimport './_version.js';\n/**\n * This method is deprecated, and will be removed in Workbox v7.\n *\n * Calling self.skipWaiting() is equivalent, and should be used instead.\n *\n * @memberof workbox-core\n */\nfunction skipWaiting() {\n // Just call self.skipWaiting() directly.\n // See https://github.com/GoogleChrome/workbox/issues/2525\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`skipWaiting() from workbox-core is no longer recommended ` +\n `and will be removed in Workbox v7. Using self.skipWaiting() instead ` +\n `is equivalent.`);\n }\n void self.skipWaiting();\n}\nexport { skipWaiting };\n"],"names":["self","_","e","logger","globalThis","__WB_DISABLE_DEV_LOGS","inGroup","methodToColorMap","debug","log","warn","error","groupCollapsed","groupEnd","print","method","args","test","navigator","userAgent","console","styles","logPrefix","join","api","loggerMethods","Object","keys","key","messages","invalid-value","paramName","validValueDescription","value","Error","JSON","stringify","not-an-array","moduleName","className","funcName","incorrect-type","expectedType","classNameStr","incorrect-class","expectedClassName","isReturnValueProblem","missing-a-method","expectedMethod","add-to-cache-list-unexpected-type","entry","add-to-cache-list-conflicting-entries","firstEntry","secondEntry","plugin-error-request-will-fetch","thrownErrorMessage","invalid-cache-name","cacheNameId","unregister-route-but-not-found-with-method","unregister-route-route-not-registered","queue-replay-failed","name","duplicate-queue-name","expired-test-without-max-age","methodName","unsupported-route-type","not-array-of-class","expectedClass","max-entries-or-age-required","statuses-or-headers-required","invalid-string","channel-name-required","invalid-responses-are-same-args","expire-custom-caches-only","unit-must-be-bytes","normalizedRangeHeader","single-range-only","invalid-range-values","no-range-header","range-not-satisfiable","size","start","end","attempt-to-cache-non-get-request","url","cache-put-with-no-response","no-response","message","bad-precaching-response","status","non-precached-url","add-to-cache-list-conflicting-integrities","missing-precache-entry","cacheName","cross-origin-copy-response","origin","opaque-streams-source","type","generatorFunction","code","details","messageGenerator","WorkboxError","constructor","errorCode","isArray","Array","hasMethod","object","isType","isInstance","isOneOf","validValues","includes","isArrayOfClass","item","finalAssertExports","quotaErrorCallbacks","Set","registerQuotaErrorCallback","callback","assert","add","_cacheNameDetails","googleAnalytics","precache","prefix","runtime","suffix","registration","scope","_createCacheName","filter","length","eachCacheNameDetail","fn","cacheNames","updateDetails","getGoogleAnalyticsName","userCacheName","getPrecacheName","getPrefix","getRuntimeName","getSuffix","stripParams","fullURL","ignoreParams","strippedURL","URL","param","searchParams","delete","href","cacheMatchIgnoreParams","cache","request","matchOptions","strippedRequestURL","match","keysOptions","assign","ignoreSearch","cacheKeys","cacheKey","strippedCacheKeyURL","supportStatus","canConstructReadableStream","undefined","ReadableStream","canConstructResponseFromBodyStream","testResponse","Response","body","dontWaitFor","promise","then","Deferred","Promise","resolve","reject","executeQuotaErrorCallbacks","getFriendlyURL","urlObj","String","location","replace","RegExp","timeout","ms","setTimeout","MAX_RETRY_TIME","resultingClientExists","resultingClientId","existingWindows","clients","matchAll","existingWindowIds","map","w","id","resultingWindow","startTime","performance","now","find","has","waitUntil","event","asyncFn","returnPromise","_cacheNames","copyResponse","response","modifier","responseURL","clonedResponse","clone","responseInit","headers","Headers","statusText","modifiedResponseInit","blob","clientsClaim","addEventListener","claim","setCacheNameDetails","forEach","skipWaiting"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,oBAAoB,CAAC,IAAIC,CAAC,EAAE;IACrC,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;ICLZ;IACA;IACA;IACA;IACA;IACA;IAEA,MAAMC,MAAM,GAEN,CAAC,MAAM;IACL;IACA;IACA,EAAA,IAAI,EAAE,uBAAuB,IAAIC,UAAU,CAAC,EAAE;QAC1CJ,IAAI,CAACK,qBAAqB,GAAG,KAAK;IACtC,EAAA;MACA,IAAIC,OAAO,GAAG,KAAK;IACnB,EAAA,MAAMC,gBAAgB,GAAG;IACrBC,IAAAA,KAAK,E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WAAW,EAAE,SAAS;YACtBxB,KAAK,EAAEmE,OAAO,CAAC,SAAS;IAC5B,OAAC,CAAC;IACN,IAAA;IACA,IAAA,IAAI,iBAAiB,IAAIA,OAAO,IAC5BA,OAAO,CAAC,iBAAiB,CAAC,CAACiC,MAAM,KAAK,CAAC,EAAE;IACzC,MAAA,MAAM,IAAI/B,YAAY,CAAC,oBAAoB,EAAE;IACzC7C,QAAAA,WAAW,EAAE,iBAAiB;YAC9BxB,KAAK,EAAEmE,OAAO,CAAC,iBAAiB;IACpC,OAAC,CAAC;IACN,IAAA;IACJ,EAAA;IACAoC,EAAAA,YAAU,CAACC,aAAa,CAACrC,OAAO,CAAC;IACrC;;IC1DA;IACA;;IAEA;IACA;IACA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,SAASgI,WAAWA,GAAG;IACnB;IACA;IACA,EAA2C;QACvCjO,MAAM,CAACO,IAAI,CAAE,CAAA,yDAAA,CAA0D,GAClE,CAAA,oEAAA,CAAqE,GACrE,gBAAe,CAAC;IACzB,EAAA;IACA,EAAA,KAAKV,IAAI,CAACoO,WAAW,EAAE;IAC3B;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-core.prod.js b/docs/workbox-v7.4.1/workbox-core.prod.js deleted file mode 100644 index 92f71756..00000000 --- a/docs/workbox-v7.4.1/workbox-core.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.core=function(t){"use strict";try{self["workbox:core:7.4.0"]&&_()}catch(t){}const e=(t,...e)=>{let n=t;return e.length>0&&(n+=` :: ${JSON.stringify(e)}`),n};class n extends Error{constructor(t,n){super(e(t,n)),this.name=t,this.details=n}}const r=new Set;const o={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},s=t=>[o.prefix,t,o.suffix].filter((t=>t&&t.length>0)).join("-"),i={updateDetails:t=>{(t=>{for(const e of Object.keys(o))t(e)})((e=>{"string"==typeof t[e]&&(o[e]=t[e])}))},getGoogleAnalyticsName:t=>t||s(o.googleAnalytics),getPrecacheName:t=>t||s(o.precache),getPrefix:()=>o.prefix,getRuntimeName:t=>t||s(o.runtime),getSuffix:()=>o.suffix};function c(t,e){const n=new URL(t);for(const t of e)n.searchParams.delete(t);return n.href}let a,u;function f(){if(void 0===u){const t=new Response("");if("body"in t)try{new Response(t.body),u=!0}catch(t){u=!1}u=!1}return u}function l(t){return new Promise((e=>setTimeout(e,t)))}var g=Object.freeze({__proto__:null,Deferred:class{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}},WorkboxError:n,assert:null,cacheMatchIgnoreParams:async function(t,e,n,r){const o=c(e.url,n);if(e.url===o)return t.match(e,r);const s=Object.assign(Object.assign({},r),{ignoreSearch:!0}),i=await t.keys(e,s);for(const e of i){if(o===c(e.url,n))return t.match(e,r)}},cacheNames:i,canConstructReadableStream:function(){if(void 0===a)try{new ReadableStream({start(){}}),a=!0}catch(t){a=!1}return a},canConstructResponseFromBodyStream:f,dontWaitFor:function(t){t.then((()=>{}))},executeQuotaErrorCallbacks:async function(){for(const t of r)await t()},getFriendlyURL:t=>new URL(String(t),location.href).href.replace(new RegExp(`^${location.origin}`),""),logger:null,resultingClientExists:async function(t){if(!t)return;let e=await self.clients.matchAll({type:"window"});const n=new Set(e.map((t=>t.id)));let r;const o=performance.now();for(;performance.now()-o<2e3&&(e=await self.clients.matchAll({type:"window"}),r=e.find((e=>t?e.id===t:!n.has(e.id))),!r);)await l(100);return r},timeout:l,waitUntil:function(t,e){const n=e();return t.waitUntil(n),n}});const w={get googleAnalytics(){return i.getGoogleAnalyticsName()},get precache(){return i.getPrecacheName()},get prefix(){return i.getPrefix()},get runtime(){return i.getRuntimeName()},get suffix(){return i.getSuffix()}};return t._private=g,t.cacheNames=w,t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.copyResponse=async function(t,e){let r=null;if(t.url){r=new URL(t.url).origin}if(r!==self.location.origin)throw new n("cross-origin-copy-response",{origin:r});const o=t.clone(),s={headers:new Headers(o.headers),status:o.status,statusText:o.statusText},i=e?e(s):s,c=f()?o.body:await o.blob();return new Response(c,i)},t.registerQuotaErrorCallback=function(t){r.add(t)},t.setCacheNameDetails=function(t){i.updateDetails(t)},t.skipWaiting=function(){self.skipWaiting()},t}({}); -//# sourceMappingURL=workbox-core.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-core.prod.js.map b/docs/workbox-v7.4.1/workbox-core.prod.js.map deleted file mode 100644 index 0be80bd7..00000000 --- a/docs/workbox-v7.4.1/workbox-core.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-core.prod.js","sources":["../_version.js","../_private/logger.js","../models/messages/messageGenerator.js","../_private/WorkboxError.js","../_private/assert.js","../models/quotaErrorCallbacks.js","../_private/cacheNames.js","../_private/cacheMatchIgnoreParams.js","../_private/canConstructReadableStream.js","../_private/canConstructResponseFromBodyStream.js","../_private/timeout.js","../_private/Deferred.js","../_private/dontWaitFor.js","../_private/executeQuotaErrorCallbacks.js","../_private/getFriendlyURL.js","../_private/resultingClientExists.js","../_private/waitUntil.js","../cacheNames.js","../clientsClaim.js","../copyResponse.js","../registerQuotaErrorCallback.js","../setCacheNameDetails.js","../skipWaiting.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production'\n ? null\n : (() => {\n // Don't overwrite this value if it's already set.\n // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923\n if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) {\n self.__WB_DISABLE_DEV_LOGS = false;\n }\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null, // No colored prefix on groupEnd\n };\n const print = function (method, args) {\n if (self.__WB_DISABLE_DEV_LOGS) {\n return;\n }\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n })());\nexport { logger };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messages } from './messages.js';\nimport '../../_version.js';\nconst fallback = (code, ...args) => {\n let msg = code;\n if (args.length > 0) {\n msg += ` :: ${JSON.stringify(args)}`;\n }\n return msg;\n};\nconst generatorFunction = (code, details = {}) => {\n const message = messages[code];\n if (!message) {\n throw new Error(`Unable to find message for code '${code}'.`);\n }\n return message(details);\n};\nexport const messageGenerator = process.env.NODE_ENV === 'production' ? fallback : generatorFunction;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messageGenerator } from '../models/messages/messageGenerator.js';\nimport '../_version.js';\n/**\n * Workbox errors should be thrown with this class.\n * This allows use to ensure the type easily in tests,\n * helps developers identify errors from workbox\n * easily and allows use to optimise error\n * messages correctly.\n *\n * @private\n */\nclass WorkboxError extends Error {\n /**\n *\n * @param {string} errorCode The error code that\n * identifies this particular error.\n * @param {Object=} details Any relevant arguments\n * that will help developers identify issues should\n * be added as a key on the context object.\n */\n constructor(errorCode, details) {\n const message = messageGenerator(errorCode, details);\n super(message);\n this.name = errorCode;\n this.details = details;\n }\n}\nexport { WorkboxError };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from '../_private/WorkboxError.js';\nimport '../_version.js';\n/*\n * This method throws if the supplied value is not an array.\n * The destructed values are required to produce a meaningful error for users.\n * The destructed and restructured object is so it's clear what is\n * needed.\n */\nconst isArray = (value, details) => {\n if (!Array.isArray(value)) {\n throw new WorkboxError('not-an-array', details);\n }\n};\nconst hasMethod = (object, expectedMethod, details) => {\n const type = typeof object[expectedMethod];\n if (type !== 'function') {\n details['expectedMethod'] = expectedMethod;\n throw new WorkboxError('missing-a-method', details);\n }\n};\nconst isType = (object, expectedType, details) => {\n if (typeof object !== expectedType) {\n details['expectedType'] = expectedType;\n throw new WorkboxError('incorrect-type', details);\n }\n};\nconst isInstance = (object, \n// Need the general type to do the check later.\n// eslint-disable-next-line @typescript-eslint/ban-types\nexpectedClass, details) => {\n if (!(object instanceof expectedClass)) {\n details['expectedClassName'] = expectedClass.name;\n throw new WorkboxError('incorrect-class', details);\n }\n};\nconst isOneOf = (value, validValues, details) => {\n if (!validValues.includes(value)) {\n details['validValueDescription'] = `Valid values are ${JSON.stringify(validValues)}.`;\n throw new WorkboxError('invalid-value', details);\n }\n};\nconst isArrayOfClass = (value, \n// Need general type to do check later.\nexpectedClass, // eslint-disable-line\ndetails) => {\n const error = new WorkboxError('not-array-of-class', details);\n if (!Array.isArray(value)) {\n throw error;\n }\n for (const item of value) {\n if (!(item instanceof expectedClass)) {\n throw error;\n }\n }\n};\nconst finalAssertExports = process.env.NODE_ENV === 'production'\n ? null\n : {\n hasMethod,\n isArray,\n isInstance,\n isOneOf,\n isType,\n isArrayOfClass,\n };\nexport { finalAssertExports as assert };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n// Callbacks to be executed whenever there's a quota error.\n// Can't change Function type right now.\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst quotaErrorCallbacks = new Set();\nexport { quotaErrorCallbacks };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst _cacheNameDetails = {\n googleAnalytics: 'googleAnalytics',\n precache: 'precache-v2',\n prefix: 'workbox',\n runtime: 'runtime',\n suffix: typeof registration !== 'undefined' ? registration.scope : '',\n};\nconst _createCacheName = (cacheName) => {\n return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]\n .filter((value) => value && value.length > 0)\n .join('-');\n};\nconst eachCacheNameDetail = (fn) => {\n for (const key of Object.keys(_cacheNameDetails)) {\n fn(key);\n }\n};\nexport const cacheNames = {\n updateDetails: (details) => {\n eachCacheNameDetail((key) => {\n if (typeof details[key] === 'string') {\n _cacheNameDetails[key] = details[key];\n }\n });\n },\n getGoogleAnalyticsName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n },\n getPrecacheName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.precache);\n },\n getPrefix: () => {\n return _cacheNameDetails.prefix;\n },\n getRuntimeName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.runtime);\n },\n getSuffix: () => {\n return _cacheNameDetails.suffix;\n },\n};\n","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nfunction stripParams(fullURL, ignoreParams) {\n const strippedURL = new URL(fullURL);\n for (const param of ignoreParams) {\n strippedURL.searchParams.delete(param);\n }\n return strippedURL.href;\n}\n/**\n * Matches an item in the cache, ignoring specific URL params. This is similar\n * to the `ignoreSearch` option, but it allows you to ignore just specific\n * params (while continuing to match on the others).\n *\n * @private\n * @param {Cache} cache\n * @param {Request} request\n * @param {Object} matchOptions\n * @param {Array} ignoreParams\n * @return {Promise}\n */\nasync function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {\n const strippedRequestURL = stripParams(request.url, ignoreParams);\n // If the request doesn't include any ignored params, match as normal.\n if (request.url === strippedRequestURL) {\n return cache.match(request, matchOptions);\n }\n // Otherwise, match by comparing keys\n const keysOptions = Object.assign(Object.assign({}, matchOptions), { ignoreSearch: true });\n const cacheKeys = await cache.keys(request, keysOptions);\n for (const cacheKey of cacheKeys) {\n const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);\n if (strippedRequestURL === strippedCacheKeyURL) {\n return cache.match(cacheKey, matchOptions);\n }\n }\n return;\n}\nexport { cacheMatchIgnoreParams };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nlet supportStatus;\n/**\n * A utility function that determines whether the current browser supports\n * constructing a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n * object.\n *\n * @return {boolean} `true`, if the current browser can successfully\n * construct a `ReadableStream`, `false` otherwise.\n *\n * @private\n */\nfunction canConstructReadableStream() {\n if (supportStatus === undefined) {\n // See https://github.com/GoogleChrome/workbox/issues/1473\n try {\n new ReadableStream({ start() { } });\n supportStatus = true;\n }\n catch (error) {\n supportStatus = false;\n }\n }\n return supportStatus;\n}\nexport { canConstructReadableStream };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nlet supportStatus;\n/**\n * A utility function that determines whether the current browser supports\n * constructing a new `Response` from a `response.body` stream.\n *\n * @return {boolean} `true`, if the current browser can successfully\n * construct a `Response` from a `response.body` stream, `false` otherwise.\n *\n * @private\n */\nfunction canConstructResponseFromBodyStream() {\n if (supportStatus === undefined) {\n const testResponse = new Response('');\n if ('body' in testResponse) {\n try {\n new Response(testResponse.body);\n supportStatus = true;\n }\n catch (error) {\n supportStatus = false;\n }\n }\n supportStatus = false;\n }\n return supportStatus;\n}\nexport { canConstructResponseFromBodyStream };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns a promise that resolves and the passed number of milliseconds.\n * This utility is an async/await-friendly version of `setTimeout`.\n *\n * @param {number} ms\n * @return {Promise}\n * @private\n */\nexport function timeout(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A helper function that prevents a promise from being flagged as unused.\n *\n * @private\n **/\nexport function dontWaitFor(promise) {\n // Effective no-op.\n void promise.then(() => { });\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from '../_private/logger.js';\nimport { quotaErrorCallbacks } from '../models/quotaErrorCallbacks.js';\nimport '../_version.js';\n/**\n * Runs all of the callback functions, one at a time sequentially, in the order\n * in which they were registered.\n *\n * @memberof workbox-core\n * @private\n */\nasync function executeQuotaErrorCallbacks() {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`About to run ${quotaErrorCallbacks.size} ` +\n `callbacks to clean up caches.`);\n }\n for (const callback of quotaErrorCallbacks) {\n await callback();\n if (process.env.NODE_ENV !== 'production') {\n logger.log(callback, 'is complete.');\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Finished running callbacks.');\n }\n}\nexport { executeQuotaErrorCallbacks };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst getFriendlyURL = (url) => {\n const urlObj = new URL(String(url), location.href);\n // See https://github.com/GoogleChrome/workbox/issues/2323\n // We want to include everything, except for the origin if it's same-origin.\n return urlObj.href.replace(new RegExp(`^${location.origin}`), '');\n};\nexport { getFriendlyURL };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { timeout } from './timeout.js';\nimport '../_version.js';\nconst MAX_RETRY_TIME = 2000;\n/**\n * Returns a promise that resolves to a window client matching the passed\n * `resultingClientId`. For browsers that don't support `resultingClientId`\n * or if waiting for the resulting client to apper takes too long, resolve to\n * `undefined`.\n *\n * @param {string} [resultingClientId]\n * @return {Promise}\n * @private\n */\nexport async function resultingClientExists(resultingClientId) {\n if (!resultingClientId) {\n return;\n }\n let existingWindows = await self.clients.matchAll({ type: 'window' });\n const existingWindowIds = new Set(existingWindows.map((w) => w.id));\n let resultingWindow;\n const startTime = performance.now();\n // Only wait up to `MAX_RETRY_TIME` to find a matching client.\n while (performance.now() - startTime < MAX_RETRY_TIME) {\n existingWindows = await self.clients.matchAll({ type: 'window' });\n resultingWindow = existingWindows.find((w) => {\n if (resultingClientId) {\n // If we have a `resultingClientId`, we can match on that.\n return w.id === resultingClientId;\n }\n else {\n // Otherwise match on finding a window not in `existingWindowIds`.\n return !existingWindowIds.has(w.id);\n }\n });\n if (resultingWindow) {\n break;\n }\n // Sleep for 100ms and retry.\n await timeout(100);\n }\n return resultingWindow;\n}\n","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A utility method that makes it easier to use `event.waitUntil` with\n * async functions and return the result.\n *\n * @param {ExtendableEvent} event\n * @param {Function} asyncFn\n * @return {Function}\n * @private\n */\nfunction waitUntil(event, asyncFn) {\n const returnPromise = asyncFn();\n event.waitUntil(returnPromise);\n return returnPromise;\n}\nexport { waitUntil };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { cacheNames as _cacheNames } from './_private/cacheNames.js';\nimport './_version.js';\n/**\n * Get the current cache names and prefix/suffix used by Workbox.\n *\n * `cacheNames.precache` is used for precached assets,\n * `cacheNames.googleAnalytics` is used by `workbox-google-analytics` to\n * store `analytics.js`, and `cacheNames.runtime` is used for everything else.\n *\n * `cacheNames.prefix` can be used to retrieve just the current prefix value.\n * `cacheNames.suffix` can be used to retrieve just the current suffix value.\n *\n * @return {Object} An object with `precache`, `runtime`, `prefix`, and\n * `googleAnalytics` properties.\n *\n * @memberof workbox-core\n */\nconst cacheNames = {\n get googleAnalytics() {\n return _cacheNames.getGoogleAnalyticsName();\n },\n get precache() {\n return _cacheNames.getPrecacheName();\n },\n get prefix() {\n return _cacheNames.getPrefix();\n },\n get runtime() {\n return _cacheNames.getRuntimeName();\n },\n get suffix() {\n return _cacheNames.getSuffix();\n },\n};\nexport { cacheNames };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * Claim any currently available clients once the service worker\n * becomes active. This is normally used in conjunction with `skipWaiting()`.\n *\n * @memberof workbox-core\n */\nfunction clientsClaim() {\n self.addEventListener('activate', () => self.clients.claim());\n}\nexport { clientsClaim };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { canConstructResponseFromBodyStream } from './_private/canConstructResponseFromBodyStream.js';\nimport { WorkboxError } from './_private/WorkboxError.js';\nimport './_version.js';\n/**\n * Allows developers to copy a response and modify its `headers`, `status`,\n * or `statusText` values (the values settable via a\n * [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}\n * object in the constructor).\n * To modify these values, pass a function as the second argument. That\n * function will be invoked with a single object with the response properties\n * `{headers, status, statusText}`. The return value of this function will\n * be used as the `ResponseInit` for the new `Response`. To change the values\n * either modify the passed parameter(s) and return it, or return a totally\n * new object.\n *\n * This method is intentionally limited to same-origin responses, regardless of\n * whether CORS was used or not.\n *\n * @param {Response} response\n * @param {Function} modifier\n * @memberof workbox-core\n */\nasync function copyResponse(response, modifier) {\n let origin = null;\n // If response.url isn't set, assume it's cross-origin and keep origin null.\n if (response.url) {\n const responseURL = new URL(response.url);\n origin = responseURL.origin;\n }\n if (origin !== self.location.origin) {\n throw new WorkboxError('cross-origin-copy-response', { origin });\n }\n const clonedResponse = response.clone();\n // Create a fresh `ResponseInit` object by cloning the headers.\n const responseInit = {\n headers: new Headers(clonedResponse.headers),\n status: clonedResponse.status,\n statusText: clonedResponse.statusText,\n };\n // Apply any user modifications.\n const modifiedResponseInit = modifier ? modifier(responseInit) : responseInit;\n // Create the new response from the body stream and `ResponseInit`\n // modifications. Note: not all browsers support the Response.body stream,\n // so fall back to reading the entire body into memory as a blob.\n const body = canConstructResponseFromBodyStream()\n ? clonedResponse.body\n : await clonedResponse.blob();\n return new Response(body, modifiedResponseInit);\n}\nexport { copyResponse };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from './_private/logger.js';\nimport { assert } from './_private/assert.js';\nimport { quotaErrorCallbacks } from './models/quotaErrorCallbacks.js';\nimport './_version.js';\n/**\n * Adds a function to the set of quotaErrorCallbacks that will be executed if\n * there's a quota error.\n *\n * @param {Function} callback\n * @memberof workbox-core\n */\n// Can't change Function type\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction registerQuotaErrorCallback(callback) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(callback, 'function', {\n moduleName: 'workbox-core',\n funcName: 'register',\n paramName: 'callback',\n });\n }\n quotaErrorCallbacks.add(callback);\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered a callback to respond to quota errors.', callback);\n }\n}\nexport { registerQuotaErrorCallback };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from './_private/assert.js';\nimport { cacheNames } from './_private/cacheNames.js';\nimport { WorkboxError } from './_private/WorkboxError.js';\nimport './_version.js';\n/**\n * Modifies the default cache names used by the Workbox packages.\n * Cache names are generated as `--`.\n *\n * @param {Object} details\n * @param {Object} [details.prefix] The string to add to the beginning of\n * the precache and runtime cache names.\n * @param {Object} [details.suffix] The string to add to the end of\n * the precache and runtime cache names.\n * @param {Object} [details.precache] The cache name to use for precache\n * caching.\n * @param {Object} [details.runtime] The cache name to use for runtime caching.\n * @param {Object} [details.googleAnalytics] The cache name to use for\n * `workbox-google-analytics` caching.\n *\n * @memberof workbox-core\n */\nfunction setCacheNameDetails(details) {\n if (process.env.NODE_ENV !== 'production') {\n Object.keys(details).forEach((key) => {\n assert.isType(details[key], 'string', {\n moduleName: 'workbox-core',\n funcName: 'setCacheNameDetails',\n paramName: `details.${key}`,\n });\n });\n if ('precache' in details && details['precache'].length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'precache',\n value: details['precache'],\n });\n }\n if ('runtime' in details && details['runtime'].length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'runtime',\n value: details['runtime'],\n });\n }\n if ('googleAnalytics' in details &&\n details['googleAnalytics'].length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'googleAnalytics',\n value: details['googleAnalytics'],\n });\n }\n }\n cacheNames.updateDetails(details);\n}\nexport { setCacheNameDetails };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from './_private/logger.js';\nimport './_version.js';\n/**\n * This method is deprecated, and will be removed in Workbox v7.\n *\n * Calling self.skipWaiting() is equivalent, and should be used instead.\n *\n * @memberof workbox-core\n */\nfunction skipWaiting() {\n // Just call self.skipWaiting() directly.\n // See https://github.com/GoogleChrome/workbox/issues/2525\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`skipWaiting() from workbox-core is no longer recommended ` +\n `and will be removed in Workbox v7. Using self.skipWaiting() instead ` +\n `is equivalent.`);\n }\n void self.skipWaiting();\n}\nexport { skipWaiting };\n"],"names":["self","_","e","messageGenerator","fallback","code","args","msg","length","JSON","stringify","WorkboxError","Error","constructor","errorCode","details","super","this","name","quotaErrorCallbacks","Set","_cacheNameDetails","googleAnalytics","precache","prefix","runtime","suffix","registration","scope","_createCacheName","cacheName","filter","value","join","cacheNames","updateDetails","fn","key","Object","keys","eachCacheNameDetail","getGoogleAnalyticsName","userCacheName","getPrecacheName","getPrefix","getRuntimeName","getSuffix","stripParams","fullURL","ignoreParams","strippedURL","URL","param","searchParams","delete","href","supportStatus","canConstructResponseFromBodyStream","undefined","testResponse","Response","body","error","timeout","ms","Promise","resolve","setTimeout","promise","reject","async","cache","request","matchOptions","strippedRequestURL","url","match","keysOptions","assign","ignoreSearch","cacheKeys","cacheKey","ReadableStream","start","then","callback","String","location","replace","RegExp","origin","resultingClientId","existingWindows","clients","matchAll","type","existingWindowIds","map","w","id","resultingWindow","startTime","performance","now","find","has","event","asyncFn","returnPromise","waitUntil","_cacheNames","addEventListener","claim","response","modifier","clonedResponse","clone","responseInit","headers","Headers","status","statusText","modifiedResponseInit","blob","add","skipWaiting"],"mappings":"yEAEA,IACIA,KAAK,uBAAyBC,GAClC,CACA,MAAOC,GAAK,CCEZ,MCgBaC,EAdIC,CAACC,KAASC,KACvB,IAAIC,EAAMF,EAIV,OAHIC,EAAKE,OAAS,IACdD,GAAQ,OAAME,KAAKC,UAAUJ,MAE1BC,CAAG,ECId,MAAMI,UAAqBC,MASvBC,YAAYC,EAAWC,GAEnBC,MADgBb,EAAiBW,EAAWC,IAE5CE,KAAKC,KAAOJ,EACZG,KAAKF,QAAUA,CACnB,EC8BJ,MCnDMI,EAAsB,IAAIC,ICHhC,MAAMC,EAAoB,CACtBC,gBAAiB,kBACjBC,SAAU,cACVC,OAAQ,UACRC,QAAS,UACTC,OAAgC,oBAAjBC,aAA+BA,aAAaC,MAAQ,IAEjEC,EAAoBC,GACf,CAACT,EAAkBG,OAAQM,EAAWT,EAAkBK,QAC1DK,QAAQC,GAAUA,GAASA,EAAMxB,OAAS,IAC1CyB,KAAK,KAODC,EAAa,CACtBC,cAAgBpB,IANSqB,KACzB,IAAK,MAAMC,KAAOC,OAAOC,KAAKlB,GAC1Be,EAAGC,EACP,EAIIG,EAAqBH,IACW,iBAAjBtB,EAAQsB,KACfhB,EAAkBgB,GAAOtB,EAAQsB,GACrC,GACF,EAENI,uBAAyBC,GACdA,GAAiBb,EAAiBR,EAAkBC,iBAE/DqB,gBAAkBD,GACPA,GAAiBb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,MAAMyB,EAAiBF,EAASG,QAE1BC,EAAe,CACjBC,QAAS,IAAIC,QAAQJ,EAAeG,SACpCE,OAAQL,EAAeK,OACvBC,WAAYN,EAAeM,YAGzBC,EAAuBR,EAAWA,EAASG,GAAgBA,EAI3DxD,EAAOJ,IACP0D,EAAetD,WACTsD,EAAeQ,OAC3B,OAAO,IAAI/D,SAASC,EAAM6D,EAC9B,+BCnCA,SAAoCrC,GAQhClE,EAAoByG,IAAIvC,EAI5B,wBCJA,SAA6BtE,GA6BzBmB,EAAWC,cAAcpB,EAC7B,gBC1CA,WAQSf,KAAK6H,aACd"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-expiration.dev.js b/docs/workbox-v7.4.1/workbox-expiration.dev.js deleted file mode 100644 index bb392bd4..00000000 --- a/docs/workbox-v7.4.1/workbox-expiration.dev.js +++ /dev/null @@ -1,848 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.expiration = (function (exports, assert_js, dontWaitFor_js, logger_js, WorkboxError_js, cacheNames_js, getFriendlyURL_js, registerQuotaErrorCallback_js) { - 'use strict'; - - function _extends() { - return _extends = Object.assign ? Object.assign.bind() : function (n) { - for (var e = 1; e < arguments.length; e++) { - var t = arguments[e]; - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); - } - return n; - }, _extends.apply(null, arguments); - } - - const instanceOfAny = (object, constructors) => constructors.some(c => object instanceof c); - let idbProxyableTypes; - let cursorAdvanceMethods; - // This is a function to prevent it throwing up in node environments. - function getIdbProxyableTypes() { - return idbProxyableTypes || (idbProxyableTypes = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction]); - } - // This is a function to prevent it throwing up in node environments. - function getCursorAdvanceMethods() { - return cursorAdvanceMethods || (cursorAdvanceMethods = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey]); - } - const cursorRequestMap = new WeakMap(); - const transactionDoneMap = new WeakMap(); - const transactionStoreNamesMap = new WeakMap(); - const transformCache = new WeakMap(); - const reverseTransformCache = new WeakMap(); - function promisifyRequest(request) { - const promise = new Promise((resolve, reject) => { - const unlisten = () => { - request.removeEventListener('success', success); - request.removeEventListener('error', error); - }; - const success = () => { - resolve(wrap(request.result)); - unlisten(); - }; - const error = () => { - reject(request.error); - unlisten(); - }; - request.addEventListener('success', success); - request.addEventListener('error', error); - }); - promise.then(value => { - // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval - // (see wrapFunction). - if (value instanceof IDBCursor) { - cursorRequestMap.set(value, request); - } - // Catching to avoid "Uncaught Promise exceptions" - }).catch(() => {}); - // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This - // is because we create many promises from a single IDBRequest. - reverseTransformCache.set(promise, request); - return promise; - } - function cacheDonePromiseForTransaction(tx) { - // Early bail if we've already created a done promise for this transaction. - if (transactionDoneMap.has(tx)) return; - const done = new Promise((resolve, reject) => { - const unlisten = () => { - tx.removeEventListener('complete', complete); - tx.removeEventListener('error', error); - tx.removeEventListener('abort', error); - }; - const complete = () => { - resolve(); - unlisten(); - }; - const error = () => { - reject(tx.error || new DOMException('AbortError', 'AbortError')); - unlisten(); - }; - tx.addEventListener('complete', complete); - tx.addEventListener('error', error); - tx.addEventListener('abort', error); - }); - // Cache it for later retrieval. - transactionDoneMap.set(tx, done); - } - let idbProxyTraps = { - get(target, prop, receiver) { - if (target instanceof IDBTransaction) { - // Special handling for transaction.done. - if (prop === 'done') return transactionDoneMap.get(target); - // Polyfill for objectStoreNames because of Edge. - if (prop === 'objectStoreNames') { - return target.objectStoreNames || transactionStoreNamesMap.get(target); - } - // Make tx.store return the only store in the transaction, or undefined if there are many. - if (prop === 'store') { - return receiver.objectStoreNames[1] ? undefined : receiver.objectStore(receiver.objectStoreNames[0]); - } - } - // Else transform whatever we get back. - return wrap(target[prop]); - }, - set(target, prop, value) { - target[prop] = value; - return true; - }, - has(target, prop) { - if (target instanceof IDBTransaction && (prop === 'done' || prop === 'store')) { - return true; - } - return prop in target; - } - }; - function replaceTraps(callback) { - idbProxyTraps = callback(idbProxyTraps); - } - function wrapFunction(func) { - // Due to expected object equality (which is enforced by the caching in `wrap`), we - // only create one new func per func. - // Edge doesn't support objectStoreNames (booo), so we polyfill it here. - if (func === IDBDatabase.prototype.transaction && !('objectStoreNames' in IDBTransaction.prototype)) { - return function (storeNames, ...args) { - const tx = func.call(unwrap(this), storeNames, ...args); - transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]); - return wrap(tx); - }; - } - // Cursor methods are special, as the behaviour is a little more different to standard IDB. In - // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the - // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense - // with real promises, so each advance methods returns a new promise for the cursor object, or - // undefined if the end of the cursor has been reached. - if (getCursorAdvanceMethods().includes(func)) { - return function (...args) { - // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use - // the original object. - func.apply(unwrap(this), args); - return wrap(cursorRequestMap.get(this)); - }; - } - return function (...args) { - // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use - // the original object. - return wrap(func.apply(unwrap(this), args)); - }; - } - function transformCachableValue(value) { - if (typeof value === 'function') return wrapFunction(value); - // This doesn't return, it just creates a 'done' promise for the transaction, - // which is later returned for transaction.done (see idbObjectHandler). - if (value instanceof IDBTransaction) cacheDonePromiseForTransaction(value); - if (instanceOfAny(value, getIdbProxyableTypes())) return new Proxy(value, idbProxyTraps); - // Return the same value back if we're not going to transform it. - return value; - } - function wrap(value) { - // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because - // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached. - if (value instanceof IDBRequest) return promisifyRequest(value); - // If we've already transformed this value before, reuse the transformed value. - // This is faster, but it also provides object equality. - if (transformCache.has(value)) return transformCache.get(value); - const newValue = transformCachableValue(value); - // Not all types are transformed. - // These may be primitive types, so they can't be WeakMap keys. - if (newValue !== value) { - transformCache.set(value, newValue); - reverseTransformCache.set(newValue, value); - } - return newValue; - } - const unwrap = value => reverseTransformCache.get(value); - - /** - * Open a database. - * - * @param name Name of the database. - * @param version Schema version. - * @param callbacks Additional callbacks. - */ - function openDB(name, version, { - blocked, - upgrade, - blocking, - terminated - } = {}) { - const request = indexedDB.open(name, version); - const openPromise = wrap(request); - if (upgrade) { - request.addEventListener('upgradeneeded', event => { - upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction)); - }); - } - if (blocked) request.addEventListener('blocked', () => blocked()); - openPromise.then(db => { - if (terminated) db.addEventListener('close', () => terminated()); - if (blocking) db.addEventListener('versionchange', () => blocking()); - }).catch(() => {}); - return openPromise; - } - /** - * Delete a database. - * - * @param name Name of the database. - */ - function deleteDB(name, { - blocked - } = {}) { - const request = indexedDB.deleteDatabase(name); - if (blocked) request.addEventListener('blocked', () => blocked()); - return wrap(request).then(() => undefined); - } - const readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count']; - const writeMethods = ['put', 'add', 'delete', 'clear']; - const cachedMethods = new Map(); - function getMethod(target, prop) { - if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === 'string')) { - return; - } - if (cachedMethods.get(prop)) return cachedMethods.get(prop); - const targetFuncName = prop.replace(/FromIndex$/, ''); - const useIndex = prop !== targetFuncName; - const isWrite = writeMethods.includes(targetFuncName); - if ( - // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge. - !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))) { - return; - } - const method = async function (storeName, ...args) { - // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :( - const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly'); - let target = tx.store; - if (useIndex) target = target.index(args.shift()); - // Must reject if op rejects. - // If it's a write operation, must reject if tx.done rejects. - // Must reject with op rejection first. - // Must resolve with op value. - // Must handle both promises (no unhandled rejections) - return (await Promise.all([target[targetFuncName](...args), isWrite && tx.done]))[0]; - }; - cachedMethods.set(prop, method); - return method; - } - replaceTraps(oldTraps => _extends({}, oldTraps, { - get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver), - has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop) - })); - - // @ts-ignore - try { - self['workbox:expiration:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const DB_NAME = 'workbox-expiration'; - const CACHE_OBJECT_STORE = 'cache-entries'; - const normalizeURL = unNormalizedUrl => { - const url = new URL(unNormalizedUrl, location.href); - url.hash = ''; - return url.href; - }; - /** - * Returns the timestamp model. - * - * @private - */ - class CacheTimestampsModel { - /** - * - * @param {string} cacheName - * - * @private - */ - constructor(cacheName) { - this._db = null; - this._cacheName = cacheName; - } - /** - * Performs an upgrade of indexedDB. - * - * @param {IDBPDatabase} db - * - * @private - */ - _upgradeDb(db) { - // TODO(philipwalton): EdgeHTML doesn't support arrays as a keyPath, so we - // have to use the `id` keyPath here and create our own values (a - // concatenation of `url + cacheName`) instead of simply using - // `keyPath: ['url', 'cacheName']`, which is supported in other browsers. - const objStore = db.createObjectStore(CACHE_OBJECT_STORE, { - keyPath: 'id' - }); - // TODO(philipwalton): once we don't have to support EdgeHTML, we can - // create a single index with the keyPath `['cacheName', 'timestamp']` - // instead of doing both these indexes. - objStore.createIndex('cacheName', 'cacheName', { - unique: false - }); - objStore.createIndex('timestamp', 'timestamp', { - unique: false - }); - } - /** - * Performs an upgrade of indexedDB and deletes deprecated DBs. - * - * @param {IDBPDatabase} db - * - * @private - */ - _upgradeDbAndDeleteOldDbs(db) { - this._upgradeDb(db); - if (this._cacheName) { - void deleteDB(this._cacheName); - } - } - /** - * @param {string} url - * @param {number} timestamp - * - * @private - */ - async setTimestamp(url, timestamp) { - url = normalizeURL(url); - const entry = { - url, - timestamp, - cacheName: this._cacheName, - // Creating an ID from the URL and cache name won't be necessary once - // Edge switches to Chromium and all browsers we support work with - // array keyPaths. - id: this._getId(url) - }; - const db = await this.getDb(); - const tx = db.transaction(CACHE_OBJECT_STORE, 'readwrite', { - durability: 'relaxed' - }); - await tx.store.put(entry); - await tx.done; - } - /** - * Returns the timestamp stored for a given URL. - * - * @param {string} url - * @return {number | undefined} - * - * @private - */ - async getTimestamp(url) { - const db = await this.getDb(); - const entry = await db.get(CACHE_OBJECT_STORE, this._getId(url)); - return entry === null || entry === void 0 ? void 0 : entry.timestamp; - } - /** - * Iterates through all the entries in the object store (from newest to - * oldest) and removes entries once either `maxCount` is reached or the - * entry's timestamp is less than `minTimestamp`. - * - * @param {number} minTimestamp - * @param {number} maxCount - * @return {Array} - * - * @private - */ - async expireEntries(minTimestamp, maxCount) { - const db = await this.getDb(); - let cursor = await db.transaction(CACHE_OBJECT_STORE).store.index('timestamp').openCursor(null, 'prev'); - const entriesToDelete = []; - let entriesNotDeletedCount = 0; - while (cursor) { - const result = cursor.value; - // TODO(philipwalton): once we can use a multi-key index, we - // won't have to check `cacheName` here. - if (result.cacheName === this._cacheName) { - // Delete an entry if it's older than the max age or - // if we already have the max number allowed. - if (minTimestamp && result.timestamp < minTimestamp || maxCount && entriesNotDeletedCount >= maxCount) { - // TODO(philipwalton): we should be able to delete the - // entry right here, but doing so causes an iteration - // bug in Safari stable (fixed in TP). Instead we can - // store the keys of the entries to delete, and then - // delete the separate transactions. - // https://github.com/GoogleChrome/workbox/issues/1978 - // cursor.delete(); - // We only need to return the URL, not the whole entry. - entriesToDelete.push(cursor.value); - } else { - entriesNotDeletedCount++; - } - } - cursor = await cursor.continue(); - } - // TODO(philipwalton): once the Safari bug in the following issue is fixed, - // we should be able to remove this loop and do the entry deletion in the - // cursor loop above: - // https://github.com/GoogleChrome/workbox/issues/1978 - const urlsDeleted = []; - for (const entry of entriesToDelete) { - await db.delete(CACHE_OBJECT_STORE, entry.id); - urlsDeleted.push(entry.url); - } - return urlsDeleted; - } - /** - * Takes a URL and returns an ID that will be unique in the object store. - * - * @param {string} url - * @return {string} - * - * @private - */ - _getId(url) { - // Creating an ID from the URL and cache name won't be necessary once - // Edge switches to Chromium and all browsers we support work with - // array keyPaths. - return this._cacheName + '|' + normalizeURL(url); - } - /** - * Returns an open connection to the database. - * - * @private - */ - async getDb() { - if (!this._db) { - this._db = await openDB(DB_NAME, 1, { - upgrade: this._upgradeDbAndDeleteOldDbs.bind(this) - }); - } - return this._db; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * The `CacheExpiration` class allows you define an expiration and / or - * limit on the number of responses stored in a - * [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache). - * - * @memberof workbox-expiration - */ - class CacheExpiration { - /** - * To construct a new CacheExpiration instance you must provide at least - * one of the `config` properties. - * - * @param {string} cacheName Name of the cache to apply restrictions to. - * @param {Object} config - * @param {number} [config.maxEntries] The maximum number of entries to cache. - * Entries used the least will be removed as the maximum is reached. - * @param {number} [config.maxAgeSeconds] The maximum age of an entry before - * it's treated as stale and removed. - * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters) - * that will be used when calling `delete()` on the cache. - */ - constructor(cacheName, config = {}) { - this._isRunning = false; - this._rerunRequested = false; - { - assert_js.assert.isType(cacheName, 'string', { - moduleName: 'workbox-expiration', - className: 'CacheExpiration', - funcName: 'constructor', - paramName: 'cacheName' - }); - if (!(config.maxEntries || config.maxAgeSeconds)) { - throw new WorkboxError_js.WorkboxError('max-entries-or-age-required', { - moduleName: 'workbox-expiration', - className: 'CacheExpiration', - funcName: 'constructor' - }); - } - if (config.maxEntries) { - assert_js.assert.isType(config.maxEntries, 'number', { - moduleName: 'workbox-expiration', - className: 'CacheExpiration', - funcName: 'constructor', - paramName: 'config.maxEntries' - }); - } - if (config.maxAgeSeconds) { - assert_js.assert.isType(config.maxAgeSeconds, 'number', { - moduleName: 'workbox-expiration', - className: 'CacheExpiration', - funcName: 'constructor', - paramName: 'config.maxAgeSeconds' - }); - } - } - this._maxEntries = config.maxEntries; - this._maxAgeSeconds = config.maxAgeSeconds; - this._matchOptions = config.matchOptions; - this._cacheName = cacheName; - this._timestampModel = new CacheTimestampsModel(cacheName); - } - /** - * Expires entries for the given cache and given criteria. - */ - async expireEntries() { - if (this._isRunning) { - this._rerunRequested = true; - return; - } - this._isRunning = true; - const minTimestamp = this._maxAgeSeconds ? Date.now() - this._maxAgeSeconds * 1000 : 0; - const urlsExpired = await this._timestampModel.expireEntries(minTimestamp, this._maxEntries); - // Delete URLs from the cache - const cache = await self.caches.open(this._cacheName); - for (const url of urlsExpired) { - await cache.delete(url, this._matchOptions); - } - { - if (urlsExpired.length > 0) { - logger_js.logger.groupCollapsed(`Expired ${urlsExpired.length} ` + `${urlsExpired.length === 1 ? 'entry' : 'entries'} and removed ` + `${urlsExpired.length === 1 ? 'it' : 'them'} from the ` + `'${this._cacheName}' cache.`); - logger_js.logger.log(`Expired the following ${urlsExpired.length === 1 ? 'URL' : 'URLs'}:`); - urlsExpired.forEach(url => logger_js.logger.log(` ${url}`)); - logger_js.logger.groupEnd(); - } else { - logger_js.logger.debug(`Cache expiration ran and found no entries to remove.`); - } - } - this._isRunning = false; - if (this._rerunRequested) { - this._rerunRequested = false; - dontWaitFor_js.dontWaitFor(this.expireEntries()); - } - } - /** - * Update the timestamp for the given URL. This ensures the when - * removing entries based on maximum entries, most recently used - * is accurate or when expiring, the timestamp is up-to-date. - * - * @param {string} url - */ - async updateTimestamp(url) { - { - assert_js.assert.isType(url, 'string', { - moduleName: 'workbox-expiration', - className: 'CacheExpiration', - funcName: 'updateTimestamp', - paramName: 'url' - }); - } - await this._timestampModel.setTimestamp(url, Date.now()); - } - /** - * Can be used to check if a URL has expired or not before it's used. - * - * This requires a look up from IndexedDB, so can be slow. - * - * Note: This method will not remove the cached entry, call - * `expireEntries()` to remove indexedDB and Cache entries. - * - * @param {string} url - * @return {boolean} - */ - async isURLExpired(url) { - if (!this._maxAgeSeconds) { - { - throw new WorkboxError_js.WorkboxError(`expired-test-without-max-age`, { - methodName: 'isURLExpired', - paramName: 'maxAgeSeconds' - }); - } - } else { - const timestamp = await this._timestampModel.getTimestamp(url); - const expireOlderThan = Date.now() - this._maxAgeSeconds * 1000; - return timestamp !== undefined ? timestamp < expireOlderThan : true; - } - } - /** - * Removes the IndexedDB object store used to keep track of cache expiration - * metadata. - */ - async delete() { - // Make sure we don't attempt another rerun if we're called in the middle of - // a cache expiration. - this._rerunRequested = false; - await this._timestampModel.expireEntries(Infinity); // Expires all. - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * This plugin can be used in a `workbox-strategy` to regularly enforce a - * limit on the age and / or the number of cached requests. - * - * It can only be used with `workbox-strategy` instances that have a - * [custom `cacheName` property set](/web/tools/workbox/guides/configure-workbox#custom_cache_names_in_strategies). - * In other words, it can't be used to expire entries in strategy that uses the - * default runtime cache name. - * - * Whenever a cached response is used or updated, this plugin will look - * at the associated cache and remove any old or extra responses. - * - * When using `maxAgeSeconds`, responses may be used *once* after expiring - * because the expiration clean up will not have occurred until *after* the - * cached response has been used. If the response has a "Date" header, then - * a light weight expiration check is performed and the response will not be - * used immediately. - * - * When using `maxEntries`, the entry least-recently requested will be removed - * from the cache first. - * - * @memberof workbox-expiration - */ - class ExpirationPlugin { - /** - * @param {ExpirationPluginOptions} config - * @param {number} [config.maxEntries] The maximum number of entries to cache. - * Entries used the least will be removed as the maximum is reached. - * @param {number} [config.maxAgeSeconds] The maximum age of an entry before - * it's treated as stale and removed. - * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters) - * that will be used when calling `delete()` on the cache. - * @param {boolean} [config.purgeOnQuotaError] Whether to opt this cache in to - * automatic deletion if the available storage quota has been exceeded. - */ - constructor(config = {}) { - /** - * A "lifecycle" callback that will be triggered automatically by the - * `workbox-strategies` handlers when a `Response` is about to be returned - * from a [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to - * the handler. It allows the `Response` to be inspected for freshness and - * prevents it from being used if the `Response`'s `Date` header value is - * older than the configured `maxAgeSeconds`. - * - * @param {Object} options - * @param {string} options.cacheName Name of the cache the response is in. - * @param {Response} options.cachedResponse The `Response` object that's been - * read from a cache and whose freshness should be checked. - * @return {Response} Either the `cachedResponse`, if it's - * fresh, or `null` if the `Response` is older than `maxAgeSeconds`. - * - * @private - */ - this.cachedResponseWillBeUsed = async ({ - event, - request, - cacheName, - cachedResponse - }) => { - if (!cachedResponse) { - return null; - } - const isFresh = this._isResponseDateFresh(cachedResponse); - // Expire entries to ensure that even if the expiration date has - // expired, it'll only be used once. - const cacheExpiration = this._getCacheExpiration(cacheName); - dontWaitFor_js.dontWaitFor(cacheExpiration.expireEntries()); - // Update the metadata for the request URL to the current timestamp, - // but don't `await` it as we don't want to block the response. - const updateTimestampDone = cacheExpiration.updateTimestamp(request.url); - if (event) { - try { - event.waitUntil(updateTimestampDone); - } catch (error) { - { - // The event may not be a fetch event; only log the URL if it is. - if ('request' in event) { - logger_js.logger.warn(`Unable to ensure service worker stays alive when ` + `updating cache entry for ` + `'${getFriendlyURL_js.getFriendlyURL(event.request.url)}'.`); - } - } - } - } - return isFresh ? cachedResponse : null; - }; - /** - * A "lifecycle" callback that will be triggered automatically by the - * `workbox-strategies` handlers when an entry is added to a cache. - * - * @param {Object} options - * @param {string} options.cacheName Name of the cache that was updated. - * @param {string} options.request The Request for the cached entry. - * - * @private - */ - this.cacheDidUpdate = async ({ - cacheName, - request - }) => { - { - assert_js.assert.isType(cacheName, 'string', { - moduleName: 'workbox-expiration', - className: 'Plugin', - funcName: 'cacheDidUpdate', - paramName: 'cacheName' - }); - assert_js.assert.isInstance(request, Request, { - moduleName: 'workbox-expiration', - className: 'Plugin', - funcName: 'cacheDidUpdate', - paramName: 'request' - }); - } - const cacheExpiration = this._getCacheExpiration(cacheName); - await cacheExpiration.updateTimestamp(request.url); - await cacheExpiration.expireEntries(); - }; - { - if (!(config.maxEntries || config.maxAgeSeconds)) { - throw new WorkboxError_js.WorkboxError('max-entries-or-age-required', { - moduleName: 'workbox-expiration', - className: 'Plugin', - funcName: 'constructor' - }); - } - if (config.maxEntries) { - assert_js.assert.isType(config.maxEntries, 'number', { - moduleName: 'workbox-expiration', - className: 'Plugin', - funcName: 'constructor', - paramName: 'config.maxEntries' - }); - } - if (config.maxAgeSeconds) { - assert_js.assert.isType(config.maxAgeSeconds, 'number', { - moduleName: 'workbox-expiration', - className: 'Plugin', - funcName: 'constructor', - paramName: 'config.maxAgeSeconds' - }); - } - } - this._config = config; - this._maxAgeSeconds = config.maxAgeSeconds; - this._cacheExpirations = new Map(); - if (config.purgeOnQuotaError) { - registerQuotaErrorCallback_js.registerQuotaErrorCallback(() => this.deleteCacheAndMetadata()); - } - } - /** - * A simple helper method to return a CacheExpiration instance for a given - * cache name. - * - * @param {string} cacheName - * @return {CacheExpiration} - * - * @private - */ - _getCacheExpiration(cacheName) { - if (cacheName === cacheNames_js.cacheNames.getRuntimeName()) { - throw new WorkboxError_js.WorkboxError('expire-custom-caches-only'); - } - let cacheExpiration = this._cacheExpirations.get(cacheName); - if (!cacheExpiration) { - cacheExpiration = new CacheExpiration(cacheName, this._config); - this._cacheExpirations.set(cacheName, cacheExpiration); - } - return cacheExpiration; - } - /** - * @param {Response} cachedResponse - * @return {boolean} - * - * @private - */ - _isResponseDateFresh(cachedResponse) { - if (!this._maxAgeSeconds) { - // We aren't expiring by age, so return true, it's fresh - return true; - } - // Check if the 'date' header will suffice a quick expiration check. - // See https://github.com/GoogleChromeLabs/sw-toolbox/issues/164 for - // discussion. - const dateHeaderTimestamp = this._getDateHeaderTimestamp(cachedResponse); - if (dateHeaderTimestamp === null) { - // Unable to parse date, so assume it's fresh. - return true; - } - // If we have a valid headerTime, then our response is fresh iff the - // headerTime plus maxAgeSeconds is greater than the current time. - const now = Date.now(); - return dateHeaderTimestamp >= now - this._maxAgeSeconds * 1000; - } - /** - * This method will extract the data header and parse it into a useful - * value. - * - * @param {Response} cachedResponse - * @return {number|null} - * - * @private - */ - _getDateHeaderTimestamp(cachedResponse) { - if (!cachedResponse.headers.has('date')) { - return null; - } - const dateHeader = cachedResponse.headers.get('date'); - const parsedDate = new Date(dateHeader); - const headerTime = parsedDate.getTime(); - // If the Date header was invalid for some reason, parsedDate.getTime() - // will return NaN. - if (isNaN(headerTime)) { - return null; - } - return headerTime; - } - /** - * This is a helper method that performs two operations: - * - * - Deletes *all* the underlying Cache instances associated with this plugin - * instance, by calling caches.delete() on your behalf. - * - Deletes the metadata from IndexedDB used to keep track of expiration - * details for each Cache instance. - * - * When using cache expiration, calling this method is preferable to calling - * `caches.delete()` directly, since this will ensure that the IndexedDB - * metadata is also cleanly removed and open IndexedDB instances are deleted. - * - * Note that if you're *not* using cache expiration for a given cache, calling - * `caches.delete()` and passing in the cache's name should be sufficient. - * There is no Workbox-specific method needed for cleanup in that case. - */ - async deleteCacheAndMetadata() { - // Do this one at a time instead of all at once via `Promise.all()` to - // reduce the chance of inconsistency if a promise rejects. - for (const [cacheName, cacheExpiration] of this._cacheExpirations) { - await self.caches.delete(cacheName); - await cacheExpiration.delete(); - } - // Reset this._cacheExpirations to its initial state. - this._cacheExpirations = new Map(); - } - } - - exports.CacheExpiration = CacheExpiration; - exports.ExpirationPlugin = ExpirationPlugin; - - return exports; - -})({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core); -//# sourceMappingURL=workbox-expiration.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-expiration.dev.js.map b/docs/workbox-v7.4.1/workbox-expiration.dev.js.map deleted file mode 100644 index 36795d21..00000000 --- a/docs/workbox-v7.4.1/workbox-expiration.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-expiration.dev.js","sources":["../node_modules/idb/build/wrap-idb-value.js","../node_modules/idb/build/index.js","../_version.js","../models/CacheTimestampsModel.js","../CacheExpiration.js","../ExpirationPlugin.js"],"sourcesContent":["const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction));\n });\n }\n if (blocked)\n request.addEventListener('blocked', () => blocked());\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking)\n db.addEventListener('versionchange', () => blocking());\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked)\n request.addEventListener('blocked', () => blocked());\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:expiration:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { openDB, deleteDB } from 'idb';\nimport '../_version.js';\nconst DB_NAME = 'workbox-expiration';\nconst CACHE_OBJECT_STORE = 'cache-entries';\nconst normalizeURL = (unNormalizedUrl) => {\n const url = new URL(unNormalizedUrl, location.href);\n url.hash = '';\n return url.href;\n};\n/**\n * Returns the timestamp model.\n *\n * @private\n */\nclass CacheTimestampsModel {\n /**\n *\n * @param {string} cacheName\n *\n * @private\n */\n constructor(cacheName) {\n this._db = null;\n this._cacheName = cacheName;\n }\n /**\n * Performs an upgrade of indexedDB.\n *\n * @param {IDBPDatabase} db\n *\n * @private\n */\n _upgradeDb(db) {\n // TODO(philipwalton): EdgeHTML doesn't support arrays as a keyPath, so we\n // have to use the `id` keyPath here and create our own values (a\n // concatenation of `url + cacheName`) instead of simply using\n // `keyPath: ['url', 'cacheName']`, which is supported in other browsers.\n const objStore = db.createObjectStore(CACHE_OBJECT_STORE, { keyPath: 'id' });\n // TODO(philipwalton): once we don't have to support EdgeHTML, we can\n // create a single index with the keyPath `['cacheName', 'timestamp']`\n // instead of doing both these indexes.\n objStore.createIndex('cacheName', 'cacheName', { unique: false });\n objStore.createIndex('timestamp', 'timestamp', { unique: false });\n }\n /**\n * Performs an upgrade of indexedDB and deletes deprecated DBs.\n *\n * @param {IDBPDatabase} db\n *\n * @private\n */\n _upgradeDbAndDeleteOldDbs(db) {\n this._upgradeDb(db);\n if (this._cacheName) {\n void deleteDB(this._cacheName);\n }\n }\n /**\n * @param {string} url\n * @param {number} timestamp\n *\n * @private\n */\n async setTimestamp(url, timestamp) {\n url = normalizeURL(url);\n const entry = {\n url,\n timestamp,\n cacheName: this._cacheName,\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n id: this._getId(url),\n };\n const db = await this.getDb();\n const tx = db.transaction(CACHE_OBJECT_STORE, 'readwrite', {\n durability: 'relaxed',\n });\n await tx.store.put(entry);\n await tx.done;\n }\n /**\n * Returns the timestamp stored for a given URL.\n *\n * @param {string} url\n * @return {number | undefined}\n *\n * @private\n */\n async getTimestamp(url) {\n const db = await this.getDb();\n const entry = await db.get(CACHE_OBJECT_STORE, this._getId(url));\n return entry === null || entry === void 0 ? void 0 : entry.timestamp;\n }\n /**\n * Iterates through all the entries in the object store (from newest to\n * oldest) and removes entries once either `maxCount` is reached or the\n * entry's timestamp is less than `minTimestamp`.\n *\n * @param {number} minTimestamp\n * @param {number} maxCount\n * @return {Array}\n *\n * @private\n */\n async expireEntries(minTimestamp, maxCount) {\n const db = await this.getDb();\n let cursor = await db\n .transaction(CACHE_OBJECT_STORE)\n .store.index('timestamp')\n .openCursor(null, 'prev');\n const entriesToDelete = [];\n let entriesNotDeletedCount = 0;\n while (cursor) {\n const result = cursor.value;\n // TODO(philipwalton): once we can use a multi-key index, we\n // won't have to check `cacheName` here.\n if (result.cacheName === this._cacheName) {\n // Delete an entry if it's older than the max age or\n // if we already have the max number allowed.\n if ((minTimestamp && result.timestamp < minTimestamp) ||\n (maxCount && entriesNotDeletedCount >= maxCount)) {\n // TODO(philipwalton): we should be able to delete the\n // entry right here, but doing so causes an iteration\n // bug in Safari stable (fixed in TP). Instead we can\n // store the keys of the entries to delete, and then\n // delete the separate transactions.\n // https://github.com/GoogleChrome/workbox/issues/1978\n // cursor.delete();\n // We only need to return the URL, not the whole entry.\n entriesToDelete.push(cursor.value);\n }\n else {\n entriesNotDeletedCount++;\n }\n }\n cursor = await cursor.continue();\n }\n // TODO(philipwalton): once the Safari bug in the following issue is fixed,\n // we should be able to remove this loop and do the entry deletion in the\n // cursor loop above:\n // https://github.com/GoogleChrome/workbox/issues/1978\n const urlsDeleted = [];\n for (const entry of entriesToDelete) {\n await db.delete(CACHE_OBJECT_STORE, entry.id);\n urlsDeleted.push(entry.url);\n }\n return urlsDeleted;\n }\n /**\n * Takes a URL and returns an ID that will be unique in the object store.\n *\n * @param {string} url\n * @return {string}\n *\n * @private\n */\n _getId(url) {\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n return this._cacheName + '|' + normalizeURL(url);\n }\n /**\n * Returns an open connection to the database.\n *\n * @private\n */\n async getDb() {\n if (!this._db) {\n this._db = await openDB(DB_NAME, 1, {\n upgrade: this._upgradeDbAndDeleteOldDbs.bind(this),\n });\n }\n return this._db;\n }\n}\nexport { CacheTimestampsModel };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { CacheTimestampsModel } from './models/CacheTimestampsModel.js';\nimport './_version.js';\n/**\n * The `CacheExpiration` class allows you define an expiration and / or\n * limit on the number of responses stored in a\n * [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).\n *\n * @memberof workbox-expiration\n */\nclass CacheExpiration {\n /**\n * To construct a new CacheExpiration instance you must provide at least\n * one of the `config` properties.\n *\n * @param {string} cacheName Name of the cache to apply restrictions to.\n * @param {Object} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters)\n * that will be used when calling `delete()` on the cache.\n */\n constructor(cacheName, config = {}) {\n this._isRunning = false;\n this._rerunRequested = false;\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'cacheName',\n });\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n });\n }\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n }\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n }\n }\n this._maxEntries = config.maxEntries;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._matchOptions = config.matchOptions;\n this._cacheName = cacheName;\n this._timestampModel = new CacheTimestampsModel(cacheName);\n }\n /**\n * Expires entries for the given cache and given criteria.\n */\n async expireEntries() {\n if (this._isRunning) {\n this._rerunRequested = true;\n return;\n }\n this._isRunning = true;\n const minTimestamp = this._maxAgeSeconds\n ? Date.now() - this._maxAgeSeconds * 1000\n : 0;\n const urlsExpired = await this._timestampModel.expireEntries(minTimestamp, this._maxEntries);\n // Delete URLs from the cache\n const cache = await self.caches.open(this._cacheName);\n for (const url of urlsExpired) {\n await cache.delete(url, this._matchOptions);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (urlsExpired.length > 0) {\n logger.groupCollapsed(`Expired ${urlsExpired.length} ` +\n `${urlsExpired.length === 1 ? 'entry' : 'entries'} and removed ` +\n `${urlsExpired.length === 1 ? 'it' : 'them'} from the ` +\n `'${this._cacheName}' cache.`);\n logger.log(`Expired the following ${urlsExpired.length === 1 ? 'URL' : 'URLs'}:`);\n urlsExpired.forEach((url) => logger.log(` ${url}`));\n logger.groupEnd();\n }\n else {\n logger.debug(`Cache expiration ran and found no entries to remove.`);\n }\n }\n this._isRunning = false;\n if (this._rerunRequested) {\n this._rerunRequested = false;\n dontWaitFor(this.expireEntries());\n }\n }\n /**\n * Update the timestamp for the given URL. This ensures the when\n * removing entries based on maximum entries, most recently used\n * is accurate or when expiring, the timestamp is up-to-date.\n *\n * @param {string} url\n */\n async updateTimestamp(url) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(url, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'updateTimestamp',\n paramName: 'url',\n });\n }\n await this._timestampModel.setTimestamp(url, Date.now());\n }\n /**\n * Can be used to check if a URL has expired or not before it's used.\n *\n * This requires a look up from IndexedDB, so can be slow.\n *\n * Note: This method will not remove the cached entry, call\n * `expireEntries()` to remove indexedDB and Cache entries.\n *\n * @param {string} url\n * @return {boolean}\n */\n async isURLExpired(url) {\n if (!this._maxAgeSeconds) {\n if (process.env.NODE_ENV !== 'production') {\n throw new WorkboxError(`expired-test-without-max-age`, {\n methodName: 'isURLExpired',\n paramName: 'maxAgeSeconds',\n });\n }\n return false;\n }\n else {\n const timestamp = await this._timestampModel.getTimestamp(url);\n const expireOlderThan = Date.now() - this._maxAgeSeconds * 1000;\n return timestamp !== undefined ? timestamp < expireOlderThan : true;\n }\n }\n /**\n * Removes the IndexedDB object store used to keep track of cache expiration\n * metadata.\n */\n async delete() {\n // Make sure we don't attempt another rerun if we're called in the middle of\n // a cache expiration.\n this._rerunRequested = false;\n await this._timestampModel.expireEntries(Infinity); // Expires all.\n }\n}\nexport { CacheExpiration };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { registerQuotaErrorCallback } from 'workbox-core/registerQuotaErrorCallback.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { CacheExpiration } from './CacheExpiration.js';\nimport './_version.js';\n/**\n * This plugin can be used in a `workbox-strategy` to regularly enforce a\n * limit on the age and / or the number of cached requests.\n *\n * It can only be used with `workbox-strategy` instances that have a\n * [custom `cacheName` property set](/web/tools/workbox/guides/configure-workbox#custom_cache_names_in_strategies).\n * In other words, it can't be used to expire entries in strategy that uses the\n * default runtime cache name.\n *\n * Whenever a cached response is used or updated, this plugin will look\n * at the associated cache and remove any old or extra responses.\n *\n * When using `maxAgeSeconds`, responses may be used *once* after expiring\n * because the expiration clean up will not have occurred until *after* the\n * cached response has been used. If the response has a \"Date\" header, then\n * a light weight expiration check is performed and the response will not be\n * used immediately.\n *\n * When using `maxEntries`, the entry least-recently requested will be removed\n * from the cache first.\n *\n * @memberof workbox-expiration\n */\nclass ExpirationPlugin {\n /**\n * @param {ExpirationPluginOptions} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters)\n * that will be used when calling `delete()` on the cache.\n * @param {boolean} [config.purgeOnQuotaError] Whether to opt this cache in to\n * automatic deletion if the available storage quota has been exceeded.\n */\n constructor(config = {}) {\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox-strategies` handlers when a `Response` is about to be returned\n * from a [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to\n * the handler. It allows the `Response` to be inspected for freshness and\n * prevents it from being used if the `Response`'s `Date` header value is\n * older than the configured `maxAgeSeconds`.\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache the response is in.\n * @param {Response} options.cachedResponse The `Response` object that's been\n * read from a cache and whose freshness should be checked.\n * @return {Response} Either the `cachedResponse`, if it's\n * fresh, or `null` if the `Response` is older than `maxAgeSeconds`.\n *\n * @private\n */\n this.cachedResponseWillBeUsed = async ({ event, request, cacheName, cachedResponse, }) => {\n if (!cachedResponse) {\n return null;\n }\n const isFresh = this._isResponseDateFresh(cachedResponse);\n // Expire entries to ensure that even if the expiration date has\n // expired, it'll only be used once.\n const cacheExpiration = this._getCacheExpiration(cacheName);\n dontWaitFor(cacheExpiration.expireEntries());\n // Update the metadata for the request URL to the current timestamp,\n // but don't `await` it as we don't want to block the response.\n const updateTimestampDone = cacheExpiration.updateTimestamp(request.url);\n if (event) {\n try {\n event.waitUntil(updateTimestampDone);\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n // The event may not be a fetch event; only log the URL if it is.\n if ('request' in event) {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache entry for ` +\n `'${getFriendlyURL(event.request.url)}'.`);\n }\n }\n }\n }\n return isFresh ? cachedResponse : null;\n };\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox-strategies` handlers when an entry is added to a cache.\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache that was updated.\n * @param {string} options.request The Request for the cached entry.\n *\n * @private\n */\n this.cacheDidUpdate = async ({ cacheName, request, }) => {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'cacheName',\n });\n assert.isInstance(request, Request, {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'request',\n });\n }\n const cacheExpiration = this._getCacheExpiration(cacheName);\n await cacheExpiration.updateTimestamp(request.url);\n await cacheExpiration.expireEntries();\n };\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n });\n }\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n }\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n }\n }\n this._config = config;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._cacheExpirations = new Map();\n if (config.purgeOnQuotaError) {\n registerQuotaErrorCallback(() => this.deleteCacheAndMetadata());\n }\n }\n /**\n * A simple helper method to return a CacheExpiration instance for a given\n * cache name.\n *\n * @param {string} cacheName\n * @return {CacheExpiration}\n *\n * @private\n */\n _getCacheExpiration(cacheName) {\n if (cacheName === cacheNames.getRuntimeName()) {\n throw new WorkboxError('expire-custom-caches-only');\n }\n let cacheExpiration = this._cacheExpirations.get(cacheName);\n if (!cacheExpiration) {\n cacheExpiration = new CacheExpiration(cacheName, this._config);\n this._cacheExpirations.set(cacheName, cacheExpiration);\n }\n return cacheExpiration;\n }\n /**\n * @param {Response} cachedResponse\n * @return {boolean}\n *\n * @private\n */\n _isResponseDateFresh(cachedResponse) {\n if (!this._maxAgeSeconds) {\n // We aren't expiring by age, so return true, it's fresh\n return true;\n }\n // Check if the 'date' header will suffice a quick expiration check.\n // See https://github.com/GoogleChromeLabs/sw-toolbox/issues/164 for\n // discussion.\n const dateHeaderTimestamp = this._getDateHeaderTimestamp(cachedResponse);\n if (dateHeaderTimestamp === null) {\n // Unable to parse date, so assume it's fresh.\n return true;\n }\n // If we have a valid headerTime, then our response is fresh iff the\n // headerTime plus maxAgeSeconds is greater than the current time.\n const now = Date.now();\n return dateHeaderTimestamp >= now - this._maxAgeSeconds * 1000;\n }\n /**\n * This method will extract the data header and parse it into a useful\n * value.\n *\n * @param {Response} cachedResponse\n * @return {number|null}\n *\n * @private\n */\n _getDateHeaderTimestamp(cachedResponse) {\n if (!cachedResponse.headers.has('date')) {\n return null;\n }\n const dateHeader = cachedResponse.headers.get('date');\n const parsedDate = new Date(dateHeader);\n const headerTime = parsedDate.getTime();\n // If the Date header was invalid for some reason, parsedDate.getTime()\n // will return NaN.\n if (isNaN(headerTime)) {\n return null;\n }\n return headerTime;\n }\n /**\n * This is a helper method that performs two operations:\n *\n * - Deletes *all* the underlying Cache instances associated with this plugin\n * instance, by calling caches.delete() on your behalf.\n * - Deletes the metadata from IndexedDB used to keep track of expiration\n * details for each Cache instance.\n *\n * When using cache expiration, calling this method is preferable to calling\n * `caches.delete()` directly, since this will ensure that the IndexedDB\n * metadata is also cleanly removed and open IndexedDB instances are deleted.\n *\n * Note that if you're *not* using cache expiration for a given cache, calling\n * `caches.delete()` and passing in the cache's name should be sufficient.\n * There is no Workbox-specific method needed for cleanup in that case.\n */\n async deleteCacheAndMetadata() {\n // Do this one at a time instead of all at once via `Promise.all()` to\n // reduce the chance of inconsistency if a promise rejects.\n for (const [cacheName, cacheExpiration] of this._cacheExpirations) {\n await self.caches.delete(cacheName);\n await cacheExpiration.delete();\n }\n // Reset this._cacheExpirations to its initial state.\n this._cacheExpirations = new Map();\n }\n}\nexport { ExpirationPlugin };\n"],"names":["instanceOfAny","object","constructors","some","c","idbProxyableTypes","cursorAdvanceMethods","getIdbProxyableTypes","IDBDatabase","IDBObjectStore","IDBIndex","IDBCursor","IDBTransaction","getCursorAdvanceMethods","prototype","advance","continue","continuePrimaryKey","cursorRequestMap","WeakMap","transactionDoneMap","transactionStoreNamesMap","transformCache","reverseTransformCache","promisifyRequest","request","promise","Promise","resolve","reject","unlisten","removeEventListener","success","error","wrap","result","addEventListener","then","value","set","catch","cacheDonePromiseForTransaction","tx","has","done","complete","DOMException","idbProxyTraps","get","target","prop","receiver","objectStoreNames","undefined","objectStore","replaceTraps","callback","wrapFunction","func","transaction","storeNames","args","call","unwrap","sort","includes","apply","transformCachableValue","Proxy","IDBRequest","newValue","openDB","name","version","blocked","upgrade","blocking","terminated","indexedDB","open","openPromise","event","oldVersion","newVersion","db","deleteDB","deleteDatabase","readMethods","writeMethods","cachedMethods","Map","getMethod","targetFuncName","replace","useIndex","isWrite","method","storeName","store","index","shift","all","oldTraps","_extends","self","_","e","DB_NAME","CACHE_OBJECT_STORE","normalizeURL","unNormalizedUrl","url","URL","location","href","hash","CacheTimestampsModel","constructor","cacheName","_db","_cacheName","_upgradeDb","objStore","createObjectStore","keyPath","createIndex","unique","_upgradeDbAndDeleteOldDbs","setTimestamp","timestamp","entry","id","_getId","getDb","durability","put","getTimestamp","expireEntries","minTimestamp","maxCount","cursor","openCursor","entriesToDelete","entriesNotDeletedCount","push","urlsDeleted","delete","bind","CacheExpiration","config","_isRunning","_rerunRequested","assert","isType","moduleName","className","funcName","paramName","maxEntries","maxAgeSeconds","WorkboxError","_maxEntries","_maxAgeSeconds","_matchOptions","matchOptions","_timestampModel","Date","now","urlsExpired","cache","caches","length","logger","groupCollapsed","log","forEach","groupEnd","debug","dontWaitFor","updateTimestamp","isURLExpired","methodName","expireOlderThan","Infinity","ExpirationPlugin","cachedResponseWillBeUsed","cachedResponse","isFresh","_isResponseDateFresh","cacheExpiration","_getCacheExpiration","updateTimestampDone","waitUntil","warn","getFriendlyURL","cacheDidUpdate","isInstance","Request","_config","_cacheExpirations","purgeOnQuotaError","registerQuotaErrorCallback","deleteCacheAndMetadata","cacheNames","getRuntimeName","dateHeaderTimestamp","_getDateHeaderTimestamp","headers","dateHeader","parsedDate","headerTime","getTime","isNaN"],"mappings":";;;;;;;;;;;;;;EAAA,MAAMA,aAAa,GAAGA,CAACC,MAAM,EAAEC,YAAY,KAAKA,YAAY,CAACC,IAAI,CAAEC,CAAC,IAAKH,MAAM,YAAYG,CAAC,CAAC;EAE7F,IAAIC,iBAAiB;EACrB,IAAIC,oBAAoB;EACxB;EACA,SAASC,oBAAoBA,GAAG;EAC5B,EAAA,OAAQF,iBAAiB,KACpBA,iBAAiB,GAAG,CACjBG,WAAW,EACXC,cAAc,EACdC,QA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AC,MAAM,CAAC,EAAE;EACrC,MAAA,OAAO,IAAI;EACf,IAAA;MACA,MAAMqK,UAAU,GAAGtB,cAAc,CAACqB,OAAO,CAAC/J,GAAG,CAAC,MAAM,CAAC;EACrD,IAAA,MAAMiK,UAAU,GAAG,IAAI3C,IAAI,CAAC0C,UAAU,CAAC;EACvC,IAAA,MAAME,UAAU,GAAGD,UAAU,CAACE,OAAO,EAAE;EACvC;EACA;EACA,IAAA,IAAIC,KAAK,CAACF,UAAU,CAAC,EAAE;EACnB,MAAA,OAAO,IAAI;EACf,IAAA;EACA,IAAA,OAAOA,UAAU;EACrB,EAAA;EACA;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACI,MAAMR,sBAAsBA,GAAG;EAC3B;EACA;MACA,KAAK,MAAM,CAACpF,SAAS,EAAEuE,eAAe,CAAC,IAAI,IAAI,CAACU,iBAAiB,EAAE;EAC/D,MAAA,MAAM/F,IAAI,CAACkE,MAAM,CAACxB,MAAM,CAAC5B,SAAS,CAAC;EACnC,MAAA,MAAMuE,eAAe,CAAC3C,MAAM,EAAE;EAClC,IAAA;EACA;EACA,IAAA,IAAI,CAACqD,iBAAiB,GAAG,IAAI7G,GAAG,EAAE;EACtC,EAAA;EACJ;;;;;;;;;;;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-expiration.prod.js b/docs/workbox-v7.4.1/workbox-expiration.prod.js deleted file mode 100644 index f7f36f24..00000000 --- a/docs/workbox-v7.4.1/workbox-expiration.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.expiration=function(t,e,n,s,i){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;ee.some((e=>t instanceof e));let o,c;const u=new WeakMap,h=new WeakMap,f=new WeakMap,l=new WeakMap,d=new WeakMap;let w={get(t,e,n){if(t instanceof IDBTransaction){if("done"===e)return h.get(t);if("objectStoreNames"===e)return t.objectStoreNames||f.get(t);if("store"===e)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return m(t[e])},set:(t,e,n)=>(t[e]=n,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function p(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(c||(c=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(b(this),e),m(u.get(this))}:function(...e){return m(t.apply(b(this),e))}:function(e,...n){const s=t.call(b(this),e,...n);return f.set(s,e.sort?e.sort():[e]),m(s)}}function D(t){return"function"==typeof t?p(t):(t instanceof IDBTransaction&&function(t){if(h.has(t))return;const e=new Promise(((e,n)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",r),t.removeEventListener("abort",r)},i=()=>{e(),s()},r=()=>{n(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",r),t.addEventListener("abort",r)}));h.set(t,e)}(t),a(t,o||(o=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(t,w):t)}function m(t){if(t instanceof IDBRequest)return function(t){const e=new Promise(((e,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",r)},i=()=>{e(m(t.result)),s()},r=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",r)}));return e.then((e=>{e instanceof IDBCursor&&u.set(e,t)})).catch((()=>{})),d.set(e,t),e}(t);if(l.has(t))return l.get(t);const e=D(t);return e!==t&&(l.set(t,e),d.set(e,t)),e}const b=t=>d.get(t);const y=["get","getKey","getAll","getAllKeys","count"],I=["put","add","delete","clear"],B=new Map;function g(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(B.get(e))return B.get(e);const n=e.replace(/FromIndex$/,""),s=e!==n,i=I.includes(n);if(!(n in(s?IDBIndex:IDBObjectStore).prototype)||!i&&!y.includes(n))return;const r=async function(t,...e){const r=this.transaction(t,i?"readwrite":"readonly");let a=r.store;return s&&(a=a.index(e.shift())),(await Promise.all([a[n](...e),i&&r.done]))[0]};return B.set(e,r),r}w=(t=>r({},t,{get:(e,n,s)=>g(e,n)||t.get(e,n,s),has:(e,n)=>!!g(e,n)||t.has(e,n)}))(w);try{self["workbox:expiration:7.4.0"]&&_()}catch(t){}const x="cache-entries",k=t=>{const e=new URL(t,location.href);return e.hash="",e.href};class v{constructor(t){this.A=null,this.G=t}J(t){const e=t.createObjectStore(x,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1})}V(t){this.J(t),this.G&&function(t,{blocked:e}={}){const n=indexedDB.deleteDatabase(t);e&&n.addEventListener("blocked",(()=>e())),m(n).then((()=>{}))}(this.G)}async setTimestamp(t,e){const n={url:t=k(t),timestamp:e,cacheName:this.G,id:this.X(t)},s=(await this.getDb()).transaction(x,"readwrite",{durability:"relaxed"});await s.store.put(n),await s.done}async getTimestamp(t){const e=await this.getDb(),n=await e.get(x,this.X(t));return null==n?void 0:n.timestamp}async expireEntries(t,e){const n=await this.getDb();let s=await n.transaction(x).store.index("timestamp").openCursor(null,"prev");const i=[];let r=0;for(;s;){const n=s.value;n.cacheName===this.G&&(t&&n.timestamp=e?i.push(s.value):r++),s=await s.continue()}const a=[];for(const t of i)await n.delete(x,t.id),a.push(t.url);return a}X(t){return this.G+"|"+k(t)}async getDb(){return this.A||(this.A=await function(t,e,{blocked:n,upgrade:s,blocking:i,terminated:r}={}){const a=indexedDB.open(t,e),o=m(a);return s&&a.addEventListener("upgradeneeded",(t=>{s(m(a.result),t.oldVersion,t.newVersion,m(a.transaction))})),n&&a.addEventListener("blocked",(()=>n())),o.then((t=>{r&&t.addEventListener("close",(()=>r())),i&&t.addEventListener("versionchange",(()=>i()))})).catch((()=>{})),o}("workbox-expiration",1,{upgrade:this.V.bind(this)})),this.A}}class M{constructor(t,e={}){this.Y=!1,this.Z=!1,this.tt=e.maxEntries,this.et=e.maxAgeSeconds,this.nt=e.matchOptions,this.G=t,this.st=new v(t)}async expireEntries(){if(this.Y)return void(this.Z=!0);this.Y=!0;const t=this.et?Date.now()-1e3*this.et:0,n=await this.st.expireEntries(t,this.tt),s=await self.caches.open(this.G);for(const t of n)await s.delete(t,this.nt);this.Y=!1,this.Z&&(this.Z=!1,e.dontWaitFor(this.expireEntries()))}async updateTimestamp(t){await this.st.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.et){const e=await this.st.getTimestamp(t),n=Date.now()-1e3*this.et;return void 0===e||e{if(!i)return null;const r=this.it(i),a=this.rt(s);e.dontWaitFor(a.expireEntries());const o=a.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch(t){}return r?i:null},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const n=this.rt(t);await n.updateTimestamp(e.url),await n.expireEntries()},this.ot=t,this.et=t.maxAgeSeconds,this.ct=new Map,t.purgeOnQuotaError&&s.registerQuotaErrorCallback((()=>this.deleteCacheAndMetadata()))}rt(t){if(t===n.cacheNames.getRuntimeName())throw new i.WorkboxError("expire-custom-caches-only");let e=this.ct.get(t);return e||(e=new M(t,this.ot),this.ct.set(t,e)),e}it(t){if(!this.et)return!0;const e=this.ut(t);if(null===e)return!0;return e>=Date.now()-1e3*this.et}ut(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),n=new Date(e).getTime();return isNaN(n)?null:n}async deleteCacheAndMetadata(){for(const[t,e]of this.ct)await self.caches.delete(t),await e.delete();this.ct=new Map}},t}({},workbox.core._private,workbox.core._private,workbox.core,workbox.core._private); -//# sourceMappingURL=workbox-expiration.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-expiration.prod.js.map b/docs/workbox-v7.4.1/workbox-expiration.prod.js.map deleted file mode 100644 index a171c0c4..00000000 --- a/docs/workbox-v7.4.1/workbox-expiration.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-expiration.prod.js","sources":["../node_modules/idb/build/wrap-idb-value.js","../node_modules/idb/build/index.js","../_version.js","../models/CacheTimestampsModel.js","../CacheExpiration.js","../ExpirationPlugin.js"],"sourcesContent":["const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction));\n });\n }\n if (blocked)\n request.addEventListener('blocked', () => blocked());\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking)\n db.addEventListener('versionchange', () => blocking());\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked)\n request.addEventListener('blocked', () => blocked());\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:expiration:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { openDB, deleteDB } from 'idb';\nimport '../_version.js';\nconst DB_NAME = 'workbox-expiration';\nconst CACHE_OBJECT_STORE = 'cache-entries';\nconst normalizeURL = (unNormalizedUrl) => {\n const url = new URL(unNormalizedUrl, location.href);\n url.hash = '';\n return url.href;\n};\n/**\n * Returns the timestamp model.\n *\n * @private\n */\nclass CacheTimestampsModel {\n /**\n *\n * @param {string} cacheName\n *\n * @private\n */\n constructor(cacheName) {\n this._db = null;\n this._cacheName = cacheName;\n }\n /**\n * Performs an upgrade of indexedDB.\n *\n * @param {IDBPDatabase} db\n *\n * @private\n */\n _upgradeDb(db) {\n // TODO(philipwalton): EdgeHTML doesn't support arrays as a keyPath, so we\n // have to use the `id` keyPath here and create our own values (a\n // concatenation of `url + cacheName`) instead of simply using\n // `keyPath: ['url', 'cacheName']`, which is supported in other browsers.\n const objStore = db.createObjectStore(CACHE_OBJECT_STORE, { keyPath: 'id' });\n // TODO(philipwalton): once we don't have to support EdgeHTML, we can\n // create a single index with the keyPath `['cacheName', 'timestamp']`\n // instead of doing both these indexes.\n objStore.createIndex('cacheName', 'cacheName', { unique: false });\n objStore.createIndex('timestamp', 'timestamp', { unique: false });\n }\n /**\n * Performs an upgrade of indexedDB and deletes deprecated DBs.\n *\n * @param {IDBPDatabase} db\n *\n * @private\n */\n _upgradeDbAndDeleteOldDbs(db) {\n this._upgradeDb(db);\n if (this._cacheName) {\n void deleteDB(this._cacheName);\n }\n }\n /**\n * @param {string} url\n * @param {number} timestamp\n *\n * @private\n */\n async setTimestamp(url, timestamp) {\n url = normalizeURL(url);\n const entry = {\n url,\n timestamp,\n cacheName: this._cacheName,\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n id: this._getId(url),\n };\n const db = await this.getDb();\n const tx = db.transaction(CACHE_OBJECT_STORE, 'readwrite', {\n durability: 'relaxed',\n });\n await tx.store.put(entry);\n await tx.done;\n }\n /**\n * Returns the timestamp stored for a given URL.\n *\n * @param {string} url\n * @return {number | undefined}\n *\n * @private\n */\n async getTimestamp(url) {\n const db = await this.getDb();\n const entry = await db.get(CACHE_OBJECT_STORE, this._getId(url));\n return entry === null || entry === void 0 ? void 0 : entry.timestamp;\n }\n /**\n * Iterates through all the entries in the object store (from newest to\n * oldest) and removes entries once either `maxCount` is reached or the\n * entry's timestamp is less than `minTimestamp`.\n *\n * @param {number} minTimestamp\n * @param {number} maxCount\n * @return {Array}\n *\n * @private\n */\n async expireEntries(minTimestamp, maxCount) {\n const db = await this.getDb();\n let cursor = await db\n .transaction(CACHE_OBJECT_STORE)\n .store.index('timestamp')\n .openCursor(null, 'prev');\n const entriesToDelete = [];\n let entriesNotDeletedCount = 0;\n while (cursor) {\n const result = cursor.value;\n // TODO(philipwalton): once we can use a multi-key index, we\n // won't have to check `cacheName` here.\n if (result.cacheName === this._cacheName) {\n // Delete an entry if it's older than the max age or\n // if we already have the max number allowed.\n if ((minTimestamp && result.timestamp < minTimestamp) ||\n (maxCount && entriesNotDeletedCount >= maxCount)) {\n // TODO(philipwalton): we should be able to delete the\n // entry right here, but doing so causes an iteration\n // bug in Safari stable (fixed in TP). Instead we can\n // store the keys of the entries to delete, and then\n // delete the separate transactions.\n // https://github.com/GoogleChrome/workbox/issues/1978\n // cursor.delete();\n // We only need to return the URL, not the whole entry.\n entriesToDelete.push(cursor.value);\n }\n else {\n entriesNotDeletedCount++;\n }\n }\n cursor = await cursor.continue();\n }\n // TODO(philipwalton): once the Safari bug in the following issue is fixed,\n // we should be able to remove this loop and do the entry deletion in the\n // cursor loop above:\n // https://github.com/GoogleChrome/workbox/issues/1978\n const urlsDeleted = [];\n for (const entry of entriesToDelete) {\n await db.delete(CACHE_OBJECT_STORE, entry.id);\n urlsDeleted.push(entry.url);\n }\n return urlsDeleted;\n }\n /**\n * Takes a URL and returns an ID that will be unique in the object store.\n *\n * @param {string} url\n * @return {string}\n *\n * @private\n */\n _getId(url) {\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n return this._cacheName + '|' + normalizeURL(url);\n }\n /**\n * Returns an open connection to the database.\n *\n * @private\n */\n async getDb() {\n if (!this._db) {\n this._db = await openDB(DB_NAME, 1, {\n upgrade: this._upgradeDbAndDeleteOldDbs.bind(this),\n });\n }\n return this._db;\n }\n}\nexport { CacheTimestampsModel };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { CacheTimestampsModel } from './models/CacheTimestampsModel.js';\nimport './_version.js';\n/**\n * The `CacheExpiration` class allows you define an expiration and / or\n * limit on the number of responses stored in a\n * [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).\n *\n * @memberof workbox-expiration\n */\nclass CacheExpiration {\n /**\n * To construct a new CacheExpiration instance you must provide at least\n * one of the `config` properties.\n *\n * @param {string} cacheName Name of the cache to apply restrictions to.\n * @param {Object} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters)\n * that will be used when calling `delete()` on the cache.\n */\n constructor(cacheName, config = {}) {\n this._isRunning = false;\n this._rerunRequested = false;\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'cacheName',\n });\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n });\n }\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n }\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n }\n }\n this._maxEntries = config.maxEntries;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._matchOptions = config.matchOptions;\n this._cacheName = cacheName;\n this._timestampModel = new CacheTimestampsModel(cacheName);\n }\n /**\n * Expires entries for the given cache and given criteria.\n */\n async expireEntries() {\n if (this._isRunning) {\n this._rerunRequested = true;\n return;\n }\n this._isRunning = true;\n const minTimestamp = this._maxAgeSeconds\n ? Date.now() - this._maxAgeSeconds * 1000\n : 0;\n const urlsExpired = await this._timestampModel.expireEntries(minTimestamp, this._maxEntries);\n // Delete URLs from the cache\n const cache = await self.caches.open(this._cacheName);\n for (const url of urlsExpired) {\n await cache.delete(url, this._matchOptions);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (urlsExpired.length > 0) {\n logger.groupCollapsed(`Expired ${urlsExpired.length} ` +\n `${urlsExpired.length === 1 ? 'entry' : 'entries'} and removed ` +\n `${urlsExpired.length === 1 ? 'it' : 'them'} from the ` +\n `'${this._cacheName}' cache.`);\n logger.log(`Expired the following ${urlsExpired.length === 1 ? 'URL' : 'URLs'}:`);\n urlsExpired.forEach((url) => logger.log(` ${url}`));\n logger.groupEnd();\n }\n else {\n logger.debug(`Cache expiration ran and found no entries to remove.`);\n }\n }\n this._isRunning = false;\n if (this._rerunRequested) {\n this._rerunRequested = false;\n dontWaitFor(this.expireEntries());\n }\n }\n /**\n * Update the timestamp for the given URL. This ensures the when\n * removing entries based on maximum entries, most recently used\n * is accurate or when expiring, the timestamp is up-to-date.\n *\n * @param {string} url\n */\n async updateTimestamp(url) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(url, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'updateTimestamp',\n paramName: 'url',\n });\n }\n await this._timestampModel.setTimestamp(url, Date.now());\n }\n /**\n * Can be used to check if a URL has expired or not before it's used.\n *\n * This requires a look up from IndexedDB, so can be slow.\n *\n * Note: This method will not remove the cached entry, call\n * `expireEntries()` to remove indexedDB and Cache entries.\n *\n * @param {string} url\n * @return {boolean}\n */\n async isURLExpired(url) {\n if (!this._maxAgeSeconds) {\n if (process.env.NODE_ENV !== 'production') {\n throw new WorkboxError(`expired-test-without-max-age`, {\n methodName: 'isURLExpired',\n paramName: 'maxAgeSeconds',\n });\n }\n return false;\n }\n else {\n const timestamp = await this._timestampModel.getTimestamp(url);\n const expireOlderThan = Date.now() - this._maxAgeSeconds * 1000;\n return timestamp !== undefined ? timestamp < expireOlderThan : true;\n }\n }\n /**\n * Removes the IndexedDB object store used to keep track of cache expiration\n * metadata.\n */\n async delete() {\n // Make sure we don't attempt another rerun if we're called in the middle of\n // a cache expiration.\n this._rerunRequested = false;\n await this._timestampModel.expireEntries(Infinity); // Expires all.\n }\n}\nexport { CacheExpiration };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { registerQuotaErrorCallback } from 'workbox-core/registerQuotaErrorCallback.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { CacheExpiration } from './CacheExpiration.js';\nimport './_version.js';\n/**\n * This plugin can be used in a `workbox-strategy` to regularly enforce a\n * limit on the age and / or the number of cached requests.\n *\n * It can only be used with `workbox-strategy` instances that have a\n * [custom `cacheName` property set](/web/tools/workbox/guides/configure-workbox#custom_cache_names_in_strategies).\n * In other words, it can't be used to expire entries in strategy that uses the\n * default runtime cache name.\n *\n * Whenever a cached response is used or updated, this plugin will look\n * at the associated cache and remove any old or extra responses.\n *\n * When using `maxAgeSeconds`, responses may be used *once* after expiring\n * because the expiration clean up will not have occurred until *after* the\n * cached response has been used. If the response has a \"Date\" header, then\n * a light weight expiration check is performed and the response will not be\n * used immediately.\n *\n * When using `maxEntries`, the entry least-recently requested will be removed\n * from the cache first.\n *\n * @memberof workbox-expiration\n */\nclass ExpirationPlugin {\n /**\n * @param {ExpirationPluginOptions} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n * @param {Object} [config.matchOptions] The [`CacheQueryOptions`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/delete#Parameters)\n * that will be used when calling `delete()` on the cache.\n * @param {boolean} [config.purgeOnQuotaError] Whether to opt this cache in to\n * automatic deletion if the available storage quota has been exceeded.\n */\n constructor(config = {}) {\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox-strategies` handlers when a `Response` is about to be returned\n * from a [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to\n * the handler. It allows the `Response` to be inspected for freshness and\n * prevents it from being used if the `Response`'s `Date` header value is\n * older than the configured `maxAgeSeconds`.\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache the response is in.\n * @param {Response} options.cachedResponse The `Response` object that's been\n * read from a cache and whose freshness should be checked.\n * @return {Response} Either the `cachedResponse`, if it's\n * fresh, or `null` if the `Response` is older than `maxAgeSeconds`.\n *\n * @private\n */\n this.cachedResponseWillBeUsed = async ({ event, request, cacheName, cachedResponse, }) => {\n if (!cachedResponse) {\n return null;\n }\n const isFresh = this._isResponseDateFresh(cachedResponse);\n // Expire entries to ensure that even if the expiration date has\n // expired, it'll only be used once.\n const cacheExpiration = this._getCacheExpiration(cacheName);\n dontWaitFor(cacheExpiration.expireEntries());\n // Update the metadata for the request URL to the current timestamp,\n // but don't `await` it as we don't want to block the response.\n const updateTimestampDone = cacheExpiration.updateTimestamp(request.url);\n if (event) {\n try {\n event.waitUntil(updateTimestampDone);\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n // The event may not be a fetch event; only log the URL if it is.\n if ('request' in event) {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache entry for ` +\n `'${getFriendlyURL(event.request.url)}'.`);\n }\n }\n }\n }\n return isFresh ? cachedResponse : null;\n };\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox-strategies` handlers when an entry is added to a cache.\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache that was updated.\n * @param {string} options.request The Request for the cached entry.\n *\n * @private\n */\n this.cacheDidUpdate = async ({ cacheName, request, }) => {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'cacheName',\n });\n assert.isInstance(request, Request, {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'request',\n });\n }\n const cacheExpiration = this._getCacheExpiration(cacheName);\n await cacheExpiration.updateTimestamp(request.url);\n await cacheExpiration.expireEntries();\n };\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n });\n }\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n }\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n }\n }\n this._config = config;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._cacheExpirations = new Map();\n if (config.purgeOnQuotaError) {\n registerQuotaErrorCallback(() => this.deleteCacheAndMetadata());\n }\n }\n /**\n * A simple helper method to return a CacheExpiration instance for a given\n * cache name.\n *\n * @param {string} cacheName\n * @return {CacheExpiration}\n *\n * @private\n */\n _getCacheExpiration(cacheName) {\n if (cacheName === cacheNames.getRuntimeName()) {\n throw new WorkboxError('expire-custom-caches-only');\n }\n let cacheExpiration = this._cacheExpirations.get(cacheName);\n if (!cacheExpiration) {\n cacheExpiration = new CacheExpiration(cacheName, this._config);\n this._cacheExpirations.set(cacheName, cacheExpiration);\n }\n return cacheExpiration;\n }\n /**\n * @param {Response} cachedResponse\n * @return {boolean}\n *\n * @private\n */\n _isResponseDateFresh(cachedResponse) {\n if (!this._maxAgeSeconds) {\n // We aren't expiring by age, so return true, it's fresh\n return true;\n }\n // Check if the 'date' header will suffice a quick expiration check.\n // See https://github.com/GoogleChromeLabs/sw-toolbox/issues/164 for\n // discussion.\n const dateHeaderTimestamp = this._getDateHeaderTimestamp(cachedResponse);\n if (dateHeaderTimestamp === null) {\n // Unable to parse date, so assume it's fresh.\n return true;\n }\n // If we have a valid headerTime, then our response is fresh iff the\n // headerTime plus maxAgeSeconds is greater than the current time.\n const now = Date.now();\n return dateHeaderTimestamp >= now - this._maxAgeSeconds * 1000;\n }\n /**\n * This method will extract the data header and parse it into a useful\n * value.\n *\n * @param {Response} cachedResponse\n * @return {number|null}\n *\n * @private\n */\n _getDateHeaderTimestamp(cachedResponse) {\n if (!cachedResponse.headers.has('date')) {\n return null;\n }\n const dateHeader = cachedResponse.headers.get('date');\n const parsedDate = new Date(dateHeader);\n const headerTime = parsedDate.getTime();\n // If the Date header was invalid for some reason, parsedDate.getTime()\n // will return NaN.\n if (isNaN(headerTime)) {\n return null;\n }\n return headerTime;\n }\n /**\n * This is a helper method that performs two operations:\n *\n * - Deletes *all* the underlying Cache instances associated with this plugin\n * instance, by calling caches.delete() on your behalf.\n * - Deletes the metadata from IndexedDB used to keep track of expiration\n * details for each Cache instance.\n *\n * When using cache expiration, calling this method is preferable to calling\n * `caches.delete()` directly, since this will ensure that the IndexedDB\n * metadata is also cleanly removed and open IndexedDB instances are deleted.\n *\n * Note that if you're *not* using cache expiration for a given cache, calling\n * `caches.delete()` and passing in the cache's name should be sufficient.\n * There is no Workbox-specific method needed for cleanup in that case.\n */\n async deleteCacheAndMetadata() {\n // Do this one at a time instead of all at once via `Promise.all()` to\n // reduce the chance of inconsistency if a promise rejects.\n for (const [cacheName, cacheExpiration] of this._cacheExpirations) {\n await self.caches.delete(cacheName);\n await cacheExpiration.delete();\n }\n // Reset this._cacheExpirations to its initial state.\n this._cacheExpirations = new Map();\n }\n}\nexport { ExpirationPlugin };\n"],"names":["instanceOfAny","object","constructors","some","c","idbProxyableTypes","cursorAdvanceMethods","cursorRequestMap","WeakMap","transactionDoneMap","transactionStoreNamesMap","transformCache","reverseTransformCache","idbProxyTraps","get","target","prop","receiver","IDBTransaction","objectStoreNames","undefined","objectStore","wrap","set","value","has","wrapFunction","func","IDBDatabase","prototype","transaction","IDBCursor","advance","continue","continuePrimaryKey","includes","args","apply","unwrap","this","storeNames","tx","call","sort","transformCachableValue","done","Promise","resolve","reject","unlisten","removeEventListener","complete","error","DOMException","addEventListener","cacheDonePromiseForTransaction","IDBObjectStore","IDBIndex","Proxy","IDBRequest","request","promise","success","result","then","catch","promisifyRequest","newValue","readMethods","writeMethods","cachedMethods","Map","getMethod","targetFuncName","replace","useIndex","isWrite","method","async","storeName","store","index","shift","all","oldTraps","_extends","callback","self","_","e","CACHE_OBJECT_STORE","normalizeURL","unNormalizedUrl","url","URL","location","href","hash","CacheTimestampsModel","constructor","cacheName","_db","_cacheName","_upgradeDb","db","objStore","createObjectStore","keyPath","createIndex","unique","_upgradeDbAndDeleteOldDbs","name","blocked","indexedDB","deleteDatabase","deleteDB","timestamp","entry","id","_getId","getDb","durability","put","minTimestamp","maxCount","cursor","openCursor","entriesToDelete","entriesNotDeletedCount","push","urlsDeleted","delete","version","upgrade","blocking","terminated","open","openPromise","event","oldVersion","newVersion","openDB","bind","CacheExpiration","config","_isRunning","_rerunRequested","_maxEntries","maxEntries","_maxAgeSeconds","maxAgeSeconds","_matchOptions","matchOptions","_timestampModel","Date","now","urlsExpired","expireEntries","cache","caches","dontWaitFor","setTimestamp","getTimestamp","expireOlderThan","Infinity","cachedResponseWillBeUsed","cachedResponse","isFresh","_isResponseDateFresh","cacheExpiration","_getCacheExpiration","updateTimestampDone","updateTimestamp","waitUntil","cacheDidUpdate","_config","_cacheExpirations","purgeOnQuotaError","registerQuotaErrorCallback","deleteCacheAndMetadata","cacheNames","getRuntimeName","WorkboxError","dateHeaderTimestamp","_getDateHeaderTimestamp","headers","dateHeader","headerTime","getTime","isNaN"],"mappings":"+SAAA,MAAMA,EAAgBA,CAACC,EAAQC,IAAiBA,EAAaC,MAAMC,GAAMH,aAAkBG,IAE3F,IAAIC,EACAC,EAqBJ,MAAMC,EAAmB,IAAIC,QACvBC,EAAqB,IAAID,QACzBE,EAA2B,IAAIF,QAC/BG,EAAiB,IAAIH,QACrBI,EAAwB,IAAIJ,QA0DlC,IAAIK,EAAgB,CAChBC,IAAIC,EAAQC,EAAMC,GACd,GAAIF,aAAkBG,eAAgB,CAElC,GAAa,SAATF,EACA,OAAOP,EAAmBK,IAAIC,GAElC,GAAa,qBAATC,EACA,OAAOD,EAAOI,kBAAoBT,EAAyBI,IAAIC,GAGnE,GAAa,UAATC,EACA,OAAOC,EAASE,iBAAiB,QAC3B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A,EAAkB,IAAI1B,EAAgB3C,EAAW7D,KAAKwI,IACtDxI,KAAKyI,GAAkBzJ,IAAI6E,EAAWqE,IAEnCA,CACX,CAOAD,GAAqBF,GACjB,IAAK/H,KAAK8G,GAEN,OAAO,EAKX,MAAMkC,EAAsBhJ,KAAKiJ,GAAwBlB,GACzD,GAA4B,OAAxBiB,EAEA,OAAO,EAKX,OAAOA,GADK7B,KAAKC,MACyC,IAAtBpH,KAAK8G,EAC7C,CAUAmC,GAAwBlB,GACpB,IAAKA,EAAemB,QAAQhK,IAAI,QAC5B,OAAO,KAEX,MAAMiK,EAAapB,EAAemB,QAAQ3K,IAAI,QAExC6K,EADa,IAAIjC,KAAKgC,GACEE,UAG9B,OAAIC,MAAMF,GACC,KAEJA,CACX,CAiBA7G,+BAGI,IAAK,MAAOsB,EAAWqE,KAAoBlI,KAAKyI,SACtCzF,KAAKwE,OAAO5B,OAAO/B,SACnBqE,EAAgBtC,SAG1B5F,KAAKyI,GAAoB,IAAIzG,GACjC","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-navigation-preload.dev.js b/docs/workbox-v7.4.1/workbox-navigation-preload.dev.js deleted file mode 100644 index 637ae134..00000000 --- a/docs/workbox-v7.4.1/workbox-navigation-preload.dev.js +++ /dev/null @@ -1,99 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.navigationPreload = (function (exports, logger_js) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:navigation-preload:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * @return {boolean} Whether or not the current browser supports enabling - * navigation preload. - * - * @memberof workbox-navigation-preload - */ - function isSupported() { - return Boolean(self.registration && self.registration.navigationPreload); - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * If the browser supports Navigation Preload, then this will disable it. - * - * @memberof workbox-navigation-preload - */ - function disable() { - if (isSupported()) { - self.addEventListener('activate', event => { - event.waitUntil(self.registration.navigationPreload.disable().then(() => { - { - logger_js.logger.log(`Navigation preload is disabled.`); - } - })); - }); - } else { - { - logger_js.logger.log(`Navigation preload is not supported in this browser.`); - } - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * If the browser supports Navigation Preload, then this will enable it. - * - * @param {string} [headerValue] Optionally, allows developers to - * [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header) - * the value of the `Service-Worker-Navigation-Preload` header which will be - * sent to the server when making the navigation request. - * - * @memberof workbox-navigation-preload - */ - function enable(headerValue) { - if (isSupported()) { - self.addEventListener('activate', event => { - event.waitUntil(self.registration.navigationPreload.enable().then(() => { - // Defaults to Service-Worker-Navigation-Preload: true if not set. - if (headerValue) { - void self.registration.navigationPreload.setHeaderValue(headerValue); - } - { - logger_js.logger.log(`Navigation preload is enabled.`); - } - })); - }); - } else { - { - logger_js.logger.log(`Navigation preload is not supported in this browser.`); - } - } - } - - exports.disable = disable; - exports.enable = enable; - exports.isSupported = isSupported; - - return exports; - -})({}, workbox.core._private); -//# sourceMappingURL=workbox-navigation-preload.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-navigation-preload.dev.js.map b/docs/workbox-v7.4.1/workbox-navigation-preload.dev.js.map deleted file mode 100644 index 5f8fb4c2..00000000 --- a/docs/workbox-v7.4.1/workbox-navigation-preload.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-navigation-preload.dev.js","sources":["../_version.js","../isSupported.js","../disable.js","../enable.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:navigation-preload:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * @return {boolean} Whether or not the current browser supports enabling\n * navigation preload.\n *\n * @memberof workbox-navigation-preload\n */\nfunction isSupported() {\n return Boolean(self.registration && self.registration.navigationPreload);\n}\nexport { isSupported };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * If the browser supports Navigation Preload, then this will disable it.\n *\n * @memberof workbox-navigation-preload\n */\nfunction disable() {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(self.registration.navigationPreload.disable().then(() => {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is disabled.`);\n }\n }));\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\nexport { disable };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * If the browser supports Navigation Preload, then this will enable it.\n *\n * @param {string} [headerValue] Optionally, allows developers to\n * [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)\n * the value of the `Service-Worker-Navigation-Preload` header which will be\n * sent to the server when making the navigation request.\n *\n * @memberof workbox-navigation-preload\n */\nfunction enable(headerValue) {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(self.registration.navigationPreload.enable().then(() => {\n // Defaults to Service-Worker-Navigation-Preload: true if not set.\n if (headerValue) {\n void self.registration.navigationPreload.setHeaderValue(headerValue);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is enabled.`);\n }\n }));\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\nexport { enable };\n"],"names":["self","_","e","isSupported","Boolean","registration","navigationPreload","disable","addEventListener","event","waitUntil","then","logger","log","enable","headerValue","setHeaderValue"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,kCAAkC,CAAC,IAAIC,CAAC,EAAE;IACnD,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;ICLZ;IACA;;IAEA;IACA;IACA;IACA;IAEA;IACA;IACA;IACA;IACA;IACA;IACA,SAASC,WAAWA,GAAG;MACnB,OAAOC,OAAO,CAACJ,IAAI,CAACK,YAAY,IAAIL,IAAI,CAACK,YAAY,CAACC,iBAAiB,CAAC;IAC5E;;IChBA;IACA;;IAEA;IACA;IACA;IACA;IAIA;IACA;IACA;IACA;IACA;IACA,SAASC,OAAOA,GAAG;MACf,IAAIJ,WAAW,EAAE,EAAE;IACfH,IAAAA,IAAI,CAACQ,gBAAgB,CAAC,UAAU,EAAGC,KAAK,IAAK;IACzCA,MAAAA,KAAK,CAACC,SAAS,CAACV,IAAI,CAACK,YAAY,CAACC,iBAAiB,CAACC,OAAO,EAAE,CAACI,IAAI,CAAC,MAAM;IACrE,QAA2C;IACvCC,UAAAA,gBAAM,CAACC,GAAG,CAAE,CAAA,+BAAA,CAAgC,CAAC;IACjD,QAAA;IACJ,MAAA,CAAC,CAAC,CAAC;IACP,IAAA,CAAC,CAAC;IACN,EAAA,CAAC,MACI;IACD,IAA2C;IACvCD,MAAAA,gBAAM,CAACC,GAAG,CAAE,CAAA,oDAAA,CAAqD,CAAC;IACtE,IAAA;IACJ,EAAA;IACJ;;IC9BA;IACA;;IAEA;IACA;IACA;IACA;IAIA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,SAASC,MAAMA,CAACC,WAAW,EAAE;MACzB,IAAIZ,WAAW,EAAE,EAAE;IACfH,IAAAA,IAAI,CAACQ,gBAAgB,CAAC,UAAU,EAAGC,KAAK,IAAK;IACzCA,MAAAA,KAAK,CAACC,SAAS,CAACV,IAAI,CAACK,YAAY,CAACC,iBAAiB,CAACQ,MAAM,EAAE,CAACH,IAAI,CAAC,MAAM;IACpE;IACA,QAAA,IAAII,WAAW,EAAE;cACb,KAAKf,IAAI,CAACK,YAAY,CAACC,iBAAiB,CAACU,cAAc,CAACD,WAAW,CAAC;IACxE,QAAA;IACA,QAA2C;IACvCH,UAAAA,gBAAM,CAACC,GAAG,CAAE,CAAA,8BAAA,CAA+B,CAAC;IAChD,QAAA;IACJ,MAAA,CAAC,CAAC,CAAC;IACP,IAAA,CAAC,CAAC;IACN,EAAA,CAAC,MACI;IACD,IAA2C;IACvCD,MAAAA,gBAAM,CAACC,GAAG,CAAE,CAAA,oDAAA,CAAqD,CAAC;IACtE,IAAA;IACJ,EAAA;IACJ;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-navigation-preload.prod.js b/docs/workbox-v7.4.1/workbox-navigation-preload.prod.js deleted file mode 100644 index 23d9af2a..00000000 --- a/docs/workbox-v7.4.1/workbox-navigation-preload.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.navigationPreload=function(t){"use strict";try{self["workbox:navigation-preload:7.4.0"]&&_()}catch(t){}function e(){return Boolean(self.registration&&self.registration.navigationPreload)}return t.disable=function(){e()&&self.addEventListener("activate",(t=>{t.waitUntil(self.registration.navigationPreload.disable().then((()=>{})))}))},t.enable=function(t){e()&&self.addEventListener("activate",(e=>{e.waitUntil(self.registration.navigationPreload.enable().then((()=>{t&&self.registration.navigationPreload.setHeaderValue(t)})))}))},t.isSupported=e,t}({}); -//# sourceMappingURL=workbox-navigation-preload.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-navigation-preload.prod.js.map b/docs/workbox-v7.4.1/workbox-navigation-preload.prod.js.map deleted file mode 100644 index 9f8d7c3c..00000000 --- a/docs/workbox-v7.4.1/workbox-navigation-preload.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-navigation-preload.prod.js","sources":["../_version.js","../isSupported.js","../disable.js","../enable.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:navigation-preload:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * @return {boolean} Whether or not the current browser supports enabling\n * navigation preload.\n *\n * @memberof workbox-navigation-preload\n */\nfunction isSupported() {\n return Boolean(self.registration && self.registration.navigationPreload);\n}\nexport { isSupported };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * If the browser supports Navigation Preload, then this will disable it.\n *\n * @memberof workbox-navigation-preload\n */\nfunction disable() {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(self.registration.navigationPreload.disable().then(() => {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is disabled.`);\n }\n }));\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\nexport { disable };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * If the browser supports Navigation Preload, then this will enable it.\n *\n * @param {string} [headerValue] Optionally, allows developers to\n * [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)\n * the value of the `Service-Worker-Navigation-Preload` header which will be\n * sent to the server when making the navigation request.\n *\n * @memberof workbox-navigation-preload\n */\nfunction enable(headerValue) {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(self.registration.navigationPreload.enable().then(() => {\n // Defaults to Service-Worker-Navigation-Preload: true if not set.\n if (headerValue) {\n void self.registration.navigationPreload.setHeaderValue(headerValue);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is enabled.`);\n }\n }));\n });\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\nexport { enable };\n"],"names":["self","_","e","isSupported","Boolean","registration","navigationPreload","addEventListener","event","waitUntil","disable","then","headerValue","enable","setHeaderValue"],"mappings":"sFAEA,IACIA,KAAK,qCAAuCC,GAChD,CACA,MAAOC,GAAK,CCSZ,SAASC,IACL,OAAOC,QAAQJ,KAAKK,cAAgBL,KAAKK,aAAaC,kBAC1D,kBCDA,WACQH,KACAH,KAAKO,iBAAiB,YAAaC,IAC/BA,EAAMC,UAAUT,KAAKK,aAAaC,kBAAkBI,UAAUC,MAAK,SAIhE,GAQf,WCVA,SAAgBC,GACRT,KACAH,KAAKO,iBAAiB,YAAaC,IAC/BA,EAAMC,UAAUT,KAAKK,aAAaC,kBAAkBO,SAASF,MAAK,KAE1DC,GACKZ,KAAKK,aAAaC,kBAAkBQ,eAAeF,EAC5D,IAID,GAQf"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-offline-ga.dev.js b/docs/workbox-v7.4.1/workbox-offline-ga.dev.js deleted file mode 100644 index e6160f29..00000000 --- a/docs/workbox-v7.4.1/workbox-offline-ga.dev.js +++ /dev/null @@ -1,210 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.googleAnalytics = (function (exports, BackgroundSyncPlugin_js, cacheNames_js, getFriendlyURL_js, logger_js, Route_js, Router_js, NetworkFirst_js, NetworkOnly_js) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:google-analytics:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const QUEUE_NAME = 'workbox-google-analytics'; - const MAX_RETENTION_TIME = 60 * 48; // Two days in minutes - const GOOGLE_ANALYTICS_HOST = 'www.google-analytics.com'; - const GTM_HOST = 'www.googletagmanager.com'; - const ANALYTICS_JS_PATH = '/analytics.js'; - const GTAG_JS_PATH = '/gtag/js'; - const GTM_JS_PATH = '/gtm.js'; - // This RegExp matches all known Measurement Protocol single-hit collect - // endpoints. Most of the time the default path (/collect) is used, but - // occasionally an experimental endpoint is used when testing new features, - // (e.g. /r/collect or /j/collect) - const COLLECT_PATHS_REGEX = /^\/(\w+\/)?collect/; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Creates the requestWillDequeue callback to be used with the background - * sync plugin. The callback takes the failed request and adds the - * `qt` param based on the current time, as well as applies any other - * user-defined hit modifications. - * - * @param {Object} config See {@link workbox-google-analytics.initialize}. - * @return {Function} The requestWillDequeue callback function. - * - * @private - */ - const createOnSyncCallback = config => { - return async ({ - queue - }) => { - let entry; - while (entry = await queue.shiftRequest()) { - const { - request, - timestamp - } = entry; - const url = new URL(request.url); - try { - // Measurement protocol requests can set their payload parameters in - // either the URL query string (for GET requests) or the POST body. - const params = request.method === 'POST' ? new URLSearchParams(await request.clone().text()) : url.searchParams; - // Calculate the qt param, accounting for the fact that an existing - // qt param may be present and should be updated rather than replaced. - const originalHitTime = timestamp - (Number(params.get('qt')) || 0); - const queueTime = Date.now() - originalHitTime; - // Set the qt param prior to applying hitFilter or parameterOverrides. - params.set('qt', String(queueTime)); - // Apply `parameterOverrides`, if set. - if (config.parameterOverrides) { - for (const param of Object.keys(config.parameterOverrides)) { - const value = config.parameterOverrides[param]; - params.set(param, value); - } - } - // Apply `hitFilter`, if set. - if (typeof config.hitFilter === 'function') { - config.hitFilter.call(null, params); - } - // Retry the fetch. Ignore URL search params from the URL as they're - // now in the post body. - await fetch(new Request(url.origin + url.pathname, { - body: params.toString(), - method: 'POST', - mode: 'cors', - credentials: 'omit', - headers: { - 'Content-Type': 'text/plain' - } - })); - if ("dev" !== 'production') { - logger_js.logger.log(`Request for '${getFriendlyURL_js.getFriendlyURL(url.href)}' ` + `has been replayed`); - } - } catch (err) { - await queue.unshiftRequest(entry); - { - logger_js.logger.log(`Request for '${getFriendlyURL_js.getFriendlyURL(url.href)}' ` + `failed to replay, putting it back in the queue.`); - } - throw err; - } - } - { - logger_js.logger.log(`All Google Analytics request successfully replayed; ` + `the queue is now empty!`); - } - }; - }; - /** - * Creates GET and POST routes to catch failed Measurement Protocol hits. - * - * @param {BackgroundSyncPlugin} bgSyncPlugin - * @return {Array} The created routes. - * - * @private - */ - const createCollectRoutes = bgSyncPlugin => { - const match = ({ - url - }) => url.hostname === GOOGLE_ANALYTICS_HOST && COLLECT_PATHS_REGEX.test(url.pathname); - const handler = new NetworkOnly_js.NetworkOnly({ - plugins: [bgSyncPlugin] - }); - return [new Route_js.Route(match, handler, 'GET'), new Route_js.Route(match, handler, 'POST')]; - }; - /** - * Creates a route with a network first strategy for the analytics.js script. - * - * @param {string} cacheName - * @return {Route} The created route. - * - * @private - */ - const createAnalyticsJsRoute = cacheName => { - const match = ({ - url - }) => url.hostname === GOOGLE_ANALYTICS_HOST && url.pathname === ANALYTICS_JS_PATH; - const handler = new NetworkFirst_js.NetworkFirst({ - cacheName - }); - return new Route_js.Route(match, handler, 'GET'); - }; - /** - * Creates a route with a network first strategy for the gtag.js script. - * - * @param {string} cacheName - * @return {Route} The created route. - * - * @private - */ - const createGtagJsRoute = cacheName => { - const match = ({ - url - }) => url.hostname === GTM_HOST && url.pathname === GTAG_JS_PATH; - const handler = new NetworkFirst_js.NetworkFirst({ - cacheName - }); - return new Route_js.Route(match, handler, 'GET'); - }; - /** - * Creates a route with a network first strategy for the gtm.js script. - * - * @param {string} cacheName - * @return {Route} The created route. - * - * @private - */ - const createGtmJsRoute = cacheName => { - const match = ({ - url - }) => url.hostname === GTM_HOST && url.pathname === GTM_JS_PATH; - const handler = new NetworkFirst_js.NetworkFirst({ - cacheName - }); - return new Route_js.Route(match, handler, 'GET'); - }; - /** - * @param {Object=} [options] - * @param {Object} [options.cacheName] The cache name to store and retrieve - * analytics.js. Defaults to the cache names provided by `workbox-core`. - * @param {Object} [options.parameterOverrides] - * [Measurement Protocol parameters](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters), - * expressed as key/value pairs, to be added to replayed Google Analytics - * requests. This can be used to, e.g., set a custom dimension indicating - * that the request was replayed. - * @param {Function} [options.hitFilter] A function that allows you to modify - * the hit parameters prior to replaying - * the hit. The function is invoked with the original hit's URLSearchParams - * object as its only argument. - * - * @memberof workbox-google-analytics - */ - const initialize = (options = {}) => { - const cacheName = cacheNames_js.cacheNames.getGoogleAnalyticsName(options.cacheName); - const bgSyncPlugin = new BackgroundSyncPlugin_js.BackgroundSyncPlugin(QUEUE_NAME, { - maxRetentionTime: MAX_RETENTION_TIME, - onSync: createOnSyncCallback(options) - }); - const routes = [createGtmJsRoute(cacheName), createAnalyticsJsRoute(cacheName), createGtagJsRoute(cacheName), ...createCollectRoutes(bgSyncPlugin)]; - const router = new Router_js.Router(); - for (const route of routes) { - router.registerRoute(route); - } - router.addFetchListener(); - }; - - exports.initialize = initialize; - - return exports; - -})({}, workbox.backgroundSync, workbox.core._private, workbox.core._private, workbox.core._private, workbox.routing, workbox.routing, workbox.strategies, workbox.strategies); -//# sourceMappingURL=workbox-offline-ga.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-offline-ga.dev.js.map b/docs/workbox-v7.4.1/workbox-offline-ga.dev.js.map deleted file mode 100644 index d2bc783b..00000000 --- a/docs/workbox-v7.4.1/workbox-offline-ga.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-offline-ga.dev.js","sources":["../_version.js","../utils/constants.js","../initialize.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:google-analytics:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nexport const QUEUE_NAME = 'workbox-google-analytics';\nexport const MAX_RETENTION_TIME = 60 * 48; // Two days in minutes\nexport const GOOGLE_ANALYTICS_HOST = 'www.google-analytics.com';\nexport const GTM_HOST = 'www.googletagmanager.com';\nexport const ANALYTICS_JS_PATH = '/analytics.js';\nexport const GTAG_JS_PATH = '/gtag/js';\nexport const GTM_JS_PATH = '/gtm.js';\nexport const COLLECT_DEFAULT_PATH = '/collect';\n// This RegExp matches all known Measurement Protocol single-hit collect\n// endpoints. Most of the time the default path (/collect) is used, but\n// occasionally an experimental endpoint is used when testing new features,\n// (e.g. /r/collect or /j/collect)\nexport const COLLECT_PATHS_REGEX = /^\\/(\\w+\\/)?collect/;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { BackgroundSyncPlugin } from 'workbox-background-sync/BackgroundSyncPlugin.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from 'workbox-routing/Route.js';\nimport { Router } from 'workbox-routing/Router.js';\nimport { NetworkFirst } from 'workbox-strategies/NetworkFirst.js';\nimport { NetworkOnly } from 'workbox-strategies/NetworkOnly.js';\nimport { QUEUE_NAME, MAX_RETENTION_TIME, GOOGLE_ANALYTICS_HOST, GTM_HOST, ANALYTICS_JS_PATH, GTAG_JS_PATH, GTM_JS_PATH, COLLECT_PATHS_REGEX, } from './utils/constants.js';\nimport './_version.js';\n/**\n * Creates the requestWillDequeue callback to be used with the background\n * sync plugin. The callback takes the failed request and adds the\n * `qt` param based on the current time, as well as applies any other\n * user-defined hit modifications.\n *\n * @param {Object} config See {@link workbox-google-analytics.initialize}.\n * @return {Function} The requestWillDequeue callback function.\n *\n * @private\n */\nconst createOnSyncCallback = (config) => {\n return async ({ queue }) => {\n let entry;\n while ((entry = await queue.shiftRequest())) {\n const { request, timestamp } = entry;\n const url = new URL(request.url);\n try {\n // Measurement protocol requests can set their payload parameters in\n // either the URL query string (for GET requests) or the POST body.\n const params = request.method === 'POST'\n ? new URLSearchParams(await request.clone().text())\n : url.searchParams;\n // Calculate the qt param, accounting for the fact that an existing\n // qt param may be present and should be updated rather than replaced.\n const originalHitTime = timestamp - (Number(params.get('qt')) || 0);\n const queueTime = Date.now() - originalHitTime;\n // Set the qt param prior to applying hitFilter or parameterOverrides.\n params.set('qt', String(queueTime));\n // Apply `parameterOverrides`, if set.\n if (config.parameterOverrides) {\n for (const param of Object.keys(config.parameterOverrides)) {\n const value = config.parameterOverrides[param];\n params.set(param, value);\n }\n }\n // Apply `hitFilter`, if set.\n if (typeof config.hitFilter === 'function') {\n config.hitFilter.call(null, params);\n }\n // Retry the fetch. Ignore URL search params from the URL as they're\n // now in the post body.\n await fetch(new Request(url.origin + url.pathname, {\n body: params.toString(),\n method: 'POST',\n mode: 'cors',\n credentials: 'omit',\n headers: { 'Content-Type': 'text/plain' },\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(url.href)}' ` + `has been replayed`);\n }\n }\n catch (err) {\n await queue.unshiftRequest(entry);\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(url.href)}' ` +\n `failed to replay, putting it back in the queue.`);\n }\n throw err;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`All Google Analytics request successfully replayed; ` +\n `the queue is now empty!`);\n }\n };\n};\n/**\n * Creates GET and POST routes to catch failed Measurement Protocol hits.\n *\n * @param {BackgroundSyncPlugin} bgSyncPlugin\n * @return {Array} The created routes.\n *\n * @private\n */\nconst createCollectRoutes = (bgSyncPlugin) => {\n const match = ({ url }) => url.hostname === GOOGLE_ANALYTICS_HOST &&\n COLLECT_PATHS_REGEX.test(url.pathname);\n const handler = new NetworkOnly({\n plugins: [bgSyncPlugin],\n });\n return [new Route(match, handler, 'GET'), new Route(match, handler, 'POST')];\n};\n/**\n * Creates a route with a network first strategy for the analytics.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createAnalyticsJsRoute = (cacheName) => {\n const match = ({ url }) => url.hostname === GOOGLE_ANALYTICS_HOST &&\n url.pathname === ANALYTICS_JS_PATH;\n const handler = new NetworkFirst({ cacheName });\n return new Route(match, handler, 'GET');\n};\n/**\n * Creates a route with a network first strategy for the gtag.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createGtagJsRoute = (cacheName) => {\n const match = ({ url }) => url.hostname === GTM_HOST && url.pathname === GTAG_JS_PATH;\n const handler = new NetworkFirst({ cacheName });\n return new Route(match, handler, 'GET');\n};\n/**\n * Creates a route with a network first strategy for the gtm.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createGtmJsRoute = (cacheName) => {\n const match = ({ url }) => url.hostname === GTM_HOST && url.pathname === GTM_JS_PATH;\n const handler = new NetworkFirst({ cacheName });\n return new Route(match, handler, 'GET');\n};\n/**\n * @param {Object=} [options]\n * @param {Object} [options.cacheName] The cache name to store and retrieve\n * analytics.js. Defaults to the cache names provided by `workbox-core`.\n * @param {Object} [options.parameterOverrides]\n * [Measurement Protocol parameters](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters),\n * expressed as key/value pairs, to be added to replayed Google Analytics\n * requests. This can be used to, e.g., set a custom dimension indicating\n * that the request was replayed.\n * @param {Function} [options.hitFilter] A function that allows you to modify\n * the hit parameters prior to replaying\n * the hit. The function is invoked with the original hit's URLSearchParams\n * object as its only argument.\n *\n * @memberof workbox-google-analytics\n */\nconst initialize = (options = {}) => {\n const cacheName = cacheNames.getGoogleAnalyticsName(options.cacheName);\n const bgSyncPlugin = new BackgroundSyncPlugin(QUEUE_NAME, {\n maxRetentionTime: MAX_RETENTION_TIME,\n onSync: createOnSyncCallback(options),\n });\n const routes = [\n createGtmJsRoute(cacheName),\n createAnalyticsJsRoute(cacheName),\n createGtagJsRoute(cacheName),\n ...createCollectRoutes(bgSyncPlugin),\n ];\n const router = new Router();\n for (const route of routes) {\n router.registerRoute(route);\n }\n router.addFetchListener();\n};\nexport { initialize };\n"],"names":["self","_","e","QUEUE_NAME","MAX_RETENTION_TIME","GOOGLE_ANALYTICS_HOST","GTM_HOST","ANALYTICS_JS_PATH","GTAG_JS_PATH","GTM_JS_PATH","COLLECT_PATHS_REGEX","createOnSyncCallback","config","queue","entry","shiftRequest","request","timestamp","url","URL","params","method","URLSearchParams","clone","text","searchParams","originalHitTime","Number","get","queueTime","Date","now","set","String","parameterOverrides","param","Object","keys","value","hitFilter","call","fetch","Request","origin","pathname","body","toString","mode","credentials","headers","process","logger","log","getFriendlyURL","href","err","unshiftRequest","createCollectRoutes","bgSyncPlugin","match","hostname","test","handler","NetworkOnly","plugins","Route","createAnalyticsJsRoute","cacheName","NetworkFirst","createGtagJsRoute","createGtmJsRoute","initialize","options","cacheNames","getGoogleAnalyticsName","BackgroundSyncPlugin","maxRetentionTime","onSync","routes","router","Router","route","registerRoute","addFetchListener"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,gCAAgC,CAAC,IAAIC,CAAC,EAAE;IACjD,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;ICLZ;IACA;;IAEA;IACA;IACA;IACA;IAEO,MAAMC,UAAU,GAAG,0BAA0B;IAC7C,MAAMC,kBAAkB,GAAG,EAAE,GAAG,EAAE,CAAC;IACnC,MAAMC,qBAAqB,GAAG,0BAA0B;IACxD,MAAMC,QAAQ,GAAG,0BAA0B;IAC3C,MAAMC,iBAAiB,GAAG,eAAe;IACzC,MAAMC,YAAY,G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C;IACD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAMQ,gBAAgB,GAAIH,SAAS,IAAK;MACpC,MAAMR,KAAK,GAAGA,CAAC;IAAEzC,IAAAA;OAAK,KAAKA,GAAG,CAAC0C,QAAQ,KAAKtD,QAAQ,IAAIY,GAAG,CAAC0B,QAAQ,KAAKnC,WAAW;IACpF,EAAA,MAAMqD,OAAO,GAAG,IAAIM,4BAAY,CAAC;IAAED,IAAAA;IAAU,GAAC,CAAC;MAC/C,OAAO,IAAIF,cAAK,CAACN,KAAK,EAAEG,OAAO,EAAE,KAAK,CAAC;IAC3C,CAAC;IACD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA,UAAMS,UAAU,GAAGA,CAACC,OAAO,GAAG,EAAE,KAAK;MACjC,MAAML,SAAS,GAAGM,wBAAU,CAACC,sBAAsB,CAACF,OAAO,CAACL,SAAS,CAAC;IACtE,EAAA,MAAMT,YAAY,GAAG,IAAIiB,4CAAoB,CAACxE,UAAU,EAAE;IACtDyE,IAAAA,gBAAgB,EAAExE,kBAAkB;QACpCyE,MAAM,EAAElE,oBAAoB,CAAC6D,OAAO;IACxC,GAAC,CAAC;MACF,MAAMM,MAAM,GAAG,CACXR,gBAAgB,CAACH,SAAS,CAAC,EAC3BD,sBAAsB,CAACC,SAAS,CAAC,EACjCE,iBAAiB,CAACF,SAAS,CAAC,EAC5B,GAAGV,mBAAmB,CAACC,YAAY,CAAC,CACvC;IACD,EAAA,MAAMqB,MAAM,GAAG,IAAIC,gBAAM,EAAE;IAC3B,EAAA,KAAK,MAAMC,KAAK,IAAIH,MAAM,EAAE;IACxBC,IAAAA,MAAM,CAACG,aAAa,CAACD,KAAK,CAAC;IAC/B,EAAA;MACAF,MAAM,CAACI,gBAAgB,EAAE;IAC7B;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-offline-ga.prod.js b/docs/workbox-v7.4.1/workbox-offline-ga.prod.js deleted file mode 100644 index 5c0a4d8c..00000000 --- a/docs/workbox-v7.4.1/workbox-offline-ga.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.googleAnalytics=function(t,e,o,n,r,c,a,w,s){"use strict";try{self["workbox:google-analytics:7.4.0"]&&_()}catch(t){}const i="www.google-analytics.com",l="www.googletagmanager.com",u=/^\/(\w+\/)?collect/,m=t=>{const e=({url:t})=>t.hostname===i&&u.test(t.pathname),o=new s.NetworkOnly({plugins:[t]});return[new c.Route(e,o,"GET"),new c.Route(e,o,"POST")]},g=t=>{const e=new w.NetworkFirst({cacheName:t});return new c.Route((({url:t})=>t.hostname===i&&"/analytics.js"===t.pathname),e,"GET")},h=t=>{const e=new w.NetworkFirst({cacheName:t});return new c.Route((({url:t})=>t.hostname===l&&"/gtag/js"===t.pathname),e,"GET")},b=t=>{const e=new w.NetworkFirst({cacheName:t});return new c.Route((({url:t})=>t.hostname===l&&"/gtm.js"===t.pathname),e,"GET")};return t.initialize=(t={})=>{const n=o.cacheNames.getGoogleAnalyticsName(t.cacheName),r=new e.BackgroundSyncPlugin("workbox-google-analytics",{maxRetentionTime:2880,onSync:(c=t,async({queue:t})=>{let e;for(;e=await t.shiftRequest();){const{request:o,timestamp:n}=e,r=new URL(o.url);try{const t="POST"===o.method?new URLSearchParams(await o.clone().text()):r.searchParams,e=n-(Number(t.get("qt"))||0),a=Date.now()-e;if(t.set("qt",String(a)),c.parameterOverrides)for(const e of Object.keys(c.parameterOverrides)){const o=c.parameterOverrides[e];t.set(e,o)}"function"==typeof c.hitFilter&&c.hitFilter.call(null,t),await fetch(new Request(r.origin+r.pathname,{body:t.toString(),method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"text/plain"}}))}catch(o){throw await t.unshiftRequest(e),o}}})});var c;const w=[b(n),g(n),h(n),...m(r)],s=new a.Router;for(const t of w)s.registerRoute(t);s.addFetchListener()},t}({},workbox.backgroundSync,workbox.core._private,workbox.core._private,workbox.core._private,workbox.routing,workbox.routing,workbox.strategies,workbox.strategies); -//# sourceMappingURL=workbox-offline-ga.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-offline-ga.prod.js.map b/docs/workbox-v7.4.1/workbox-offline-ga.prod.js.map deleted file mode 100644 index a97567b2..00000000 --- a/docs/workbox-v7.4.1/workbox-offline-ga.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-offline-ga.prod.js","sources":["../_version.js","../utils/constants.js","../initialize.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:google-analytics:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nexport const QUEUE_NAME = 'workbox-google-analytics';\nexport const MAX_RETENTION_TIME = 60 * 48; // Two days in minutes\nexport const GOOGLE_ANALYTICS_HOST = 'www.google-analytics.com';\nexport const GTM_HOST = 'www.googletagmanager.com';\nexport const ANALYTICS_JS_PATH = '/analytics.js';\nexport const GTAG_JS_PATH = '/gtag/js';\nexport const GTM_JS_PATH = '/gtm.js';\nexport const COLLECT_DEFAULT_PATH = '/collect';\n// This RegExp matches all known Measurement Protocol single-hit collect\n// endpoints. Most of the time the default path (/collect) is used, but\n// occasionally an experimental endpoint is used when testing new features,\n// (e.g. /r/collect or /j/collect)\nexport const COLLECT_PATHS_REGEX = /^\\/(\\w+\\/)?collect/;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { BackgroundSyncPlugin } from 'workbox-background-sync/BackgroundSyncPlugin.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from 'workbox-routing/Route.js';\nimport { Router } from 'workbox-routing/Router.js';\nimport { NetworkFirst } from 'workbox-strategies/NetworkFirst.js';\nimport { NetworkOnly } from 'workbox-strategies/NetworkOnly.js';\nimport { QUEUE_NAME, MAX_RETENTION_TIME, GOOGLE_ANALYTICS_HOST, GTM_HOST, ANALYTICS_JS_PATH, GTAG_JS_PATH, GTM_JS_PATH, COLLECT_PATHS_REGEX, } from './utils/constants.js';\nimport './_version.js';\n/**\n * Creates the requestWillDequeue callback to be used with the background\n * sync plugin. The callback takes the failed request and adds the\n * `qt` param based on the current time, as well as applies any other\n * user-defined hit modifications.\n *\n * @param {Object} config See {@link workbox-google-analytics.initialize}.\n * @return {Function} The requestWillDequeue callback function.\n *\n * @private\n */\nconst createOnSyncCallback = (config) => {\n return async ({ queue }) => {\n let entry;\n while ((entry = await queue.shiftRequest())) {\n const { request, timestamp } = entry;\n const url = new URL(request.url);\n try {\n // Measurement protocol requests can set their payload parameters in\n // either the URL query string (for GET requests) or the POST body.\n const params = request.method === 'POST'\n ? new URLSearchParams(await request.clone().text())\n : url.searchParams;\n // Calculate the qt param, accounting for the fact that an existing\n // qt param may be present and should be updated rather than replaced.\n const originalHitTime = timestamp - (Number(params.get('qt')) || 0);\n const queueTime = Date.now() - originalHitTime;\n // Set the qt param prior to applying hitFilter or parameterOverrides.\n params.set('qt', String(queueTime));\n // Apply `parameterOverrides`, if set.\n if (config.parameterOverrides) {\n for (const param of Object.keys(config.parameterOverrides)) {\n const value = config.parameterOverrides[param];\n params.set(param, value);\n }\n }\n // Apply `hitFilter`, if set.\n if (typeof config.hitFilter === 'function') {\n config.hitFilter.call(null, params);\n }\n // Retry the fetch. Ignore URL search params from the URL as they're\n // now in the post body.\n await fetch(new Request(url.origin + url.pathname, {\n body: params.toString(),\n method: 'POST',\n mode: 'cors',\n credentials: 'omit',\n headers: { 'Content-Type': 'text/plain' },\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(url.href)}' ` + `has been replayed`);\n }\n }\n catch (err) {\n await queue.unshiftRequest(entry);\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(url.href)}' ` +\n `failed to replay, putting it back in the queue.`);\n }\n throw err;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`All Google Analytics request successfully replayed; ` +\n `the queue is now empty!`);\n }\n };\n};\n/**\n * Creates GET and POST routes to catch failed Measurement Protocol hits.\n *\n * @param {BackgroundSyncPlugin} bgSyncPlugin\n * @return {Array} The created routes.\n *\n * @private\n */\nconst createCollectRoutes = (bgSyncPlugin) => {\n const match = ({ url }) => url.hostname === GOOGLE_ANALYTICS_HOST &&\n COLLECT_PATHS_REGEX.test(url.pathname);\n const handler = new NetworkOnly({\n plugins: [bgSyncPlugin],\n });\n return [new Route(match, handler, 'GET'), new Route(match, handler, 'POST')];\n};\n/**\n * Creates a route with a network first strategy for the analytics.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createAnalyticsJsRoute = (cacheName) => {\n const match = ({ url }) => url.hostname === GOOGLE_ANALYTICS_HOST &&\n url.pathname === ANALYTICS_JS_PATH;\n const handler = new NetworkFirst({ cacheName });\n return new Route(match, handler, 'GET');\n};\n/**\n * Creates a route with a network first strategy for the gtag.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createGtagJsRoute = (cacheName) => {\n const match = ({ url }) => url.hostname === GTM_HOST && url.pathname === GTAG_JS_PATH;\n const handler = new NetworkFirst({ cacheName });\n return new Route(match, handler, 'GET');\n};\n/**\n * Creates a route with a network first strategy for the gtm.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createGtmJsRoute = (cacheName) => {\n const match = ({ url }) => url.hostname === GTM_HOST && url.pathname === GTM_JS_PATH;\n const handler = new NetworkFirst({ cacheName });\n return new Route(match, handler, 'GET');\n};\n/**\n * @param {Object=} [options]\n * @param {Object} [options.cacheName] The cache name to store and retrieve\n * analytics.js. Defaults to the cache names provided by `workbox-core`.\n * @param {Object} [options.parameterOverrides]\n * [Measurement Protocol parameters](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters),\n * expressed as key/value pairs, to be added to replayed Google Analytics\n * requests. This can be used to, e.g., set a custom dimension indicating\n * that the request was replayed.\n * @param {Function} [options.hitFilter] A function that allows you to modify\n * the hit parameters prior to replaying\n * the hit. The function is invoked with the original hit's URLSearchParams\n * object as its only argument.\n *\n * @memberof workbox-google-analytics\n */\nconst initialize = (options = {}) => {\n const cacheName = cacheNames.getGoogleAnalyticsName(options.cacheName);\n const bgSyncPlugin = new BackgroundSyncPlugin(QUEUE_NAME, {\n maxRetentionTime: MAX_RETENTION_TIME,\n onSync: createOnSyncCallback(options),\n });\n const routes = [\n createGtmJsRoute(cacheName),\n createAnalyticsJsRoute(cacheName),\n createGtagJsRoute(cacheName),\n ...createCollectRoutes(bgSyncPlugin),\n ];\n const router = new Router();\n for (const route of routes) {\n router.registerRoute(route);\n }\n router.addFetchListener();\n};\nexport { initialize };\n"],"names":["self","_","e","GOOGLE_ANALYTICS_HOST","GTM_HOST","COLLECT_PATHS_REGEX","createCollectRoutes","bgSyncPlugin","match","url","hostname","test","pathname","handler","NetworkOnly","plugins","Route","createAnalyticsJsRoute","cacheName","NetworkFirst","createGtagJsRoute","createGtmJsRoute","initialize","options","cacheNames","getGoogleAnalyticsName","BackgroundSyncPlugin","maxRetentionTime","onSync","config","async","queue","entry","shiftRequest","request","timestamp","URL","params","method","URLSearchParams","clone","text","searchParams","originalHitTime","Number","get","queueTime","Date","now","set","String","parameterOverrides","param","Object","keys","value","hitFilter","call","fetch","Request","origin","body","toString","mode","credentials","headers","err","unshiftRequest","routes","router","Router","route","registerRoute","addFetchListener"],"mappings":"oGAEA,IACIA,KAAK,mCAAqCC,GAC9C,CACA,MAAOC,GAAK,CCGL,MAEMC,EAAwB,2BACxBC,EAAW,2BASXC,EAAsB,qBCyE7BC,EAAuBC,I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AAOJ,IAEpBjB,EAAOsB,mBACP,IAAK,MAAMC,KAASC,OAAOC,KAAKzB,EAAOsB,oBAAqB,CACxD,MAAMI,EAAQ1B,EAAOsB,mBAAmBC,GACxCf,EAAOY,IAAIG,EAAOG,EACtB,CAG4B,mBAArB1B,EAAO2B,WACd3B,EAAO2B,UAAUC,KAAK,KAAMpB,SAI1BqB,MAAM,IAAIC,QAAQlD,EAAImD,OAASnD,EAAIG,SAAU,CAC/CiD,KAAMxB,EAAOyB,WACbxB,OAAQ,OACRyB,KAAM,OACNC,YAAa,OACbC,QAAS,CAAE,eAAgB,gBAKnC,CACA,MAAOC,GAMH,YALMnC,EAAMoC,eAAenC,GAKrBkC,CACV,CACJ,MAlDsBrC,MAuI1B,MAAMuC,EAAS,CACX/C,EAAiBH,GACjBD,EAAuBC,GACvBE,EAAkBF,MACfZ,EAAoBC,IAErB8D,EAAS,IAAIC,SACnB,IAAK,MAAMC,KAASH,EAChBC,EAAOG,cAAcD,GAEzBF,EAAOI,kBAAkB"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-precaching.dev.js b/docs/workbox-v7.4.1/workbox-precaching.dev.js deleted file mode 100644 index 93b1ca0d..00000000 --- a/docs/workbox-v7.4.1/workbox-precaching.dev.js +++ /dev/null @@ -1,1201 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.precaching = (function (exports, assert_js, cacheNames_js, logger_js, WorkboxError_js, waitUntil_js, copyResponse_js, getFriendlyURL_js, Strategy_js, registerRoute_js, Route_js) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:precaching:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - // Name of the search parameter used to store revision info. - const REVISION_SEARCH_PARAM = '__WB_REVISION__'; - /** - * Converts a manifest entry into a versioned URL suitable for precaching. - * - * @param {Object|string} entry - * @return {string} A URL with versioning info. - * - * @private - * @memberof workbox-precaching - */ - function createCacheKey(entry) { - if (!entry) { - throw new WorkboxError_js.WorkboxError('add-to-cache-list-unexpected-type', { - entry - }); - } - // If a precache manifest entry is a string, it's assumed to be a versioned - // URL, like '/app.abcd1234.js'. Return as-is. - if (typeof entry === 'string') { - const urlObject = new URL(entry, location.href); - return { - cacheKey: urlObject.href, - url: urlObject.href - }; - } - const { - revision, - url - } = entry; - if (!url) { - throw new WorkboxError_js.WorkboxError('add-to-cache-list-unexpected-type', { - entry - }); - } - // If there's just a URL and no revision, then it's also assumed to be a - // versioned URL. - if (!revision) { - const urlObject = new URL(url, location.href); - return { - cacheKey: urlObject.href, - url: urlObject.href - }; - } - // Otherwise, construct a properly versioned URL using the custom Workbox - // search parameter along with the revision info. - const cacheKeyURL = new URL(url, location.href); - const originalURL = new URL(url, location.href); - cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision); - return { - cacheKey: cacheKeyURL.href, - url: originalURL.href - }; - } - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A plugin, designed to be used with PrecacheController, to determine the - * of assets that were updated (or not updated) during the install event. - * - * @private - */ - class PrecacheInstallReportPlugin { - constructor() { - this.updatedURLs = []; - this.notUpdatedURLs = []; - this.handlerWillStart = async ({ - request, - state - }) => { - // TODO: `state` should never be undefined... - if (state) { - state.originalRequest = request; - } - }; - this.cachedResponseWillBeUsed = async ({ - event, - state, - cachedResponse - }) => { - if (event.type === 'install') { - if (state && state.originalRequest && state.originalRequest instanceof Request) { - // TODO: `state` should never be undefined... - const url = state.originalRequest.url; - if (cachedResponse) { - this.notUpdatedURLs.push(url); - } else { - this.updatedURLs.push(url); - } - } - } - return cachedResponse; - }; - } - } - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A plugin, designed to be used with PrecacheController, to translate URLs into - * the corresponding cache key, based on the current revision info. - * - * @private - */ - class PrecacheCacheKeyPlugin { - constructor({ - precacheController - }) { - this.cacheKeyWillBeUsed = async ({ - request, - params - }) => { - // Params is type any, can't change right now. - /* eslint-disable */ - const cacheKey = (params === null || params === void 0 ? void 0 : params.cacheKey) || this._precacheController.getCacheKeyForURL(request.url); - /* eslint-enable */ - return cacheKey ? new Request(cacheKey, { - headers: request.headers - }) : request; - }; - this._precacheController = precacheController; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * @param {string} groupTitle - * @param {Array} deletedURLs - * - * @private - */ - const logGroup = (groupTitle, deletedURLs) => { - logger_js.logger.groupCollapsed(groupTitle); - for (const url of deletedURLs) { - logger_js.logger.log(url); - } - logger_js.logger.groupEnd(); - }; - /** - * @param {Array} deletedURLs - * - * @private - * @memberof workbox-precaching - */ - function printCleanupDetails(deletedURLs) { - const deletionCount = deletedURLs.length; - if (deletionCount > 0) { - logger_js.logger.groupCollapsed(`During precaching cleanup, ` + `${deletionCount} cached ` + `request${deletionCount === 1 ? ' was' : 's were'} deleted.`); - logGroup('Deleted Cache Requests', deletedURLs); - logger_js.logger.groupEnd(); - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * @param {string} groupTitle - * @param {Array} urls - * - * @private - */ - function _nestedGroup(groupTitle, urls) { - if (urls.length === 0) { - return; - } - logger_js.logger.groupCollapsed(groupTitle); - for (const url of urls) { - logger_js.logger.log(url); - } - logger_js.logger.groupEnd(); - } - /** - * @param {Array} urlsToPrecache - * @param {Array} urlsAlreadyPrecached - * - * @private - * @memberof workbox-precaching - */ - function printInstallDetails(urlsToPrecache, urlsAlreadyPrecached) { - const precachedCount = urlsToPrecache.length; - const alreadyPrecachedCount = urlsAlreadyPrecached.length; - if (precachedCount || alreadyPrecachedCount) { - let message = `Precaching ${precachedCount} file${precachedCount === 1 ? '' : 's'}.`; - if (alreadyPrecachedCount > 0) { - message += ` ${alreadyPrecachedCount} ` + `file${alreadyPrecachedCount === 1 ? ' is' : 's are'} already cached.`; - } - logger_js.logger.groupCollapsed(message); - _nestedGroup(`View newly precached URLs.`, urlsToPrecache); - _nestedGroup(`View previously precached URLs.`, urlsAlreadyPrecached); - logger_js.logger.groupEnd(); - } - } - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A {@link workbox-strategies.Strategy} implementation - * specifically designed to work with - * {@link workbox-precaching.PrecacheController} - * to both cache and fetch precached assets. - * - * Note: an instance of this class is created automatically when creating a - * `PrecacheController`; it's generally not necessary to create this yourself. - * - * @extends workbox-strategies.Strategy - * @memberof workbox-precaching - */ - class PrecacheStrategy extends Strategy_js.Strategy { - /** - * - * @param {Object} [options] - * @param {string} [options.cacheName] Cache name to store and retrieve - * requests. Defaults to the cache names provided by - * {@link workbox-core.cacheNames}. - * @param {Array} [options.plugins] {@link https://developers.google.com/web/tools/workbox/guides/using-plugins|Plugins} - * to use in conjunction with this caching strategy. - * @param {Object} [options.fetchOptions] Values passed along to the - * {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters|init} - * of all fetch() requests made by this strategy. - * @param {Object} [options.matchOptions] The - * {@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions|CacheQueryOptions} - * for any `cache.match()` or `cache.put()` calls made by this strategy. - * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to - * get the response from the network if there's a precache miss. - */ - constructor(options = {}) { - options.cacheName = cacheNames_js.cacheNames.getPrecacheName(options.cacheName); - super(options); - this._fallbackToNetwork = options.fallbackToNetwork === false ? false : true; - // Redirected responses cannot be used to satisfy a navigation request, so - // any redirected response must be "copied" rather than cloned, so the new - // response doesn't contain the `redirected` flag. See: - // https://bugs.chromium.org/p/chromium/issues/detail?id=669363&desc=2#c1 - this.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin); - } - /** - * @private - * @param {Request|string} request A request to run this strategy for. - * @param {workbox-strategies.StrategyHandler} handler The event that - * triggered the request. - * @return {Promise} - */ - async _handle(request, handler) { - const response = await handler.cacheMatch(request); - if (response) { - return response; - } - // If this is an `install` event for an entry that isn't already cached, - // then populate the cache. - if (handler.event && handler.event.type === 'install') { - return await this._handleInstall(request, handler); - } - // Getting here means something went wrong. An entry that should have been - // precached wasn't found in the cache. - return await this._handleFetch(request, handler); - } - async _handleFetch(request, handler) { - let response; - const params = handler.params || {}; - // Fall back to the network if we're configured to do so. - if (this._fallbackToNetwork) { - { - logger_js.logger.warn(`The precached response for ` + `${getFriendlyURL_js.getFriendlyURL(request.url)} in ${this.cacheName} was not ` + `found. Falling back to the network.`); - } - const integrityInManifest = params.integrity; - const integrityInRequest = request.integrity; - const noIntegrityConflict = !integrityInRequest || integrityInRequest === integrityInManifest; - // Do not add integrity if the original request is no-cors - // See https://github.com/GoogleChrome/workbox/issues/3096 - response = await handler.fetch(new Request(request, { - integrity: request.mode !== 'no-cors' ? integrityInRequest || integrityInManifest : undefined - })); - // It's only "safe" to repair the cache if we're using SRI to guarantee - // that the response matches the precache manifest's expectations, - // and there's either a) no integrity property in the incoming request - // or b) there is an integrity, and it matches the precache manifest. - // See https://github.com/GoogleChrome/workbox/issues/2858 - // Also if the original request users no-cors we don't use integrity. - // See https://github.com/GoogleChrome/workbox/issues/3096 - if (integrityInManifest && noIntegrityConflict && request.mode !== 'no-cors') { - this._useDefaultCacheabilityPluginIfNeeded(); - const wasCached = await handler.cachePut(request, response.clone()); - { - if (wasCached) { - logger_js.logger.log(`A response for ${getFriendlyURL_js.getFriendlyURL(request.url)} ` + `was used to "repair" the precache.`); - } - } - } - } else { - // This shouldn't normally happen, but there are edge cases: - // https://github.com/GoogleChrome/workbox/issues/1441 - throw new WorkboxError_js.WorkboxError('missing-precache-entry', { - cacheName: this.cacheName, - url: request.url - }); - } - { - const cacheKey = params.cacheKey || (await handler.getCacheKey(request, 'read')); - // Workbox is going to handle the route. - // print the routing details to the console. - logger_js.logger.groupCollapsed(`Precaching is responding to: ` + getFriendlyURL_js.getFriendlyURL(request.url)); - logger_js.logger.log(`Serving the precached url: ${getFriendlyURL_js.getFriendlyURL(cacheKey instanceof Request ? cacheKey.url : cacheKey)}`); - logger_js.logger.groupCollapsed(`View request details here.`); - logger_js.logger.log(request); - logger_js.logger.groupEnd(); - logger_js.logger.groupCollapsed(`View response details here.`); - logger_js.logger.log(response); - logger_js.logger.groupEnd(); - logger_js.logger.groupEnd(); - } - return response; - } - async _handleInstall(request, handler) { - this._useDefaultCacheabilityPluginIfNeeded(); - const response = await handler.fetch(request); - // Make sure we defer cachePut() until after we know the response - // should be cached; see https://github.com/GoogleChrome/workbox/issues/2737 - const wasCached = await handler.cachePut(request, response.clone()); - if (!wasCached) { - // Throwing here will lead to the `install` handler failing, which - // we want to do if *any* of the responses aren't safe to cache. - throw new WorkboxError_js.WorkboxError('bad-precaching-response', { - url: request.url, - status: response.status - }); - } - return response; - } - /** - * This method is complex, as there a number of things to account for: - * - * The `plugins` array can be set at construction, and/or it might be added to - * to at any time before the strategy is used. - * - * At the time the strategy is used (i.e. during an `install` event), there - * needs to be at least one plugin that implements `cacheWillUpdate` in the - * array, other than `copyRedirectedCacheableResponsesPlugin`. - * - * - If this method is called and there are no suitable `cacheWillUpdate` - * plugins, we need to add `defaultPrecacheCacheabilityPlugin`. - * - * - If this method is called and there is exactly one `cacheWillUpdate`, then - * we don't have to do anything (this might be a previously added - * `defaultPrecacheCacheabilityPlugin`, or it might be a custom plugin). - * - * - If this method is called and there is more than one `cacheWillUpdate`, - * then we need to check if one is `defaultPrecacheCacheabilityPlugin`. If so, - * we need to remove it. (This situation is unlikely, but it could happen if - * the strategy is used multiple times, the first without a `cacheWillUpdate`, - * and then later on after manually adding a custom `cacheWillUpdate`.) - * - * See https://github.com/GoogleChrome/workbox/issues/2737 for more context. - * - * @private - */ - _useDefaultCacheabilityPluginIfNeeded() { - let defaultPluginIndex = null; - let cacheWillUpdatePluginCount = 0; - for (const [index, plugin] of this.plugins.entries()) { - // Ignore the copy redirected plugin when determining what to do. - if (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) { - continue; - } - // Save the default plugin's index, in case it needs to be removed. - if (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) { - defaultPluginIndex = index; - } - if (plugin.cacheWillUpdate) { - cacheWillUpdatePluginCount++; - } - } - if (cacheWillUpdatePluginCount === 0) { - this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin); - } else if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) { - // Only remove the default plugin; multiple custom plugins are allowed. - this.plugins.splice(defaultPluginIndex, 1); - } - // Nothing needs to be done if cacheWillUpdatePluginCount is 1 - } - } - PrecacheStrategy.defaultPrecacheCacheabilityPlugin = { - async cacheWillUpdate({ - response - }) { - if (!response || response.status >= 400) { - return null; - } - return response; - } - }; - PrecacheStrategy.copyRedirectedCacheableResponsesPlugin = { - async cacheWillUpdate({ - response - }) { - return response.redirected ? await copyResponse_js.copyResponse(response) : response; - } - }; - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Performs efficient precaching of assets. - * - * @memberof workbox-precaching - */ - class PrecacheController { - /** - * Create a new PrecacheController. - * - * @param {Object} [options] - * @param {string} [options.cacheName] The cache to use for precaching. - * @param {string} [options.plugins] Plugins to use when precaching as well - * as responding to fetch events for precached assets. - * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to - * get the response from the network if there's a precache miss. - */ - constructor({ - cacheName, - plugins = [], - fallbackToNetwork = true - } = {}) { - this._urlsToCacheKeys = new Map(); - this._urlsToCacheModes = new Map(); - this._cacheKeysToIntegrities = new Map(); - this._strategy = new PrecacheStrategy({ - cacheName: cacheNames_js.cacheNames.getPrecacheName(cacheName), - plugins: [...plugins, new PrecacheCacheKeyPlugin({ - precacheController: this - })], - fallbackToNetwork - }); - // Bind the install and activate methods to the instance. - this.install = this.install.bind(this); - this.activate = this.activate.bind(this); - } - /** - * @type {workbox-precaching.PrecacheStrategy} The strategy created by this controller and - * used to cache assets and respond to fetch events. - */ - get strategy() { - return this._strategy; - } - /** - * Adds items to the precache list, removing any duplicates and - * stores the files in the - * {@link workbox-core.cacheNames|"precache cache"} when the service - * worker installs. - * - * This method can be called multiple times. - * - * @param {Array} [entries=[]] Array of entries to precache. - */ - precache(entries) { - this.addToCacheList(entries); - if (!this._installAndActiveListenersAdded) { - self.addEventListener('install', this.install); - self.addEventListener('activate', this.activate); - this._installAndActiveListenersAdded = true; - } - } - /** - * This method will add items to the precache list, removing duplicates - * and ensuring the information is valid. - * - * @param {Array} entries - * Array of entries to precache. - */ - addToCacheList(entries) { - { - assert_js.assert.isArray(entries, { - moduleName: 'workbox-precaching', - className: 'PrecacheController', - funcName: 'addToCacheList', - paramName: 'entries' - }); - } - const urlsToWarnAbout = []; - for (const entry of entries) { - // See https://github.com/GoogleChrome/workbox/issues/2259 - if (typeof entry === 'string') { - urlsToWarnAbout.push(entry); - } else if (entry && entry.revision === undefined) { - urlsToWarnAbout.push(entry.url); - } - const { - cacheKey, - url - } = createCacheKey(entry); - const cacheMode = typeof entry !== 'string' && entry.revision ? 'reload' : 'default'; - if (this._urlsToCacheKeys.has(url) && this._urlsToCacheKeys.get(url) !== cacheKey) { - throw new WorkboxError_js.WorkboxError('add-to-cache-list-conflicting-entries', { - firstEntry: this._urlsToCacheKeys.get(url), - secondEntry: cacheKey - }); - } - if (typeof entry !== 'string' && entry.integrity) { - if (this._cacheKeysToIntegrities.has(cacheKey) && this._cacheKeysToIntegrities.get(cacheKey) !== entry.integrity) { - throw new WorkboxError_js.WorkboxError('add-to-cache-list-conflicting-integrities', { - url - }); - } - this._cacheKeysToIntegrities.set(cacheKey, entry.integrity); - } - this._urlsToCacheKeys.set(url, cacheKey); - this._urlsToCacheModes.set(url, cacheMode); - if (urlsToWarnAbout.length > 0) { - const warningMessage = `Workbox is precaching URLs without revision ` + `info: ${urlsToWarnAbout.join(', ')}\nThis is generally NOT safe. ` + `Learn more at https://bit.ly/wb-precache`; - { - logger_js.logger.warn(warningMessage); - } - } - } - } - /** - * Precaches new and updated assets. Call this method from the service worker - * install event. - * - * Note: this method calls `event.waitUntil()` for you, so you do not need - * to call it yourself in your event handlers. - * - * @param {ExtendableEvent} event - * @return {Promise} - */ - install(event) { - // waitUntil returns Promise - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - return waitUntil_js.waitUntil(event, async () => { - const installReportPlugin = new PrecacheInstallReportPlugin(); - this.strategy.plugins.push(installReportPlugin); - // Cache entries one at a time. - // See https://github.com/GoogleChrome/workbox/issues/2528 - for (const [url, cacheKey] of this._urlsToCacheKeys) { - const integrity = this._cacheKeysToIntegrities.get(cacheKey); - const cacheMode = this._urlsToCacheModes.get(url); - const request = new Request(url, { - integrity, - cache: cacheMode, - credentials: 'same-origin' - }); - await Promise.all(this.strategy.handleAll({ - params: { - cacheKey - }, - request, - event - })); - } - const { - updatedURLs, - notUpdatedURLs - } = installReportPlugin; - { - printInstallDetails(updatedURLs, notUpdatedURLs); - } - return { - updatedURLs, - notUpdatedURLs - }; - }); - } - /** - * Deletes assets that are no longer present in the current precache manifest. - * Call this method from the service worker activate event. - * - * Note: this method calls `event.waitUntil()` for you, so you do not need - * to call it yourself in your event handlers. - * - * @param {ExtendableEvent} event - * @return {Promise} - */ - activate(event) { - // waitUntil returns Promise - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - return waitUntil_js.waitUntil(event, async () => { - const cache = await self.caches.open(this.strategy.cacheName); - const currentlyCachedRequests = await cache.keys(); - const expectedCacheKeys = new Set(this._urlsToCacheKeys.values()); - const deletedURLs = []; - for (const request of currentlyCachedRequests) { - if (!expectedCacheKeys.has(request.url)) { - await cache.delete(request); - deletedURLs.push(request.url); - } - } - { - printCleanupDetails(deletedURLs); - } - return { - deletedURLs - }; - }); - } - /** - * Returns a mapping of a precached URL to the corresponding cache key, taking - * into account the revision information for the URL. - * - * @return {Map} A URL to cache key mapping. - */ - getURLsToCacheKeys() { - return this._urlsToCacheKeys; - } - /** - * Returns a list of all the URLs that have been precached by the current - * service worker. - * - * @return {Array} The precached URLs. - */ - getCachedURLs() { - return [...this._urlsToCacheKeys.keys()]; - } - /** - * Returns the cache key used for storing a given URL. If that URL is - * unversioned, like `/index.html', then the cache key will be the original - * URL with a search parameter appended to it. - * - * @param {string} url A URL whose cache key you want to look up. - * @return {string} The versioned URL that corresponds to a cache key - * for the original URL, or undefined if that URL isn't precached. - */ - getCacheKeyForURL(url) { - const urlObject = new URL(url, location.href); - return this._urlsToCacheKeys.get(urlObject.href); - } - /** - * @param {string} url A cache key whose SRI you want to look up. - * @return {string} The subresource integrity associated with the cache key, - * or undefined if it's not set. - */ - getIntegrityForCacheKey(cacheKey) { - return this._cacheKeysToIntegrities.get(cacheKey); - } - /** - * This acts as a drop-in replacement for - * [`cache.match()`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match) - * with the following differences: - * - * - It knows what the name of the precache is, and only checks in that cache. - * - It allows you to pass in an "original" URL without versioning parameters, - * and it will automatically look up the correct cache key for the currently - * active revision of that URL. - * - * E.g., `matchPrecache('index.html')` will find the correct precached - * response for the currently active service worker, even if the actual cache - * key is `'/index.html?__WB_REVISION__=1234abcd'`. - * - * @param {string|Request} request The key (without revisioning parameters) - * to look up in the precache. - * @return {Promise} - */ - async matchPrecache(request) { - const url = request instanceof Request ? request.url : request; - const cacheKey = this.getCacheKeyForURL(url); - if (cacheKey) { - const cache = await self.caches.open(this.strategy.cacheName); - return cache.match(cacheKey); - } - return undefined; - } - /** - * Returns a function that looks up `url` in the precache (taking into - * account revision information), and returns the corresponding `Response`. - * - * @param {string} url The precached URL which will be used to lookup the - * `Response`. - * @return {workbox-routing~handlerCallback} - */ - createHandlerBoundToURL(url) { - const cacheKey = this.getCacheKeyForURL(url); - if (!cacheKey) { - throw new WorkboxError_js.WorkboxError('non-precached-url', { - url - }); - } - return options => { - options.request = new Request(url); - options.params = Object.assign({ - cacheKey - }, options.params); - return this.strategy.handle(options); - }; - } - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - let precacheController; - /** - * @return {PrecacheController} - * @private - */ - const getOrCreatePrecacheController = () => { - if (!precacheController) { - precacheController = new PrecacheController(); - } - return precacheController; - }; - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Adds plugins to the precaching strategy. - * - * @param {Array} plugins - * - * @memberof workbox-precaching - */ - function addPlugins(plugins) { - const precacheController = getOrCreatePrecacheController(); - precacheController.strategy.plugins.push(...plugins); - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Removes any URL search parameters that should be ignored. - * - * @param {URL} urlObject The original URL. - * @param {Array} ignoreURLParametersMatching RegExps to test against - * each search parameter name. Matches mean that the search parameter should be - * ignored. - * @return {URL} The URL with any ignored search parameters removed. - * - * @private - * @memberof workbox-precaching - */ - function removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching = []) { - // Convert the iterable into an array at the start of the loop to make sure - // deletion doesn't mess up iteration. - for (const paramName of [...urlObject.searchParams.keys()]) { - if (ignoreURLParametersMatching.some(regExp => regExp.test(paramName))) { - urlObject.searchParams.delete(paramName); - } - } - return urlObject; - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Generator function that yields possible variations on the original URL to - * check, one at a time. - * - * @param {string} url - * @param {Object} options - * - * @private - * @memberof workbox-precaching - */ - function* generateURLVariations(url, { - ignoreURLParametersMatching = [/^utm_/, /^fbclid$/], - directoryIndex = 'index.html', - cleanURLs = true, - urlManipulation - } = {}) { - const urlObject = new URL(url, location.href); - urlObject.hash = ''; - yield urlObject.href; - const urlWithoutIgnoredParams = removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching); - yield urlWithoutIgnoredParams.href; - if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) { - const directoryURL = new URL(urlWithoutIgnoredParams.href); - directoryURL.pathname += directoryIndex; - yield directoryURL.href; - } - if (cleanURLs) { - const cleanURL = new URL(urlWithoutIgnoredParams.href); - cleanURL.pathname += '.html'; - yield cleanURL.href; - } - if (urlManipulation) { - const additionalURLs = urlManipulation({ - url: urlObject - }); - for (const urlToAttempt of additionalURLs) { - yield urlToAttempt.href; - } - } - } - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A subclass of {@link workbox-routing.Route} that takes a - * {@link workbox-precaching.PrecacheController} - * instance and uses it to match incoming requests and handle fetching - * responses from the precache. - * - * @memberof workbox-precaching - * @extends workbox-routing.Route - */ - class PrecacheRoute extends Route_js.Route { - /** - * @param {PrecacheController} precacheController A `PrecacheController` - * instance used to both match requests and respond to fetch events. - * @param {Object} [options] Options to control how requests are matched - * against the list of precached URLs. - * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will - * check cache entries for a URLs ending with '/' to see if there is a hit when - * appending the `directoryIndex` value. - * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/, /^fbclid$/]] An - * array of regex's to remove search params when looking for a cache match. - * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will - * check the cache for the URL with a `.html` added to the end of the end. - * @param {workbox-precaching~urlManipulation} [options.urlManipulation] - * This is a function that should take a URL and return an array of - * alternative URLs that should be checked for precache matches. - */ - constructor(precacheController, options) { - const match = ({ - request - }) => { - const urlsToCacheKeys = precacheController.getURLsToCacheKeys(); - for (const possibleURL of generateURLVariations(request.url, options)) { - const cacheKey = urlsToCacheKeys.get(possibleURL); - if (cacheKey) { - const integrity = precacheController.getIntegrityForCacheKey(cacheKey); - return { - cacheKey, - integrity - }; - } - } - { - logger_js.logger.debug(`Precaching did not find a match for ` + getFriendlyURL_js.getFriendlyURL(request.url)); - } - return; - }; - super(match, precacheController.strategy); - } - } - - /* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Add a `fetch` listener to the service worker that will - * respond to - * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests} - * with precached assets. - * - * Requests for assets that aren't precached, the `FetchEvent` will not be - * responded to, allowing the event to fall through to other `fetch` event - * listeners. - * - * @param {Object} [options] See the {@link workbox-precaching.PrecacheRoute} - * options. - * - * @memberof workbox-precaching - */ - function addRoute(options) { - const precacheController = getOrCreatePrecacheController(); - const precacheRoute = new PrecacheRoute(precacheController, options); - registerRoute_js.registerRoute(precacheRoute); - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const SUBSTRING_TO_FIND = '-precache-'; - /** - * Cleans up incompatible precaches that were created by older versions of - * Workbox, by a service worker registered under the current scope. - * - * This is meant to be called as part of the `activate` event. - * - * This should be safe to use as long as you don't include `substringToFind` - * (defaulting to `-precache-`) in your non-precache cache names. - * - * @param {string} currentPrecacheName The cache name currently in use for - * precaching. This cache won't be deleted. - * @param {string} [substringToFind='-precache-'] Cache names which include this - * substring will be deleted (excluding `currentPrecacheName`). - * @return {Array} A list of all the cache names that were deleted. - * - * @private - * @memberof workbox-precaching - */ - const deleteOutdatedCaches = async (currentPrecacheName, substringToFind = SUBSTRING_TO_FIND) => { - const cacheNames = await self.caches.keys(); - const cacheNamesToDelete = cacheNames.filter(cacheName => { - return cacheName.includes(substringToFind) && cacheName.includes(self.registration.scope) && cacheName !== currentPrecacheName; - }); - await Promise.all(cacheNamesToDelete.map(cacheName => self.caches.delete(cacheName))); - return cacheNamesToDelete; - }; - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Adds an `activate` event listener which will clean up incompatible - * precaches that were created by older versions of Workbox. - * - * @memberof workbox-precaching - */ - function cleanupOutdatedCaches() { - // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705 - self.addEventListener('activate', event => { - const cacheName = cacheNames_js.cacheNames.getPrecacheName(); - event.waitUntil(deleteOutdatedCaches(cacheName).then(cachesDeleted => { - { - if (cachesDeleted.length > 0) { - logger_js.logger.log(`The following out-of-date precaches were cleaned up ` + `automatically:`, cachesDeleted); - } - } - })); - }); - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Helper function that calls - * {@link PrecacheController#createHandlerBoundToURL} on the default - * {@link PrecacheController} instance. - * - * If you are creating your own {@link PrecacheController}, then call the - * {@link PrecacheController#createHandlerBoundToURL} on that instance, - * instead of using this function. - * - * @param {string} url The precached URL which will be used to lookup the - * `Response`. - * @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the - * response from the network if there's a precache miss. - * @return {workbox-routing~handlerCallback} - * - * @memberof workbox-precaching - */ - function createHandlerBoundToURL(url) { - const precacheController = getOrCreatePrecacheController(); - return precacheController.createHandlerBoundToURL(url); - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Takes in a URL, and returns the corresponding URL that could be used to - * lookup the entry in the precache. - * - * If a relative URL is provided, the location of the service worker file will - * be used as the base. - * - * For precached entries without revision information, the cache key will be the - * same as the original URL. - * - * For precached entries with revision information, the cache key will be the - * original URL with the addition of a query parameter used for keeping track of - * the revision info. - * - * @param {string} url The URL whose cache key to look up. - * @return {string} The cache key that corresponds to that URL. - * - * @memberof workbox-precaching - */ - function getCacheKeyForURL(url) { - const precacheController = getOrCreatePrecacheController(); - return precacheController.getCacheKeyForURL(url); - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Helper function that calls - * {@link PrecacheController#matchPrecache} on the default - * {@link PrecacheController} instance. - * - * If you are creating your own {@link PrecacheController}, then call - * {@link PrecacheController#matchPrecache} on that instance, - * instead of using this function. - * - * @param {string|Request} request The key (without revisioning parameters) - * to look up in the precache. - * @return {Promise} - * - * @memberof workbox-precaching - */ - function matchPrecache(request) { - const precacheController = getOrCreatePrecacheController(); - return precacheController.matchPrecache(request); - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Adds items to the precache list, removing any duplicates and - * stores the files in the - * {@link workbox-core.cacheNames|"precache cache"} when the service - * worker installs. - * - * This method can be called multiple times. - * - * Please note: This method **will not** serve any of the cached files for you. - * It only precaches files. To respond to a network request you call - * {@link workbox-precaching.addRoute}. - * - * If you have a single array of files to precache, you can just call - * {@link workbox-precaching.precacheAndRoute}. - * - * @param {Array} [entries=[]] Array of entries to precache. - * - * @memberof workbox-precaching - */ - function precache(entries) { - const precacheController = getOrCreatePrecacheController(); - precacheController.precache(entries); - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * This method will add entries to the precache list and add a route to - * respond to fetch events. - * - * This is a convenience method that will call - * {@link workbox-precaching.precache} and - * {@link workbox-precaching.addRoute} in a single call. - * - * @param {Array} entries Array of entries to precache. - * @param {Object} [options] See the - * {@link workbox-precaching.PrecacheRoute} options. - * - * @memberof workbox-precaching - */ - function precacheAndRoute(entries, options) { - precache(entries); - addRoute(options); - } - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * `PrecacheFallbackPlugin` allows you to specify an "offline fallback" - * response to be used when a given strategy is unable to generate a response. - * - * It does this by intercepting the `handlerDidError` plugin callback - * and returning a precached response, taking the expected revision parameter - * into account automatically. - * - * Unless you explicitly pass in a `PrecacheController` instance to the - * constructor, the default instance will be used. Generally speaking, most - * developers will end up using the default. - * - * @memberof workbox-precaching - */ - class PrecacheFallbackPlugin { - /** - * Constructs a new PrecacheFallbackPlugin with the associated fallbackURL. - * - * @param {Object} config - * @param {string} config.fallbackURL A precached URL to use as the fallback - * if the associated strategy can't generate a response. - * @param {PrecacheController} [config.precacheController] An optional - * PrecacheController instance. If not provided, the default - * PrecacheController will be used. - */ - constructor({ - fallbackURL, - precacheController - }) { - /** - * @return {Promise} The precache response for the fallback URL. - * - * @private - */ - this.handlerDidError = () => this._precacheController.matchPrecache(this._fallbackURL); - this._fallbackURL = fallbackURL; - this._precacheController = precacheController || getOrCreatePrecacheController(); - } - } - - exports.PrecacheController = PrecacheController; - exports.PrecacheFallbackPlugin = PrecacheFallbackPlugin; - exports.PrecacheRoute = PrecacheRoute; - exports.PrecacheStrategy = PrecacheStrategy; - exports.addPlugins = addPlugins; - exports.addRoute = addRoute; - exports.cleanupOutdatedCaches = cleanupOutdatedCaches; - exports.createHandlerBoundToURL = createHandlerBoundToURL; - exports.getCacheKeyForURL = getCacheKeyForURL; - exports.matchPrecache = matchPrecache; - exports.precache = precache; - exports.precacheAndRoute = precacheAndRoute; - - return exports; - -})({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core, workbox.core._private, workbox.strategies, workbox.routing, workbox.routing); -//# sourceMappingURL=workbox-precaching.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-precaching.dev.js.map b/docs/workbox-v7.4.1/workbox-precaching.dev.js.map deleted file mode 100644 index ed61f970..00000000 --- a/docs/workbox-v7.4.1/workbox-precaching.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-precaching.dev.js","sources":["../_version.js","../utils/createCacheKey.js","../utils/PrecacheInstallReportPlugin.js","../utils/PrecacheCacheKeyPlugin.js","../utils/printCleanupDetails.js","../utils/printInstallDetails.js","../PrecacheStrategy.js","../PrecacheController.js","../utils/getOrCreatePrecacheController.js","../addPlugins.js","../utils/removeIgnoredSearchParams.js","../utils/generateURLVariations.js","../PrecacheRoute.js","../addRoute.js","../utils/deleteOutdatedCaches.js","../cleanupOutdatedCaches.js","../createHandlerBoundToURL.js","../getCacheKeyForURL.js","../matchPrecache.js","../precache.js","../precacheAndRoute.js","../PrecacheFallbackPlugin.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:precaching:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport '../_version.js';\n// Name of the search parameter used to store revision info.\nconst REVISION_SEARCH_PARAM = '__WB_REVISION__';\n/**\n * Converts a manifest entry into a versioned URL suitable for precaching.\n *\n * @param {Object|string} entry\n * @return {string} A URL with versioning info.\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function createCacheKey(entry) {\n if (!entry) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', { entry });\n }\n // If a precache manifest entry is a string, it's assumed to be a versioned\n // URL, like '/app.abcd1234.js'. Return as-is.\n if (typeof entry === 'string') {\n const urlObject = new URL(entry, location.href);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n const { revision, url } = entry;\n if (!url) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', { entry });\n }\n // If there's just a URL and no revision, then it's also assumed to be a\n // versioned URL.\n if (!revision) {\n const urlObject = new URL(url, location.href);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n // Otherwise, construct a properly versioned URL using the custom Workbox\n // search parameter along with the revision info.\n const cacheKeyURL = new URL(url, location.href);\n const originalURL = new URL(url, location.href);\n cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision);\n return {\n cacheKey: cacheKeyURL.href,\n url: originalURL.href,\n };\n}\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A plugin, designed to be used with PrecacheController, to determine the\n * of assets that were updated (or not updated) during the install event.\n *\n * @private\n */\nclass PrecacheInstallReportPlugin {\n constructor() {\n this.updatedURLs = [];\n this.notUpdatedURLs = [];\n this.handlerWillStart = async ({ request, state, }) => {\n // TODO: `state` should never be undefined...\n if (state) {\n state.originalRequest = request;\n }\n };\n this.cachedResponseWillBeUsed = async ({ event, state, cachedResponse, }) => {\n if (event.type === 'install') {\n if (state &&\n state.originalRequest &&\n state.originalRequest instanceof Request) {\n // TODO: `state` should never be undefined...\n const url = state.originalRequest.url;\n if (cachedResponse) {\n this.notUpdatedURLs.push(url);\n }\n else {\n this.updatedURLs.push(url);\n }\n }\n }\n return cachedResponse;\n };\n }\n}\nexport { PrecacheInstallReportPlugin };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A plugin, designed to be used with PrecacheController, to translate URLs into\n * the corresponding cache key, based on the current revision info.\n *\n * @private\n */\nclass PrecacheCacheKeyPlugin {\n constructor({ precacheController }) {\n this.cacheKeyWillBeUsed = async ({ request, params, }) => {\n // Params is type any, can't change right now.\n /* eslint-disable */\n const cacheKey = (params === null || params === void 0 ? void 0 : params.cacheKey) ||\n this._precacheController.getCacheKeyForURL(request.url);\n /* eslint-enable */\n return cacheKey\n ? new Request(cacheKey, { headers: request.headers })\n : request;\n };\n this._precacheController = precacheController;\n }\n}\nexport { PrecacheCacheKeyPlugin };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport '../_version.js';\n/**\n * @param {string} groupTitle\n * @param {Array} deletedURLs\n *\n * @private\n */\nconst logGroup = (groupTitle, deletedURLs) => {\n logger.groupCollapsed(groupTitle);\n for (const url of deletedURLs) {\n logger.log(url);\n }\n logger.groupEnd();\n};\n/**\n * @param {Array} deletedURLs\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function printCleanupDetails(deletedURLs) {\n const deletionCount = deletedURLs.length;\n if (deletionCount > 0) {\n logger.groupCollapsed(`During precaching cleanup, ` +\n `${deletionCount} cached ` +\n `request${deletionCount === 1 ? ' was' : 's were'} deleted.`);\n logGroup('Deleted Cache Requests', deletedURLs);\n logger.groupEnd();\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport '../_version.js';\n/**\n * @param {string} groupTitle\n * @param {Array} urls\n *\n * @private\n */\nfunction _nestedGroup(groupTitle, urls) {\n if (urls.length === 0) {\n return;\n }\n logger.groupCollapsed(groupTitle);\n for (const url of urls) {\n logger.log(url);\n }\n logger.groupEnd();\n}\n/**\n * @param {Array} urlsToPrecache\n * @param {Array} urlsAlreadyPrecached\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function printInstallDetails(urlsToPrecache, urlsAlreadyPrecached) {\n const precachedCount = urlsToPrecache.length;\n const alreadyPrecachedCount = urlsAlreadyPrecached.length;\n if (precachedCount || alreadyPrecachedCount) {\n let message = `Precaching ${precachedCount} file${precachedCount === 1 ? '' : 's'}.`;\n if (alreadyPrecachedCount > 0) {\n message +=\n ` ${alreadyPrecachedCount} ` +\n `file${alreadyPrecachedCount === 1 ? ' is' : 's are'} already cached.`;\n }\n logger.groupCollapsed(message);\n _nestedGroup(`View newly precached URLs.`, urlsToPrecache);\n _nestedGroup(`View previously precached URLs.`, urlsAlreadyPrecached);\n logger.groupEnd();\n }\n}\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { copyResponse } from 'workbox-core/copyResponse.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from 'workbox-strategies/Strategy.js';\nimport './_version.js';\n/**\n * A {@link workbox-strategies.Strategy} implementation\n * specifically designed to work with\n * {@link workbox-precaching.PrecacheController}\n * to both cache and fetch precached assets.\n *\n * Note: an instance of this class is created automatically when creating a\n * `PrecacheController`; it's generally not necessary to create this yourself.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-precaching\n */\nclass PrecacheStrategy extends Strategy {\n /**\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] {@link https://developers.google.com/web/tools/workbox/guides/using-plugins|Plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters|init}\n * of all fetch() requests made by this strategy.\n * @param {Object} [options.matchOptions] The\n * {@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions|CacheQueryOptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to\n * get the response from the network if there's a precache miss.\n */\n constructor(options = {}) {\n options.cacheName = cacheNames.getPrecacheName(options.cacheName);\n super(options);\n this._fallbackToNetwork =\n options.fallbackToNetwork === false ? false : true;\n // Redirected responses cannot be used to satisfy a navigation request, so\n // any redirected response must be \"copied\" rather than cloned, so the new\n // response doesn't contain the `redirected` flag. See:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=669363&desc=2#c1\n this.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin);\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n const response = await handler.cacheMatch(request);\n if (response) {\n return response;\n }\n // If this is an `install` event for an entry that isn't already cached,\n // then populate the cache.\n if (handler.event && handler.event.type === 'install') {\n return await this._handleInstall(request, handler);\n }\n // Getting here means something went wrong. An entry that should have been\n // precached wasn't found in the cache.\n return await this._handleFetch(request, handler);\n }\n async _handleFetch(request, handler) {\n let response;\n const params = (handler.params || {});\n // Fall back to the network if we're configured to do so.\n if (this._fallbackToNetwork) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`The precached response for ` +\n `${getFriendlyURL(request.url)} in ${this.cacheName} was not ` +\n `found. Falling back to the network.`);\n }\n const integrityInManifest = params.integrity;\n const integrityInRequest = request.integrity;\n const noIntegrityConflict = !integrityInRequest || integrityInRequest === integrityInManifest;\n // Do not add integrity if the original request is no-cors\n // See https://github.com/GoogleChrome/workbox/issues/3096\n response = await handler.fetch(new Request(request, {\n integrity: request.mode !== 'no-cors'\n ? integrityInRequest || integrityInManifest\n : undefined,\n }));\n // It's only \"safe\" to repair the cache if we're using SRI to guarantee\n // that the response matches the precache manifest's expectations,\n // and there's either a) no integrity property in the incoming request\n // or b) there is an integrity, and it matches the precache manifest.\n // See https://github.com/GoogleChrome/workbox/issues/2858\n // Also if the original request users no-cors we don't use integrity.\n // See https://github.com/GoogleChrome/workbox/issues/3096\n if (integrityInManifest &&\n noIntegrityConflict &&\n request.mode !== 'no-cors') {\n this._useDefaultCacheabilityPluginIfNeeded();\n const wasCached = await handler.cachePut(request, response.clone());\n if (process.env.NODE_ENV !== 'production') {\n if (wasCached) {\n logger.log(`A response for ${getFriendlyURL(request.url)} ` +\n `was used to \"repair\" the precache.`);\n }\n }\n }\n }\n else {\n // This shouldn't normally happen, but there are edge cases:\n // https://github.com/GoogleChrome/workbox/issues/1441\n throw new WorkboxError('missing-precache-entry', {\n cacheName: this.cacheName,\n url: request.url,\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n const cacheKey = params.cacheKey || (await handler.getCacheKey(request, 'read'));\n // Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Precaching is responding to: ` + getFriendlyURL(request.url));\n logger.log(`Serving the precached url: ${getFriendlyURL(cacheKey instanceof Request ? cacheKey.url : cacheKey)}`);\n logger.groupCollapsed(`View request details here.`);\n logger.log(request);\n logger.groupEnd();\n logger.groupCollapsed(`View response details here.`);\n logger.log(response);\n logger.groupEnd();\n logger.groupEnd();\n }\n return response;\n }\n async _handleInstall(request, handler) {\n this._useDefaultCacheabilityPluginIfNeeded();\n const response = await handler.fetch(request);\n // Make sure we defer cachePut() until after we know the response\n // should be cached; see https://github.com/GoogleChrome/workbox/issues/2737\n const wasCached = await handler.cachePut(request, response.clone());\n if (!wasCached) {\n // Throwing here will lead to the `install` handler failing, which\n // we want to do if *any* of the responses aren't safe to cache.\n throw new WorkboxError('bad-precaching-response', {\n url: request.url,\n status: response.status,\n });\n }\n return response;\n }\n /**\n * This method is complex, as there a number of things to account for:\n *\n * The `plugins` array can be set at construction, and/or it might be added to\n * to at any time before the strategy is used.\n *\n * At the time the strategy is used (i.e. during an `install` event), there\n * needs to be at least one plugin that implements `cacheWillUpdate` in the\n * array, other than `copyRedirectedCacheableResponsesPlugin`.\n *\n * - If this method is called and there are no suitable `cacheWillUpdate`\n * plugins, we need to add `defaultPrecacheCacheabilityPlugin`.\n *\n * - If this method is called and there is exactly one `cacheWillUpdate`, then\n * we don't have to do anything (this might be a previously added\n * `defaultPrecacheCacheabilityPlugin`, or it might be a custom plugin).\n *\n * - If this method is called and there is more than one `cacheWillUpdate`,\n * then we need to check if one is `defaultPrecacheCacheabilityPlugin`. If so,\n * we need to remove it. (This situation is unlikely, but it could happen if\n * the strategy is used multiple times, the first without a `cacheWillUpdate`,\n * and then later on after manually adding a custom `cacheWillUpdate`.)\n *\n * See https://github.com/GoogleChrome/workbox/issues/2737 for more context.\n *\n * @private\n */\n _useDefaultCacheabilityPluginIfNeeded() {\n let defaultPluginIndex = null;\n let cacheWillUpdatePluginCount = 0;\n for (const [index, plugin] of this.plugins.entries()) {\n // Ignore the copy redirected plugin when determining what to do.\n if (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) {\n continue;\n }\n // Save the default plugin's index, in case it needs to be removed.\n if (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) {\n defaultPluginIndex = index;\n }\n if (plugin.cacheWillUpdate) {\n cacheWillUpdatePluginCount++;\n }\n }\n if (cacheWillUpdatePluginCount === 0) {\n this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin);\n }\n else if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) {\n // Only remove the default plugin; multiple custom plugins are allowed.\n this.plugins.splice(defaultPluginIndex, 1);\n }\n // Nothing needs to be done if cacheWillUpdatePluginCount is 1\n }\n}\nPrecacheStrategy.defaultPrecacheCacheabilityPlugin = {\n async cacheWillUpdate({ response }) {\n if (!response || response.status >= 400) {\n return null;\n }\n return response;\n },\n};\nPrecacheStrategy.copyRedirectedCacheableResponsesPlugin = {\n async cacheWillUpdate({ response }) {\n return response.redirected ? await copyResponse(response) : response;\n },\n};\nexport { PrecacheStrategy };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { waitUntil } from 'workbox-core/_private/waitUntil.js';\nimport { createCacheKey } from './utils/createCacheKey.js';\nimport { PrecacheInstallReportPlugin } from './utils/PrecacheInstallReportPlugin.js';\nimport { PrecacheCacheKeyPlugin } from './utils/PrecacheCacheKeyPlugin.js';\nimport { printCleanupDetails } from './utils/printCleanupDetails.js';\nimport { printInstallDetails } from './utils/printInstallDetails.js';\nimport { PrecacheStrategy } from './PrecacheStrategy.js';\nimport './_version.js';\n/**\n * Performs efficient precaching of assets.\n *\n * @memberof workbox-precaching\n */\nclass PrecacheController {\n /**\n * Create a new PrecacheController.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] The cache to use for precaching.\n * @param {string} [options.plugins] Plugins to use when precaching as well\n * as responding to fetch events for precached assets.\n * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to\n * get the response from the network if there's a precache miss.\n */\n constructor({ cacheName, plugins = [], fallbackToNetwork = true, } = {}) {\n this._urlsToCacheKeys = new Map();\n this._urlsToCacheModes = new Map();\n this._cacheKeysToIntegrities = new Map();\n this._strategy = new PrecacheStrategy({\n cacheName: cacheNames.getPrecacheName(cacheName),\n plugins: [\n ...plugins,\n new PrecacheCacheKeyPlugin({ precacheController: this }),\n ],\n fallbackToNetwork,\n });\n // Bind the install and activate methods to the instance.\n this.install = this.install.bind(this);\n this.activate = this.activate.bind(this);\n }\n /**\n * @type {workbox-precaching.PrecacheStrategy} The strategy created by this controller and\n * used to cache assets and respond to fetch events.\n */\n get strategy() {\n return this._strategy;\n }\n /**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * {@link workbox-core.cacheNames|\"precache cache\"} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * @param {Array} [entries=[]] Array of entries to precache.\n */\n precache(entries) {\n this.addToCacheList(entries);\n if (!this._installAndActiveListenersAdded) {\n self.addEventListener('install', this.install);\n self.addEventListener('activate', this.activate);\n this._installAndActiveListenersAdded = true;\n }\n }\n /**\n * This method will add items to the precache list, removing duplicates\n * and ensuring the information is valid.\n *\n * @param {Array} entries\n * Array of entries to precache.\n */\n addToCacheList(entries) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(entries, {\n moduleName: 'workbox-precaching',\n className: 'PrecacheController',\n funcName: 'addToCacheList',\n paramName: 'entries',\n });\n }\n const urlsToWarnAbout = [];\n for (const entry of entries) {\n // See https://github.com/GoogleChrome/workbox/issues/2259\n if (typeof entry === 'string') {\n urlsToWarnAbout.push(entry);\n }\n else if (entry && entry.revision === undefined) {\n urlsToWarnAbout.push(entry.url);\n }\n const { cacheKey, url } = createCacheKey(entry);\n const cacheMode = typeof entry !== 'string' && entry.revision ? 'reload' : 'default';\n if (this._urlsToCacheKeys.has(url) &&\n this._urlsToCacheKeys.get(url) !== cacheKey) {\n throw new WorkboxError('add-to-cache-list-conflicting-entries', {\n firstEntry: this._urlsToCacheKeys.get(url),\n secondEntry: cacheKey,\n });\n }\n if (typeof entry !== 'string' && entry.integrity) {\n if (this._cacheKeysToIntegrities.has(cacheKey) &&\n this._cacheKeysToIntegrities.get(cacheKey) !== entry.integrity) {\n throw new WorkboxError('add-to-cache-list-conflicting-integrities', {\n url,\n });\n }\n this._cacheKeysToIntegrities.set(cacheKey, entry.integrity);\n }\n this._urlsToCacheKeys.set(url, cacheKey);\n this._urlsToCacheModes.set(url, cacheMode);\n if (urlsToWarnAbout.length > 0) {\n const warningMessage = `Workbox is precaching URLs without revision ` +\n `info: ${urlsToWarnAbout.join(', ')}\\nThis is generally NOT safe. ` +\n `Learn more at https://bit.ly/wb-precache`;\n if (process.env.NODE_ENV === 'production') {\n // Use console directly to display this warning without bloating\n // bundle sizes by pulling in all of the logger codebase in prod.\n console.warn(warningMessage);\n }\n else {\n logger.warn(warningMessage);\n }\n }\n }\n }\n /**\n * Precaches new and updated assets. Call this method from the service worker\n * install event.\n *\n * Note: this method calls `event.waitUntil()` for you, so you do not need\n * to call it yourself in your event handlers.\n *\n * @param {ExtendableEvent} event\n * @return {Promise}\n */\n install(event) {\n // waitUntil returns Promise\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return waitUntil(event, async () => {\n const installReportPlugin = new PrecacheInstallReportPlugin();\n this.strategy.plugins.push(installReportPlugin);\n // Cache entries one at a time.\n // See https://github.com/GoogleChrome/workbox/issues/2528\n for (const [url, cacheKey] of this._urlsToCacheKeys) {\n const integrity = this._cacheKeysToIntegrities.get(cacheKey);\n const cacheMode = this._urlsToCacheModes.get(url);\n const request = new Request(url, {\n integrity,\n cache: cacheMode,\n credentials: 'same-origin',\n });\n await Promise.all(this.strategy.handleAll({\n params: { cacheKey },\n request,\n event,\n }));\n }\n const { updatedURLs, notUpdatedURLs } = installReportPlugin;\n if (process.env.NODE_ENV !== 'production') {\n printInstallDetails(updatedURLs, notUpdatedURLs);\n }\n return { updatedURLs, notUpdatedURLs };\n });\n }\n /**\n * Deletes assets that are no longer present in the current precache manifest.\n * Call this method from the service worker activate event.\n *\n * Note: this method calls `event.waitUntil()` for you, so you do not need\n * to call it yourself in your event handlers.\n *\n * @param {ExtendableEvent} event\n * @return {Promise}\n */\n activate(event) {\n // waitUntil returns Promise\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return waitUntil(event, async () => {\n const cache = await self.caches.open(this.strategy.cacheName);\n const currentlyCachedRequests = await cache.keys();\n const expectedCacheKeys = new Set(this._urlsToCacheKeys.values());\n const deletedURLs = [];\n for (const request of currentlyCachedRequests) {\n if (!expectedCacheKeys.has(request.url)) {\n await cache.delete(request);\n deletedURLs.push(request.url);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n printCleanupDetails(deletedURLs);\n }\n return { deletedURLs };\n });\n }\n /**\n * Returns a mapping of a precached URL to the corresponding cache key, taking\n * into account the revision information for the URL.\n *\n * @return {Map} A URL to cache key mapping.\n */\n getURLsToCacheKeys() {\n return this._urlsToCacheKeys;\n }\n /**\n * Returns a list of all the URLs that have been precached by the current\n * service worker.\n *\n * @return {Array} The precached URLs.\n */\n getCachedURLs() {\n return [...this._urlsToCacheKeys.keys()];\n }\n /**\n * Returns the cache key used for storing a given URL. If that URL is\n * unversioned, like `/index.html', then the cache key will be the original\n * URL with a search parameter appended to it.\n *\n * @param {string} url A URL whose cache key you want to look up.\n * @return {string} The versioned URL that corresponds to a cache key\n * for the original URL, or undefined if that URL isn't precached.\n */\n getCacheKeyForURL(url) {\n const urlObject = new URL(url, location.href);\n return this._urlsToCacheKeys.get(urlObject.href);\n }\n /**\n * @param {string} url A cache key whose SRI you want to look up.\n * @return {string} The subresource integrity associated with the cache key,\n * or undefined if it's not set.\n */\n getIntegrityForCacheKey(cacheKey) {\n return this._cacheKeysToIntegrities.get(cacheKey);\n }\n /**\n * This acts as a drop-in replacement for\n * [`cache.match()`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)\n * with the following differences:\n *\n * - It knows what the name of the precache is, and only checks in that cache.\n * - It allows you to pass in an \"original\" URL without versioning parameters,\n * and it will automatically look up the correct cache key for the currently\n * active revision of that URL.\n *\n * E.g., `matchPrecache('index.html')` will find the correct precached\n * response for the currently active service worker, even if the actual cache\n * key is `'/index.html?__WB_REVISION__=1234abcd'`.\n *\n * @param {string|Request} request The key (without revisioning parameters)\n * to look up in the precache.\n * @return {Promise}\n */\n async matchPrecache(request) {\n const url = request instanceof Request ? request.url : request;\n const cacheKey = this.getCacheKeyForURL(url);\n if (cacheKey) {\n const cache = await self.caches.open(this.strategy.cacheName);\n return cache.match(cacheKey);\n }\n return undefined;\n }\n /**\n * Returns a function that looks up `url` in the precache (taking into\n * account revision information), and returns the corresponding `Response`.\n *\n * @param {string} url The precached URL which will be used to lookup the\n * `Response`.\n * @return {workbox-routing~handlerCallback}\n */\n createHandlerBoundToURL(url) {\n const cacheKey = this.getCacheKeyForURL(url);\n if (!cacheKey) {\n throw new WorkboxError('non-precached-url', { url });\n }\n return (options) => {\n options.request = new Request(url);\n options.params = Object.assign({ cacheKey }, options.params);\n return this.strategy.handle(options);\n };\n }\n}\nexport { PrecacheController };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { PrecacheController } from '../PrecacheController.js';\nimport '../_version.js';\nlet precacheController;\n/**\n * @return {PrecacheController}\n * @private\n */\nexport const getOrCreatePrecacheController = () => {\n if (!precacheController) {\n precacheController = new PrecacheController();\n }\n return precacheController;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Adds plugins to the precaching strategy.\n *\n * @param {Array} plugins\n *\n * @memberof workbox-precaching\n */\nfunction addPlugins(plugins) {\n const precacheController = getOrCreatePrecacheController();\n precacheController.strategy.plugins.push(...plugins);\n}\nexport { addPlugins };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Removes any URL search parameters that should be ignored.\n *\n * @param {URL} urlObject The original URL.\n * @param {Array} ignoreURLParametersMatching RegExps to test against\n * each search parameter name. Matches mean that the search parameter should be\n * ignored.\n * @return {URL} The URL with any ignored search parameters removed.\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching = []) {\n // Convert the iterable into an array at the start of the loop to make sure\n // deletion doesn't mess up iteration.\n for (const paramName of [...urlObject.searchParams.keys()]) {\n if (ignoreURLParametersMatching.some((regExp) => regExp.test(paramName))) {\n urlObject.searchParams.delete(paramName);\n }\n }\n return urlObject;\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { removeIgnoredSearchParams } from './removeIgnoredSearchParams.js';\nimport '../_version.js';\n/**\n * Generator function that yields possible variations on the original URL to\n * check, one at a time.\n *\n * @param {string} url\n * @param {Object} options\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function* generateURLVariations(url, { ignoreURLParametersMatching = [/^utm_/, /^fbclid$/], directoryIndex = 'index.html', cleanURLs = true, urlManipulation, } = {}) {\n const urlObject = new URL(url, location.href);\n urlObject.hash = '';\n yield urlObject.href;\n const urlWithoutIgnoredParams = removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching);\n yield urlWithoutIgnoredParams.href;\n if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) {\n const directoryURL = new URL(urlWithoutIgnoredParams.href);\n directoryURL.pathname += directoryIndex;\n yield directoryURL.href;\n }\n if (cleanURLs) {\n const cleanURL = new URL(urlWithoutIgnoredParams.href);\n cleanURL.pathname += '.html';\n yield cleanURL.href;\n }\n if (urlManipulation) {\n const additionalURLs = urlManipulation({ url: urlObject });\n for (const urlToAttempt of additionalURLs) {\n yield urlToAttempt.href;\n }\n }\n}\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { Route } from 'workbox-routing/Route.js';\nimport { generateURLVariations } from './utils/generateURLVariations.js';\nimport './_version.js';\n/**\n * A subclass of {@link workbox-routing.Route} that takes a\n * {@link workbox-precaching.PrecacheController}\n * instance and uses it to match incoming requests and handle fetching\n * responses from the precache.\n *\n * @memberof workbox-precaching\n * @extends workbox-routing.Route\n */\nclass PrecacheRoute extends Route {\n /**\n * @param {PrecacheController} precacheController A `PrecacheController`\n * instance used to both match requests and respond to fetch events.\n * @param {Object} [options] Options to control how requests are matched\n * against the list of precached URLs.\n * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will\n * check cache entries for a URLs ending with '/' to see if there is a hit when\n * appending the `directoryIndex` value.\n * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/, /^fbclid$/]] An\n * array of regex's to remove search params when looking for a cache match.\n * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will\n * check the cache for the URL with a `.html` added to the end of the end.\n * @param {workbox-precaching~urlManipulation} [options.urlManipulation]\n * This is a function that should take a URL and return an array of\n * alternative URLs that should be checked for precache matches.\n */\n constructor(precacheController, options) {\n const match = ({ request, }) => {\n const urlsToCacheKeys = precacheController.getURLsToCacheKeys();\n for (const possibleURL of generateURLVariations(request.url, options)) {\n const cacheKey = urlsToCacheKeys.get(possibleURL);\n if (cacheKey) {\n const integrity = precacheController.getIntegrityForCacheKey(cacheKey);\n return { cacheKey, integrity };\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Precaching did not find a match for ` + getFriendlyURL(request.url));\n }\n return;\n };\n super(match, precacheController.strategy);\n }\n}\nexport { PrecacheRoute };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport { PrecacheRoute } from './PrecacheRoute.js';\nimport './_version.js';\n/**\n * Add a `fetch` listener to the service worker that will\n * respond to\n * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}\n * with precached assets.\n *\n * Requests for assets that aren't precached, the `FetchEvent` will not be\n * responded to, allowing the event to fall through to other `fetch` event\n * listeners.\n *\n * @param {Object} [options] See the {@link workbox-precaching.PrecacheRoute}\n * options.\n *\n * @memberof workbox-precaching\n */\nfunction addRoute(options) {\n const precacheController = getOrCreatePrecacheController();\n const precacheRoute = new PrecacheRoute(precacheController, options);\n registerRoute(precacheRoute);\n}\nexport { addRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst SUBSTRING_TO_FIND = '-precache-';\n/**\n * Cleans up incompatible precaches that were created by older versions of\n * Workbox, by a service worker registered under the current scope.\n *\n * This is meant to be called as part of the `activate` event.\n *\n * This should be safe to use as long as you don't include `substringToFind`\n * (defaulting to `-precache-`) in your non-precache cache names.\n *\n * @param {string} currentPrecacheName The cache name currently in use for\n * precaching. This cache won't be deleted.\n * @param {string} [substringToFind='-precache-'] Cache names which include this\n * substring will be deleted (excluding `currentPrecacheName`).\n * @return {Array} A list of all the cache names that were deleted.\n *\n * @private\n * @memberof workbox-precaching\n */\nconst deleteOutdatedCaches = async (currentPrecacheName, substringToFind = SUBSTRING_TO_FIND) => {\n const cacheNames = await self.caches.keys();\n const cacheNamesToDelete = cacheNames.filter((cacheName) => {\n return (cacheName.includes(substringToFind) &&\n cacheName.includes(self.registration.scope) &&\n cacheName !== currentPrecacheName);\n });\n await Promise.all(cacheNamesToDelete.map((cacheName) => self.caches.delete(cacheName)));\n return cacheNamesToDelete;\n};\nexport { deleteOutdatedCaches };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { deleteOutdatedCaches } from './utils/deleteOutdatedCaches.js';\nimport './_version.js';\n/**\n * Adds an `activate` event listener which will clean up incompatible\n * precaches that were created by older versions of Workbox.\n *\n * @memberof workbox-precaching\n */\nfunction cleanupOutdatedCaches() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('activate', ((event) => {\n const cacheName = cacheNames.getPrecacheName();\n event.waitUntil(deleteOutdatedCaches(cacheName).then((cachesDeleted) => {\n if (process.env.NODE_ENV !== 'production') {\n if (cachesDeleted.length > 0) {\n logger.log(`The following out-of-date precaches were cleaned up ` +\n `automatically:`, cachesDeleted);\n }\n }\n }));\n }));\n}\nexport { cleanupOutdatedCaches };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Helper function that calls\n * {@link PrecacheController#createHandlerBoundToURL} on the default\n * {@link PrecacheController} instance.\n *\n * If you are creating your own {@link PrecacheController}, then call the\n * {@link PrecacheController#createHandlerBoundToURL} on that instance,\n * instead of using this function.\n *\n * @param {string} url The precached URL which will be used to lookup the\n * `Response`.\n * @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the\n * response from the network if there's a precache miss.\n * @return {workbox-routing~handlerCallback}\n *\n * @memberof workbox-precaching\n */\nfunction createHandlerBoundToURL(url) {\n const precacheController = getOrCreatePrecacheController();\n return precacheController.createHandlerBoundToURL(url);\n}\nexport { createHandlerBoundToURL };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Takes in a URL, and returns the corresponding URL that could be used to\n * lookup the entry in the precache.\n *\n * If a relative URL is provided, the location of the service worker file will\n * be used as the base.\n *\n * For precached entries without revision information, the cache key will be the\n * same as the original URL.\n *\n * For precached entries with revision information, the cache key will be the\n * original URL with the addition of a query parameter used for keeping track of\n * the revision info.\n *\n * @param {string} url The URL whose cache key to look up.\n * @return {string} The cache key that corresponds to that URL.\n *\n * @memberof workbox-precaching\n */\nfunction getCacheKeyForURL(url) {\n const precacheController = getOrCreatePrecacheController();\n return precacheController.getCacheKeyForURL(url);\n}\nexport { getCacheKeyForURL };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Helper function that calls\n * {@link PrecacheController#matchPrecache} on the default\n * {@link PrecacheController} instance.\n *\n * If you are creating your own {@link PrecacheController}, then call\n * {@link PrecacheController#matchPrecache} on that instance,\n * instead of using this function.\n *\n * @param {string|Request} request The key (without revisioning parameters)\n * to look up in the precache.\n * @return {Promise}\n *\n * @memberof workbox-precaching\n */\nfunction matchPrecache(request) {\n const precacheController = getOrCreatePrecacheController();\n return precacheController.matchPrecache(request);\n}\nexport { matchPrecache };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * {@link workbox-core.cacheNames|\"precache cache\"} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * Please note: This method **will not** serve any of the cached files for you.\n * It only precaches files. To respond to a network request you call\n * {@link workbox-precaching.addRoute}.\n *\n * If you have a single array of files to precache, you can just call\n * {@link workbox-precaching.precacheAndRoute}.\n *\n * @param {Array} [entries=[]] Array of entries to precache.\n *\n * @memberof workbox-precaching\n */\nfunction precache(entries) {\n const precacheController = getOrCreatePrecacheController();\n precacheController.precache(entries);\n}\nexport { precache };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { addRoute } from './addRoute.js';\nimport { precache } from './precache.js';\nimport './_version.js';\n/**\n * This method will add entries to the precache list and add a route to\n * respond to fetch events.\n *\n * This is a convenience method that will call\n * {@link workbox-precaching.precache} and\n * {@link workbox-precaching.addRoute} in a single call.\n *\n * @param {Array} entries Array of entries to precache.\n * @param {Object} [options] See the\n * {@link workbox-precaching.PrecacheRoute} options.\n *\n * @memberof workbox-precaching\n */\nfunction precacheAndRoute(entries, options) {\n precache(entries);\n addRoute(options);\n}\nexport { precacheAndRoute };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * `PrecacheFallbackPlugin` allows you to specify an \"offline fallback\"\n * response to be used when a given strategy is unable to generate a response.\n *\n * It does this by intercepting the `handlerDidError` plugin callback\n * and returning a precached response, taking the expected revision parameter\n * into account automatically.\n *\n * Unless you explicitly pass in a `PrecacheController` instance to the\n * constructor, the default instance will be used. Generally speaking, most\n * developers will end up using the default.\n *\n * @memberof workbox-precaching\n */\nclass PrecacheFallbackPlugin {\n /**\n * Constructs a new PrecacheFallbackPlugin with the associated fallbackURL.\n *\n * @param {Object} config\n * @param {string} config.fallbackURL A precached URL to use as the fallback\n * if the associated strategy can't generate a response.\n * @param {PrecacheController} [config.precacheController] An optional\n * PrecacheController instance. If not provided, the default\n * PrecacheController will be used.\n */\n constructor({ fallbackURL, precacheController, }) {\n /**\n * @return {Promise} The precache response for the fallback URL.\n *\n * @private\n */\n this.handlerDidError = () => this._precacheController.matchPrecache(this._fallbackURL);\n this._fallbackURL = fallbackURL;\n this._precacheController =\n precacheController || getOrCreatePrecacheController();\n }\n}\nexport { PrecacheFallbackPlugin };\n"],"names":["self","_","e","REVISION_SEARCH_PARAM","createCacheKey","entry","WorkboxError","urlObject","URL","location","href","cacheKey","url","revision","cacheKeyURL","originalURL","searchParams","set","PrecacheInstallReportPlugin","constructor","updatedURLs","notUpdatedURLs","handlerWillStart","request","state","originalRequest","cachedResponseWillBeUsed","event","cachedResponse","type","Request","push","PrecacheCacheKeyPlugin","precacheController","cacheKeyWillBeUsed","params","_precacheController","getCacheKeyForURL","headers","logGroup","groupTitle","deletedURLs","logger","groupCollapsed","log","groupEnd","printCleanupDetails","deletionCount","length","_nestedGroup","urls","printInstallDetails","urlsToPrecache","urlsAlreadyPrecached","precachedCount","alreadyPrecachedCount","message","PrecacheStrategy","Strategy","options","cacheName","cacheNames","getPrecacheName","_fallbackToNetwork","fallbackToNetwork","plugins","copyRedirectedCacheableResponsesPlugin","_handle","handler","response","cacheMatch","_handleInstall","_handleFetch","warn","getFriendlyURL","integrityInManifest","integrity","integrityInRequest","noIntegrityConflict","fetch","mode","undefined","_useDefaultCacheabilityPluginIfNeeded","wasCached","cachePut","clone","getCacheKey","status","defaultPluginIndex","cacheWillUpdatePluginCount","index","plugin","entries","defaultPrecacheCacheabilityPlugin","cacheWillUpdate","splice","redirected","copyResponse","PrecacheController","_urlsToCacheKeys","Map","_urlsToCacheModes","_cacheKeysToIntegrities","_strategy","install","bind","activate","strategy","precache","addToCacheList","_installAndActiveListenersAdded","addEventListener","assert","isArray","moduleName","className","funcName","paramName","urlsToWarnAbout","cacheMode","has","get","firstEntry","secondEntry","warningMessage","join","waitUntil","installReportPlugin","cache","credentials","Promise","all","handleAll","caches","open","currentlyCachedRequests","keys","expectedCacheKeys","Set","values","delete","getURLsToCacheKeys","getCachedURLs","getIntegrityForCacheKey","matchPrecache","match","createHandlerBoundToURL","Object","assign","handle","getOrCreatePrecacheController","addPlugins","removeIgnoredSearchParams","ignoreURLParametersMatching","some","regExp","test","generateURLVariations","directoryIndex","cleanURLs","urlManipulation","hash","urlWithoutIgnoredParams","pathname","endsWith","directoryURL","cleanURL","additionalURLs","urlToAttempt","PrecacheRoute","Route","urlsToCacheKeys","possibleURL","debug","addRoute","precacheRoute","registerRoute","SUBSTRING_TO_FIND","deleteOutdatedCaches","currentPrecacheName","substringToFind","cacheNamesToDelete","filter","includes","registration","scope","map","cleanupOutdatedCaches","then","cachesDeleted","precacheAndRoute","PrecacheFallbackPlugin","fallbackURL","handlerDidError","_fallbackURL"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,0BAA0B,CAAC,IAAIC,CAAC,EAAE;IAC3C,CAAC,CACD,OAAOC,C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ACA;IACA;IACA;IACA;IACA;IACA;IACA,SAASqF,QAAQA,CAAChB,OAAO,EAAE;IACvB,EAAA,MAAM3D,kBAAkB,GAAGqH,6BAA6B,EAAE;IAC1DrH,EAAAA,kBAAkB,CAAC2E,QAAQ,CAAChB,OAAO,CAAC;IACxC;;IC/BA;IACA;;IAEA;IACA;IACA;IACA;IAIA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,SAASkG,gBAAgBA,CAAClG,OAAO,EAAEjC,OAAO,EAAE;MACxCiD,QAAQ,CAAChB,OAAO,CAAC;MACjBkF,QAAQ,CAACnH,OAAO,CAAC;IACrB;;IC3BA;IACA;;IAEA;IACA;IACA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAMoI,sBAAsB,CAAC;IACzB;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACI5K,EAAAA,WAAWA,CAAC;QAAE6K,WAAW;IAAE/J,IAAAA;IAAoB,GAAC,EAAE;IAC9C;IACR;IACA;IACA;IACA;IACQ,IAAA,IAAI,CAACgK,eAAe,GAAG,MAAM,IAAI,CAAC7J,mBAAmB,CAAC4G,aAAa,CAAC,IAAI,CAACkD,YAAY,CAAC;QACtF,IAAI,CAACA,YAAY,GAAGF,WAAW;IAC/B,IAAA,IAAI,CAAC5J,mBAAmB,GACpBH,kBAAkB,IAAIqH,6BAA6B,EAAE;IAC7D,EAAA;IACJ;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-precaching.prod.js b/docs/workbox-v7.4.1/workbox-precaching.prod.js deleted file mode 100644 index 9e90d8cd..00000000 --- a/docs/workbox-v7.4.1/workbox-precaching.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.precaching=function(t,e,s,n,i,c,r,o){"use strict";try{self["workbox:precaching:7.4.0"]&&_()}catch(t){}function a(t){if(!t)throw new s.WorkboxError("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s.WorkboxError("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),c=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:c.href}}class h{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class l{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.U.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.U=t}}class u extends c.Strategy{constructor(t={}){t.cacheName=e.cacheNames.getPrecacheName(t.cacheName),super(t),this.K=!1!==t.fallbackToNetwork,this.plugins.push(u.copyRedirectedCacheableResponsesPlugin)}async _handle(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.T(t,e):await this.I(t,e))}async I(t,e){let n;const i=e.params||{};if(!this.K)throw new s.WorkboxError("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,c=t.integrity,r=!c||c===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?c||s:void 0})),s&&r&&"no-cors"!==t.mode&&(this.P(),await e.cachePut(t,n.clone()))}return n}async T(t,e){this.P();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s.WorkboxError("bad-precaching-response",{url:t.url,status:n.status});return n}P(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==u.copyRedirectedCacheableResponsesPlugin&&(n===u.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(u.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}u.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},u.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await i.copyResponse(t):t};class f{constructor({cacheName:t,plugins:s=[],fallbackToNetwork:n=!0}={}){this.F=new Map,this.B=new Map,this.S=new Map,this.u=new u({cacheName:e.cacheNames.getPrecacheName(t),plugins:[...s,new l({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.u}precache(t){this.addToCacheList(t),this.$||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.$=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=a(n),c="string"!=typeof n&&n.revision?"reload":"default";if(this.F.has(i)&&this.F.get(i)!==t)throw new s.WorkboxError("add-to-cache-list-conflicting-entries",{firstEntry:this.F.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.S.has(t)&&this.S.get(t)!==n.integrity)throw new s.WorkboxError("add-to-cache-list-conflicting-integrities",{url:i});this.S.set(t,n.integrity)}if(this.F.set(i,t),this.B.set(i,c),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return n.waitUntil(t,(async()=>{const e=new h;this.strategy.plugins.push(e);for(const[e,s]of this.F){const n=this.S.get(s),i=this.B.get(e),c=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:c,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return n.waitUntil(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.F.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.F}getCachedURLs(){return[...this.F.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.F.get(e.href)}getIntegrityForCacheKey(t){return this.S.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s.WorkboxError("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let w;const d=()=>(w||(w=new f),w);class y extends o.Route{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const c=new URL(t,location.href);c.hash="",yield c.href;const r=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(c,e);if(yield r.href,s&&r.pathname.endsWith("/")){const t=new URL(r.href);t.pathname+=s,yield t.href}if(n){const t=new URL(r.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:c});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}function p(t){const e=d(),s=new y(e,t);r.registerRoute(s)}function R(t){d().precache(t)}return t.PrecacheController=f,t.PrecacheFallbackPlugin=class{constructor({fallbackURL:t,precacheController:e}){this.handlerDidError=()=>this.U.matchPrecache(this.D),this.D=t,this.U=e||d()}},t.PrecacheRoute=y,t.PrecacheStrategy=u,t.addPlugins=function(t){d().strategy.plugins.push(...t)},t.addRoute=p,t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const s=e.cacheNames.getPrecacheName();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(s).then((t=>{})))}))},t.createHandlerBoundToURL=function(t){return d().createHandlerBoundToURL(t)},t.getCacheKeyForURL=function(t){return d().getCacheKeyForURL(t)},t.matchPrecache=function(t){return d().matchPrecache(t)},t.precache=R,t.precacheAndRoute=function(t,e){R(t),p(e)},t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core,workbox.strategies,workbox.routing,workbox.routing); -//# sourceMappingURL=workbox-precaching.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-precaching.prod.js.map b/docs/workbox-v7.4.1/workbox-precaching.prod.js.map deleted file mode 100644 index a975e28d..00000000 --- a/docs/workbox-v7.4.1/workbox-precaching.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-precaching.prod.js","sources":["../_version.js","../utils/createCacheKey.js","../utils/PrecacheInstallReportPlugin.js","../utils/PrecacheCacheKeyPlugin.js","../PrecacheStrategy.js","../PrecacheController.js","../utils/getOrCreatePrecacheController.js","../PrecacheRoute.js","../utils/generateURLVariations.js","../utils/removeIgnoredSearchParams.js","../addRoute.js","../precache.js","../PrecacheFallbackPlugin.js","../addPlugins.js","../cleanupOutdatedCaches.js","../utils/deleteOutdatedCaches.js","../createHandlerBoundToURL.js","../getCacheKeyForURL.js","../matchPrecache.js","../precacheAndRoute.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:precaching:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport '../_version.js';\n// Name of the search parameter used to store revision info.\nconst REVISION_SEARCH_PARAM = '__WB_REVISION__';\n/**\n * Converts a manifest entry into a versioned URL suitable for precaching.\n *\n * @param {Object|string} entry\n * @return {string} A URL with versioning info.\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function createCacheKey(entry) {\n if (!entry) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', { entry });\n }\n // If a precache manifest entry is a string, it's assumed to be a versioned\n // URL, like '/app.abcd1234.js'. Return as-is.\n if (typeof entry === 'string') {\n const urlObject = new URL(entry, location.href);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n const { revision, url } = entry;\n if (!url) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', { entry });\n }\n // If there's just a URL and no revision, then it's also assumed to be a\n // versioned URL.\n if (!revision) {\n const urlObject = new URL(url, location.href);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n // Otherwise, construct a properly versioned URL using the custom Workbox\n // search parameter along with the revision info.\n const cacheKeyURL = new URL(url, location.href);\n const originalURL = new URL(url, location.href);\n cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision);\n return {\n cacheKey: cacheKeyURL.href,\n url: originalURL.href,\n };\n}\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A plugin, designed to be used with PrecacheController, to determine the\n * of assets that were updated (or not updated) during the install event.\n *\n * @private\n */\nclass PrecacheInstallReportPlugin {\n constructor() {\n this.updatedURLs = [];\n this.notUpdatedURLs = [];\n this.handlerWillStart = async ({ request, state, }) => {\n // TODO: `state` should never be undefined...\n if (state) {\n state.originalRequest = request;\n }\n };\n this.cachedResponseWillBeUsed = async ({ event, state, cachedResponse, }) => {\n if (event.type === 'install') {\n if (state &&\n state.originalRequest &&\n state.originalRequest instanceof Request) {\n // TODO: `state` should never be undefined...\n const url = state.originalRequest.url;\n if (cachedResponse) {\n this.notUpdatedURLs.push(url);\n }\n else {\n this.updatedURLs.push(url);\n }\n }\n }\n return cachedResponse;\n };\n }\n}\nexport { PrecacheInstallReportPlugin };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A plugin, designed to be used with PrecacheController, to translate URLs into\n * the corresponding cache key, based on the current revision info.\n *\n * @private\n */\nclass PrecacheCacheKeyPlugin {\n constructor({ precacheController }) {\n this.cacheKeyWillBeUsed = async ({ request, params, }) => {\n // Params is type any, can't change right now.\n /* eslint-disable */\n const cacheKey = (params === null || params === void 0 ? void 0 : params.cacheKey) ||\n this._precacheController.getCacheKeyForURL(request.url);\n /* eslint-enable */\n return cacheKey\n ? new Request(cacheKey, { headers: request.headers })\n : request;\n };\n this._precacheController = precacheController;\n }\n}\nexport { PrecacheCacheKeyPlugin };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { copyResponse } from 'workbox-core/copyResponse.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from 'workbox-strategies/Strategy.js';\nimport './_version.js';\n/**\n * A {@link workbox-strategies.Strategy} implementation\n * specifically designed to work with\n * {@link workbox-precaching.PrecacheController}\n * to both cache and fetch precached assets.\n *\n * Note: an instance of this class is created automatically when creating a\n * `PrecacheController`; it's generally not necessary to create this yourself.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-precaching\n */\nclass PrecacheStrategy extends Strategy {\n /**\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] {@link https://developers.google.com/web/tools/workbox/guides/using-plugins|Plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters|init}\n * of all fetch() requests made by this strategy.\n * @param {Object} [options.matchOptions] The\n * {@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions|CacheQueryOptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to\n * get the response from the network if there's a precache miss.\n */\n constructor(options = {}) {\n options.cacheName = cacheNames.getPrecacheName(options.cacheName);\n super(options);\n this._fallbackToNetwork =\n options.fallbackToNetwork === false ? false : true;\n // Redirected responses cannot be used to satisfy a navigation request, so\n // any redirected response must be \"copied\" rather than cloned, so the new\n // response doesn't contain the `redirected` flag. See:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=669363&desc=2#c1\n this.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin);\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n const response = await handler.cacheMatch(request);\n if (response) {\n return response;\n }\n // If this is an `install` event for an entry that isn't already cached,\n // then populate the cache.\n if (handler.event && handler.event.type === 'install') {\n return await this._handleInstall(request, handler);\n }\n // Getting here means something went wrong. An entry that should have been\n // precached wasn't found in the cache.\n return await this._handleFetch(request, handler);\n }\n async _handleFetch(request, handler) {\n let response;\n const params = (handler.params || {});\n // Fall back to the network if we're configured to do so.\n if (this._fallbackToNetwork) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`The precached response for ` +\n `${getFriendlyURL(request.url)} in ${this.cacheName} was not ` +\n `found. Falling back to the network.`);\n }\n const integrityInManifest = params.integrity;\n const integrityInRequest = request.integrity;\n const noIntegrityConflict = !integrityInRequest || integrityInRequest === integrityInManifest;\n // Do not add integrity if the original request is no-cors\n // See https://github.com/GoogleChrome/workbox/issues/3096\n response = await handler.fetch(new Request(request, {\n integrity: request.mode !== 'no-cors'\n ? integrityInRequest || integrityInManifest\n : undefined,\n }));\n // It's only \"safe\" to repair the cache if we're using SRI to guarantee\n // that the response matches the precache manifest's expectations,\n // and there's either a) no integrity property in the incoming request\n // or b) there is an integrity, and it matches the precache manifest.\n // See https://github.com/GoogleChrome/workbox/issues/2858\n // Also if the original request users no-cors we don't use integrity.\n // See https://github.com/GoogleChrome/workbox/issues/3096\n if (integrityInManifest &&\n noIntegrityConflict &&\n request.mode !== 'no-cors') {\n this._useDefaultCacheabilityPluginIfNeeded();\n const wasCached = await handler.cachePut(request, response.clone());\n if (process.env.NODE_ENV !== 'production') {\n if (wasCached) {\n logger.log(`A response for ${getFriendlyURL(request.url)} ` +\n `was used to \"repair\" the precache.`);\n }\n }\n }\n }\n else {\n // This shouldn't normally happen, but there are edge cases:\n // https://github.com/GoogleChrome/workbox/issues/1441\n throw new WorkboxError('missing-precache-entry', {\n cacheName: this.cacheName,\n url: request.url,\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n const cacheKey = params.cacheKey || (await handler.getCacheKey(request, 'read'));\n // Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Precaching is responding to: ` + getFriendlyURL(request.url));\n logger.log(`Serving the precached url: ${getFriendlyURL(cacheKey instanceof Request ? cacheKey.url : cacheKey)}`);\n logger.groupCollapsed(`View request details here.`);\n logger.log(request);\n logger.groupEnd();\n logger.groupCollapsed(`View response details here.`);\n logger.log(response);\n logger.groupEnd();\n logger.groupEnd();\n }\n return response;\n }\n async _handleInstall(request, handler) {\n this._useDefaultCacheabilityPluginIfNeeded();\n const response = await handler.fetch(request);\n // Make sure we defer cachePut() until after we know the response\n // should be cached; see https://github.com/GoogleChrome/workbox/issues/2737\n const wasCached = await handler.cachePut(request, response.clone());\n if (!wasCached) {\n // Throwing here will lead to the `install` handler failing, which\n // we want to do if *any* of the responses aren't safe to cache.\n throw new WorkboxError('bad-precaching-response', {\n url: request.url,\n status: response.status,\n });\n }\n return response;\n }\n /**\n * This method is complex, as there a number of things to account for:\n *\n * The `plugins` array can be set at construction, and/or it might be added to\n * to at any time before the strategy is used.\n *\n * At the time the strategy is used (i.e. during an `install` event), there\n * needs to be at least one plugin that implements `cacheWillUpdate` in the\n * array, other than `copyRedirectedCacheableResponsesPlugin`.\n *\n * - If this method is called and there are no suitable `cacheWillUpdate`\n * plugins, we need to add `defaultPrecacheCacheabilityPlugin`.\n *\n * - If this method is called and there is exactly one `cacheWillUpdate`, then\n * we don't have to do anything (this might be a previously added\n * `defaultPrecacheCacheabilityPlugin`, or it might be a custom plugin).\n *\n * - If this method is called and there is more than one `cacheWillUpdate`,\n * then we need to check if one is `defaultPrecacheCacheabilityPlugin`. If so,\n * we need to remove it. (This situation is unlikely, but it could happen if\n * the strategy is used multiple times, the first without a `cacheWillUpdate`,\n * and then later on after manually adding a custom `cacheWillUpdate`.)\n *\n * See https://github.com/GoogleChrome/workbox/issues/2737 for more context.\n *\n * @private\n */\n _useDefaultCacheabilityPluginIfNeeded() {\n let defaultPluginIndex = null;\n let cacheWillUpdatePluginCount = 0;\n for (const [index, plugin] of this.plugins.entries()) {\n // Ignore the copy redirected plugin when determining what to do.\n if (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) {\n continue;\n }\n // Save the default plugin's index, in case it needs to be removed.\n if (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) {\n defaultPluginIndex = index;\n }\n if (plugin.cacheWillUpdate) {\n cacheWillUpdatePluginCount++;\n }\n }\n if (cacheWillUpdatePluginCount === 0) {\n this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin);\n }\n else if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) {\n // Only remove the default plugin; multiple custom plugins are allowed.\n this.plugins.splice(defaultPluginIndex, 1);\n }\n // Nothing needs to be done if cacheWillUpdatePluginCount is 1\n }\n}\nPrecacheStrategy.defaultPrecacheCacheabilityPlugin = {\n async cacheWillUpdate({ response }) {\n if (!response || response.status >= 400) {\n return null;\n }\n return response;\n },\n};\nPrecacheStrategy.copyRedirectedCacheableResponsesPlugin = {\n async cacheWillUpdate({ response }) {\n return response.redirected ? await copyResponse(response) : response;\n },\n};\nexport { PrecacheStrategy };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { waitUntil } from 'workbox-core/_private/waitUntil.js';\nimport { createCacheKey } from './utils/createCacheKey.js';\nimport { PrecacheInstallReportPlugin } from './utils/PrecacheInstallReportPlugin.js';\nimport { PrecacheCacheKeyPlugin } from './utils/PrecacheCacheKeyPlugin.js';\nimport { printCleanupDetails } from './utils/printCleanupDetails.js';\nimport { printInstallDetails } from './utils/printInstallDetails.js';\nimport { PrecacheStrategy } from './PrecacheStrategy.js';\nimport './_version.js';\n/**\n * Performs efficient precaching of assets.\n *\n * @memberof workbox-precaching\n */\nclass PrecacheController {\n /**\n * Create a new PrecacheController.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] The cache to use for precaching.\n * @param {string} [options.plugins] Plugins to use when precaching as well\n * as responding to fetch events for precached assets.\n * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to\n * get the response from the network if there's a precache miss.\n */\n constructor({ cacheName, plugins = [], fallbackToNetwork = true, } = {}) {\n this._urlsToCacheKeys = new Map();\n this._urlsToCacheModes = new Map();\n this._cacheKeysToIntegrities = new Map();\n this._strategy = new PrecacheStrategy({\n cacheName: cacheNames.getPrecacheName(cacheName),\n plugins: [\n ...plugins,\n new PrecacheCacheKeyPlugin({ precacheController: this }),\n ],\n fallbackToNetwork,\n });\n // Bind the install and activate methods to the instance.\n this.install = this.install.bind(this);\n this.activate = this.activate.bind(this);\n }\n /**\n * @type {workbox-precaching.PrecacheStrategy} The strategy created by this controller and\n * used to cache assets and respond to fetch events.\n */\n get strategy() {\n return this._strategy;\n }\n /**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * {@link workbox-core.cacheNames|\"precache cache\"} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * @param {Array} [entries=[]] Array of entries to precache.\n */\n precache(entries) {\n this.addToCacheList(entries);\n if (!this._installAndActiveListenersAdded) {\n self.addEventListener('install', this.install);\n self.addEventListener('activate', this.activate);\n this._installAndActiveListenersAdded = true;\n }\n }\n /**\n * This method will add items to the precache list, removing duplicates\n * and ensuring the information is valid.\n *\n * @param {Array} entries\n * Array of entries to precache.\n */\n addToCacheList(entries) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(entries, {\n moduleName: 'workbox-precaching',\n className: 'PrecacheController',\n funcName: 'addToCacheList',\n paramName: 'entries',\n });\n }\n const urlsToWarnAbout = [];\n for (const entry of entries) {\n // See https://github.com/GoogleChrome/workbox/issues/2259\n if (typeof entry === 'string') {\n urlsToWarnAbout.push(entry);\n }\n else if (entry && entry.revision === undefined) {\n urlsToWarnAbout.push(entry.url);\n }\n const { cacheKey, url } = createCacheKey(entry);\n const cacheMode = typeof entry !== 'string' && entry.revision ? 'reload' : 'default';\n if (this._urlsToCacheKeys.has(url) &&\n this._urlsToCacheKeys.get(url) !== cacheKey) {\n throw new WorkboxError('add-to-cache-list-conflicting-entries', {\n firstEntry: this._urlsToCacheKeys.get(url),\n secondEntry: cacheKey,\n });\n }\n if (typeof entry !== 'string' && entry.integrity) {\n if (this._cacheKeysToIntegrities.has(cacheKey) &&\n this._cacheKeysToIntegrities.get(cacheKey) !== entry.integrity) {\n throw new WorkboxError('add-to-cache-list-conflicting-integrities', {\n url,\n });\n }\n this._cacheKeysToIntegrities.set(cacheKey, entry.integrity);\n }\n this._urlsToCacheKeys.set(url, cacheKey);\n this._urlsToCacheModes.set(url, cacheMode);\n if (urlsToWarnAbout.length > 0) {\n const warningMessage = `Workbox is precaching URLs without revision ` +\n `info: ${urlsToWarnAbout.join(', ')}\\nThis is generally NOT safe. ` +\n `Learn more at https://bit.ly/wb-precache`;\n if (process.env.NODE_ENV === 'production') {\n // Use console directly to display this warning without bloating\n // bundle sizes by pulling in all of the logger codebase in prod.\n console.warn(warningMessage);\n }\n else {\n logger.warn(warningMessage);\n }\n }\n }\n }\n /**\n * Precaches new and updated assets. Call this method from the service worker\n * install event.\n *\n * Note: this method calls `event.waitUntil()` for you, so you do not need\n * to call it yourself in your event handlers.\n *\n * @param {ExtendableEvent} event\n * @return {Promise}\n */\n install(event) {\n // waitUntil returns Promise\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return waitUntil(event, async () => {\n const installReportPlugin = new PrecacheInstallReportPlugin();\n this.strategy.plugins.push(installReportPlugin);\n // Cache entries one at a time.\n // See https://github.com/GoogleChrome/workbox/issues/2528\n for (const [url, cacheKey] of this._urlsToCacheKeys) {\n const integrity = this._cacheKeysToIntegrities.get(cacheKey);\n const cacheMode = this._urlsToCacheModes.get(url);\n const request = new Request(url, {\n integrity,\n cache: cacheMode,\n credentials: 'same-origin',\n });\n await Promise.all(this.strategy.handleAll({\n params: { cacheKey },\n request,\n event,\n }));\n }\n const { updatedURLs, notUpdatedURLs } = installReportPlugin;\n if (process.env.NODE_ENV !== 'production') {\n printInstallDetails(updatedURLs, notUpdatedURLs);\n }\n return { updatedURLs, notUpdatedURLs };\n });\n }\n /**\n * Deletes assets that are no longer present in the current precache manifest.\n * Call this method from the service worker activate event.\n *\n * Note: this method calls `event.waitUntil()` for you, so you do not need\n * to call it yourself in your event handlers.\n *\n * @param {ExtendableEvent} event\n * @return {Promise}\n */\n activate(event) {\n // waitUntil returns Promise\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return waitUntil(event, async () => {\n const cache = await self.caches.open(this.strategy.cacheName);\n const currentlyCachedRequests = await cache.keys();\n const expectedCacheKeys = new Set(this._urlsToCacheKeys.values());\n const deletedURLs = [];\n for (const request of currentlyCachedRequests) {\n if (!expectedCacheKeys.has(request.url)) {\n await cache.delete(request);\n deletedURLs.push(request.url);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n printCleanupDetails(deletedURLs);\n }\n return { deletedURLs };\n });\n }\n /**\n * Returns a mapping of a precached URL to the corresponding cache key, taking\n * into account the revision information for the URL.\n *\n * @return {Map} A URL to cache key mapping.\n */\n getURLsToCacheKeys() {\n return this._urlsToCacheKeys;\n }\n /**\n * Returns a list of all the URLs that have been precached by the current\n * service worker.\n *\n * @return {Array} The precached URLs.\n */\n getCachedURLs() {\n return [...this._urlsToCacheKeys.keys()];\n }\n /**\n * Returns the cache key used for storing a given URL. If that URL is\n * unversioned, like `/index.html', then the cache key will be the original\n * URL with a search parameter appended to it.\n *\n * @param {string} url A URL whose cache key you want to look up.\n * @return {string} The versioned URL that corresponds to a cache key\n * for the original URL, or undefined if that URL isn't precached.\n */\n getCacheKeyForURL(url) {\n const urlObject = new URL(url, location.href);\n return this._urlsToCacheKeys.get(urlObject.href);\n }\n /**\n * @param {string} url A cache key whose SRI you want to look up.\n * @return {string} The subresource integrity associated with the cache key,\n * or undefined if it's not set.\n */\n getIntegrityForCacheKey(cacheKey) {\n return this._cacheKeysToIntegrities.get(cacheKey);\n }\n /**\n * This acts as a drop-in replacement for\n * [`cache.match()`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)\n * with the following differences:\n *\n * - It knows what the name of the precache is, and only checks in that cache.\n * - It allows you to pass in an \"original\" URL without versioning parameters,\n * and it will automatically look up the correct cache key for the currently\n * active revision of that URL.\n *\n * E.g., `matchPrecache('index.html')` will find the correct precached\n * response for the currently active service worker, even if the actual cache\n * key is `'/index.html?__WB_REVISION__=1234abcd'`.\n *\n * @param {string|Request} request The key (without revisioning parameters)\n * to look up in the precache.\n * @return {Promise}\n */\n async matchPrecache(request) {\n const url = request instanceof Request ? request.url : request;\n const cacheKey = this.getCacheKeyForURL(url);\n if (cacheKey) {\n const cache = await self.caches.open(this.strategy.cacheName);\n return cache.match(cacheKey);\n }\n return undefined;\n }\n /**\n * Returns a function that looks up `url` in the precache (taking into\n * account revision information), and returns the corresponding `Response`.\n *\n * @param {string} url The precached URL which will be used to lookup the\n * `Response`.\n * @return {workbox-routing~handlerCallback}\n */\n createHandlerBoundToURL(url) {\n const cacheKey = this.getCacheKeyForURL(url);\n if (!cacheKey) {\n throw new WorkboxError('non-precached-url', { url });\n }\n return (options) => {\n options.request = new Request(url);\n options.params = Object.assign({ cacheKey }, options.params);\n return this.strategy.handle(options);\n };\n }\n}\nexport { PrecacheController };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { PrecacheController } from '../PrecacheController.js';\nimport '../_version.js';\nlet precacheController;\n/**\n * @return {PrecacheController}\n * @private\n */\nexport const getOrCreatePrecacheController = () => {\n if (!precacheController) {\n precacheController = new PrecacheController();\n }\n return precacheController;\n};\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { Route } from 'workbox-routing/Route.js';\nimport { generateURLVariations } from './utils/generateURLVariations.js';\nimport './_version.js';\n/**\n * A subclass of {@link workbox-routing.Route} that takes a\n * {@link workbox-precaching.PrecacheController}\n * instance and uses it to match incoming requests and handle fetching\n * responses from the precache.\n *\n * @memberof workbox-precaching\n * @extends workbox-routing.Route\n */\nclass PrecacheRoute extends Route {\n /**\n * @param {PrecacheController} precacheController A `PrecacheController`\n * instance used to both match requests and respond to fetch events.\n * @param {Object} [options] Options to control how requests are matched\n * against the list of precached URLs.\n * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will\n * check cache entries for a URLs ending with '/' to see if there is a hit when\n * appending the `directoryIndex` value.\n * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/, /^fbclid$/]] An\n * array of regex's to remove search params when looking for a cache match.\n * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will\n * check the cache for the URL with a `.html` added to the end of the end.\n * @param {workbox-precaching~urlManipulation} [options.urlManipulation]\n * This is a function that should take a URL and return an array of\n * alternative URLs that should be checked for precache matches.\n */\n constructor(precacheController, options) {\n const match = ({ request, }) => {\n const urlsToCacheKeys = precacheController.getURLsToCacheKeys();\n for (const possibleURL of generateURLVariations(request.url, options)) {\n const cacheKey = urlsToCacheKeys.get(possibleURL);\n if (cacheKey) {\n const integrity = precacheController.getIntegrityForCacheKey(cacheKey);\n return { cacheKey, integrity };\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Precaching did not find a match for ` + getFriendlyURL(request.url));\n }\n return;\n };\n super(match, precacheController.strategy);\n }\n}\nexport { PrecacheRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { removeIgnoredSearchParams } from './removeIgnoredSearchParams.js';\nimport '../_version.js';\n/**\n * Generator function that yields possible variations on the original URL to\n * check, one at a time.\n *\n * @param {string} url\n * @param {Object} options\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function* generateURLVariations(url, { ignoreURLParametersMatching = [/^utm_/, /^fbclid$/], directoryIndex = 'index.html', cleanURLs = true, urlManipulation, } = {}) {\n const urlObject = new URL(url, location.href);\n urlObject.hash = '';\n yield urlObject.href;\n const urlWithoutIgnoredParams = removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching);\n yield urlWithoutIgnoredParams.href;\n if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) {\n const directoryURL = new URL(urlWithoutIgnoredParams.href);\n directoryURL.pathname += directoryIndex;\n yield directoryURL.href;\n }\n if (cleanURLs) {\n const cleanURL = new URL(urlWithoutIgnoredParams.href);\n cleanURL.pathname += '.html';\n yield cleanURL.href;\n }\n if (urlManipulation) {\n const additionalURLs = urlManipulation({ url: urlObject });\n for (const urlToAttempt of additionalURLs) {\n yield urlToAttempt.href;\n }\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Removes any URL search parameters that should be ignored.\n *\n * @param {URL} urlObject The original URL.\n * @param {Array} ignoreURLParametersMatching RegExps to test against\n * each search parameter name. Matches mean that the search parameter should be\n * ignored.\n * @return {URL} The URL with any ignored search parameters removed.\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching = []) {\n // Convert the iterable into an array at the start of the loop to make sure\n // deletion doesn't mess up iteration.\n for (const paramName of [...urlObject.searchParams.keys()]) {\n if (ignoreURLParametersMatching.some((regExp) => regExp.test(paramName))) {\n urlObject.searchParams.delete(paramName);\n }\n }\n return urlObject;\n}\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport { PrecacheRoute } from './PrecacheRoute.js';\nimport './_version.js';\n/**\n * Add a `fetch` listener to the service worker that will\n * respond to\n * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}\n * with precached assets.\n *\n * Requests for assets that aren't precached, the `FetchEvent` will not be\n * responded to, allowing the event to fall through to other `fetch` event\n * listeners.\n *\n * @param {Object} [options] See the {@link workbox-precaching.PrecacheRoute}\n * options.\n *\n * @memberof workbox-precaching\n */\nfunction addRoute(options) {\n const precacheController = getOrCreatePrecacheController();\n const precacheRoute = new PrecacheRoute(precacheController, options);\n registerRoute(precacheRoute);\n}\nexport { addRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * {@link workbox-core.cacheNames|\"precache cache\"} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * Please note: This method **will not** serve any of the cached files for you.\n * It only precaches files. To respond to a network request you call\n * {@link workbox-precaching.addRoute}.\n *\n * If you have a single array of files to precache, you can just call\n * {@link workbox-precaching.precacheAndRoute}.\n *\n * @param {Array} [entries=[]] Array of entries to precache.\n *\n * @memberof workbox-precaching\n */\nfunction precache(entries) {\n const precacheController = getOrCreatePrecacheController();\n precacheController.precache(entries);\n}\nexport { precache };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * `PrecacheFallbackPlugin` allows you to specify an \"offline fallback\"\n * response to be used when a given strategy is unable to generate a response.\n *\n * It does this by intercepting the `handlerDidError` plugin callback\n * and returning a precached response, taking the expected revision parameter\n * into account automatically.\n *\n * Unless you explicitly pass in a `PrecacheController` instance to the\n * constructor, the default instance will be used. Generally speaking, most\n * developers will end up using the default.\n *\n * @memberof workbox-precaching\n */\nclass PrecacheFallbackPlugin {\n /**\n * Constructs a new PrecacheFallbackPlugin with the associated fallbackURL.\n *\n * @param {Object} config\n * @param {string} config.fallbackURL A precached URL to use as the fallback\n * if the associated strategy can't generate a response.\n * @param {PrecacheController} [config.precacheController] An optional\n * PrecacheController instance. If not provided, the default\n * PrecacheController will be used.\n */\n constructor({ fallbackURL, precacheController, }) {\n /**\n * @return {Promise} The precache response for the fallback URL.\n *\n * @private\n */\n this.handlerDidError = () => this._precacheController.matchPrecache(this._fallbackURL);\n this._fallbackURL = fallbackURL;\n this._precacheController =\n precacheController || getOrCreatePrecacheController();\n }\n}\nexport { PrecacheFallbackPlugin };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Adds plugins to the precaching strategy.\n *\n * @param {Array} plugins\n *\n * @memberof workbox-precaching\n */\nfunction addPlugins(plugins) {\n const precacheController = getOrCreatePrecacheController();\n precacheController.strategy.plugins.push(...plugins);\n}\nexport { addPlugins };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { deleteOutdatedCaches } from './utils/deleteOutdatedCaches.js';\nimport './_version.js';\n/**\n * Adds an `activate` event listener which will clean up incompatible\n * precaches that were created by older versions of Workbox.\n *\n * @memberof workbox-precaching\n */\nfunction cleanupOutdatedCaches() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('activate', ((event) => {\n const cacheName = cacheNames.getPrecacheName();\n event.waitUntil(deleteOutdatedCaches(cacheName).then((cachesDeleted) => {\n if (process.env.NODE_ENV !== 'production') {\n if (cachesDeleted.length > 0) {\n logger.log(`The following out-of-date precaches were cleaned up ` +\n `automatically:`, cachesDeleted);\n }\n }\n }));\n }));\n}\nexport { cleanupOutdatedCaches };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst SUBSTRING_TO_FIND = '-precache-';\n/**\n * Cleans up incompatible precaches that were created by older versions of\n * Workbox, by a service worker registered under the current scope.\n *\n * This is meant to be called as part of the `activate` event.\n *\n * This should be safe to use as long as you don't include `substringToFind`\n * (defaulting to `-precache-`) in your non-precache cache names.\n *\n * @param {string} currentPrecacheName The cache name currently in use for\n * precaching. This cache won't be deleted.\n * @param {string} [substringToFind='-precache-'] Cache names which include this\n * substring will be deleted (excluding `currentPrecacheName`).\n * @return {Array} A list of all the cache names that were deleted.\n *\n * @private\n * @memberof workbox-precaching\n */\nconst deleteOutdatedCaches = async (currentPrecacheName, substringToFind = SUBSTRING_TO_FIND) => {\n const cacheNames = await self.caches.keys();\n const cacheNamesToDelete = cacheNames.filter((cacheName) => {\n return (cacheName.includes(substringToFind) &&\n cacheName.includes(self.registration.scope) &&\n cacheName !== currentPrecacheName);\n });\n await Promise.all(cacheNamesToDelete.map((cacheName) => self.caches.delete(cacheName)));\n return cacheNamesToDelete;\n};\nexport { deleteOutdatedCaches };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Helper function that calls\n * {@link PrecacheController#createHandlerBoundToURL} on the default\n * {@link PrecacheController} instance.\n *\n * If you are creating your own {@link PrecacheController}, then call the\n * {@link PrecacheController#createHandlerBoundToURL} on that instance,\n * instead of using this function.\n *\n * @param {string} url The precached URL which will be used to lookup the\n * `Response`.\n * @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the\n * response from the network if there's a precache miss.\n * @return {workbox-routing~handlerCallback}\n *\n * @memberof workbox-precaching\n */\nfunction createHandlerBoundToURL(url) {\n const precacheController = getOrCreatePrecacheController();\n return precacheController.createHandlerBoundToURL(url);\n}\nexport { createHandlerBoundToURL };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Takes in a URL, and returns the corresponding URL that could be used to\n * lookup the entry in the precache.\n *\n * If a relative URL is provided, the location of the service worker file will\n * be used as the base.\n *\n * For precached entries without revision information, the cache key will be the\n * same as the original URL.\n *\n * For precached entries with revision information, the cache key will be the\n * original URL with the addition of a query parameter used for keeping track of\n * the revision info.\n *\n * @param {string} url The URL whose cache key to look up.\n * @return {string} The cache key that corresponds to that URL.\n *\n * @memberof workbox-precaching\n */\nfunction getCacheKeyForURL(url) {\n const precacheController = getOrCreatePrecacheController();\n return precacheController.getCacheKeyForURL(url);\n}\nexport { getCacheKeyForURL };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Helper function that calls\n * {@link PrecacheController#matchPrecache} on the default\n * {@link PrecacheController} instance.\n *\n * If you are creating your own {@link PrecacheController}, then call\n * {@link PrecacheController#matchPrecache} on that instance,\n * instead of using this function.\n *\n * @param {string|Request} request The key (without revisioning parameters)\n * to look up in the precache.\n * @return {Promise}\n *\n * @memberof workbox-precaching\n */\nfunction matchPrecache(request) {\n const precacheController = getOrCreatePrecacheController();\n return precacheController.matchPrecache(request);\n}\nexport { matchPrecache };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { addRoute } from './addRoute.js';\nimport { precache } from './precache.js';\nimport './_version.js';\n/**\n * This method will add entries to the precache list and add a route to\n * respond to fetch events.\n *\n * This is a convenience method that will call\n * {@link workbox-precaching.precache} and\n * {@link workbox-precaching.addRoute} in a single call.\n *\n * @param {Array} entries Array of entries to precache.\n * @param {Object} [options] See the\n * {@link workbox-precaching.PrecacheRoute} options.\n *\n * @memberof workbox-precaching\n */\nfunction precacheAndRoute(entries, options) {\n precache(entries);\n addRoute(options);\n}\nexport { precacheAndRoute };\n"],"names":["self","_","e","createCacheKey","entry","WorkboxError","urlObject","URL","location","href","cacheKey","url","revision","cacheKeyURL","originalURL","searchParams","set","PrecacheInstallReportPlugin","constructor","this","updatedURLs","notUpdatedURLs","handlerWillStart","async","request","state","originalRequest","cachedResponseWillBeUsed","event","cachedResponse","type","Request","push","PrecacheCacheKeyPlugin","precacheController","cacheKeyWillBeUsed","params","_precacheController","getCacheKeyForURL","headers","PrecacheStrategy","Strategy","options","cacheName","cacheNames","getPrecacheName","super","_fallbackToNetwork","fallbackToNetwork","plugins","copyRedirectedCacheableResponsesPlugin","handler","response","cacheMatch","_handleInstall","_handleFetch","integrityInManifest","integrity","integrityInRequest","noIntegrityConflict","fetch","mode","undefined","_useDefaultCacheabilityPluginIfNeeded","cachePut","clone","status","defaultPluginIndex","cacheWillUpdatePluginCount","index","plugin","entries","defaultPrecacheCacheabilityPlugin","cacheWillUpdate","splice","redirected","copyResponse","PrecacheController","_urlsToCacheKeys","Map","_urlsToCacheModes","_cacheKeysToIntegrities","_strategy","install","bind","activate","strategy","precache","addToCacheList","_installAndActiveListenersAdded","addEventListener","urlsToWarnAbout","cacheMode","has","get","firstEntry","secondEntry","length","warningMessage","join","console","warn","waitUntil","installReportPlugin","cache","credentials","Promise","all","handleAll","caches","open","currentlyCachedRequests","keys","expectedCacheKeys","Set","values","deletedURLs","delete","getURLsToCacheKeys","getCachedURLs","getIntegrityForCacheKey","match","createHandlerBoundToURL","Object","assign","handle","getOrCreatePrecacheController","PrecacheRoute","Route","urlsToCacheKeys","possibleURL","ignoreURLParametersMatching","directoryIndex","cleanURLs","urlManipulation","hash","urlWithoutIgnoredParams","paramName","some","regExp","test","removeIgnoredSearchParams","pathname","endsWith","directoryURL","cleanURL","additionalURLs","urlToAttempt","generateURLVariations","addRoute","precacheRoute","registerRoute","fallbackURL","handlerDidError","matchPrecache","_fallbackURL","currentPrecacheName","substringToFind","cacheNamesToDelete","filter","includes","registration","scope","map","deleteOutdatedCaches","then","cachesDeleted"],"mappings":"6FAEA,IACIA,KAAK,6BAA+BC,GACxC,CACA,MAAOC,GAAK,CCeL,SAASC,EAAeC,GAC3B,IAAKA,EACD,MAAM,IAAIC,EAAAA,aAAa,oCAAqC,CAAED,UAIlE,GAAqB,iBAAVA,EAAoB,CAC3B,MAAME,EAAY,IAAIC,IAAIH,EAAOI,SAASC,MAC1C,MAAO,CACHC,SAAUJ,EAAUG,KACpBE,IAAKL,EAAUG,KAEvB,CACA,MAAMG,SAAEA,EAAQD,IAAEA,GAAQP,EAC1B,IAAKO,EACD,MAAM,IAAIN,EAAAA,aAAa,oCAAqC,CAAED,UAIlE,IAAKQ,EAAU,CACX,MAAMN,EAAY,IAAIC,IAAII,EAAKH,SAASC,MACxC,MAAO,CACHC,SAAUJ,EAAUG,KACpBE,IAAKL,EAAUG,KAEvB,CAGA,MAAMI,EAAc,IAAIN,IAAII,EAAKH,SAASC,MACpCK,EAAc,IAAIP,IAAII,EAAKH,SAASC,MAE1C,OADAI,EAAYE,aAAaC,IAxCC,kBAwC0BJ,GAC7C,CACHF,SAAUG,EAAYJ,KACtBE,IAAKG,EAAYL,KAEzB,CCzCA,MAAMQ,EACFC,cACIC,KAAKC,YAAc,GACnBD,KAAKE,eAAiB,GACtBF,KAAKG,iBAAmBC,OAASC,UAASC,YAElCA,IACAA,EAAMC,gBAAkBF,EAC5B,EAEJL,KAAKQ,yBAA2BJ,OAASK,QAAOH,QAAOI,qBACnD,GAAmB,YAAfD,EAAME,MACFL,GACAA,EAAMC,iBACND,EAAMC,2BAA2BK,QAAS,CAE1C,MAAMpB,EAAMc,EAAMC,gBAAgBf,IAC9BkB,EACAV,KAAKE,eAAeW,KAAKrB,GAGzBQ,KAAKC,YAAYY,KAAKrB,EAE9B,CAEJ,OAAOkB,CAAc,CAE7B,EC3BJ,MAAMI,EACFf,aAAYgB,mBAAEA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docs/workbox-v7.4.1/workbox-range-requests.dev.js deleted file mode 100644 index 9225f006..00000000 --- a/docs/workbox-v7.4.1/workbox-range-requests.dev.js +++ /dev/null @@ -1,242 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.rangeRequests = (function (exports, WorkboxError_js, assert_js, logger_js) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:range-requests:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * @param {Blob} blob A source blob. - * @param {number} [start] The offset to use as the start of the - * slice. - * @param {number} [end] The offset to use as the end of the slice. - * @return {Object} An object with `start` and `end` properties, reflecting - * the effective boundaries to use given the size of the blob. - * - * @private - */ - function calculateEffectiveBoundaries(blob, start, end) { - { - assert_js.assert.isInstance(blob, Blob, { - moduleName: 'workbox-range-requests', - funcName: 'calculateEffectiveBoundaries', - paramName: 'blob' - }); - } - const blobSize = blob.size; - if (end && end > blobSize || start && start < 0) { - throw new WorkboxError_js.WorkboxError('range-not-satisfiable', { - size: blobSize, - end, - start - }); - } - let effectiveStart; - let effectiveEnd; - if (start !== undefined && end !== undefined) { - effectiveStart = start; - // Range values are inclusive, so add 1 to the value. - effectiveEnd = end + 1; - } else if (start !== undefined && end === undefined) { - effectiveStart = start; - effectiveEnd = blobSize; - } else if (end !== undefined && start === undefined) { - effectiveStart = blobSize - end; - effectiveEnd = blobSize; - } - return { - start: effectiveStart, - end: effectiveEnd - }; - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * @param {string} rangeHeader A Range: header value. - * @return {Object} An object with `start` and `end` properties, reflecting - * the parsed value of the Range: header. If either the `start` or `end` are - * omitted, then `null` will be returned. - * - * @private - */ - function parseRangeHeader(rangeHeader) { - { - assert_js.assert.isType(rangeHeader, 'string', { - moduleName: 'workbox-range-requests', - funcName: 'parseRangeHeader', - paramName: 'rangeHeader' - }); - } - const normalizedRangeHeader = rangeHeader.trim().toLowerCase(); - if (!normalizedRangeHeader.startsWith('bytes=')) { - throw new WorkboxError_js.WorkboxError('unit-must-be-bytes', { - normalizedRangeHeader - }); - } - // Specifying multiple ranges separate by commas is valid syntax, but this - // library only attempts to handle a single, contiguous sequence of bytes. - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range#Syntax - if (normalizedRangeHeader.includes(',')) { - throw new WorkboxError_js.WorkboxError('single-range-only', { - normalizedRangeHeader - }); - } - const rangeParts = /(\d*)-(\d*)/.exec(normalizedRangeHeader); - // We need either at least one of the start or end values. - if (!rangeParts || !(rangeParts[1] || rangeParts[2])) { - throw new WorkboxError_js.WorkboxError('invalid-range-values', { - normalizedRangeHeader - }); - } - return { - start: rangeParts[1] === '' ? undefined : Number(rangeParts[1]), - end: rangeParts[2] === '' ? undefined : Number(rangeParts[2]) - }; - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Given a `Request` and `Response` objects as input, this will return a - * promise for a new `Response`. - * - * If the original `Response` already contains partial content (i.e. it has - * a status of 206), then this assumes it already fulfills the `Range:` - * requirements, and will return it as-is. - * - * @param {Request} request A request, which should contain a Range: - * header. - * @param {Response} originalResponse A response. - * @return {Promise} Either a `206 Partial Content` response, with - * the response body set to the slice of content specified by the request's - * `Range:` header, or a `416 Range Not Satisfiable` response if the - * conditions of the `Range:` header can't be met. - * - * @memberof workbox-range-requests - */ - async function createPartialResponse(request, originalResponse) { - try { - if ("dev" !== 'production') { - assert_js.assert.isInstance(request, Request, { - moduleName: 'workbox-range-requests', - funcName: 'createPartialResponse', - paramName: 'request' - }); - assert_js.assert.isInstance(originalResponse, Response, { - moduleName: 'workbox-range-requests', - funcName: 'createPartialResponse', - paramName: 'originalResponse' - }); - } - if (originalResponse.status === 206) { - // If we already have a 206, then just pass it through as-is; - // see https://github.com/GoogleChrome/workbox/issues/1720 - return originalResponse; - } - const rangeHeader = request.headers.get('range'); - if (!rangeHeader) { - throw new WorkboxError_js.WorkboxError('no-range-header'); - } - const boundaries = parseRangeHeader(rangeHeader); - const originalBlob = await originalResponse.blob(); - const effectiveBoundaries = calculateEffectiveBoundaries(originalBlob, boundaries.start, boundaries.end); - const slicedBlob = originalBlob.slice(effectiveBoundaries.start, effectiveBoundaries.end); - const slicedBlobSize = slicedBlob.size; - const slicedResponse = new Response(slicedBlob, { - // Status code 206 is for a Partial Content response. - // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206 - status: 206, - statusText: 'Partial Content', - headers: originalResponse.headers - }); - slicedResponse.headers.set('Content-Length', String(slicedBlobSize)); - slicedResponse.headers.set('Content-Range', `bytes ${effectiveBoundaries.start}-${effectiveBoundaries.end - 1}/` + `${originalBlob.size}`); - return slicedResponse; - } catch (error) { - { - logger_js.logger.warn(`Unable to construct a partial response; returning a ` + `416 Range Not Satisfiable response instead.`); - logger_js.logger.groupCollapsed(`View details here.`); - logger_js.logger.log(error); - logger_js.logger.log(request); - logger_js.logger.log(originalResponse); - logger_js.logger.groupEnd(); - } - return new Response('', { - status: 416, - statusText: 'Range Not Satisfiable' - }); - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * The range request plugin makes it easy for a request with a 'Range' header to - * be fulfilled by a cached response. - * - * It does this by intercepting the `cachedResponseWillBeUsed` plugin callback - * and returning the appropriate subset of the cached response body. - * - * @memberof workbox-range-requests - */ - class RangeRequestsPlugin { - constructor() { - /** - * @param {Object} options - * @param {Request} options.request The original request, which may or may not - * contain a Range: header. - * @param {Response} options.cachedResponse The complete cached response. - * @return {Promise} If request contains a 'Range' header, then a - * new response with status 206 whose body is a subset of `cachedResponse` is - * returned. Otherwise, `cachedResponse` is returned as-is. - * - * @private - */ - this.cachedResponseWillBeUsed = async ({ - request, - cachedResponse - }) => { - // Only return a sliced response if there's something valid in the cache, - // and there's a Range: header in the request. - if (cachedResponse && request.headers.has('range')) { - return await createPartialResponse(request, cachedResponse); - } - // If there was no Range: header, or if cachedResponse wasn't valid, just - // pass it through as-is. - return cachedResponse; - }; - } - } - - exports.RangeRequestsPlugin = RangeRequestsPlugin; - exports.createPartialResponse = createPartialResponse; - - return exports; - -})({}, workbox.core._private, workbox.core._private, workbox.core._private); -//# sourceMappingURL=workbox-range-requests.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-range-requests.dev.js.map b/docs/workbox-v7.4.1/workbox-range-requests.dev.js.map deleted file mode 100644 index 80fd0a30..00000000 --- a/docs/workbox-v7.4.1/workbox-range-requests.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-range-requests.dev.js","sources":["../_version.js","../utils/calculateEffectiveBoundaries.js","../utils/parseRangeHeader.js","../createPartialResponse.js","../RangeRequestsPlugin.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:range-requests:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {Blob} blob A source blob.\n * @param {number} [start] The offset to use as the start of the\n * slice.\n * @param {number} [end] The offset to use as the end of the slice.\n * @return {Object} An object with `start` and `end` properties, reflecting\n * the effective boundaries to use given the size of the blob.\n *\n * @private\n */\nfunction calculateEffectiveBoundaries(blob, start, end) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(blob, Blob, {\n moduleName: 'workbox-range-requests',\n funcName: 'calculateEffectiveBoundaries',\n paramName: 'blob',\n });\n }\n const blobSize = blob.size;\n if ((end && end > blobSize) || (start && start < 0)) {\n throw new WorkboxError('range-not-satisfiable', {\n size: blobSize,\n end,\n start,\n });\n }\n let effectiveStart;\n let effectiveEnd;\n if (start !== undefined && end !== undefined) {\n effectiveStart = start;\n // Range values are inclusive, so add 1 to the value.\n effectiveEnd = end + 1;\n }\n else if (start !== undefined && end === undefined) {\n effectiveStart = start;\n effectiveEnd = blobSize;\n }\n else if (end !== undefined && start === undefined) {\n effectiveStart = blobSize - end;\n effectiveEnd = blobSize;\n }\n return {\n start: effectiveStart,\n end: effectiveEnd,\n };\n}\nexport { calculateEffectiveBoundaries };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {string} rangeHeader A Range: header value.\n * @return {Object} An object with `start` and `end` properties, reflecting\n * the parsed value of the Range: header. If either the `start` or `end` are\n * omitted, then `null` will be returned.\n *\n * @private\n */\nfunction parseRangeHeader(rangeHeader) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(rangeHeader, 'string', {\n moduleName: 'workbox-range-requests',\n funcName: 'parseRangeHeader',\n paramName: 'rangeHeader',\n });\n }\n const normalizedRangeHeader = rangeHeader.trim().toLowerCase();\n if (!normalizedRangeHeader.startsWith('bytes=')) {\n throw new WorkboxError('unit-must-be-bytes', { normalizedRangeHeader });\n }\n // Specifying multiple ranges separate by commas is valid syntax, but this\n // library only attempts to handle a single, contiguous sequence of bytes.\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range#Syntax\n if (normalizedRangeHeader.includes(',')) {\n throw new WorkboxError('single-range-only', { normalizedRangeHeader });\n }\n const rangeParts = /(\\d*)-(\\d*)/.exec(normalizedRangeHeader);\n // We need either at least one of the start or end values.\n if (!rangeParts || !(rangeParts[1] || rangeParts[2])) {\n throw new WorkboxError('invalid-range-values', { normalizedRangeHeader });\n }\n return {\n start: rangeParts[1] === '' ? undefined : Number(rangeParts[1]),\n end: rangeParts[2] === '' ? undefined : Number(rangeParts[2]),\n };\n}\nexport { parseRangeHeader };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { calculateEffectiveBoundaries } from './utils/calculateEffectiveBoundaries.js';\nimport { parseRangeHeader } from './utils/parseRangeHeader.js';\nimport './_version.js';\n/**\n * Given a `Request` and `Response` objects as input, this will return a\n * promise for a new `Response`.\n *\n * If the original `Response` already contains partial content (i.e. it has\n * a status of 206), then this assumes it already fulfills the `Range:`\n * requirements, and will return it as-is.\n *\n * @param {Request} request A request, which should contain a Range:\n * header.\n * @param {Response} originalResponse A response.\n * @return {Promise} Either a `206 Partial Content` response, with\n * the response body set to the slice of content specified by the request's\n * `Range:` header, or a `416 Range Not Satisfiable` response if the\n * conditions of the `Range:` header can't be met.\n *\n * @memberof workbox-range-requests\n */\nasync function createPartialResponse(request, originalResponse) {\n try {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-range-requests',\n funcName: 'createPartialResponse',\n paramName: 'request',\n });\n assert.isInstance(originalResponse, Response, {\n moduleName: 'workbox-range-requests',\n funcName: 'createPartialResponse',\n paramName: 'originalResponse',\n });\n }\n if (originalResponse.status === 206) {\n // If we already have a 206, then just pass it through as-is;\n // see https://github.com/GoogleChrome/workbox/issues/1720\n return originalResponse;\n }\n const rangeHeader = request.headers.get('range');\n if (!rangeHeader) {\n throw new WorkboxError('no-range-header');\n }\n const boundaries = parseRangeHeader(rangeHeader);\n const originalBlob = await originalResponse.blob();\n const effectiveBoundaries = calculateEffectiveBoundaries(originalBlob, boundaries.start, boundaries.end);\n const slicedBlob = originalBlob.slice(effectiveBoundaries.start, effectiveBoundaries.end);\n const slicedBlobSize = slicedBlob.size;\n const slicedResponse = new Response(slicedBlob, {\n // Status code 206 is for a Partial Content response.\n // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206\n status: 206,\n statusText: 'Partial Content',\n headers: originalResponse.headers,\n });\n slicedResponse.headers.set('Content-Length', String(slicedBlobSize));\n slicedResponse.headers.set('Content-Range', `bytes ${effectiveBoundaries.start}-${effectiveBoundaries.end - 1}/` +\n `${originalBlob.size}`);\n return slicedResponse;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to construct a partial response; returning a ` +\n `416 Range Not Satisfiable response instead.`);\n logger.groupCollapsed(`View details here.`);\n logger.log(error);\n logger.log(request);\n logger.log(originalResponse);\n logger.groupEnd();\n }\n return new Response('', {\n status: 416,\n statusText: 'Range Not Satisfiable',\n });\n }\n}\nexport { createPartialResponse };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { createPartialResponse } from './createPartialResponse.js';\nimport './_version.js';\n/**\n * The range request plugin makes it easy for a request with a 'Range' header to\n * be fulfilled by a cached response.\n *\n * It does this by intercepting the `cachedResponseWillBeUsed` plugin callback\n * and returning the appropriate subset of the cached response body.\n *\n * @memberof workbox-range-requests\n */\nclass RangeRequestsPlugin {\n constructor() {\n /**\n * @param {Object} options\n * @param {Request} options.request The original request, which may or may not\n * contain a Range: header.\n * @param {Response} options.cachedResponse The complete cached response.\n * @return {Promise} If request contains a 'Range' header, then a\n * new response with status 206 whose body is a subset of `cachedResponse` is\n * returned. Otherwise, `cachedResponse` is returned as-is.\n *\n * @private\n */\n this.cachedResponseWillBeUsed = async ({ request, cachedResponse, }) => {\n // Only return a sliced response if there's something valid in the cache,\n // and there's a Range: header in the request.\n if (cachedResponse && request.headers.has('range')) {\n return await createPartialResponse(request, cachedResponse);\n }\n // If there was no Range: header, or if cachedResponse wasn't valid, just\n // pass it through as-is.\n return cachedResponse;\n };\n }\n}\nexport { RangeRequestsPlugin };\n"],"names":["self","_","e","calculateEffectiveBoundaries","blob","start","end","assert","isInstance","Blob","moduleName","funcName","paramName","blobSize","size","WorkboxError","effectiveStart","effectiveEnd","undefined","parseRangeHeader","rangeHeader","isType","normalizedRangeHeader","trim","toLowerCase","startsWith","includes","rangeParts","exec","Number","createPartialResponse","request","originalResponse","process","Request","Response","status","headers","get","boundaries","originalBlob","effectiveBoundaries","slicedBlob","slice","slicedBlobSize","slicedResponse","statusText","set","String","error","logger","warn","groupCollapsed","log","groupEnd","RangeRequestsPlugin","constructor","cachedResponseWillBeUsed","cachedResponse","has"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,8BAA8B,CAAC,IAAIC,CAAC,EAAE;IAC/C,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;ICLZ;IACA;;IAEA;IACA;IACA;IACA;IAIA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,SAASC,4BAA4BA,CAACC,IAAI,EAAEC,KAAK,EAAEC,GAAG,EAAE;IACpD,EAA2C;IACvCC,IAAAA,gBAAM,CAACC,UAAU,CAACJ,IAAI,EAAEK,IAAI,EAAE;IAC1BC,MAAAA,UAAU,EAAE,wBAAwB;IACpCC,MAAAA,QAAQ,EAAE,8BAA8B;IACxCC,MAAAA,SAAS,EAAE;IACf,KAAC,CAAC;IACN,EAAA;IACA,EAAA,MAAMC,QAAQ,GAAGT,IAAI,CAACU,IAAI;MAC1B,IAAKR,GAAG,IAAIA,GAAG,GAAGO,QAAQ,IAAMR,KAAK,IAAIA,KAAK,GAAG,CAAE,EAAE;IACjD,IAAA,MAAM,IAAIU,4BAAY,CAAC,uBAAuB,EAAE;IAC5CD,MAAAA,IAAI,EAAED,QAAQ;UACdP,GAAG;IACHD,MAAAA;IACJ,KAAC,CAAC;IACN,EAAA;IACA,EAAA,IAAIW,cAAc;IAClB,EAAA,IAAIC,YAAY;I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ACzB,CAAC,CACD,OAAOI,KAAK,EAAE;IACV,IAA2C;IACvCC,MAAAA,gBAAM,CAACC,IAAI,CAAE,CAAA,oDAAA,CAAqD,GAC7D,6CAA4C,CAAC;IAClDD,MAAAA,gBAAM,CAACE,cAAc,CAAE,CAAA,kBAAA,CAAmB,CAAC;IAC3CF,MAAAA,gBAAM,CAACG,GAAG,CAACJ,KAAK,CAAC;IACjBC,MAAAA,gBAAM,CAACG,GAAG,CAACtB,OAAO,CAAC;IACnBmB,MAAAA,gBAAM,CAACG,GAAG,CAACrB,gBAAgB,CAAC;UAC5BkB,gBAAM,CAACI,QAAQ,EAAE;IACrB,IAAA;IACA,IAAA,OAAO,IAAInB,QAAQ,CAAC,EAAE,EAAE;IACpBC,MAAAA,MAAM,EAAE,GAAG;IACXU,MAAAA,UAAU,EAAE;IAChB,KAAC,CAAC;IACN,EAAA;IACJ;;ICtFA;IACA;;IAEA;IACA;IACA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAMS,mBAAmB,CAAC;IACtBC,EAAAA,WAAWA,GAAG;IACV;IACR;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;QACQ,IAAI,CAACC,wBAAwB,GAAG,OAAO;UAAE1B,OAAO;IAAE2B,MAAAA;IAAgB,KAAC,KAAK;IACpE;IACA;UACA,IAAIA,cAAc,IAAI3B,OAAO,CAACM,OAAO,CAACsB,GAAG,CAAC,OAAO,CAAC,EAAE;IAChD,QAAA,OAAO,MAAM7B,qBAAqB,CAACC,OAAO,EAAE2B,cAAc,CAAC;IAC/D,MAAA;IACA;IACA;IACA,MAAA,OAAOA,cAAc;QACzB,CAAC;IACL,EAAA;IACJ;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-range-requests.prod.js b/docs/workbox-v7.4.1/workbox-range-requests.prod.js deleted file mode 100644 index b336ada0..00000000 --- a/docs/workbox-v7.4.1/workbox-range-requests.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.rangeRequests=function(t,e,n){"use strict";try{self["workbox:range-requests:7.4.0"]&&_()}catch(t){}async function r(t,n){try{if(206===n.status)return n;const r=t.headers.get("range");if(!r)throw new e.WorkboxError("no-range-header");const s=function(t){const n=t.trim().toLowerCase();if(!n.startsWith("bytes="))throw new e.WorkboxError("unit-must-be-bytes",{normalizedRangeHeader:n});if(n.includes(","))throw new e.WorkboxError("single-range-only",{normalizedRangeHeader:n});const r=/(\d*)-(\d*)/.exec(n);if(!r||!r[1]&&!r[2])throw new e.WorkboxError("invalid-range-values",{normalizedRangeHeader:n});return{start:""===r[1]?void 0:Number(r[1]),end:""===r[2]?void 0:Number(r[2])}}(r),a=await n.blob(),o=function(t,n,r){const s=t.size;if(r&&r>s||n&&n<0)throw new e.WorkboxError("range-not-satisfiable",{size:s,end:r,start:n});let a,o;return void 0!==n&&void 0!==r?(a=n,o=r+1):void 0!==n&&void 0===r?(a=n,o=s):void 0!==r&&void 0===n&&(a=s-r,o=s),{start:a,end:o}}(a,s.start,s.end),i=a.slice(o.start,o.end),d=i.size,u=new Response(i,{status:206,statusText:"Partial Content",headers:n.headers});return u.headers.set("Content-Length",String(d)),u.headers.set("Content-Range",`bytes ${o.start}-${o.end-1}/${a.size}`),u}catch(t){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}return t.RangeRequestsPlugin=class{constructor(){this.cachedResponseWillBeUsed=async({request:t,cachedResponse:e})=>e&&t.headers.has("range")?await r(t,e):e}},t.createPartialResponse=r,t}({},workbox.core._private,workbox.core._private); -//# sourceMappingURL=workbox-range-requests.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-range-requests.prod.js.map b/docs/workbox-v7.4.1/workbox-range-requests.prod.js.map deleted file mode 100644 index c6fe2c4c..00000000 --- a/docs/workbox-v7.4.1/workbox-range-requests.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-range-requests.prod.js","sources":["../_version.js","../createPartialResponse.js","../utils/parseRangeHeader.js","../utils/calculateEffectiveBoundaries.js","../RangeRequestsPlugin.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:range-requests:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { calculateEffectiveBoundaries } from './utils/calculateEffectiveBoundaries.js';\nimport { parseRangeHeader } from './utils/parseRangeHeader.js';\nimport './_version.js';\n/**\n * Given a `Request` and `Response` objects as input, this will return a\n * promise for a new `Response`.\n *\n * If the original `Response` already contains partial content (i.e. it has\n * a status of 206), then this assumes it already fulfills the `Range:`\n * requirements, and will return it as-is.\n *\n * @param {Request} request A request, which should contain a Range:\n * header.\n * @param {Response} originalResponse A response.\n * @return {Promise} Either a `206 Partial Content` response, with\n * the response body set to the slice of content specified by the request's\n * `Range:` header, or a `416 Range Not Satisfiable` response if the\n * conditions of the `Range:` header can't be met.\n *\n * @memberof workbox-range-requests\n */\nasync function createPartialResponse(request, originalResponse) {\n try {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-range-requests',\n funcName: 'createPartialResponse',\n paramName: 'request',\n });\n assert.isInstance(originalResponse, Response, {\n moduleName: 'workbox-range-requests',\n funcName: 'createPartialResponse',\n paramName: 'originalResponse',\n });\n }\n if (originalResponse.status === 206) {\n // If we already have a 206, then just pass it through as-is;\n // see https://github.com/GoogleChrome/workbox/issues/1720\n return originalResponse;\n }\n const rangeHeader = request.headers.get('range');\n if (!rangeHeader) {\n throw new WorkboxError('no-range-header');\n }\n const boundaries = parseRangeHeader(rangeHeader);\n const originalBlob = await originalResponse.blob();\n const effectiveBoundaries = calculateEffectiveBoundaries(originalBlob, boundaries.start, boundaries.end);\n const slicedBlob = originalBlob.slice(effectiveBoundaries.start, effectiveBoundaries.end);\n const slicedBlobSize = slicedBlob.size;\n const slicedResponse = new Response(slicedBlob, {\n // Status code 206 is for a Partial Content response.\n // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206\n status: 206,\n statusText: 'Partial Content',\n headers: originalResponse.headers,\n });\n slicedResponse.headers.set('Content-Length', String(slicedBlobSize));\n slicedResponse.headers.set('Content-Range', `bytes ${effectiveBoundaries.start}-${effectiveBoundaries.end - 1}/` +\n `${originalBlob.size}`);\n return slicedResponse;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to construct a partial response; returning a ` +\n `416 Range Not Satisfiable response instead.`);\n logger.groupCollapsed(`View details here.`);\n logger.log(error);\n logger.log(request);\n logger.log(originalResponse);\n logger.groupEnd();\n }\n return new Response('', {\n status: 416,\n statusText: 'Range Not Satisfiable',\n });\n }\n}\nexport { createPartialResponse };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {string} rangeHeader A Range: header value.\n * @return {Object} An object with `start` and `end` properties, reflecting\n * the parsed value of the Range: header. If either the `start` or `end` are\n * omitted, then `null` will be returned.\n *\n * @private\n */\nfunction parseRangeHeader(rangeHeader) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(rangeHeader, 'string', {\n moduleName: 'workbox-range-requests',\n funcName: 'parseRangeHeader',\n paramName: 'rangeHeader',\n });\n }\n const normalizedRangeHeader = rangeHeader.trim().toLowerCase();\n if (!normalizedRangeHeader.startsWith('bytes=')) {\n throw new WorkboxError('unit-must-be-bytes', { normalizedRangeHeader });\n }\n // Specifying multiple ranges separate by commas is valid syntax, but this\n // library only attempts to handle a single, contiguous sequence of bytes.\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range#Syntax\n if (normalizedRangeHeader.includes(',')) {\n throw new WorkboxError('single-range-only', { normalizedRangeHeader });\n }\n const rangeParts = /(\\d*)-(\\d*)/.exec(normalizedRangeHeader);\n // We need either at least one of the start or end values.\n if (!rangeParts || !(rangeParts[1] || rangeParts[2])) {\n throw new WorkboxError('invalid-range-values', { normalizedRangeHeader });\n }\n return {\n start: rangeParts[1] === '' ? undefined : Number(rangeParts[1]),\n end: rangeParts[2] === '' ? undefined : Number(rangeParts[2]),\n };\n}\nexport { parseRangeHeader };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {Blob} blob A source blob.\n * @param {number} [start] The offset to use as the start of the\n * slice.\n * @param {number} [end] The offset to use as the end of the slice.\n * @return {Object} An object with `start` and `end` properties, reflecting\n * the effective boundaries to use given the size of the blob.\n *\n * @private\n */\nfunction calculateEffectiveBoundaries(blob, start, end) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(blob, Blob, {\n moduleName: 'workbox-range-requests',\n funcName: 'calculateEffectiveBoundaries',\n paramName: 'blob',\n });\n }\n const blobSize = blob.size;\n if ((end && end > blobSize) || (start && start < 0)) {\n throw new WorkboxError('range-not-satisfiable', {\n size: blobSize,\n end,\n start,\n });\n }\n let effectiveStart;\n let effectiveEnd;\n if (start !== undefined && end !== undefined) {\n effectiveStart = start;\n // Range values are inclusive, so add 1 to the value.\n effectiveEnd = end + 1;\n }\n else if (start !== undefined && end === undefined) {\n effectiveStart = start;\n effectiveEnd = blobSize;\n }\n else if (end !== undefined && start === undefined) {\n effectiveStart = blobSize - end;\n effectiveEnd = blobSize;\n }\n return {\n start: effectiveStart,\n end: effectiveEnd,\n };\n}\nexport { calculateEffectiveBoundaries };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { createPartialResponse } from './createPartialResponse.js';\nimport './_version.js';\n/**\n * The range request plugin makes it easy for a request with a 'Range' header to\n * be fulfilled by a cached response.\n *\n * It does this by intercepting the `cachedResponseWillBeUsed` plugin callback\n * and returning the appropriate subset of the cached response body.\n *\n * @memberof workbox-range-requests\n */\nclass RangeRequestsPlugin {\n constructor() {\n /**\n * @param {Object} options\n * @param {Request} options.request The original request, which may or may not\n * contain a Range: header.\n * @param {Response} options.cachedResponse The complete cached response.\n * @return {Promise} If request contains a 'Range' header, then a\n * new response with status 206 whose body is a subset of `cachedResponse` is\n * returned. Otherwise, `cachedResponse` is returned as-is.\n *\n * @private\n */\n this.cachedResponseWillBeUsed = async ({ request, cachedResponse, }) => {\n // Only return a sliced response if there's something valid in the cache,\n // and there's a Range: header in the request.\n if (cachedResponse && request.headers.has('range')) {\n return await createPartialResponse(request, cachedResponse);\n }\n // If there was no Range: header, or if cachedResponse wasn't valid, just\n // pass it through as-is.\n return cachedResponse;\n };\n }\n}\nexport { RangeRequestsPlugin };\n"],"names":["self","_","e","async","createPartialResponse","request","originalResponse","status","rangeHeader","headers","get","WorkboxError","boundaries","normalizedRangeHeader","trim","toLowerCase","startsWith","includes","rangeParts","exec","start","undefined","Number","end","parseRangeHeader","originalBlob","blob","effectiveBoundaries","blobSize","size","effectiveStart","effectiveEnd","calculateEffectiveBoundaries","slicedBlob","slice","slicedBlobSize","slicedResponse","Response","statusText","set","String","error","constructor","this","cachedResponseWillBeUsed","cachedResponse","has"],"mappings":"sFAEA,IACIA,KAAK,iCAAmCC,GAC5C,CACA,MAAOC,GAAK,CC0BZC,eAAeC,EAAsBC,EAASC,GAC1C,IAaI,GAAgC,MAA5BA,EAAiBC,OAGjB,OAAOD,EAEX,MAAME,EAAcH,EAAQI,QAAQC,IAAI,SAC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,EAAiBG,UAK9B,OAHA2B,EAAe3B,QAAQ8B,IAAI,iBAAkBC,OAAOL,IACpDC,EAAe3B,QAAQ8B,IAAI,gBAAkB,SAAQZ,EAAoBP,SAASO,EAAoBJ,IAAM,KACrGE,EAAaI,QACbO,CACX,CACA,MAAOK,GAUH,OAAO,IAAIJ,SAAS,GAAI,CACpB9B,OAAQ,IACR+B,WAAY,yBAEpB,CACJ,8BGpEA,MACII,cAYIC,KAAKC,yBAA2BzC,OAASE,UAASwC,oBAG1CA,GAAkBxC,EAAQI,QAAQqC,IAAI,eACzB1C,EAAsBC,EAASwC,GAIzCA,CAEf"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-recipes.dev.js b/docs/workbox-v7.4.1/workbox-recipes.dev.js deleted file mode 100644 index 44d2cd25..00000000 --- a/docs/workbox-v7.4.1/workbox-recipes.dev.js +++ /dev/null @@ -1,268 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.recipes = (function (exports, registerRoute_js, StaleWhileRevalidate_js, CacheFirst_js, CacheableResponsePlugin_js, ExpirationPlugin_js, NetworkFirst_js, setCatchHandler_js, matchPrecache_js) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:recipes:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of the [Google fonts]{@link https://developers.google.com/web/tools/workbox/guides/common-recipes#google_fonts} caching recipe - * - * @memberof workbox-recipes - * - * @param {Object} [options] - * @param {string} [options.cachePrefix] Cache prefix for caching stylesheets and webfonts. Defaults to google-fonts - * @param {number} [options.maxAgeSeconds] Maximum age, in seconds, that font entries will be cached for. Defaults to 1 year - * @param {number} [options.maxEntries] Maximum number of fonts that will be cached. Defaults to 30 - */ - function googleFontsCache(options = {}) { - const sheetCacheName = `${options.cachePrefix || 'google-fonts'}-stylesheets`; - const fontCacheName = `${options.cachePrefix || 'google-fonts'}-webfonts`; - const maxAgeSeconds = options.maxAgeSeconds || 60 * 60 * 24 * 365; - const maxEntries = options.maxEntries || 30; - // Cache the Google Fonts stylesheets with a stale-while-revalidate strategy. - registerRoute_js.registerRoute(({ - url - }) => url.origin === 'https://fonts.googleapis.com', new StaleWhileRevalidate_js.StaleWhileRevalidate({ - cacheName: sheetCacheName - })); - // Cache the underlying font files with a cache-first strategy for 1 year. - registerRoute_js.registerRoute(({ - url - }) => url.origin === 'https://fonts.gstatic.com', new CacheFirst_js.CacheFirst({ - cacheName: fontCacheName, - plugins: [new CacheableResponsePlugin_js.CacheableResponsePlugin({ - statuses: [0, 200] - }), new ExpirationPlugin_js.ExpirationPlugin({ - maxAgeSeconds, - maxEntries - })] - })); - } - - /** - * @memberof workbox-recipes - - * @param {Object} options - * @param {string[]} options.urls Paths to warm the strategy's cache with - * @param {Strategy} options.strategy Strategy to use - */ - function warmStrategyCache(options) { - self.addEventListener('install', event => { - const done = options.urls.map(path => options.strategy.handleAll({ - event, - request: new Request(path) - })[1]); - event.waitUntil(Promise.all(done)); - }); - } - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of the [image caching recipe]{@link https://developers.google.com/web/tools/workbox/guides/common-recipes#caching_images} - * - * @memberof workbox-recipes - * - * @param {Object} [options] - * @param {string} [options.cacheName] Name for cache. Defaults to images - * @param {RouteMatchCallback} [options.matchCallback] Workbox callback function to call to match to. Defaults to request.destination === 'image'; - * @param {number} [options.maxAgeSeconds] Maximum age, in seconds, that font entries will be cached for. Defaults to 30 days - * @param {number} [options.maxEntries] Maximum number of images that will be cached. Defaults to 60 - * @param {WorkboxPlugin[]} [options.plugins] Additional plugins to use for this recipe - * @param {string[]} [options.warmCache] Paths to call to use to warm this cache - */ - function imageCache(options = {}) { - const defaultMatchCallback = ({ - request - }) => request.destination === 'image'; - const cacheName = options.cacheName || 'images'; - const matchCallback = options.matchCallback || defaultMatchCallback; - const maxAgeSeconds = options.maxAgeSeconds || 30 * 24 * 60 * 60; - const maxEntries = options.maxEntries || 60; - const plugins = options.plugins || []; - plugins.push(new CacheableResponsePlugin_js.CacheableResponsePlugin({ - statuses: [0, 200] - })); - plugins.push(new ExpirationPlugin_js.ExpirationPlugin({ - maxEntries, - maxAgeSeconds - })); - const strategy = new CacheFirst_js.CacheFirst({ - cacheName, - plugins - }); - registerRoute_js.registerRoute(matchCallback, strategy); - // Warms the cache - if (options.warmCache) { - warmStrategyCache({ - urls: options.warmCache, - strategy - }); - } - } - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of the [CSS and JavaScript files recipe]{@link https://developers.google.com/web/tools/workbox/guides/common-recipes#cache_css_and_javascript_files} - * - * @memberof workbox-recipes - * - * @param {Object} [options] - * @param {string} [options.cacheName] Name for cache. Defaults to static-resources - * @param {RouteMatchCallback} [options.matchCallback] Workbox callback function to call to match to. Defaults to request.destination === 'style' || request.destination === 'script' || request.destination === 'worker'; - * @param {WorkboxPlugin[]} [options.plugins] Additional plugins to use for this recipe - * @param {string[]} [options.warmCache] Paths to call to use to warm this cache - */ - function staticResourceCache(options = {}) { - const defaultMatchCallback = ({ - request - }) => request.destination === 'style' || request.destination === 'script' || request.destination === 'worker'; - const cacheName = options.cacheName || 'static-resources'; - const matchCallback = options.matchCallback || defaultMatchCallback; - const plugins = options.plugins || []; - plugins.push(new CacheableResponsePlugin_js.CacheableResponsePlugin({ - statuses: [0, 200] - })); - const strategy = new StaleWhileRevalidate_js.StaleWhileRevalidate({ - cacheName, - plugins - }); - registerRoute_js.registerRoute(matchCallback, strategy); - // Warms the cache - if (options.warmCache) { - warmStrategyCache({ - urls: options.warmCache, - strategy - }); - } - } - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of a page caching recipe with a network timeout - * - * @memberof workbox-recipes - * - * @param {Object} [options] - * @param {string} [options.cacheName] Name for cache. Defaults to pages - * @param {RouteMatchCallback} [options.matchCallback] Workbox callback function to call to match to. Defaults to request.mode === 'navigate'; - * @param {number} [options.networkTimoutSeconds] Maximum amount of time, in seconds, to wait on the network before falling back to cache. Defaults to 3 - * @param {WorkboxPlugin[]} [options.plugins] Additional plugins to use for this recipe - * @param {string[]} [options.warmCache] Paths to call to use to warm this cache - */ - function pageCache(options = {}) { - const defaultMatchCallback = ({ - request - }) => request.mode === 'navigate'; - const cacheName = options.cacheName || 'pages'; - const matchCallback = options.matchCallback || defaultMatchCallback; - const networkTimeoutSeconds = options.networkTimeoutSeconds || 3; - const plugins = options.plugins || []; - plugins.push(new CacheableResponsePlugin_js.CacheableResponsePlugin({ - statuses: [0, 200] - })); - const strategy = new NetworkFirst_js.NetworkFirst({ - networkTimeoutSeconds, - cacheName, - plugins - }); - // Registers the route - registerRoute_js.registerRoute(matchCallback, strategy); - // Warms the cache - if (options.warmCache) { - warmStrategyCache({ - urls: options.warmCache, - strategy - }); - } - } - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of the [comprehensive fallbacks recipe]{@link https://developers.google.com/web/tools/workbox/guides/advanced-recipes#comprehensive_fallbacks}. Be sure to include the fallbacks in your precache injection - * - * @memberof workbox-recipes - * - * @param {Object} [options] - * @param {string} [options.pageFallback] Precache name to match for pag fallbacks. Defaults to offline.html - * @param {string} [options.imageFallback] Precache name to match for image fallbacks. - * @param {string} [options.fontFallback] Precache name to match for font fallbacks. - */ - function offlineFallback(options = {}) { - const pageFallback = options.pageFallback || 'offline.html'; - const imageFallback = options.imageFallback || false; - const fontFallback = options.fontFallback || false; - self.addEventListener('install', event => { - const files = [pageFallback]; - if (imageFallback) { - files.push(imageFallback); - } - if (fontFallback) { - files.push(fontFallback); - } - event.waitUntil(self.caches.open('workbox-offline-fallbacks').then(cache => cache.addAll(files))); - }); - const handler = async options => { - const dest = options.request.destination; - const cache = await self.caches.open('workbox-offline-fallbacks'); - if (dest === 'document') { - const match = (await matchPrecache_js.matchPrecache(pageFallback)) || (await cache.match(pageFallback)); - return match || Response.error(); - } - if (dest === 'image' && imageFallback !== false) { - const match = (await matchPrecache_js.matchPrecache(imageFallback)) || (await cache.match(imageFallback)); - return match || Response.error(); - } - if (dest === 'font' && fontFallback !== false) { - const match = (await matchPrecache_js.matchPrecache(fontFallback)) || (await cache.match(fontFallback)); - return match || Response.error(); - } - return Response.error(); - }; - setCatchHandler_js.setCatchHandler(handler); - } - - exports.googleFontsCache = googleFontsCache; - exports.imageCache = imageCache; - exports.offlineFallback = offlineFallback; - exports.pageCache = pageCache; - exports.staticResourceCache = staticResourceCache; - exports.warmStrategyCache = warmStrategyCache; - - return exports; - -})({}, workbox.routing, workbox.strategies, workbox.strategies, workbox.cacheableResponse, workbox.expiration, workbox.strategies, workbox.routing, workbox.precaching); -//# sourceMappingURL=workbox-recipes.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-recipes.dev.js.map b/docs/workbox-v7.4.1/workbox-recipes.dev.js.map deleted file mode 100644 index 2aeac245..00000000 --- a/docs/workbox-v7.4.1/workbox-recipes.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-recipes.dev.js","sources":["../_version.js","../googleFontsCache.js","../warmStrategyCache.js","../imageCache.js","../staticResourceCache.js","../pageCache.js","../offlineFallback.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:recipes:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { StaleWhileRevalidate } from 'workbox-strategies/StaleWhileRevalidate.js';\nimport { CacheFirst } from 'workbox-strategies/CacheFirst.js';\nimport { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin.js';\nimport { ExpirationPlugin } from 'workbox-expiration/ExpirationPlugin.js';\nimport './_version.js';\n/**\n * An implementation of the [Google fonts]{@link https://developers.google.com/web/tools/workbox/guides/common-recipes#google_fonts} caching recipe\n *\n * @memberof workbox-recipes\n *\n * @param {Object} [options]\n * @param {string} [options.cachePrefix] Cache prefix for caching stylesheets and webfonts. Defaults to google-fonts\n * @param {number} [options.maxAgeSeconds] Maximum age, in seconds, that font entries will be cached for. Defaults to 1 year\n * @param {number} [options.maxEntries] Maximum number of fonts that will be cached. Defaults to 30\n */\nfunction googleFontsCache(options = {}) {\n const sheetCacheName = `${options.cachePrefix || 'google-fonts'}-stylesheets`;\n const fontCacheName = `${options.cachePrefix || 'google-fonts'}-webfonts`;\n const maxAgeSeconds = options.maxAgeSeconds || 60 * 60 * 24 * 365;\n const maxEntries = options.maxEntries || 30;\n // Cache the Google Fonts stylesheets with a stale-while-revalidate strategy.\n registerRoute(({ url }) => url.origin === 'https://fonts.googleapis.com', new StaleWhileRevalidate({\n cacheName: sheetCacheName,\n }));\n // Cache the underlying font files with a cache-first strategy for 1 year.\n registerRoute(({ url }) => url.origin === 'https://fonts.gstatic.com', new CacheFirst({\n cacheName: fontCacheName,\n plugins: [\n new CacheableResponsePlugin({\n statuses: [0, 200],\n }),\n new ExpirationPlugin({\n maxAgeSeconds,\n maxEntries,\n }),\n ],\n }));\n}\nexport { googleFontsCache };\n","import './_version.js';\n/**\n * @memberof workbox-recipes\n \n * @param {Object} options\n * @param {string[]} options.urls Paths to warm the strategy's cache with\n * @param {Strategy} options.strategy Strategy to use\n */\nfunction warmStrategyCache(options) {\n self.addEventListener('install', (event) => {\n const done = options.urls.map((path) => options.strategy.handleAll({\n event,\n request: new Request(path),\n })[1]);\n event.waitUntil(Promise.all(done));\n });\n}\nexport { warmStrategyCache };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { warmStrategyCache } from './warmStrategyCache';\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { CacheFirst } from 'workbox-strategies/CacheFirst.js';\nimport { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin.js';\nimport { ExpirationPlugin } from 'workbox-expiration/ExpirationPlugin.js';\nimport './_version.js';\n/**\n * An implementation of the [image caching recipe]{@link https://developers.google.com/web/tools/workbox/guides/common-recipes#caching_images}\n *\n * @memberof workbox-recipes\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Name for cache. Defaults to images\n * @param {RouteMatchCallback} [options.matchCallback] Workbox callback function to call to match to. Defaults to request.destination === 'image';\n * @param {number} [options.maxAgeSeconds] Maximum age, in seconds, that font entries will be cached for. Defaults to 30 days\n * @param {number} [options.maxEntries] Maximum number of images that will be cached. Defaults to 60\n * @param {WorkboxPlugin[]} [options.plugins] Additional plugins to use for this recipe\n * @param {string[]} [options.warmCache] Paths to call to use to warm this cache\n */\nfunction imageCache(options = {}) {\n const defaultMatchCallback = ({ request }) => request.destination === 'image';\n const cacheName = options.cacheName || 'images';\n const matchCallback = options.matchCallback || defaultMatchCallback;\n const maxAgeSeconds = options.maxAgeSeconds || 30 * 24 * 60 * 60;\n const maxEntries = options.maxEntries || 60;\n const plugins = options.plugins || [];\n plugins.push(new CacheableResponsePlugin({\n statuses: [0, 200],\n }));\n plugins.push(new ExpirationPlugin({\n maxEntries,\n maxAgeSeconds,\n }));\n const strategy = new CacheFirst({\n cacheName,\n plugins,\n });\n registerRoute(matchCallback, strategy);\n // Warms the cache\n if (options.warmCache) {\n warmStrategyCache({ urls: options.warmCache, strategy });\n }\n}\nexport { imageCache };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { warmStrategyCache } from './warmStrategyCache';\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { StaleWhileRevalidate } from 'workbox-strategies/StaleWhileRevalidate.js';\nimport { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin.js';\nimport './_version.js';\n/**\n * An implementation of the [CSS and JavaScript files recipe]{@link https://developers.google.com/web/tools/workbox/guides/common-recipes#cache_css_and_javascript_files}\n *\n * @memberof workbox-recipes\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Name for cache. Defaults to static-resources\n * @param {RouteMatchCallback} [options.matchCallback] Workbox callback function to call to match to. Defaults to request.destination === 'style' || request.destination === 'script' || request.destination === 'worker';\n * @param {WorkboxPlugin[]} [options.plugins] Additional plugins to use for this recipe\n * @param {string[]} [options.warmCache] Paths to call to use to warm this cache\n */\nfunction staticResourceCache(options = {}) {\n const defaultMatchCallback = ({ request }) => request.destination === 'style' ||\n request.destination === 'script' ||\n request.destination === 'worker';\n const cacheName = options.cacheName || 'static-resources';\n const matchCallback = options.matchCallback || defaultMatchCallback;\n const plugins = options.plugins || [];\n plugins.push(new CacheableResponsePlugin({\n statuses: [0, 200],\n }));\n const strategy = new StaleWhileRevalidate({\n cacheName,\n plugins,\n });\n registerRoute(matchCallback, strategy);\n // Warms the cache\n if (options.warmCache) {\n warmStrategyCache({ urls: options.warmCache, strategy });\n }\n}\nexport { staticResourceCache };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { warmStrategyCache } from './warmStrategyCache';\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { NetworkFirst } from 'workbox-strategies/NetworkFirst.js';\nimport { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin.js';\nimport './_version.js';\n/**\n * An implementation of a page caching recipe with a network timeout\n *\n * @memberof workbox-recipes\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Name for cache. Defaults to pages\n * @param {RouteMatchCallback} [options.matchCallback] Workbox callback function to call to match to. Defaults to request.mode === 'navigate';\n * @param {number} [options.networkTimoutSeconds] Maximum amount of time, in seconds, to wait on the network before falling back to cache. Defaults to 3\n * @param {WorkboxPlugin[]} [options.plugins] Additional plugins to use for this recipe\n * @param {string[]} [options.warmCache] Paths to call to use to warm this cache\n */\nfunction pageCache(options = {}) {\n const defaultMatchCallback = ({ request }) => request.mode === 'navigate';\n const cacheName = options.cacheName || 'pages';\n const matchCallback = options.matchCallback || defaultMatchCallback;\n const networkTimeoutSeconds = options.networkTimeoutSeconds || 3;\n const plugins = options.plugins || [];\n plugins.push(new CacheableResponsePlugin({\n statuses: [0, 200],\n }));\n const strategy = new NetworkFirst({\n networkTimeoutSeconds,\n cacheName,\n plugins,\n });\n // Registers the route\n registerRoute(matchCallback, strategy);\n // Warms the cache\n if (options.warmCache) {\n warmStrategyCache({ urls: options.warmCache, strategy });\n }\n}\nexport { pageCache };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { setCatchHandler } from 'workbox-routing/setCatchHandler.js';\nimport { matchPrecache } from 'workbox-precaching/matchPrecache.js';\nimport './_version.js';\n/**\n * An implementation of the [comprehensive fallbacks recipe]{@link https://developers.google.com/web/tools/workbox/guides/advanced-recipes#comprehensive_fallbacks}. Be sure to include the fallbacks in your precache injection\n *\n * @memberof workbox-recipes\n *\n * @param {Object} [options]\n * @param {string} [options.pageFallback] Precache name to match for pag fallbacks. Defaults to offline.html\n * @param {string} [options.imageFallback] Precache name to match for image fallbacks.\n * @param {string} [options.fontFallback] Precache name to match for font fallbacks.\n */\nfunction offlineFallback(options = {}) {\n const pageFallback = options.pageFallback || 'offline.html';\n const imageFallback = options.imageFallback || false;\n const fontFallback = options.fontFallback || false;\n self.addEventListener('install', (event) => {\n const files = [pageFallback];\n if (imageFallback) {\n files.push(imageFallback);\n }\n if (fontFallback) {\n files.push(fontFallback);\n }\n event.waitUntil(self.caches\n .open('workbox-offline-fallbacks')\n .then((cache) => cache.addAll(files)));\n });\n const handler = async (options) => {\n const dest = options.request.destination;\n const cache = await self.caches.open('workbox-offline-fallbacks');\n if (dest === 'document') {\n const match = (await matchPrecache(pageFallback)) ||\n (await cache.match(pageFallback));\n return match || Response.error();\n }\n if (dest === 'image' && imageFallback !== false) {\n const match = (await matchPrecache(imageFallback)) ||\n (await cache.match(imageFallback));\n return match || Response.error();\n }\n if (dest === 'font' && fontFallback !== false) {\n const match = (await matchPrecache(fontFallback)) ||\n (await cache.match(fontFallback));\n return match || Response.error();\n }\n return Response.error();\n };\n setCatchHandler(handler);\n}\nexport { offlineFallback };\n"],"names":["self","_","e","googleFontsCache","options","sheetCacheName","cachePrefix","fontCacheName","maxAgeSeconds","maxEntries","registerRoute","url","origin","StaleWhileRevalidate","cacheName","CacheFirst","plugins","CacheableResponsePlugin","statuses","ExpirationPlugin","warmStrategyCache","addEventListener","event","done","urls","map","path","strategy","handleAll","request","Request","waitUntil","Promise","all","imageCache","defaultMatchCallback","destination","matchCallback","push","warmCache","staticResourceCache","pageCache","mode","networkTimeoutSeconds","NetworkFirst","offlineFallback","pageFallback","imageFallback","fontFallback","files","caches","open","then","cache","addAll","handler","dest","match","matchPrecache","Response","error","setCatchHandler"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,uBAAuB,CAAC,IAAIC,CAAC,EAAE;IACxC,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;ICLZ;IACA;;IAEA;IACA;IACA;IACA;IAOA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,SAASC,gBAAgBA,CAACC,OAAO,GAAG,EAAE,EAAE;MACpC,MAAMC,cAAc,GAAI,CAAA,EAAED,OAAO,CAACE,WAAW,IAAI,cAAe,CAAA,YAAA,CAAa;MAC7E,MAAMC,aAAa,GAAI,CAAA,EAAEH,OAAO,CAACE,WAAW,IAAI,cAAe,CAAA,SAAA,CAAU;IACzE,EAAA,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A;IACA,IAAA,OAAOD,QAAQ,CAACC,KAAK,EAAE;MAC3B,CAAC;MACDC,kCAAe,CAACN,OAAO,CAAC;IAC5B;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-recipes.prod.js b/docs/workbox-v7.4.1/workbox-recipes.prod.js deleted file mode 100644 index e4cc163f..00000000 --- a/docs/workbox-v7.4.1/workbox-recipes.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.recipes=function(e,s,t,n,o,a,c,r,i){"use strict";try{self["workbox:recipes:7.4.0"]&&_()}catch(e){}function u(e){self.addEventListener("install",(s=>{const t=e.urls.map((t=>e.strategy.handleAll({event:s,request:new Request(t)})[1]));s.waitUntil(Promise.all(t))}))}return e.googleFontsCache=function(e={}){const c=`${e.cachePrefix||"google-fonts"}-stylesheets`,r=`${e.cachePrefix||"google-fonts"}-webfonts`,i=e.maxAgeSeconds||31536e3,u=e.maxEntries||30;s.registerRoute((({url:e})=>"https://fonts.googleapis.com"===e.origin),new t.StaleWhileRevalidate({cacheName:c})),s.registerRoute((({url:e})=>"https://fonts.gstatic.com"===e.origin),new n.CacheFirst({cacheName:r,plugins:[new o.CacheableResponsePlugin({statuses:[0,200]}),new a.ExpirationPlugin({maxAgeSeconds:i,maxEntries:u})]}))},e.imageCache=function(e={}){const t=e.cacheName||"images",c=e.matchCallback||(({request:e})=>"image"===e.destination),r=e.maxAgeSeconds||2592e3,i=e.maxEntries||60,w=e.plugins||[];w.push(new o.CacheableResponsePlugin({statuses:[0,200]})),w.push(new a.ExpirationPlugin({maxEntries:i,maxAgeSeconds:r}));const l=new n.CacheFirst({cacheName:t,plugins:w});s.registerRoute(c,l),e.warmCache&&u({urls:e.warmCache,strategy:l})},e.offlineFallback=function(e={}){const s=e.pageFallback||"offline.html",t=e.imageFallback||!1,n=e.fontFallback||!1;self.addEventListener("install",(e=>{const o=[s];t&&o.push(t),n&&o.push(n),e.waitUntil(self.caches.open("workbox-offline-fallbacks").then((e=>e.addAll(o))))})),r.setCatchHandler((async e=>{const o=e.request.destination,a=await self.caches.open("workbox-offline-fallbacks");if("document"===o){return await i.matchPrecache(s)||await a.match(s)||Response.error()}if("image"===o&&!1!==t){return await i.matchPrecache(t)||await a.match(t)||Response.error()}if("font"===o&&!1!==n){return await i.matchPrecache(n)||await a.match(n)||Response.error()}return Response.error()}))},e.pageCache=function(e={}){const t=e.cacheName||"pages",n=e.matchCallback||(({request:e})=>"navigate"===e.mode),a=e.networkTimeoutSeconds||3,r=e.plugins||[];r.push(new o.CacheableResponsePlugin({statuses:[0,200]}));const i=new c.NetworkFirst({networkTimeoutSeconds:a,cacheName:t,plugins:r});s.registerRoute(n,i),e.warmCache&&u({urls:e.warmCache,strategy:i})},e.staticResourceCache=function(e={}){const n=e.cacheName||"static-resources",a=e.matchCallback||(({request:e})=>"style"===e.destination||"script"===e.destination||"worker"===e.destination),c=e.plugins||[];c.push(new o.CacheableResponsePlugin({statuses:[0,200]}));const r=new t.StaleWhileRevalidate({cacheName:n,plugins:c});s.registerRoute(a,r),e.warmCache&&u({urls:e.warmCache,strategy:r})},e.warmStrategyCache=u,e}({},workbox.routing,workbox.strategies,workbox.strategies,workbox.cacheableResponse,workbox.expiration,workbox.strategies,workbox.routing,workbox.precaching); -//# sourceMappingURL=workbox-recipes.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-recipes.prod.js.map b/docs/workbox-v7.4.1/workbox-recipes.prod.js.map deleted file mode 100644 index 41c8672a..00000000 --- a/docs/workbox-v7.4.1/workbox-recipes.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-recipes.prod.js","sources":["../_version.js","../warmStrategyCache.js","../googleFontsCache.js","../imageCache.js","../offlineFallback.js","../pageCache.js","../staticResourceCache.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:recipes:7.4.0'] && _();\n}\ncatch (e) { }\n","import './_version.js';\n/**\n * @memberof workbox-recipes\n \n * @param {Object} options\n * @param {string[]} options.urls Paths to warm the strategy's cache with\n * @param {Strategy} options.strategy Strategy to use\n */\nfunction warmStrategyCache(options) {\n self.addEventListener('install', (event) => {\n const done = options.urls.map((path) => options.strategy.handleAll({\n event,\n request: new Request(path),\n })[1]);\n event.waitUntil(Promise.all(done));\n });\n}\nexport { warmStrategyCache };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { StaleWhileRevalidate } from 'workbox-strategies/StaleWhileRevalidate.js';\nimport { CacheFirst } from 'workbox-strategies/CacheFirst.js';\nimport { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin.js';\nimport { ExpirationPlugin } from 'workbox-expiration/ExpirationPlugin.js';\nimport './_version.js';\n/**\n * An implementation of the [Google fonts]{@link https://developers.google.com/web/tools/workbox/guides/common-recipes#google_fonts} caching recipe\n *\n * @memberof workbox-recipes\n *\n * @param {Object} [options]\n * @param {string} [options.cachePrefix] Cache prefix for caching stylesheets and webfonts. Defaults to google-fonts\n * @param {number} [options.maxAgeSeconds] Maximum age, in seconds, that font entries will be cached for. Defaults to 1 year\n * @param {number} [options.maxEntries] Maximum number of fonts that will be cached. Defaults to 30\n */\nfunction googleFontsCache(options = {}) {\n const sheetCacheName = `${options.cachePrefix || 'google-fonts'}-stylesheets`;\n const fontCacheName = `${options.cachePrefix || 'google-fonts'}-webfonts`;\n const maxAgeSeconds = options.maxAgeSeconds || 60 * 60 * 24 * 365;\n const maxEntries = options.maxEntries || 30;\n // Cache the Google Fonts stylesheets with a stale-while-revalidate strategy.\n registerRoute(({ url }) => url.origin === 'https://fonts.googleapis.com', new StaleWhileRevalidate({\n cacheName: sheetCacheName,\n }));\n // Cache the underlying font files with a cache-first strategy for 1 year.\n registerRoute(({ url }) => url.origin === 'https://fonts.gstatic.com', new CacheFirst({\n cacheName: fontCacheName,\n plugins: [\n new CacheableResponsePlugin({\n statuses: [0, 200],\n }),\n new ExpirationPlugin({\n maxAgeSeconds,\n maxEntries,\n }),\n ],\n }));\n}\nexport { googleFontsCache };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { warmStrategyCache } from './warmStrategyCache';\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { CacheFirst } from 'workbox-strategies/CacheFirst.js';\nimport { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin.js';\nimport { ExpirationPlugin } from 'workbox-expiration/ExpirationPlugin.js';\nimport './_version.js';\n/**\n * An implementation of the [image caching recipe]{@link https://developers.google.com/web/tools/workbox/guides/common-recipes#caching_images}\n *\n * @memberof workbox-recipes\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Name for cache. Defaults to images\n * @param {RouteMatchCallback} [options.matchCallback] Workbox callback function to call to match to. Defaults to request.destination === 'image';\n * @param {number} [options.maxAgeSeconds] Maximum age, in seconds, that font entries will be cached for. Defaults to 30 days\n * @param {number} [options.maxEntries] Maximum number of images that will be cached. Defaults to 60\n * @param {WorkboxPlugin[]} [options.plugins] Additional plugins to use for this recipe\n * @param {string[]} [options.warmCache] Paths to call to use to warm this cache\n */\nfunction imageCache(options = {}) {\n const defaultMatchCallback = ({ request }) => request.destination === 'image';\n const cacheName = options.cacheName || 'images';\n const matchCallback = options.matchCallback || defaultMatchCallback;\n const maxAgeSeconds = options.maxAgeSeconds || 30 * 24 * 60 * 60;\n const maxEntries = options.maxEntries || 60;\n const plugins = options.plugins || [];\n plugins.push(new CacheableResponsePlugin({\n statuses: [0, 200],\n }));\n plugins.push(new ExpirationPlugin({\n maxEntries,\n maxAgeSeconds,\n }));\n const strategy = new CacheFirst({\n cacheName,\n plugins,\n });\n registerRoute(matchCallback, strategy);\n // Warms the cache\n if (options.warmCache) {\n warmStrategyCache({ urls: options.warmCache, strategy });\n }\n}\nexport { imageCache };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { setCatchHandler } from 'workbox-routing/setCatchHandler.js';\nimport { matchPrecache } from 'workbox-precaching/matchPrecache.js';\nimport './_version.js';\n/**\n * An implementation of the [comprehensive fallbacks recipe]{@link https://developers.google.com/web/tools/workbox/guides/advanced-recipes#comprehensive_fallbacks}. Be sure to include the fallbacks in your precache injection\n *\n * @memberof workbox-recipes\n *\n * @param {Object} [options]\n * @param {string} [options.pageFallback] Precache name to match for pag fallbacks. Defaults to offline.html\n * @param {string} [options.imageFallback] Precache name to match for image fallbacks.\n * @param {string} [options.fontFallback] Precache name to match for font fallbacks.\n */\nfunction offlineFallback(options = {}) {\n const pageFallback = options.pageFallback || 'offline.html';\n const imageFallback = options.imageFallback || false;\n const fontFallback = options.fontFallback || false;\n self.addEventListener('install', (event) => {\n const files = [pageFallback];\n if (imageFallback) {\n files.push(imageFallback);\n }\n if (fontFallback) {\n files.push(fontFallback);\n }\n event.waitUntil(self.caches\n .open('workbox-offline-fallbacks')\n .then((cache) => cache.addAll(files)));\n });\n const handler = async (options) => {\n const dest = options.request.destination;\n const cache = await self.caches.open('workbox-offline-fallbacks');\n if (dest === 'document') {\n const match = (await matchPrecache(pageFallback)) ||\n (await cache.match(pageFallback));\n return match || Response.error();\n }\n if (dest === 'image' && imageFallback !== false) {\n const match = (await matchPrecache(imageFallback)) ||\n (await cache.match(imageFallback));\n return match || Response.error();\n }\n if (dest === 'font' && fontFallback !== false) {\n const match = (await matchPrecache(fontFallback)) ||\n (await cache.match(fontFallback));\n return match || Response.error();\n }\n return Response.error();\n };\n setCatchHandler(handler);\n}\nexport { offlineFallback };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { warmStrategyCache } from './warmStrategyCache';\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { NetworkFirst } from 'workbox-strategies/NetworkFirst.js';\nimport { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin.js';\nimport './_version.js';\n/**\n * An implementation of a page caching recipe with a network timeout\n *\n * @memberof workbox-recipes\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Name for cache. Defaults to pages\n * @param {RouteMatchCallback} [options.matchCallback] Workbox callback function to call to match to. Defaults to request.mode === 'navigate';\n * @param {number} [options.networkTimoutSeconds] Maximum amount of time, in seconds, to wait on the network before falling back to cache. Defaults to 3\n * @param {WorkboxPlugin[]} [options.plugins] Additional plugins to use for this recipe\n * @param {string[]} [options.warmCache] Paths to call to use to warm this cache\n */\nfunction pageCache(options = {}) {\n const defaultMatchCallback = ({ request }) => request.mode === 'navigate';\n const cacheName = options.cacheName || 'pages';\n const matchCallback = options.matchCallback || defaultMatchCallback;\n const networkTimeoutSeconds = options.networkTimeoutSeconds || 3;\n const plugins = options.plugins || [];\n plugins.push(new CacheableResponsePlugin({\n statuses: [0, 200],\n }));\n const strategy = new NetworkFirst({\n networkTimeoutSeconds,\n cacheName,\n plugins,\n });\n // Registers the route\n registerRoute(matchCallback, strategy);\n // Warms the cache\n if (options.warmCache) {\n warmStrategyCache({ urls: options.warmCache, strategy });\n }\n}\nexport { pageCache };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { warmStrategyCache } from './warmStrategyCache';\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { StaleWhileRevalidate } from 'workbox-strategies/StaleWhileRevalidate.js';\nimport { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin.js';\nimport './_version.js';\n/**\n * An implementation of the [CSS and JavaScript files recipe]{@link https://developers.google.com/web/tools/workbox/guides/common-recipes#cache_css_and_javascript_files}\n *\n * @memberof workbox-recipes\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Name for cache. Defaults to static-resources\n * @param {RouteMatchCallback} [options.matchCallback] Workbox callback function to call to match to. Defaults to request.destination === 'style' || request.destination === 'script' || request.destination === 'worker';\n * @param {WorkboxPlugin[]} [options.plugins] Additional plugins to use for this recipe\n * @param {string[]} [options.warmCache] Paths to call to use to warm this cache\n */\nfunction staticResourceCache(options = {}) {\n const defaultMatchCallback = ({ request }) => request.destination === 'style' ||\n request.destination === 'script' ||\n request.destination === 'worker';\n const cacheName = options.cacheName || 'static-resources';\n const matchCallback = options.matchCallback || defaultMatchCallback;\n const plugins = options.plugins || [];\n plugins.push(new CacheableResponsePlugin({\n statuses: [0, 200],\n }));\n const strategy = new StaleWhileRevalidate({\n cacheName,\n plugins,\n });\n registerRoute(matchCallback, strategy);\n // Warms the cache\n if (options.warmCache) {\n warmStrategyCache({ urls: options.warmCache, strategy });\n }\n}\nexport { staticResourceCache };\n"],"names":["self","_","e","warmStrategyCache","options","addEventListener","event","done","urls","map","path","strategy","handleAll","request","Request","waitUntil","Promise","all","sheetCacheName","cachePrefix","fontCacheName","maxAgeSeconds","maxEntries","registerRoute","url","origin","StaleWhileRevalidate","cacheName","CacheFirst","plugins","CacheableResponsePlugin","statuses","ExpirationPlugin","matchCallback","defaultMatchCallback","destination","push","warmCache","pageFallback","imageFallback","fontFallback","files","caches","open","then","cache","addAll","setCatchHandler","async","dest","matchPrecache","match","Response","error","mode","networkTimeoutSeconds","NetworkFirst"],"mappings":"4FAEA,IACIA,KAAK,0BAA4BC,GACrC,CACA,MAAOC,GAAK,CCGZ,SAASC,EAAkBC,GACvBJ,KAAKK,iBAAiB,WAAYC,IAC9B,MAAMC,EAAOH,EAAQI,KAAKC,KAAKC,GAASN,EAAQO,SAASC,UAAU,CAC/DN,QACAO,QAAS,IAAIC,QAAQJ,KACtB,KACHJ,EAAMS,UAAUC,QAAQC,IAAIV,GAAM,GAE1C,2BCOA,SAA0BH,EAAU,IAChC,MAAMc,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EK,KAAMJ,EAAQiC,UAAW1B,YAErD"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-routing.dev.js b/docs/workbox-v7.4.1/workbox-routing.dev.js deleted file mode 100644 index 62c5b2b9..00000000 --- a/docs/workbox-v7.4.1/workbox-routing.dev.js +++ /dev/null @@ -1,884 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.routing = (function (exports, assert_js, logger_js, WorkboxError_js, getFriendlyURL_js) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:routing:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * The default HTTP method, 'GET', used when there's no specific method - * configured for a route. - * - * @type {string} - * - * @private - */ - const defaultMethod = 'GET'; - /** - * The list of valid HTTP methods associated with requests that could be routed. - * - * @type {Array} - * - * @private - */ - const validMethods = ['DELETE', 'GET', 'HEAD', 'PATCH', 'POST', 'PUT']; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * @param {function()|Object} handler Either a function, or an object with a - * 'handle' method. - * @return {Object} An object with a handle method. - * - * @private - */ - const normalizeHandler = handler => { - if (handler && typeof handler === 'object') { - { - assert_js.assert.hasMethod(handler, 'handle', { - moduleName: 'workbox-routing', - className: 'Route', - funcName: 'constructor', - paramName: 'handler' - }); - } - return handler; - } else { - { - assert_js.assert.isType(handler, 'function', { - moduleName: 'workbox-routing', - className: 'Route', - funcName: 'constructor', - paramName: 'handler' - }); - } - return { - handle: handler - }; - } - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A `Route` consists of a pair of callback functions, "match" and "handler". - * The "match" callback determine if a route should be used to "handle" a - * request by returning a non-falsy value if it can. The "handler" callback - * is called when there is a match and should return a Promise that resolves - * to a `Response`. - * - * @memberof workbox-routing - */ - class Route { - /** - * Constructor for Route class. - * - * @param {workbox-routing~matchCallback} match - * A callback function that determines whether the route matches a given - * `fetch` event by returning a non-falsy value. - * @param {workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resolving to a Response. - * @param {string} [method='GET'] The HTTP method to match the Route - * against. - */ - constructor(match, handler, method = defaultMethod) { - { - assert_js.assert.isType(match, 'function', { - moduleName: 'workbox-routing', - className: 'Route', - funcName: 'constructor', - paramName: 'match' - }); - if (method) { - assert_js.assert.isOneOf(method, validMethods, { - paramName: 'method' - }); - } - } - // These values are referenced directly by Router so cannot be - // altered by minificaton. - this.handler = normalizeHandler(handler); - this.match = match; - this.method = method; - } - /** - * - * @param {workbox-routing-handlerCallback} handler A callback - * function that returns a Promise resolving to a Response - */ - setCatchHandler(handler) { - this.catchHandler = normalizeHandler(handler); - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * NavigationRoute makes it easy to create a - * {@link workbox-routing.Route} that matches for browser - * [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}. - * - * It will only match incoming Requests whose - * {@link https://fetch.spec.whatwg.org/#concept-request-mode|mode} - * is set to `navigate`. - * - * You can optionally only apply this route to a subset of navigation requests - * by using one or both of the `denylist` and `allowlist` parameters. - * - * @memberof workbox-routing - * @extends workbox-routing.Route - */ - class NavigationRoute extends Route { - /** - * If both `denylist` and `allowlist` are provided, the `denylist` will - * take precedence and the request will not match this route. - * - * The regular expressions in `allowlist` and `denylist` - * are matched against the concatenated - * [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname} - * and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search} - * portions of the requested URL. - * - * *Note*: These RegExps may be evaluated against every destination URL during - * a navigation. Avoid using - * [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077), - * or else your users may see delays when navigating your site. - * - * @param {workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resulting in a Response. - * @param {Object} options - * @param {Array} [options.denylist] If any of these patterns match, - * the route will not handle the request (even if a allowlist RegExp matches). - * @param {Array} [options.allowlist=[/./]] If any of these patterns - * match the URL's pathname and search parameter, the route will handle the - * request (assuming the denylist doesn't match). - */ - constructor(handler, { - allowlist = [/./], - denylist = [] - } = {}) { - { - assert_js.assert.isArrayOfClass(allowlist, RegExp, { - moduleName: 'workbox-routing', - className: 'NavigationRoute', - funcName: 'constructor', - paramName: 'options.allowlist' - }); - assert_js.assert.isArrayOfClass(denylist, RegExp, { - moduleName: 'workbox-routing', - className: 'NavigationRoute', - funcName: 'constructor', - paramName: 'options.denylist' - }); - } - super(options => this._match(options), handler); - this._allowlist = allowlist; - this._denylist = denylist; - } - /** - * Routes match handler. - * - * @param {Object} options - * @param {URL} options.url - * @param {Request} options.request - * @return {boolean} - * - * @private - */ - _match({ - url, - request - }) { - if (request && request.mode !== 'navigate') { - return false; - } - const pathnameAndSearch = url.pathname + url.search; - for (const regExp of this._denylist) { - if (regExp.test(pathnameAndSearch)) { - { - logger_js.logger.log(`The navigation route ${pathnameAndSearch} is not ` + `being used, since the URL matches this denylist pattern: ` + `${regExp.toString()}`); - } - return false; - } - } - if (this._allowlist.some(regExp => regExp.test(pathnameAndSearch))) { - { - logger_js.logger.debug(`The navigation route ${pathnameAndSearch} ` + `is being used.`); - } - return true; - } - { - logger_js.logger.log(`The navigation route ${pathnameAndSearch} is not ` + `being used, since the URL being navigated to doesn't ` + `match the allowlist.`); - } - return false; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * RegExpRoute makes it easy to create a regular expression based - * {@link workbox-routing.Route}. - * - * For same-origin requests the RegExp only needs to match part of the URL. For - * requests against third-party servers, you must define a RegExp that matches - * the start of the URL. - * - * @memberof workbox-routing - * @extends workbox-routing.Route - */ - class RegExpRoute extends Route { - /** - * If the regular expression contains - * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references}, - * the captured values will be passed to the - * {@link workbox-routing~handlerCallback} `params` - * argument. - * - * @param {RegExp} regExp The regular expression to match against URLs. - * @param {workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resulting in a Response. - * @param {string} [method='GET'] The HTTP method to match the Route - * against. - */ - constructor(regExp, handler, method) { - { - assert_js.assert.isInstance(regExp, RegExp, { - moduleName: 'workbox-routing', - className: 'RegExpRoute', - funcName: 'constructor', - paramName: 'pattern' - }); - } - const match = ({ - url - }) => { - const result = regExp.exec(url.href); - // Return immediately if there's no match. - if (!result) { - return; - } - // Require that the match start at the first character in the URL string - // if it's a cross-origin request. - // See https://github.com/GoogleChrome/workbox/issues/281 for the context - // behind this behavior. - if (url.origin !== location.origin && result.index !== 0) { - { - logger_js.logger.debug(`The regular expression '${regExp.toString()}' only partially matched ` + `against the cross-origin URL '${url.toString()}'. RegExpRoute's will only ` + `handle cross-origin requests if they match the entire URL.`); - } - return; - } - // If the route matches, but there aren't any capture groups defined, then - // this will return [], which is truthy and therefore sufficient to - // indicate a match. - // If there are capture groups, then it will return their values. - return result.slice(1); - }; - super(match, handler, method); - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * The Router can be used to process a `FetchEvent` using one or more - * {@link workbox-routing.Route}, responding with a `Response` if - * a matching route exists. - * - * If no route matches a given a request, the Router will use a "default" - * handler if one is defined. - * - * Should the matching Route throw an error, the Router will use a "catch" - * handler if one is defined to gracefully deal with issues and respond with a - * Request. - * - * If a request matches multiple routes, the **earliest** registered route will - * be used to respond to the request. - * - * @memberof workbox-routing - */ - class Router { - /** - * Initializes a new Router. - */ - constructor() { - this._routes = new Map(); - this._defaultHandlerMap = new Map(); - } - /** - * @return {Map>} routes A `Map` of HTTP - * method name ('GET', etc.) to an array of all the corresponding `Route` - * instances that are registered. - */ - get routes() { - return this._routes; - } - /** - * Adds a fetch event listener to respond to events when a route matches - * the event's request. - */ - addFetchListener() { - // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705 - self.addEventListener('fetch', event => { - const { - request - } = event; - const responsePromise = this.handleRequest({ - request, - event - }); - if (responsePromise) { - event.respondWith(responsePromise); - } - }); - } - /** - * Adds a message event listener for URLs to cache from the window. - * This is useful to cache resources loaded on the page prior to when the - * service worker started controlling it. - * - * The format of the message data sent from the window should be as follows. - * Where the `urlsToCache` array may consist of URL strings or an array of - * URL string + `requestInit` object (the same as you'd pass to `fetch()`). - * - * ``` - * { - * type: 'CACHE_URLS', - * payload: { - * urlsToCache: [ - * './script1.js', - * './script2.js', - * ['./script3.js', {mode: 'no-cors'}], - * ], - * }, - * } - * ``` - */ - addCacheListener() { - // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705 - self.addEventListener('message', event => { - // event.data is type 'any' - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (event.data && event.data.type === 'CACHE_URLS') { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const { - payload - } = event.data; - { - logger_js.logger.debug(`Caching URLs from the window`, payload.urlsToCache); - } - const requestPromises = Promise.all(payload.urlsToCache.map(entry => { - if (typeof entry === 'string') { - entry = [entry]; - } - const request = new Request(...entry); - return this.handleRequest({ - request, - event - }); - // TODO(philipwalton): TypeScript errors without this typecast for - // some reason (probably a bug). The real type here should work but - // doesn't: `Array | undefined>`. - })); // TypeScript - event.waitUntil(requestPromises); - // If a MessageChannel was used, reply to the message on success. - if (event.ports && event.ports[0]) { - void requestPromises.then(() => event.ports[0].postMessage(true)); - } - } - }); - } - /** - * Apply the routing rules to a FetchEvent object to get a Response from an - * appropriate Route's handler. - * - * @param {Object} options - * @param {Request} options.request The request to handle. - * @param {ExtendableEvent} options.event The event that triggered the - * request. - * @return {Promise|undefined} A promise is returned if a - * registered route can handle the request. If there is no matching - * route and there's no `defaultHandler`, `undefined` is returned. - */ - handleRequest({ - request, - event - }) { - { - assert_js.assert.isInstance(request, Request, { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'handleRequest', - paramName: 'options.request' - }); - } - const url = new URL(request.url, location.href); - if (!url.protocol.startsWith('http')) { - { - logger_js.logger.debug(`Workbox Router only supports URLs that start with 'http'.`); - } - return; - } - const sameOrigin = url.origin === location.origin; - const { - params, - route - } = this.findMatchingRoute({ - event, - request, - sameOrigin, - url - }); - let handler = route && route.handler; - const debugMessages = []; - { - if (handler) { - debugMessages.push([`Found a route to handle this request:`, route]); - if (params) { - debugMessages.push([`Passing the following params to the route's handler:`, params]); - } - } - } - // If we don't have a handler because there was no matching route, then - // fall back to defaultHandler if that's defined. - const method = request.method; - if (!handler && this._defaultHandlerMap.has(method)) { - { - debugMessages.push(`Failed to find a matching route. Falling ` + `back to the default handler for ${method}.`); - } - handler = this._defaultHandlerMap.get(method); - } - if (!handler) { - { - // No handler so Workbox will do nothing. If logs is set of debug - // i.e. verbose, we should print out this information. - logger_js.logger.debug(`No route found for: ${getFriendlyURL_js.getFriendlyURL(url)}`); - } - return; - } - { - // We have a handler, meaning Workbox is going to handle the route. - // print the routing details to the console. - logger_js.logger.groupCollapsed(`Router is responding to: ${getFriendlyURL_js.getFriendlyURL(url)}`); - debugMessages.forEach(msg => { - if (Array.isArray(msg)) { - logger_js.logger.log(...msg); - } else { - logger_js.logger.log(msg); - } - }); - logger_js.logger.groupEnd(); - } - // Wrap in try and catch in case the handle method throws a synchronous - // error. It should still callback to the catch handler. - let responsePromise; - try { - responsePromise = handler.handle({ - url, - request, - event, - params - }); - } catch (err) { - responsePromise = Promise.reject(err); - } - // Get route's catch handler, if it exists - const catchHandler = route && route.catchHandler; - if (responsePromise instanceof Promise && (this._catchHandler || catchHandler)) { - responsePromise = responsePromise.catch(async err => { - // If there's a route catch handler, process that first - if (catchHandler) { - { - // Still include URL here as it will be async from the console group - // and may not make sense without the URL - logger_js.logger.groupCollapsed(`Error thrown when responding to: ` + ` ${getFriendlyURL_js.getFriendlyURL(url)}. Falling back to route's Catch Handler.`); - logger_js.logger.error(`Error thrown by:`, route); - logger_js.logger.error(err); - logger_js.logger.groupEnd(); - } - try { - return await catchHandler.handle({ - url, - request, - event, - params - }); - } catch (catchErr) { - if (catchErr instanceof Error) { - err = catchErr; - } - } - } - if (this._catchHandler) { - { - // Still include URL here as it will be async from the console group - // and may not make sense without the URL - logger_js.logger.groupCollapsed(`Error thrown when responding to: ` + ` ${getFriendlyURL_js.getFriendlyURL(url)}. Falling back to global Catch Handler.`); - logger_js.logger.error(`Error thrown by:`, route); - logger_js.logger.error(err); - logger_js.logger.groupEnd(); - } - return this._catchHandler.handle({ - url, - request, - event - }); - } - throw err; - }); - } - return responsePromise; - } - /** - * Checks a request and URL (and optionally an event) against the list of - * registered routes, and if there's a match, returns the corresponding - * route along with any params generated by the match. - * - * @param {Object} options - * @param {URL} options.url - * @param {boolean} options.sameOrigin The result of comparing `url.origin` - * against the current origin. - * @param {Request} options.request The request to match. - * @param {Event} options.event The corresponding event. - * @return {Object} An object with `route` and `params` properties. - * They are populated if a matching route was found or `undefined` - * otherwise. - */ - findMatchingRoute({ - url, - sameOrigin, - request, - event - }) { - const routes = this._routes.get(request.method) || []; - for (const route of routes) { - let params; - // route.match returns type any, not possible to change right now. - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const matchResult = route.match({ - url, - sameOrigin, - request, - event - }); - if (matchResult) { - { - // Warn developers that using an async matchCallback is almost always - // not the right thing to do. - if (matchResult instanceof Promise) { - logger_js.logger.warn(`While routing ${getFriendlyURL_js.getFriendlyURL(url)}, an async ` + `matchCallback function was used. Please convert the ` + `following route to use a synchronous matchCallback function:`, route); - } - } - // See https://github.com/GoogleChrome/workbox/issues/2079 - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - params = matchResult; - if (Array.isArray(params) && params.length === 0) { - // Instead of passing an empty array in as params, use undefined. - params = undefined; - } else if (matchResult.constructor === Object && - // eslint-disable-line - Object.keys(matchResult).length === 0) { - // Instead of passing an empty object in as params, use undefined. - params = undefined; - } else if (typeof matchResult === 'boolean') { - // For the boolean value true (rather than just something truth-y), - // don't set params. - // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353 - params = undefined; - } - // Return early if have a match. - return { - route, - params - }; - } - } - // If no match was found above, return and empty object. - return {}; - } - /** - * Define a default `handler` that's called when no routes explicitly - * match the incoming request. - * - * Each HTTP method ('GET', 'POST', etc.) gets its own default handler. - * - * Without a default handler, unmatched requests will go against the - * network as if there were no service worker present. - * - * @param {workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resulting in a Response. - * @param {string} [method='GET'] The HTTP method to associate with this - * default handler. Each method has its own default. - */ - setDefaultHandler(handler, method = defaultMethod) { - this._defaultHandlerMap.set(method, normalizeHandler(handler)); - } - /** - * If a Route throws an error while handling a request, this `handler` - * will be called and given a chance to provide a response. - * - * @param {workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resulting in a Response. - */ - setCatchHandler(handler) { - this._catchHandler = normalizeHandler(handler); - } - /** - * Registers a route with the router. - * - * @param {workbox-routing.Route} route The route to register. - */ - registerRoute(route) { - { - assert_js.assert.isType(route, 'object', { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'registerRoute', - paramName: 'route' - }); - assert_js.assert.hasMethod(route, 'match', { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'registerRoute', - paramName: 'route' - }); - assert_js.assert.isType(route.handler, 'object', { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'registerRoute', - paramName: 'route' - }); - assert_js.assert.hasMethod(route.handler, 'handle', { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'registerRoute', - paramName: 'route.handler' - }); - assert_js.assert.isType(route.method, 'string', { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'registerRoute', - paramName: 'route.method' - }); - } - if (!this._routes.has(route.method)) { - this._routes.set(route.method, []); - } - // Give precedence to all of the earlier routes by adding this additional - // route to the end of the array. - this._routes.get(route.method).push(route); - } - /** - * Unregisters a route with the router. - * - * @param {workbox-routing.Route} route The route to unregister. - */ - unregisterRoute(route) { - if (!this._routes.has(route.method)) { - throw new WorkboxError_js.WorkboxError('unregister-route-but-not-found-with-method', { - method: route.method - }); - } - const routeIndex = this._routes.get(route.method).indexOf(route); - if (routeIndex > -1) { - this._routes.get(route.method).splice(routeIndex, 1); - } else { - throw new WorkboxError_js.WorkboxError('unregister-route-route-not-registered'); - } - } - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - let defaultRouter; - /** - * Creates a new, singleton Router instance if one does not exist. If one - * does already exist, that instance is returned. - * - * @private - * @return {Router} - */ - const getOrCreateDefaultRouter = () => { - if (!defaultRouter) { - defaultRouter = new Router(); - // The helpers that use the default Router assume these listeners exist. - defaultRouter.addFetchListener(); - defaultRouter.addCacheListener(); - } - return defaultRouter; - }; - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Easily register a RegExp, string, or function with a caching - * strategy to a singleton Router instance. - * - * This method will generate a Route for you if needed and - * call {@link workbox-routing.Router#registerRoute}. - * - * @param {RegExp|string|workbox-routing.Route~matchCallback|workbox-routing.Route} capture - * If the capture param is a `Route`, all other arguments will be ignored. - * @param {workbox-routing~handlerCallback} [handler] A callback - * function that returns a Promise resulting in a Response. This parameter - * is required if `capture` is not a `Route` object. - * @param {string} [method='GET'] The HTTP method to match the Route - * against. - * @return {workbox-routing.Route} The generated `Route`. - * - * @memberof workbox-routing - */ - function registerRoute(capture, handler, method) { - let route; - if (typeof capture === 'string') { - const captureUrl = new URL(capture, location.href); - { - if (!(capture.startsWith('/') || capture.startsWith('http'))) { - throw new WorkboxError_js.WorkboxError('invalid-string', { - moduleName: 'workbox-routing', - funcName: 'registerRoute', - paramName: 'capture' - }); - } - // We want to check if Express-style wildcards are in the pathname only. - // TODO: Remove this log message in v4. - const valueToCheck = capture.startsWith('http') ? captureUrl.pathname : capture; - // See https://github.com/pillarjs/path-to-regexp#parameters - const wildcards = '[*:?+]'; - if (new RegExp(`${wildcards}`).exec(valueToCheck)) { - logger_js.logger.debug(`The '$capture' parameter contains an Express-style wildcard ` + `character (${wildcards}). Strings are now always interpreted as ` + `exact matches; use a RegExp for partial or wildcard matches.`); - } - } - const matchCallback = ({ - url - }) => { - { - if (url.pathname === captureUrl.pathname && url.origin !== captureUrl.origin) { - logger_js.logger.debug(`${capture} only partially matches the cross-origin URL ` + `${url.toString()}. This route will only handle cross-origin requests ` + `if they match the entire URL.`); - } - } - return url.href === captureUrl.href; - }; - // If `capture` is a string then `handler` and `method` must be present. - route = new Route(matchCallback, handler, method); - } else if (capture instanceof RegExp) { - // If `capture` is a `RegExp` then `handler` and `method` must be present. - route = new RegExpRoute(capture, handler, method); - } else if (typeof capture === 'function') { - // If `capture` is a function then `handler` and `method` must be present. - route = new Route(capture, handler, method); - } else if (capture instanceof Route) { - route = capture; - } else { - throw new WorkboxError_js.WorkboxError('unsupported-route-type', { - moduleName: 'workbox-routing', - funcName: 'registerRoute', - paramName: 'capture' - }); - } - const defaultRouter = getOrCreateDefaultRouter(); - defaultRouter.registerRoute(route); - return route; - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * If a Route throws an error while handling a request, this `handler` - * will be called and given a chance to provide a response. - * - * @param {workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resulting in a Response. - * - * @memberof workbox-routing - */ - function setCatchHandler(handler) { - const defaultRouter = getOrCreateDefaultRouter(); - defaultRouter.setCatchHandler(handler); - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Define a default `handler` that's called when no routes explicitly - * match the incoming request. - * - * Without a default handler, unmatched requests will go against the - * network as if there were no service worker present. - * - * @param {workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resulting in a Response. - * - * @memberof workbox-routing - */ - function setDefaultHandler(handler) { - const defaultRouter = getOrCreateDefaultRouter(); - defaultRouter.setDefaultHandler(handler); - } - - exports.NavigationRoute = NavigationRoute; - exports.RegExpRoute = RegExpRoute; - exports.Route = Route; - exports.Router = Router; - exports.registerRoute = registerRoute; - exports.setCatchHandler = setCatchHandler; - exports.setDefaultHandler = setDefaultHandler; - - return exports; - -})({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private); -//# sourceMappingURL=workbox-routing.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-routing.dev.js.map b/docs/workbox-v7.4.1/workbox-routing.dev.js.map deleted file mode 100644 index 7e0bfbce..00000000 --- a/docs/workbox-v7.4.1/workbox-routing.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-routing.dev.js","sources":["../_version.js","../utils/constants.js","../utils/normalizeHandler.js","../Route.js","../NavigationRoute.js","../RegExpRoute.js","../Router.js","../utils/getOrCreateDefaultRouter.js","../registerRoute.js","../setCatchHandler.js","../setDefaultHandler.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:routing:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The default HTTP method, 'GET', used when there's no specific method\n * configured for a route.\n *\n * @type {string}\n *\n * @private\n */\nexport const defaultMethod = 'GET';\n/**\n * The list of valid HTTP methods associated with requests that could be routed.\n *\n * @type {Array}\n *\n * @private\n */\nexport const validMethods = [\n 'DELETE',\n 'GET',\n 'HEAD',\n 'PATCH',\n 'POST',\n 'PUT',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {function()|Object} handler Either a function, or an object with a\n * 'handle' method.\n * @return {Object} An object with a handle method.\n *\n * @private\n */\nexport const normalizeHandler = (handler) => {\n if (handler && typeof handler === 'object') {\n if (process.env.NODE_ENV !== 'production') {\n assert.hasMethod(handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return handler;\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(handler, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return { handle: handler };\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { defaultMethod, validMethods } from './utils/constants.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport './_version.js';\n/**\n * A `Route` consists of a pair of callback functions, \"match\" and \"handler\".\n * The \"match\" callback determine if a route should be used to \"handle\" a\n * request by returning a non-falsy value if it can. The \"handler\" callback\n * is called when there is a match and should return a Promise that resolves\n * to a `Response`.\n *\n * @memberof workbox-routing\n */\nclass Route {\n /**\n * Constructor for Route class.\n *\n * @param {workbox-routing~matchCallback} match\n * A callback function that determines whether the route matches a given\n * `fetch` event by returning a non-falsy value.\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(match, handler, method = defaultMethod) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(match, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'match',\n });\n if (method) {\n assert.isOneOf(method, validMethods, { paramName: 'method' });\n }\n }\n // These values are referenced directly by Router so cannot be\n // altered by minificaton.\n this.handler = normalizeHandler(handler);\n this.match = match;\n this.method = method;\n }\n /**\n *\n * @param {workbox-routing-handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response\n */\n setCatchHandler(handler) {\n this.catchHandler = normalizeHandler(handler);\n }\n}\nexport { Route };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from './Route.js';\nimport './_version.js';\n/**\n * NavigationRoute makes it easy to create a\n * {@link workbox-routing.Route} that matches for browser\n * [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}.\n *\n * It will only match incoming Requests whose\n * {@link https://fetch.spec.whatwg.org/#concept-request-mode|mode}\n * is set to `navigate`.\n *\n * You can optionally only apply this route to a subset of navigation requests\n * by using one or both of the `denylist` and `allowlist` parameters.\n *\n * @memberof workbox-routing\n * @extends workbox-routing.Route\n */\nclass NavigationRoute extends Route {\n /**\n * If both `denylist` and `allowlist` are provided, the `denylist` will\n * take precedence and the request will not match this route.\n *\n * The regular expressions in `allowlist` and `denylist`\n * are matched against the concatenated\n * [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname}\n * and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search}\n * portions of the requested URL.\n *\n * *Note*: These RegExps may be evaluated against every destination URL during\n * a navigation. Avoid using\n * [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077),\n * or else your users may see delays when navigating your site.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {Object} options\n * @param {Array} [options.denylist] If any of these patterns match,\n * the route will not handle the request (even if a allowlist RegExp matches).\n * @param {Array} [options.allowlist=[/./]] If any of these patterns\n * match the URL's pathname and search parameter, the route will handle the\n * request (assuming the denylist doesn't match).\n */\n constructor(handler, { allowlist = [/./], denylist = [] } = {}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArrayOfClass(allowlist, RegExp, {\n moduleName: 'workbox-routing',\n className: 'NavigationRoute',\n funcName: 'constructor',\n paramName: 'options.allowlist',\n });\n assert.isArrayOfClass(denylist, RegExp, {\n moduleName: 'workbox-routing',\n className: 'NavigationRoute',\n funcName: 'constructor',\n paramName: 'options.denylist',\n });\n }\n super((options) => this._match(options), handler);\n this._allowlist = allowlist;\n this._denylist = denylist;\n }\n /**\n * Routes match handler.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {Request} options.request\n * @return {boolean}\n *\n * @private\n */\n _match({ url, request }) {\n if (request && request.mode !== 'navigate') {\n return false;\n }\n const pathnameAndSearch = url.pathname + url.search;\n for (const regExp of this._denylist) {\n if (regExp.test(pathnameAndSearch)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The navigation route ${pathnameAndSearch} is not ` +\n `being used, since the URL matches this denylist pattern: ` +\n `${regExp.toString()}`);\n }\n return false;\n }\n }\n if (this._allowlist.some((regExp) => regExp.test(pathnameAndSearch))) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The navigation route ${pathnameAndSearch} ` + `is being used.`);\n }\n return true;\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The navigation route ${pathnameAndSearch} is not ` +\n `being used, since the URL being navigated to doesn't ` +\n `match the allowlist.`);\n }\n return false;\n }\n}\nexport { NavigationRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from './Route.js';\nimport './_version.js';\n/**\n * RegExpRoute makes it easy to create a regular expression based\n * {@link workbox-routing.Route}.\n *\n * For same-origin requests the RegExp only needs to match part of the URL. For\n * requests against third-party servers, you must define a RegExp that matches\n * the start of the URL.\n *\n * @memberof workbox-routing\n * @extends workbox-routing.Route\n */\nclass RegExpRoute extends Route {\n /**\n * If the regular expression contains\n * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},\n * the captured values will be passed to the\n * {@link workbox-routing~handlerCallback} `params`\n * argument.\n *\n * @param {RegExp} regExp The regular expression to match against URLs.\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(regExp, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(regExp, RegExp, {\n moduleName: 'workbox-routing',\n className: 'RegExpRoute',\n funcName: 'constructor',\n paramName: 'pattern',\n });\n }\n const match = ({ url }) => {\n const result = regExp.exec(url.href);\n // Return immediately if there's no match.\n if (!result) {\n return;\n }\n // Require that the match start at the first character in the URL string\n // if it's a cross-origin request.\n // See https://github.com/GoogleChrome/workbox/issues/281 for the context\n // behind this behavior.\n if (url.origin !== location.origin && result.index !== 0) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The regular expression '${regExp.toString()}' only partially matched ` +\n `against the cross-origin URL '${url.toString()}'. RegExpRoute's will only ` +\n `handle cross-origin requests if they match the entire URL.`);\n }\n return;\n }\n // If the route matches, but there aren't any capture groups defined, then\n // this will return [], which is truthy and therefore sufficient to\n // indicate a match.\n // If there are capture groups, then it will return their values.\n return result.slice(1);\n };\n super(match, handler, method);\n }\n}\nexport { RegExpRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { defaultMethod } from './utils/constants.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\n/**\n * The Router can be used to process a `FetchEvent` using one or more\n * {@link workbox-routing.Route}, responding with a `Response` if\n * a matching route exists.\n *\n * If no route matches a given a request, the Router will use a \"default\"\n * handler if one is defined.\n *\n * Should the matching Route throw an error, the Router will use a \"catch\"\n * handler if one is defined to gracefully deal with issues and respond with a\n * Request.\n *\n * If a request matches multiple routes, the **earliest** registered route will\n * be used to respond to the request.\n *\n * @memberof workbox-routing\n */\nclass Router {\n /**\n * Initializes a new Router.\n */\n constructor() {\n this._routes = new Map();\n this._defaultHandlerMap = new Map();\n }\n /**\n * @return {Map>} routes A `Map` of HTTP\n * method name ('GET', etc.) to an array of all the corresponding `Route`\n * instances that are registered.\n */\n get routes() {\n return this._routes;\n }\n /**\n * Adds a fetch event listener to respond to events when a route matches\n * the event's request.\n */\n addFetchListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('fetch', ((event) => {\n const { request } = event;\n const responsePromise = this.handleRequest({ request, event });\n if (responsePromise) {\n event.respondWith(responsePromise);\n }\n }));\n }\n /**\n * Adds a message event listener for URLs to cache from the window.\n * This is useful to cache resources loaded on the page prior to when the\n * service worker started controlling it.\n *\n * The format of the message data sent from the window should be as follows.\n * Where the `urlsToCache` array may consist of URL strings or an array of\n * URL string + `requestInit` object (the same as you'd pass to `fetch()`).\n *\n * ```\n * {\n * type: 'CACHE_URLS',\n * payload: {\n * urlsToCache: [\n * './script1.js',\n * './script2.js',\n * ['./script3.js', {mode: 'no-cors'}],\n * ],\n * },\n * }\n * ```\n */\n addCacheListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('message', ((event) => {\n // event.data is type 'any'\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (event.data && event.data.type === 'CACHE_URLS') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { payload } = event.data;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Caching URLs from the window`, payload.urlsToCache);\n }\n const requestPromises = Promise.all(payload.urlsToCache.map((entry) => {\n if (typeof entry === 'string') {\n entry = [entry];\n }\n const request = new Request(...entry);\n return this.handleRequest({ request, event });\n // TODO(philipwalton): TypeScript errors without this typecast for\n // some reason (probably a bug). The real type here should work but\n // doesn't: `Array | undefined>`.\n })); // TypeScript\n event.waitUntil(requestPromises);\n // If a MessageChannel was used, reply to the message on success.\n if (event.ports && event.ports[0]) {\n void requestPromises.then(() => event.ports[0].postMessage(true));\n }\n }\n }));\n }\n /**\n * Apply the routing rules to a FetchEvent object to get a Response from an\n * appropriate Route's handler.\n *\n * @param {Object} options\n * @param {Request} options.request The request to handle.\n * @param {ExtendableEvent} options.event The event that triggered the\n * request.\n * @return {Promise|undefined} A promise is returned if a\n * registered route can handle the request. If there is no matching\n * route and there's no `defaultHandler`, `undefined` is returned.\n */\n handleRequest({ request, event, }) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'handleRequest',\n paramName: 'options.request',\n });\n }\n const url = new URL(request.url, location.href);\n if (!url.protocol.startsWith('http')) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Workbox Router only supports URLs that start with 'http'.`);\n }\n return;\n }\n const sameOrigin = url.origin === location.origin;\n const { params, route } = this.findMatchingRoute({\n event,\n request,\n sameOrigin,\n url,\n });\n let handler = route && route.handler;\n const debugMessages = [];\n if (process.env.NODE_ENV !== 'production') {\n if (handler) {\n debugMessages.push([`Found a route to handle this request:`, route]);\n if (params) {\n debugMessages.push([\n `Passing the following params to the route's handler:`,\n params,\n ]);\n }\n }\n }\n // If we don't have a handler because there was no matching route, then\n // fall back to defaultHandler if that's defined.\n const method = request.method;\n if (!handler && this._defaultHandlerMap.has(method)) {\n if (process.env.NODE_ENV !== 'production') {\n debugMessages.push(`Failed to find a matching route. Falling ` +\n `back to the default handler for ${method}.`);\n }\n handler = this._defaultHandlerMap.get(method);\n }\n if (!handler) {\n if (process.env.NODE_ENV !== 'production') {\n // No handler so Workbox will do nothing. If logs is set of debug\n // i.e. verbose, we should print out this information.\n logger.debug(`No route found for: ${getFriendlyURL(url)}`);\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // We have a handler, meaning Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);\n debugMessages.forEach((msg) => {\n if (Array.isArray(msg)) {\n logger.log(...msg);\n }\n else {\n logger.log(msg);\n }\n });\n logger.groupEnd();\n }\n // Wrap in try and catch in case the handle method throws a synchronous\n // error. It should still callback to the catch handler.\n let responsePromise;\n try {\n responsePromise = handler.handle({ url, request, event, params });\n }\n catch (err) {\n responsePromise = Promise.reject(err);\n }\n // Get route's catch handler, if it exists\n const catchHandler = route && route.catchHandler;\n if (responsePromise instanceof Promise &&\n (this._catchHandler || catchHandler)) {\n responsePromise = responsePromise.catch(async (err) => {\n // If there's a route catch handler, process that first\n if (catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to route's Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n try {\n return await catchHandler.handle({ url, request, event, params });\n }\n catch (catchErr) {\n if (catchErr instanceof Error) {\n err = catchErr;\n }\n }\n }\n if (this._catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to global Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n return this._catchHandler.handle({ url, request, event });\n }\n throw err;\n });\n }\n return responsePromise;\n }\n /**\n * Checks a request and URL (and optionally an event) against the list of\n * registered routes, and if there's a match, returns the corresponding\n * route along with any params generated by the match.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {boolean} options.sameOrigin The result of comparing `url.origin`\n * against the current origin.\n * @param {Request} options.request The request to match.\n * @param {Event} options.event The corresponding event.\n * @return {Object} An object with `route` and `params` properties.\n * They are populated if a matching route was found or `undefined`\n * otherwise.\n */\n findMatchingRoute({ url, sameOrigin, request, event, }) {\n const routes = this._routes.get(request.method) || [];\n for (const route of routes) {\n let params;\n // route.match returns type any, not possible to change right now.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const matchResult = route.match({ url, sameOrigin, request, event });\n if (matchResult) {\n if (process.env.NODE_ENV !== 'production') {\n // Warn developers that using an async matchCallback is almost always\n // not the right thing to do.\n if (matchResult instanceof Promise) {\n logger.warn(`While routing ${getFriendlyURL(url)}, an async ` +\n `matchCallback function was used. Please convert the ` +\n `following route to use a synchronous matchCallback function:`, route);\n }\n }\n // See https://github.com/GoogleChrome/workbox/issues/2079\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n params = matchResult;\n if (Array.isArray(params) && params.length === 0) {\n // Instead of passing an empty array in as params, use undefined.\n params = undefined;\n }\n else if (matchResult.constructor === Object && // eslint-disable-line\n Object.keys(matchResult).length === 0) {\n // Instead of passing an empty object in as params, use undefined.\n params = undefined;\n }\n else if (typeof matchResult === 'boolean') {\n // For the boolean value true (rather than just something truth-y),\n // don't set params.\n // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353\n params = undefined;\n }\n // Return early if have a match.\n return { route, params };\n }\n }\n // If no match was found above, return and empty object.\n return {};\n }\n /**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Each HTTP method ('GET', 'POST', etc.) gets its own default handler.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to associate with this\n * default handler. Each method has its own default.\n */\n setDefaultHandler(handler, method = defaultMethod) {\n this._defaultHandlerMap.set(method, normalizeHandler(handler));\n }\n /**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setCatchHandler(handler) {\n this._catchHandler = normalizeHandler(handler);\n }\n /**\n * Registers a route with the router.\n *\n * @param {workbox-routing.Route} route The route to register.\n */\n registerRoute(route) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(route, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route, 'match', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.isType(route.handler, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route.handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.handler',\n });\n assert.isType(route.method, 'string', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.method',\n });\n }\n if (!this._routes.has(route.method)) {\n this._routes.set(route.method, []);\n }\n // Give precedence to all of the earlier routes by adding this additional\n // route to the end of the array.\n this._routes.get(route.method).push(route);\n }\n /**\n * Unregisters a route with the router.\n *\n * @param {workbox-routing.Route} route The route to unregister.\n */\n unregisterRoute(route) {\n if (!this._routes.has(route.method)) {\n throw new WorkboxError('unregister-route-but-not-found-with-method', {\n method: route.method,\n });\n }\n const routeIndex = this._routes.get(route.method).indexOf(route);\n if (routeIndex > -1) {\n this._routes.get(route.method).splice(routeIndex, 1);\n }\n else {\n throw new WorkboxError('unregister-route-route-not-registered');\n }\n }\n}\nexport { Router };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Router } from '../Router.js';\nimport '../_version.js';\nlet defaultRouter;\n/**\n * Creates a new, singleton Router instance if one does not exist. If one\n * does already exist, that instance is returned.\n *\n * @private\n * @return {Router}\n */\nexport const getOrCreateDefaultRouter = () => {\n if (!defaultRouter) {\n defaultRouter = new Router();\n // The helpers that use the default Router assume these listeners exist.\n defaultRouter.addFetchListener();\n defaultRouter.addCacheListener();\n }\n return defaultRouter;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Route } from './Route.js';\nimport { RegExpRoute } from './RegExpRoute.js';\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * Easily register a RegExp, string, or function with a caching\n * strategy to a singleton Router instance.\n *\n * This method will generate a Route for you if needed and\n * call {@link workbox-routing.Router#registerRoute}.\n *\n * @param {RegExp|string|workbox-routing.Route~matchCallback|workbox-routing.Route} capture\n * If the capture param is a `Route`, all other arguments will be ignored.\n * @param {workbox-routing~handlerCallback} [handler] A callback\n * function that returns a Promise resulting in a Response. This parameter\n * is required if `capture` is not a `Route` object.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n * @return {workbox-routing.Route} The generated `Route`.\n *\n * @memberof workbox-routing\n */\nfunction registerRoute(capture, handler, method) {\n let route;\n if (typeof capture === 'string') {\n const captureUrl = new URL(capture, location.href);\n if (process.env.NODE_ENV !== 'production') {\n if (!(capture.startsWith('/') || capture.startsWith('http'))) {\n throw new WorkboxError('invalid-string', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n // We want to check if Express-style wildcards are in the pathname only.\n // TODO: Remove this log message in v4.\n const valueToCheck = capture.startsWith('http')\n ? captureUrl.pathname\n : capture;\n // See https://github.com/pillarjs/path-to-regexp#parameters\n const wildcards = '[*:?+]';\n if (new RegExp(`${wildcards}`).exec(valueToCheck)) {\n logger.debug(`The '$capture' parameter contains an Express-style wildcard ` +\n `character (${wildcards}). Strings are now always interpreted as ` +\n `exact matches; use a RegExp for partial or wildcard matches.`);\n }\n }\n const matchCallback = ({ url }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (url.pathname === captureUrl.pathname &&\n url.origin !== captureUrl.origin) {\n logger.debug(`${capture} only partially matches the cross-origin URL ` +\n `${url.toString()}. This route will only handle cross-origin requests ` +\n `if they match the entire URL.`);\n }\n }\n return url.href === captureUrl.href;\n };\n // If `capture` is a string then `handler` and `method` must be present.\n route = new Route(matchCallback, handler, method);\n }\n else if (capture instanceof RegExp) {\n // If `capture` is a `RegExp` then `handler` and `method` must be present.\n route = new RegExpRoute(capture, handler, method);\n }\n else if (typeof capture === 'function') {\n // If `capture` is a function then `handler` and `method` must be present.\n route = new Route(capture, handler, method);\n }\n else if (capture instanceof Route) {\n route = capture;\n }\n else {\n throw new WorkboxError('unsupported-route-type', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n return route;\n}\nexport { registerRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n *\n * @memberof workbox-routing\n */\nfunction setCatchHandler(handler) {\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.setCatchHandler(handler);\n}\nexport { setCatchHandler };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n *\n * @memberof workbox-routing\n */\nfunction setDefaultHandler(handler) {\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.setDefaultHandler(handler);\n}\nexport { setDefaultHandler };\n"],"names":["self","_","e","defaultMethod","validMethods","normalizeHandler","handler","assert","hasMethod","moduleName","className","funcName","paramName","isType","handle","Route","constructor","match","method","isOneOf","setCatchHandler","catchHandler","NavigationRoute","allowlist","denylist","isArrayOfClass","RegExp","options","_match","_allowlist","_denylist","url","request","mode","pathnameAndSearch","pathname","search","regExp","test","logger","log","toString","some","debug","RegExpRoute","isInstance","result","exec","href","origin","location","index","slice","Router","_routes","Map","_defaultHandlerMap","routes","addFetchListener","addEventListener","event","responsePromise","handleRequest","respondWith","addCacheListener","data","type","payload","urlsToCache","requestPromises","Promise","all","map","entry","Request","waitUntil","ports","then","postMessage","URL","protocol","startsWith","sameOrigin","params","route","findMatchingRoute","debugMessages","push","has","get","getFriendlyURL","groupCollapsed","forEach","msg","Array","isArray","groupEnd","err","reject","_catchHandler","catch","error","catchErr","Error","matchResult","warn","length","undefined","Object","keys","setDefaultHandler","set","registerRoute","unregisterRoute","WorkboxError","routeIndex","indexOf","splice","defaultRouter","getOrCreateDefaultRouter","capture","captureUrl","valueToCheck","wildcards","matchCallback"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,uBAAuB,CAAC,IAAIC,CAAC,EAAE;IACxC,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;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AA,aAAa,CAACR,iBAAiB,CAACxG,OAAO,CAAC;IAC5C;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-routing.prod.js b/docs/workbox-v7.4.1/workbox-routing.prod.js deleted file mode 100644 index 06a91ddc..00000000 --- a/docs/workbox-v7.4.1/workbox-routing.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.routing=function(t,e){"use strict";try{self["workbox:routing:7.4.0"]&&_()}catch(t){}const s=t=>t&&"object"==typeof t?t:{handle:t};class r{constructor(t,e,r="GET"){this.handler=s(e),this.match=t,this.method=r}setCatchHandler(t){this.catchHandler=s(t)}}class n extends r{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class i{constructor(){this.C=new Map,this.L=new Map}get routes(){return this.C}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const r=s.origin===location.origin,{params:n,route:i}=this.findMatchingRoute({event:e,request:t,sameOrigin:r,url:s});let o=i&&i.handler;const u=t.method;if(!o&&this.L.has(u)&&(o=this.L.get(u)),!o)return;let c;try{c=o.handle({url:s,request:t,event:e,params:n})}catch(t){c=Promise.reject(t)}const a=i&&i.catchHandler;return c instanceof Promise&&(this.H||a)&&(c=c.catch((async r=>{if(a)try{return await a.handle({url:s,request:t,event:e,params:n})}catch(t){t instanceof Error&&(r=t)}if(this.H)return this.H.handle({url:s,request:t,event:e});throw r}))),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:r}){const n=this.C.get(s.method)||[];for(const i of n){let n;const o=i.match({url:t,sameOrigin:e,request:s,event:r});if(o)return n=o,(Array.isArray(n)&&0===n.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(n=void 0),{route:i,params:n}}return{}}setDefaultHandler(t,e="GET"){this.L.set(e,s(t))}setCatchHandler(t){this.H=s(t)}registerRoute(t){this.C.has(t.method)||this.C.set(t.method,[]),this.C.get(t.method).push(t)}unregisterRoute(t){if(!this.C.has(t.method))throw new e.WorkboxError("unregister-route-but-not-found-with-method",{method:t.method});const s=this.C.get(t.method).indexOf(t);if(!(s>-1))throw new e.WorkboxError("unregister-route-route-not-registered");this.C.get(t.method).splice(s,1)}}let o;const u=()=>(o||(o=new i,o.addFetchListener(),o.addCacheListener()),o);return t.NavigationRoute=class extends r{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.j(t)),t),this.M=e,this.N=s}j({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.N)if(t.test(s))return!1;return!!this.M.some((t=>t.test(s)))}},t.RegExpRoute=n,t.Route=r,t.Router=i,t.registerRoute=function(t,s,i){let o;if("string"==typeof t){const e=new URL(t,location.href);o=new r((({url:t})=>t.href===e.href),s,i)}else if(t instanceof RegExp)o=new n(t,s,i);else if("function"==typeof t)o=new r(t,s,i);else{if(!(t instanceof r))throw new e.WorkboxError("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return u().registerRoute(o),o},t.setCatchHandler=function(t){u().setCatchHandler(t)},t.setDefaultHandler=function(t){u().setDefaultHandler(t)},t}({},workbox.core._private); -//# sourceMappingURL=workbox-routing.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-routing.prod.js.map b/docs/workbox-v7.4.1/workbox-routing.prod.js.map deleted file mode 100644 index 04123ca0..00000000 --- a/docs/workbox-v7.4.1/workbox-routing.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-routing.prod.js","sources":["../_version.js","../utils/constants.js","../utils/normalizeHandler.js","../Route.js","../RegExpRoute.js","../Router.js","../utils/getOrCreateDefaultRouter.js","../NavigationRoute.js","../registerRoute.js","../setCatchHandler.js","../setDefaultHandler.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:routing:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The default HTTP method, 'GET', used when there's no specific method\n * configured for a route.\n *\n * @type {string}\n *\n * @private\n */\nexport const defaultMethod = 'GET';\n/**\n * The list of valid HTTP methods associated with requests that could be routed.\n *\n * @type {Array}\n *\n * @private\n */\nexport const validMethods = [\n 'DELETE',\n 'GET',\n 'HEAD',\n 'PATCH',\n 'POST',\n 'PUT',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {function()|Object} handler Either a function, or an object with a\n * 'handle' method.\n * @return {Object} An object with a handle method.\n *\n * @private\n */\nexport const normalizeHandler = (handler) => {\n if (handler && typeof handler === 'object') {\n if (process.env.NODE_ENV !== 'production') {\n assert.hasMethod(handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return handler;\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(handler, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return { handle: handler };\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { defaultMethod, validMethods } from './utils/constants.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport './_version.js';\n/**\n * A `Route` consists of a pair of callback functions, \"match\" and \"handler\".\n * The \"match\" callback determine if a route should be used to \"handle\" a\n * request by returning a non-falsy value if it can. The \"handler\" callback\n * is called when there is a match and should return a Promise that resolves\n * to a `Response`.\n *\n * @memberof workbox-routing\n */\nclass Route {\n /**\n * Constructor for Route class.\n *\n * @param {workbox-routing~matchCallback} match\n * A callback function that determines whether the route matches a given\n * `fetch` event by returning a non-falsy value.\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(match, handler, method = defaultMethod) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(match, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'match',\n });\n if (method) {\n assert.isOneOf(method, validMethods, { paramName: 'method' });\n }\n }\n // These values are referenced directly by Router so cannot be\n // altered by minificaton.\n this.handler = normalizeHandler(handler);\n this.match = match;\n this.method = method;\n }\n /**\n *\n * @param {workbox-routing-handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response\n */\n setCatchHandler(handler) {\n this.catchHandler = normalizeHandler(handler);\n }\n}\nexport { Route };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from './Route.js';\nimport './_version.js';\n/**\n * RegExpRoute makes it easy to create a regular expression based\n * {@link workbox-routing.Route}.\n *\n * For same-origin requests the RegExp only needs to match part of the URL. For\n * requests against third-party servers, you must define a RegExp that matches\n * the start of the URL.\n *\n * @memberof workbox-routing\n * @extends workbox-routing.Route\n */\nclass RegExpRoute extends Route {\n /**\n * If the regular expression contains\n * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},\n * the captured values will be passed to the\n * {@link workbox-routing~handlerCallback} `params`\n * argument.\n *\n * @param {RegExp} regExp The regular expression to match against URLs.\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(regExp, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(regExp, RegExp, {\n moduleName: 'workbox-routing',\n className: 'RegExpRoute',\n funcName: 'constructor',\n paramName: 'pattern',\n });\n }\n const match = ({ url }) => {\n const result = regExp.exec(url.href);\n // Return immediately if there's no match.\n if (!result) {\n return;\n }\n // Require that the match start at the first character in the URL string\n // if it's a cross-origin request.\n // See https://github.com/GoogleChrome/workbox/issues/281 for the context\n // behind this behavior.\n if (url.origin !== location.origin && result.index !== 0) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The regular expression '${regExp.toString()}' only partially matched ` +\n `against the cross-origin URL '${url.toString()}'. RegExpRoute's will only ` +\n `handle cross-origin requests if they match the entire URL.`);\n }\n return;\n }\n // If the route matches, but there aren't any capture groups defined, then\n // this will return [], which is truthy and therefore sufficient to\n // indicate a match.\n // If there are capture groups, then it will return their values.\n return result.slice(1);\n };\n super(match, handler, method);\n }\n}\nexport { RegExpRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { defaultMethod } from './utils/constants.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\n/**\n * The Router can be used to process a `FetchEvent` using one or more\n * {@link workbox-routing.Route}, responding with a `Response` if\n * a matching route exists.\n *\n * If no route matches a given a request, the Router will use a \"default\"\n * handler if one is defined.\n *\n * Should the matching Route throw an error, the Router will use a \"catch\"\n * handler if one is defined to gracefully deal with issues and respond with a\n * Request.\n *\n * If a request matches multiple routes, the **earliest** registered route will\n * be used to respond to the request.\n *\n * @memberof workbox-routing\n */\nclass Router {\n /**\n * Initializes a new Router.\n */\n constructor() {\n this._routes = new Map();\n this._defaultHandlerMap = new Map();\n }\n /**\n * @return {Map>} routes A `Map` of HTTP\n * method name ('GET', etc.) to an array of all the corresponding `Route`\n * instances that are registered.\n */\n get routes() {\n return this._routes;\n }\n /**\n * Adds a fetch event listener to respond to events when a route matches\n * the event's request.\n */\n addFetchListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('fetch', ((event) => {\n const { request } = event;\n const responsePromise = this.handleRequest({ request, event });\n if (responsePromise) {\n event.respondWith(responsePromise);\n }\n }));\n }\n /**\n * Adds a message event listener for URLs to cache from the window.\n * This is useful to cache resources loaded on the page prior to when the\n * service worker started controlling it.\n *\n * The format of the message data sent from the window should be as follows.\n * Where the `urlsToCache` array may consist of URL strings or an array of\n * URL string + `requestInit` object (the same as you'd pass to `fetch()`).\n *\n * ```\n * {\n * type: 'CACHE_URLS',\n * payload: {\n * urlsToCache: [\n * './script1.js',\n * './script2.js',\n * ['./script3.js', {mode: 'no-cors'}],\n * ],\n * },\n * }\n * ```\n */\n addCacheListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('message', ((event) => {\n // event.data is type 'any'\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (event.data && event.data.type === 'CACHE_URLS') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { payload } = event.data;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Caching URLs from the window`, payload.urlsToCache);\n }\n const requestPromises = Promise.all(payload.urlsToCache.map((entry) => {\n if (typeof entry === 'string') {\n entry = [entry];\n }\n const request = new Request(...entry);\n return this.handleRequest({ request, event });\n // TODO(philipwalton): TypeScript errors without this typecast for\n // some reason (probably a bug). The real type here should work but\n // doesn't: `Array | undefined>`.\n })); // TypeScript\n event.waitUntil(requestPromises);\n // If a MessageChannel was used, reply to the message on success.\n if (event.ports && event.ports[0]) {\n void requestPromises.then(() => event.ports[0].postMessage(true));\n }\n }\n }));\n }\n /**\n * Apply the routing rules to a FetchEvent object to get a Response from an\n * appropriate Route's handler.\n *\n * @param {Object} options\n * @param {Request} options.request The request to handle.\n * @param {ExtendableEvent} options.event The event that triggered the\n * request.\n * @return {Promise|undefined} A promise is returned if a\n * registered route can handle the request. If there is no matching\n * route and there's no `defaultHandler`, `undefined` is returned.\n */\n handleRequest({ request, event, }) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'handleRequest',\n paramName: 'options.request',\n });\n }\n const url = new URL(request.url, location.href);\n if (!url.protocol.startsWith('http')) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Workbox Router only supports URLs that start with 'http'.`);\n }\n return;\n }\n const sameOrigin = url.origin === location.origin;\n const { params, route } = this.findMatchingRoute({\n event,\n request,\n sameOrigin,\n url,\n });\n let handler = route && route.handler;\n const debugMessages = [];\n if (process.env.NODE_ENV !== 'production') {\n if (handler) {\n debugMessages.push([`Found a route to handle this request:`, route]);\n if (params) {\n debugMessages.push([\n `Passing the following params to the route's handler:`,\n params,\n ]);\n }\n }\n }\n // If we don't have a handler because there was no matching route, then\n // fall back to defaultHandler if that's defined.\n const method = request.method;\n if (!handler && this._defaultHandlerMap.has(method)) {\n if (process.env.NODE_ENV !== 'production') {\n debugMessages.push(`Failed to find a matching route. Falling ` +\n `back to the default handler for ${method}.`);\n }\n handler = this._defaultHandlerMap.get(method);\n }\n if (!handler) {\n if (process.env.NODE_ENV !== 'production') {\n // No handler so Workbox will do nothing. If logs is set of debug\n // i.e. verbose, we should print out this information.\n logger.debug(`No route found for: ${getFriendlyURL(url)}`);\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // We have a handler, meaning Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);\n debugMessages.forEach((msg) => {\n if (Array.isArray(msg)) {\n logger.log(...msg);\n }\n else {\n logger.log(msg);\n }\n });\n logger.groupEnd();\n }\n // Wrap in try and catch in case the handle method throws a synchronous\n // error. It should still callback to the catch handler.\n let responsePromise;\n try {\n responsePromise = handler.handle({ url, request, event, params });\n }\n catch (err) {\n responsePromise = Promise.reject(err);\n }\n // Get route's catch handler, if it exists\n const catchHandler = route && route.catchHandler;\n if (responsePromise instanceof Promise &&\n (this._catchHandler || catchHandler)) {\n responsePromise = responsePromise.catch(async (err) => {\n // If there's a route catch handler, process that first\n if (catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to route's Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n try {\n return await catchHandler.handle({ url, request, event, params });\n }\n catch (catchErr) {\n if (catchErr instanceof Error) {\n err = catchErr;\n }\n }\n }\n if (this._catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to global Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n return this._catchHandler.handle({ url, request, event });\n }\n throw err;\n });\n }\n return responsePromise;\n }\n /**\n * Checks a request and URL (and optionally an event) against the list of\n * registered routes, and if there's a match, returns the corresponding\n * route along with any params generated by the match.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {boolean} options.sameOrigin The result of comparing `url.origin`\n * against the current origin.\n * @param {Request} options.request The request to match.\n * @param {Event} options.event The corresponding event.\n * @return {Object} An object with `route` and `params` properties.\n * They are populated if a matching route was found or `undefined`\n * otherwise.\n */\n findMatchingRoute({ url, sameOrigin, request, event, }) {\n const routes = this._routes.get(request.method) || [];\n for (const route of routes) {\n let params;\n // route.match returns type any, not possible to change right now.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const matchResult = route.match({ url, sameOrigin, request, event });\n if (matchResult) {\n if (process.env.NODE_ENV !== 'production') {\n // Warn developers that using an async matchCallback is almost always\n // not the right thing to do.\n if (matchResult instanceof Promise) {\n logger.warn(`While routing ${getFriendlyURL(url)}, an async ` +\n `matchCallback function was used. Please convert the ` +\n `following route to use a synchronous matchCallback function:`, route);\n }\n }\n // See https://github.com/GoogleChrome/workbox/issues/2079\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n params = matchResult;\n if (Array.isArray(params) && params.length === 0) {\n // Instead of passing an empty array in as params, use undefined.\n params = undefined;\n }\n else if (matchResult.constructor === Object && // eslint-disable-line\n Object.keys(matchResult).length === 0) {\n // Instead of passing an empty object in as params, use undefined.\n params = undefined;\n }\n else if (typeof matchResult === 'boolean') {\n // For the boolean value true (rather than just something truth-y),\n // don't set params.\n // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353\n params = undefined;\n }\n // Return early if have a match.\n return { route, params };\n }\n }\n // If no match was found above, return and empty object.\n return {};\n }\n /**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Each HTTP method ('GET', 'POST', etc.) gets its own default handler.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to associate with this\n * default handler. Each method has its own default.\n */\n setDefaultHandler(handler, method = defaultMethod) {\n this._defaultHandlerMap.set(method, normalizeHandler(handler));\n }\n /**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setCatchHandler(handler) {\n this._catchHandler = normalizeHandler(handler);\n }\n /**\n * Registers a route with the router.\n *\n * @param {workbox-routing.Route} route The route to register.\n */\n registerRoute(route) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(route, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route, 'match', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.isType(route.handler, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route.handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.handler',\n });\n assert.isType(route.method, 'string', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.method',\n });\n }\n if (!this._routes.has(route.method)) {\n this._routes.set(route.method, []);\n }\n // Give precedence to all of the earlier routes by adding this additional\n // route to the end of the array.\n this._routes.get(route.method).push(route);\n }\n /**\n * Unregisters a route with the router.\n *\n * @param {workbox-routing.Route} route The route to unregister.\n */\n unregisterRoute(route) {\n if (!this._routes.has(route.method)) {\n throw new WorkboxError('unregister-route-but-not-found-with-method', {\n method: route.method,\n });\n }\n const routeIndex = this._routes.get(route.method).indexOf(route);\n if (routeIndex > -1) {\n this._routes.get(route.method).splice(routeIndex, 1);\n }\n else {\n throw new WorkboxError('unregister-route-route-not-registered');\n }\n }\n}\nexport { Router };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Router } from '../Router.js';\nimport '../_version.js';\nlet defaultRouter;\n/**\n * Creates a new, singleton Router instance if one does not exist. If one\n * does already exist, that instance is returned.\n *\n * @private\n * @return {Router}\n */\nexport const getOrCreateDefaultRouter = () => {\n if (!defaultRouter) {\n defaultRouter = new Router();\n // The helpers that use the default Router assume these listeners exist.\n defaultRouter.addFetchListener();\n defaultRouter.addCacheListener();\n }\n return defaultRouter;\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from './Route.js';\nimport './_version.js';\n/**\n * NavigationRoute makes it easy to create a\n * {@link workbox-routing.Route} that matches for browser\n * [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}.\n *\n * It will only match incoming Requests whose\n * {@link https://fetch.spec.whatwg.org/#concept-request-mode|mode}\n * is set to `navigate`.\n *\n * You can optionally only apply this route to a subset of navigation requests\n * by using one or both of the `denylist` and `allowlist` parameters.\n *\n * @memberof workbox-routing\n * @extends workbox-routing.Route\n */\nclass NavigationRoute extends Route {\n /**\n * If both `denylist` and `allowlist` are provided, the `denylist` will\n * take precedence and the request will not match this route.\n *\n * The regular expressions in `allowlist` and `denylist`\n * are matched against the concatenated\n * [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname}\n * and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search}\n * portions of the requested URL.\n *\n * *Note*: These RegExps may be evaluated against every destination URL during\n * a navigation. Avoid using\n * [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077),\n * or else your users may see delays when navigating your site.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {Object} options\n * @param {Array} [options.denylist] If any of these patterns match,\n * the route will not handle the request (even if a allowlist RegExp matches).\n * @param {Array} [options.allowlist=[/./]] If any of these patterns\n * match the URL's pathname and search parameter, the route will handle the\n * request (assuming the denylist doesn't match).\n */\n constructor(handler, { allowlist = [/./], denylist = [] } = {}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArrayOfClass(allowlist, RegExp, {\n moduleName: 'workbox-routing',\n className: 'NavigationRoute',\n funcName: 'constructor',\n paramName: 'options.allowlist',\n });\n assert.isArrayOfClass(denylist, RegExp, {\n moduleName: 'workbox-routing',\n className: 'NavigationRoute',\n funcName: 'constructor',\n paramName: 'options.denylist',\n });\n }\n super((options) => this._match(options), handler);\n this._allowlist = allowlist;\n this._denylist = denylist;\n }\n /**\n * Routes match handler.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {Request} options.request\n * @return {boolean}\n *\n * @private\n */\n _match({ url, request }) {\n if (request && request.mode !== 'navigate') {\n return false;\n }\n const pathnameAndSearch = url.pathname + url.search;\n for (const regExp of this._denylist) {\n if (regExp.test(pathnameAndSearch)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The navigation route ${pathnameAndSearch} is not ` +\n `being used, since the URL matches this denylist pattern: ` +\n `${regExp.toString()}`);\n }\n return false;\n }\n }\n if (this._allowlist.some((regExp) => regExp.test(pathnameAndSearch))) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The navigation route ${pathnameAndSearch} ` + `is being used.`);\n }\n return true;\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The navigation route ${pathnameAndSearch} is not ` +\n `being used, since the URL being navigated to doesn't ` +\n `match the allowlist.`);\n }\n return false;\n }\n}\nexport { NavigationRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Route } from './Route.js';\nimport { RegExpRoute } from './RegExpRoute.js';\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * Easily register a RegExp, string, or function with a caching\n * strategy to a singleton Router instance.\n *\n * This method will generate a Route for you if needed and\n * call {@link workbox-routing.Router#registerRoute}.\n *\n * @param {RegExp|string|workbox-routing.Route~matchCallback|workbox-routing.Route} capture\n * If the capture param is a `Route`, all other arguments will be ignored.\n * @param {workbox-routing~handlerCallback} [handler] A callback\n * function that returns a Promise resulting in a Response. This parameter\n * is required if `capture` is not a `Route` object.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n * @return {workbox-routing.Route} The generated `Route`.\n *\n * @memberof workbox-routing\n */\nfunction registerRoute(capture, handler, method) {\n let route;\n if (typeof capture === 'string') {\n const captureUrl = new URL(capture, location.href);\n if (process.env.NODE_ENV !== 'production') {\n if (!(capture.startsWith('/') || capture.startsWith('http'))) {\n throw new WorkboxError('invalid-string', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n // We want to check if Express-style wildcards are in the pathname only.\n // TODO: Remove this log message in v4.\n const valueToCheck = capture.startsWith('http')\n ? captureUrl.pathname\n : capture;\n // See https://github.com/pillarjs/path-to-regexp#parameters\n const wildcards = '[*:?+]';\n if (new RegExp(`${wildcards}`).exec(valueToCheck)) {\n logger.debug(`The '$capture' parameter contains an Express-style wildcard ` +\n `character (${wildcards}). Strings are now always interpreted as ` +\n `exact matches; use a RegExp for partial or wildcard matches.`);\n }\n }\n const matchCallback = ({ url }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (url.pathname === captureUrl.pathname &&\n url.origin !== captureUrl.origin) {\n logger.debug(`${capture} only partially matches the cross-origin URL ` +\n `${url.toString()}. This route will only handle cross-origin requests ` +\n `if they match the entire URL.`);\n }\n }\n return url.href === captureUrl.href;\n };\n // If `capture` is a string then `handler` and `method` must be present.\n route = new Route(matchCallback, handler, method);\n }\n else if (capture instanceof RegExp) {\n // If `capture` is a `RegExp` then `handler` and `method` must be present.\n route = new RegExpRoute(capture, handler, method);\n }\n else if (typeof capture === 'function') {\n // If `capture` is a function then `handler` and `method` must be present.\n route = new Route(capture, handler, method);\n }\n else if (capture instanceof Route) {\n route = capture;\n }\n else {\n throw new WorkboxError('unsupported-route-type', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n return route;\n}\nexport { registerRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n *\n * @memberof workbox-routing\n */\nfunction setCatchHandler(handler) {\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.setCatchHandler(handler);\n}\nexport { setCatchHandler };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n *\n * @memberof workbox-routing\n */\nfunction setDefaultHandler(handler) {\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.setDefaultHandler(handler);\n}\nexport { setDefaultHandler };\n"],"names":["self","_","e","normalizeHandler","handler","handle","Route","constructor","match","method","this","setCatchHandler","catchHandler","RegExpRoute","regExp","super","url","result","exec","href","origin","location","index","slice","Router","_routes","Map","_defaultHandlerMap","routes","addFetchListener","addEventListener","event","request","responsePromise","handleRequest","respondWith","addCacheListener","data","type","payload","requestPromises","Promise","all","urlsToCache","map","entry","Request","waitUntil","ports","then","postMessage","URL","protocol","startsWith","sameOrigin","params","route","findMatchingRoute","has","get","err","reject","_catchHandler","catch","async","catchErr","Error","matchResult","Array","isArray","length","Object","keys","undefined","setDefaultHandler","set","registerRoute","push","unregisterRoute","WorkboxError","routeIndex","indexOf","splice","defaultRouter","getOrCreateDefaultRouter","allowlist","denylist","options","_match","_allowlist","_denylist","mode","pathnameAndSearch","pathname","search","test","some","capture","captureUrl","matchCallback","RegExp","moduleName","funcName","paramName"],"mappings":"8EAEA,IACIA,KAAK,0BAA4BC,GACrC,CACA,MAAOC,GAAK,CCWL,MCAMC,EAAoBC,GACzBA,GAA8B,iBAAZA,EASXA,EAWA,CAAEC,OAAQD,GCjBzB,MAAME,EAYFC,YAAYC,EAAOJ,EAASK,EFhBH,OE8BrBC,KAAKN,QAAUD,EAAiBC,GAChCM,KAAKF,MAAQA,EACbE,KAAKD,OAASA,CAClB,CAMAE,gBAAgBP,GACZM,KAAKE,aAAeT,EAAiBC,EACzC,ECnCJ,MAAMS,UAAoBP,EActBC,YAAYO,EAAQV,EAASK,GAiCzBM,OAxBcP,EAAGQ,UACb,MAAMC,EAASH,EAAOI,KAAKF,EAAIG,MAE/B,GAAKF,IAODD,EAAII,SAAWC,SAASD,QAA2B,IAAjBH,EAAOK,OAY7C,OAAOL,EAAOM,MAAM,EAAE,GAEbnB,EAASK,EAC1B,ECvCJ,MAAMe,EAIFjB,cACIG,KAAKe,EAAU,IAAIC,IACnBhB,KAAKiB,EAAqB,IAAID,GAClC,CAMIE,aACA,OAAOlB,KAAKe,CAChB,CAKAI,mBAEI7B,KAAK8B,iBAAiB,SAAWC,IAC7B,MAAMC,QAAEA,GAAYD,EACdE,EAAkBvB,KAAKwB,cAAc,CAAEF,UAASD,UAClDE,GACAF,EAAMI,YAAYF,EACtB,GAER,CAuBAG,mBAEIpC,KAAK8B,iBA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end of file diff --git a/docs/workbox-v7.4.1/workbox-strategies.dev.js b/docs/workbox-v7.4.1/workbox-strategies.dev.js deleted file mode 100644 index cc1581fd..00000000 --- a/docs/workbox-v7.4.1/workbox-strategies.dev.js +++ /dev/null @@ -1,1338 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.strategies = (function (exports, assert_js, logger_js, WorkboxError_js, cacheNames_js, getFriendlyURL_js, cacheMatchIgnoreParams_js, Deferred_js, executeQuotaErrorCallbacks_js, timeout_js) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:strategies:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - function toRequest(input) { - return typeof input === 'string' ? new Request(input) : input; - } - /** - * A class created every time a Strategy instance calls - * {@link workbox-strategies.Strategy~handle} or - * {@link workbox-strategies.Strategy~handleAll} that wraps all fetch and - * cache actions around plugin callbacks and keeps track of when the strategy - * is "done" (i.e. all added `event.waitUntil()` promises have resolved). - * - * @memberof workbox-strategies - */ - class StrategyHandler { - /** - * Creates a new instance associated with the passed strategy and event - * that's handling the request. - * - * The constructor also initializes the state that will be passed to each of - * the plugins handling this request. - * - * @param {workbox-strategies.Strategy} strategy - * @param {Object} options - * @param {Request|string} options.request A request to run this strategy for. - * @param {ExtendableEvent} options.event The event associated with the - * request. - * @param {URL} [options.url] - * @param {*} [options.params] The return value from the - * {@link workbox-routing~matchCallback} (if applicable). - */ - constructor(strategy, options) { - this._cacheKeys = {}; - /** - * The request the strategy is performing (passed to the strategy's - * `handle()` or `handleAll()` method). - * @name request - * @instance - * @type {Request} - * @memberof workbox-strategies.StrategyHandler - */ - /** - * The event associated with this request. - * @name event - * @instance - * @type {ExtendableEvent} - * @memberof workbox-strategies.StrategyHandler - */ - /** - * A `URL` instance of `request.url` (if passed to the strategy's - * `handle()` or `handleAll()` method). - * Note: the `url` param will be present if the strategy was invoked - * from a workbox `Route` object. - * @name url - * @instance - * @type {URL|undefined} - * @memberof workbox-strategies.StrategyHandler - */ - /** - * A `param` value (if passed to the strategy's - * `handle()` or `handleAll()` method). - * Note: the `param` param will be present if the strategy was invoked - * from a workbox `Route` object and the - * {@link workbox-routing~matchCallback} returned - * a truthy value (it will be that value). - * @name params - * @instance - * @type {*|undefined} - * @memberof workbox-strategies.StrategyHandler - */ - { - assert_js.assert.isInstance(options.event, ExtendableEvent, { - moduleName: 'workbox-strategies', - className: 'StrategyHandler', - funcName: 'constructor', - paramName: 'options.event' - }); - } - Object.assign(this, options); - this.event = options.event; - this._strategy = strategy; - this._handlerDeferred = new Deferred_js.Deferred(); - this._extendLifetimePromises = []; - // Copy the plugins list (since it's mutable on the strategy), - // so any mutations don't affect this handler instance. - this._plugins = [...strategy.plugins]; - this._pluginStateMap = new Map(); - for (const plugin of this._plugins) { - this._pluginStateMap.set(plugin, {}); - } - this.event.waitUntil(this._handlerDeferred.promise); - } - /** - * Fetches a given request (and invokes any applicable plugin callback - * methods) using the `fetchOptions` (for non-navigation requests) and - * `plugins` defined on the `Strategy` object. - * - * The following plugin lifecycle methods are invoked when using this method: - * - `requestWillFetch()` - * - `fetchDidSucceed()` - * - `fetchDidFail()` - * - * @param {Request|string} input The URL or request to fetch. - * @return {Promise} - */ - async fetch(input) { - const { - event - } = this; - let request = toRequest(input); - if (request.mode === 'navigate' && event instanceof FetchEvent && event.preloadResponse) { - const possiblePreloadResponse = await event.preloadResponse; - if (possiblePreloadResponse) { - { - logger_js.logger.log(`Using a preloaded navigation response for ` + `'${getFriendlyURL_js.getFriendlyURL(request.url)}'`); - } - return possiblePreloadResponse; - } - } - // If there is a fetchDidFail plugin, we need to save a clone of the - // original request before it's either modified by a requestWillFetch - // plugin or before the original request's body is consumed via fetch(). - const originalRequest = this.hasCallback('fetchDidFail') ? request.clone() : null; - try { - for (const cb of this.iterateCallbacks('requestWillFetch')) { - request = await cb({ - request: request.clone(), - event - }); - } - } catch (err) { - if (err instanceof Error) { - throw new WorkboxError_js.WorkboxError('plugin-error-request-will-fetch', { - thrownErrorMessage: err.message - }); - } - } - // The request can be altered by plugins with `requestWillFetch` making - // the original request (most likely from a `fetch` event) different - // from the Request we make. Pass both to `fetchDidFail` to aid debugging. - const pluginFilteredRequest = request.clone(); - try { - let fetchResponse; - // See https://github.com/GoogleChrome/workbox/issues/1796 - fetchResponse = await fetch(request, request.mode === 'navigate' ? undefined : this._strategy.fetchOptions); - if ("dev" !== 'production') { - logger_js.logger.debug(`Network request for ` + `'${getFriendlyURL_js.getFriendlyURL(request.url)}' returned a response with ` + `status '${fetchResponse.status}'.`); - } - for (const callback of this.iterateCallbacks('fetchDidSucceed')) { - fetchResponse = await callback({ - event, - request: pluginFilteredRequest, - response: fetchResponse - }); - } - return fetchResponse; - } catch (error) { - { - logger_js.logger.log(`Network request for ` + `'${getFriendlyURL_js.getFriendlyURL(request.url)}' threw an error.`, error); - } - // `originalRequest` will only exist if a `fetchDidFail` callback - // is being used (see above). - if (originalRequest) { - await this.runCallbacks('fetchDidFail', { - error: error, - event, - originalRequest: originalRequest.clone(), - request: pluginFilteredRequest.clone() - }); - } - throw error; - } - } - /** - * Calls `this.fetch()` and (in the background) runs `this.cachePut()` on - * the response generated by `this.fetch()`. - * - * The call to `this.cachePut()` automatically invokes `this.waitUntil()`, - * so you do not have to manually call `waitUntil()` on the event. - * - * @param {Request|string} input The request or URL to fetch and cache. - * @return {Promise} - */ - async fetchAndCachePut(input) { - const response = await this.fetch(input); - const responseClone = response.clone(); - void this.waitUntil(this.cachePut(input, responseClone)); - return response; - } - /** - * Matches a request from the cache (and invokes any applicable plugin - * callback methods) using the `cacheName`, `matchOptions`, and `plugins` - * defined on the strategy object. - * - * The following plugin lifecycle methods are invoked when using this method: - * - cacheKeyWillBeUsed() - * - cachedResponseWillBeUsed() - * - * @param {Request|string} key The Request or URL to use as the cache key. - * @return {Promise} A matching response, if found. - */ - async cacheMatch(key) { - const request = toRequest(key); - let cachedResponse; - const { - cacheName, - matchOptions - } = this._strategy; - const effectiveRequest = await this.getCacheKey(request, 'read'); - const multiMatchOptions = Object.assign(Object.assign({}, matchOptions), { - cacheName - }); - cachedResponse = await caches.match(effectiveRequest, multiMatchOptions); - { - if (cachedResponse) { - logger_js.logger.debug(`Found a cached response in '${cacheName}'.`); - } else { - logger_js.logger.debug(`No cached response found in '${cacheName}'.`); - } - } - for (const callback of this.iterateCallbacks('cachedResponseWillBeUsed')) { - cachedResponse = (await callback({ - cacheName, - matchOptions, - cachedResponse, - request: effectiveRequest, - event: this.event - })) || undefined; - } - return cachedResponse; - } - /** - * Puts a request/response pair in the cache (and invokes any applicable - * plugin callback methods) using the `cacheName` and `plugins` defined on - * the strategy object. - * - * The following plugin lifecycle methods are invoked when using this method: - * - cacheKeyWillBeUsed() - * - cacheWillUpdate() - * - cacheDidUpdate() - * - * @param {Request|string} key The request or URL to use as the cache key. - * @param {Response} response The response to cache. - * @return {Promise} `false` if a cacheWillUpdate caused the response - * not be cached, and `true` otherwise. - */ - async cachePut(key, response) { - const request = toRequest(key); - // Run in the next task to avoid blocking other cache reads. - // https://github.com/w3c/ServiceWorker/issues/1397 - await timeout_js.timeout(0); - const effectiveRequest = await this.getCacheKey(request, 'write'); - { - if (effectiveRequest.method && effectiveRequest.method !== 'GET') { - throw new WorkboxError_js.WorkboxError('attempt-to-cache-non-get-request', { - url: getFriendlyURL_js.getFriendlyURL(effectiveRequest.url), - method: effectiveRequest.method - }); - } - // See https://github.com/GoogleChrome/workbox/issues/2818 - const vary = response.headers.get('Vary'); - if (vary) { - logger_js.logger.debug(`The response for ${getFriendlyURL_js.getFriendlyURL(effectiveRequest.url)} ` + `has a 'Vary: ${vary}' header. ` + `Consider setting the {ignoreVary: true} option on your strategy ` + `to ensure cache matching and deletion works as expected.`); - } - } - if (!response) { - { - logger_js.logger.error(`Cannot cache non-existent response for ` + `'${getFriendlyURL_js.getFriendlyURL(effectiveRequest.url)}'.`); - } - throw new WorkboxError_js.WorkboxError('cache-put-with-no-response', { - url: getFriendlyURL_js.getFriendlyURL(effectiveRequest.url) - }); - } - const responseToCache = await this._ensureResponseSafeToCache(response); - if (!responseToCache) { - { - logger_js.logger.debug(`Response '${getFriendlyURL_js.getFriendlyURL(effectiveRequest.url)}' ` + `will not be cached.`, responseToCache); - } - return false; - } - const { - cacheName, - matchOptions - } = this._strategy; - const cache = await self.caches.open(cacheName); - const hasCacheUpdateCallback = this.hasCallback('cacheDidUpdate'); - const oldResponse = hasCacheUpdateCallback ? await cacheMatchIgnoreParams_js.cacheMatchIgnoreParams( - // TODO(philipwalton): the `__WB_REVISION__` param is a precaching - // feature. Consider into ways to only add this behavior if using - // precaching. - cache, effectiveRequest.clone(), ['__WB_REVISION__'], matchOptions) : null; - { - logger_js.logger.debug(`Updating the '${cacheName}' cache with a new Response ` + `for ${getFriendlyURL_js.getFriendlyURL(effectiveRequest.url)}.`); - } - try { - await cache.put(effectiveRequest, hasCacheUpdateCallback ? responseToCache.clone() : responseToCache); - } catch (error) { - if (error instanceof Error) { - // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError - if (error.name === 'QuotaExceededError') { - await executeQuotaErrorCallbacks_js.executeQuotaErrorCallbacks(); - } - throw error; - } - } - for (const callback of this.iterateCallbacks('cacheDidUpdate')) { - await callback({ - cacheName, - oldResponse, - newResponse: responseToCache.clone(), - request: effectiveRequest, - event: this.event - }); - } - return true; - } - /** - * Checks the list of plugins for the `cacheKeyWillBeUsed` callback, and - * executes any of those callbacks found in sequence. The final `Request` - * object returned by the last plugin is treated as the cache key for cache - * reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have - * been registered, the passed request is returned unmodified - * - * @param {Request} request - * @param {string} mode - * @return {Promise} - */ - async getCacheKey(request, mode) { - const key = `${request.url} | ${mode}`; - if (!this._cacheKeys[key]) { - let effectiveRequest = request; - for (const callback of this.iterateCallbacks('cacheKeyWillBeUsed')) { - effectiveRequest = toRequest(await callback({ - mode, - request: effectiveRequest, - event: this.event, - // params has a type any can't change right now. - params: this.params // eslint-disable-line - })); - } - this._cacheKeys[key] = effectiveRequest; - } - return this._cacheKeys[key]; - } - /** - * Returns true if the strategy has at least one plugin with the given - * callback. - * - * @param {string} name The name of the callback to check for. - * @return {boolean} - */ - hasCallback(name) { - for (const plugin of this._strategy.plugins) { - if (name in plugin) { - return true; - } - } - return false; - } - /** - * Runs all plugin callbacks matching the given name, in order, passing the - * given param object (merged ith the current plugin state) as the only - * argument. - * - * Note: since this method runs all plugins, it's not suitable for cases - * where the return value of a callback needs to be applied prior to calling - * the next callback. See - * {@link workbox-strategies.StrategyHandler#iterateCallbacks} - * below for how to handle that case. - * - * @param {string} name The name of the callback to run within each plugin. - * @param {Object} param The object to pass as the first (and only) param - * when executing each callback. This object will be merged with the - * current plugin state prior to callback execution. - */ - async runCallbacks(name, param) { - for (const callback of this.iterateCallbacks(name)) { - // TODO(philipwalton): not sure why `any` is needed. It seems like - // this should work with `as WorkboxPluginCallbackParam[C]`. - await callback(param); - } - } - /** - * Accepts a callback and returns an iterable of matching plugin callbacks, - * where each callback is wrapped with the current handler state (i.e. when - * you call each callback, whatever object parameter you pass it will - * be merged with the plugin's current state). - * - * @param {string} name The name fo the callback to run - * @return {Array} - */ - *iterateCallbacks(name) { - for (const plugin of this._strategy.plugins) { - if (typeof plugin[name] === 'function') { - const state = this._pluginStateMap.get(plugin); - const statefulCallback = param => { - const statefulParam = Object.assign(Object.assign({}, param), { - state - }); - // TODO(philipwalton): not sure why `any` is needed. It seems like - // this should work with `as WorkboxPluginCallbackParam[C]`. - return plugin[name](statefulParam); - }; - yield statefulCallback; - } - } - } - /** - * Adds a promise to the - * [extend lifetime promises]{@link https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises} - * of the event associated with the request being handled (usually a - * `FetchEvent`). - * - * Note: you can await - * {@link workbox-strategies.StrategyHandler~doneWaiting} - * to know when all added promises have settled. - * - * @param {Promise} promise A promise to add to the extend lifetime promises - * of the event that triggered the request. - */ - waitUntil(promise) { - this._extendLifetimePromises.push(promise); - return promise; - } - /** - * Returns a promise that resolves once all promises passed to - * {@link workbox-strategies.StrategyHandler~waitUntil} - * have settled. - * - * Note: any work done after `doneWaiting()` settles should be manually - * passed to an event's `waitUntil()` method (not this handler's - * `waitUntil()` method), otherwise the service worker thread may be killed - * prior to your work completing. - */ - async doneWaiting() { - while (this._extendLifetimePromises.length) { - const promises = this._extendLifetimePromises.splice(0); - const result = await Promise.allSettled(promises); - const firstRejection = result.find(i => i.status === 'rejected'); - if (firstRejection) { - throw firstRejection.reason; - } - } - } - /** - * Stops running the strategy and immediately resolves any pending - * `waitUntil()` promises. - */ - destroy() { - this._handlerDeferred.resolve(null); - } - /** - * This method will call cacheWillUpdate on the available plugins (or use - * status === 200) to determine if the Response is safe and valid to cache. - * - * @param {Request} options.request - * @param {Response} options.response - * @return {Promise} - * - * @private - */ - async _ensureResponseSafeToCache(response) { - let responseToCache = response; - let pluginsUsed = false; - for (const callback of this.iterateCallbacks('cacheWillUpdate')) { - responseToCache = (await callback({ - request: this.request, - response: responseToCache, - event: this.event - })) || undefined; - pluginsUsed = true; - if (!responseToCache) { - break; - } - } - if (!pluginsUsed) { - if (responseToCache && responseToCache.status !== 200) { - responseToCache = undefined; - } - { - if (responseToCache) { - if (responseToCache.status !== 200) { - if (responseToCache.status === 0) { - logger_js.logger.warn(`The response for '${this.request.url}' ` + `is an opaque response. The caching strategy that you're ` + `using will not cache opaque responses by default.`); - } else { - logger_js.logger.debug(`The response for '${this.request.url}' ` + `returned a status code of '${response.status}' and won't ` + `be cached as a result.`); - } - } - } - } - } - return responseToCache; - } - } - - /* - Copyright 2020 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An abstract base class that all other strategy classes must extend from: - * - * @memberof workbox-strategies - */ - class Strategy { - /** - * Creates a new instance of the strategy and sets all documented option - * properties as public instance properties. - * - * Note: if a custom strategy class extends the base Strategy class and does - * not need more than these properties, it does not need to define its own - * constructor. - * - * @param {Object} [options] - * @param {string} [options.cacheName] Cache name to store and retrieve - * requests. Defaults to the cache names provided by - * {@link workbox-core.cacheNames}. - * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} - * to use in conjunction with this caching strategy. - * @param {Object} [options.fetchOptions] Values passed along to the - * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) - * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796) - * `fetch()` requests made by this strategy. - * @param {Object} [options.matchOptions] The - * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions} - * for any `cache.match()` or `cache.put()` calls made by this strategy. - */ - constructor(options = {}) { - /** - * Cache name to store and retrieve - * requests. Defaults to the cache names provided by - * {@link workbox-core.cacheNames}. - * - * @type {string} - */ - this.cacheName = cacheNames_js.cacheNames.getRuntimeName(options.cacheName); - /** - * The list - * [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} - * used by this strategy. - * - * @type {Array} - */ - this.plugins = options.plugins || []; - /** - * Values passed along to the - * [`init`]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters} - * of all fetch() requests made by this strategy. - * - * @type {Object} - */ - this.fetchOptions = options.fetchOptions; - /** - * The - * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions} - * for any `cache.match()` or `cache.put()` calls made by this strategy. - * - * @type {Object} - */ - this.matchOptions = options.matchOptions; - } - /** - * Perform a request strategy and returns a `Promise` that will resolve with - * a `Response`, invoking all relevant plugin callbacks. - * - * When a strategy instance is registered with a Workbox - * {@link workbox-routing.Route}, this method is automatically - * called when the route matches. - * - * Alternatively, this method can be used in a standalone `FetchEvent` - * listener by passing it to `event.respondWith()`. - * - * @param {FetchEvent|Object} options A `FetchEvent` or an object with the - * properties listed below. - * @param {Request|string} options.request A request to run this strategy for. - * @param {ExtendableEvent} options.event The event associated with the - * request. - * @param {URL} [options.url] - * @param {*} [options.params] - */ - handle(options) { - const [responseDone] = this.handleAll(options); - return responseDone; - } - /** - * Similar to {@link workbox-strategies.Strategy~handle}, but - * instead of just returning a `Promise` that resolves to a `Response` it - * it will return an tuple of `[response, done]` promises, where the former - * (`response`) is equivalent to what `handle()` returns, and the latter is a - * Promise that will resolve once any promises that were added to - * `event.waitUntil()` as part of performing the strategy have completed. - * - * You can await the `done` promise to ensure any extra work performed by - * the strategy (usually caching responses) completes successfully. - * - * @param {FetchEvent|Object} options A `FetchEvent` or an object with the - * properties listed below. - * @param {Request|string} options.request A request to run this strategy for. - * @param {ExtendableEvent} options.event The event associated with the - * request. - * @param {URL} [options.url] - * @param {*} [options.params] - * @return {Array} A tuple of [response, done] - * promises that can be used to determine when the response resolves as - * well as when the handler has completed all its work. - */ - handleAll(options) { - // Allow for flexible options to be passed. - if (options instanceof FetchEvent) { - options = { - event: options, - request: options.request - }; - } - const event = options.event; - const request = typeof options.request === 'string' ? new Request(options.request) : options.request; - const params = 'params' in options ? options.params : undefined; - const handler = new StrategyHandler(this, { - event, - request, - params - }); - const responseDone = this._getResponse(handler, request, event); - const handlerDone = this._awaitComplete(responseDone, handler, request, event); - // Return an array of promises, suitable for use with Promise.all(). - return [responseDone, handlerDone]; - } - async _getResponse(handler, request, event) { - await handler.runCallbacks('handlerWillStart', { - event, - request - }); - let response = undefined; - try { - response = await this._handle(request, handler); - // The "official" Strategy subclasses all throw this error automatically, - // but in case a third-party Strategy doesn't, ensure that we have a - // consistent failure when there's no response or an error response. - if (!response || response.type === 'error') { - throw new WorkboxError_js.WorkboxError('no-response', { - url: request.url - }); - } - } catch (error) { - if (error instanceof Error) { - for (const callback of handler.iterateCallbacks('handlerDidError')) { - response = await callback({ - error, - event, - request - }); - if (response) { - break; - } - } - } - if (!response) { - throw error; - } else { - logger_js.logger.log(`While responding to '${getFriendlyURL_js.getFriendlyURL(request.url)}', ` + `an ${error instanceof Error ? error.toString() : ''} error occurred. Using a fallback response provided by ` + `a handlerDidError plugin.`); - } - } - for (const callback of handler.iterateCallbacks('handlerWillRespond')) { - response = await callback({ - event, - request, - response - }); - } - return response; - } - async _awaitComplete(responseDone, handler, request, event) { - let response; - let error; - try { - response = await responseDone; - } catch (error) { - // Ignore errors, as response errors should be caught via the `response` - // promise above. The `done` promise will only throw for errors in - // promises passed to `handler.waitUntil()`. - } - try { - await handler.runCallbacks('handlerDidRespond', { - event, - request, - response - }); - await handler.doneWaiting(); - } catch (waitUntilError) { - if (waitUntilError instanceof Error) { - error = waitUntilError; - } - } - await handler.runCallbacks('handlerDidComplete', { - event, - request, - response, - error: error - }); - handler.destroy(); - if (error) { - throw error; - } - } - } - /** - * Classes extending the `Strategy` based class should implement this method, - * and leverage the {@link workbox-strategies.StrategyHandler} - * arg to perform all fetching and cache logic, which will ensure all relevant - * cache, cache options, fetch options and plugins are used (per the current - * strategy instance). - * - * @name _handle - * @instance - * @abstract - * @function - * @param {Request} request - * @param {workbox-strategies.StrategyHandler} handler - * @return {Promise} - * - * @memberof workbox-strategies.Strategy - */ - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const messages = { - strategyStart: (strategyName, request) => `Using ${strategyName} to respond to '${getFriendlyURL_js.getFriendlyURL(request.url)}'`, - printFinalResponse: response => { - if (response) { - logger_js.logger.groupCollapsed(`View the final response here.`); - logger_js.logger.log(response || '[No response returned]'); - logger_js.logger.groupEnd(); - } - } - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of a [cache-first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-first-falling-back-to-network) - * request strategy. - * - * A cache first strategy is useful for assets that have been revisioned, - * such as URLs like `/styles/example.a8f5f1.css`, since they - * can be cached for long periods of time. - * - * If the network request fails, and there is no cache match, this will throw - * a `WorkboxError` exception. - * - * @extends workbox-strategies.Strategy - * @memberof workbox-strategies - */ - class CacheFirst extends Strategy { - /** - * @private - * @param {Request|string} request A request to run this strategy for. - * @param {workbox-strategies.StrategyHandler} handler The event that - * triggered the request. - * @return {Promise} - */ - async _handle(request, handler) { - const logs = []; - { - assert_js.assert.isInstance(request, Request, { - moduleName: 'workbox-strategies', - className: this.constructor.name, - funcName: 'makeRequest', - paramName: 'request' - }); - } - let response = await handler.cacheMatch(request); - let error = undefined; - if (!response) { - { - logs.push(`No response found in the '${this.cacheName}' cache. ` + `Will respond with a network request.`); - } - try { - response = await handler.fetchAndCachePut(request); - } catch (err) { - if (err instanceof Error) { - error = err; - } - } - { - if (response) { - logs.push(`Got response from network.`); - } else { - logs.push(`Unable to get a response from the network.`); - } - } - } else { - { - logs.push(`Found a cached response in the '${this.cacheName}' cache.`); - } - } - { - logger_js.logger.groupCollapsed(messages.strategyStart(this.constructor.name, request)); - for (const log of logs) { - logger_js.logger.log(log); - } - messages.printFinalResponse(response); - logger_js.logger.groupEnd(); - } - if (!response) { - throw new WorkboxError_js.WorkboxError('no-response', { - url: request.url, - error - }); - } - return response; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of a [cache-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-only) - * request strategy. - * - * This class is useful if you want to take advantage of any - * [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/). - * - * If there is no cache match, this will throw a `WorkboxError` exception. - * - * @extends workbox-strategies.Strategy - * @memberof workbox-strategies - */ - class CacheOnly extends Strategy { - /** - * @private - * @param {Request|string} request A request to run this strategy for. - * @param {workbox-strategies.StrategyHandler} handler The event that - * triggered the request. - * @return {Promise} - */ - async _handle(request, handler) { - { - assert_js.assert.isInstance(request, Request, { - moduleName: 'workbox-strategies', - className: this.constructor.name, - funcName: 'makeRequest', - paramName: 'request' - }); - } - const response = await handler.cacheMatch(request); - { - logger_js.logger.groupCollapsed(messages.strategyStart(this.constructor.name, request)); - if (response) { - logger_js.logger.log(`Found a cached response in the '${this.cacheName}' ` + `cache.`); - messages.printFinalResponse(response); - } else { - logger_js.logger.log(`No response found in the '${this.cacheName}' cache.`); - } - logger_js.logger.groupEnd(); - } - if (!response) { - throw new WorkboxError_js.WorkboxError('no-response', { - url: request.url - }); - } - return response; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const cacheOkAndOpaquePlugin = { - /** - * Returns a valid response (to allow caching) if the status is 200 (OK) or - * 0 (opaque). - * - * @param {Object} options - * @param {Response} options.response - * @return {Response|null} - * - * @private - */ - cacheWillUpdate: async ({ - response - }) => { - if (response.status === 200 || response.status === 0) { - return response; - } - return null; - } - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of a - * [network first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-first-falling-back-to-cache) - * request strategy. - * - * By default, this strategy will cache responses with a 200 status code as - * well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). - * Opaque responses are are cross-origin requests where the response doesn't - * support [CORS](https://enable-cors.org/). - * - * If the network request fails, and there is no cache match, this will throw - * a `WorkboxError` exception. - * - * @extends workbox-strategies.Strategy - * @memberof workbox-strategies - */ - class NetworkFirst extends Strategy { - /** - * @param {Object} [options] - * @param {string} [options.cacheName] Cache name to store and retrieve - * requests. Defaults to cache names provided by - * {@link workbox-core.cacheNames}. - * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} - * to use in conjunction with this caching strategy. - * @param {Object} [options.fetchOptions] Values passed along to the - * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) - * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796) - * `fetch()` requests made by this strategy. - * @param {Object} [options.matchOptions] [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions) - * @param {number} [options.networkTimeoutSeconds] If set, any network requests - * that fail to respond within the timeout will fallback to the cache. - * - * This option can be used to combat - * "[lie-fi]{@link https://developers.google.com/web/fundamentals/performance/poor-connectivity/#lie-fi}" - * scenarios. - */ - constructor(options = {}) { - super(options); - // If this instance contains no plugins with a 'cacheWillUpdate' callback, - // prepend the `cacheOkAndOpaquePlugin` plugin to the plugins list. - if (!this.plugins.some(p => 'cacheWillUpdate' in p)) { - this.plugins.unshift(cacheOkAndOpaquePlugin); - } - this._networkTimeoutSeconds = options.networkTimeoutSeconds || 0; - { - if (this._networkTimeoutSeconds) { - assert_js.assert.isType(this._networkTimeoutSeconds, 'number', { - moduleName: 'workbox-strategies', - className: this.constructor.name, - funcName: 'constructor', - paramName: 'networkTimeoutSeconds' - }); - } - } - } - /** - * @private - * @param {Request|string} request A request to run this strategy for. - * @param {workbox-strategies.StrategyHandler} handler The event that - * triggered the request. - * @return {Promise} - */ - async _handle(request, handler) { - const logs = []; - { - assert_js.assert.isInstance(request, Request, { - moduleName: 'workbox-strategies', - className: this.constructor.name, - funcName: 'handle', - paramName: 'makeRequest' - }); - } - const promises = []; - let timeoutId; - if (this._networkTimeoutSeconds) { - const { - id, - promise - } = this._getTimeoutPromise({ - request, - logs, - handler - }); - timeoutId = id; - promises.push(promise); - } - const networkPromise = this._getNetworkPromise({ - timeoutId, - request, - logs, - handler - }); - promises.push(networkPromise); - const response = await handler.waitUntil((async () => { - // Promise.race() will resolve as soon as the first promise resolves. - return (await handler.waitUntil(Promise.race(promises))) || ( - // If Promise.race() resolved with null, it might be due to a network - // timeout + a cache miss. If that were to happen, we'd rather wait until - // the networkPromise resolves instead of returning null. - // Note that it's fine to await an already-resolved promise, so we don't - // have to check to see if it's still "in flight". - await networkPromise); - })()); - { - logger_js.logger.groupCollapsed(messages.strategyStart(this.constructor.name, request)); - for (const log of logs) { - logger_js.logger.log(log); - } - messages.printFinalResponse(response); - logger_js.logger.groupEnd(); - } - if (!response) { - throw new WorkboxError_js.WorkboxError('no-response', { - url: request.url - }); - } - return response; - } - /** - * @param {Object} options - * @param {Request} options.request - * @param {Array} options.logs A reference to the logs array - * @param {Event} options.event - * @return {Promise} - * - * @private - */ - _getTimeoutPromise({ - request, - logs, - handler - }) { - let timeoutId; - const timeoutPromise = new Promise(resolve => { - const onNetworkTimeout = async () => { - { - logs.push(`Timing out the network response at ` + `${this._networkTimeoutSeconds} seconds.`); - } - resolve(await handler.cacheMatch(request)); - }; - timeoutId = setTimeout(onNetworkTimeout, this._networkTimeoutSeconds * 1000); - }); - return { - promise: timeoutPromise, - id: timeoutId - }; - } - /** - * @param {Object} options - * @param {number|undefined} options.timeoutId - * @param {Request} options.request - * @param {Array} options.logs A reference to the logs Array. - * @param {Event} options.event - * @return {Promise} - * - * @private - */ - async _getNetworkPromise({ - timeoutId, - request, - logs, - handler - }) { - let error; - let response; - try { - response = await handler.fetchAndCachePut(request); - } catch (fetchError) { - if (fetchError instanceof Error) { - error = fetchError; - } - } - if (timeoutId) { - clearTimeout(timeoutId); - } - { - if (response) { - logs.push(`Got response from network.`); - } else { - logs.push(`Unable to get a response from the network. Will respond ` + `with a cached response.`); - } - } - if (error || !response) { - response = await handler.cacheMatch(request); - { - if (response) { - logs.push(`Found a cached response in the '${this.cacheName}'` + ` cache.`); - } else { - logs.push(`No response found in the '${this.cacheName}' cache.`); - } - } - } - return response; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of a - * [network-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-only) - * request strategy. - * - * This class is useful if you want to take advantage of any - * [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/). - * - * If the network request fails, this will throw a `WorkboxError` exception. - * - * @extends workbox-strategies.Strategy - * @memberof workbox-strategies - */ - class NetworkOnly extends Strategy { - /** - * @param {Object} [options] - * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} - * to use in conjunction with this caching strategy. - * @param {Object} [options.fetchOptions] Values passed along to the - * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) - * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796) - * `fetch()` requests made by this strategy. - * @param {number} [options.networkTimeoutSeconds] If set, any network requests - * that fail to respond within the timeout will result in a network error. - */ - constructor(options = {}) { - super(options); - this._networkTimeoutSeconds = options.networkTimeoutSeconds || 0; - } - /** - * @private - * @param {Request|string} request A request to run this strategy for. - * @param {workbox-strategies.StrategyHandler} handler The event that - * triggered the request. - * @return {Promise} - */ - async _handle(request, handler) { - { - assert_js.assert.isInstance(request, Request, { - moduleName: 'workbox-strategies', - className: this.constructor.name, - funcName: '_handle', - paramName: 'request' - }); - } - let error = undefined; - let response; - try { - const promises = [handler.fetch(request)]; - if (this._networkTimeoutSeconds) { - const timeoutPromise = timeout_js.timeout(this._networkTimeoutSeconds * 1000); - promises.push(timeoutPromise); - } - response = await Promise.race(promises); - if (!response) { - throw new Error(`Timed out the network response after ` + `${this._networkTimeoutSeconds} seconds.`); - } - } catch (err) { - if (err instanceof Error) { - error = err; - } - } - { - logger_js.logger.groupCollapsed(messages.strategyStart(this.constructor.name, request)); - if (response) { - logger_js.logger.log(`Got response from network.`); - } else { - logger_js.logger.log(`Unable to get a response from the network.`); - } - messages.printFinalResponse(response); - logger_js.logger.groupEnd(); - } - if (!response) { - throw new WorkboxError_js.WorkboxError('no-response', { - url: request.url, - error - }); - } - return response; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of a - * [stale-while-revalidate](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#stale-while-revalidate) - * request strategy. - * - * Resources are requested from both the cache and the network in parallel. - * The strategy will respond with the cached version if available, otherwise - * wait for the network response. The cache is updated with the network response - * with each successful request. - * - * By default, this strategy will cache responses with a 200 status code as - * well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses). - * Opaque responses are cross-origin requests where the response doesn't - * support [CORS](https://enable-cors.org/). - * - * If the network request fails, and there is no cache match, this will throw - * a `WorkboxError` exception. - * - * @extends workbox-strategies.Strategy - * @memberof workbox-strategies - */ - class StaleWhileRevalidate extends Strategy { - /** - * @param {Object} [options] - * @param {string} [options.cacheName] Cache name to store and retrieve - * requests. Defaults to cache names provided by - * {@link workbox-core.cacheNames}. - * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} - * to use in conjunction with this caching strategy. - * @param {Object} [options.fetchOptions] Values passed along to the - * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) - * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796) - * `fetch()` requests made by this strategy. - * @param {Object} [options.matchOptions] [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions) - */ - constructor(options = {}) { - super(options); - // If this instance contains no plugins with a 'cacheWillUpdate' callback, - // prepend the `cacheOkAndOpaquePlugin` plugin to the plugins list. - if (!this.plugins.some(p => 'cacheWillUpdate' in p)) { - this.plugins.unshift(cacheOkAndOpaquePlugin); - } - } - /** - * @private - * @param {Request|string} request A request to run this strategy for. - * @param {workbox-strategies.StrategyHandler} handler The event that - * triggered the request. - * @return {Promise} - */ - async _handle(request, handler) { - const logs = []; - { - assert_js.assert.isInstance(request, Request, { - moduleName: 'workbox-strategies', - className: this.constructor.name, - funcName: 'handle', - paramName: 'request' - }); - } - const fetchAndCachePromise = handler.fetchAndCachePut(request).catch(() => { - // Swallow this error because a 'no-response' error will be thrown in - // main handler return flow. This will be in the `waitUntil()` flow. - }); - void handler.waitUntil(fetchAndCachePromise); - let response = await handler.cacheMatch(request); - let error; - if (response) { - { - logs.push(`Found a cached response in the '${this.cacheName}'` + ` cache. Will update with the network response in the background.`); - } - } else { - { - logs.push(`No response found in the '${this.cacheName}' cache. ` + `Will wait for the network response.`); - } - try { - // NOTE(philipwalton): Really annoying that we have to type cast here. - // https://github.com/microsoft/TypeScript/issues/20006 - response = await fetchAndCachePromise; - } catch (err) { - if (err instanceof Error) { - error = err; - } - } - } - { - logger_js.logger.groupCollapsed(messages.strategyStart(this.constructor.name, request)); - for (const log of logs) { - logger_js.logger.log(log); - } - messages.printFinalResponse(response); - logger_js.logger.groupEnd(); - } - if (!response) { - throw new WorkboxError_js.WorkboxError('no-response', { - url: request.url, - error - }); - } - return response; - } - } - - exports.CacheFirst = CacheFirst; - exports.CacheOnly = CacheOnly; - exports.NetworkFirst = NetworkFirst; - exports.NetworkOnly = NetworkOnly; - exports.StaleWhileRevalidate = StaleWhileRevalidate; - exports.Strategy = Strategy; - exports.StrategyHandler = StrategyHandler; - - return exports; - -})({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private); -//# sourceMappingURL=workbox-strategies.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-strategies.dev.js.map b/docs/workbox-v7.4.1/workbox-strategies.dev.js.map deleted file mode 100644 index 1d891dcb..00000000 --- a/docs/workbox-v7.4.1/workbox-strategies.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-strategies.dev.js","sources":["../_version.js","../StrategyHandler.js","../Strategy.js","../utils/messages.js","../CacheFirst.js","../CacheOnly.js","../plugins/cacheOkAndOpaquePlugin.js","../NetworkFirst.js","../NetworkOnly.js","../StaleWhileRevalidate.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:strategies:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheMatchIgnoreParams } from 'workbox-core/_private/cacheMatchIgnoreParams.js';\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { executeQuotaErrorCallbacks } from 'workbox-core/_private/executeQuotaErrorCallbacks.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { timeout } from 'workbox-core/_private/timeout.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\nfunction toRequest(input) {\n return typeof input === 'string' ? new Request(input) : input;\n}\n/**\n * A class created every time a Strategy instance calls\n * {@link workbox-strategies.Strategy~handle} or\n * {@link workbox-strategies.Strategy~handleAll} that wraps all fetch and\n * cache actions around plugin callbacks and keeps track of when the strategy\n * is \"done\" (i.e. all added `event.waitUntil()` promises have resolved).\n *\n * @memberof workbox-strategies\n */\nclass StrategyHandler {\n /**\n * Creates a new instance associated with the passed strategy and event\n * that's handling the request.\n *\n * The constructor also initializes the state that will be passed to each of\n * the plugins handling this request.\n *\n * @param {workbox-strategies.Strategy} strategy\n * @param {Object} options\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params] The return value from the\n * {@link workbox-routing~matchCallback} (if applicable).\n */\n constructor(strategy, options) {\n this._cacheKeys = {};\n /**\n * The request the strategy is performing (passed to the strategy's\n * `handle()` or `handleAll()` method).\n * @name request\n * @instance\n * @type {Request}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * The event associated with this request.\n * @name event\n * @instance\n * @type {ExtendableEvent}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * A `URL` instance of `request.url` (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `url` param will be present if the strategy was invoked\n * from a workbox `Route` object.\n * @name url\n * @instance\n * @type {URL|undefined}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * A `param` value (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `param` param will be present if the strategy was invoked\n * from a workbox `Route` object and the\n * {@link workbox-routing~matchCallback} returned\n * a truthy value (it will be that value).\n * @name params\n * @instance\n * @type {*|undefined}\n * @memberof workbox-strategies.StrategyHandler\n */\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(options.event, ExtendableEvent, {\n moduleName: 'workbox-strategies',\n className: 'StrategyHandler',\n funcName: 'constructor',\n paramName: 'options.event',\n });\n }\n Object.assign(this, options);\n this.event = options.event;\n this._strategy = strategy;\n this._handlerDeferred = new Deferred();\n this._extendLifetimePromises = [];\n // Copy the plugins list (since it's mutable on the strategy),\n // so any mutations don't affect this handler instance.\n this._plugins = [...strategy.plugins];\n this._pluginStateMap = new Map();\n for (const plugin of this._plugins) {\n this._pluginStateMap.set(plugin, {});\n }\n this.event.waitUntil(this._handlerDeferred.promise);\n }\n /**\n * Fetches a given request (and invokes any applicable plugin callback\n * methods) using the `fetchOptions` (for non-navigation requests) and\n * `plugins` defined on the `Strategy` object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - `requestWillFetch()`\n * - `fetchDidSucceed()`\n * - `fetchDidFail()`\n *\n * @param {Request|string} input The URL or request to fetch.\n * @return {Promise}\n */\n async fetch(input) {\n const { event } = this;\n let request = toRequest(input);\n if (request.mode === 'navigate' &&\n event instanceof FetchEvent &&\n event.preloadResponse) {\n const possiblePreloadResponse = (await event.preloadResponse);\n if (possiblePreloadResponse) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Using a preloaded navigation response for ` +\n `'${getFriendlyURL(request.url)}'`);\n }\n return possiblePreloadResponse;\n }\n }\n // If there is a fetchDidFail plugin, we need to save a clone of the\n // original request before it's either modified by a requestWillFetch\n // plugin or before the original request's body is consumed via fetch().\n const originalRequest = this.hasCallback('fetchDidFail')\n ? request.clone()\n : null;\n try {\n for (const cb of this.iterateCallbacks('requestWillFetch')) {\n request = await cb({ request: request.clone(), event });\n }\n }\n catch (err) {\n if (err instanceof Error) {\n throw new WorkboxError('plugin-error-request-will-fetch', {\n thrownErrorMessage: err.message,\n });\n }\n }\n // The request can be altered by plugins with `requestWillFetch` making\n // the original request (most likely from a `fetch` event) different\n // from the Request we make. Pass both to `fetchDidFail` to aid debugging.\n const pluginFilteredRequest = request.clone();\n try {\n let fetchResponse;\n // See https://github.com/GoogleChrome/workbox/issues/1796\n fetchResponse = await fetch(request, request.mode === 'navigate' ? undefined : this._strategy.fetchOptions);\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Network request for ` +\n `'${getFriendlyURL(request.url)}' returned a response with ` +\n `status '${fetchResponse.status}'.`);\n }\n for (const callback of this.iterateCallbacks('fetchDidSucceed')) {\n fetchResponse = await callback({\n event,\n request: pluginFilteredRequest,\n response: fetchResponse,\n });\n }\n return fetchResponse;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Network request for ` +\n `'${getFriendlyURL(request.url)}' threw an error.`, error);\n }\n // `originalRequest` will only exist if a `fetchDidFail` callback\n // is being used (see above).\n if (originalRequest) {\n await this.runCallbacks('fetchDidFail', {\n error: error,\n event,\n originalRequest: originalRequest.clone(),\n request: pluginFilteredRequest.clone(),\n });\n }\n throw error;\n }\n }\n /**\n * Calls `this.fetch()` and (in the background) runs `this.cachePut()` on\n * the response generated by `this.fetch()`.\n *\n * The call to `this.cachePut()` automatically invokes `this.waitUntil()`,\n * so you do not have to manually call `waitUntil()` on the event.\n *\n * @param {Request|string} input The request or URL to fetch and cache.\n * @return {Promise}\n */\n async fetchAndCachePut(input) {\n const response = await this.fetch(input);\n const responseClone = response.clone();\n void this.waitUntil(this.cachePut(input, responseClone));\n return response;\n }\n /**\n * Matches a request from the cache (and invokes any applicable plugin\n * callback methods) using the `cacheName`, `matchOptions`, and `plugins`\n * defined on the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillBeUsed()\n * - cachedResponseWillBeUsed()\n *\n * @param {Request|string} key The Request or URL to use as the cache key.\n * @return {Promise} A matching response, if found.\n */\n async cacheMatch(key) {\n const request = toRequest(key);\n let cachedResponse;\n const { cacheName, matchOptions } = this._strategy;\n const effectiveRequest = await this.getCacheKey(request, 'read');\n const multiMatchOptions = Object.assign(Object.assign({}, matchOptions), { cacheName });\n cachedResponse = await caches.match(effectiveRequest, multiMatchOptions);\n if (process.env.NODE_ENV !== 'production') {\n if (cachedResponse) {\n logger.debug(`Found a cached response in '${cacheName}'.`);\n }\n else {\n logger.debug(`No cached response found in '${cacheName}'.`);\n }\n }\n for (const callback of this.iterateCallbacks('cachedResponseWillBeUsed')) {\n cachedResponse =\n (await callback({\n cacheName,\n matchOptions,\n cachedResponse,\n request: effectiveRequest,\n event: this.event,\n })) || undefined;\n }\n return cachedResponse;\n }\n /**\n * Puts a request/response pair in the cache (and invokes any applicable\n * plugin callback methods) using the `cacheName` and `plugins` defined on\n * the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillBeUsed()\n * - cacheWillUpdate()\n * - cacheDidUpdate()\n *\n * @param {Request|string} key The request or URL to use as the cache key.\n * @param {Response} response The response to cache.\n * @return {Promise} `false` if a cacheWillUpdate caused the response\n * not be cached, and `true` otherwise.\n */\n async cachePut(key, response) {\n const request = toRequest(key);\n // Run in the next task to avoid blocking other cache reads.\n // https://github.com/w3c/ServiceWorker/issues/1397\n await timeout(0);\n const effectiveRequest = await this.getCacheKey(request, 'write');\n if (process.env.NODE_ENV !== 'production') {\n if (effectiveRequest.method && effectiveRequest.method !== 'GET') {\n throw new WorkboxError('attempt-to-cache-non-get-request', {\n url: getFriendlyURL(effectiveRequest.url),\n method: effectiveRequest.method,\n });\n }\n // See https://github.com/GoogleChrome/workbox/issues/2818\n const vary = response.headers.get('Vary');\n if (vary) {\n logger.debug(`The response for ${getFriendlyURL(effectiveRequest.url)} ` +\n `has a 'Vary: ${vary}' header. ` +\n `Consider setting the {ignoreVary: true} option on your strategy ` +\n `to ensure cache matching and deletion works as expected.`);\n }\n }\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Cannot cache non-existent response for ` +\n `'${getFriendlyURL(effectiveRequest.url)}'.`);\n }\n throw new WorkboxError('cache-put-with-no-response', {\n url: getFriendlyURL(effectiveRequest.url),\n });\n }\n const responseToCache = await this._ensureResponseSafeToCache(response);\n if (!responseToCache) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' ` +\n `will not be cached.`, responseToCache);\n }\n return false;\n }\n const { cacheName, matchOptions } = this._strategy;\n const cache = await self.caches.open(cacheName);\n const hasCacheUpdateCallback = this.hasCallback('cacheDidUpdate');\n const oldResponse = hasCacheUpdateCallback\n ? await cacheMatchIgnoreParams(\n // TODO(philipwalton): the `__WB_REVISION__` param is a precaching\n // feature. Consider into ways to only add this behavior if using\n // precaching.\n cache, effectiveRequest.clone(), ['__WB_REVISION__'], matchOptions)\n : null;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Updating the '${cacheName}' cache with a new Response ` +\n `for ${getFriendlyURL(effectiveRequest.url)}.`);\n }\n try {\n await cache.put(effectiveRequest, hasCacheUpdateCallback ? responseToCache.clone() : responseToCache);\n }\n catch (error) {\n if (error instanceof Error) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError\n if (error.name === 'QuotaExceededError') {\n await executeQuotaErrorCallbacks();\n }\n throw error;\n }\n }\n for (const callback of this.iterateCallbacks('cacheDidUpdate')) {\n await callback({\n cacheName,\n oldResponse,\n newResponse: responseToCache.clone(),\n request: effectiveRequest,\n event: this.event,\n });\n }\n return true;\n }\n /**\n * Checks the list of plugins for the `cacheKeyWillBeUsed` callback, and\n * executes any of those callbacks found in sequence. The final `Request`\n * object returned by the last plugin is treated as the cache key for cache\n * reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have\n * been registered, the passed request is returned unmodified\n *\n * @param {Request} request\n * @param {string} mode\n * @return {Promise}\n */\n async getCacheKey(request, mode) {\n const key = `${request.url} | ${mode}`;\n if (!this._cacheKeys[key]) {\n let effectiveRequest = request;\n for (const callback of this.iterateCallbacks('cacheKeyWillBeUsed')) {\n effectiveRequest = toRequest(await callback({\n mode,\n request: effectiveRequest,\n event: this.event,\n // params has a type any can't change right now.\n params: this.params, // eslint-disable-line\n }));\n }\n this._cacheKeys[key] = effectiveRequest;\n }\n return this._cacheKeys[key];\n }\n /**\n * Returns true if the strategy has at least one plugin with the given\n * callback.\n *\n * @param {string} name The name of the callback to check for.\n * @return {boolean}\n */\n hasCallback(name) {\n for (const plugin of this._strategy.plugins) {\n if (name in plugin) {\n return true;\n }\n }\n return false;\n }\n /**\n * Runs all plugin callbacks matching the given name, in order, passing the\n * given param object (merged ith the current plugin state) as the only\n * argument.\n *\n * Note: since this method runs all plugins, it's not suitable for cases\n * where the return value of a callback needs to be applied prior to calling\n * the next callback. See\n * {@link workbox-strategies.StrategyHandler#iterateCallbacks}\n * below for how to handle that case.\n *\n * @param {string} name The name of the callback to run within each plugin.\n * @param {Object} param The object to pass as the first (and only) param\n * when executing each callback. This object will be merged with the\n * current plugin state prior to callback execution.\n */\n async runCallbacks(name, param) {\n for (const callback of this.iterateCallbacks(name)) {\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n await callback(param);\n }\n }\n /**\n * Accepts a callback and returns an iterable of matching plugin callbacks,\n * where each callback is wrapped with the current handler state (i.e. when\n * you call each callback, whatever object parameter you pass it will\n * be merged with the plugin's current state).\n *\n * @param {string} name The name fo the callback to run\n * @return {Array}\n */\n *iterateCallbacks(name) {\n for (const plugin of this._strategy.plugins) {\n if (typeof plugin[name] === 'function') {\n const state = this._pluginStateMap.get(plugin);\n const statefulCallback = (param) => {\n const statefulParam = Object.assign(Object.assign({}, param), { state });\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n return plugin[name](statefulParam);\n };\n yield statefulCallback;\n }\n }\n }\n /**\n * Adds a promise to the\n * [extend lifetime promises]{@link https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises}\n * of the event associated with the request being handled (usually a\n * `FetchEvent`).\n *\n * Note: you can await\n * {@link workbox-strategies.StrategyHandler~doneWaiting}\n * to know when all added promises have settled.\n *\n * @param {Promise} promise A promise to add to the extend lifetime promises\n * of the event that triggered the request.\n */\n waitUntil(promise) {\n this._extendLifetimePromises.push(promise);\n return promise;\n }\n /**\n * Returns a promise that resolves once all promises passed to\n * {@link workbox-strategies.StrategyHandler~waitUntil}\n * have settled.\n *\n * Note: any work done after `doneWaiting()` settles should be manually\n * passed to an event's `waitUntil()` method (not this handler's\n * `waitUntil()` method), otherwise the service worker thread may be killed\n * prior to your work completing.\n */\n async doneWaiting() {\n while (this._extendLifetimePromises.length) {\n const promises = this._extendLifetimePromises.splice(0);\n const result = await Promise.allSettled(promises);\n const firstRejection = result.find((i) => i.status === 'rejected');\n if (firstRejection) {\n throw firstRejection.reason;\n }\n }\n }\n /**\n * Stops running the strategy and immediately resolves any pending\n * `waitUntil()` promises.\n */\n destroy() {\n this._handlerDeferred.resolve(null);\n }\n /**\n * This method will call cacheWillUpdate on the available plugins (or use\n * status === 200) to determine if the Response is safe and valid to cache.\n *\n * @param {Request} options.request\n * @param {Response} options.response\n * @return {Promise}\n *\n * @private\n */\n async _ensureResponseSafeToCache(response) {\n let responseToCache = response;\n let pluginsUsed = false;\n for (const callback of this.iterateCallbacks('cacheWillUpdate')) {\n responseToCache =\n (await callback({\n request: this.request,\n response: responseToCache,\n event: this.event,\n })) || undefined;\n pluginsUsed = true;\n if (!responseToCache) {\n break;\n }\n }\n if (!pluginsUsed) {\n if (responseToCache && responseToCache.status !== 200) {\n responseToCache = undefined;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (responseToCache) {\n if (responseToCache.status !== 200) {\n if (responseToCache.status === 0) {\n logger.warn(`The response for '${this.request.url}' ` +\n `is an opaque response. The caching strategy that you're ` +\n `using will not cache opaque responses by default.`);\n }\n else {\n logger.debug(`The response for '${this.request.url}' ` +\n `returned a status code of '${response.status}' and won't ` +\n `be cached as a result.`);\n }\n }\n }\n }\n }\n return responseToCache;\n }\n}\nexport { StrategyHandler };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { StrategyHandler } from './StrategyHandler.js';\nimport './_version.js';\n/**\n * An abstract base class that all other strategy classes must extend from:\n *\n * @memberof workbox-strategies\n */\nclass Strategy {\n /**\n * Creates a new instance of the strategy and sets all documented option\n * properties as public instance properties.\n *\n * Note: if a custom strategy class extends the base Strategy class and does\n * not need more than these properties, it does not need to define its own\n * constructor.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {Object} [options.matchOptions] The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n */\n constructor(options = {}) {\n /**\n * Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n *\n * @type {string}\n */\n this.cacheName = cacheNames.getRuntimeName(options.cacheName);\n /**\n * The list\n * [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * used by this strategy.\n *\n * @type {Array}\n */\n this.plugins = options.plugins || [];\n /**\n * Values passed along to the\n * [`init`]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters}\n * of all fetch() requests made by this strategy.\n *\n * @type {Object}\n */\n this.fetchOptions = options.fetchOptions;\n /**\n * The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n *\n * @type {Object}\n */\n this.matchOptions = options.matchOptions;\n }\n /**\n * Perform a request strategy and returns a `Promise` that will resolve with\n * a `Response`, invoking all relevant plugin callbacks.\n *\n * When a strategy instance is registered with a Workbox\n * {@link workbox-routing.Route}, this method is automatically\n * called when the route matches.\n *\n * Alternatively, this method can be used in a standalone `FetchEvent`\n * listener by passing it to `event.respondWith()`.\n *\n * @param {FetchEvent|Object} options A `FetchEvent` or an object with the\n * properties listed below.\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n */\n handle(options) {\n const [responseDone] = this.handleAll(options);\n return responseDone;\n }\n /**\n * Similar to {@link workbox-strategies.Strategy~handle}, but\n * instead of just returning a `Promise` that resolves to a `Response` it\n * it will return an tuple of `[response, done]` promises, where the former\n * (`response`) is equivalent to what `handle()` returns, and the latter is a\n * Promise that will resolve once any promises that were added to\n * `event.waitUntil()` as part of performing the strategy have completed.\n *\n * You can await the `done` promise to ensure any extra work performed by\n * the strategy (usually caching responses) completes successfully.\n *\n * @param {FetchEvent|Object} options A `FetchEvent` or an object with the\n * properties listed below.\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n * @return {Array} A tuple of [response, done]\n * promises that can be used to determine when the response resolves as\n * well as when the handler has completed all its work.\n */\n handleAll(options) {\n // Allow for flexible options to be passed.\n if (options instanceof FetchEvent) {\n options = {\n event: options,\n request: options.request,\n };\n }\n const event = options.event;\n const request = typeof options.request === 'string'\n ? new Request(options.request)\n : options.request;\n const params = 'params' in options ? options.params : undefined;\n const handler = new StrategyHandler(this, { event, request, params });\n const responseDone = this._getResponse(handler, request, event);\n const handlerDone = this._awaitComplete(responseDone, handler, request, event);\n // Return an array of promises, suitable for use with Promise.all().\n return [responseDone, handlerDone];\n }\n async _getResponse(handler, request, event) {\n await handler.runCallbacks('handlerWillStart', { event, request });\n let response = undefined;\n try {\n response = await this._handle(request, handler);\n // The \"official\" Strategy subclasses all throw this error automatically,\n // but in case a third-party Strategy doesn't, ensure that we have a\n // consistent failure when there's no response or an error response.\n if (!response || response.type === 'error') {\n throw new WorkboxError('no-response', { url: request.url });\n }\n }\n catch (error) {\n if (error instanceof Error) {\n for (const callback of handler.iterateCallbacks('handlerDidError')) {\n response = await callback({ error, event, request });\n if (response) {\n break;\n }\n }\n }\n if (!response) {\n throw error;\n }\n else if (process.env.NODE_ENV !== 'production') {\n logger.log(`While responding to '${getFriendlyURL(request.url)}', ` +\n `an ${error instanceof Error ? error.toString() : ''} error occurred. Using a fallback response provided by ` +\n `a handlerDidError plugin.`);\n }\n }\n for (const callback of handler.iterateCallbacks('handlerWillRespond')) {\n response = await callback({ event, request, response });\n }\n return response;\n }\n async _awaitComplete(responseDone, handler, request, event) {\n let response;\n let error;\n try {\n response = await responseDone;\n }\n catch (error) {\n // Ignore errors, as response errors should be caught via the `response`\n // promise above. The `done` promise will only throw for errors in\n // promises passed to `handler.waitUntil()`.\n }\n try {\n await handler.runCallbacks('handlerDidRespond', {\n event,\n request,\n response,\n });\n await handler.doneWaiting();\n }\n catch (waitUntilError) {\n if (waitUntilError instanceof Error) {\n error = waitUntilError;\n }\n }\n await handler.runCallbacks('handlerDidComplete', {\n event,\n request,\n response,\n error: error,\n });\n handler.destroy();\n if (error) {\n throw error;\n }\n }\n}\nexport { Strategy };\n/**\n * Classes extending the `Strategy` based class should implement this method,\n * and leverage the {@link workbox-strategies.StrategyHandler}\n * arg to perform all fetching and cache logic, which will ensure all relevant\n * cache, cache options, fetch options and plugins are used (per the current\n * strategy instance).\n *\n * @name _handle\n * @instance\n * @abstract\n * @function\n * @param {Request} request\n * @param {workbox-strategies.StrategyHandler} handler\n * @return {Promise}\n *\n * @memberof workbox-strategies.Strategy\n */\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport '../_version.js';\nexport const messages = {\n strategyStart: (strategyName, request) => `Using ${strategyName} to respond to '${getFriendlyURL(request.url)}'`,\n printFinalResponse: (response) => {\n if (response) {\n logger.groupCollapsed(`View the final response here.`);\n logger.log(response || '[No response returned]');\n logger.groupEnd();\n }\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a [cache-first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-first-falling-back-to-network)\n * request strategy.\n *\n * A cache first strategy is useful for assets that have been revisioned,\n * such as URLs like `/styles/example.a8f5f1.css`, since they\n * can be cached for long periods of time.\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass CacheFirst extends Strategy {\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n const logs = [];\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'makeRequest',\n paramName: 'request',\n });\n }\n let response = await handler.cacheMatch(request);\n let error = undefined;\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`No response found in the '${this.cacheName}' cache. ` +\n `Will respond with a network request.`);\n }\n try {\n response = await handler.fetchAndCachePut(request);\n }\n catch (err) {\n if (err instanceof Error) {\n error = err;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Got response from network.`);\n }\n else {\n logs.push(`Unable to get a response from the network.`);\n }\n }\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Found a cached response in the '${this.cacheName}' cache.`);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n for (const log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url, error });\n }\n return response;\n }\n}\nexport { CacheFirst };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a [cache-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-only)\n * request strategy.\n *\n * This class is useful if you want to take advantage of any\n * [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/).\n *\n * If there is no cache match, this will throw a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass CacheOnly extends Strategy {\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'makeRequest',\n paramName: 'request',\n });\n }\n const response = await handler.cacheMatch(request);\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n if (response) {\n logger.log(`Found a cached response in the '${this.cacheName}' ` + `cache.`);\n messages.printFinalResponse(response);\n }\n else {\n logger.log(`No response found in the '${this.cacheName}' cache.`);\n }\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url });\n }\n return response;\n }\n}\nexport { CacheOnly };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nexport const cacheOkAndOpaquePlugin = {\n /**\n * Returns a valid response (to allow caching) if the status is 200 (OK) or\n * 0 (opaque).\n *\n * @param {Object} options\n * @param {Response} options.response\n * @return {Response|null}\n *\n * @private\n */\n cacheWillUpdate: async ({ response }) => {\n if (response.status === 200 || response.status === 0) {\n return response;\n }\n return null;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { cacheOkAndOpaquePlugin } from './plugins/cacheOkAndOpaquePlugin.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a\n * [network first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-first-falling-back-to-cache)\n * request strategy.\n *\n * By default, this strategy will cache responses with a 200 status code as\n * well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses).\n * Opaque responses are are cross-origin requests where the response doesn't\n * support [CORS](https://enable-cors.org/).\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass NetworkFirst extends Strategy {\n /**\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {Object} [options.matchOptions] [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n * @param {number} [options.networkTimeoutSeconds] If set, any network requests\n * that fail to respond within the timeout will fallback to the cache.\n *\n * This option can be used to combat\n * \"[lie-fi]{@link https://developers.google.com/web/fundamentals/performance/poor-connectivity/#lie-fi}\"\n * scenarios.\n */\n constructor(options = {}) {\n super(options);\n // If this instance contains no plugins with a 'cacheWillUpdate' callback,\n // prepend the `cacheOkAndOpaquePlugin` plugin to the plugins list.\n if (!this.plugins.some((p) => 'cacheWillUpdate' in p)) {\n this.plugins.unshift(cacheOkAndOpaquePlugin);\n }\n this._networkTimeoutSeconds = options.networkTimeoutSeconds || 0;\n if (process.env.NODE_ENV !== 'production') {\n if (this._networkTimeoutSeconds) {\n assert.isType(this._networkTimeoutSeconds, 'number', {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'constructor',\n paramName: 'networkTimeoutSeconds',\n });\n }\n }\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n const logs = [];\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'handle',\n paramName: 'makeRequest',\n });\n }\n const promises = [];\n let timeoutId;\n if (this._networkTimeoutSeconds) {\n const { id, promise } = this._getTimeoutPromise({ request, logs, handler });\n timeoutId = id;\n promises.push(promise);\n }\n const networkPromise = this._getNetworkPromise({\n timeoutId,\n request,\n logs,\n handler,\n });\n promises.push(networkPromise);\n const response = await handler.waitUntil((async () => {\n // Promise.race() will resolve as soon as the first promise resolves.\n return ((await handler.waitUntil(Promise.race(promises))) ||\n // If Promise.race() resolved with null, it might be due to a network\n // timeout + a cache miss. If that were to happen, we'd rather wait until\n // the networkPromise resolves instead of returning null.\n // Note that it's fine to await an already-resolved promise, so we don't\n // have to check to see if it's still \"in flight\".\n (await networkPromise));\n })());\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n for (const log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url });\n }\n return response;\n }\n /**\n * @param {Object} options\n * @param {Request} options.request\n * @param {Array} options.logs A reference to the logs array\n * @param {Event} options.event\n * @return {Promise}\n *\n * @private\n */\n _getTimeoutPromise({ request, logs, handler, }) {\n let timeoutId;\n const timeoutPromise = new Promise((resolve) => {\n const onNetworkTimeout = async () => {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Timing out the network response at ` +\n `${this._networkTimeoutSeconds} seconds.`);\n }\n resolve(await handler.cacheMatch(request));\n };\n timeoutId = setTimeout(onNetworkTimeout, this._networkTimeoutSeconds * 1000);\n });\n return {\n promise: timeoutPromise,\n id: timeoutId,\n };\n }\n /**\n * @param {Object} options\n * @param {number|undefined} options.timeoutId\n * @param {Request} options.request\n * @param {Array} options.logs A reference to the logs Array.\n * @param {Event} options.event\n * @return {Promise}\n *\n * @private\n */\n async _getNetworkPromise({ timeoutId, request, logs, handler, }) {\n let error;\n let response;\n try {\n response = await handler.fetchAndCachePut(request);\n }\n catch (fetchError) {\n if (fetchError instanceof Error) {\n error = fetchError;\n }\n }\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Got response from network.`);\n }\n else {\n logs.push(`Unable to get a response from the network. Will respond ` +\n `with a cached response.`);\n }\n }\n if (error || !response) {\n response = await handler.cacheMatch(request);\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Found a cached response in the '${this.cacheName}'` + ` cache.`);\n }\n else {\n logs.push(`No response found in the '${this.cacheName}' cache.`);\n }\n }\n }\n return response;\n }\n}\nexport { NetworkFirst };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { timeout } from 'workbox-core/_private/timeout.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a\n * [network-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-only)\n * request strategy.\n *\n * This class is useful if you want to take advantage of any\n * [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/).\n *\n * If the network request fails, this will throw a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass NetworkOnly extends Strategy {\n /**\n * @param {Object} [options]\n * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {number} [options.networkTimeoutSeconds] If set, any network requests\n * that fail to respond within the timeout will result in a network error.\n */\n constructor(options = {}) {\n super(options);\n this._networkTimeoutSeconds = options.networkTimeoutSeconds || 0;\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: '_handle',\n paramName: 'request',\n });\n }\n let error = undefined;\n let response;\n try {\n const promises = [\n handler.fetch(request),\n ];\n if (this._networkTimeoutSeconds) {\n const timeoutPromise = timeout(this._networkTimeoutSeconds * 1000);\n promises.push(timeoutPromise);\n }\n response = await Promise.race(promises);\n if (!response) {\n throw new Error(`Timed out the network response after ` +\n `${this._networkTimeoutSeconds} seconds.`);\n }\n }\n catch (err) {\n if (err instanceof Error) {\n error = err;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n if (response) {\n logger.log(`Got response from network.`);\n }\n else {\n logger.log(`Unable to get a response from the network.`);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url, error });\n }\n return response;\n }\n}\nexport { NetworkOnly };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { cacheOkAndOpaquePlugin } from './plugins/cacheOkAndOpaquePlugin.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a\n * [stale-while-revalidate](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#stale-while-revalidate)\n * request strategy.\n *\n * Resources are requested from both the cache and the network in parallel.\n * The strategy will respond with the cached version if available, otherwise\n * wait for the network response. The cache is updated with the network response\n * with each successful request.\n *\n * By default, this strategy will cache responses with a 200 status code as\n * well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses).\n * Opaque responses are cross-origin requests where the response doesn't\n * support [CORS](https://enable-cors.org/).\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass StaleWhileRevalidate extends Strategy {\n /**\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {Object} [options.matchOptions] [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n */\n constructor(options = {}) {\n super(options);\n // If this instance contains no plugins with a 'cacheWillUpdate' callback,\n // prepend the `cacheOkAndOpaquePlugin` plugin to the plugins list.\n if (!this.plugins.some((p) => 'cacheWillUpdate' in p)) {\n this.plugins.unshift(cacheOkAndOpaquePlugin);\n }\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n const logs = [];\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'handle',\n paramName: 'request',\n });\n }\n const fetchAndCachePromise = handler.fetchAndCachePut(request).catch(() => {\n // Swallow this error because a 'no-response' error will be thrown in\n // main handler return flow. This will be in the `waitUntil()` flow.\n });\n void handler.waitUntil(fetchAndCachePromise);\n let response = await handler.cacheMatch(request);\n let error;\n if (response) {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Found a cached response in the '${this.cacheName}'` +\n ` cache. Will update with the network response in the background.`);\n }\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`No response found in the '${this.cacheName}' cache. ` +\n `Will wait for the network response.`);\n }\n try {\n // NOTE(philipwalton): Really annoying that we have to type cast here.\n // https://github.com/microsoft/TypeScript/issues/20006\n response = (await fetchAndCachePromise);\n }\n catch (err) {\n if (err instanceof Error) {\n error = err;\n }\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n for (const log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url, error });\n }\n return response;\n }\n}\nexport { StaleWhileRevalidate };\n"],"names":["self","_","e","toRequest","input","Request","StrategyHandler","constructor","strategy","options","_cacheKeys","assert","isInstance","event","ExtendableEvent","moduleName","className","funcName","paramName","Object","assign","_strategy","_handlerDeferred","Deferred","_extendLifetimePromises","_plugins","plugins","_pluginStateMap","Map","plugin","set","waitUntil","promise","fetch","request","mode","FetchEvent","preloadResponse","possiblePreloadResponse","logger","log","getFriendlyURL","url","originalRequest","hasCallback","clone","cb","iterateCallbacks","err","Error","WorkboxError","thrownErrorMessage","message","pluginFilteredRequest","fetchResponse","undefined","fetchOptions","process","debug","status","callback","response","error","runCallbacks","fetchAndCachePut","responseClone","cachePut","cacheMatch","key","cachedResponse","cacheName","matchOptions","effectiveRequest","getCacheKey","multiMatchOptions","caches","match","timeout","method","vary","headers","get","responseToCache","_ensureResponseSafeToCache","cache","open","hasCacheUpdateCallback","oldResponse","cacheMatchIgnoreParams","put","name","executeQuotaErrorCallbacks","newResponse","params","param","state","statefulCallback","statefulParam","push","doneWaiting","length","promises","splice","result","Promise","allSettled","firstRejection","find","i","reason","destroy","resolve","pluginsUsed","warn","Strategy","cacheNames","getRuntimeName","handle","responseDone","handleAll","handler","_getResponse","handlerDone","_awaitComplete","_handle","type","toString","waitUntilError","messages","strategyStart","strategyName","printFinalResponse","groupCollapsed","groupEnd","CacheFirst","logs","CacheOnly","cacheOkAndOpaquePlugin","cacheWillUpdate","NetworkFirst","some","p","unshift","_networkTimeoutSeconds","networkTimeoutSeconds","isType","timeoutId","id","_getTimeoutPromise","networkPromise","_getNetworkPromise","race","timeoutPromise","onNetworkTimeout","setTimeout","fetchError","clearTimeout","NetworkOnly","StaleWhileRevalidate","fetchAndCachePromise","catch"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,0BAA0B,CAAC,IAAIC,CAAC,EAAE;IAC3C,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;ICLZ;IACA;;IAEA;IACA;IACA;IACA;IAUA,SAASC,SAASA,CAACC,KAAK,EAAE;MACtB,OAAO,OAAOA,KAAK,KAAK,QAAQ,GAAG,IAAIC,OAAO,CAACD,KAAK,CAAC,GAAGA,KAAK;IACjE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAME,eAAe,CAAC;IAClB;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACIC,EAAAA,WAAWA,CAACC,QAAQ,EAAEC,OAAO,EAAE;IAC3B,IAAA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;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-strategies.prod.js b/docs/workbox-v7.4.1/workbox-strategies.prod.js deleted file mode 100644 index 799f9413..00000000 --- a/docs/workbox-v7.4.1/workbox-strategies.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.strategies=function(t,e,s,r,n,i,a,o,c){"use strict";try{self["workbox:strategies:7.4.0"]&&_()}catch(t){}function h(t){return"string"==typeof t?new Request(t):t}class l{constructor(t,e){this.l={},Object.assign(this,e),this.event=e.event,this.u=t,this.p=new n.Deferred,this.m=[],this.v=[...t.plugins],this.q=new Map;for(const t of this.v)this.q.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:s}=this;let r=h(t);if("navigate"===r.mode&&s instanceof FetchEvent&&s.preloadResponse){const t=await s.preloadResponse;if(t)return t}const n=this.hasCallback("fetchDidFail")?r.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))r=await t({request:r.clone(),event:s})}catch(t){if(t instanceof Error)throw new e.WorkboxError("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const i=r.clone();try{let t;t=await fetch(r,"navigate"===r.mode?void 0:this.u.fetchOptions);for(const e of this.iterateCallbacks("fetchDidSucceed"))t=await e({event:s,request:i,response:t});return t}catch(t){throw n&&await this.runCallbacks("fetchDidFail",{error:t,event:s,originalRequest:n.clone(),request:i.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=h(t);let s;const{cacheName:r,matchOptions:n}=this.u,i=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},n),{cacheName:r});s=await caches.match(i,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:r,matchOptions:n,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(t,s){const n=h(t);await c.timeout(0);const o=await this.getCacheKey(n,"write");if(!s)throw new e.WorkboxError("cache-put-with-no-response",{url:a.getFriendlyURL(o.url)});const l=await this.g(s);if(!l)return!1;const{cacheName:w,matchOptions:u}=this.u,f=await self.caches.open(w),d=this.hasCallback("cacheDidUpdate"),p=d?await r.cacheMatchIgnoreParams(f,o.clone(),["__WB_REVISION__"],u):null;try{await f.put(o,d?l.clone():l)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await i.executeQuotaErrorCallbacks(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:w,oldResponse:p,newResponse:l.clone(),request:o,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.l[s]){let r=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))r=h(await t({mode:e,request:r,event:this.event,params:this.params}));this.l[s]=r}return this.l[s]}hasCallback(t){for(const e of this.u.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.u.plugins)if("function"==typeof e[t]){const s=this.q.get(e),r=r=>{const n=Object.assign(Object.assign({},r),{state:s});return e[t](n)};yield r}}waitUntil(t){return this.m.push(t),t}async doneWaiting(){for(;this.m.length;){const t=this.m.splice(0),e=(await Promise.allSettled(t)).find((t=>"rejected"===t.status));if(e)throw e.reason}}destroy(){this.p.resolve(null)}async g(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class w{constructor(t={}){this.cacheName=s.cacheNames.getRuntimeName(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,r="params"in t?t.params:void 0,n=new l(this,{event:e,request:s,params:r}),i=this._(n,s,e);return[i,this.k(i,n,s,e)]}async _(t,s,r){let n;await t.runCallbacks("handlerWillStart",{event:r,request:s});try{if(n=await this._handle(s,t),!n||"error"===n.type)throw new e.WorkboxError("no-response",{url:s.url})}catch(e){if(e instanceof Error)for(const i of t.iterateCallbacks("handlerDidError"))if(n=await i({error:e,event:r,request:s}),n)break;if(!n)throw e}for(const e of t.iterateCallbacks("handlerWillRespond"))n=await e({event:r,request:s,response:n});return n}async k(t,e,s,r){let n,i;try{n=await t}catch(i){}try{await e.runCallbacks("handlerDidRespond",{event:r,request:s,response:n}),await e.doneWaiting()}catch(t){t instanceof Error&&(i=t)}if(await e.runCallbacks("handlerDidComplete",{event:r,request:s,response:n,error:i}),e.destroy(),i)throw i}}const u={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null};return t.CacheFirst=class extends w{async _handle(t,s){let r,n=await s.cacheMatch(t);if(!n)try{n=await s.fetchAndCachePut(t)}catch(t){t instanceof Error&&(r=t)}if(!n)throw new e.WorkboxError("no-response",{url:t.url,error:r});return n}},t.CacheOnly=class extends w{async _handle(t,s){const r=await s.cacheMatch(t);if(!r)throw new e.WorkboxError("no-response",{url:t.url});return r}},t.NetworkFirst=class extends w{constructor(t={}){super(t),this.plugins.some((t=>"cacheWillUpdate"in t))||this.plugins.unshift(u),this.R=t.networkTimeoutSeconds||0}async _handle(t,s){const r=[],n=[];let i;if(this.R){const{id:e,promise:a}=this.W({request:t,logs:r,handler:s});i=e,n.push(a)}const a=this.O({timeoutId:i,request:t,logs:r,handler:s});n.push(a);const o=await s.waitUntil((async()=>await s.waitUntil(Promise.race(n))||await a)());if(!o)throw new e.WorkboxError("no-response",{url:t.url});return o}W({request:t,logs:e,handler:s}){let r;return{promise:new Promise((e=>{r=setTimeout((async()=>{e(await s.cacheMatch(t))}),1e3*this.R)})),id:r}}async O({timeoutId:t,request:e,logs:s,handler:r}){let n,i;try{i=await r.fetchAndCachePut(e)}catch(t){t instanceof Error&&(n=t)}return t&&clearTimeout(t),!n&&i||(i=await r.cacheMatch(e)),i}},t.NetworkOnly=class extends w{constructor(t={}){super(t),this.R=t.networkTimeoutSeconds||0}async _handle(t,s){let r,n;try{const e=[s.fetch(t)];if(this.R){const t=c.timeout(1e3*this.R);e.push(t)}if(n=await Promise.race(e),!n)throw new Error(`Timed out the network response after ${this.R} seconds.`)}catch(t){t instanceof Error&&(r=t)}if(!n)throw new e.WorkboxError("no-response",{url:t.url,error:r});return n}},t.StaleWhileRevalidate=class extends w{constructor(t={}){super(t),this.plugins.some((t=>"cacheWillUpdate"in t))||this.plugins.unshift(u)}async _handle(t,s){const r=s.fetchAndCachePut(t).catch((()=>{}));s.waitUntil(r);let n,i=await s.cacheMatch(t);if(i);else try{i=await r}catch(t){t instanceof Error&&(n=t)}if(!i)throw new e.WorkboxError("no-response",{url:t.url,error:n});return i}},t.Strategy=w,t.StrategyHandler=l,t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private); -//# sourceMappingURL=workbox-strategies.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-strategies.prod.js.map b/docs/workbox-v7.4.1/workbox-strategies.prod.js.map deleted file mode 100644 index 7f97d8d5..00000000 --- a/docs/workbox-v7.4.1/workbox-strategies.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-strategies.prod.js","sources":["../_version.js","../StrategyHandler.js","../Strategy.js","../plugins/cacheOkAndOpaquePlugin.js","../CacheFirst.js","../CacheOnly.js","../NetworkFirst.js","../NetworkOnly.js","../StaleWhileRevalidate.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:strategies:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheMatchIgnoreParams } from 'workbox-core/_private/cacheMatchIgnoreParams.js';\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { executeQuotaErrorCallbacks } from 'workbox-core/_private/executeQuotaErrorCallbacks.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { timeout } from 'workbox-core/_private/timeout.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\nfunction toRequest(input) {\n return typeof input === 'string' ? new Request(input) : input;\n}\n/**\n * A class created every time a Strategy instance calls\n * {@link workbox-strategies.Strategy~handle} or\n * {@link workbox-strategies.Strategy~handleAll} that wraps all fetch and\n * cache actions around plugin callbacks and keeps track of when the strategy\n * is \"done\" (i.e. all added `event.waitUntil()` promises have resolved).\n *\n * @memberof workbox-strategies\n */\nclass StrategyHandler {\n /**\n * Creates a new instance associated with the passed strategy and event\n * that's handling the request.\n *\n * The constructor also initializes the state that will be passed to each of\n * the plugins handling this request.\n *\n * @param {workbox-strategies.Strategy} strategy\n * @param {Object} options\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params] The return value from the\n * {@link workbox-routing~matchCallback} (if applicable).\n */\n constructor(strategy, options) {\n this._cacheKeys = {};\n /**\n * The request the strategy is performing (passed to the strategy's\n * `handle()` or `handleAll()` method).\n * @name request\n * @instance\n * @type {Request}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * The event associated with this request.\n * @name event\n * @instance\n * @type {ExtendableEvent}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * A `URL` instance of `request.url` (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `url` param will be present if the strategy was invoked\n * from a workbox `Route` object.\n * @name url\n * @instance\n * @type {URL|undefined}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * A `param` value (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `param` param will be present if the strategy was invoked\n * from a workbox `Route` object and the\n * {@link workbox-routing~matchCallback} returned\n * a truthy value (it will be that value).\n * @name params\n * @instance\n * @type {*|undefined}\n * @memberof workbox-strategies.StrategyHandler\n */\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(options.event, ExtendableEvent, {\n moduleName: 'workbox-strategies',\n className: 'StrategyHandler',\n funcName: 'constructor',\n paramName: 'options.event',\n });\n }\n Object.assign(this, options);\n this.event = options.event;\n this._strategy = strategy;\n this._handlerDeferred = new Deferred();\n this._extendLifetimePromises = [];\n // Copy the plugins list (since it's mutable on the strategy),\n // so any mutations don't affect this handler instance.\n this._plugins = [...strategy.plugins];\n this._pluginStateMap = new Map();\n for (const plugin of this._plugins) {\n this._pluginStateMap.set(plugin, {});\n }\n this.event.waitUntil(this._handlerDeferred.promise);\n }\n /**\n * Fetches a given request (and invokes any applicable plugin callback\n * methods) using the `fetchOptions` (for non-navigation requests) and\n * `plugins` defined on the `Strategy` object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - `requestWillFetch()`\n * - `fetchDidSucceed()`\n * - `fetchDidFail()`\n *\n * @param {Request|string} input The URL or request to fetch.\n * @return {Promise}\n */\n async fetch(input) {\n const { event } = this;\n let request = toRequest(input);\n if (request.mode === 'navigate' &&\n event instanceof FetchEvent &&\n event.preloadResponse) {\n const possiblePreloadResponse = (await event.preloadResponse);\n if (possiblePreloadResponse) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Using a preloaded navigation response for ` +\n `'${getFriendlyURL(request.url)}'`);\n }\n return possiblePreloadResponse;\n }\n }\n // If there is a fetchDidFail plugin, we need to save a clone of the\n // original request before it's either modified by a requestWillFetch\n // plugin or before the original request's body is consumed via fetch().\n const originalRequest = this.hasCallback('fetchDidFail')\n ? request.clone()\n : null;\n try {\n for (const cb of this.iterateCallbacks('requestWillFetch')) {\n request = await cb({ request: request.clone(), event });\n }\n }\n catch (err) {\n if (err instanceof Error) {\n throw new WorkboxError('plugin-error-request-will-fetch', {\n thrownErrorMessage: err.message,\n });\n }\n }\n // The request can be altered by plugins with `requestWillFetch` making\n // the original request (most likely from a `fetch` event) different\n // from the Request we make. Pass both to `fetchDidFail` to aid debugging.\n const pluginFilteredRequest = request.clone();\n try {\n let fetchResponse;\n // See https://github.com/GoogleChrome/workbox/issues/1796\n fetchResponse = await fetch(request, request.mode === 'navigate' ? undefined : this._strategy.fetchOptions);\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Network request for ` +\n `'${getFriendlyURL(request.url)}' returned a response with ` +\n `status '${fetchResponse.status}'.`);\n }\n for (const callback of this.iterateCallbacks('fetchDidSucceed')) {\n fetchResponse = await callback({\n event,\n request: pluginFilteredRequest,\n response: fetchResponse,\n });\n }\n return fetchResponse;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Network request for ` +\n `'${getFriendlyURL(request.url)}' threw an error.`, error);\n }\n // `originalRequest` will only exist if a `fetchDidFail` callback\n // is being used (see above).\n if (originalRequest) {\n await this.runCallbacks('fetchDidFail', {\n error: error,\n event,\n originalRequest: originalRequest.clone(),\n request: pluginFilteredRequest.clone(),\n });\n }\n throw error;\n }\n }\n /**\n * Calls `this.fetch()` and (in the background) runs `this.cachePut()` on\n * the response generated by `this.fetch()`.\n *\n * The call to `this.cachePut()` automatically invokes `this.waitUntil()`,\n * so you do not have to manually call `waitUntil()` on the event.\n *\n * @param {Request|string} input The request or URL to fetch and cache.\n * @return {Promise}\n */\n async fetchAndCachePut(input) {\n const response = await this.fetch(input);\n const responseClone = response.clone();\n void this.waitUntil(this.cachePut(input, responseClone));\n return response;\n }\n /**\n * Matches a request from the cache (and invokes any applicable plugin\n * callback methods) using the `cacheName`, `matchOptions`, and `plugins`\n * defined on the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillBeUsed()\n * - cachedResponseWillBeUsed()\n *\n * @param {Request|string} key The Request or URL to use as the cache key.\n * @return {Promise} A matching response, if found.\n */\n async cacheMatch(key) {\n const request = toRequest(key);\n let cachedResponse;\n const { cacheName, matchOptions } = this._strategy;\n const effectiveRequest = await this.getCacheKey(request, 'read');\n const multiMatchOptions = Object.assign(Object.assign({}, matchOptions), { cacheName });\n cachedResponse = await caches.match(effectiveRequest, multiMatchOptions);\n if (process.env.NODE_ENV !== 'production') {\n if (cachedResponse) {\n logger.debug(`Found a cached response in '${cacheName}'.`);\n }\n else {\n logger.debug(`No cached response found in '${cacheName}'.`);\n }\n }\n for (const callback of this.iterateCallbacks('cachedResponseWillBeUsed')) {\n cachedResponse =\n (await callback({\n cacheName,\n matchOptions,\n cachedResponse,\n request: effectiveRequest,\n event: this.event,\n })) || undefined;\n }\n return cachedResponse;\n }\n /**\n * Puts a request/response pair in the cache (and invokes any applicable\n * plugin callback methods) using the `cacheName` and `plugins` defined on\n * the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillBeUsed()\n * - cacheWillUpdate()\n * - cacheDidUpdate()\n *\n * @param {Request|string} key The request or URL to use as the cache key.\n * @param {Response} response The response to cache.\n * @return {Promise} `false` if a cacheWillUpdate caused the response\n * not be cached, and `true` otherwise.\n */\n async cachePut(key, response) {\n const request = toRequest(key);\n // Run in the next task to avoid blocking other cache reads.\n // https://github.com/w3c/ServiceWorker/issues/1397\n await timeout(0);\n const effectiveRequest = await this.getCacheKey(request, 'write');\n if (process.env.NODE_ENV !== 'production') {\n if (effectiveRequest.method && effectiveRequest.method !== 'GET') {\n throw new WorkboxError('attempt-to-cache-non-get-request', {\n url: getFriendlyURL(effectiveRequest.url),\n method: effectiveRequest.method,\n });\n }\n // See https://github.com/GoogleChrome/workbox/issues/2818\n const vary = response.headers.get('Vary');\n if (vary) {\n logger.debug(`The response for ${getFriendlyURL(effectiveRequest.url)} ` +\n `has a 'Vary: ${vary}' header. ` +\n `Consider setting the {ignoreVary: true} option on your strategy ` +\n `to ensure cache matching and deletion works as expected.`);\n }\n }\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Cannot cache non-existent response for ` +\n `'${getFriendlyURL(effectiveRequest.url)}'.`);\n }\n throw new WorkboxError('cache-put-with-no-response', {\n url: getFriendlyURL(effectiveRequest.url),\n });\n }\n const responseToCache = await this._ensureResponseSafeToCache(response);\n if (!responseToCache) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' ` +\n `will not be cached.`, responseToCache);\n }\n return false;\n }\n const { cacheName, matchOptions } = this._strategy;\n const cache = await self.caches.open(cacheName);\n const hasCacheUpdateCallback = this.hasCallback('cacheDidUpdate');\n const oldResponse = hasCacheUpdateCallback\n ? await cacheMatchIgnoreParams(\n // TODO(philipwalton): the `__WB_REVISION__` param is a precaching\n // feature. Consider into ways to only add this behavior if using\n // precaching.\n cache, effectiveRequest.clone(), ['__WB_REVISION__'], matchOptions)\n : null;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Updating the '${cacheName}' cache with a new Response ` +\n `for ${getFriendlyURL(effectiveRequest.url)}.`);\n }\n try {\n await cache.put(effectiveRequest, hasCacheUpdateCallback ? responseToCache.clone() : responseToCache);\n }\n catch (error) {\n if (error instanceof Error) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError\n if (error.name === 'QuotaExceededError') {\n await executeQuotaErrorCallbacks();\n }\n throw error;\n }\n }\n for (const callback of this.iterateCallbacks('cacheDidUpdate')) {\n await callback({\n cacheName,\n oldResponse,\n newResponse: responseToCache.clone(),\n request: effectiveRequest,\n event: this.event,\n });\n }\n return true;\n }\n /**\n * Checks the list of plugins for the `cacheKeyWillBeUsed` callback, and\n * executes any of those callbacks found in sequence. The final `Request`\n * object returned by the last plugin is treated as the cache key for cache\n * reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have\n * been registered, the passed request is returned unmodified\n *\n * @param {Request} request\n * @param {string} mode\n * @return {Promise}\n */\n async getCacheKey(request, mode) {\n const key = `${request.url} | ${mode}`;\n if (!this._cacheKeys[key]) {\n let effectiveRequest = request;\n for (const callback of this.iterateCallbacks('cacheKeyWillBeUsed')) {\n effectiveRequest = toRequest(await callback({\n mode,\n request: effectiveRequest,\n event: this.event,\n // params has a type any can't change right now.\n params: this.params, // eslint-disable-line\n }));\n }\n this._cacheKeys[key] = effectiveRequest;\n }\n return this._cacheKeys[key];\n }\n /**\n * Returns true if the strategy has at least one plugin with the given\n * callback.\n *\n * @param {string} name The name of the callback to check for.\n * @return {boolean}\n */\n hasCallback(name) {\n for (const plugin of this._strategy.plugins) {\n if (name in plugin) {\n return true;\n }\n }\n return false;\n }\n /**\n * Runs all plugin callbacks matching the given name, in order, passing the\n * given param object (merged ith the current plugin state) as the only\n * argument.\n *\n * Note: since this method runs all plugins, it's not suitable for cases\n * where the return value of a callback needs to be applied prior to calling\n * the next callback. See\n * {@link workbox-strategies.StrategyHandler#iterateCallbacks}\n * below for how to handle that case.\n *\n * @param {string} name The name of the callback to run within each plugin.\n * @param {Object} param The object to pass as the first (and only) param\n * when executing each callback. This object will be merged with the\n * current plugin state prior to callback execution.\n */\n async runCallbacks(name, param) {\n for (const callback of this.iterateCallbacks(name)) {\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n await callback(param);\n }\n }\n /**\n * Accepts a callback and returns an iterable of matching plugin callbacks,\n * where each callback is wrapped with the current handler state (i.e. when\n * you call each callback, whatever object parameter you pass it will\n * be merged with the plugin's current state).\n *\n * @param {string} name The name fo the callback to run\n * @return {Array}\n */\n *iterateCallbacks(name) {\n for (const plugin of this._strategy.plugins) {\n if (typeof plugin[name] === 'function') {\n const state = this._pluginStateMap.get(plugin);\n const statefulCallback = (param) => {\n const statefulParam = Object.assign(Object.assign({}, param), { state });\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n return plugin[name](statefulParam);\n };\n yield statefulCallback;\n }\n }\n }\n /**\n * Adds a promise to the\n * [extend lifetime promises]{@link https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises}\n * of the event associated with the request being handled (usually a\n * `FetchEvent`).\n *\n * Note: you can await\n * {@link workbox-strategies.StrategyHandler~doneWaiting}\n * to know when all added promises have settled.\n *\n * @param {Promise} promise A promise to add to the extend lifetime promises\n * of the event that triggered the request.\n */\n waitUntil(promise) {\n this._extendLifetimePromises.push(promise);\n return promise;\n }\n /**\n * Returns a promise that resolves once all promises passed to\n * {@link workbox-strategies.StrategyHandler~waitUntil}\n * have settled.\n *\n * Note: any work done after `doneWaiting()` settles should be manually\n * passed to an event's `waitUntil()` method (not this handler's\n * `waitUntil()` method), otherwise the service worker thread may be killed\n * prior to your work completing.\n */\n async doneWaiting() {\n while (this._extendLifetimePromises.length) {\n const promises = this._extendLifetimePromises.splice(0);\n const result = await Promise.allSettled(promises);\n const firstRejection = result.find((i) => i.status === 'rejected');\n if (firstRejection) {\n throw firstRejection.reason;\n }\n }\n }\n /**\n * Stops running the strategy and immediately resolves any pending\n * `waitUntil()` promises.\n */\n destroy() {\n this._handlerDeferred.resolve(null);\n }\n /**\n * This method will call cacheWillUpdate on the available plugins (or use\n * status === 200) to determine if the Response is safe and valid to cache.\n *\n * @param {Request} options.request\n * @param {Response} options.response\n * @return {Promise}\n *\n * @private\n */\n async _ensureResponseSafeToCache(response) {\n let responseToCache = response;\n let pluginsUsed = false;\n for (const callback of this.iterateCallbacks('cacheWillUpdate')) {\n responseToCache =\n (await callback({\n request: this.request,\n response: responseToCache,\n event: this.event,\n })) || undefined;\n pluginsUsed = true;\n if (!responseToCache) {\n break;\n }\n }\n if (!pluginsUsed) {\n if (responseToCache && responseToCache.status !== 200) {\n responseToCache = undefined;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (responseToCache) {\n if (responseToCache.status !== 200) {\n if (responseToCache.status === 0) {\n logger.warn(`The response for '${this.request.url}' ` +\n `is an opaque response. The caching strategy that you're ` +\n `using will not cache opaque responses by default.`);\n }\n else {\n logger.debug(`The response for '${this.request.url}' ` +\n `returned a status code of '${response.status}' and won't ` +\n `be cached as a result.`);\n }\n }\n }\n }\n }\n return responseToCache;\n }\n}\nexport { StrategyHandler };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { StrategyHandler } from './StrategyHandler.js';\nimport './_version.js';\n/**\n * An abstract base class that all other strategy classes must extend from:\n *\n * @memberof workbox-strategies\n */\nclass Strategy {\n /**\n * Creates a new instance of the strategy and sets all documented option\n * properties as public instance properties.\n *\n * Note: if a custom strategy class extends the base Strategy class and does\n * not need more than these properties, it does not need to define its own\n * constructor.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {Object} [options.matchOptions] The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n */\n constructor(options = {}) {\n /**\n * Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n *\n * @type {string}\n */\n this.cacheName = cacheNames.getRuntimeName(options.cacheName);\n /**\n * The list\n * [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * used by this strategy.\n *\n * @type {Array}\n */\n this.plugins = options.plugins || [];\n /**\n * Values passed along to the\n * [`init`]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters}\n * of all fetch() requests made by this strategy.\n *\n * @type {Object}\n */\n this.fetchOptions = options.fetchOptions;\n /**\n * The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n *\n * @type {Object}\n */\n this.matchOptions = options.matchOptions;\n }\n /**\n * Perform a request strategy and returns a `Promise` that will resolve with\n * a `Response`, invoking all relevant plugin callbacks.\n *\n * When a strategy instance is registered with a Workbox\n * {@link workbox-routing.Route}, this method is automatically\n * called when the route matches.\n *\n * Alternatively, this method can be used in a standalone `FetchEvent`\n * listener by passing it to `event.respondWith()`.\n *\n * @param {FetchEvent|Object} options A `FetchEvent` or an object with the\n * properties listed below.\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n */\n handle(options) {\n const [responseDone] = this.handleAll(options);\n return responseDone;\n }\n /**\n * Similar to {@link workbox-strategies.Strategy~handle}, but\n * instead of just returning a `Promise` that resolves to a `Response` it\n * it will return an tuple of `[response, done]` promises, where the former\n * (`response`) is equivalent to what `handle()` returns, and the latter is a\n * Promise that will resolve once any promises that were added to\n * `event.waitUntil()` as part of performing the strategy have completed.\n *\n * You can await the `done` promise to ensure any extra work performed by\n * the strategy (usually caching responses) completes successfully.\n *\n * @param {FetchEvent|Object} options A `FetchEvent` or an object with the\n * properties listed below.\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n * @return {Array} A tuple of [response, done]\n * promises that can be used to determine when the response resolves as\n * well as when the handler has completed all its work.\n */\n handleAll(options) {\n // Allow for flexible options to be passed.\n if (options instanceof FetchEvent) {\n options = {\n event: options,\n request: options.request,\n };\n }\n const event = options.event;\n const request = typeof options.request === 'string'\n ? new Request(options.request)\n : options.request;\n const params = 'params' in options ? options.params : undefined;\n const handler = new StrategyHandler(this, { event, request, params });\n const responseDone = this._getResponse(handler, request, event);\n const handlerDone = this._awaitComplete(responseDone, handler, request, event);\n // Return an array of promises, suitable for use with Promise.all().\n return [responseDone, handlerDone];\n }\n async _getResponse(handler, request, event) {\n await handler.runCallbacks('handlerWillStart', { event, request });\n let response = undefined;\n try {\n response = await this._handle(request, handler);\n // The \"official\" Strategy subclasses all throw this error automatically,\n // but in case a third-party Strategy doesn't, ensure that we have a\n // consistent failure when there's no response or an error response.\n if (!response || response.type === 'error') {\n throw new WorkboxError('no-response', { url: request.url });\n }\n }\n catch (error) {\n if (error instanceof Error) {\n for (const callback of handler.iterateCallbacks('handlerDidError')) {\n response = await callback({ error, event, request });\n if (response) {\n break;\n }\n }\n }\n if (!response) {\n throw error;\n }\n else if (process.env.NODE_ENV !== 'production') {\n logger.log(`While responding to '${getFriendlyURL(request.url)}', ` +\n `an ${error instanceof Error ? error.toString() : ''} error occurred. Using a fallback response provided by ` +\n `a handlerDidError plugin.`);\n }\n }\n for (const callback of handler.iterateCallbacks('handlerWillRespond')) {\n response = await callback({ event, request, response });\n }\n return response;\n }\n async _awaitComplete(responseDone, handler, request, event) {\n let response;\n let error;\n try {\n response = await responseDone;\n }\n catch (error) {\n // Ignore errors, as response errors should be caught via the `response`\n // promise above. The `done` promise will only throw for errors in\n // promises passed to `handler.waitUntil()`.\n }\n try {\n await handler.runCallbacks('handlerDidRespond', {\n event,\n request,\n response,\n });\n await handler.doneWaiting();\n }\n catch (waitUntilError) {\n if (waitUntilError instanceof Error) {\n error = waitUntilError;\n }\n }\n await handler.runCallbacks('handlerDidComplete', {\n event,\n request,\n response,\n error: error,\n });\n handler.destroy();\n if (error) {\n throw error;\n }\n }\n}\nexport { Strategy };\n/**\n * Classes extending the `Strategy` based class should implement this method,\n * and leverage the {@link workbox-strategies.StrategyHandler}\n * arg to perform all fetching and cache logic, which will ensure all relevant\n * cache, cache options, fetch options and plugins are used (per the current\n * strategy instance).\n *\n * @name _handle\n * @instance\n * @abstract\n * @function\n * @param {Request} request\n * @param {workbox-strategies.StrategyHandler} handler\n * @return {Promise}\n *\n * @memberof workbox-strategies.Strategy\n */\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nexport const cacheOkAndOpaquePlugin = {\n /**\n * Returns a valid response (to allow caching) if the status is 200 (OK) or\n * 0 (opaque).\n *\n * @param {Object} options\n * @param {Response} options.response\n * @return {Response|null}\n *\n * @private\n */\n cacheWillUpdate: async ({ response }) => {\n if (response.status === 200 || response.status === 0) {\n return response;\n }\n return null;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a [cache-first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-first-falling-back-to-network)\n * request strategy.\n *\n * A cache first strategy is useful for assets that have been revisioned,\n * such as URLs like `/styles/example.a8f5f1.css`, since they\n * can be cached for long periods of time.\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass CacheFirst extends Strategy {\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n const logs = [];\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'makeRequest',\n paramName: 'request',\n });\n }\n let response = await handler.cacheMatch(request);\n let error = undefined;\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`No response found in the '${this.cacheName}' cache. ` +\n `Will respond with a network request.`);\n }\n try {\n response = await handler.fetchAndCachePut(request);\n }\n catch (err) {\n if (err instanceof Error) {\n error = err;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Got response from network.`);\n }\n else {\n logs.push(`Unable to get a response from the network.`);\n }\n }\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Found a cached response in the '${this.cacheName}' cache.`);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n for (const log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url, error });\n }\n return response;\n }\n}\nexport { CacheFirst };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a [cache-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-only)\n * request strategy.\n *\n * This class is useful if you want to take advantage of any\n * [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/).\n *\n * If there is no cache match, this will throw a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass CacheOnly extends Strategy {\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'makeRequest',\n paramName: 'request',\n });\n }\n const response = await handler.cacheMatch(request);\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n if (response) {\n logger.log(`Found a cached response in the '${this.cacheName}' ` + `cache.`);\n messages.printFinalResponse(response);\n }\n else {\n logger.log(`No response found in the '${this.cacheName}' cache.`);\n }\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url });\n }\n return response;\n }\n}\nexport { CacheOnly };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { cacheOkAndOpaquePlugin } from './plugins/cacheOkAndOpaquePlugin.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a\n * [network first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-first-falling-back-to-cache)\n * request strategy.\n *\n * By default, this strategy will cache responses with a 200 status code as\n * well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses).\n * Opaque responses are are cross-origin requests where the response doesn't\n * support [CORS](https://enable-cors.org/).\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass NetworkFirst extends Strategy {\n /**\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {Object} [options.matchOptions] [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n * @param {number} [options.networkTimeoutSeconds] If set, any network requests\n * that fail to respond within the timeout will fallback to the cache.\n *\n * This option can be used to combat\n * \"[lie-fi]{@link https://developers.google.com/web/fundamentals/performance/poor-connectivity/#lie-fi}\"\n * scenarios.\n */\n constructor(options = {}) {\n super(options);\n // If this instance contains no plugins with a 'cacheWillUpdate' callback,\n // prepend the `cacheOkAndOpaquePlugin` plugin to the plugins list.\n if (!this.plugins.some((p) => 'cacheWillUpdate' in p)) {\n this.plugins.unshift(cacheOkAndOpaquePlugin);\n }\n this._networkTimeoutSeconds = options.networkTimeoutSeconds || 0;\n if (process.env.NODE_ENV !== 'production') {\n if (this._networkTimeoutSeconds) {\n assert.isType(this._networkTimeoutSeconds, 'number', {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'constructor',\n paramName: 'networkTimeoutSeconds',\n });\n }\n }\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n const logs = [];\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'handle',\n paramName: 'makeRequest',\n });\n }\n const promises = [];\n let timeoutId;\n if (this._networkTimeoutSeconds) {\n const { id, promise } = this._getTimeoutPromise({ request, logs, handler });\n timeoutId = id;\n promises.push(promise);\n }\n const networkPromise = this._getNetworkPromise({\n timeoutId,\n request,\n logs,\n handler,\n });\n promises.push(networkPromise);\n const response = await handler.waitUntil((async () => {\n // Promise.race() will resolve as soon as the first promise resolves.\n return ((await handler.waitUntil(Promise.race(promises))) ||\n // If Promise.race() resolved with null, it might be due to a network\n // timeout + a cache miss. If that were to happen, we'd rather wait until\n // the networkPromise resolves instead of returning null.\n // Note that it's fine to await an already-resolved promise, so we don't\n // have to check to see if it's still \"in flight\".\n (await networkPromise));\n })());\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n for (const log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url });\n }\n return response;\n }\n /**\n * @param {Object} options\n * @param {Request} options.request\n * @param {Array} options.logs A reference to the logs array\n * @param {Event} options.event\n * @return {Promise}\n *\n * @private\n */\n _getTimeoutPromise({ request, logs, handler, }) {\n let timeoutId;\n const timeoutPromise = new Promise((resolve) => {\n const onNetworkTimeout = async () => {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Timing out the network response at ` +\n `${this._networkTimeoutSeconds} seconds.`);\n }\n resolve(await handler.cacheMatch(request));\n };\n timeoutId = setTimeout(onNetworkTimeout, this._networkTimeoutSeconds * 1000);\n });\n return {\n promise: timeoutPromise,\n id: timeoutId,\n };\n }\n /**\n * @param {Object} options\n * @param {number|undefined} options.timeoutId\n * @param {Request} options.request\n * @param {Array} options.logs A reference to the logs Array.\n * @param {Event} options.event\n * @return {Promise}\n *\n * @private\n */\n async _getNetworkPromise({ timeoutId, request, logs, handler, }) {\n let error;\n let response;\n try {\n response = await handler.fetchAndCachePut(request);\n }\n catch (fetchError) {\n if (fetchError instanceof Error) {\n error = fetchError;\n }\n }\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Got response from network.`);\n }\n else {\n logs.push(`Unable to get a response from the network. Will respond ` +\n `with a cached response.`);\n }\n }\n if (error || !response) {\n response = await handler.cacheMatch(request);\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Found a cached response in the '${this.cacheName}'` + ` cache.`);\n }\n else {\n logs.push(`No response found in the '${this.cacheName}' cache.`);\n }\n }\n }\n return response;\n }\n}\nexport { NetworkFirst };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { timeout } from 'workbox-core/_private/timeout.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a\n * [network-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network-only)\n * request strategy.\n *\n * This class is useful if you want to take advantage of any\n * [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/).\n *\n * If the network request fails, this will throw a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass NetworkOnly extends Strategy {\n /**\n * @param {Object} [options]\n * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {number} [options.networkTimeoutSeconds] If set, any network requests\n * that fail to respond within the timeout will result in a network error.\n */\n constructor(options = {}) {\n super(options);\n this._networkTimeoutSeconds = options.networkTimeoutSeconds || 0;\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: '_handle',\n paramName: 'request',\n });\n }\n let error = undefined;\n let response;\n try {\n const promises = [\n handler.fetch(request),\n ];\n if (this._networkTimeoutSeconds) {\n const timeoutPromise = timeout(this._networkTimeoutSeconds * 1000);\n promises.push(timeoutPromise);\n }\n response = await Promise.race(promises);\n if (!response) {\n throw new Error(`Timed out the network response after ` +\n `${this._networkTimeoutSeconds} seconds.`);\n }\n }\n catch (err) {\n if (err instanceof Error) {\n error = err;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n if (response) {\n logger.log(`Got response from network.`);\n }\n else {\n logger.log(`Unable to get a response from the network.`);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url, error });\n }\n return response;\n }\n}\nexport { NetworkOnly };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { cacheOkAndOpaquePlugin } from './plugins/cacheOkAndOpaquePlugin.js';\nimport { Strategy } from './Strategy.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a\n * [stale-while-revalidate](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#stale-while-revalidate)\n * request strategy.\n *\n * Resources are requested from both the cache and the network in parallel.\n * The strategy will respond with the cached version if available, otherwise\n * wait for the network response. The cache is updated with the network response\n * with each successful request.\n *\n * By default, this strategy will cache responses with a 200 status code as\n * well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses).\n * Opaque responses are cross-origin requests where the response doesn't\n * support [CORS](https://enable-cors.org/).\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-strategies\n */\nclass StaleWhileRevalidate extends Strategy {\n /**\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {Object} [options.matchOptions] [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n */\n constructor(options = {}) {\n super(options);\n // If this instance contains no plugins with a 'cacheWillUpdate' callback,\n // prepend the `cacheOkAndOpaquePlugin` plugin to the plugins list.\n if (!this.plugins.some((p) => 'cacheWillUpdate' in p)) {\n this.plugins.unshift(cacheOkAndOpaquePlugin);\n }\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise}\n */\n async _handle(request, handler) {\n const logs = [];\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: this.constructor.name,\n funcName: 'handle',\n paramName: 'request',\n });\n }\n const fetchAndCachePromise = handler.fetchAndCachePut(request).catch(() => {\n // Swallow this error because a 'no-response' error will be thrown in\n // main handler return flow. This will be in the `waitUntil()` flow.\n });\n void handler.waitUntil(fetchAndCachePromise);\n let response = await handler.cacheMatch(request);\n let error;\n if (response) {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Found a cached response in the '${this.cacheName}'` +\n ` cache. Will update with the network response in the background.`);\n }\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`No response found in the '${this.cacheName}' cache. ` +\n `Will wait for the network response.`);\n }\n try {\n // NOTE(philipwalton): Really annoying that we have to type cast here.\n // https://github.com/microsoft/TypeScript/issues/20006\n response = (await fetchAndCachePromise);\n }\n catch (err) {\n if (err instanceof Error) {\n error = err;\n }\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n for (const log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url, error });\n }\n return response;\n }\n}\nexport { StaleWhileRevalidate };\n"],"names":["self","_","e","toRequest","input","Request","StrategyHandler","constructor","strategy","options","this","_cacheKeys","Object","assign","event","_strategy","_handlerDeferred","Deferred","_extendLifetimePromises","_plugins","plugins","_pluginStateMap","Map","plugin","set","waitUntil","promise","async","request","mode","FetchEvent","preloadResponse","possiblePreloadResponse","originalRequest","hasCallback","clone","cb","iterateCallbacks","err","Error","WorkboxError","thrownErrorMessage","message","pluginFilteredRequest","fetchResponse","fetch","undefined","fetchOptions","callback","response","error","runCallbacks","responseClone","cachePut","key","cachedResponse","cacheName","matchOptions","effectiveRequest","getCacheKey","multiMatchOptions","caches","match","timeout","url","getFriendlyURL","responseToCache","_ensureResponseSafeToCache","cache","open","hasCacheUpdateCallback","oldResponse","cacheMatchIgnoreParams","put","name","executeQuotaErrorCallbacks","newResponse","params","param","state","get","statefulCallback","statefulParam","push","length","promises","splice","firstRejection","Promise","allSettled","find","i","status","reason","destroy","resolve","pluginsUsed","Strategy","cacheNames","getRuntimeName","handle","responseDone","handleAll","handler","_getResponse","_awaitComplete","_handle","type","doneWaiting","waitUntilError","cacheOkAndOpaquePlugin","cacheWillUpdate","cacheMatch","fetchAndCachePut","super","some","p","unshift","_networkTimeoutSeconds","networkTimeoutSeconds","logs","timeoutId","id","_getTimeoutPromise","networkPromise","_getNetworkPromise","race","setTimeout","fetchError","clearTimeout","timeoutProm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EAAQZ,EAEhB,CAUJ,IAAKW,EACD,MAAM,IAAIT,EAAAA,aAAa,cAAe,CAAEwB,IAAKpC,EAAQoC,IAAKd,UAE9D,OAAOD,CACX"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-streams.dev.js b/docs/workbox-v7.4.1/workbox-streams.dev.js deleted file mode 100644 index 4b0a575e..00000000 --- a/docs/workbox-v7.4.1/workbox-streams.dev.js +++ /dev/null @@ -1,303 +0,0 @@ -this.workbox = this.workbox || {}; -this.workbox.streams = (function (exports, assert_js, Deferred_js, logger_js, WorkboxError_js, canConstructReadableStream_js) { - 'use strict'; - - // @ts-ignore - try { - self['workbox:streams:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Takes either a Response, a ReadableStream, or a - * [BodyInit](https://fetch.spec.whatwg.org/#bodyinit) and returns the - * ReadableStreamReader object associated with it. - * - * @param {workbox-streams.StreamSource} source - * @return {ReadableStreamReader} - * @private - */ - function _getReaderFromSource(source) { - if (source instanceof Response) { - // See https://github.com/GoogleChrome/workbox/issues/2998 - if (source.body) { - return source.body.getReader(); - } - throw new WorkboxError_js.WorkboxError('opaque-streams-source', { - type: source.type - }); - } - if (source instanceof ReadableStream) { - return source.getReader(); - } - return new Response(source).body.getReader(); - } - /** - * Takes multiple source Promises, each of which could resolve to a Response, a - * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit). - * - * Returns an object exposing a ReadableStream with each individual stream's - * data returned in sequence, along with a Promise which signals when the - * stream is finished (useful for passing to a FetchEvent's waitUntil()). - * - * @param {Array>} sourcePromises - * @return {Object<{done: Promise, stream: ReadableStream}>} - * - * @memberof workbox-streams - */ - function concatenate(sourcePromises) { - { - assert_js.assert.isArray(sourcePromises, { - moduleName: 'workbox-streams', - funcName: 'concatenate', - paramName: 'sourcePromises' - }); - } - const readerPromises = sourcePromises.map(sourcePromise => { - return Promise.resolve(sourcePromise).then(source => { - return _getReaderFromSource(source); - }); - }); - const streamDeferred = new Deferred_js.Deferred(); - let i = 0; - const logMessages = []; - const stream = new ReadableStream({ - pull(controller) { - return readerPromises[i].then(reader => { - if (reader instanceof ReadableStreamDefaultReader) { - return reader.read(); - } else { - return; - } - }).then(result => { - if (result === null || result === void 0 ? void 0 : result.done) { - { - logMessages.push(['Reached the end of source:', sourcePromises[i]]); - } - i++; - if (i >= readerPromises.length) { - // Log all the messages in the group at once in a single group. - { - logger_js.logger.groupCollapsed(`Concatenating ${readerPromises.length} sources.`); - for (const message of logMessages) { - if (Array.isArray(message)) { - logger_js.logger.log(...message); - } else { - logger_js.logger.log(message); - } - } - logger_js.logger.log('Finished reading all sources.'); - logger_js.logger.groupEnd(); - } - controller.close(); - streamDeferred.resolve(); - return; - } - // The `pull` method is defined because we're inside it. - return this.pull(controller); - } else { - controller.enqueue(result === null || result === void 0 ? void 0 : result.value); - } - }).catch(error => { - { - logger_js.logger.error('An error occurred:', error); - } - streamDeferred.reject(error); - throw error; - }); - }, - cancel() { - { - logger_js.logger.warn('The ReadableStream was cancelled.'); - } - streamDeferred.resolve(); - } - }); - return { - done: streamDeferred.promise, - stream - }; - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * This is a utility method that determines whether the current browser supports - * the features required to create streamed responses. Currently, it checks if - * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream) - * is available. - * - * @private - * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified, - * `'text/html'` will be used by default. - * @return {boolean} `true`, if the current browser meets the requirements for - * streaming responses, and `false` otherwise. - * - * @memberof workbox-streams - */ - function createHeaders(headersInit = {}) { - // See https://github.com/GoogleChrome/workbox/issues/1461 - const headers = new Headers(headersInit); - if (!headers.has('content-type')) { - headers.set('content-type', 'text/html'); - } - return headers; - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Takes multiple source Promises, each of which could resolve to a Response, a - * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit), - * along with a - * [HeadersInit](https://fetch.spec.whatwg.org/#typedefdef-headersinit). - * - * Returns an object exposing a Response whose body consists of each individual - * stream's data returned in sequence, along with a Promise which signals when - * the stream is finished (useful for passing to a FetchEvent's waitUntil()). - * - * @param {Array>} sourcePromises - * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified, - * `'text/html'` will be used by default. - * @return {Object<{done: Promise, response: Response}>} - * - * @memberof workbox-streams - */ - function concatenateToResponse(sourcePromises, headersInit) { - const { - done, - stream - } = concatenate(sourcePromises); - const headers = createHeaders(headersInit); - const response = new Response(stream, { - headers - }); - return { - done, - response - }; - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * This is a utility method that determines whether the current browser supports - * the features required to create streamed responses. Currently, it checks if - * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream) - * can be created. - * - * @return {boolean} `true`, if the current browser meets the requirements for - * streaming responses, and `false` otherwise. - * - * @memberof workbox-streams - */ - function isSupported() { - return canConstructReadableStream_js.canConstructReadableStream(); - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A shortcut to create a strategy that could be dropped-in to Workbox's router. - * - * On browsers that do not support constructing new `ReadableStream`s, this - * strategy will automatically wait for all the `sourceFunctions` to complete, - * and create a final response that concatenates their values together. - * - * @param {Array} sourceFunctions - * An array of functions similar to {@link workbox-routing~handlerCallback} - * but that instead return a {@link workbox-streams.StreamSource} (or a - * Promise which resolves to one). - * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified, - * `'text/html'` will be used by default. - * @return {workbox-routing~handlerCallback} - * @memberof workbox-streams - */ - function strategy(sourceFunctions, headersInit) { - return async ({ - event, - request, - url, - params - }) => { - const sourcePromises = sourceFunctions.map(fn => { - // Ensure the return value of the function is always a promise. - return Promise.resolve(fn({ - event, - request, - url, - params - })); - }); - if (isSupported()) { - const { - done, - response - } = concatenateToResponse(sourcePromises, headersInit); - if (event) { - event.waitUntil(done); - } - return response; - } - { - logger_js.logger.log(`The current browser doesn't support creating response ` + `streams. Falling back to non-streaming response instead.`); - } - // Fallback to waiting for everything to finish, and concatenating the - // responses. - const blobPartsPromises = sourcePromises.map(async sourcePromise => { - const source = await sourcePromise; - if (source instanceof Response) { - return source.blob(); - } else { - // Technically, a `StreamSource` object can include any valid - // `BodyInit` type, including `FormData` and `URLSearchParams`, which - // cannot be passed to the Blob constructor directly, so we have to - // convert them to actual Blobs first. - return new Response(source).blob(); - } - }); - const blobParts = await Promise.all(blobPartsPromises); - const headers = createHeaders(headersInit); - // Constructing a new Response from a Blob source is well-supported. - // So is constructing a new Blob from multiple source Blobs or strings. - return new Response(new Blob(blobParts), { - headers - }); - }; - } - - exports.concatenate = concatenate; - exports.concatenateToResponse = concatenateToResponse; - exports.isSupported = isSupported; - exports.strategy = strategy; - - return exports; - -})({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private); -//# sourceMappingURL=workbox-streams.dev.js.map diff --git a/docs/workbox-v7.4.1/workbox-streams.dev.js.map b/docs/workbox-v7.4.1/workbox-streams.dev.js.map deleted file mode 100644 index 3bf9b2f4..00000000 --- a/docs/workbox-v7.4.1/workbox-streams.dev.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-streams.dev.js","sources":["../_version.js","../concatenate.js","../utils/createHeaders.js","../concatenateToResponse.js","../isSupported.js","../strategy.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:streams:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\n/**\n * Takes either a Response, a ReadableStream, or a\n * [BodyInit](https://fetch.spec.whatwg.org/#bodyinit) and returns the\n * ReadableStreamReader object associated with it.\n *\n * @param {workbox-streams.StreamSource} source\n * @return {ReadableStreamReader}\n * @private\n */\nfunction _getReaderFromSource(source) {\n if (source instanceof Response) {\n // See https://github.com/GoogleChrome/workbox/issues/2998\n if (source.body) {\n return source.body.getReader();\n }\n throw new WorkboxError('opaque-streams-source', { type: source.type });\n }\n if (source instanceof ReadableStream) {\n return source.getReader();\n }\n return new Response(source).body.getReader();\n}\n/**\n * Takes multiple source Promises, each of which could resolve to a Response, a\n * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit).\n *\n * Returns an object exposing a ReadableStream with each individual stream's\n * data returned in sequence, along with a Promise which signals when the\n * stream is finished (useful for passing to a FetchEvent's waitUntil()).\n *\n * @param {Array>} sourcePromises\n * @return {Object<{done: Promise, stream: ReadableStream}>}\n *\n * @memberof workbox-streams\n */\nfunction concatenate(sourcePromises) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(sourcePromises, {\n moduleName: 'workbox-streams',\n funcName: 'concatenate',\n paramName: 'sourcePromises',\n });\n }\n const readerPromises = sourcePromises.map((sourcePromise) => {\n return Promise.resolve(sourcePromise).then((source) => {\n return _getReaderFromSource(source);\n });\n });\n const streamDeferred = new Deferred();\n let i = 0;\n const logMessages = [];\n const stream = new ReadableStream({\n pull(controller) {\n return readerPromises[i]\n .then((reader) => {\n if (reader instanceof ReadableStreamDefaultReader) {\n return reader.read();\n }\n else {\n return;\n }\n })\n .then((result) => {\n if (result === null || result === void 0 ? void 0 : result.done) {\n if (process.env.NODE_ENV !== 'production') {\n logMessages.push([\n 'Reached the end of source:',\n sourcePromises[i],\n ]);\n }\n i++;\n if (i >= readerPromises.length) {\n // Log all the messages in the group at once in a single group.\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(`Concatenating ${readerPromises.length} sources.`);\n for (const message of logMessages) {\n if (Array.isArray(message)) {\n logger.log(...message);\n }\n else {\n logger.log(message);\n }\n }\n logger.log('Finished reading all sources.');\n logger.groupEnd();\n }\n controller.close();\n streamDeferred.resolve();\n return;\n }\n // The `pull` method is defined because we're inside it.\n return this.pull(controller);\n }\n else {\n controller.enqueue(result === null || result === void 0 ? void 0 : result.value);\n }\n })\n .catch((error) => {\n if (process.env.NODE_ENV !== 'production') {\n logger.error('An error occurred:', error);\n }\n streamDeferred.reject(error);\n throw error;\n });\n },\n cancel() {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('The ReadableStream was cancelled.');\n }\n streamDeferred.resolve();\n },\n });\n return { done: streamDeferred.promise, stream };\n}\nexport { concatenate };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * This is a utility method that determines whether the current browser supports\n * the features required to create streamed responses. Currently, it checks if\n * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n * is available.\n *\n * @private\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {boolean} `true`, if the current browser meets the requirements for\n * streaming responses, and `false` otherwise.\n *\n * @memberof workbox-streams\n */\nfunction createHeaders(headersInit = {}) {\n // See https://github.com/GoogleChrome/workbox/issues/1461\n const headers = new Headers(headersInit);\n if (!headers.has('content-type')) {\n headers.set('content-type', 'text/html');\n }\n return headers;\n}\nexport { createHeaders };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { createHeaders } from './utils/createHeaders.js';\nimport { concatenate } from './concatenate.js';\nimport './_version.js';\n/**\n * Takes multiple source Promises, each of which could resolve to a Response, a\n * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit),\n * along with a\n * [HeadersInit](https://fetch.spec.whatwg.org/#typedefdef-headersinit).\n *\n * Returns an object exposing a Response whose body consists of each individual\n * stream's data returned in sequence, along with a Promise which signals when\n * the stream is finished (useful for passing to a FetchEvent's waitUntil()).\n *\n * @param {Array>} sourcePromises\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {Object<{done: Promise, response: Response}>}\n *\n * @memberof workbox-streams\n */\nfunction concatenateToResponse(sourcePromises, headersInit) {\n const { done, stream } = concatenate(sourcePromises);\n const headers = createHeaders(headersInit);\n const response = new Response(stream, { headers });\n return { done, response };\n}\nexport { concatenateToResponse };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { canConstructReadableStream } from 'workbox-core/_private/canConstructReadableStream.js';\nimport './_version.js';\n/**\n * This is a utility method that determines whether the current browser supports\n * the features required to create streamed responses. Currently, it checks if\n * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n * can be created.\n *\n * @return {boolean} `true`, if the current browser meets the requirements for\n * streaming responses, and `false` otherwise.\n *\n * @memberof workbox-streams\n */\nfunction isSupported() {\n return canConstructReadableStream();\n}\nexport { isSupported };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { createHeaders } from './utils/createHeaders.js';\nimport { concatenateToResponse } from './concatenateToResponse.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * A shortcut to create a strategy that could be dropped-in to Workbox's router.\n *\n * On browsers that do not support constructing new `ReadableStream`s, this\n * strategy will automatically wait for all the `sourceFunctions` to complete,\n * and create a final response that concatenates their values together.\n *\n * @param {Array} sourceFunctions\n * An array of functions similar to {@link workbox-routing~handlerCallback}\n * but that instead return a {@link workbox-streams.StreamSource} (or a\n * Promise which resolves to one).\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {workbox-routing~handlerCallback}\n * @memberof workbox-streams\n */\nfunction strategy(sourceFunctions, headersInit) {\n return async ({ event, request, url, params }) => {\n const sourcePromises = sourceFunctions.map((fn) => {\n // Ensure the return value of the function is always a promise.\n return Promise.resolve(fn({ event, request, url, params }));\n });\n if (isSupported()) {\n const { done, response } = concatenateToResponse(sourcePromises, headersInit);\n if (event) {\n event.waitUntil(done);\n }\n return response;\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The current browser doesn't support creating response ` +\n `streams. Falling back to non-streaming response instead.`);\n }\n // Fallback to waiting for everything to finish, and concatenating the\n // responses.\n const blobPartsPromises = sourcePromises.map(async (sourcePromise) => {\n const source = await sourcePromise;\n if (source instanceof Response) {\n return source.blob();\n }\n else {\n // Technically, a `StreamSource` object can include any valid\n // `BodyInit` type, including `FormData` and `URLSearchParams`, which\n // cannot be passed to the Blob constructor directly, so we have to\n // convert them to actual Blobs first.\n return new Response(source).blob();\n }\n });\n const blobParts = await Promise.all(blobPartsPromises);\n const headers = createHeaders(headersInit);\n // Constructing a new Response from a Blob source is well-supported.\n // So is constructing a new Blob from multiple source Blobs or strings.\n return new Response(new Blob(blobParts), { headers });\n };\n}\nexport { strategy };\n"],"names":["self","_","e","_getReaderFromSource","source","Response","body","getReader","WorkboxError","type","ReadableStream","concatenate","sourcePromises","assert","isArray","moduleName","funcName","paramName","readerPromises","map","sourcePromise","Promise","resolve","then","streamDeferred","Deferred","i","logMessages","stream","pull","controller","reader","ReadableStreamDefaultReader","read","result","done","push","length","logger","groupCollapsed","message","Array","log","groupEnd","close","enqueue","value","catch","error","reject","cancel","warn","promise","createHeaders","headersInit","headers","Headers","has","set","concatenateToResponse","response","isSupported","canConstructReadableStream","strategy","sourceFunctions","event","request","url","params","fn","waitUntil","blobPartsPromises","blob","blobParts","all","Blob"],"mappings":";;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,uBAAuB,CAAC,IAAIC,CAAC,EAAE;IACxC,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;ICLZ;IACA;;IAEA;IACA;IACA;IACA;IAMA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,SAASC,oBAAoBA,CAACC,MAAM,EAAE;MAClC,IAAIA,MAAM,YAAYC,QAAQ,EAAE;IAC5B;QACA,IAAID,MAAM,CAACE,IAAI,EAAE;IACb,MAAA,OAAOF,MAAM,CAACE,IAAI,CAACC,SAAS,EAAE;IAClC,IAAA;IACA,IAAA,MAAM,IAAIC,4BAAY,CAAC,uBAAuB,EAAE;UAAEC,IAAI,EAAEL,MAAM,CAACK;IAAK,KAAC,CAAC;IAC1E,EAAA;MACA,IAAIL,MAAM,YAAYM,cAAc,EAAE;IAClC,IAAA,OAAON,MAAM,CAACG,SAAS,EAAE;IAC7B,EAAA;MACA,OAAO,IAAIF,QAAQ,CAACD,MAAM,CAAC,CAACE,IAAI,CAACC,SAAS,EAAE;IAChD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,SAASI,WAAWA,CAACC,cAAc,EAAE;IACjC,EAA2C;IACvCC,IAAAA,gBAAM,CAACC,OAAO,CAACF,cAAc,EAAE;IAC3BG,MAAAA,UAAU,EAAE,iBAAiB;IAC7BC,MAAAA,QAAQ,EAAE,aAAa;IACvBC,MAAAA,SAAS,EAAE;IACf,KAAC,CAAC;IACN,EAAA;IACA,EAAA,MAAMC,cAAc,GAAGN,cAAc,CAACO,GAAG,CAAEC,aAAa,IAAK;QACzD,OAAOC,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AAO,OAAC,CAAC,CAAC;IAC/D,IAAA,CAAC,CAAC;QACF,IAAIP,WAAW,EAAE,EAAE;UACf,MAAM;YAAE1B,IAAI;IAAEyB,QAAAA;IAAS,OAAC,GAAGD,qBAAqB,CAAC/C,cAAc,EAAE0C,WAAW,CAAC;IAC7E,MAAA,IAAIW,KAAK,EAAE;IACPA,QAAAA,KAAK,CAACK,SAAS,CAACnC,IAAI,CAAC;IACzB,MAAA;IACA,MAAA,OAAOyB,QAAQ;IACnB,IAAA;IACA,IAA2C;IACvCtB,MAAAA,gBAAM,CAACI,GAAG,CAAE,CAAA,sDAAA,CAAuD,GAC9D,0DAAyD,CAAC;IACnE,IAAA;IACA;IACA;QACA,MAAM6B,iBAAiB,GAAG3D,cAAc,CAACO,GAAG,CAAC,MAAOC,aAAa,IAAK;UAClE,MAAMhB,MAAM,GAAG,MAAMgB,aAAa;UAClC,IAAIhB,MAAM,YAAYC,QAAQ,EAAE;IAC5B,QAAA,OAAOD,MAAM,CAACoE,IAAI,EAAE;IACxB,MAAA,CAAC,MACI;IACD;IACA;IACA;IACA;YACA,OAAO,IAAInE,QAAQ,CAACD,MAAM,CAAC,CAACoE,IAAI,EAAE;IACtC,MAAA;IACJ,IAAA,CAAC,CAAC;QACF,MAAMC,SAAS,GAAG,MAAMpD,OAAO,CAACqD,GAAG,CAACH,iBAAiB,CAAC;IACtD,IAAA,MAAMhB,OAAO,GAAGF,aAAa,CAACC,WAAW,CAAC;IAC1C;IACA;QACA,OAAO,IAAIjD,QAAQ,CAAC,IAAIsE,IAAI,CAACF,SAAS,CAAC,EAAE;IAAElB,MAAAA;IAAQ,KAAC,CAAC;MACzD,CAAC;IACL;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-streams.prod.js b/docs/workbox-v7.4.1/workbox-streams.prod.js deleted file mode 100644 index 498ee176..00000000 --- a/docs/workbox-v7.4.1/workbox-streams.prod.js +++ /dev/null @@ -1,2 +0,0 @@ -this.workbox=this.workbox||{},this.workbox.streams=function(e,n,t,r){"use strict";try{self["workbox:streams:7.4.0"]&&_()}catch(e){}function s(e){const r=e.map((e=>Promise.resolve(e).then((e=>function(e){if(e instanceof Response){if(e.body)return e.body.getReader();throw new t.WorkboxError("opaque-streams-source",{type:e.type})}return e instanceof ReadableStream?e.getReader():new Response(e).body.getReader()}(e))))),s=new n.Deferred;let o=0;const a=new ReadableStream({pull(e){return r[o].then((e=>e instanceof ReadableStreamDefaultReader?e.read():void 0)).then((n=>{if(null==n?void 0:n.done)return o++,o>=r.length?(e.close(),void s.resolve()):this.pull(e);e.enqueue(null==n?void 0:n.value)})).catch((e=>{throw s.reject(e),e}))},cancel(){s.resolve()}});return{done:s.promise,stream:a}}function o(e={}){const n=new Headers(e);return n.has("content-type")||n.set("content-type","text/html"),n}function a(e,n){const{done:t,stream:r}=s(e),a=o(n);return{done:t,response:new Response(r,{headers:a})}}function u(){return r.canConstructReadableStream()}return e.concatenate=s,e.concatenateToResponse=a,e.isSupported=u,e.strategy=function(e,n){return async({event:t,request:r,url:s,params:c})=>{const i=e.map((e=>Promise.resolve(e({event:t,request:r,url:s,params:c}))));if(u()){const{done:e,response:r}=a(i,n);return t&&t.waitUntil(e),r}const f=i.map((async e=>{const n=await e;return n instanceof Response?n.blob():new Response(n).blob()})),l=await Promise.all(f),w=o(n);return new Response(new Blob(l),{headers:w})}},e}({},workbox.core._private,workbox.core._private,workbox.core._private); -//# sourceMappingURL=workbox-streams.prod.js.map diff --git a/docs/workbox-v7.4.1/workbox-streams.prod.js.map b/docs/workbox-v7.4.1/workbox-streams.prod.js.map deleted file mode 100644 index 8caa8722..00000000 --- a/docs/workbox-v7.4.1/workbox-streams.prod.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-streams.prod.js","sources":["../_version.js","../concatenate.js","../utils/createHeaders.js","../concatenateToResponse.js","../isSupported.js","../strategy.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:streams:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\n/**\n * Takes either a Response, a ReadableStream, or a\n * [BodyInit](https://fetch.spec.whatwg.org/#bodyinit) and returns the\n * ReadableStreamReader object associated with it.\n *\n * @param {workbox-streams.StreamSource} source\n * @return {ReadableStreamReader}\n * @private\n */\nfunction _getReaderFromSource(source) {\n if (source instanceof Response) {\n // See https://github.com/GoogleChrome/workbox/issues/2998\n if (source.body) {\n return source.body.getReader();\n }\n throw new WorkboxError('opaque-streams-source', { type: source.type });\n }\n if (source instanceof ReadableStream) {\n return source.getReader();\n }\n return new Response(source).body.getReader();\n}\n/**\n * Takes multiple source Promises, each of which could resolve to a Response, a\n * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit).\n *\n * Returns an object exposing a ReadableStream with each individual stream's\n * data returned in sequence, along with a Promise which signals when the\n * stream is finished (useful for passing to a FetchEvent's waitUntil()).\n *\n * @param {Array>} sourcePromises\n * @return {Object<{done: Promise, stream: ReadableStream}>}\n *\n * @memberof workbox-streams\n */\nfunction concatenate(sourcePromises) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(sourcePromises, {\n moduleName: 'workbox-streams',\n funcName: 'concatenate',\n paramName: 'sourcePromises',\n });\n }\n const readerPromises = sourcePromises.map((sourcePromise) => {\n return Promise.resolve(sourcePromise).then((source) => {\n return _getReaderFromSource(source);\n });\n });\n const streamDeferred = new Deferred();\n let i = 0;\n const logMessages = [];\n const stream = new ReadableStream({\n pull(controller) {\n return readerPromises[i]\n .then((reader) => {\n if (reader instanceof ReadableStreamDefaultReader) {\n return reader.read();\n }\n else {\n return;\n }\n })\n .then((result) => {\n if (result === null || result === void 0 ? void 0 : result.done) {\n if (process.env.NODE_ENV !== 'production') {\n logMessages.push([\n 'Reached the end of source:',\n sourcePromises[i],\n ]);\n }\n i++;\n if (i >= readerPromises.length) {\n // Log all the messages in the group at once in a single group.\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(`Concatenating ${readerPromises.length} sources.`);\n for (const message of logMessages) {\n if (Array.isArray(message)) {\n logger.log(...message);\n }\n else {\n logger.log(message);\n }\n }\n logger.log('Finished reading all sources.');\n logger.groupEnd();\n }\n controller.close();\n streamDeferred.resolve();\n return;\n }\n // The `pull` method is defined because we're inside it.\n return this.pull(controller);\n }\n else {\n controller.enqueue(result === null || result === void 0 ? void 0 : result.value);\n }\n })\n .catch((error) => {\n if (process.env.NODE_ENV !== 'production') {\n logger.error('An error occurred:', error);\n }\n streamDeferred.reject(error);\n throw error;\n });\n },\n cancel() {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('The ReadableStream was cancelled.');\n }\n streamDeferred.resolve();\n },\n });\n return { done: streamDeferred.promise, stream };\n}\nexport { concatenate };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * This is a utility method that determines whether the current browser supports\n * the features required to create streamed responses. Currently, it checks if\n * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n * is available.\n *\n * @private\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {boolean} `true`, if the current browser meets the requirements for\n * streaming responses, and `false` otherwise.\n *\n * @memberof workbox-streams\n */\nfunction createHeaders(headersInit = {}) {\n // See https://github.com/GoogleChrome/workbox/issues/1461\n const headers = new Headers(headersInit);\n if (!headers.has('content-type')) {\n headers.set('content-type', 'text/html');\n }\n return headers;\n}\nexport { createHeaders };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { createHeaders } from './utils/createHeaders.js';\nimport { concatenate } from './concatenate.js';\nimport './_version.js';\n/**\n * Takes multiple source Promises, each of which could resolve to a Response, a\n * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit),\n * along with a\n * [HeadersInit](https://fetch.spec.whatwg.org/#typedefdef-headersinit).\n *\n * Returns an object exposing a Response whose body consists of each individual\n * stream's data returned in sequence, along with a Promise which signals when\n * the stream is finished (useful for passing to a FetchEvent's waitUntil()).\n *\n * @param {Array>} sourcePromises\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {Object<{done: Promise, response: Response}>}\n *\n * @memberof workbox-streams\n */\nfunction concatenateToResponse(sourcePromises, headersInit) {\n const { done, stream } = concatenate(sourcePromises);\n const headers = createHeaders(headersInit);\n const response = new Response(stream, { headers });\n return { done, response };\n}\nexport { concatenateToResponse };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { canConstructReadableStream } from 'workbox-core/_private/canConstructReadableStream.js';\nimport './_version.js';\n/**\n * This is a utility method that determines whether the current browser supports\n * the features required to create streamed responses. Currently, it checks if\n * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n * can be created.\n *\n * @return {boolean} `true`, if the current browser meets the requirements for\n * streaming responses, and `false` otherwise.\n *\n * @memberof workbox-streams\n */\nfunction isSupported() {\n return canConstructReadableStream();\n}\nexport { isSupported };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { createHeaders } from './utils/createHeaders.js';\nimport { concatenateToResponse } from './concatenateToResponse.js';\nimport { isSupported } from './isSupported.js';\nimport './_version.js';\n/**\n * A shortcut to create a strategy that could be dropped-in to Workbox's router.\n *\n * On browsers that do not support constructing new `ReadableStream`s, this\n * strategy will automatically wait for all the `sourceFunctions` to complete,\n * and create a final response that concatenates their values together.\n *\n * @param {Array} sourceFunctions\n * An array of functions similar to {@link workbox-routing~handlerCallback}\n * but that instead return a {@link workbox-streams.StreamSource} (or a\n * Promise which resolves to one).\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {workbox-routing~handlerCallback}\n * @memberof workbox-streams\n */\nfunction strategy(sourceFunctions, headersInit) {\n return async ({ event, request, url, params }) => {\n const sourcePromises = sourceFunctions.map((fn) => {\n // Ensure the return value of the function is always a promise.\n return Promise.resolve(fn({ event, request, url, params }));\n });\n if (isSupported()) {\n const { done, response } = concatenateToResponse(sourcePromises, headersInit);\n if (event) {\n event.waitUntil(done);\n }\n return response;\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The current browser doesn't support creating response ` +\n `streams. Falling back to non-streaming response instead.`);\n }\n // Fallback to waiting for everything to finish, and concatenating the\n // responses.\n const blobPartsPromises = sourcePromises.map(async (sourcePromise) => {\n const source = await sourcePromise;\n if (source instanceof Response) {\n return source.blob();\n }\n else {\n // Technically, a `StreamSource` object can include any valid\n // `BodyInit` type, including `FormData` and `URLSearchParams`, which\n // cannot be passed to the Blob constructor directly, so we have to\n // convert them to actual Blobs first.\n return new Response(source).blob();\n }\n });\n const blobParts = await Promise.all(blobPartsPromises);\n const headers = createHeaders(headersInit);\n // Constructing a new Response from a Blob source is well-supported.\n // So is constructing a new Blob from multiple source Blobs or strings.\n return new Response(new Blob(blobParts), { headers });\n };\n}\nexport { strategy };\n"],"names":["self","_","e","concatenate","sourcePromises","readerPromises","map","sourcePromise","Promise","resolve","then","source","Response","body","getReader","WorkboxError","type","ReadableStream","_getReaderFromSource","streamDeferred","Deferred","i","stream","pull","controller","reader","ReadableStreamDefaultReader","read","result","done","length","close","this","enqueue","value","catch","error","reject","cancel","promise","createHeaders","headersInit","headers","Headers","has","set","concatenateToResponse","response","isSupported","canConstructReadableStream","sourceFunctions","async","event","request","url","params","fn","waitUntil","blobPartsPromises","blob","blobParts","all","Blob"],"mappings":"kFAEA,IACIA,KAAK,0BAA4BC,GACrC,CACA,MAAOC,GAAK,CC0CZ,SAASC,EAAYC,GAQjB,MAAMC,EAAiBD,EAAeE,KAAKC,GAChCC,QAAQC,QAAQF,GAAeG,MAAMC,GAnCpD,SAA8BA,GAC1B,GAAIA,aAAkBC,SAAU,CAE5B,GAAID,EAAOE,KACP,OAAOF,EAAOE,KAAKC,YAEvB,MAAM,IAAIC,EAAAA,aAAa,wBAAyB,CAAEC,KAAML,EAAOK,MACnE,CACA,OAAIL,aAAkBM,eACXN,EAAOG,YAEX,IAAIF,SAASD,GAAQE,KAAKC,WACrC,CAwBmBI,CAAqBP,OAG9BQ,EAAiB,IAAIC,WAC3B,IAAIC,EAAI,EAER,MAAMC,EAAS,IAAIL,eAAe,CAC9BM,KAAKC,GACD,OAAOnB,EAAegB,GACjBX,MAAMe,GACHA,aAAkBC,4BACXD,EAAOE,YAGd,IAGHjB,MAAMkB,IACP,GAAIA,aAAuC,EAASA,EAAOC,KAQvD,OADAR,IACIA,GAAKhB,EAAeyB,QAepBN,EAAWO,aACXZ,EAAeV,WAIZuB,KAAKT,KAAKC,GAGjBA,EAAWS,QAAQL,aAAuC,EAASA,EAAOM,MAC9E,IAECC,OAAOC,IAKR,MADAjB,EAAekB,OAAOD,GAChBA,CAAK,GAEnB,EACAE,SAIInB,EAAeV,SACnB,IAEJ,MAAO,CAAEoB,KAAMV,EAAeoB,QAASjB,SAC3C,CCvGA,SAASkB,EAAcC,EAAc,IAEjC,MAAMC,EAAU,IAAIC,QAAQF,GAI5B,OAHKC,EAAQE,IAAI,iBACbF,EAAQG,IAAI,eAAgB,aAEzBH,CACX,CCFA,SAASI,EAAsB1C,EAAgBqC,GAC3C,MAAMZ,KAAEA,EAAIP,OAAEA,GAAWnB,EAAYC,GAC/BsC,EAAUF,EAAcC,GAE9B,MAAO,CAAEZ,OAAMkB,SADE,IAAInC,SAASU,EAAQ,CAAEoB,YAE5C,CCZA,SAASM,IACL,OAAOC,8BACX,6ECMA,SAAkBC,EAAiBT,GAC/B,OAAOU,OAASC,QAAOC,UAASC,MAAKC,aACjC,MAAMnD,EAAiB8C,EAAgB5C,KAAKkD,GAEjChD,QAAQC,QAAQ+C,EAAG,CAAEJ,QAAOC,UAASC,MAAKC,cAErD,GAAIP,IAAe,CACf,MAAMnB,KAAEA,EAAIkB,SAAEA,GAAaD,EAAsB1C,EAAgBqC,GAIjE,OAHIW,GACAA,EAAMK,UAAU5B,GAEbkB,CACX,CAOA,MAAMW,EAAoBtD,EAAeE,KAAI6C,UACzC,MAAMxC,QAAeJ,EACrB,OAAII,aAAkBC,SACXD,EAAOgD,OAOP,IAAI/C,SAASD,GAAQgD,MAChC,IAEEC,QAAkBpD,QAAQqD,IAAIH,GAC9BhB,EAAUF,EAAcC,GAG9B,OAAO,IAAI7B,SAAS,IAAIkD,KAAKF,GAAY,CAAElB,WAAU,CAE7D"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-sw.js b/docs/workbox-v7.4.1/workbox-sw.js deleted file mode 100644 index 13a45e26..00000000 --- a/docs/workbox-v7.4.1/workbox-sw.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(){"use strict";try{self["workbox:sw:7.4.1"]&&_()}catch(t){}const t={backgroundSync:"background-sync",broadcastUpdate:"broadcast-update",cacheableResponse:"cacheable-response",core:"core",expiration:"expiration",googleAnalytics:"offline-ga",navigationPreload:"navigation-preload",precaching:"precaching",rangeRequests:"range-requests",routing:"routing",strategies:"strategies",streams:"streams",recipes:"recipes"};self.workbox=new class{constructor(){return this.v={},this.t={debug:"localhost"===self.location.hostname,modulePathPrefix:null,modulePathCb:null},this.o=this.t.debug?"dev":"prod",this.i=!1,new Proxy(this,{get(e,s){if(e[s])return e[s];const o=t[s];return o&&e.loadModule(`workbox-${o}`),e[s]}})}setConfig(t={}){if(this.i)throw new Error("Config must be set before accessing workbox.* modules");Object.assign(this.t,t),this.o=this.t.debug?"dev":"prod"}loadModule(t){const e=this.h(t);try{importScripts(e),this.i=!0}catch(s){throw console.error(`Unable to import module '${t}' from '${e}'.`),s}}h(t){if(this.t.modulePathCb)return this.t.modulePathCb(t,this.t.debug);let e=["https://storage.googleapis.com/workbox-cdn/releases/7.4.1"];const s=`${t}.${this.o}.js`,o=this.t.modulePathPrefix;return o&&(e=o.split("/"),""===e[e.length-1]&&e.splice(e.length-1,1)),e.push(s),e.join("/")}}}(); -//# sourceMappingURL=workbox-sw.js.map diff --git a/docs/workbox-v7.4.1/workbox-sw.js.map b/docs/workbox-v7.4.1/workbox-sw.js.map deleted file mode 100644 index e68d31fd..00000000 --- a/docs/workbox-v7.4.1/workbox-sw.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-sw.js","sources":["../_version.mjs","../controllers/WorkboxSW.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:sw:7.4.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nconst CDN_PATH = `WORKBOX_CDN_ROOT_URL`;\n\nconst MODULE_KEY_TO_NAME_MAPPING = {\n /**\n * @name backgroundSync\n * @memberof workbox\n * @see module:workbox-background-sync\n */\n backgroundSync: 'background-sync',\n /**\n * @name broadcastUpdate\n * @memberof workbox\n * @see module:workbox-broadcast-update\n */\n broadcastUpdate: 'broadcast-update',\n /**\n * @name cacheableResponse\n * @memberof workbox\n * @see module:workbox-cacheable-response\n */\n cacheableResponse: 'cacheable-response',\n /**\n * @name core\n * @memberof workbox\n * @see module:workbox-core\n */\n core: 'core',\n /**\n * @name expiration\n * @memberof workbox\n * @see module:workbox-expiration\n */\n expiration: 'expiration',\n /**\n * @name googleAnalytics\n * @memberof workbox\n * @see module:workbox-google-analytics\n */\n googleAnalytics: 'offline-ga',\n /**\n * @name navigationPreload\n * @memberof workbox\n * @see module:workbox-navigation-preload\n */\n navigationPreload: 'navigation-preload',\n /**\n * @name precaching\n * @memberof workbox\n * @see module:workbox-precaching\n */\n precaching: 'precaching',\n /**\n * @name rangeRequests\n * @memberof workbox\n * @see module:workbox-range-requests\n */\n rangeRequests: 'range-requests',\n /**\n * @name routing\n * @memberof workbox\n * @see module:workbox-routing\n */\n routing: 'routing',\n /**\n * @name strategies\n * @memberof workbox\n * @see module:workbox-strategies\n */\n strategies: 'strategies',\n /**\n * @name streams\n * @memberof workbox\n * @see module:workbox-streams\n */\n streams: 'streams',\n /**\n * @name recipes\n * @memberof workbox\n * @see module:workbox-recipes\n */\n recipes: 'recipes',\n};\n\n/**\n * This class can be used to make it easy to use the various parts of\n * Workbox.\n *\n * @private\n */\nexport class WorkboxSW {\n /**\n * Creates a proxy that automatically loads workbox namespaces on demand.\n *\n * @private\n */\n constructor() {\n this.v = {};\n this._options = {\n debug: self.location.hostname === 'localhost',\n modulePathPrefix: null,\n modulePathCb: null,\n };\n\n this._env = this._options.debug ? 'dev' : 'prod';\n this._modulesLoaded = false;\n\n return new Proxy(this, {\n get(target, key) {\n if (target[key]) {\n return target[key];\n }\n\n const moduleName = MODULE_KEY_TO_NAME_MAPPING[key];\n if (moduleName) {\n target.loadModule(`workbox-${moduleName}`);\n }\n\n return target[key];\n },\n });\n }\n\n /**\n * Updates the configuration options. You can specify whether to treat as a\n * debug build and whether to use a CDN or a specific path when importing\n * other workbox-modules\n *\n * @param {Object} [options]\n * @param {boolean} [options.debug] If true, `dev` builds are using, otherwise\n * `prod` builds are used. By default, `prod` is used unless on localhost.\n * @param {Function} [options.modulePathPrefix] To avoid using the CDN with\n * `workbox-sw` set the path prefix of where modules should be loaded from.\n * For example `modulePathPrefix: '/third_party/workbox/v3.0.0/'`.\n * @param {workbox~ModulePathCallback} [options.modulePathCb] If defined,\n * this callback will be responsible for determining the path of each\n * workbox module.\n *\n * @alias workbox.setConfig\n */\n setConfig(options = {}) {\n if (!this._modulesLoaded) {\n Object.assign(this._options, options);\n this._env = this._options.debug ? 'dev' : 'prod';\n } else {\n throw new Error('Config must be set before accessing workbox.* modules');\n }\n }\n\n /**\n * Load a Workbox module by passing in the appropriate module name.\n *\n * This is not generally needed unless you know there are modules that are\n * dynamically used and you want to safe guard use of the module while the\n * user may be offline.\n *\n * @param {string} moduleName\n *\n * @alias workbox.loadModule\n */\n loadModule(moduleName) {\n const modulePath = this._getImportPath(moduleName);\n try {\n importScripts(modulePath);\n this._modulesLoaded = true;\n } catch (err) {\n // TODO Add context of this error if using the CDN vs the local file.\n\n // We can't rely on workbox-core being loaded so using console\n // eslint-disable-next-line\n console.error(\n `Unable to import module '${moduleName}' from '${modulePath}'.`);\n throw err;\n }\n }\n\n /**\n * This method will get the path / CDN URL to be used for importScript calls.\n *\n * @param {string} moduleName\n * @return {string} URL to the desired module.\n *\n * @private\n */\n _getImportPath(moduleName) {\n if (this._options.modulePathCb) {\n return this._options.modulePathCb(moduleName, this._options.debug);\n }\n\n // TODO: This needs to be dynamic some how.\n let pathParts = [CDN_PATH];\n\n const fileName = `${moduleName}.${this._env}.js`;\n\n const pathPrefix = this._options.modulePathPrefix;\n if (pathPrefix) {\n // Split to avoid issues with developers ending / not ending with slash\n pathParts = pathPrefix.split('/');\n\n // We don't need a slash at the end as we will be adding\n // a filename regardless\n if (pathParts[pathParts.length - 1] === '') {\n pathParts.splice(pathParts.length - 1, 1);\n }\n }\n\n pathParts.push(fileName);\n\n return pathParts.join('/');\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxSW} from './controllers/WorkboxSW.mjs';\nimport './_version.mjs';\n\n/**\n * @namespace workbox\n */\n\n// Don't export anything, just expose a global.\nself.workbox = new WorkboxSW();\n"],"names":["self","_","e","MODULE_KEY_TO_NAME_MAPPING","backgroundSync","broadcastUpdate","cacheableResponse","core","expiration","googleAnalytics","navigationPreload","precaching","rangeRequests","routing","strategies","streams","recipes","workbox","constructor","this","v","_options","debug","location","hostname","modulePathPrefix","modulePathCb","_env","_modulesLoaded","Proxy","get","target","key","moduleName","loadModule","setConfig","options","Error","Object","assign","modulePath","_getImportPath","importScripts","err","console","error","pathParts","fileName","pathPrefix","split","length","splice","push","join"],"mappings":"yBAAA,IAAIA,KAAK,qBAAqBC,GAAG,CAAC,MAAMC,GAAG,CCU3C,MAEMC,EAA6B,CAMjCC,eAAgB,kBAMhBC,gBAAiB,mBAMjBC,kBAAmB,qBAMnBC,KAAM,OAMNC,WAAY,aAMZC,gBAAiB,aAMjBC,kBAAmB,qBAMnBC,WAAY,aAMZC,cAAe,iBAMfC,QAAS,UAMTC,WAAY,aAMZC,QAAS,UAMTC,QAAS,WC1EXhB,KAAKiB,QAAU,IDmFR,MAMLC,cAWE,OAVAC,KAAKC,EAAI,CAAA,EACTD,KAAKE,EAAW,CACdC,MAAkC,cAA3BtB,KAAKuB,SAASC,SACrBC,iBAAkB,KAClBC,aAAc,MAGhBP,KAAKQ,EAAOR,KAAKE,EAASC,MAAQ,MAAQ,OAC1CH,KAAKS,GAAiB,EAEf,IAAIC,MAAMV,KAAM,CACrBW,IAAIC,EAAQC,GACV,GAAID,EAAOC,GACT,OAAOD,EAAOC,GAGhB,MAAMC,EAAa9B,EAA2B6B,GAK9C,OAJIC,GACFF,EAAOG,WAAY,WAAUD,KAGxBF,EAAOC,EAChB,GAEJ,CAmBAG,UAAUC,EAAU,IAClB,GAAKjB,KAAKS,EAIR,MAAM,IAAIS,MAAM,yDAHhBC,OAAOC,OAAOpB,KAAKE,EAAUe,GAC7BjB,KAAKQ,EAAOR,KAAKE,EAASC,MAAQ,MAAQ,MAI9C,CAaAY,WAAWD,GACT,MAAMO,EAAarB,KAAKsB,EAAeR,GACvC,IACES,cAAcF,GACdrB,KAAKS,GAAiB,CACxB,CAAE,MAAOe,GAOP,MAFAC,QAAQC,MACH,4BAA2BZ,YAAqBO,OAC/CG,CACR,CACF,CAUAF,EAAeR,GACb,GAAId,KAAKE,EAASK,aAChB,OAAOP,KAAKE,EAASK,aAAaO,EAAYd,KAAKE,EAASC,OAI9D,IAAIwB,EAAY,CA7LF,6DA+Ld,MAAMC,EAAY,GAAEd,KAAcd,KAAKQ,OAEjCqB,EAAa7B,KAAKE,EAASI,iBAcjC,OAbIuB,IAEFF,EAAYE,EAAWC,MAAM,KAIW,KAApCH,EAAUA,EAAUI,OAAS,IAC/BJ,EAAUK,OAAOL,EAAUI,OAAS,EAAG,IAI3CJ,EAAUM,KAAKL,GAERD,EAAUO,KAAK,IACxB"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-window.dev.es5.mjs b/docs/workbox-v7.4.1/workbox-window.dev.es5.mjs deleted file mode 100644 index eba949df..00000000 --- a/docs/workbox-v7.4.1/workbox-window.dev.es5.mjs +++ /dev/null @@ -1,997 +0,0 @@ -// @ts-ignore -try { - self['workbox:window:7.4.0'] && _(); -} catch (e) {} - -/* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * Sends a data object to a service worker via `postMessage` and resolves with - * a response (if any). - * - * A response can be set in a message handler in the service worker by - * calling `event.ports[0].postMessage(...)`, which will resolve the promise - * returned by `messageSW()`. If no response is set, the promise will not - * resolve. - * - * @param {ServiceWorker} sw The service worker to send the message to. - * @param {Object} data An object to send to the service worker. - * @return {Promise} - * @memberof workbox-window - */ -// Better not change type of data. -// eslint-disable-next-line @typescript-eslint/ban-types -function messageSW(sw, data) { - return new Promise(function (resolve) { - var messageChannel = new MessageChannel(); - messageChannel.port1.onmessage = function (event) { - resolve(event.data); - }; - sw.postMessage(data, [messageChannel.port2]); - }); -} - -function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -function _defineProperties(e, r) { - for (var t = 0; t < r.length; t++) { - var o = r[t]; - o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); - } -} -function _createClass(e, r, t) { - return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", { - writable: false - }), e; -} -function _createForOfIteratorHelperLoose(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (t) return (t = t.call(r)).next.bind(t); - if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { - t && (r = t); - var o = 0; - return function () { - return o >= r.length ? { - done: true - } : { - done: false, - value: r[o++] - }; - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -function _inheritsLoose(t, o) { - t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); -} -function _setPrototypeOf(t, e) { - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { - return t.__proto__ = e, t; - }, _setPrototypeOf(t, e); -} -function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (String )(t); -} -function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; -} -function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; - } -} - -// @ts-ignore -try { - self['workbox:core:7.4.0'] && _(); -} catch (e) {} - -/* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * The Deferred class composes Promises in a way that allows for them to be - * resolved or rejected from outside the constructor. In most cases promises - * should be used directly, but Deferreds can be necessary when the logic to - * resolve a promise must be separate. - * - * @private - */ -var Deferred = -/** - * Creates a promise and exposes its resolve and reject functions as methods. - */ -function Deferred() { - var _this = this; - this.promise = new Promise(function (resolve, reject) { - _this.resolve = resolve; - _this.reject = reject; - }); -}; - -/* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * A helper function that prevents a promise from being flagged as unused. - * - * @private - **/ -function dontWaitFor(promise) { - // Effective no-op. - void promise.then(function () {}); -} - -/* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -var logger = function () { - // Don't overwrite this value if it's already set. - // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923 - if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) { - self.__WB_DISABLE_DEV_LOGS = false; - } - var inGroup = false; - var methodToColorMap = { - debug: "#7f8c8d", - log: "#2ecc71", - warn: "#f39c12", - error: "#c0392b", - groupCollapsed: "#3498db", - groupEnd: null // No colored prefix on groupEnd - }; - var print = function print(method, args) { - var _console2; - if (self.__WB_DISABLE_DEV_LOGS) { - return; - } - if (method === 'groupCollapsed') { - // Safari doesn't print all console.groupCollapsed() arguments: - // https://bugs.webkit.org/show_bug.cgi?id=182754 - if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { - var _console; - (_console = console)[method].apply(_console, args); - return; - } - } - var styles = ["background: " + methodToColorMap[method], "border-radius: 0.5em", "color: white", "font-weight: bold", "padding: 2px 0.5em"]; - // When in a group, the workbox prefix is not displayed. - var logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')]; - (_console2 = console)[method].apply(_console2, logPrefix.concat(args)); - if (method === 'groupCollapsed') { - inGroup = true; - } - if (method === 'groupEnd') { - inGroup = false; - } - }; - // eslint-disable-next-line @typescript-eslint/ban-types - var api = {}; - var loggerMethods = Object.keys(methodToColorMap); - var _loop = function _loop() { - var key = _loggerMethods[_i]; - var method = key; - api[method] = function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - print(method, args); - }; - }; - for (var _i = 0, _loggerMethods = loggerMethods; _i < _loggerMethods.length; _i++) { - _loop(); - } - return api; -}(); - -/* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * A minimal `EventTarget` shim. - * This is necessary because not all browsers support constructable - * `EventTarget`, so using a real `EventTarget` will error. - * @private - */ -var WorkboxEventTarget = /*#__PURE__*/function () { - function WorkboxEventTarget() { - this._eventListenerRegistry = new Map(); - } - /** - * @param {string} type - * @param {Function} listener - * @private - */ - var _proto = WorkboxEventTarget.prototype; - _proto.addEventListener = function addEventListener(type, listener) { - var foo = this._getEventListenersByType(type); - foo.add(listener); - } - /** - * @param {string} type - * @param {Function} listener - * @private - */; - _proto.removeEventListener = function removeEventListener(type, listener) { - this._getEventListenersByType(type).delete(listener); - } - /** - * @param {Object} event - * @private - */; - _proto.dispatchEvent = function dispatchEvent(event) { - event.target = this; - var listeners = this._getEventListenersByType(event.type); - for (var _iterator = _createForOfIteratorHelperLoose(listeners), _step; !(_step = _iterator()).done;) { - var listener = _step.value; - listener(event); - } - } - /** - * Returns a Set of listeners associated with the passed event type. - * If no handlers have been registered, an empty Set is returned. - * - * @param {string} type The event type. - * @return {Set} An array of handler functions. - * @private - */; - _proto._getEventListenersByType = function _getEventListenersByType(type) { - if (!this._eventListenerRegistry.has(type)) { - this._eventListenerRegistry.set(type, new Set()); - } - return this._eventListenerRegistry.get(type); - }; - return WorkboxEventTarget; -}(); - -/* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * Returns true if two URLs have the same `.href` property. The URLS can be - * relative, and if they are the current location href is used to resolve URLs. - * - * @private - * @param {string} url1 - * @param {string} url2 - * @return {boolean} - */ -function urlsMatch(url1, url2) { - var _location = location, - href = _location.href; - return new URL(url1, href).href === new URL(url2, href).href; -} - -/* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * A minimal `Event` subclass shim. - * This doesn't *actually* subclass `Event` because not all browsers support - * constructable `EventTarget`, and using a real `Event` will error. - * @private - */ -var WorkboxEvent = function WorkboxEvent(type, props) { - this.type = type; - Object.assign(this, props); -}; - -// The time a SW must be in the waiting phase before we can conclude -// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically -// chosen, but it seems to avoid false positives in my testing. - -function _await(value, then, direct) { - if (!value || !value.then) { - value = Promise.resolve(value); - } - return then ? value.then(then) : value; -} -var WAITING_TIMEOUT_DURATION = 200; -// The amount of time after a registration that we can reasonably conclude -// that the registration didn't trigger an update. - -function _async(f) { - return function () { - for (var args = [], i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - try { - return Promise.resolve(f.apply(this, args)); - } catch (e) { - return Promise.reject(e); - } - }; -} -var REGISTRATION_TIMEOUT_DURATION = 60000; -// The de facto standard message that a service worker should be listening for -// to trigger a call to skipWaiting(). - -function _empty() {} -var SKIP_WAITING_MESSAGE = { - type: 'SKIP_WAITING' -}; -/** - * A class to aid in handling service worker registration, updates, and - * reacting to service worker lifecycle events. - * - * @fires {@link workbox-window.Workbox#message} - * @fires {@link workbox-window.Workbox#installed} - * @fires {@link workbox-window.Workbox#waiting} - * @fires {@link workbox-window.Workbox#controlling} - * @fires {@link workbox-window.Workbox#activated} - * @fires {@link workbox-window.Workbox#redundant} - * @memberof workbox-window - */ - -function _awaitIgnored(value, direct) { - { - return value && value.then ? value.then(_empty) : Promise.resolve(); - } -} -var Workbox = /*#__PURE__*/function (_WorkboxEventTarget) { - /** - * Creates a new Workbox instance with a script URL and service worker - * options. The script URL and options are the same as those used when - * calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register). - * - * @param {string|TrustedScriptURL} scriptURL The service worker script - * associated with this instance. Using a - * [`TrustedScriptURL`](https://web.dev/trusted-types/) is supported. - * @param {Object} [registerOptions] The service worker options associated - * with this instance. - */ - // eslint-disable-next-line @typescript-eslint/ban-types - function Workbox(scriptURL, registerOptions) { - var _this; - if (registerOptions === void 0) { - registerOptions = {}; - } - _this = _WorkboxEventTarget.call(this) || this; - _this._registerOptions = {}; - _this._updateFoundCount = 0; - // Deferreds we can resolve later. - _this._swDeferred = new Deferred(); - _this._activeDeferred = new Deferred(); - _this._controllingDeferred = new Deferred(); - _this._registrationTime = 0; - _this._ownSWs = new Set(); - /** - * @private - */ - _this._onUpdateFound = function () { - // `this._registration` will never be `undefined` after an update is found. - var registration = _this._registration; - var installingSW = registration.installing; - // If the script URL passed to `navigator.serviceWorker.register()` is - // different from the current controlling SW's script URL, we know any - // successful registration calls will trigger an `updatefound` event. - // But if the registered script URL is the same as the current controlling - // SW's script URL, we'll only get an `updatefound` event if the file - // changed since it was last registered. This can be a problem if the user - // opens up the same page in a different tab, and that page registers - // a SW that triggers an update. It's a problem because this page has no - // good way of knowing whether the `updatefound` event came from the SW - // script it registered or from a registration attempt made by a newer - // version of the page running in another tab. - // To minimize the possibility of a false positive, we use the logic here: - var updateLikelyTriggeredExternally = - // Since we enforce only calling `register()` once, and since we don't - // add the `updatefound` event listener until the `register()` call, if - // `_updateFoundCount` is > 0 then it means this method has already - // been called, thus this SW must be external - _this._updateFoundCount > 0 || - // If the script URL of the installing SW is different from this - // instance's script URL, we know it's definitely not from our - // registration. - !urlsMatch(installingSW.scriptURL, _this._scriptURL.toString()) || - // If all of the above are false, then we use a time-based heuristic: - // Any `updatefound` event that occurs long after our registration is - // assumed to be external. - performance.now() > _this._registrationTime + REGISTRATION_TIMEOUT_DURATION ? - // If any of the above are not true, we assume the update was - // triggered by this instance. - true : false; - if (updateLikelyTriggeredExternally) { - _this._externalSW = installingSW; - registration.removeEventListener('updatefound', _this._onUpdateFound); - } else { - // If the update was not triggered externally we know the installing - // SW is the one we registered, so we set it. - _this._sw = installingSW; - _this._ownSWs.add(installingSW); - _this._swDeferred.resolve(installingSW); - // The `installing` state isn't something we have a dedicated - // callback for, but we do log messages for it in development. - { - if (navigator.serviceWorker.controller) { - logger.log('Updated service worker found. Installing now...'); - } else { - logger.log('Service worker is installing...'); - } - } - } - // Increment the `updatefound` count, so future invocations of this - // method can be sure they were triggered externally. - ++_this._updateFoundCount; - // Add a `statechange` listener regardless of whether this update was - // triggered externally, since we have callbacks for both. - installingSW.addEventListener('statechange', _this._onStateChange); - }; - /** - * @private - * @param {Event} originalEvent - */ - _this._onStateChange = function (originalEvent) { - // `this._registration` will never be `undefined` after an update is found. - var registration = _this._registration; - var sw = originalEvent.target; - var state = sw.state; - var isExternal = sw === _this._externalSW; - var eventProps = { - sw: sw, - isExternal: isExternal, - originalEvent: originalEvent - }; - if (!isExternal && _this._isUpdate) { - eventProps.isUpdate = true; - } - _this.dispatchEvent(new WorkboxEvent(state, eventProps)); - if (state === 'installed') { - // This timeout is used to ignore cases where the service worker calls - // `skipWaiting()` in the install event, thus moving it directly in the - // activating state. (Since all service workers *must* go through the - // waiting phase, the only way to detect `skipWaiting()` called in the - // install event is to observe that the time spent in the waiting phase - // is very short.) - // NOTE: we don't need separate timeouts for the own and external SWs - // since they can't go through these phases at the same time. - _this._waitingTimeout = self.setTimeout(function () { - // Ensure the SW is still waiting (it may now be redundant). - if (state === 'installed' && registration.waiting === sw) { - _this.dispatchEvent(new WorkboxEvent('waiting', eventProps)); - { - if (isExternal) { - logger.warn('An external service worker has installed but is ' + 'waiting for this client to close before activating...'); - } else { - logger.warn('The service worker has installed but is waiting ' + 'for existing clients to close before activating...'); - } - } - } - }, WAITING_TIMEOUT_DURATION); - } else if (state === 'activating') { - clearTimeout(_this._waitingTimeout); - if (!isExternal) { - _this._activeDeferred.resolve(sw); - } - } - { - switch (state) { - case 'installed': - if (isExternal) { - logger.warn('An external service worker has installed. ' + 'You may want to suggest users reload this page.'); - } else { - logger.log('Registered service worker installed.'); - } - break; - case 'activated': - if (isExternal) { - logger.warn('An external service worker has activated.'); - } else { - logger.log('Registered service worker activated.'); - if (sw !== navigator.serviceWorker.controller) { - logger.warn('The registered service worker is active but ' + 'not yet controlling the page. Reload or run ' + '`clients.claim()` in the service worker.'); - } - } - break; - case 'redundant': - if (sw === _this._compatibleControllingSW) { - logger.log('Previously controlling service worker now redundant!'); - } else if (!isExternal) { - logger.log('Registered service worker now redundant!'); - } - break; - } - } - }; - /** - * @private - * @param {Event} originalEvent - */ - _this._onControllerChange = function (originalEvent) { - var sw = _this._sw; - var isExternal = sw !== navigator.serviceWorker.controller; - // Unconditionally dispatch the controlling event, with isExternal set - // to distinguish between controller changes due to the initial registration - // vs. an update-check or other tab's registration. - // See https://github.com/GoogleChrome/workbox/issues/2786 - _this.dispatchEvent(new WorkboxEvent('controlling', { - isExternal: isExternal, - originalEvent: originalEvent, - sw: sw, - isUpdate: _this._isUpdate - })); - if (!isExternal) { - { - logger.log('Registered service worker now controlling this page.'); - } - _this._controllingDeferred.resolve(sw); - } - }; - /** - * @private - * @param {Event} originalEvent - */ - _this._onMessage = _async(function (originalEvent) { - // Can't change type 'any' of data. - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - var data = originalEvent.data, - ports = originalEvent.ports, - source = originalEvent.source; - // Wait until there's an "own" service worker. This is used to buffer - // `message` events that may be received prior to calling `register()`. - return _await(_this.getSW(), function () { - if (_this._ownSWs.has(source)) { - _this.dispatchEvent(new WorkboxEvent('message', { - // Can't change type 'any' of data. - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - data: data, - originalEvent: originalEvent, - ports: ports, - sw: source - })); - } - }); // If the service worker that sent the message is in the list of own - // service workers for this instance, dispatch a `message` event. - // NOTE: we check for all previously owned service workers rather than - // just the current one because some messages (e.g. cache updates) use - // a timeout when sent and may be delayed long enough for a service worker - // update to be found. - }); - _this._scriptURL = scriptURL; - _this._registerOptions = registerOptions; - // Add a message listener immediately since messages received during - // page load are buffered only until the DOMContentLoaded event: - // https://github.com/GoogleChrome/workbox/issues/2202 - navigator.serviceWorker.addEventListener('message', _this._onMessage); - return _this; - } - /** - * Registers a service worker for this instances script URL and service - * worker options. By default this method delays registration until after - * the window has loaded. - * - * @param {Object} [options] - * @param {Function} [options.immediate=false] Setting this to true will - * register the service worker immediately, even if the window has - * not loaded (not recommended). - */ - _inheritsLoose(Workbox, _WorkboxEventTarget); - var _proto = Workbox.prototype; - _proto.register = function register(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - _ref$immediate = _ref.immediate, - immediate = _ref$immediate === void 0 ? false : _ref$immediate; - try { - var _this2 = this; - if ("dev" !== 'production') { - if (_this2._registrationTime) { - logger.error('Cannot re-register a Workbox instance after it has ' + 'been registered. Create a new instance instead.'); - return _await(); - } - } - return _await(_invoke(function () { - if (!immediate && document.readyState !== 'complete') { - return _awaitIgnored(new Promise(function (res) { - return window.addEventListener('load', res); - })); - } - }, function () { - // Set this flag to true if any service worker was controlling the page - // at registration time. - _this2._isUpdate = Boolean(navigator.serviceWorker.controller); - // Before registering, attempt to determine if a SW is already controlling - // the page, and if that SW script (and version, if specified) matches this - // instance's script. - _this2._compatibleControllingSW = _this2._getControllingSWIfCompatible(); - return _await(_this2._registerScript(), function (_this2$_registerScrip) { - _this2._registration = _this2$_registerScrip; - // If we have a compatible controller, store the controller as the "own" - // SW, resolve active/controlling deferreds and add necessary listeners. - if (_this2._compatibleControllingSW) { - _this2._sw = _this2._compatibleControllingSW; - _this2._activeDeferred.resolve(_this2._compatibleControllingSW); - _this2._controllingDeferred.resolve(_this2._compatibleControllingSW); - _this2._compatibleControllingSW.addEventListener('statechange', _this2._onStateChange, { - once: true - }); - } - // If there's a waiting service worker with a matching URL before the - // `updatefound` event fires, it likely means that this site is open - // in another tab, or the user refreshed the page (and thus the previous - // page wasn't fully unloaded before this page started loading). - // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting - var waitingSW = _this2._registration.waiting; - if (waitingSW && urlsMatch(waitingSW.scriptURL, _this2._scriptURL.toString())) { - // Store the waiting SW as the "own" Sw, even if it means overwriting - // a compatible controller. - _this2._sw = waitingSW; - // Run this in the next microtask, so any code that adds an event - // listener after awaiting `register()` will get this event. - dontWaitFor(Promise.resolve().then(function () { - _this2.dispatchEvent(new WorkboxEvent('waiting', { - sw: waitingSW, - wasWaitingBeforeRegister: true - })); - if ("dev" !== 'production') { - logger.warn('A service worker was already waiting to activate ' + 'before this script was registered...'); - } - })); - } - // If an "own" SW is already set, resolve the deferred. - if (_this2._sw) { - _this2._swDeferred.resolve(_this2._sw); - _this2._ownSWs.add(_this2._sw); - } - if ("dev" !== 'production') { - logger.log('Successfully registered service worker.', _this2._scriptURL.toString()); - if (navigator.serviceWorker.controller) { - if (_this2._compatibleControllingSW) { - logger.debug('A service worker with the same script URL ' + 'is already controlling this page.'); - } else { - logger.debug('A service worker with a different script URL is ' + 'currently controlling the page. The browser is now fetching ' + 'the new script now...'); - } - } - var currentPageIsOutOfScope = function currentPageIsOutOfScope() { - var scopeURL = new URL(_this2._registerOptions.scope || _this2._scriptURL.toString(), document.baseURI); - var scopeURLBasePath = new URL('./', scopeURL.href).pathname; - return !location.pathname.startsWith(scopeURLBasePath); - }; - if (currentPageIsOutOfScope()) { - logger.warn('The current page is not in scope for the registered ' + 'service worker. Was this a mistake?'); - } - } - _this2._registration.addEventListener('updatefound', _this2._onUpdateFound); - navigator.serviceWorker.addEventListener('controllerchange', _this2._onControllerChange); - return _this2._registration; - }); - })); - } catch (e) { - return Promise.reject(e); - } - } - /** - * Checks for updates of the registered service worker. - */ - ; - _proto.update = function update() { - try { - var _this3 = this; - if (!_this3._registration) { - if ("dev" !== 'production') { - logger.error('Cannot update a Workbox instance without ' + 'being registered. Register the Workbox instance first.'); - } - return _await(); - } - // Try to update registration - return _await(_awaitIgnored(_this3._registration.update())); - } catch (e) { - return Promise.reject(e); - } - } - /** - * Resolves to the service worker registered by this instance as soon as it - * is active. If a service worker was already controlling at registration - * time then it will resolve to that if the script URLs (and optionally - * script versions) match, otherwise it will wait until an update is found - * and activates. - * - * @return {Promise} - */ - ; - /** - * Resolves with a reference to a service worker that matches the script URL - * of this instance, as soon as it's available. - * - * If, at registration time, there's already an active or waiting service - * worker with a matching script URL, it will be used (with the waiting - * service worker taking precedence over the active service worker if both - * match, since the waiting service worker would have been registered more - * recently). - * If there's no matching active or waiting service worker at registration - * time then the promise will not resolve until an update is found and starts - * installing, at which point the installing service worker is used. - * - * @return {Promise} - */ - _proto.getSW = function getSW() { - // If `this._sw` is set, resolve with that as we want `getSW()` to - // return the correct (new) service worker if an update is found. - return this._sw !== undefined ? Promise.resolve(this._sw) : this._swDeferred.promise; - } - /** - * Sends the passed data object to the service worker registered by this - * instance (via {@link workbox-window.Workbox#getSW}) and resolves - * with a response (if any). - * - * A response can be set in a message handler in the service worker by - * calling `event.ports[0].postMessage(...)`, which will resolve the promise - * returned by `messageSW()`. If no response is set, the promise will never - * resolve. - * - * @param {Object} data An object to send to the service worker - * @return {Promise} - */ - // We might be able to change the 'data' type to Record in the future. - // eslint-disable-next-line @typescript-eslint/ban-types - ; - _proto.messageSW = function messageSW$1(data) { - try { - var _this4 = this; - return _await(_this4.getSW(), function (sw) { - return messageSW(sw, data); - }); - } catch (e) { - return Promise.reject(e); - } - } - /** - * Sends a `{type: 'SKIP_WAITING'}` message to the service worker that's - * currently in the `waiting` state associated with the current registration. - * - * If there is no current registration or no service worker is `waiting`, - * calling this will have no effect. - */ - ; - _proto.messageSkipWaiting = function messageSkipWaiting() { - if (this._registration && this._registration.waiting) { - void messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE); - } - } - /** - * Checks for a service worker already controlling the page and returns - * it if its script URL matches. - * - * @private - * @return {ServiceWorker|undefined} - */; - _proto._getControllingSWIfCompatible = function _getControllingSWIfCompatible() { - var controller = navigator.serviceWorker.controller; - if (controller && urlsMatch(controller.scriptURL, this._scriptURL.toString())) { - return controller; - } else { - return undefined; - } - } - /** - * Registers a service worker for this instances script URL and register - * options and tracks the time registration was complete. - * - * @private - */; - _proto._registerScript = function _registerScript() { - try { - var _this5 = this; - return _await(_catch(function () { - // this._scriptURL may be a TrustedScriptURL, but there's no support for - // passing that to register() in lib.dom right now. - // https://github.com/GoogleChrome/workbox/issues/2855 - return _await(navigator.serviceWorker.register(_this5._scriptURL, _this5._registerOptions), function (reg) { - // Keep track of when registration happened, so it can be used in the - // `this._onUpdateFound` heuristic. Also use the presence of this - // property as a way to see if `.register()` has been called. - _this5._registrationTime = performance.now(); - return reg; - }); - }, function (error) { - if ("dev" !== 'production') { - logger.error(error); - } - // Re-throw the error. - throw error; - })); - } catch (e) { - return Promise.reject(e); - } - }; - return _createClass(Workbox, [{ - key: "active", - get: function get() { - return this._activeDeferred.promise; - } - /** - * Resolves to the service worker registered by this instance as soon as it - * is controlling the page. If a service worker was already controlling at - * registration time then it will resolve to that if the script URLs (and - * optionally script versions) match, otherwise it will wait until an update - * is found and starts controlling the page. - * Note: the first time a service worker is installed it will active but - * not start controlling the page unless `clients.claim()` is called in the - * service worker. - * - * @return {Promise} - */ - }, { - key: "controlling", - get: function get() { - return this._controllingDeferred.promise; - } - }]); -}(WorkboxEventTarget); -function _invoke(body, then) { - var result = body(); - if (result && result.then) { - return result.then(then); - } - return then(result); -} // The jsdoc comments below outline the events this instance may dispatch: -// ----------------------------------------------------------------------- -/** - * The `message` event is dispatched any time a `postMessage` is received. - * - * @event workbox-window.Workbox#message - * @type {WorkboxEvent} - * @property {*} data The `data` property from the original `message` event. - * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent} - * event. - * @property {string} type `message`. - * @property {MessagePort[]} ports The `ports` value from `originalEvent`. - * @property {Workbox} target The `Workbox` instance. - */ -/** - * The `installed` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker} - * changes to `installed`. - * - * Then can happen either the very first time a service worker is installed, - * or after an update to the current service worker is found. In the case - * of an update being found, the event's `isUpdate` property will be `true`. - * - * @event workbox-window.Workbox#installed - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {string} type `installed`. - * @property {Workbox} target The `Workbox` instance. - */ -/** - * The `waiting` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw} - * changes to `installed` and then doesn't immediately change to `activating`. - * It may also be dispatched if a service worker with the same - * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL} - * was already waiting when the {@link workbox-window.Workbox#register} - * method was called. - * - * @event workbox-window.Workbox#waiting - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event|undefined} originalEvent The original - * [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event, or `undefined` in the case where the service worker was waiting - * to before `.register()` was called. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with - * a matching `scriptURL` was already waiting when this `Workbox` - * instance called `register()`. - * @property {string} type `waiting`. - * @property {Workbox} target The `Workbox` instance. - */ -/** - * The `controlling` event is dispatched if a - * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange} - * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer} - * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL} - * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller} - * matches the `scriptURL` of the `Workbox` instance's - * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}. - * - * @event workbox-window.Workbox#controlling - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this service worker was registered. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {string} type `controlling`. - * @property {Workbox} target The `Workbox` instance. - */ -/** - * The `activated` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker} - * changes to `activated`. - * - * @event workbox-window.Workbox#activated - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {string} type `activated`. - * @property {Workbox} target The `Workbox` instance. - */ -/** - * The `redundant` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw} - * changes to `redundant`. - * - * @event workbox-window.Workbox#redundant - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {string} type `redundant`. - * @property {Workbox} target The `Workbox` instance. - */ -function _catch(body, recover) { - try { - var result = body(); - } catch (e) { - return recover(e); - } - if (result && result.then) { - return result.then(void 0, recover); - } - return result; -} - -export { Workbox, WorkboxEvent, messageSW }; -//# sourceMappingURL=workbox-window.dev.es5.mjs.map diff --git a/docs/workbox-v7.4.1/workbox-window.dev.es5.mjs.map b/docs/workbox-v7.4.1/workbox-window.dev.es5.mjs.map deleted file mode 100644 index 9b08ec76..00000000 --- a/docs/workbox-v7.4.1/workbox-window.dev.es5.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-window.dev.es5.mjs","sources":["../_version.js","../messageSW.js","../../workbox-core/_version.js","../../workbox-core/_private/Deferred.js","../../workbox-core/_private/dontWaitFor.js","../../workbox-core/_private/logger.js","../utils/WorkboxEventTarget.js","../utils/urlsMatch.js","../utils/WorkboxEvent.js","../Workbox.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:window:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise}\n * @memberof workbox-window\n */\n// Better not change type of data.\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction messageSW(sw, data) {\n return new Promise((resolve) => {\n const messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (event) => {\n resolve(event.data);\n };\n sw.postMessage(data, [messageChannel.port2]);\n });\n}\nexport { messageSW };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A helper function that prevents a promise from being flagged as unused.\n *\n * @private\n **/\nexport function dontWaitFor(promise) {\n // Effective no-op.\n void promise.then(() => { });\n}\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production'\n ? null\n : (() => {\n // Don't overwrite this value if it's already set.\n // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923\n if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) {\n self.__WB_DISABLE_DEV_LOGS = false;\n }\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null, // No colored prefix on groupEnd\n };\n const print = function (method, args) {\n if (self.__WB_DISABLE_DEV_LOGS) {\n return;\n }\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n })());\nexport { logger };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nexport class WorkboxEventTarget {\n constructor() {\n this._eventListenerRegistry = new Map();\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n const foo = this._getEventListenersByType(type);\n foo.add(listener);\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n /**\n * @param {Object} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n const listeners = this._getEventListenersByType(event.type);\n for (const listener of listeners) {\n listener(event);\n }\n }\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n if (!this._eventListenerRegistry.has(type)) {\n this._eventListenerRegistry.set(type, new Set());\n }\n return this._eventListenerRegistry.get(type);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nexport function urlsMatch(url1, url2) {\n const { href } = location;\n return new URL(url1, href).href === new URL(url2, href).href;\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nexport class WorkboxEvent {\n constructor(type, props) {\n this.type = type;\n Object.assign(this, props);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { messageSW } from './messageSW.js';\nimport { WorkboxEventTarget } from './utils/WorkboxEventTarget.js';\nimport { urlsMatch } from './utils/urlsMatch.js';\nimport { WorkboxEvent } from './utils/WorkboxEvent.js';\nimport './_version.js';\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n// The de facto standard message that a service worker should be listening for\n// to trigger a call to skipWaiting().\nconst SKIP_WAITING_MESSAGE = { type: 'SKIP_WAITING' };\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires {@link workbox-window.Workbox#message}\n * @fires {@link workbox-window.Workbox#installed}\n * @fires {@link workbox-window.Workbox#waiting}\n * @fires {@link workbox-window.Workbox#controlling}\n * @fires {@link workbox-window.Workbox#activated}\n * @fires {@link workbox-window.Workbox#redundant}\n * @memberof workbox-window\n */\nclass Workbox extends WorkboxEventTarget {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n *\n * @param {string|TrustedScriptURL} scriptURL The service worker script\n * associated with this instance. Using a\n * [`TrustedScriptURL`](https://web.dev/trusted-types/) is supported.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(scriptURL, registerOptions = {}) {\n super();\n this._registerOptions = {};\n this._updateFoundCount = 0;\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n this._registrationTime = 0;\n this._ownSWs = new Set();\n /**\n * @private\n */\n this._onUpdateFound = () => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const installingSW = registration.installing;\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n const updateLikelyTriggeredExternally = \n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL.toString()) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION\n ? // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true\n : false;\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n registration.removeEventListener('updatefound', this._onUpdateFound);\n }\n else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._ownSWs.add(installingSW);\n this._swDeferred.resolve(installingSW);\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n }\n else {\n logger.log('Service worker is installing...');\n }\n }\n }\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onStateChange = (originalEvent) => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const sw = originalEvent.target;\n const { state } = sw;\n const isExternal = sw === this._externalSW;\n const eventProps = {\n sw,\n isExternal,\n originalEvent,\n };\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n this.dispatchEvent(new WorkboxEvent(state, eventProps));\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = self.setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent('waiting', eventProps));\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n }\n else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n }\n else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n }\n else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n }\n else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n }\n else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onControllerChange = (originalEvent) => {\n const sw = this._sw;\n const isExternal = sw !== navigator.serviceWorker.controller;\n // Unconditionally dispatch the controlling event, with isExternal set\n // to distinguish between controller changes due to the initial registration\n // vs. an update-check or other tab's registration.\n // See https://github.com/GoogleChrome/workbox/issues/2786\n this.dispatchEvent(new WorkboxEvent('controlling', {\n isExternal,\n originalEvent,\n sw,\n isUpdate: this._isUpdate,\n }));\n if (!isExternal) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onMessage = async (originalEvent) => {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { data, ports, source } = originalEvent;\n // Wait until there's an \"own\" service worker. This is used to buffer\n // `message` events that may be received prior to calling `register()`.\n await this.getSW();\n // If the service worker that sent the message is in the list of own\n // service workers for this instance, dispatch a `message` event.\n // NOTE: we check for all previously owned service workers rather than\n // just the current one because some messages (e.g. cache updates) use\n // a timeout when sent and may be delayed long enough for a service worker\n // update to be found.\n if (this._ownSWs.has(source)) {\n this.dispatchEvent(new WorkboxEvent('message', {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n data,\n originalEvent,\n ports,\n sw: source,\n }));\n }\n };\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n // Add a message listener immediately since messages received during\n // page load are buffered only until the DOMContentLoaded event:\n // https://github.com/GoogleChrome/workbox/issues/2202\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n }\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({ immediate = false } = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => window.addEventListener('load', res));\n }\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n this._registration = await this._registerScript();\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener('statechange', this._onStateChange, { once: true });\n }\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the previous\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW &&\n urlsMatch(waitingSW.scriptURL, this._scriptURL.toString())) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n dontWaitFor(Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n }));\n }\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n this._ownSWs.add(this._sw);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL.toString());\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n }\n else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(this._registerOptions.scope || this._scriptURL.toString(), document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener('controllerchange', this._onControllerChange);\n return this._registration;\n }\n /**\n * Checks for updates of the registered service worker.\n */\n async update() {\n if (!this._registration) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error('Cannot update a Workbox instance without ' +\n 'being registered. Register the Workbox instance first.');\n }\n return;\n }\n // Try to update registration\n await this._registration.update();\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw !== undefined\n ? Promise.resolve(this._sw)\n : this._swDeferred.promise;\n }\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via {@link workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n // We might be able to change the 'data' type to Record in the future.\n // eslint-disable-next-line @typescript-eslint/ban-types\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n /**\n * Sends a `{type: 'SKIP_WAITING'}` message to the service worker that's\n * currently in the `waiting` state associated with the current registration.\n *\n * If there is no current registration or no service worker is `waiting`,\n * calling this will have no effect.\n */\n messageSkipWaiting() {\n if (this._registration && this._registration.waiting) {\n void messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE);\n }\n }\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matches.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller &&\n urlsMatch(controller.scriptURL, this._scriptURL.toString())) {\n return controller;\n }\n else {\n return undefined;\n }\n }\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n // this._scriptURL may be a TrustedScriptURL, but there's no support for\n // passing that to register() in lib.dom right now.\n // https://github.com/GoogleChrome/workbox/issues/2855\n const reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions);\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n return reg;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n}\nexport { Workbox };\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n/**\n * The `message` event is dispatched any time a `postMessage` is received.\n *\n * @event workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {MessagePort[]} ports The `ports` value from `originalEvent`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `installed` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `waiting` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the {@link workbox-window.Workbox#register}\n * method was called.\n *\n * @event workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original\n * [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event, or `undefined` in the case where the service worker was waiting\n * to before `.register()` was called.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `activated` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `activated`.\n *\n * @event workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `redundant` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","event","postMessage","port2","Deferred","_this","promise","reject","dontWaitFor","then","logger","globalThis","__WB_DISABLE_DEV_LOGS","inGroup","methodToColorMap","debug","log","warn","error","groupCollapsed","groupEnd","print","method","args","_console2","test","navigator","userAgent","_console","console","apply","styles","logPrefix","join","concat","api","loggerMethods","Object","keys","_loop","key","_loggerMethods","_i","_len","arguments","length","Array","_key","WorkboxEventTarget","_eventListenerRegistry","Map","_proto","prototype","addEventListener","type","listener","foo","_getEventListenersByType","add","removeEventListener","delete","dispatchEvent","target","listeners","_iterator","_createForOfIteratorHelperLoose","_step","done","value","has","set","Set","get","urlsMatch","url1","url2","_location","location","href","URL","WorkboxEvent","props","assign","_await","direct","WAITING_TIMEOUT_DURATION","_async","f","i","REGISTRATION_TIMEOUT_DURATION","_empty","SKIP_WAITING_MESSAGE","_awaitIgnored","Workbox","_WorkboxEventTarget","scriptURL","registerOptions","call","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_registrationTime","_ownSWs","_onUpdateFound","registration","_registration","installingSW","installing","updateLikelyTriggeredExternally","_scriptURL","toString","performance","now","_externalSW","_sw","serviceWorker","controller","_onStateChange","originalEvent","state","isExternal","eventProps","_isUpdate","isUpdate","_waitingTimeout","setTimeout","waiting","clearTimeout","_compatibleControllingSW","_onControllerChange","_onMessage","ports","source","getSW","_inheritsLoose","register","_temp","_ref","_ref$immediate","immediate","_this2","process","_invoke","document","readyState","res","window","Boolean","_getControllingSWIfCompatible","_registerScript","_this2$_registerScrip","once","waitingSW","wasWaitingBeforeRegister","currentPageIsOutOfScope","scopeURL","scope","baseURI","scopeURLBasePath","pathname","startsWith","update","_this3","undefined","_this4","messageSkipWaiting","_this5","_catch","reg","_createClass","body","result","recover"],"mappings":"AACA;AACA,IAAI;AACAA,EAAAA,IAAI,CAAC,sBAAsB,CAAC,IAAIC,CAAC,EAAE;AACvC,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;ACLZ;AACA;;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,SAASA,CAACC,EAAE,EAAEC,IAAI,EAAE;AACzB,EAAA,OAAO,IAAIC,OAAO,CAAC,UAACC,OAAO,EAAK;AAC5B,IAAA,IAAMC,cAAc,GAAG,IAAIC,cAAc,EAAE;AAC3CD,IAAAA,cAAc,CAACE,KAAK,CAACC,SAAS,GAAG,UAACC,KAAK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A,CAAA9E,OAAA,EAAA,CAAA;IAAArD,GAAA,EAAA,QAAA;IAAAgC,GAAA,EAjHD,SAAAA,GAAAA,GAAa;AACT,MAAA,OAAO,IAAI,CAAC6B,eAAe,CAAC/F,OAAO;AACvC,IAAA;AACA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXI,GAAA,EAAA;IAAAkC,GAAA,EAAA,aAAA;IAAAgC,GAAA,EAYA,SAAAA,GAAAA,GAAkB;AACd,MAAA,OAAO,IAAI,CAAC8B,oBAAoB,CAAChG,OAAO;AAC5C,IAAA;AAAC,GAAA,CAAA,CAAA;AAAA,CAAA,CA9WiB0C,kBAAkB;AA4fjC,SAAAgG,OAAAA,CAAiB4B,IAAI,EAAEnK,IAAI,EAAE;AACnC,EAAA,IAAIoK,MAAM,GAAGD,IAAI,EAAE;AACnB,EAAA,IAAIC,MAAM,IAAIA,MAAM,CAACpK,IAAI,EAAE;AAC1B,IAAA,OAAOoK,MAAM,CAACpK,IAAI,CAACA,IAAI,CAAC;AACzB,EAAA;EACA,OAAOA,IAAI,CAACoK,MAAM,CAAC;AACpB,CAAC;AAhDD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzDO,SAAAJ,MAAAA,CAAgBG,IAAI,EAAEE,OAAO,EAAE;EACrC,IAAI;AACH,IAAA,IAAID,MAAM,GAAGD,IAAI,EAAE;EACpB,CAAC,CAAC,OAAMrL,CAAC,EAAE;IACV,OAAOuL,OAAO,CAACvL,CAAC,CAAC;AAClB,EAAA;AACA,EAAA,IAAIsL,MAAM,IAAIA,MAAM,CAACpK,IAAI,EAAE;IAC1B,OAAOoK,MAAM,CAACpK,IAAI,CAAC,MAAM,EAAEqK,OAAO,CAAC;AACpC,EAAA;AACA,EAAA,OAAOD,MAAM;AACd;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-window.dev.mjs b/docs/workbox-v7.4.1/workbox-window.dev.mjs deleted file mode 100644 index 3138f2ff..00000000 --- a/docs/workbox-v7.4.1/workbox-window.dev.mjs +++ /dev/null @@ -1,845 +0,0 @@ -// @ts-ignore -try { - self['workbox:window:7.4.0'] && _(); -} catch (e) {} - -/* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * Sends a data object to a service worker via `postMessage` and resolves with - * a response (if any). - * - * A response can be set in a message handler in the service worker by - * calling `event.ports[0].postMessage(...)`, which will resolve the promise - * returned by `messageSW()`. If no response is set, the promise will not - * resolve. - * - * @param {ServiceWorker} sw The service worker to send the message to. - * @param {Object} data An object to send to the service worker. - * @return {Promise} - * @memberof workbox-window - */ -// Better not change type of data. -// eslint-disable-next-line @typescript-eslint/ban-types -function messageSW(sw, data) { - return new Promise(resolve => { - const messageChannel = new MessageChannel(); - messageChannel.port1.onmessage = event => { - resolve(event.data); - }; - sw.postMessage(data, [messageChannel.port2]); - }); -} - -// @ts-ignore -try { - self['workbox:core:7.4.0'] && _(); -} catch (e) {} - -/* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * The Deferred class composes Promises in a way that allows for them to be - * resolved or rejected from outside the constructor. In most cases promises - * should be used directly, but Deferreds can be necessary when the logic to - * resolve a promise must be separate. - * - * @private - */ -class Deferred { - /** - * Creates a promise and exposes its resolve and reject functions as methods. - */ - constructor() { - this.promise = new Promise((resolve, reject) => { - this.resolve = resolve; - this.reject = reject; - }); - } -} - -/* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * A helper function that prevents a promise from being flagged as unused. - * - * @private - **/ -function dontWaitFor(promise) { - // Effective no-op. - void promise.then(() => {}); -} - -/* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -const logger = (() => { - // Don't overwrite this value if it's already set. - // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923 - if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) { - self.__WB_DISABLE_DEV_LOGS = false; - } - let inGroup = false; - const methodToColorMap = { - debug: `#7f8c8d`, - log: `#2ecc71`, - warn: `#f39c12`, - error: `#c0392b`, - groupCollapsed: `#3498db`, - groupEnd: null // No colored prefix on groupEnd - }; - const print = function (method, args) { - if (self.__WB_DISABLE_DEV_LOGS) { - return; - } - if (method === 'groupCollapsed') { - // Safari doesn't print all console.groupCollapsed() arguments: - // https://bugs.webkit.org/show_bug.cgi?id=182754 - if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { - console[method](...args); - return; - } - } - const styles = [`background: ${methodToColorMap[method]}`, `border-radius: 0.5em`, `color: white`, `font-weight: bold`, `padding: 2px 0.5em`]; - // When in a group, the workbox prefix is not displayed. - const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')]; - console[method](...logPrefix, ...args); - if (method === 'groupCollapsed') { - inGroup = true; - } - if (method === 'groupEnd') { - inGroup = false; - } - }; - // eslint-disable-next-line @typescript-eslint/ban-types - const api = {}; - const loggerMethods = Object.keys(methodToColorMap); - for (const key of loggerMethods) { - const method = key; - api[method] = (...args) => { - print(method, args); - }; - } - return api; -})(); - -/* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * A minimal `EventTarget` shim. - * This is necessary because not all browsers support constructable - * `EventTarget`, so using a real `EventTarget` will error. - * @private - */ -class WorkboxEventTarget { - constructor() { - this._eventListenerRegistry = new Map(); - } - /** - * @param {string} type - * @param {Function} listener - * @private - */ - addEventListener(type, listener) { - const foo = this._getEventListenersByType(type); - foo.add(listener); - } - /** - * @param {string} type - * @param {Function} listener - * @private - */ - removeEventListener(type, listener) { - this._getEventListenersByType(type).delete(listener); - } - /** - * @param {Object} event - * @private - */ - dispatchEvent(event) { - event.target = this; - const listeners = this._getEventListenersByType(event.type); - for (const listener of listeners) { - listener(event); - } - } - /** - * Returns a Set of listeners associated with the passed event type. - * If no handlers have been registered, an empty Set is returned. - * - * @param {string} type The event type. - * @return {Set} An array of handler functions. - * @private - */ - _getEventListenersByType(type) { - if (!this._eventListenerRegistry.has(type)) { - this._eventListenerRegistry.set(type, new Set()); - } - return this._eventListenerRegistry.get(type); - } -} - -/* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * Returns true if two URLs have the same `.href` property. The URLS can be - * relative, and if they are the current location href is used to resolve URLs. - * - * @private - * @param {string} url1 - * @param {string} url2 - * @return {boolean} - */ -function urlsMatch(url1, url2) { - const { - href - } = location; - return new URL(url1, href).href === new URL(url2, href).href; -} - -/* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -/** - * A minimal `Event` subclass shim. - * This doesn't *actually* subclass `Event` because not all browsers support - * constructable `EventTarget`, and using a real `Event` will error. - * @private - */ -class WorkboxEvent { - constructor(type, props) { - this.type = type; - Object.assign(this, props); - } -} - -/* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. -*/ -// The time a SW must be in the waiting phase before we can conclude -// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically -// chosen, but it seems to avoid false positives in my testing. -const WAITING_TIMEOUT_DURATION = 200; -// The amount of time after a registration that we can reasonably conclude -// that the registration didn't trigger an update. -const REGISTRATION_TIMEOUT_DURATION = 60000; -// The de facto standard message that a service worker should be listening for -// to trigger a call to skipWaiting(). -const SKIP_WAITING_MESSAGE = { - type: 'SKIP_WAITING' -}; -/** - * A class to aid in handling service worker registration, updates, and - * reacting to service worker lifecycle events. - * - * @fires {@link workbox-window.Workbox#message} - * @fires {@link workbox-window.Workbox#installed} - * @fires {@link workbox-window.Workbox#waiting} - * @fires {@link workbox-window.Workbox#controlling} - * @fires {@link workbox-window.Workbox#activated} - * @fires {@link workbox-window.Workbox#redundant} - * @memberof workbox-window - */ -class Workbox extends WorkboxEventTarget { - /** - * Creates a new Workbox instance with a script URL and service worker - * options. The script URL and options are the same as those used when - * calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register). - * - * @param {string|TrustedScriptURL} scriptURL The service worker script - * associated with this instance. Using a - * [`TrustedScriptURL`](https://web.dev/trusted-types/) is supported. - * @param {Object} [registerOptions] The service worker options associated - * with this instance. - */ - // eslint-disable-next-line @typescript-eslint/ban-types - constructor(scriptURL, registerOptions = {}) { - super(); - this._registerOptions = {}; - this._updateFoundCount = 0; - // Deferreds we can resolve later. - this._swDeferred = new Deferred(); - this._activeDeferred = new Deferred(); - this._controllingDeferred = new Deferred(); - this._registrationTime = 0; - this._ownSWs = new Set(); - /** - * @private - */ - this._onUpdateFound = () => { - // `this._registration` will never be `undefined` after an update is found. - const registration = this._registration; - const installingSW = registration.installing; - // If the script URL passed to `navigator.serviceWorker.register()` is - // different from the current controlling SW's script URL, we know any - // successful registration calls will trigger an `updatefound` event. - // But if the registered script URL is the same as the current controlling - // SW's script URL, we'll only get an `updatefound` event if the file - // changed since it was last registered. This can be a problem if the user - // opens up the same page in a different tab, and that page registers - // a SW that triggers an update. It's a problem because this page has no - // good way of knowing whether the `updatefound` event came from the SW - // script it registered or from a registration attempt made by a newer - // version of the page running in another tab. - // To minimize the possibility of a false positive, we use the logic here: - const updateLikelyTriggeredExternally = - // Since we enforce only calling `register()` once, and since we don't - // add the `updatefound` event listener until the `register()` call, if - // `_updateFoundCount` is > 0 then it means this method has already - // been called, thus this SW must be external - this._updateFoundCount > 0 || - // If the script URL of the installing SW is different from this - // instance's script URL, we know it's definitely not from our - // registration. - !urlsMatch(installingSW.scriptURL, this._scriptURL.toString()) || - // If all of the above are false, then we use a time-based heuristic: - // Any `updatefound` event that occurs long after our registration is - // assumed to be external. - performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION ? - // If any of the above are not true, we assume the update was - // triggered by this instance. - true : false; - if (updateLikelyTriggeredExternally) { - this._externalSW = installingSW; - registration.removeEventListener('updatefound', this._onUpdateFound); - } else { - // If the update was not triggered externally we know the installing - // SW is the one we registered, so we set it. - this._sw = installingSW; - this._ownSWs.add(installingSW); - this._swDeferred.resolve(installingSW); - // The `installing` state isn't something we have a dedicated - // callback for, but we do log messages for it in development. - { - if (navigator.serviceWorker.controller) { - logger.log('Updated service worker found. Installing now...'); - } else { - logger.log('Service worker is installing...'); - } - } - } - // Increment the `updatefound` count, so future invocations of this - // method can be sure they were triggered externally. - ++this._updateFoundCount; - // Add a `statechange` listener regardless of whether this update was - // triggered externally, since we have callbacks for both. - installingSW.addEventListener('statechange', this._onStateChange); - }; - /** - * @private - * @param {Event} originalEvent - */ - this._onStateChange = originalEvent => { - // `this._registration` will never be `undefined` after an update is found. - const registration = this._registration; - const sw = originalEvent.target; - const { - state - } = sw; - const isExternal = sw === this._externalSW; - const eventProps = { - sw, - isExternal, - originalEvent - }; - if (!isExternal && this._isUpdate) { - eventProps.isUpdate = true; - } - this.dispatchEvent(new WorkboxEvent(state, eventProps)); - if (state === 'installed') { - // This timeout is used to ignore cases where the service worker calls - // `skipWaiting()` in the install event, thus moving it directly in the - // activating state. (Since all service workers *must* go through the - // waiting phase, the only way to detect `skipWaiting()` called in the - // install event is to observe that the time spent in the waiting phase - // is very short.) - // NOTE: we don't need separate timeouts for the own and external SWs - // since they can't go through these phases at the same time. - this._waitingTimeout = self.setTimeout(() => { - // Ensure the SW is still waiting (it may now be redundant). - if (state === 'installed' && registration.waiting === sw) { - this.dispatchEvent(new WorkboxEvent('waiting', eventProps)); - { - if (isExternal) { - logger.warn('An external service worker has installed but is ' + 'waiting for this client to close before activating...'); - } else { - logger.warn('The service worker has installed but is waiting ' + 'for existing clients to close before activating...'); - } - } - } - }, WAITING_TIMEOUT_DURATION); - } else if (state === 'activating') { - clearTimeout(this._waitingTimeout); - if (!isExternal) { - this._activeDeferred.resolve(sw); - } - } - { - switch (state) { - case 'installed': - if (isExternal) { - logger.warn('An external service worker has installed. ' + 'You may want to suggest users reload this page.'); - } else { - logger.log('Registered service worker installed.'); - } - break; - case 'activated': - if (isExternal) { - logger.warn('An external service worker has activated.'); - } else { - logger.log('Registered service worker activated.'); - if (sw !== navigator.serviceWorker.controller) { - logger.warn('The registered service worker is active but ' + 'not yet controlling the page. Reload or run ' + '`clients.claim()` in the service worker.'); - } - } - break; - case 'redundant': - if (sw === this._compatibleControllingSW) { - logger.log('Previously controlling service worker now redundant!'); - } else if (!isExternal) { - logger.log('Registered service worker now redundant!'); - } - break; - } - } - }; - /** - * @private - * @param {Event} originalEvent - */ - this._onControllerChange = originalEvent => { - const sw = this._sw; - const isExternal = sw !== navigator.serviceWorker.controller; - // Unconditionally dispatch the controlling event, with isExternal set - // to distinguish between controller changes due to the initial registration - // vs. an update-check or other tab's registration. - // See https://github.com/GoogleChrome/workbox/issues/2786 - this.dispatchEvent(new WorkboxEvent('controlling', { - isExternal, - originalEvent, - sw, - isUpdate: this._isUpdate - })); - if (!isExternal) { - { - logger.log('Registered service worker now controlling this page.'); - } - this._controllingDeferred.resolve(sw); - } - }; - /** - * @private - * @param {Event} originalEvent - */ - this._onMessage = async originalEvent => { - // Can't change type 'any' of data. - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const { - data, - ports, - source - } = originalEvent; - // Wait until there's an "own" service worker. This is used to buffer - // `message` events that may be received prior to calling `register()`. - await this.getSW(); - // If the service worker that sent the message is in the list of own - // service workers for this instance, dispatch a `message` event. - // NOTE: we check for all previously owned service workers rather than - // just the current one because some messages (e.g. cache updates) use - // a timeout when sent and may be delayed long enough for a service worker - // update to be found. - if (this._ownSWs.has(source)) { - this.dispatchEvent(new WorkboxEvent('message', { - // Can't change type 'any' of data. - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - data, - originalEvent, - ports, - sw: source - })); - } - }; - this._scriptURL = scriptURL; - this._registerOptions = registerOptions; - // Add a message listener immediately since messages received during - // page load are buffered only until the DOMContentLoaded event: - // https://github.com/GoogleChrome/workbox/issues/2202 - navigator.serviceWorker.addEventListener('message', this._onMessage); - } - /** - * Registers a service worker for this instances script URL and service - * worker options. By default this method delays registration until after - * the window has loaded. - * - * @param {Object} [options] - * @param {Function} [options.immediate=false] Setting this to true will - * register the service worker immediately, even if the window has - * not loaded (not recommended). - */ - async register({ - immediate = false - } = {}) { - { - if (this._registrationTime) { - logger.error('Cannot re-register a Workbox instance after it has ' + 'been registered. Create a new instance instead.'); - return; - } - } - if (!immediate && document.readyState !== 'complete') { - await new Promise(res => window.addEventListener('load', res)); - } - // Set this flag to true if any service worker was controlling the page - // at registration time. - this._isUpdate = Boolean(navigator.serviceWorker.controller); - // Before registering, attempt to determine if a SW is already controlling - // the page, and if that SW script (and version, if specified) matches this - // instance's script. - this._compatibleControllingSW = this._getControllingSWIfCompatible(); - this._registration = await this._registerScript(); - // If we have a compatible controller, store the controller as the "own" - // SW, resolve active/controlling deferreds and add necessary listeners. - if (this._compatibleControllingSW) { - this._sw = this._compatibleControllingSW; - this._activeDeferred.resolve(this._compatibleControllingSW); - this._controllingDeferred.resolve(this._compatibleControllingSW); - this._compatibleControllingSW.addEventListener('statechange', this._onStateChange, { - once: true - }); - } - // If there's a waiting service worker with a matching URL before the - // `updatefound` event fires, it likely means that this site is open - // in another tab, or the user refreshed the page (and thus the previous - // page wasn't fully unloaded before this page started loading). - // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting - const waitingSW = this._registration.waiting; - if (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL.toString())) { - // Store the waiting SW as the "own" Sw, even if it means overwriting - // a compatible controller. - this._sw = waitingSW; - // Run this in the next microtask, so any code that adds an event - // listener after awaiting `register()` will get this event. - dontWaitFor(Promise.resolve().then(() => { - this.dispatchEvent(new WorkboxEvent('waiting', { - sw: waitingSW, - wasWaitingBeforeRegister: true - })); - { - logger.warn('A service worker was already waiting to activate ' + 'before this script was registered...'); - } - })); - } - // If an "own" SW is already set, resolve the deferred. - if (this._sw) { - this._swDeferred.resolve(this._sw); - this._ownSWs.add(this._sw); - } - { - logger.log('Successfully registered service worker.', this._scriptURL.toString()); - if (navigator.serviceWorker.controller) { - if (this._compatibleControllingSW) { - logger.debug('A service worker with the same script URL ' + 'is already controlling this page.'); - } else { - logger.debug('A service worker with a different script URL is ' + 'currently controlling the page. The browser is now fetching ' + 'the new script now...'); - } - } - const currentPageIsOutOfScope = () => { - const scopeURL = new URL(this._registerOptions.scope || this._scriptURL.toString(), document.baseURI); - const scopeURLBasePath = new URL('./', scopeURL.href).pathname; - return !location.pathname.startsWith(scopeURLBasePath); - }; - if (currentPageIsOutOfScope()) { - logger.warn('The current page is not in scope for the registered ' + 'service worker. Was this a mistake?'); - } - } - this._registration.addEventListener('updatefound', this._onUpdateFound); - navigator.serviceWorker.addEventListener('controllerchange', this._onControllerChange); - return this._registration; - } - /** - * Checks for updates of the registered service worker. - */ - async update() { - if (!this._registration) { - { - logger.error('Cannot update a Workbox instance without ' + 'being registered. Register the Workbox instance first.'); - } - return; - } - // Try to update registration - await this._registration.update(); - } - /** - * Resolves to the service worker registered by this instance as soon as it - * is active. If a service worker was already controlling at registration - * time then it will resolve to that if the script URLs (and optionally - * script versions) match, otherwise it will wait until an update is found - * and activates. - * - * @return {Promise} - */ - get active() { - return this._activeDeferred.promise; - } - /** - * Resolves to the service worker registered by this instance as soon as it - * is controlling the page. If a service worker was already controlling at - * registration time then it will resolve to that if the script URLs (and - * optionally script versions) match, otherwise it will wait until an update - * is found and starts controlling the page. - * Note: the first time a service worker is installed it will active but - * not start controlling the page unless `clients.claim()` is called in the - * service worker. - * - * @return {Promise} - */ - get controlling() { - return this._controllingDeferred.promise; - } - /** - * Resolves with a reference to a service worker that matches the script URL - * of this instance, as soon as it's available. - * - * If, at registration time, there's already an active or waiting service - * worker with a matching script URL, it will be used (with the waiting - * service worker taking precedence over the active service worker if both - * match, since the waiting service worker would have been registered more - * recently). - * If there's no matching active or waiting service worker at registration - * time then the promise will not resolve until an update is found and starts - * installing, at which point the installing service worker is used. - * - * @return {Promise} - */ - getSW() { - // If `this._sw` is set, resolve with that as we want `getSW()` to - // return the correct (new) service worker if an update is found. - return this._sw !== undefined ? Promise.resolve(this._sw) : this._swDeferred.promise; - } - /** - * Sends the passed data object to the service worker registered by this - * instance (via {@link workbox-window.Workbox#getSW}) and resolves - * with a response (if any). - * - * A response can be set in a message handler in the service worker by - * calling `event.ports[0].postMessage(...)`, which will resolve the promise - * returned by `messageSW()`. If no response is set, the promise will never - * resolve. - * - * @param {Object} data An object to send to the service worker - * @return {Promise} - */ - // We might be able to change the 'data' type to Record in the future. - // eslint-disable-next-line @typescript-eslint/ban-types - async messageSW(data) { - const sw = await this.getSW(); - return messageSW(sw, data); - } - /** - * Sends a `{type: 'SKIP_WAITING'}` message to the service worker that's - * currently in the `waiting` state associated with the current registration. - * - * If there is no current registration or no service worker is `waiting`, - * calling this will have no effect. - */ - messageSkipWaiting() { - if (this._registration && this._registration.waiting) { - void messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE); - } - } - /** - * Checks for a service worker already controlling the page and returns - * it if its script URL matches. - * - * @private - * @return {ServiceWorker|undefined} - */ - _getControllingSWIfCompatible() { - const controller = navigator.serviceWorker.controller; - if (controller && urlsMatch(controller.scriptURL, this._scriptURL.toString())) { - return controller; - } else { - return undefined; - } - } - /** - * Registers a service worker for this instances script URL and register - * options and tracks the time registration was complete. - * - * @private - */ - async _registerScript() { - try { - // this._scriptURL may be a TrustedScriptURL, but there's no support for - // passing that to register() in lib.dom right now. - // https://github.com/GoogleChrome/workbox/issues/2855 - const reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions); - // Keep track of when registration happened, so it can be used in the - // `this._onUpdateFound` heuristic. Also use the presence of this - // property as a way to see if `.register()` has been called. - this._registrationTime = performance.now(); - return reg; - } catch (error) { - { - logger.error(error); - } - // Re-throw the error. - throw error; - } - } -} -// The jsdoc comments below outline the events this instance may dispatch: -// ----------------------------------------------------------------------- -/** - * The `message` event is dispatched any time a `postMessage` is received. - * - * @event workbox-window.Workbox#message - * @type {WorkboxEvent} - * @property {*} data The `data` property from the original `message` event. - * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent} - * event. - * @property {string} type `message`. - * @property {MessagePort[]} ports The `ports` value from `originalEvent`. - * @property {Workbox} target The `Workbox` instance. - */ -/** - * The `installed` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker} - * changes to `installed`. - * - * Then can happen either the very first time a service worker is installed, - * or after an update to the current service worker is found. In the case - * of an update being found, the event's `isUpdate` property will be `true`. - * - * @event workbox-window.Workbox#installed - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {string} type `installed`. - * @property {Workbox} target The `Workbox` instance. - */ -/** - * The `waiting` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw} - * changes to `installed` and then doesn't immediately change to `activating`. - * It may also be dispatched if a service worker with the same - * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL} - * was already waiting when the {@link workbox-window.Workbox#register} - * method was called. - * - * @event workbox-window.Workbox#waiting - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event|undefined} originalEvent The original - * [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event, or `undefined` in the case where the service worker was waiting - * to before `.register()` was called. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with - * a matching `scriptURL` was already waiting when this `Workbox` - * instance called `register()`. - * @property {string} type `waiting`. - * @property {Workbox} target The `Workbox` instance. - */ -/** - * The `controlling` event is dispatched if a - * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange} - * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer} - * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL} - * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller} - * matches the `scriptURL` of the `Workbox` instance's - * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}. - * - * @event workbox-window.Workbox#controlling - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this service worker was registered. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {string} type `controlling`. - * @property {Workbox} target The `Workbox` instance. - */ -/** - * The `activated` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker} - * changes to `activated`. - * - * @event workbox-window.Workbox#activated - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {string} type `activated`. - * @property {Workbox} target The `Workbox` instance. - */ -/** - * The `redundant` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw} - * changes to `redundant`. - * - * @event workbox-window.Workbox#redundant - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {string} type `redundant`. - * @property {Workbox} target The `Workbox` instance. - */ - -export { Workbox, WorkboxEvent, messageSW }; -//# sourceMappingURL=workbox-window.dev.mjs.map diff --git a/docs/workbox-v7.4.1/workbox-window.dev.mjs.map b/docs/workbox-v7.4.1/workbox-window.dev.mjs.map deleted file mode 100644 index bfb072e9..00000000 --- a/docs/workbox-v7.4.1/workbox-window.dev.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-window.dev.mjs","sources":["../_version.js","../messageSW.js","../../workbox-core/_version.js","../../workbox-core/_private/Deferred.js","../../workbox-core/_private/dontWaitFor.js","../../workbox-core/_private/logger.js","../utils/WorkboxEventTarget.js","../utils/urlsMatch.js","../utils/WorkboxEvent.js","../Workbox.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:window:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise}\n * @memberof workbox-window\n */\n// Better not change type of data.\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction messageSW(sw, data) {\n return new Promise((resolve) => {\n const messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (event) => {\n resolve(event.data);\n };\n sw.postMessage(data, [messageChannel.port2]);\n });\n}\nexport { messageSW };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A helper function that prevents a promise from being flagged as unused.\n *\n * @private\n **/\nexport function dontWaitFor(promise) {\n // Effective no-op.\n void promise.then(() => { });\n}\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production'\n ? null\n : (() => {\n // Don't overwrite this value if it's already set.\n // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923\n if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) {\n self.__WB_DISABLE_DEV_LOGS = false;\n }\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null, // No colored prefix on groupEnd\n };\n const print = function (method, args) {\n if (self.__WB_DISABLE_DEV_LOGS) {\n return;\n }\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n })());\nexport { logger };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nexport class WorkboxEventTarget {\n constructor() {\n this._eventListenerRegistry = new Map();\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n const foo = this._getEventListenersByType(type);\n foo.add(listener);\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n /**\n * @param {Object} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n const listeners = this._getEventListenersByType(event.type);\n for (const listener of listeners) {\n listener(event);\n }\n }\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n if (!this._eventListenerRegistry.has(type)) {\n this._eventListenerRegistry.set(type, new Set());\n }\n return this._eventListenerRegistry.get(type);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nexport function urlsMatch(url1, url2) {\n const { href } = location;\n return new URL(url1, href).href === new URL(url2, href).href;\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nexport class WorkboxEvent {\n constructor(type, props) {\n this.type = type;\n Object.assign(this, props);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { messageSW } from './messageSW.js';\nimport { WorkboxEventTarget } from './utils/WorkboxEventTarget.js';\nimport { urlsMatch } from './utils/urlsMatch.js';\nimport { WorkboxEvent } from './utils/WorkboxEvent.js';\nimport './_version.js';\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n// The de facto standard message that a service worker should be listening for\n// to trigger a call to skipWaiting().\nconst SKIP_WAITING_MESSAGE = { type: 'SKIP_WAITING' };\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires {@link workbox-window.Workbox#message}\n * @fires {@link workbox-window.Workbox#installed}\n * @fires {@link workbox-window.Workbox#waiting}\n * @fires {@link workbox-window.Workbox#controlling}\n * @fires {@link workbox-window.Workbox#activated}\n * @fires {@link workbox-window.Workbox#redundant}\n * @memberof workbox-window\n */\nclass Workbox extends WorkboxEventTarget {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n *\n * @param {string|TrustedScriptURL} scriptURL The service worker script\n * associated with this instance. Using a\n * [`TrustedScriptURL`](https://web.dev/trusted-types/) is supported.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(scriptURL, registerOptions = {}) {\n super();\n this._registerOptions = {};\n this._updateFoundCount = 0;\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n this._registrationTime = 0;\n this._ownSWs = new Set();\n /**\n * @private\n */\n this._onUpdateFound = () => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const installingSW = registration.installing;\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n const updateLikelyTriggeredExternally = \n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL.toString()) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION\n ? // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true\n : false;\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n registration.removeEventListener('updatefound', this._onUpdateFound);\n }\n else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._ownSWs.add(installingSW);\n this._swDeferred.resolve(installingSW);\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n }\n else {\n logger.log('Service worker is installing...');\n }\n }\n }\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onStateChange = (originalEvent) => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const sw = originalEvent.target;\n const { state } = sw;\n const isExternal = sw === this._externalSW;\n const eventProps = {\n sw,\n isExternal,\n originalEvent,\n };\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n this.dispatchEvent(new WorkboxEvent(state, eventProps));\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = self.setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent('waiting', eventProps));\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n }\n else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n }\n else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n }\n else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n }\n else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n }\n else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onControllerChange = (originalEvent) => {\n const sw = this._sw;\n const isExternal = sw !== navigator.serviceWorker.controller;\n // Unconditionally dispatch the controlling event, with isExternal set\n // to distinguish between controller changes due to the initial registration\n // vs. an update-check or other tab's registration.\n // See https://github.com/GoogleChrome/workbox/issues/2786\n this.dispatchEvent(new WorkboxEvent('controlling', {\n isExternal,\n originalEvent,\n sw,\n isUpdate: this._isUpdate,\n }));\n if (!isExternal) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onMessage = async (originalEvent) => {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { data, ports, source } = originalEvent;\n // Wait until there's an \"own\" service worker. This is used to buffer\n // `message` events that may be received prior to calling `register()`.\n await this.getSW();\n // If the service worker that sent the message is in the list of own\n // service workers for this instance, dispatch a `message` event.\n // NOTE: we check for all previously owned service workers rather than\n // just the current one because some messages (e.g. cache updates) use\n // a timeout when sent and may be delayed long enough for a service worker\n // update to be found.\n if (this._ownSWs.has(source)) {\n this.dispatchEvent(new WorkboxEvent('message', {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n data,\n originalEvent,\n ports,\n sw: source,\n }));\n }\n };\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n // Add a message listener immediately since messages received during\n // page load are buffered only until the DOMContentLoaded event:\n // https://github.com/GoogleChrome/workbox/issues/2202\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n }\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({ immediate = false } = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => window.addEventListener('load', res));\n }\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n this._registration = await this._registerScript();\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener('statechange', this._onStateChange, { once: true });\n }\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the previous\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW &&\n urlsMatch(waitingSW.scriptURL, this._scriptURL.toString())) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n dontWaitFor(Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n }));\n }\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n this._ownSWs.add(this._sw);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL.toString());\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n }\n else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(this._registerOptions.scope || this._scriptURL.toString(), document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener('controllerchange', this._onControllerChange);\n return this._registration;\n }\n /**\n * Checks for updates of the registered service worker.\n */\n async update() {\n if (!this._registration) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error('Cannot update a Workbox instance without ' +\n 'being registered. Register the Workbox instance first.');\n }\n return;\n }\n // Try to update registration\n await this._registration.update();\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw !== undefined\n ? Promise.resolve(this._sw)\n : this._swDeferred.promise;\n }\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via {@link workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n // We might be able to change the 'data' type to Record in the future.\n // eslint-disable-next-line @typescript-eslint/ban-types\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n /**\n * Sends a `{type: 'SKIP_WAITING'}` message to the service worker that's\n * currently in the `waiting` state associated with the current registration.\n *\n * If there is no current registration or no service worker is `waiting`,\n * calling this will have no effect.\n */\n messageSkipWaiting() {\n if (this._registration && this._registration.waiting) {\n void messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE);\n }\n }\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matches.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller &&\n urlsMatch(controller.scriptURL, this._scriptURL.toString())) {\n return controller;\n }\n else {\n return undefined;\n }\n }\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n // this._scriptURL may be a TrustedScriptURL, but there's no support for\n // passing that to register() in lib.dom right now.\n // https://github.com/GoogleChrome/workbox/issues/2855\n const reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions);\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n return reg;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n}\nexport { Workbox };\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n/**\n * The `message` event is dispatched any time a `postMessage` is received.\n *\n * @event workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {MessagePort[]} ports The `ports` value from `originalEvent`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `installed` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `waiting` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the {@link workbox-window.Workbox#register}\n * method was called.\n *\n * @event workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original\n * [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event, or `undefined` in the case where the service worker was waiting\n * to before `.register()` was called.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `activated` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `activated`.\n *\n * @event workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `redundant` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","event","postMessage","port2","Deferred","constructor","promise","reject","dontWaitFor","then","logger","globalThis","__WB_DISABLE_DEV_LOGS","inGroup","methodToColorMap","debug","log","warn","error","groupCollapsed","groupEnd","print","method","args","test","navigator","userAgent","console","styles","logPrefix","join","api","loggerMethods","Object","keys","key","WorkboxEventTarget","_eventListenerRegistry","Map","addEventListener","type","listener","foo","_getEventListenersByType","add","removeEventListener","delete","dispatchEvent","target","listeners","has","set","Set","get","urlsMatch","url1","url2","href","location","URL","WorkboxEvent","props","assign","WAITING_TIMEOUT_DURATION","REGISTRATION_TIMEOUT_DURATION","SKIP_WAITING_MESSAGE","Workbox","scriptURL","registerOptions","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_registrationTime","_ownSWs","_onUpdateFound","registration","_registration","installingSW","installing","updateLikelyTriggeredExternally","_scriptURL","toString","performance","now","_externalSW","_sw","serviceWorker","controller","_onStateChange","originalEvent","state","isExternal","eventProps","_isUpdate","isUpdate","_waitingTimeout","setTimeout","waiting","clearTimeout","_compatibleControllingSW","_onControllerChange","_onMessage","ports","source","getSW","register","immediate","document","readyState","res","window","Boolean","_getControllingSWIfCompatible","_registerScript","once","waitingSW","wasWaitingBeforeRegister","currentPageIsOutOfScope","scopeURL","scope","baseURI","scopeURLBasePath","pathname","startsWith","update","active","controlling","undefined","messageSkipWaiting","reg"],"mappings":"AACA;AACA,IAAI;AACAA,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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-window.dev.umd.js b/docs/workbox-v7.4.1/workbox-window.dev.umd.js deleted file mode 100644 index 9a3e40a8..00000000 --- a/docs/workbox-v7.4.1/workbox-window.dev.umd.js +++ /dev/null @@ -1,1007 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.workbox = {})); -})(this, (function (exports) { 'use strict'; - - // @ts-ignore - try { - self['workbox:window:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Sends a data object to a service worker via `postMessage` and resolves with - * a response (if any). - * - * A response can be set in a message handler in the service worker by - * calling `event.ports[0].postMessage(...)`, which will resolve the promise - * returned by `messageSW()`. If no response is set, the promise will not - * resolve. - * - * @param {ServiceWorker} sw The service worker to send the message to. - * @param {Object} data An object to send to the service worker. - * @return {Promise} - * @memberof workbox-window - */ - // Better not change type of data. - // eslint-disable-next-line @typescript-eslint/ban-types - function messageSW(sw, data) { - return new Promise(function (resolve) { - var messageChannel = new MessageChannel(); - messageChannel.port1.onmessage = function (event) { - resolve(event.data); - }; - sw.postMessage(data, [messageChannel.port2]); - }); - } - - function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; - } - function _defineProperties(e, r) { - for (var t = 0; t < r.length; t++) { - var o = r[t]; - o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); - } - } - function _createClass(e, r, t) { - return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", { - writable: false - }), e; - } - function _createForOfIteratorHelperLoose(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (t) return (t = t.call(r)).next.bind(t); - if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { - t && (r = t); - var o = 0; - return function () { - return o >= r.length ? { - done: true - } : { - done: false, - value: r[o++] - }; - }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - function _inheritsLoose(t, o) { - t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); - } - function _setPrototypeOf(t, e) { - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { - return t.__proto__ = e, t; - }, _setPrototypeOf(t, e); - } - function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (String )(t); - } - function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; - } - function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; - } - } - - // @ts-ignore - try { - self['workbox:core:7.4.0'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * The Deferred class composes Promises in a way that allows for them to be - * resolved or rejected from outside the constructor. In most cases promises - * should be used directly, but Deferreds can be necessary when the logic to - * resolve a promise must be separate. - * - * @private - */ - var Deferred = - /** - * Creates a promise and exposes its resolve and reject functions as methods. - */ - function Deferred() { - var _this = this; - this.promise = new Promise(function (resolve, reject) { - _this.resolve = resolve; - _this.reject = reject; - }); - }; - - /* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A helper function that prevents a promise from being flagged as unused. - * - * @private - **/ - function dontWaitFor(promise) { - // Effective no-op. - void promise.then(function () {}); - } - - /* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - var logger = function () { - // Don't overwrite this value if it's already set. - // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923 - if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) { - self.__WB_DISABLE_DEV_LOGS = false; - } - var inGroup = false; - var methodToColorMap = { - debug: "#7f8c8d", - log: "#2ecc71", - warn: "#f39c12", - error: "#c0392b", - groupCollapsed: "#3498db", - groupEnd: null // No colored prefix on groupEnd - }; - var print = function print(method, args) { - var _console2; - if (self.__WB_DISABLE_DEV_LOGS) { - return; - } - if (method === 'groupCollapsed') { - // Safari doesn't print all console.groupCollapsed() arguments: - // https://bugs.webkit.org/show_bug.cgi?id=182754 - if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { - var _console; - (_console = console)[method].apply(_console, args); - return; - } - } - var styles = ["background: " + methodToColorMap[method], "border-radius: 0.5em", "color: white", "font-weight: bold", "padding: 2px 0.5em"]; - // When in a group, the workbox prefix is not displayed. - var logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')]; - (_console2 = console)[method].apply(_console2, logPrefix.concat(args)); - if (method === 'groupCollapsed') { - inGroup = true; - } - if (method === 'groupEnd') { - inGroup = false; - } - }; - // eslint-disable-next-line @typescript-eslint/ban-types - var api = {}; - var loggerMethods = Object.keys(methodToColorMap); - var _loop = function _loop() { - var key = _loggerMethods[_i]; - var method = key; - api[method] = function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - print(method, args); - }; - }; - for (var _i = 0, _loggerMethods = loggerMethods; _i < _loggerMethods.length; _i++) { - _loop(); - } - return api; - }(); - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A minimal `EventTarget` shim. - * This is necessary because not all browsers support constructable - * `EventTarget`, so using a real `EventTarget` will error. - * @private - */ - var WorkboxEventTarget = /*#__PURE__*/function () { - function WorkboxEventTarget() { - this._eventListenerRegistry = new Map(); - } - /** - * @param {string} type - * @param {Function} listener - * @private - */ - var _proto = WorkboxEventTarget.prototype; - _proto.addEventListener = function addEventListener(type, listener) { - var foo = this._getEventListenersByType(type); - foo.add(listener); - } - /** - * @param {string} type - * @param {Function} listener - * @private - */; - _proto.removeEventListener = function removeEventListener(type, listener) { - this._getEventListenersByType(type).delete(listener); - } - /** - * @param {Object} event - * @private - */; - _proto.dispatchEvent = function dispatchEvent(event) { - event.target = this; - var listeners = this._getEventListenersByType(event.type); - for (var _iterator = _createForOfIteratorHelperLoose(listeners), _step; !(_step = _iterator()).done;) { - var listener = _step.value; - listener(event); - } - } - /** - * Returns a Set of listeners associated with the passed event type. - * If no handlers have been registered, an empty Set is returned. - * - * @param {string} type The event type. - * @return {Set} An array of handler functions. - * @private - */; - _proto._getEventListenersByType = function _getEventListenersByType(type) { - if (!this._eventListenerRegistry.has(type)) { - this._eventListenerRegistry.set(type, new Set()); - } - return this._eventListenerRegistry.get(type); - }; - return WorkboxEventTarget; - }(); - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Returns true if two URLs have the same `.href` property. The URLS can be - * relative, and if they are the current location href is used to resolve URLs. - * - * @private - * @param {string} url1 - * @param {string} url2 - * @return {boolean} - */ - function urlsMatch(url1, url2) { - var _location = location, - href = _location.href; - return new URL(url1, href).href === new URL(url2, href).href; - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A minimal `Event` subclass shim. - * This doesn't *actually* subclass `Event` because not all browsers support - * constructable `EventTarget`, and using a real `Event` will error. - * @private - */ - var WorkboxEvent = function WorkboxEvent(type, props) { - this.type = type; - Object.assign(this, props); - }; - - // The time a SW must be in the waiting phase before we can conclude - // `skipWaiting()` wasn't called. This 200 amount wasn't scientifically - // chosen, but it seems to avoid false positives in my testing. - - function _await(value, then, direct) { - if (!value || !value.then) { - value = Promise.resolve(value); - } - return then ? value.then(then) : value; - } - var WAITING_TIMEOUT_DURATION = 200; - // The amount of time after a registration that we can reasonably conclude - // that the registration didn't trigger an update. - - function _async(f) { - return function () { - for (var args = [], i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - try { - return Promise.resolve(f.apply(this, args)); - } catch (e) { - return Promise.reject(e); - } - }; - } - var REGISTRATION_TIMEOUT_DURATION = 60000; - // The de facto standard message that a service worker should be listening for - // to trigger a call to skipWaiting(). - - function _empty() {} - var SKIP_WAITING_MESSAGE = { - type: 'SKIP_WAITING' - }; - /** - * A class to aid in handling service worker registration, updates, and - * reacting to service worker lifecycle events. - * - * @fires {@link workbox-window.Workbox#message} - * @fires {@link workbox-window.Workbox#installed} - * @fires {@link workbox-window.Workbox#waiting} - * @fires {@link workbox-window.Workbox#controlling} - * @fires {@link workbox-window.Workbox#activated} - * @fires {@link workbox-window.Workbox#redundant} - * @memberof workbox-window - */ - - function _awaitIgnored(value, direct) { - { - return value && value.then ? value.then(_empty) : Promise.resolve(); - } - } - var Workbox = /*#__PURE__*/function (_WorkboxEventTarget) { - /** - * Creates a new Workbox instance with a script URL and service worker - * options. The script URL and options are the same as those used when - * calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register). - * - * @param {string|TrustedScriptURL} scriptURL The service worker script - * associated with this instance. Using a - * [`TrustedScriptURL`](https://web.dev/trusted-types/) is supported. - * @param {Object} [registerOptions] The service worker options associated - * with this instance. - */ - // eslint-disable-next-line @typescript-eslint/ban-types - function Workbox(scriptURL, registerOptions) { - var _this; - if (registerOptions === void 0) { - registerOptions = {}; - } - _this = _WorkboxEventTarget.call(this) || this; - _this._registerOptions = {}; - _this._updateFoundCount = 0; - // Deferreds we can resolve later. - _this._swDeferred = new Deferred(); - _this._activeDeferred = new Deferred(); - _this._controllingDeferred = new Deferred(); - _this._registrationTime = 0; - _this._ownSWs = new Set(); - /** - * @private - */ - _this._onUpdateFound = function () { - // `this._registration` will never be `undefined` after an update is found. - var registration = _this._registration; - var installingSW = registration.installing; - // If the script URL passed to `navigator.serviceWorker.register()` is - // different from the current controlling SW's script URL, we know any - // successful registration calls will trigger an `updatefound` event. - // But if the registered script URL is the same as the current controlling - // SW's script URL, we'll only get an `updatefound` event if the file - // changed since it was last registered. This can be a problem if the user - // opens up the same page in a different tab, and that page registers - // a SW that triggers an update. It's a problem because this page has no - // good way of knowing whether the `updatefound` event came from the SW - // script it registered or from a registration attempt made by a newer - // version of the page running in another tab. - // To minimize the possibility of a false positive, we use the logic here: - var updateLikelyTriggeredExternally = - // Since we enforce only calling `register()` once, and since we don't - // add the `updatefound` event listener until the `register()` call, if - // `_updateFoundCount` is > 0 then it means this method has already - // been called, thus this SW must be external - _this._updateFoundCount > 0 || - // If the script URL of the installing SW is different from this - // instance's script URL, we know it's definitely not from our - // registration. - !urlsMatch(installingSW.scriptURL, _this._scriptURL.toString()) || - // If all of the above are false, then we use a time-based heuristic: - // Any `updatefound` event that occurs long after our registration is - // assumed to be external. - performance.now() > _this._registrationTime + REGISTRATION_TIMEOUT_DURATION ? - // If any of the above are not true, we assume the update was - // triggered by this instance. - true : false; - if (updateLikelyTriggeredExternally) { - _this._externalSW = installingSW; - registration.removeEventListener('updatefound', _this._onUpdateFound); - } else { - // If the update was not triggered externally we know the installing - // SW is the one we registered, so we set it. - _this._sw = installingSW; - _this._ownSWs.add(installingSW); - _this._swDeferred.resolve(installingSW); - // The `installing` state isn't something we have a dedicated - // callback for, but we do log messages for it in development. - { - if (navigator.serviceWorker.controller) { - logger.log('Updated service worker found. Installing now...'); - } else { - logger.log('Service worker is installing...'); - } - } - } - // Increment the `updatefound` count, so future invocations of this - // method can be sure they were triggered externally. - ++_this._updateFoundCount; - // Add a `statechange` listener regardless of whether this update was - // triggered externally, since we have callbacks for both. - installingSW.addEventListener('statechange', _this._onStateChange); - }; - /** - * @private - * @param {Event} originalEvent - */ - _this._onStateChange = function (originalEvent) { - // `this._registration` will never be `undefined` after an update is found. - var registration = _this._registration; - var sw = originalEvent.target; - var state = sw.state; - var isExternal = sw === _this._externalSW; - var eventProps = { - sw: sw, - isExternal: isExternal, - originalEvent: originalEvent - }; - if (!isExternal && _this._isUpdate) { - eventProps.isUpdate = true; - } - _this.dispatchEvent(new WorkboxEvent(state, eventProps)); - if (state === 'installed') { - // This timeout is used to ignore cases where the service worker calls - // `skipWaiting()` in the install event, thus moving it directly in the - // activating state. (Since all service workers *must* go through the - // waiting phase, the only way to detect `skipWaiting()` called in the - // install event is to observe that the time spent in the waiting phase - // is very short.) - // NOTE: we don't need separate timeouts for the own and external SWs - // since they can't go through these phases at the same time. - _this._waitingTimeout = self.setTimeout(function () { - // Ensure the SW is still waiting (it may now be redundant). - if (state === 'installed' && registration.waiting === sw) { - _this.dispatchEvent(new WorkboxEvent('waiting', eventProps)); - { - if (isExternal) { - logger.warn('An external service worker has installed but is ' + 'waiting for this client to close before activating...'); - } else { - logger.warn('The service worker has installed but is waiting ' + 'for existing clients to close before activating...'); - } - } - } - }, WAITING_TIMEOUT_DURATION); - } else if (state === 'activating') { - clearTimeout(_this._waitingTimeout); - if (!isExternal) { - _this._activeDeferred.resolve(sw); - } - } - { - switch (state) { - case 'installed': - if (isExternal) { - logger.warn('An external service worker has installed. ' + 'You may want to suggest users reload this page.'); - } else { - logger.log('Registered service worker installed.'); - } - break; - case 'activated': - if (isExternal) { - logger.warn('An external service worker has activated.'); - } else { - logger.log('Registered service worker activated.'); - if (sw !== navigator.serviceWorker.controller) { - logger.warn('The registered service worker is active but ' + 'not yet controlling the page. Reload or run ' + '`clients.claim()` in the service worker.'); - } - } - break; - case 'redundant': - if (sw === _this._compatibleControllingSW) { - logger.log('Previously controlling service worker now redundant!'); - } else if (!isExternal) { - logger.log('Registered service worker now redundant!'); - } - break; - } - } - }; - /** - * @private - * @param {Event} originalEvent - */ - _this._onControllerChange = function (originalEvent) { - var sw = _this._sw; - var isExternal = sw !== navigator.serviceWorker.controller; - // Unconditionally dispatch the controlling event, with isExternal set - // to distinguish between controller changes due to the initial registration - // vs. an update-check or other tab's registration. - // See https://github.com/GoogleChrome/workbox/issues/2786 - _this.dispatchEvent(new WorkboxEvent('controlling', { - isExternal: isExternal, - originalEvent: originalEvent, - sw: sw, - isUpdate: _this._isUpdate - })); - if (!isExternal) { - { - logger.log('Registered service worker now controlling this page.'); - } - _this._controllingDeferred.resolve(sw); - } - }; - /** - * @private - * @param {Event} originalEvent - */ - _this._onMessage = _async(function (originalEvent) { - // Can't change type 'any' of data. - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - var data = originalEvent.data, - ports = originalEvent.ports, - source = originalEvent.source; - // Wait until there's an "own" service worker. This is used to buffer - // `message` events that may be received prior to calling `register()`. - return _await(_this.getSW(), function () { - if (_this._ownSWs.has(source)) { - _this.dispatchEvent(new WorkboxEvent('message', { - // Can't change type 'any' of data. - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - data: data, - originalEvent: originalEvent, - ports: ports, - sw: source - })); - } - }); // If the service worker that sent the message is in the list of own - // service workers for this instance, dispatch a `message` event. - // NOTE: we check for all previously owned service workers rather than - // just the current one because some messages (e.g. cache updates) use - // a timeout when sent and may be delayed long enough for a service worker - // update to be found. - }); - _this._scriptURL = scriptURL; - _this._registerOptions = registerOptions; - // Add a message listener immediately since messages received during - // page load are buffered only until the DOMContentLoaded event: - // https://github.com/GoogleChrome/workbox/issues/2202 - navigator.serviceWorker.addEventListener('message', _this._onMessage); - return _this; - } - /** - * Registers a service worker for this instances script URL and service - * worker options. By default this method delays registration until after - * the window has loaded. - * - * @param {Object} [options] - * @param {Function} [options.immediate=false] Setting this to true will - * register the service worker immediately, even if the window has - * not loaded (not recommended). - */ - _inheritsLoose(Workbox, _WorkboxEventTarget); - var _proto = Workbox.prototype; - _proto.register = function register(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - _ref$immediate = _ref.immediate, - immediate = _ref$immediate === void 0 ? false : _ref$immediate; - try { - var _this2 = this; - if ("dev" !== 'production') { - if (_this2._registrationTime) { - logger.error('Cannot re-register a Workbox instance after it has ' + 'been registered. Create a new instance instead.'); - return _await(); - } - } - return _await(_invoke(function () { - if (!immediate && document.readyState !== 'complete') { - return _awaitIgnored(new Promise(function (res) { - return window.addEventListener('load', res); - })); - } - }, function () { - // Set this flag to true if any service worker was controlling the page - // at registration time. - _this2._isUpdate = Boolean(navigator.serviceWorker.controller); - // Before registering, attempt to determine if a SW is already controlling - // the page, and if that SW script (and version, if specified) matches this - // instance's script. - _this2._compatibleControllingSW = _this2._getControllingSWIfCompatible(); - return _await(_this2._registerScript(), function (_this2$_registerScrip) { - _this2._registration = _this2$_registerScrip; - // If we have a compatible controller, store the controller as the "own" - // SW, resolve active/controlling deferreds and add necessary listeners. - if (_this2._compatibleControllingSW) { - _this2._sw = _this2._compatibleControllingSW; - _this2._activeDeferred.resolve(_this2._compatibleControllingSW); - _this2._controllingDeferred.resolve(_this2._compatibleControllingSW); - _this2._compatibleControllingSW.addEventListener('statechange', _this2._onStateChange, { - once: true - }); - } - // If there's a waiting service worker with a matching URL before the - // `updatefound` event fires, it likely means that this site is open - // in another tab, or the user refreshed the page (and thus the previous - // page wasn't fully unloaded before this page started loading). - // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting - var waitingSW = _this2._registration.waiting; - if (waitingSW && urlsMatch(waitingSW.scriptURL, _this2._scriptURL.toString())) { - // Store the waiting SW as the "own" Sw, even if it means overwriting - // a compatible controller. - _this2._sw = waitingSW; - // Run this in the next microtask, so any code that adds an event - // listener after awaiting `register()` will get this event. - dontWaitFor(Promise.resolve().then(function () { - _this2.dispatchEvent(new WorkboxEvent('waiting', { - sw: waitingSW, - wasWaitingBeforeRegister: true - })); - if ("dev" !== 'production') { - logger.warn('A service worker was already waiting to activate ' + 'before this script was registered...'); - } - })); - } - // If an "own" SW is already set, resolve the deferred. - if (_this2._sw) { - _this2._swDeferred.resolve(_this2._sw); - _this2._ownSWs.add(_this2._sw); - } - if ("dev" !== 'production') { - logger.log('Successfully registered service worker.', _this2._scriptURL.toString()); - if (navigator.serviceWorker.controller) { - if (_this2._compatibleControllingSW) { - logger.debug('A service worker with the same script URL ' + 'is already controlling this page.'); - } else { - logger.debug('A service worker with a different script URL is ' + 'currently controlling the page. The browser is now fetching ' + 'the new script now...'); - } - } - var currentPageIsOutOfScope = function currentPageIsOutOfScope() { - var scopeURL = new URL(_this2._registerOptions.scope || _this2._scriptURL.toString(), document.baseURI); - var scopeURLBasePath = new URL('./', scopeURL.href).pathname; - return !location.pathname.startsWith(scopeURLBasePath); - }; - if (currentPageIsOutOfScope()) { - logger.warn('The current page is not in scope for the registered ' + 'service worker. Was this a mistake?'); - } - } - _this2._registration.addEventListener('updatefound', _this2._onUpdateFound); - navigator.serviceWorker.addEventListener('controllerchange', _this2._onControllerChange); - return _this2._registration; - }); - })); - } catch (e) { - return Promise.reject(e); - } - } - /** - * Checks for updates of the registered service worker. - */ - ; - _proto.update = function update() { - try { - var _this3 = this; - if (!_this3._registration) { - if ("dev" !== 'production') { - logger.error('Cannot update a Workbox instance without ' + 'being registered. Register the Workbox instance first.'); - } - return _await(); - } - // Try to update registration - return _await(_awaitIgnored(_this3._registration.update())); - } catch (e) { - return Promise.reject(e); - } - } - /** - * Resolves to the service worker registered by this instance as soon as it - * is active. If a service worker was already controlling at registration - * time then it will resolve to that if the script URLs (and optionally - * script versions) match, otherwise it will wait until an update is found - * and activates. - * - * @return {Promise} - */ - ; - /** - * Resolves with a reference to a service worker that matches the script URL - * of this instance, as soon as it's available. - * - * If, at registration time, there's already an active or waiting service - * worker with a matching script URL, it will be used (with the waiting - * service worker taking precedence over the active service worker if both - * match, since the waiting service worker would have been registered more - * recently). - * If there's no matching active or waiting service worker at registration - * time then the promise will not resolve until an update is found and starts - * installing, at which point the installing service worker is used. - * - * @return {Promise} - */ - _proto.getSW = function getSW() { - // If `this._sw` is set, resolve with that as we want `getSW()` to - // return the correct (new) service worker if an update is found. - return this._sw !== undefined ? Promise.resolve(this._sw) : this._swDeferred.promise; - } - /** - * Sends the passed data object to the service worker registered by this - * instance (via {@link workbox-window.Workbox#getSW}) and resolves - * with a response (if any). - * - * A response can be set in a message handler in the service worker by - * calling `event.ports[0].postMessage(...)`, which will resolve the promise - * returned by `messageSW()`. If no response is set, the promise will never - * resolve. - * - * @param {Object} data An object to send to the service worker - * @return {Promise} - */ - // We might be able to change the 'data' type to Record in the future. - // eslint-disable-next-line @typescript-eslint/ban-types - ; - _proto.messageSW = function messageSW$1(data) { - try { - var _this4 = this; - return _await(_this4.getSW(), function (sw) { - return messageSW(sw, data); - }); - } catch (e) { - return Promise.reject(e); - } - } - /** - * Sends a `{type: 'SKIP_WAITING'}` message to the service worker that's - * currently in the `waiting` state associated with the current registration. - * - * If there is no current registration or no service worker is `waiting`, - * calling this will have no effect. - */ - ; - _proto.messageSkipWaiting = function messageSkipWaiting() { - if (this._registration && this._registration.waiting) { - void messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE); - } - } - /** - * Checks for a service worker already controlling the page and returns - * it if its script URL matches. - * - * @private - * @return {ServiceWorker|undefined} - */; - _proto._getControllingSWIfCompatible = function _getControllingSWIfCompatible() { - var controller = navigator.serviceWorker.controller; - if (controller && urlsMatch(controller.scriptURL, this._scriptURL.toString())) { - return controller; - } else { - return undefined; - } - } - /** - * Registers a service worker for this instances script URL and register - * options and tracks the time registration was complete. - * - * @private - */; - _proto._registerScript = function _registerScript() { - try { - var _this5 = this; - return _await(_catch(function () { - // this._scriptURL may be a TrustedScriptURL, but there's no support for - // passing that to register() in lib.dom right now. - // https://github.com/GoogleChrome/workbox/issues/2855 - return _await(navigator.serviceWorker.register(_this5._scriptURL, _this5._registerOptions), function (reg) { - // Keep track of when registration happened, so it can be used in the - // `this._onUpdateFound` heuristic. Also use the presence of this - // property as a way to see if `.register()` has been called. - _this5._registrationTime = performance.now(); - return reg; - }); - }, function (error) { - if ("dev" !== 'production') { - logger.error(error); - } - // Re-throw the error. - throw error; - })); - } catch (e) { - return Promise.reject(e); - } - }; - return _createClass(Workbox, [{ - key: "active", - get: function get() { - return this._activeDeferred.promise; - } - /** - * Resolves to the service worker registered by this instance as soon as it - * is controlling the page. If a service worker was already controlling at - * registration time then it will resolve to that if the script URLs (and - * optionally script versions) match, otherwise it will wait until an update - * is found and starts controlling the page. - * Note: the first time a service worker is installed it will active but - * not start controlling the page unless `clients.claim()` is called in the - * service worker. - * - * @return {Promise} - */ - }, { - key: "controlling", - get: function get() { - return this._controllingDeferred.promise; - } - }]); - }(WorkboxEventTarget); - function _invoke(body, then) { - var result = body(); - if (result && result.then) { - return result.then(then); - } - return then(result); - } // The jsdoc comments below outline the events this instance may dispatch: - // ----------------------------------------------------------------------- - /** - * The `message` event is dispatched any time a `postMessage` is received. - * - * @event workbox-window.Workbox#message - * @type {WorkboxEvent} - * @property {*} data The `data` property from the original `message` event. - * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent} - * event. - * @property {string} type `message`. - * @property {MessagePort[]} ports The `ports` value from `originalEvent`. - * @property {Workbox} target The `Workbox` instance. - */ - /** - * The `installed` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker} - * changes to `installed`. - * - * Then can happen either the very first time a service worker is installed, - * or after an update to the current service worker is found. In the case - * of an update being found, the event's `isUpdate` property will be `true`. - * - * @event workbox-window.Workbox#installed - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {string} type `installed`. - * @property {Workbox} target The `Workbox` instance. - */ - /** - * The `waiting` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw} - * changes to `installed` and then doesn't immediately change to `activating`. - * It may also be dispatched if a service worker with the same - * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL} - * was already waiting when the {@link workbox-window.Workbox#register} - * method was called. - * - * @event workbox-window.Workbox#waiting - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event|undefined} originalEvent The original - * [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event, or `undefined` in the case where the service worker was waiting - * to before `.register()` was called. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with - * a matching `scriptURL` was already waiting when this `Workbox` - * instance called `register()`. - * @property {string} type `waiting`. - * @property {Workbox} target The `Workbox` instance. - */ - /** - * The `controlling` event is dispatched if a - * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange} - * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer} - * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL} - * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller} - * matches the `scriptURL` of the `Workbox` instance's - * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}. - * - * @event workbox-window.Workbox#controlling - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this service worker was registered. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {string} type `controlling`. - * @property {Workbox} target The `Workbox` instance. - */ - /** - * The `activated` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker} - * changes to `activated`. - * - * @event workbox-window.Workbox#activated - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {boolean|undefined} isExternal True if this event is associated - * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}. - * @property {string} type `activated`. - * @property {Workbox} target The `Workbox` instance. - */ - /** - * The `redundant` event is dispatched if the state of a - * {@link workbox-window.Workbox} instance's - * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw} - * changes to `redundant`. - * - * @event workbox-window.Workbox#redundant - * @type {WorkboxEvent} - * @property {ServiceWorker} sw The service worker instance. - * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange} - * event. - * @property {boolean|undefined} isUpdate True if a service worker was already - * controlling when this `Workbox` instance called `register()`. - * @property {string} type `redundant`. - * @property {Workbox} target The `Workbox` instance. - */ - function _catch(body, recover) { - try { - var result = body(); - } catch (e) { - return recover(e); - } - if (result && result.then) { - return result.then(void 0, recover); - } - return result; - } - - exports.Workbox = Workbox; - exports.WorkboxEvent = WorkboxEvent; - exports.messageSW = messageSW; - -})); -//# sourceMappingURL=workbox-window.dev.umd.js.map diff --git a/docs/workbox-v7.4.1/workbox-window.dev.umd.js.map b/docs/workbox-v7.4.1/workbox-window.dev.umd.js.map deleted file mode 100644 index 25553295..00000000 --- a/docs/workbox-v7.4.1/workbox-window.dev.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-window.dev.umd.js","sources":["../_version.js","../messageSW.js","../../workbox-core/_version.js","../../workbox-core/_private/Deferred.js","../../workbox-core/_private/dontWaitFor.js","../../workbox-core/_private/logger.js","../utils/WorkboxEventTarget.js","../utils/urlsMatch.js","../utils/WorkboxEvent.js","../Workbox.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:window:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise}\n * @memberof workbox-window\n */\n// Better not change type of data.\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction messageSW(sw, data) {\n return new Promise((resolve) => {\n const messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (event) => {\n resolve(event.data);\n };\n sw.postMessage(data, [messageChannel.port2]);\n });\n}\nexport { messageSW };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A helper function that prevents a promise from being flagged as unused.\n *\n * @private\n **/\nexport function dontWaitFor(promise) {\n // Effective no-op.\n void promise.then(() => { });\n}\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production'\n ? null\n : (() => {\n // Don't overwrite this value if it's already set.\n // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923\n if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) {\n self.__WB_DISABLE_DEV_LOGS = false;\n }\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null, // No colored prefix on groupEnd\n };\n const print = function (method, args) {\n if (self.__WB_DISABLE_DEV_LOGS) {\n return;\n }\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n })());\nexport { logger };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nexport class WorkboxEventTarget {\n constructor() {\n this._eventListenerRegistry = new Map();\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n const foo = this._getEventListenersByType(type);\n foo.add(listener);\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n /**\n * @param {Object} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n const listeners = this._getEventListenersByType(event.type);\n for (const listener of listeners) {\n listener(event);\n }\n }\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n if (!this._eventListenerRegistry.has(type)) {\n this._eventListenerRegistry.set(type, new Set());\n }\n return this._eventListenerRegistry.get(type);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nexport function urlsMatch(url1, url2) {\n const { href } = location;\n return new URL(url1, href).href === new URL(url2, href).href;\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nexport class WorkboxEvent {\n constructor(type, props) {\n this.type = type;\n Object.assign(this, props);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { messageSW } from './messageSW.js';\nimport { WorkboxEventTarget } from './utils/WorkboxEventTarget.js';\nimport { urlsMatch } from './utils/urlsMatch.js';\nimport { WorkboxEvent } from './utils/WorkboxEvent.js';\nimport './_version.js';\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n// The de facto standard message that a service worker should be listening for\n// to trigger a call to skipWaiting().\nconst SKIP_WAITING_MESSAGE = { type: 'SKIP_WAITING' };\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires {@link workbox-window.Workbox#message}\n * @fires {@link workbox-window.Workbox#installed}\n * @fires {@link workbox-window.Workbox#waiting}\n * @fires {@link workbox-window.Workbox#controlling}\n * @fires {@link workbox-window.Workbox#activated}\n * @fires {@link workbox-window.Workbox#redundant}\n * @memberof workbox-window\n */\nclass Workbox extends WorkboxEventTarget {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n *\n * @param {string|TrustedScriptURL} scriptURL The service worker script\n * associated with this instance. Using a\n * [`TrustedScriptURL`](https://web.dev/trusted-types/) is supported.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(scriptURL, registerOptions = {}) {\n super();\n this._registerOptions = {};\n this._updateFoundCount = 0;\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n this._registrationTime = 0;\n this._ownSWs = new Set();\n /**\n * @private\n */\n this._onUpdateFound = () => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const installingSW = registration.installing;\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n const updateLikelyTriggeredExternally = \n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL.toString()) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION\n ? // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true\n : false;\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n registration.removeEventListener('updatefound', this._onUpdateFound);\n }\n else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._ownSWs.add(installingSW);\n this._swDeferred.resolve(installingSW);\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n }\n else {\n logger.log('Service worker is installing...');\n }\n }\n }\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onStateChange = (originalEvent) => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const sw = originalEvent.target;\n const { state } = sw;\n const isExternal = sw === this._externalSW;\n const eventProps = {\n sw,\n isExternal,\n originalEvent,\n };\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n this.dispatchEvent(new WorkboxEvent(state, eventProps));\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = self.setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent('waiting', eventProps));\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n }\n else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n }\n else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n }\n else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n }\n else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n }\n else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onControllerChange = (originalEvent) => {\n const sw = this._sw;\n const isExternal = sw !== navigator.serviceWorker.controller;\n // Unconditionally dispatch the controlling event, with isExternal set\n // to distinguish between controller changes due to the initial registration\n // vs. an update-check or other tab's registration.\n // See https://github.com/GoogleChrome/workbox/issues/2786\n this.dispatchEvent(new WorkboxEvent('controlling', {\n isExternal,\n originalEvent,\n sw,\n isUpdate: this._isUpdate,\n }));\n if (!isExternal) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onMessage = async (originalEvent) => {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { data, ports, source } = originalEvent;\n // Wait until there's an \"own\" service worker. This is used to buffer\n // `message` events that may be received prior to calling `register()`.\n await this.getSW();\n // If the service worker that sent the message is in the list of own\n // service workers for this instance, dispatch a `message` event.\n // NOTE: we check for all previously owned service workers rather than\n // just the current one because some messages (e.g. cache updates) use\n // a timeout when sent and may be delayed long enough for a service worker\n // update to be found.\n if (this._ownSWs.has(source)) {\n this.dispatchEvent(new WorkboxEvent('message', {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n data,\n originalEvent,\n ports,\n sw: source,\n }));\n }\n };\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n // Add a message listener immediately since messages received during\n // page load are buffered only until the DOMContentLoaded event:\n // https://github.com/GoogleChrome/workbox/issues/2202\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n }\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({ immediate = false } = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => window.addEventListener('load', res));\n }\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n this._registration = await this._registerScript();\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener('statechange', this._onStateChange, { once: true });\n }\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the previous\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW &&\n urlsMatch(waitingSW.scriptURL, this._scriptURL.toString())) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n dontWaitFor(Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n }));\n }\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n this._ownSWs.add(this._sw);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL.toString());\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n }\n else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(this._registerOptions.scope || this._scriptURL.toString(), document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener('controllerchange', this._onControllerChange);\n return this._registration;\n }\n /**\n * Checks for updates of the registered service worker.\n */\n async update() {\n if (!this._registration) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error('Cannot update a Workbox instance without ' +\n 'being registered. Register the Workbox instance first.');\n }\n return;\n }\n // Try to update registration\n await this._registration.update();\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw !== undefined\n ? Promise.resolve(this._sw)\n : this._swDeferred.promise;\n }\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via {@link workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n // We might be able to change the 'data' type to Record in the future.\n // eslint-disable-next-line @typescript-eslint/ban-types\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n /**\n * Sends a `{type: 'SKIP_WAITING'}` message to the service worker that's\n * currently in the `waiting` state associated with the current registration.\n *\n * If there is no current registration or no service worker is `waiting`,\n * calling this will have no effect.\n */\n messageSkipWaiting() {\n if (this._registration && this._registration.waiting) {\n void messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE);\n }\n }\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matches.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller &&\n urlsMatch(controller.scriptURL, this._scriptURL.toString())) {\n return controller;\n }\n else {\n return undefined;\n }\n }\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n // this._scriptURL may be a TrustedScriptURL, but there's no support for\n // passing that to register() in lib.dom right now.\n // https://github.com/GoogleChrome/workbox/issues/2855\n const reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions);\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n return reg;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n}\nexport { Workbox };\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n/**\n * The `message` event is dispatched any time a `postMessage` is received.\n *\n * @event workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {MessagePort[]} ports The `ports` value from `originalEvent`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `installed` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `waiting` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the {@link workbox-window.Workbox#register}\n * method was called.\n *\n * @event workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original\n * [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event, or `undefined` in the case where the service worker was waiting\n * to before `.register()` was called.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `activated` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `activated`.\n *\n * @event workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `redundant` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","event","postMessage","port2","Deferred","_this","promise","reject","dontWaitFor","then","logger","globalThis","__WB_DISABLE_DEV_LOGS","inGroup","methodToColorMap","debug","log","warn","error","groupCollapsed","groupEnd","print","method","args","_console2","test","navigator","userAgent","_console","console","apply","styles","logPrefix","join","concat","api","loggerMethods","Object","keys","_loop","key","_loggerMethods","_i","_len","arguments","length","Array","_key","WorkboxEventTarget","_eventListenerRegistry","Map","_proto","prototype","addEventListener","type","listener","foo","_getEventListenersByType","add","removeEventListener","delete","dispatchEvent","target","listeners","_iterator","_createForOfIteratorHelperLoose","_step","done","value","has","set","Set","get","urlsMatch","url1","url2","_location","location","href","URL","WorkboxEvent","props","assign","_await","direct","WAITING_TIMEOUT_DURATION","_async","f","i","REGISTRATION_TIMEOUT_DURATION","_empty","SKIP_WAITING_MESSAGE","_awaitIgnored","Workbox","_WorkboxEventTarget","scriptURL","registerOptions","call","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_registrationTime","_ownSWs","_onUpdateFound","registration","_registration","installingSW","installing","updateLikelyTriggeredExternally","_scriptURL","toString","performance","now","_externalSW","_sw","serviceWorker","controller","_onStateChange","originalEvent","state","isExternal","eventProps","_isUpdate","isUpdate","_waitingTimeout","setTimeout","waiting","clearTimeout","_compatibleControllingSW","_onControllerChange","_onMessage","ports","source","getSW","_inheritsLoose","register","_temp","_ref","_ref$immediate","immediate","_this2","process","_invoke","document","readyState","res","window","Boolean","_getControllingSWIfCompatible","_registerScript","_this2$_registerScrip","once","waitingSW","wasWaitingBeforeRegister","currentPageIsOutOfScope","scopeURL","scope","baseURI","scopeURLBasePath","pathname","startsWith","update","_this3","undefined","_this4","messageSkipWaiting","_this5","_catch","reg","_createClass","body","result","recover"],"mappings":";;;;;;IACA;IACA,IAAI;IACAA,EAAAA,IAAI,CAAC,sBAAsB,CAAC,IAAIC,CAAC,EAAE;IACvC,CAAC,CACD,OAAOC,CAAC,EAAE,CAAE;;ICLZ;IACA;;IAEA;IACA;IACA;IACA;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,SAASC,SAASA,CAACC,EAAE,EAAEC,IAAI,EAAE;IACzB,EAAA,OAAO,IAAIC,OAAO,CAAC,UAACC,OAAO,EAAK;IAC5B,IAAA,IAAMC,cAAc,GAAG,IAAIC,cAAc,EAAE;IAC3CD,IAAAA,cAAc,CAACE,KAAK,CAACC,SAAS,GAAG,UA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CAAA;MAAA,OAAAoL,YAAA,CAAA9E,OAAA,EAAA,CAAA;QAAArD,GAAA,EAAA,QAAA;QAAAgC,GAAA,EAjHD,SAAAA,GAAAA,GAAa;IACT,MAAA,OAAO,IAAI,CAAC6B,eAAe,CAAC/F,OAAO;IACvC,IAAA;IACA;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAXI,GAAA,EAAA;QAAAkC,GAAA,EAAA,aAAA;QAAAgC,GAAA,EAYA,SAAAA,GAAAA,GAAkB;IACd,MAAA,OAAO,IAAI,CAAC8B,oBAAoB,CAAChG,OAAO;IAC5C,IAAA;IAAC,GAAA,CAAA,CAAA;IAAA,CAAA,CA9WiB0C,kBAAkB;IA4fjC,SAAAgG,OAAAA,CAAiB4B,IAAI,EAAEnK,IAAI,EAAE;IACnC,EAAA,IAAIoK,MAAM,GAAGD,IAAI,EAAE;IACnB,EAAA,IAAIC,MAAM,IAAIA,MAAM,CAACpK,IAAI,EAAE;IAC1B,IAAA,OAAOoK,MAAM,CAACpK,IAAI,CAACA,IAAI,CAAC;IACzB,EAAA;MACA,OAAOA,IAAI,CAACoK,MAAM,CAAC;IACpB,CAAC;IAhDD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAzDO,SAAAJ,MAAAA,CAAgBG,IAAI,EAAEE,OAAO,EAAE;MACrC,IAAI;IACH,IAAA,IAAID,MAAM,GAAGD,IAAI,EAAE;MACpB,CAAC,CAAC,OAAMrL,CAAC,EAAE;QACV,OAAOuL,OAAO,CAACvL,CAAC,CAAC;IAClB,EAAA;IACA,EAAA,IAAIsL,MAAM,IAAIA,MAAM,CAACpK,IAAI,EAAE;QAC1B,OAAOoK,MAAM,CAACpK,IAAI,CAAC,MAAM,EAAEqK,OAAO,CAAC;IACpC,EAAA;IACA,EAAA,OAAOD,MAAM;IACd;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-window.prod.es5.mjs b/docs/workbox-v7.4.1/workbox-window.prod.es5.mjs deleted file mode 100644 index 52aae8a8..00000000 --- a/docs/workbox-v7.4.1/workbox-window.prod.es5.mjs +++ /dev/null @@ -1,2 +0,0 @@ -try{self["workbox:window:7.4.0"]&&_()}catch(n){}function n(n,t){return new Promise((function(r){var e=new MessageChannel;e.port1.onmessage=function(n){r(n.data)},n.postMessage(t,[e.port2])}))}function t(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,e=Array(t);r=n.length?{done:!0}:{done:!1,value:n[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(n,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,t){return n.__proto__=t,n},i(n,t)}function o(n){var t=function(n,t){if("object"!=typeof n||!n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var e=r.call(n,t);if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n,"string");return"symbol"==typeof t?t:t+""}try{self["workbox:core:7.4.0"]&&_()}catch(n){}var u=function(){var n=this;this.promise=new Promise((function(t,r){n.resolve=t,n.reject=r}))};function a(n,t){var r=location.href;return new URL(n,r).href===new URL(t,r).href}var c=function(n,t){this.type=n,Object.assign(this,t)};function f(n,t,r){return n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n}function s(){}var v={type:"SKIP_WAITING"};function h(n,t){return n&&n.then?n.then(s):Promise.resolve()}var l=function(t){function e(n,r){var e,i;return void 0===r&&(r={}),(e=t.call(this)||this).nn={},e.tn=0,e.rn=new u,e.en=new u,e.on=new u,e.un=0,e.an=new Set,e.cn=function(){var n=e.fn,t=n.installing;e.tn>0||!a(t.scriptURL,e.sn.toString())||performance.now()>e.un+6e4?(e.vn=t,n.removeEventListener("updatefound",e.cn)):(e.hn=t,e.an.add(t),e.rn.resolve(t)),++e.tn,t.addEventListener("statechange",e.ln)},e.ln=function(n){var t=e.fn,r=n.target,i=r.state,o=r===e.vn,u={sw:r,isExternal:o,originalEvent:n};!o&&e.mn&&(u.isUpdate=!0),e.dispatchEvent(new c(i,u)),"installed"===i?e.wn=self.setTimeout((function(){"installed"===i&&t.waiting===r&&e.dispatchEvent(new c("waiting",u))}),200):"activating"===i&&(clearTimeout(e.wn),o||e.en.resolve(r))},e.yn=function(n){var t=e.hn,r=t!==navigator.serviceWorker.controller;e.dispatchEvent(new c("controlling",{isExternal:r,originalEvent:n,sw:t,isUpdate:e.mn})),r||e.on.resolve(t)},e.gn=(i=function(n){var t=n.data,r=n.ports,i=n.source;return f(e.getSW(),(function(){e.an.has(i)&&e.dispatchEvent(new c("message",{data:t,originalEvent:n,ports:r,sw:i}))}))},function(){for(var n=[],t=0;t}\n * @memberof workbox-window\n */\n// Better not change type of data.\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction messageSW(sw, data) {\n return new Promise((resolve) => {\n const messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (event) => {\n resolve(event.data);\n };\n sw.postMessage(data, [messageChannel.port2]);\n });\n}\nexport { messageSW };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nexport function urlsMatch(url1, url2) {\n const { href } = location;\n return new URL(url1, href).href === new URL(url2, href).href;\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nexport class WorkboxEvent {\n constructor(type, props) {\n this.type = type;\n Object.assign(this, props);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { messageSW } from './messageSW.js';\nimport { WorkboxEventTarget } from './utils/WorkboxEventTarget.js';\nimport { urlsMatch } from './utils/urlsMatch.js';\nimport { WorkboxEvent } from './utils/WorkboxEvent.js';\nimport './_version.js';\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n// The de facto standard message that a service worker should be listening for\n// to trigger a call to skipWaiting().\nconst SKIP_WAITING_MESSAGE = { type: 'SKIP_WAITING' };\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires {@link workbox-window.Workbox#message}\n * @fires {@link workbox-window.Workbox#installed}\n * @fires {@link workbox-window.Workbox#waiting}\n * @fires {@link workbox-window.Workbox#controlling}\n * @fires {@link workbox-window.Workbox#activated}\n * @fires {@link workbox-window.Workbox#redundant}\n * @memberof workbox-window\n */\nclass Workbox extends WorkboxEventTarget {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n *\n * @param {string|TrustedScriptURL} scriptURL The service worker script\n * associated with this instance. Using a\n * [`TrustedScriptURL`](https://web.dev/trusted-types/) is supported.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(scriptURL, registerOptions = {}) {\n super();\n this._registerOptions = {};\n this._updateFoundCount = 0;\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n this._registrationTime = 0;\n this._ownSWs = new Set();\n /**\n * @private\n */\n this._onUpdateFound = () => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const installingSW = registration.installing;\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n const updateLikelyTriggeredExternally = \n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL.toString()) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION\n ? // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true\n : false;\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n registration.removeEventListener('updatefound', this._onUpdateFound);\n }\n else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._ownSWs.add(installingSW);\n this._swDeferred.resolve(installingSW);\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n }\n else {\n logger.log('Service worker is installing...');\n }\n }\n }\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onStateChange = (originalEvent) => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const sw = originalEvent.target;\n const { state } = sw;\n const isExternal = sw === this._externalSW;\n const eventProps = {\n sw,\n isExternal,\n originalEvent,\n };\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n this.dispatchEvent(new WorkboxEvent(state, eventProps));\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = self.setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent('waiting', eventProps));\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n }\n else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n }\n else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n }\n else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n }\n else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n }\n else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onControllerChange = (originalEvent) => {\n const sw = this._sw;\n const isExternal = sw !== navigator.serviceWorker.controller;\n // Unconditionally dispatch the controlling event, with isExternal set\n // to distinguish between controller changes due to the initial registration\n // vs. an update-check or other tab's registration.\n // See https://github.com/GoogleChrome/workbox/issues/2786\n this.dispatchEvent(new WorkboxEvent('controlling', {\n isExternal,\n originalEvent,\n sw,\n isUpdate: this._isUpdate,\n }));\n if (!isExternal) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onMessage = async (originalEvent) => {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { data, ports, source } = originalEvent;\n // Wait until there's an \"own\" service worker. This is used to buffer\n // `message` events that may be received prior to calling `register()`.\n await this.getSW();\n // If the service worker that sent the message is in the list of own\n // service workers for this instance, dispatch a `message` event.\n // NOTE: we check for all previously owned service workers rather than\n // just the current one because some messages (e.g. cache updates) use\n // a timeout when sent and may be delayed long enough for a service worker\n // update to be found.\n if (this._ownSWs.has(source)) {\n this.dispatchEvent(new WorkboxEvent('message', {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n data,\n originalEvent,\n ports,\n sw: source,\n }));\n }\n };\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n // Add a message listener immediately since messages received during\n // page load are buffered only until the DOMContentLoaded event:\n // https://github.com/GoogleChrome/workbox/issues/2202\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n }\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({ immediate = false } = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => window.addEventListener('load', res));\n }\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n this._registration = await this._registerScript();\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener('statechange', this._onStateChange, { once: true });\n }\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the previous\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW &&\n urlsMatch(waitingSW.scriptURL, this._scriptURL.toString())) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n dontWaitFor(Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n }));\n }\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n this._ownSWs.add(this._sw);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL.toString());\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n }\n else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(this._registerOptions.scope || this._scriptURL.toString(), document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener('controllerchange', this._onControllerChange);\n return this._registration;\n }\n /**\n * Checks for updates of the registered service worker.\n */\n async update() {\n if (!this._registration) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error('Cannot update a Workbox instance without ' +\n 'being registered. Register the Workbox instance first.');\n }\n return;\n }\n // Try to update registration\n await this._registration.update();\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw !== undefined\n ? Promise.resolve(this._sw)\n : this._swDeferred.promise;\n }\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via {@link workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n // We might be able to change the 'data' type to Record in the future.\n // eslint-disable-next-line @typescript-eslint/ban-types\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n /**\n * Sends a `{type: 'SKIP_WAITING'}` message to the service worker that's\n * currently in the `waiting` state associated with the current registration.\n *\n * If there is no current registration or no service worker is `waiting`,\n * calling this will have no effect.\n */\n messageSkipWaiting() {\n if (this._registration && this._registration.waiting) {\n void messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE);\n }\n }\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matches.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller &&\n urlsMatch(controller.scriptURL, this._scriptURL.toString())) {\n return controller;\n }\n else {\n return undefined;\n }\n }\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n // this._scriptURL may be a TrustedScriptURL, but there's no support for\n // passing that to register() in lib.dom right now.\n // https://github.com/GoogleChrome/workbox/issues/2855\n const reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions);\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n return reg;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n}\nexport { Workbox };\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n/**\n * The `message` event is dispatched any time a `postMessage` is received.\n *\n * @event workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {MessagePort[]} ports The `ports` value from `originalEvent`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `installed` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `waiting` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the {@link workbox-window.Workbox#register}\n * method was called.\n *\n * @event workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original\n * [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event, or `undefined` in the case where the service worker was waiting\n * to before `.register()` was called.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `activated` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `activated`.\n *\n * @event workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `redundant` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A helper function that prevents a promise from being flagged as unused.\n *\n * @private\n **/\nexport function dontWaitFor(promise) {\n // Effective no-op.\n void promise.then(() => { });\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nexport class WorkboxEventTarget {\n constructor() {\n this._eventListenerRegistry = new Map();\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n const foo = this._getEventListenersByType(type);\n foo.add(listener);\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n /**\n * @param {Object} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n const listeners = this._getEventListenersByType(event.type);\n for (const listener of listeners) {\n listener(event);\n }\n }\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n if (!this._eventListenerRegistry.has(type)) {\n this._eventListenerRegistry.set(type, new Set());\n }\n return this._eventListenerRegistry.get(type);\n }\n}\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","event","postMessage","port2","Deferred","_this","this","promise","reject","urlsMatch","url1","url2","href","location","URL","WorkboxEvent","type","props","Object","assign","_await","value","then","direct","_empty","SKIP_WAITING_MESSAGE","_awaitIgnored","Workbox","_WorkboxEventTarget","scriptURL","registerOptions","f","call","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_registrationTime","_ownSWs","Set","_onUpdateFound","registration","_registration","installingSW","installing","_scriptURL","toString","performance","now","_externalSW","removeEventListener","_sw","add","addEventListener","_onStateChange","originalEvent","target","state","isExternal","eventProps","_isUpdate","isUpdate","dispatchEvent","_waitingTimeout","setTimeout","waiting","clearTimeout","_onControllerChange","navigator","serviceWorker","controller","_onMessage","ports","source","getSW","has","args","i","arguments","length","apply","_proto","prototype","register","_temp","_ref$immediate","immediate","_this2","body","result","_invoke","document","readyState","res","window","Boolean","_compatibleControllingSW","_getControllingSWIfCompatible","_registerScript","_this2$_registerScrip","once","waitingSW","wasWaitingBeforeRegister","update","undefined","messageSkipWaiting","_this5","recover","_catch","reg","error","_createClass","key","get","WorkboxEventTarget","_eventListenerRegistry","Map","listener","_getEventListenersByType","delete","_step","_iterator","_createForOfIteratorHelperLoose","done","set"],"mappings":"AAEA,IACIA,KAAK,yBAA2BC,GACpC,CACA,MAAOC,GAAK,CCmBZ,SAASC,EAAUC,EAAIC,GACnB,OAAO,IAAIC,SAAQ,SAACC,GAChB,IAAMC,EAAiB,IAAIC,eAC3BD,EAAeE,MAAMC,UAAY,SAACC,GAC9BL,EAAQK,EAAMP,KAClB,EACAD,EAAGS,YAAYR,EAAM,CAACG,EAAeM,OACzC,GACJ,26CC9BA,IACId,KAAK,uBAAyBC,GAClC,CACA,MAAOC,GAAK,CCGZ,IAQMa,EAIF,WAAc,IAAAC,EAAAC,KACVA,KAAKC,QAAU,IAAIZ,SAAQ,SAACC,EAASY,GACjCH,EAAKT,QAAUA,EACfS,EAAKG,OAASA,CAClB,GACJ,ECRG,SAASC,EAAUC,EAAMC,GAC5B,IAAQC,EAASC,SAATD,KACR,OAAO,IAAIE,IAAIJ,EAAME,GAAMA,OAAS,IAAIE,IAAIH,EAAMC,GAAMA,IAC5D,CCNA,IAAaG,EACT,SAAYC,EAAMC,GACdX,KAAKU,KAAOA,EACZE,OAAOC,OAAOb,KAAMW,EACxB,ECkEG,SAASG,EAAOC,EAAOC,EAAMC,GAOnC,OAHKF,GAAUA,EAAMC,OACpBD,EAAQ1B,QAAQC,QAAQyB,IAElBC,EAAOD,EAAMC,KAAKA,GAAQD,CAClC,CAogBO,SAASG,IAChB,CAzkBA,IAAMC,EAAuB,CAAET,KAAM,gBAuE9B,SAASU,EAAcL,EAAOE,GAEnC,OAAOF,GAASA,EAAMC,KAAOD,EAAMC,KAAKE,GAAU7B,QAAQC,SAE5D,CAAC,IA9DK+B,WAAOC,GAaT,SAAAD,EAAYE,EAAWC,GAAsB,IAAAzB,EAoB1B0B,EAsMsD,YA1NnC,IAAfD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,SAAiBtC,EAAMsG,GACPhH,KAAKiH,GAAyBvG,GACtCqC,IAAIiE,EACZ,EACApC,EAKA/B,oBAAA,SAAoBnC,EAAMsG,GACtBhH,KAAKiH,GAAyBvG,GAAMwG,OAAOF,EAC/C,EACApC,EAIAnB,cAAA,SAAc9D,GACVA,EAAMwD,OAASnD,KAEf,IADA,IACgCmH,EAAhCC,EAAAC,EADkBrH,KAAKiH,GAAyBtH,EAAMe,SACtByG,EAAAC,KAAAE,MAAE,EAC9BN,EADeG,EAAApG,OACNpB,EACb,CACJ,EACAiF,EAQAqC,GAAA,SAAyBvG,GAIrB,OAHKV,KAAK8G,GAAuBxC,IAAI5D,IACjCV,KAAK8G,GAAuBS,IAAI7G,EAAM,IAAIwB,KAEvClC,KAAK8G,GAAuBF,IAAIlG,EAC3C,EAACmG,CAAA,CA7C0B"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-window.prod.mjs b/docs/workbox-v7.4.1/workbox-window.prod.mjs deleted file mode 100644 index 95488079..00000000 --- a/docs/workbox-v7.4.1/workbox-window.prod.mjs +++ /dev/null @@ -1,2 +0,0 @@ -try{self["workbox:window:7.4.0"]&&_()}catch(t){}function t(t,s){return new Promise((i=>{const e=new MessageChannel;e.port1.onmessage=t=>{i(t.data)},t.postMessage(s,[e.port2])}))}try{self["workbox:core:7.4.0"]&&_()}catch(t){}class s{constructor(){this.promise=new Promise(((t,s)=>{this.resolve=t,this.reject=s}))}}class i{constructor(){this.Pt=new Map}addEventListener(t,s){this.Wt(t).add(s)}removeEventListener(t,s){this.Wt(t).delete(s)}dispatchEvent(t){t.target=this;const s=this.Wt(t.type);for(const i of s)i(t)}Wt(t){return this.Pt.has(t)||this.Pt.set(t,new Set),this.Pt.get(t)}}function e(t,s){const{href:i}=location;return new URL(t,i).href===new URL(s,i).href}class h{constructor(t,s){this.type=t,Object.assign(this,s)}}const n={type:"SKIP_WAITING"};class a extends i{constructor(t,i={}){super(),this._t={},this.Lt=0,this.Ct=new s,this.Tt=new s,this.Ut=new s,this.Mt=0,this.Gt=new Set,this.Kt=()=>{const t=this.Nt,s=t.installing;this.Lt>0||!e(s.scriptURL,this.Ot.toString())||performance.now()>this.Mt+6e4?(this.zt=s,t.removeEventListener("updatefound",this.Kt)):(this.Ft=s,this.Gt.add(s),this.Ct.resolve(s)),++this.Lt,s.addEventListener("statechange",this.Ht)},this.Ht=t=>{const s=this.Nt,i=t.target,{state:e}=i,n=i===this.zt,a={sw:i,isExternal:n,originalEvent:t};!n&&this.Jt&&(a.isUpdate=!0),this.dispatchEvent(new h(e,a)),"installed"===e?this.Qt=self.setTimeout((()=>{"installed"===e&&s.waiting===i&&this.dispatchEvent(new h("waiting",a))}),200):"activating"===e&&(clearTimeout(this.Qt),n||this.Tt.resolve(i))},this.Vt=t=>{const s=this.Ft,i=s!==navigator.serviceWorker.controller;this.dispatchEvent(new h("controlling",{isExternal:i,originalEvent:t,sw:s,isUpdate:this.Jt})),i||this.Ut.resolve(s)},this.Xt=async t=>{const{data:s,ports:i,source:e}=t;await this.getSW(),this.Gt.has(e)&&this.dispatchEvent(new h("message",{data:s,originalEvent:t,ports:i,sw:e}))},this.Ot=t,this._t=i,navigator.serviceWorker.addEventListener("message",this.Xt)}async register({immediate:t=!1}={}){t||"complete"===document.readyState||await new Promise((t=>window.addEventListener("load",t))),this.Jt=Boolean(navigator.serviceWorker.controller),this.Yt=this.Zt(),this.Nt=await this.$t(),this.Yt&&(this.Ft=this.Yt,this.Tt.resolve(this.Yt),this.Ut.resolve(this.Yt),this.Yt.addEventListener("statechange",this.Ht,{once:!0}));const s=this.Nt.waiting;return s&&e(s.scriptURL,this.Ot.toString())&&(this.Ft=s,Promise.resolve().then((()=>{this.dispatchEvent(new h("waiting",{sw:s,wasWaitingBeforeRegister:!0}))})).then((()=>{}))),this.Ft&&(this.Ct.resolve(this.Ft),this.Gt.add(this.Ft)),this.Nt.addEventListener("updatefound",this.Kt),navigator.serviceWorker.addEventListener("controllerchange",this.Vt),this.Nt}async update(){this.Nt&&await this.Nt.update()}get active(){return this.Tt.promise}get controlling(){return this.Ut.promise}getSW(){return void 0!==this.Ft?Promise.resolve(this.Ft):this.Ct.promise}async messageSW(s){return t(await this.getSW(),s)}messageSkipWaiting(){this.Nt&&this.Nt.waiting&&t(this.Nt.waiting,n)}Zt(){const t=navigator.serviceWorker.controller;return t&&e(t.scriptURL,this.Ot.toString())?t:void 0}async $t(){try{const t=await navigator.serviceWorker.register(this.Ot,this._t);return this.Mt=performance.now(),t}catch(t){throw t}}}export{a as Workbox,h as WorkboxEvent,t as messageSW}; -//# sourceMappingURL=workbox-window.prod.mjs.map diff --git a/docs/workbox-v7.4.1/workbox-window.prod.mjs.map b/docs/workbox-v7.4.1/workbox-window.prod.mjs.map deleted file mode 100644 index 17edd845..00000000 --- a/docs/workbox-v7.4.1/workbox-window.prod.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-window.prod.mjs","sources":["../_version.js","../messageSW.js","../../workbox-core/_version.js","../../workbox-core/_private/Deferred.js","../utils/WorkboxEventTarget.js","../utils/urlsMatch.js","../utils/WorkboxEvent.js","../Workbox.js","../../workbox-core/_private/dontWaitFor.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:window:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise}\n * @memberof workbox-window\n */\n// Better not change type of data.\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction messageSW(sw, data) {\n return new Promise((resolve) => {\n const messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (event) => {\n resolve(event.data);\n };\n sw.postMessage(data, [messageChannel.port2]);\n });\n}\nexport { messageSW };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nexport class WorkboxEventTarget {\n constructor() {\n this._eventListenerRegistry = new Map();\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n const foo = this._getEventListenersByType(type);\n foo.add(listener);\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n /**\n * @param {Object} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n const listeners = this._getEventListenersByType(event.type);\n for (const listener of listeners) {\n listener(event);\n }\n }\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n if (!this._eventListenerRegistry.has(type)) {\n this._eventListenerRegistry.set(type, new Set());\n }\n return this._eventListenerRegistry.get(type);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nexport function urlsMatch(url1, url2) {\n const { href } = location;\n return new URL(url1, href).href === new URL(url2, href).href;\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nexport class WorkboxEvent {\n constructor(type, props) {\n this.type = type;\n Object.assign(this, props);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { messageSW } from './messageSW.js';\nimport { WorkboxEventTarget } from './utils/WorkboxEventTarget.js';\nimport { urlsMatch } from './utils/urlsMatch.js';\nimport { WorkboxEvent } from './utils/WorkboxEvent.js';\nimport './_version.js';\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n// The de facto standard message that a service worker should be listening for\n// to trigger a call to skipWaiting().\nconst SKIP_WAITING_MESSAGE = { type: 'SKIP_WAITING' };\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires {@link workbox-window.Workbox#message}\n * @fires {@link workbox-window.Workbox#installed}\n * @fires {@link workbox-window.Workbox#waiting}\n * @fires {@link workbox-window.Workbox#controlling}\n * @fires {@link workbox-window.Workbox#activated}\n * @fires {@link workbox-window.Workbox#redundant}\n * @memberof workbox-window\n */\nclass Workbox extends WorkboxEventTarget {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n *\n * @param {string|TrustedScriptURL} scriptURL The service worker script\n * associated with this instance. Using a\n * [`TrustedScriptURL`](https://web.dev/trusted-types/) is supported.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(scriptURL, registerOptions = {}) {\n super();\n this._registerOptions = {};\n this._updateFoundCount = 0;\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n this._registrationTime = 0;\n this._ownSWs = new Set();\n /**\n * @private\n */\n this._onUpdateFound = () => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const installingSW = registration.installing;\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n const updateLikelyTriggeredExternally = \n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL.toString()) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION\n ? // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true\n : false;\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n registration.removeEventListener('updatefound', this._onUpdateFound);\n }\n else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._ownSWs.add(installingSW);\n this._swDeferred.resolve(installingSW);\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n }\n else {\n logger.log('Service worker is installing...');\n }\n }\n }\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onStateChange = (originalEvent) => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const sw = originalEvent.target;\n const { state } = sw;\n const isExternal = sw === this._externalSW;\n const eventProps = {\n sw,\n isExternal,\n originalEvent,\n };\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n this.dispatchEvent(new WorkboxEvent(state, eventProps));\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = self.setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent('waiting', eventProps));\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n }\n else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n }\n else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n }\n else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n }\n else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n }\n else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onControllerChange = (originalEvent) => {\n const sw = this._sw;\n const isExternal = sw !== navigator.serviceWorker.controller;\n // Unconditionally dispatch the controlling event, with isExternal set\n // to distinguish between controller changes due to the initial registration\n // vs. an update-check or other tab's registration.\n // See https://github.com/GoogleChrome/workbox/issues/2786\n this.dispatchEvent(new WorkboxEvent('controlling', {\n isExternal,\n originalEvent,\n sw,\n isUpdate: this._isUpdate,\n }));\n if (!isExternal) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onMessage = async (originalEvent) => {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { data, ports, source } = originalEvent;\n // Wait until there's an \"own\" service worker. This is used to buffer\n // `message` events that may be received prior to calling `register()`.\n await this.getSW();\n // If the service worker that sent the message is in the list of own\n // service workers for this instance, dispatch a `message` event.\n // NOTE: we check for all previously owned service workers rather than\n // just the current one because some messages (e.g. cache updates) use\n // a timeout when sent and may be delayed long enough for a service worker\n // update to be found.\n if (this._ownSWs.has(source)) {\n this.dispatchEvent(new WorkboxEvent('message', {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n data,\n originalEvent,\n ports,\n sw: source,\n }));\n }\n };\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n // Add a message listener immediately since messages received during\n // page load are buffered only until the DOMContentLoaded event:\n // https://github.com/GoogleChrome/workbox/issues/2202\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n }\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({ immediate = false } = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => window.addEventListener('load', res));\n }\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n this._registration = await this._registerScript();\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener('statechange', this._onStateChange, { once: true });\n }\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the previous\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW &&\n urlsMatch(waitingSW.scriptURL, this._scriptURL.toString())) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n dontWaitFor(Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n }));\n }\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n this._ownSWs.add(this._sw);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL.toString());\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n }\n else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(this._registerOptions.scope || this._scriptURL.toString(), document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener('controllerchange', this._onControllerChange);\n return this._registration;\n }\n /**\n * Checks for updates of the registered service worker.\n */\n async update() {\n if (!this._registration) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error('Cannot update a Workbox instance without ' +\n 'being registered. Register the Workbox instance first.');\n }\n return;\n }\n // Try to update registration\n await this._registration.update();\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw !== undefined\n ? Promise.resolve(this._sw)\n : this._swDeferred.promise;\n }\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via {@link workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n // We might be able to change the 'data' type to Record in the future.\n // eslint-disable-next-line @typescript-eslint/ban-types\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n /**\n * Sends a `{type: 'SKIP_WAITING'}` message to the service worker that's\n * currently in the `waiting` state associated with the current registration.\n *\n * If there is no current registration or no service worker is `waiting`,\n * calling this will have no effect.\n */\n messageSkipWaiting() {\n if (this._registration && this._registration.waiting) {\n void messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE);\n }\n }\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matches.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller &&\n urlsMatch(controller.scriptURL, this._scriptURL.toString())) {\n return controller;\n }\n else {\n return undefined;\n }\n }\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n // this._scriptURL may be a TrustedScriptURL, but there's no support for\n // passing that to register() in lib.dom right now.\n // https://github.com/GoogleChrome/workbox/issues/2855\n const reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions);\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n return reg;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n}\nexport { Workbox };\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n/**\n * The `message` event is dispatched any time a `postMessage` is received.\n *\n * @event workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {MessagePort[]} ports The `ports` value from `originalEvent`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `installed` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `waiting` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the {@link workbox-window.Workbox#register}\n * method was called.\n *\n * @event workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original\n * [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event, or `undefined` in the case where the service worker was waiting\n * to before `.register()` was called.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `activated` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `activated`.\n *\n * @event workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `redundant` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A helper function that prevents a promise from being flagged as unused.\n *\n * @private\n **/\nexport function dontWaitFor(promise) {\n // Effective no-op.\n void promise.then(() => { });\n}\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","event","postMessage","port2","Deferred","constructor","this","promise","reject","WorkboxEventTarget","_eventListenerRegistry","Map","addEventListener","type","listener","_getEventListenersByType","add","removeEventListener","delete","dispatchEvent","target","listeners","has","set","Set","get","urlsMatch","url1","url2","href","location","URL","WorkboxEvent","props","Object","assign","SKIP_WAITING_MESSAGE","Workbox","scriptURL","registerOptions","super","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_registrationTime","_ownSWs","_onUpdateFound","registration","_registration","installingSW","installing","_scriptURL","toString","performance","now","_externalSW","_sw","_onStateChange","originalEvent","state","isExternal","eventProps","_isUpdate","isUpdate","_waitingTimeout","setTimeout","waiting","clearTimeout","_onControllerChange","navigator","serviceWorker","controller","_onMessage","async","ports","source","getSW","immediate","document","readyState","res","window","Boolean","_compatibleControllingSW","_getControllingSWIfCompatible","_registerScript","once","waitingSW","then","wasWaitingBeforeRegister","update","active","controlling","undefined","messageSkipWaiting","reg","register","error"],"mappings":"AAEA,IACIA,KAAK,yBAA2BC,GACpC,CACA,MAAOC,GAAK,CCmBZ,SAASC,EAAUC,EAAIC,GACnB,OAAO,IAAIC,SAASC,IAChB,MAAMC,EAAiB,IAAIC,eAC3BD,EAAeE,MAAMC,UAAaC,IAC9BL,EAAQK,EAAMP,KAAK,EAEvBD,EAAGS,YAAYR,EAAM,CAACG,EAAeM,OAAO,GAEpD,CC9BA,IACId,KAAK,uBAAyBC,GAClC,CACA,MAAOC,GAAK,CCWZ,MAAMa,EAIFC,cACIC,KAAKC,QAAU,IAAIZ,SAAQ,CAACC,EAASY,KACjCF,KAAKV,QAAUA,EACfU,KAAKE,OAASA,CAAM,GAE5B,ECZG,MAAMC,EACTJ,cACIC,KAAKI,GAAyB,IAAIC,GACtC,CAMAC,iBAAiBC,EAAMC,GACPR,KAAKS,GAAyBF,GACtCG,IAAIF,EACZ,CAMAG,oBAAoBJ,EAAMC,GACtBR,KAAKS,GAAyBF,GAAMK,OAAOJ,EAC/C,CAKAK,cAAclB,GACVA,EAAMmB,OAASd,KACf,MAAMe,EAAYf,KAAKS,GAAyBd,EAAMY,MACtD,IAAK,MAAMC,KAAYO,EACnBP,EAASb,EAEjB,CASAc,GAAyBF,GAIrB,OAHKP,KAAKI,GAAuBY,IAAIT,IACjCP,KAAKI,GAAuBa,IAAIV,EAAM,IAAIW,KAEvClB,KAAKI,GAAuBe,IAAIZ,EAC3C,ECzCG,SAASa,EAAUC,EAAMC,GAC5B,MAAMC,KAAEA,GAASC,SACjB,OAAO,IAAIC,IAAIJ,EAAME,GAAMA,OAAS,IAAIE,IAAIH,EAAMC,GAAMA,IAC5D,CCNO,MAAMG,EACT3B,YAAYQ,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AAa,UAAW,CAC3CvC,GAAIgG,EACJE,0BAA0B,IAC3B,ICtTFD,MAAK,UD8TVpF,KAAKoD,KACLpD,KAAKqC,GAAY/C,QAAQU,KAAKoD,IAC9BpD,KAAKyC,GAAQ/B,IAAIV,KAAKoD,KAyB1BpD,KAAK4C,GAActC,iBAAiB,cAAeN,KAAK0C,IACxDuB,UAAUC,cAAc5D,iBAAiB,mBAAoBN,KAAKgE,IAC3DhE,KAAK4C,EAChB,CAIAyB,eACSrE,KAAK4C,UAQJ5C,KAAK4C,GAAc0C,QAC7B,CAUIC,aACA,OAAOvF,KAAKsC,GAAgBrC,OAChC,CAaIuF,kBACA,OAAOxF,KAAKuC,GAAqBtC,OACrC,CAgBAuE,QAGI,YAAoBiB,IAAbzF,KAAKoD,GACN/D,QAAQC,QAAQU,KAAKoD,IACrBpD,KAAKqC,GAAYpC,OAC3B,CAgBAoE,gBAAgBjF,GAEZ,OAAOF,QADUc,KAAKwE,QACDpF,EACzB,CAQAsG,qBACQ1F,KAAK4C,IAAiB5C,KAAK4C,GAAckB,SACpC5E,EAAUc,KAAK4C,GAAckB,QAAShC,EAEnD,CAQAkD,KACI,MAAMb,EAAaF,UAAUC,cAAcC,WAC3C,OAAIA,GACA/C,EAAU+C,EAAWnC,UAAWhC,KAAK+C,GAAWC,YACzCmB,OAGP,CAER,CAOAE,WACI,IAII,MAAMsB,QAAY1B,UAAUC,cAAc0B,SAAS5F,KAAK+C,GAAY/C,KAAKmC,IAKzE,OADAnC,KAAKwC,GAAoBS,YAAYC,MAC9ByC,CACX,CACA,MAAOE,GAKH,MAAMA,CACV,CACJ"} \ No newline at end of file diff --git a/docs/workbox-v7.4.1/workbox-window.prod.umd.js b/docs/workbox-v7.4.1/workbox-window.prod.umd.js deleted file mode 100644 index 9a83aba3..00000000 --- a/docs/workbox-v7.4.1/workbox-window.prod.umd.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n="undefined"!=typeof globalThis?globalThis:n||self).workbox={})}(this,(function(n){"use strict";try{self["workbox:window:7.4.0"]&&_()}catch(n){}function t(n,t){return new Promise((function(r){var e=new MessageChannel;e.port1.onmessage=function(n){r(n.data)},n.postMessage(t,[e.port2])}))}function r(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,e=Array(t);r=n.length?{done:!0}:{done:!1,value:n[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(n,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,t){return n.__proto__=t,n},o(n,t)}function u(n){var t=function(n,t){if("object"!=typeof n||!n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var e=r.call(n,t);if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n,"string");return"symbol"==typeof t?t:t+""}try{self["workbox:core:7.4.0"]&&_()}catch(n){}var a=function(){var n=this;this.promise=new Promise((function(t,r){n.resolve=t,n.reject=r}))};function c(n,t){var r=location.href;return new URL(n,r).href===new URL(t,r).href}var f=function(n,t){this.type=n,Object.assign(this,t)};function s(n,t,r){return n&&n.then||(n=Promise.resolve(n)),t?n.then(t):n}function v(){}var h={type:"SKIP_WAITING"};function l(n,t){return n&&n.then?n.then(v):Promise.resolve()}var d=function(n){function r(t,r){var e,i;return void 0===r&&(r={}),(e=n.call(this)||this).nn={},e.tn=0,e.rn=new a,e.en=new a,e.on=new a,e.un=0,e.an=new Set,e.cn=function(){var n=e.fn,t=n.installing;e.tn>0||!c(t.scriptURL,e.sn.toString())||performance.now()>e.un+6e4?(e.vn=t,n.removeEventListener("updatefound",e.cn)):(e.hn=t,e.an.add(t),e.rn.resolve(t)),++e.tn,t.addEventListener("statechange",e.ln)},e.ln=function(n){var t=e.fn,r=n.target,i=r.state,o=r===e.vn,u={sw:r,isExternal:o,originalEvent:n};!o&&e.dn&&(u.isUpdate=!0),e.dispatchEvent(new f(i,u)),"installed"===i?e.mn=self.setTimeout((function(){"installed"===i&&t.waiting===r&&e.dispatchEvent(new f("waiting",u))}),200):"activating"===i&&(clearTimeout(e.mn),o||e.en.resolve(r))},e.yn=function(n){var t=e.hn,r=t!==navigator.serviceWorker.controller;e.dispatchEvent(new f("controlling",{isExternal:r,originalEvent:n,sw:t,isUpdate:e.dn})),r||e.on.resolve(t)},e.wn=(i=function(n){var t=n.data,r=n.ports,i=n.source;return s(e.getSW(),(function(){e.an.has(i)&&e.dispatchEvent(new f("message",{data:t,originalEvent:n,ports:r,sw:i}))}))},function(){for(var n=[],t=0;t}\n * @memberof workbox-window\n */\n// Better not change type of data.\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction messageSW(sw, data) {\n return new Promise((resolve) => {\n const messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (event) => {\n resolve(event.data);\n };\n sw.postMessage(data, [messageChannel.port2]);\n });\n}\nexport { messageSW };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:7.4.0'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nexport function urlsMatch(url1, url2) {\n const { href } = location;\n return new URL(url1, href).href === new URL(url2, href).href;\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nexport class WorkboxEvent {\n constructor(type, props) {\n this.type = type;\n Object.assign(this, props);\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { dontWaitFor } from 'workbox-core/_private/dontWaitFor.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { messageSW } from './messageSW.js';\nimport { WorkboxEventTarget } from './utils/WorkboxEventTarget.js';\nimport { urlsMatch } from './utils/urlsMatch.js';\nimport { WorkboxEvent } from './utils/WorkboxEvent.js';\nimport './_version.js';\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n// The de facto standard message that a service worker should be listening for\n// to trigger a call to skipWaiting().\nconst SKIP_WAITING_MESSAGE = { type: 'SKIP_WAITING' };\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires {@link workbox-window.Workbox#message}\n * @fires {@link workbox-window.Workbox#installed}\n * @fires {@link workbox-window.Workbox#waiting}\n * @fires {@link workbox-window.Workbox#controlling}\n * @fires {@link workbox-window.Workbox#activated}\n * @fires {@link workbox-window.Workbox#redundant}\n * @memberof workbox-window\n */\nclass Workbox extends WorkboxEventTarget {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n *\n * @param {string|TrustedScriptURL} scriptURL The service worker script\n * associated with this instance. Using a\n * [`TrustedScriptURL`](https://web.dev/trusted-types/) is supported.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(scriptURL, registerOptions = {}) {\n super();\n this._registerOptions = {};\n this._updateFoundCount = 0;\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n this._registrationTime = 0;\n this._ownSWs = new Set();\n /**\n * @private\n */\n this._onUpdateFound = () => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const installingSW = registration.installing;\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n const updateLikelyTriggeredExternally = \n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL.toString()) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION\n ? // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true\n : false;\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n registration.removeEventListener('updatefound', this._onUpdateFound);\n }\n else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._ownSWs.add(installingSW);\n this._swDeferred.resolve(installingSW);\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n }\n else {\n logger.log('Service worker is installing...');\n }\n }\n }\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onStateChange = (originalEvent) => {\n // `this._registration` will never be `undefined` after an update is found.\n const registration = this._registration;\n const sw = originalEvent.target;\n const { state } = sw;\n const isExternal = sw === this._externalSW;\n const eventProps = {\n sw,\n isExternal,\n originalEvent,\n };\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n this.dispatchEvent(new WorkboxEvent(state, eventProps));\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = self.setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent('waiting', eventProps));\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n }\n else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n }\n else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n }\n else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n }\n else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n }\n else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onControllerChange = (originalEvent) => {\n const sw = this._sw;\n const isExternal = sw !== navigator.serviceWorker.controller;\n // Unconditionally dispatch the controlling event, with isExternal set\n // to distinguish between controller changes due to the initial registration\n // vs. an update-check or other tab's registration.\n // See https://github.com/GoogleChrome/workbox/issues/2786\n this.dispatchEvent(new WorkboxEvent('controlling', {\n isExternal,\n originalEvent,\n sw,\n isUpdate: this._isUpdate,\n }));\n if (!isExternal) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n };\n /**\n * @private\n * @param {Event} originalEvent\n */\n this._onMessage = async (originalEvent) => {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { data, ports, source } = originalEvent;\n // Wait until there's an \"own\" service worker. This is used to buffer\n // `message` events that may be received prior to calling `register()`.\n await this.getSW();\n // If the service worker that sent the message is in the list of own\n // service workers for this instance, dispatch a `message` event.\n // NOTE: we check for all previously owned service workers rather than\n // just the current one because some messages (e.g. cache updates) use\n // a timeout when sent and may be delayed long enough for a service worker\n // update to be found.\n if (this._ownSWs.has(source)) {\n this.dispatchEvent(new WorkboxEvent('message', {\n // Can't change type 'any' of data.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n data,\n originalEvent,\n ports,\n sw: source,\n }));\n }\n };\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n // Add a message listener immediately since messages received during\n // page load are buffered only until the DOMContentLoaded event:\n // https://github.com/GoogleChrome/workbox/issues/2202\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n }\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({ immediate = false } = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => window.addEventListener('load', res));\n }\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n this._registration = await this._registerScript();\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener('statechange', this._onStateChange, { once: true });\n }\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the previous\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW &&\n urlsMatch(waitingSW.scriptURL, this._scriptURL.toString())) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n dontWaitFor(Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n }));\n }\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n this._ownSWs.add(this._sw);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL.toString());\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n }\n else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(this._registerOptions.scope || this._scriptURL.toString(), document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener('controllerchange', this._onControllerChange);\n return this._registration;\n }\n /**\n * Checks for updates of the registered service worker.\n */\n async update() {\n if (!this._registration) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error('Cannot update a Workbox instance without ' +\n 'being registered. Register the Workbox instance first.');\n }\n return;\n }\n // Try to update registration\n await this._registration.update();\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw !== undefined\n ? Promise.resolve(this._sw)\n : this._swDeferred.promise;\n }\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via {@link workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n // We might be able to change the 'data' type to Record in the future.\n // eslint-disable-next-line @typescript-eslint/ban-types\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n /**\n * Sends a `{type: 'SKIP_WAITING'}` message to the service worker that's\n * currently in the `waiting` state associated with the current registration.\n *\n * If there is no current registration or no service worker is `waiting`,\n * calling this will have no effect.\n */\n messageSkipWaiting() {\n if (this._registration && this._registration.waiting) {\n void messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE);\n }\n }\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matches.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller &&\n urlsMatch(controller.scriptURL, this._scriptURL.toString())) {\n return controller;\n }\n else {\n return undefined;\n }\n }\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n // this._scriptURL may be a TrustedScriptURL, but there's no support for\n // passing that to register() in lib.dom right now.\n // https://github.com/GoogleChrome/workbox/issues/2855\n const reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions);\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n return reg;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n}\nexport { Workbox };\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n/**\n * The `message` event is dispatched any time a `postMessage` is received.\n *\n * @event workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {MessagePort[]} ports The `ports` value from `originalEvent`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `installed` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `waiting` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the {@link workbox-window.Workbox#register}\n * method was called.\n *\n * @event workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original\n * [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event, or `undefined` in the case where the service worker was waiting\n * to before `.register()` was called.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `activated` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n * changes to `activated`.\n *\n * @event workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} isExternal True if this event is associated\n * with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n/**\n * The `redundant` event is dispatched if the state of a\n * {@link workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A helper function that prevents a promise from being flagged as unused.\n *\n * @private\n **/\nexport function dontWaitFor(promise) {\n // Effective no-op.\n void promise.then(() => { });\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nexport class WorkboxEventTarget {\n constructor() {\n this._eventListenerRegistry = new Map();\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n const foo = this._getEventListenersByType(type);\n foo.add(listener);\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n /**\n * @param {Object} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n const listeners = this._getEventListenersByType(event.type);\n for (const listener of listeners) {\n listener(event);\n }\n }\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n if (!this._eventListenerRegistry.has(type)) {\n this._eventListenerRegistry.set(type, new Set());\n }\n return this._eventListenerRegistry.get(type);\n }\n}\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","event","postMessage","port2","Deferred","_this","this","promise","reject","urlsMatch","url1","url2","href","location","URL","WorkboxEvent","type","props","Object","assign","_await","value","then","direct","_empty","SKIP_WAITING_MESSAGE","_awaitIgnored","Workbox","_WorkboxEventTarget","scriptURL","registerOptions","f","call","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_registrationTime","_ownSWs","Set","_onUpdateFound","registration","_registration","installingSW","installing","_scriptURL","toString","performance","now","_externalSW","removeEventListener","_sw","add","addEventListener","_onStateChange","originalEvent","target","state","isExternal","eventProps","_isUpdate","isUpdate","dispatchEvent","_waitingTimeout","setTimeout","waiting","clearTimeout","_onControllerChange","navigator","serviceWorker","controller","_onMessage","ports","source","getSW","has","args","i","arguments","length","apply","_proto","prototype","register","_temp","_ref$immediate","immediate","_this2","body","result","_invoke","document","readyState","res","window","Boolean","_compatibleControllingSW","_getControllingSWIfCompatible","_registerScript","_this2$_registerScrip","once","waitingSW","wasWaitingBeforeRegister","update","undefined","messageSkipWaiting","_this5","recover","_catch","reg","error","_createClass","key","get","WorkboxEventTarget","_eventListenerRegistry","Map","listener","_getEventListenersByType","delete","_step","_iterator","_createForOfIteratorHelperLoose","done","set"],"mappings":"+OAEA,IACIA,KAAK,yBAA2BC,GACpC,CACA,MAAOC,GAAK,CCmBZ,SAASC,EAAUC,EAAIC,GACnB,OAAO,IAAIC,SAAQ,SAACC,GAChB,IAAMC,EAAiB,IAAIC,eAC3BD,EAAeE,MAAMC,UAAY,SAACC,GAC9BL,EAAQK,EAAMP,KAClB,EACAD,EAAGS,YAAYR,EAAM,CAACG,EAAeM,OACzC,GACJ,26CC9BA,IACId,KAAK,uBAAyBC,GAClC,CACA,MAAOC,GAAK,CCGZ,IAQMa,EAIF,WAAc,IAAAC,EAAAC,KACVA,KAAKC,QAAU,IAAIZ,SAAQ,SAACC,E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index.html b/docs/year-in-review/2025/index.html index ed47fd1d..65af4ac6 100644 --- a/docs/year-in-review/2025/index.html +++ b/docs/year-in-review/2025/index.html @@ -121,16 +121,16 @@

EXPLORE MORE

Expanded Case Studies

-> Case Studies

Experiments & Side Projects

-

-> productdesigns.net

+

-> productdesigns.net

@@ -140,9 +140,13 @@

Connect

Sitemap - + Credits + + + Open Source + diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 002981f6..66949f60 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,12 @@ packages: - "src/**" +allowBuilds: + '@parcel/watcher': true + canvas: true + highlight.js: true + sharp: true + onlyBuiltDependencies: - "@parcel/watcher" - "canvas" diff --git a/src/_includes/footer.njk b/src/_includes/footer.njk index ad34d9d5..8c5e948f 100644 --- a/src/_includes/footer.njk +++ b/src/_includes/footer.njk @@ -36,8 +36,12 @@ Sitemap - + Credits + + + Open Source + diff --git a/src/pages/credits/credits.json b/src/pages/credits/credits.json new file mode 100644 index 00000000..59b1862f --- /dev/null +++ b/src/pages/credits/credits.json @@ -0,0 +1,4 @@ +{ + "layout": "page", + "permalink": "/credits/{{ page.fileSlug }}/" +} diff --git a/src/pages/credits/index.md b/src/pages/credits/credits.md similarity index 100% rename from src/pages/credits/index.md rename to src/pages/credits/credits.md diff --git a/src/pages/credits/open-source.md b/src/pages/credits/open-source.md new file mode 100644 index 00000000..ce741869 --- /dev/null +++ b/src/pages/credits/open-source.md @@ -0,0 +1,40 @@ +--- +title: Open Source +date: git Last Modified +layout: markdown +readTime: false +--- + +## Built on Open Source + +I've built this site with open source in mind (which is why this is hosted on GitHub in a public repository) and wanted to call out the open source projects that I use as part of it. + +### Site Defaults + +- [11ty](https://www.11ty.dev) + - this is the framework of the site +- [bootstrap](https://www.getbootstrap.com) + - the UI for the site, highly customized +- [markdown-it](https://github.com/markdown-it/markdown-it) + - a markdown parser +- [markdown-it-container](https://github.com/markdown-it/markdown-it-container) + - creates block-level containers for markdown parsing + - used on current `case-studies` pages +- [Font Awesome](https://fontawesome.com) + - for icons + +### Plugins + +**Eleventy:** + +- [eleventy-activity-feed](https://github.com/11ty/eleventy-activity-feed) +- [eleventy-img](https://github.com/11ty/image) + - build-time image transformations +- [eleventy-navigation](https://github.com/11ty/eleventy-navigation) + - for creating hierarchical navigation in Eleventy projects +- [eleventy-plugin-inclusive-language](https://www.11ty.dev/docs/plugins/inclusive-language/) + - linter plugin to check for inclusive language in markdown files +- [eleventy-plugin-rss](https://github.com/11ty/eleventy-plugin-rss) + - generates a RSS feed using the Nunjucks template engine +- [eleventy-plugin-syntax-highlight](https://github.com/11ty/eleventy-plugin-syntaxhighlight) + - highlight various syntax types using PrismJS