content: about page typography and 2 sidebars
- updates the typography and title of the about page.
- adds left navigation (from go dev) to about.
- adds right sidebar linking to issues, also matching go dev.
Video Link: https://drive.google.com/file/d/19QFvP0XL0ncmLpKoK2sCciMVJVYnndWQ/view?usp=sharing
Change-Id: I2793d409d17926de32784546040d1b4f1a96a04c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/450635
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
TryBot-Bypass: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
diff --git a/static/frontend/about/about.css b/static/frontend/about/about.css
new file mode 100644
index 0000000..11b9e6e
--- /dev/null
+++ b/static/frontend/about/about.css
@@ -0,0 +1,248 @@
+.about-Wrapper ul {
+ list-style-type: disc;
+ padding-left: 2em;
+}
+.about-Wrapper li {
+ margin: 0.5em 0;
+}
+.about-Wrapper b {
+ font-weight: bold;
+}
+
+a.btn {
+ background: var(--color-button);
+ font-style: normal;
+ font-weight: 400;
+ font-size: 1rem;
+ line-height: 1rem;
+ border-radius: 0.3125rem;
+ color: #FFF;
+ display: block;
+ padding: 0.625rem;
+ margin-top: 1rem;
+ text-align: center;
+ text-decoration: none;
+}
+
+.about-Content {
+ padding: 3rem 0;
+ padding: 2rem var(--gutter);
+}
+.about-Content ul {
+ overflow-wrap: break-word;
+}
+.about-Content h1 {
+ font-weight: 400;
+ font-size: 2.25rem;
+ line-height: 2rem;
+}
+.about-Content h2 {
+ font-weight: 400;
+ font-size: 1.5rem;
+ line-height: 2rem;
+}
+.about-Content h3 {
+ font-weight: 400;
+ font-size: 1.125rem;
+ line-height: 2rem;
+}
+.about-Content p {
+ font-weight: 400;
+ font-size: 0.875rem;
+ line-height: 1.5rem;
+}
+.about-Wrapper {
+ grid-template-areas:
+ "content";
+}
+.about-Content {
+ grid-area: content;
+}
+.Sidebar {
+ display: none;
+ grid-area: Sidebar;
+ padding: 3rem;
+ padding-top: 9rem;
+}
+.Sidebar a {
+ width: 7.5rem;
+}
+.Sidebar h4 {
+ font-style: normal;
+ font-weight: 500;
+ font-size: 1rem;
+ line-height: 1.5rem;
+}
+.Sidebar p, .Sidebar-faq .link {
+ font-style: normal;
+ font-weight: 400;
+ font-size: 0.875rem;
+ line-height: 1.5rem;
+}
+.Sidebar-faq h4 {
+ font-size: 0.813rem;
+ margin-top: 1.25rem;
+ margin-bottom: 0.375rem;
+}
+.Sidebar-faq p {
+ margin-top: 0;
+ margin-bottom: 0.625rem;
+}
+.Sidebar-socialLinks {
+ display: flex;
+ align-items: center;
+}
+.Sidebar-socialLinks a {
+ display: flex;
+ width: unset;
+ margin-right: 0.675rem;
+}
+.LeftNav-columns {
+ display: flex;
+}
+
+.LeftNav-sidebar {
+ display: none;
+ grid-area: LeftNav-sidebar;
+ padding: 3rem;
+ height: 100vh;
+ position: sticky;
+ top: 0;
+ overflow: auto;
+ margin-bottom: 1rem;
+}
+
+.LeftNav-sidebar + article.Article {
+ margin: unset;
+ margin-top: 3rem;
+ margin-bottom: 1.875rem;
+}
+
+.LeftNav {
+ display: flex;
+ flex-direction: column;
+}
+
+.LeftNav a {
+ display: flex;
+ align-items: center;
+ padding-bottom: 0.675rem;
+ padding-top: 0.675rem;
+ text-decoration: none;
+ border-bottom: var(--border);
+}
+
+.LeftNav a span {
+ flex: 30;
+ margin: 0 0.75rem;
+ font-style: normal;
+ font-weight: 500;
+ font-size: 1rem;
+ line-height: 1.5rem;
+ color: var(--color-text-subtle);
+}
+
+
+.LeftNav .LeftSubnav a span {
+ font-size: 0.875rem;
+ font-weight: 400;
+}
+
+.LeftNav a.active,
+.LeftNav a:hover,
+.LeftNav a:active,
+.LeftNav a:focus {
+ background: var(--color-background-info);
+}
+
+.LeftNav a.active span,
+.LeftNav a:hover span,
+.LeftNav a:active span,
+.LeftNav a:focus span {
+ color: var(--color-text);
+}
+
+.LeftNav ul.LeftSubnav li a.active,
+.LeftNav ul.LeftSubnav li a:hover,
+.LeftNav ul.LeftSubnav li a:active,
+.LeftNav ul.LeftSubnav li a:focus {
+ background: var(--color-background-accented);
+}
+
+.LeftSubnav {
+ list-style: none;
+ padding: unset;
+ margin-top: unset;
+ margin-bottom: unset;
+}
+
+.LeftSubnav a {
+ padding-left: 1rem;
+}
+
+.LeftSubnav + a {
+ border-top: var(--border);
+}
+
+.LeftSubnav img {
+ visibility: hidden;
+ flex: 1;
+}
+
+.LeftSubnav a.active img,
+.LeftSubnav a:hover img,
+.LeftSubnav a:focus img,
+.LeftSubnav a:active img {
+ visibility: visible;
+}
+
+ul.LeftSubnav {
+ padding-left: unset;
+}
+
+.LeftSubnav li {
+ margin: unset;
+ list-style: none;
+}
+
+.LeftNav-columns .LeftNav .LeftSubnav a,
+.LeftNav .LeftSubnav a {
+ border-bottom: unset;
+}
+@media screen and (min-width: 78rem) {
+ .Sidebar {
+ display: block;
+ }
+ .about-Wrapper {
+ display: grid;
+ }
+ .about-Content {
+ padding: 3rem 0;
+ }
+}
+@media (min-width: 31.25rem) {
+ .about-Wrapper {
+ grid-template-columns: 1fr 3fr;
+ grid-template-areas:
+ "content content";
+ }
+ nav.LeftNav ul {
+ display: flex;
+ justify-content: space-between;
+ }
+}
+@media (min-width: 43.75rem) {
+ .about-Wrapper {
+ grid-template-columns: 1.5fr 4fr 1.5fr;
+ grid-template-areas:
+ "LeftNav-sidebar content Sidebar";
+ }
+ nav.LeftNav ul {
+ flex-direction: column;
+ }
+}
+@media only screen and (min-width: 90rem) {
+ .LeftNav-sidebar {
+ display: block;
+ }
+}
\ No newline at end of file
diff --git a/static/frontend/about/about.min.css b/static/frontend/about/about.min.css
new file mode 100644
index 0000000..9b90b1d
--- /dev/null
+++ b/static/frontend/about/about.min.css
@@ -0,0 +1,7 @@
+/*!
+ * Copyright 2021 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+.about-Wrapper ul{list-style-type:disc;padding-left:2em}.about-Wrapper li{margin:.5em 0}.about-Wrapper b{font-weight:700}a.btn{background:var(--color-button);font-style:normal;font-weight:400;font-size:1rem;line-height:1rem;border-radius:.3125rem;color:#fff;display:block;padding:.625rem;margin-top:1rem;text-align:center;text-decoration:none}.about-Content{padding:3rem 0;padding:2rem var(--gutter)}.about-Content ul{overflow-wrap:break-word}.about-Content h1{font-weight:400;font-size:2.25rem;line-height:2rem}.about-Content h2{font-weight:400;font-size:1.5rem;line-height:2rem}.about-Content h3{font-weight:400;font-size:1.125rem;line-height:2rem}.about-Content p{font-weight:400;font-size:.875rem;line-height:1.5rem}.about-Wrapper{grid-template-areas:"content"}.about-Content{grid-area:content}.Sidebar{display:none;grid-area:Sidebar;padding:9rem 3rem 3rem}.Sidebar a{width:7.5rem}.Sidebar h4{font-style:normal;font-weight:500;font-size:1rem;line-height:1.5rem}.Sidebar p,.Sidebar-faq .link{font-style:normal;font-weight:400;font-size:.875rem;line-height:1.5rem}.Sidebar-faq h4{font-size:.813rem;margin-top:1.25rem;margin-bottom:.375rem}.Sidebar-faq p{margin-top:0;margin-bottom:.625rem}.Sidebar-socialLinks{display:flex;align-items:center}.Sidebar-socialLinks a{display:flex;width:unset;margin-right:.675rem}.LeftNav-columns{display:flex}.LeftNav-sidebar{display:none;grid-area:LeftNav-sidebar;padding:3rem;height:100vh;position:sticky;top:0;overflow:auto;margin-bottom:1rem}.LeftNav-sidebar+article.Article{margin:unset;margin-top:3rem;margin-bottom:1.875rem}.LeftNav{display:flex;flex-direction:column}.LeftNav a{display:flex;align-items:center;padding-bottom:.675rem;padding-top:.675rem;text-decoration:none;border-bottom:var(--border)}.LeftNav a span{flex:30;margin:0 .75rem;font-style:normal;font-weight:500;font-size:1rem;line-height:1.5rem;color:var(--color-text-subtle)}.LeftNav .LeftSubnav a span{font-size:.875rem;font-weight:400}.LeftNav a.active,.LeftNav a:hover,.LeftNav a:active,.LeftNav a:focus{background:var(--color-background-info)}.LeftNav a.active span,.LeftNav a:hover span,.LeftNav a:active span,.LeftNav a:focus span{color:var(--color-text)}.LeftNav ul.LeftSubnav li a.active,.LeftNav ul.LeftSubnav li a:hover,.LeftNav ul.LeftSubnav li a:active,.LeftNav ul.LeftSubnav li a:focus{background:var(--color-background-accented)}.LeftSubnav{list-style:none;padding:unset;margin-top:unset;margin-bottom:unset}.LeftSubnav a{padding-left:1rem}.LeftSubnav+a{border-top:var(--border)}.LeftSubnav img{visibility:hidden;flex:1}.LeftSubnav a.active img,.LeftSubnav a:hover img,.LeftSubnav a:focus img,.LeftSubnav a:active img{visibility:visible}ul.LeftSubnav{padding-left:unset}.LeftSubnav li{margin:unset;list-style:none}.LeftNav-columns .LeftNav .LeftSubnav a,.LeftNav .LeftSubnav a{border-bottom:unset}@media screen and (min-width: 78rem){.Sidebar{display:block}.about-Wrapper{display:grid}.about-Content{padding:3rem 0}}@media (min-width: 31.25rem){.about-Wrapper{grid-template-columns:1fr 3fr;grid-template-areas:"content content"}nav.LeftNav ul{display:flex;justify-content:space-between}}@media (min-width: 43.75rem){.about-Wrapper{grid-template-columns:1.5fr 4fr 1.5fr;grid-template-areas:"LeftNav-sidebar content Sidebar"}nav.LeftNav ul{flex-direction:column}}@media only screen and (min-width: 90rem){.LeftNav-sidebar{display:block}}
+/*# sourceMappingURL=about.min.css.map */
diff --git a/static/frontend/about/about.min.css.map b/static/frontend/about/about.min.css.map
new file mode 100644
index 0000000..40c9779
--- /dev/null
+++ b/static/frontend/about/about.min.css.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["about.css"],
+ "sourcesContent": [".about-Wrapper ul {\n list-style-type: disc;\n padding-left: 2em;\n}\n.about-Wrapper li {\n margin: 0.5em 0;\n}\n.about-Wrapper b {\n font-weight: bold;\n}\n\na.btn {\n background: var(--color-button);\n font-style: normal;\n font-weight: 400;\n font-size: 1rem;\n line-height: 1rem;\n border-radius: 0.3125rem;\n color: #FFF;\n display: block;\n padding: 0.625rem;\n margin-top: 1rem;\n text-align: center;\n text-decoration: none;\n}\n\n.about-Content {\n padding: 3rem 0;\n padding: 2rem var(--gutter);\n}\n.about-Content ul {\n overflow-wrap: break-word;\n}\n.about-Content h1 {\n font-weight: 400;\n font-size: 2.25rem;\n line-height: 2rem;\n}\n.about-Content h2 {\n font-weight: 400;\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.about-Content h3 {\n font-weight: 400;\n font-size: 1.125rem;\n line-height: 2rem;\n}\n.about-Content p {\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 1.5rem;\n}\n.about-Wrapper {\n grid-template-areas:\n \"content\";\n}\n.about-Content {\n grid-area: content;\n}\n.Sidebar {\n display: none;\n grid-area: Sidebar;\n padding: 3rem;\n padding-top: 9rem;\n}\n.Sidebar a {\n width: 7.5rem;\n}\n.Sidebar h4 {\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.Sidebar p, .Sidebar-faq .link {\n font-style: normal;\n font-weight: 400;\n font-size: 0.875rem;\n line-height: 1.5rem;\n}\n.Sidebar-faq h4 {\n font-size: 0.813rem;\n margin-top: 1.25rem;\n margin-bottom: 0.375rem;\n}\n.Sidebar-faq p {\n margin-top: 0;\n margin-bottom: 0.625rem;\n}\n.Sidebar-socialLinks {\n display: flex;\n align-items: center;\n}\n.Sidebar-socialLinks a {\n display: flex;\n width: unset;\n margin-right: 0.675rem;\n}\n.LeftNav-columns {\n display: flex;\n}\n\n.LeftNav-sidebar {\n display: none;\n grid-area: LeftNav-sidebar;\n padding: 3rem;\n height: 100vh;\n position: sticky;\n top: 0;\n overflow: auto;\n margin-bottom: 1rem;\n}\n\n.LeftNav-sidebar + article.Article {\n margin: unset;\n margin-top: 3rem;\n margin-bottom: 1.875rem;\n}\n\n.LeftNav {\n display: flex;\n flex-direction: column;\n}\n\n.LeftNav a {\n display: flex;\n align-items: center;\n padding-bottom: 0.675rem;\n padding-top: 0.675rem;\n text-decoration: none;\n border-bottom: var(--border);\n}\n\n.LeftNav a span {\n flex: 30;\n margin: 0 0.75rem;\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n line-height: 1.5rem;\n color: var(--color-text-subtle);\n}\n\n\n.LeftNav .LeftSubnav a span {\n font-size: 0.875rem;\n font-weight: 400;\n}\n\n.LeftNav a.active,\n.LeftNav a:hover,\n.LeftNav a:active,\n.LeftNav a:focus {\n background: var(--color-background-info);\n}\n\n.LeftNav a.active span,\n.LeftNav a:hover span,\n.LeftNav a:active span,\n.LeftNav a:focus span {\n color: var(--color-text);\n}\n\n.LeftNav ul.LeftSubnav li a.active,\n.LeftNav ul.LeftSubnav li a:hover,\n.LeftNav ul.LeftSubnav li a:active,\n.LeftNav ul.LeftSubnav li a:focus {\n background: var(--color-background-accented);\n}\n\n.LeftSubnav {\n list-style: none;\n padding: unset;\n margin-top: unset;\n margin-bottom: unset;\n}\n\n.LeftSubnav a {\n padding-left: 1rem;\n}\n\n.LeftSubnav + a {\n border-top: var(--border);\n}\n\n.LeftSubnav img {\n visibility: hidden;\n flex: 1;\n}\n\n.LeftSubnav a.active img,\n.LeftSubnav a:hover img,\n.LeftSubnav a:focus img,\n.LeftSubnav a:active img {\n visibility: visible;\n}\n\nul.LeftSubnav {\n padding-left: unset;\n}\n\n.LeftSubnav li {\n margin: unset;\n list-style: none;\n}\n\n.LeftNav-columns .LeftNav .LeftSubnav a,\n.LeftNav .LeftSubnav a {\n border-bottom: unset;\n}\n@media screen and (min-width: 78rem) {\n .Sidebar {\n display: block;\n }\n .about-Wrapper {\n display: grid;\n }\n .about-Content {\n padding: 3rem 0;\n }\n}\n@media (min-width: 31.25rem) {\n .about-Wrapper {\n grid-template-columns: 1fr 3fr;\n grid-template-areas:\n \"content content\";\n }\n nav.LeftNav ul {\n display: flex;\n justify-content: space-between;\n }\n}\n@media (min-width: 43.75rem) {\n .about-Wrapper {\n grid-template-columns: 1.5fr 4fr 1.5fr;\n grid-template-areas:\n \"LeftNav-sidebar content Sidebar\";\n }\n nav.LeftNav ul {\n flex-direction: column;\n }\n}\n@media only screen and (min-width: 90rem) {\n .LeftNav-sidebar {\n display: block;\n }\n}"],
+ "mappings": ";;;;;AAAA,kBACI,qBACA,iBAEJ,kBAJA,cAOA,iBACI,gBAGJ,MACI,+BACA,kBACA,gBACA,eACA,iBAhBJ,uBAkBI,WACA,cAnBJ,gBAqBI,gBACA,kBACA,qBAGJ,eA1BA,eA4BI,2BAEJ,kBACI,yBAEJ,kBACI,gBACA,kBACA,iBAEJ,kBACI,gBACA,iBACA,iBAEJ,kBACI,gBACA,mBACA,iBAEJ,iBACI,gBACA,kBACA,mBAEJ,eACI,8BAGJ,eACI,kBAEJ,SACI,aACA,kBA9DJ,uBAkEA,WACI,aAEJ,YACI,kBACA,gBACA,eACA,mBAEJ,8BACI,kBACA,gBACA,kBACA,mBAEJ,gBACI,kBACA,mBACA,sBAEJ,eACI,aACA,sBAEJ,qBACI,aACA,mBAEJ,uBACI,aACA,YACA,qBAEJ,iBACI,aAGJ,iBACI,aACA,0BAzGJ,aA2GI,aACA,gBACA,MACA,cACA,mBAGJ,iCACI,aACA,gBACA,uBAGJ,SACI,aACA,sBAGJ,WACI,aACA,mBACA,uBACA,oBACA,qBACA,4BAGJ,gBACI,QAvIJ,gBAyII,kBACA,gBACA,eACA,mBACA,+BAIJ,4BACI,kBACA,gBAGJ,sEAII,wCAGJ,0FAII,wBAGJ,0IAII,4CAGJ,YACI,gBACA,cACA,iBACA,oBAGJ,cACI,kBAGJ,cACI,yBAGJ,gBACI,kBACA,OAGJ,kGAII,mBAGJ,cACI,mBAGJ,eACI,aACA,gBAGJ,+DAEI,oBAEJ,qCACI,SACI,cAEJ,eACI,aAEJ,eA1NJ,gBA8NA,6BACI,eACI,8BACA,sCAGJ,eACI,aACA,+BAGR,6BACI,eACI,sCACA,sDAGJ,eACI,uBAGR,0CACI,iBACI",
+ "names": []
+}
diff --git a/static/frontend/about/about.tmpl b/static/frontend/about/about.tmpl
index 71181d3..5936bb2 100644
--- a/static/frontend/about/about.tmpl
+++ b/static/frontend/about/about.tmpl
@@ -4,266 +4,269 @@
license that can be found in the LICENSE file.
-->
+{{define "pre-content"}}
+ <link href="/static/frontend/about/about.min.css?version={{.AppVersionLabel}}" rel="stylesheet">
+{{end}}
+
{{define "title"}}<title>About - Go Packages</title>{{end}}
{{define "main"}}
- <style>
- ul {
- list-style-type: disc;
- padding-left: 2em;
- }
- li {
- margin: 0.5em 0;
- }
- b {
- font-weight: bold;
- }
- </style>
<main class="go-Container">
- <div class="go-Content">
- <h1 data-test-id="about-heading">About</h1>
- <p>
- Welcome to pkg.go.dev, your source for information about Go packages and modules.
- </p>
+ <div class="about-Wrapper">
+ <aside class="LeftNav-sidebar">
+ {{/* Left nav generated here. */}}
+ <nav class="LeftNav" data-hydrate="true"></nav>
+ </aside>
+ <div class="go-Content about-Content">
+ <h1 data-test-id="about-heading">About pkgsite</h1>
+ <p>
+ Welcome to pkg.go.dev, your source for information about Go packages and modules.
+ </p>
- <h2 id="adding-a-package">Adding a package</h2>
- <p>
- Data for the site is downloaded from
- <a href="https://proxy.golang.org/">proxy.golang.org</a>.
- We monitor the <a href="https://index.golang.org/index">Go Module Index</a>
- regularly for new packages to add to pkg.go.dev.
- If you don’t see a package on pkg.go.dev, you can add it by doing one of the following:
- </p>
- <ul>
- <li>
- <p>
- Visiting that page on pkg.go.dev, and clicking the “Request” button.
- For example:
- <br />
- <code>https://pkg.go.dev/example.com/my/module</code>
- </p>
- </li>
- <li>
- <p>
- Making a request to proxy.golang.org for the module version,
- to any endpoint specified by the
- <a href="/cmd/go/#hdr-Module_proxy_protocol">Module proxy protocol</a>.
- For example:
- <br />
- <code>https://proxy.golang.org/example.com/my/module/@v/v1.0.0.info</code>
- </p>
- </li>
- <li>
- <p>
- Downloading the package via the
- <a href="/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them">go command</a>.
- For example:
- <br />
- <code>GOPROXY=https://proxy.golang.org GO111MODULE=on go get example.com/my/module@v1.0.0</code>
- </p>
- </li>
- </ul>
+ <h2 id="adding-a-package">Adding a package</h2>
+ <p>
+ Data for the site is downloaded from
+ <a href="https://proxy.golang.org/">proxy.golang.org</a>.
+ We monitor the <a href="https://index.golang.org/index">Go Module Index</a>
+ regularly for new packages to add to pkg.go.dev.
+ If you don’t see a package on pkg.go.dev, you can add it by doing one of the following:
+ </p>
+ <ul>
+ <li>
+ <p>
+ Visiting that page on pkg.go.dev, and clicking the “Request” button.
+ For example:
+ <br />
+ <code>https://pkg.go.dev/example.com/my/module</code>
+ </p>
+ </li>
+ <li>
+ <p>
+ Making a request to proxy.golang.org for the module version,
+ to any endpoint specified by the
+ <a href="/cmd/go/#hdr-Module_proxy_protocol">Module proxy protocol</a>.
+ For example:
+ <br />
+ <code>https://proxy.golang.org/example.com/my/module/@v/v1.0.0.info</code>
+ </p>
+ </li>
+ <li>
+ <p>
+ Downloading the package via the
+ <a href="/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them">go command</a>.
+ For example:
+ <br />
+ <code>GOPROXY=https://proxy.golang.org GO111MODULE=on go get example.com/my/module@v1.0.0</code>
+ </p>
+ </li>
+ </ul>
- <h2 id="removing-a-package">Removing a package</h2>
- <p>
- If you would like to hide versions of a module on pkg.go.dev, as well as from the <code>go</code> command,
- you should retract them. Retracting a module version involves adding a <code>retract</code> directive to
- your go.mod file and publishing a new version. See the Go blog post
- <a href="https://go.dev/blog/go116-module-changes#module-retraction">New module changes in Go 1.16</a>
- and the <a href="https://go.dev/ref/mod#go-mod-file-retract">modules reference</a> for details.
- </p>
- <p>
- Note that it is possible to retract the latest version of a module; the modules reference link above
- includes an example. Also note that published versions cannot be reused or modified, and this includes
- retracted versions.
- </p>
- <p>
- If you cannot publish a new version with retractions because the source code repository or domain
- name is no longer accessible, or if you want to hide documentation for all current and future versions,
- you can <a href="https://go.dev/s/pkgsite-package-removal">file a request</a> for the pkgsite team to hide
- your package documentation from pkg.go.dev. Note that the package will continue to be available via
- <code>go get</code> or <code>go install</code> unless its module is retracted.
- </p>
+ <h2 id="removing-a-package">Removing a package</h2>
+ <p>
+ If you would like to hide versions of a module on pkg.go.dev, as well as from the <code>go</code> command,
+ you should retract them. Retracting a module version involves adding a <code>retract</code> directive to
+ your go.mod file and publishing a new version. See the Go blog post
+ <a href="https://go.dev/blog/go116-module-changes#module-retraction">New module changes in Go 1.16</a>
+ and the <a href="https://go.dev/ref/mod#go-mod-file-retract">modules reference</a> for details.
+ </p>
+ <p>
+ Note that it is possible to retract the latest version of a module; the modules reference link above
+ includes an example. Also note that published versions cannot be reused or modified, and this includes
+ retracted versions.
+ </p>
+ <p>
+ If you cannot publish a new version with retractions because the source code repository or domain
+ name is no longer accessible, or if you want to hide documentation for all current and future versions,
+ you can <a href="https://go.dev/s/pkgsite-package-removal">file a request</a> for the pkgsite team to hide
+ your package documentation from pkg.go.dev. Note that the package will continue to be available via
+ <code>go get</code> or <code>go install</code> unless its module is retracted.
+ </p>
- <h2 id="documentation">Documentation</h2>
- <p>
- Documentation is generated based on Go source code downloaded from the Go Module Mirror at
- <code>proxy.golang.org/<module>/@v/<version>.zip</code>.
- New module versions are fetched from index.golang.org and added to pkg.go.dev site every few minutes.
- </p>
- <p>
- The <a href="https://go.dev/blog/godoc">guidelines for writing documentation</a>
- for the godoc tool apply to pkg.go.dev.
- </p>
- <p>
- It’s important to write a good summary of the package in the first sentence of the package comment.
- The go.dev site indexes the first sentence and displays it in search results.
- </p>
+ <h2 id="documentation">Documentation</h2>
+ <p>
+ Documentation is generated based on Go source code downloaded from the Go Module Mirror at
+ <code>proxy.golang.org/<module>/@v/<version>.zip</code>.
+ New module versions are fetched from index.golang.org and added to pkg.go.dev site every few minutes.
+ </p>
+ <p>
+ The <a href="https://go.dev/blog/godoc">guidelines for writing documentation</a>
+ for the godoc tool apply to pkg.go.dev.
+ </p>
+ <p>
+ It’s important to write a good summary of the package in the first sentence of the package comment.
+ The go.dev site indexes the first sentence and displays it in search results.
+ </p>
- <h3 id="build-context">Build Context</h3>
- <p>
- Most Go packages look and behave the same regardless of the machine architecture
- or operating system. But some have different documentation, even different
- exported symbols, for different architectures or OSes. Some packages may not even
- exist for some architectures.
- </p>
- <p>
- Go calls an OS/architecture pair a “build context” and writes it with a slash,
- like <code>linux/amd64</code>.
- You may also see the terms <code>GOOS</code> and <code>GOARCH</code> for the OS
- and architecture respectively, because those are the names of the environment
- variables that the go command uses.
- (See the <a href="/cmd/go">go command documentation</a> for more information.)
- </p>
- <p>
- If a package exists at only one build context, pkg.go.dev displays that build
- context at the upper right corner of the documentation.
- For example,
- <a href="https://pkg.go.dev/syscall/js">https://pkg.go.dev/syscall/js</a>
- displays “js/wasm”.
- </p>
- <p>
- If a package is different in different build contexts, then pkg.go.dev will
- display one by default and provide a dropdown control at the upper right so you
- can select a different one.
- </p>
- <p>
- For packages that are the same across all build contexts, pkg.go.dev does not
- display any build context information.
- </p>
- <p>
- Although there are many possible OS/architecture pairs, pkg.go.dev considers only a
- <a href="https://go.googlesource.com/pkgsite/+/master/internal/build_context.go#29">handful</a>
- of them. So if a package only exists for unsupported build contexts, pkg.go.dev
- will not display documentation for it.
- </p>
+ <h3 id="build-context">Build Context</h3>
+ <p>
+ Most Go packages look and behave the same regardless of the machine architecture
+ or operating system. But some have different documentation, even different
+ exported symbols, for different architectures or OSes. Some packages may not even
+ exist for some architectures.
+ </p>
+ <p>
+ Go calls an OS/architecture pair a “build context” and writes it with a slash,
+ like <code>linux/amd64</code>.
+ You may also see the terms <code>GOOS</code> and <code>GOARCH</code> for the OS
+ and architecture respectively, because those are the names of the environment
+ variables that the go command uses.
+ (See the <a href="/cmd/go">go command documentation</a> for more information.)
+ </p>
+ <p>
+ If a package exists at only one build context, pkg.go.dev displays that build
+ context at the upper right corner of the documentation.
+ For example,
+ <a href="https://pkg.go.dev/syscall/js">https://pkg.go.dev/syscall/js</a>
+ displays “js/wasm”.
+ </p>
+ <p>
+ If a package is different in different build contexts, then pkg.go.dev will
+ display one by default and provide a dropdown control at the upper right so you
+ can select a different one.
+ </p>
+ <p>
+ For packages that are the same across all build contexts, pkg.go.dev does not
+ display any build context information.
+ </p>
+ <p>
+ Although there are many possible OS/architecture pairs, pkg.go.dev considers only a
+ <a href="https://go.googlesource.com/pkgsite/+/master/internal/build_context.go#29">handful</a>
+ of them. So if a package only exists for unsupported build contexts, pkg.go.dev
+ will not display documentation for it.
+ </p>
- <h3 id="source-links">Source Links</h3>
- <p>
- Most of the time, pkg.go.dev can determine the location of a package’s source
- files, and provide links from symbols in the documentation to their definitions
- in the source. If your package’s source is not linked, try one of the following
- two approaches.
- </p>
- <p>
- If pkg.go.dev finds a <code>go-source</code> meta tag on your site that follows the
- <a href="https://github.com/golang/gddo/wiki/Source-Code-Links">specified format</a>,
- it can often determine the right links, even though the format doesn’t take
- versioning into account.
- </p>
- <p>
- If that doesn’t work, you will need to add your repo or code-hosting site to
- pkg.go.dev’s list of patterns
- (see <a href="https://go.dev/issues/40477">Go Issue 40477</a> for context).
- Read about how to
- <a href="https://go.googlesource.com/pkgsite#contributing">contribute to pkg.go.dev</a>,
- then produce a CL that adds a pattern to the
- <a href="https://go.googlesource.com/pkgsite/+/refs/heads/master/internal/source/source.go"><code>internal/source</code></a>
- package.
- </p>
+ <h3 id="source-links">Source Links</h3>
+ <p>
+ Most of the time, pkg.go.dev can determine the location of a package’s source
+ files, and provide links from symbols in the documentation to their definitions
+ in the source. If your package’s source is not linked, try one of the following
+ two approaches.
+ </p>
+ <p>
+ If pkg.go.dev finds a <code>go-source</code> meta tag on your site that follows the
+ <a href="https://github.com/golang/gddo/wiki/Source-Code-Links">specified format</a>,
+ it can often determine the right links, even though the format doesn’t take
+ versioning into account.
+ </p>
+ <p>
+ If that doesn’t work, you will need to add your repo or code-hosting site to
+ pkg.go.dev’s list of patterns
+ (see <a href="https://go.dev/issues/40477">Go Issue 40477</a> for context).
+ Read about how to
+ <a href="https://go.googlesource.com/pkgsite#contributing">contribute to pkg.go.dev</a>,
+ then produce a CL that adds a pattern to the
+ <a href="https://go.googlesource.com/pkgsite/+/refs/heads/master/internal/source/source.go"><code>internal/source</code></a>
+ package.
+ </p>
- <h2 id="best-practices">Best practices</h2>
- <p>
- Pkg.go.dev surfaces details about Go packages and modules
- in order to help provide guidelines for best practices with Go.
- </p>
- <p>
- Here are the details we surface:
- </p>
- <ul>
- <li>
- <p>
- <b>Has <code>go.mod</code> file</b>.
- The Go module system was introduced in Go 1.11
- and is the official dependency management solution for Go.
- A module version is defined by a tree of source files,
- with a go.mod file in its root.
- <a href="/cmd/go/#hdr-The_go_mod_file">More information about the go.mod file</a>.
- </p>
- </li>
- <li>
- <p>
- <b>Redistributable license</b>.
- Redistributable licenses place minimal restrictions on how software
- can be used, modified, and redistributed.
- For more information on how pkg.go.dev determines if a license is redistributable,
- see our <a href="http://pkg.go.dev/license-policy">license policy</a>.
- </p>
- </li>
- <li>
- <p>
- <b>Tagged version</b>.
- When the go get command resolves modules by default it prioritizes tagged versions.
- When no tagged versions exist, go get looks up the latest known commit.
- Modules with tagged versions give importers more predictable builds.
- See <a href="https://semver.org">semver.org</a> and
- <a href="https://go.dev/blog/module-compatibility">Keeping Your Modules Compatible</a>
- for more information.
- </p>
- </li>
- <li>
- <p>
- <b>Stable version</b>.
- Projects at v0 are assumed to be experimental.
- When a project reaches a stable version – major version v1 or higher –
- breaking changes must be done in a new major version.
- Stable versions give developers the confidence that
- breaking changes won’t occur when they upgrade a package to the latest minor version.
- See <a href="https://go.dev/blog/v2-go-modules">Go Modules: v2 and Beyond</a>
- for more information.
- </p>
- </li>
- </ul>
+ <h2 id="best-practices">Best practices</h2>
+ <p>
+ Pkg.go.dev surfaces details about Go packages and modules
+ in order to help provide guidelines for best practices with Go.
+ </p>
+ <p>
+ Here are the details we surface:
+ </p>
+ <ul>
+ <li>
+ <p>
+ <b>Has <code>go.mod</code> file</b>.
+ The Go module system was introduced in Go 1.11
+ and is the official dependency management solution for Go.
+ A module version is defined by a tree of source files,
+ with a go.mod file in its root.
+ <a href="/cmd/go/#hdr-The_go_mod_file">More information about the go.mod file</a>.
+ </p>
+ </li>
+ <li>
+ <p>
+ <b>Redistributable license</b>.
+ Redistributable licenses place minimal restrictions on how software
+ can be used, modified, and redistributed.
+ For more information on how pkg.go.dev determines if a license is redistributable,
+ see our <a href="http://pkg.go.dev/license-policy">license policy</a>.
+ </p>
+ </li>
+ <li>
+ <p>
+ <b>Tagged version</b>.
+ When the go get command resolves modules by default it prioritizes tagged versions.
+ When no tagged versions exist, go get looks up the latest known commit.
+ Modules with tagged versions give importers more predictable builds.
+ See <a href="https://semver.org">semver.org</a> and
+ <a href="https://go.dev/blog/module-compatibility">Keeping Your Modules Compatible</a>
+ for more information.
+ </p>
+ </li>
+ <li>
+ <p>
+ <b>Stable version</b>.
+ Projects at v0 are assumed to be experimental.
+ When a project reaches a stable version – major version v1 or higher –
+ breaking changes must be done in a new major version.
+ Stable versions give developers the confidence that
+ breaking changes won’t occur when they upgrade a package to the latest minor version.
+ See <a href="https://go.dev/blog/v2-go-modules">Go Modules: v2 and Beyond</a>
+ for more information.
+ </p>
+ </li>
+ </ul>
- <h2 id="creating-a-badge">Creating a badge</h2>
- <p>
- The pkg.go.dev badge provides a way for Go users to learn about the pkg.go.dev page
- associated with a given Go package or module.
- You can create a badge using the <a href="https://pkg.go.dev/badge">badge generation tool</a>.
- The tool will generate html and markdown snippets
- that you can use on your project website or in a README file.
- </p>
- <p>
- <a href="https://pkg.go.dev/golang.org/x/pkgsite"><img src="https://pkg.go.dev/badge/golang.org/x/pkgsite" alt="PkgGoDev"></a>
- </p>
+ <h2 id="creating-a-badge">Creating a badge</h2>
+ <p>
+ The pkg.go.dev badge provides a way for Go users to learn about the pkg.go.dev page
+ associated with a given Go package or module.
+ You can create a badge using the <a href="https://pkg.go.dev/badge">badge generation tool</a>.
+ The tool will generate html and markdown snippets
+ that you can use on your project website or in a README file.
+ </p>
+ <p>
+ <a href="https://pkg.go.dev/golang.org/x/pkgsite"><img src="https://pkg.go.dev/badge/golang.org/x/pkgsite" alt="PkgGoDev"></a>
+ </p>
- <h2 id="adding-links">Adding links</h2>
- <p>
- You can add links to your README files and package documentation that will be
- shown on the right side of the pkg.go.dev page.
- For details, see <a href="https://go.dev/issue/42968">this issue</a>.
- </p>
+ <h2 id="adding-links">Adding links</h2>
+ <p>
+ You can add links to your README files and package documentation that will be
+ shown on the right side of the pkg.go.dev page.
+ For details, see <a href="https://go.dev/issue/42968">this issue</a>.
+ </p>
- <h2 id="keyboard-shortcuts">Keyboard Shortcuts</h2>
- <p>
- There are keyboard shortcuts for navigating package documentation pages.
- Type ‘?’ on a package page for help.
- </p>
+ <h2 id="keyboard-shortcuts">Keyboard Shortcuts</h2>
+ <p>
+ There are keyboard shortcuts for navigating package documentation pages.
+ Type ‘?’ on a package page for help.
+ </p>
- <h2 id="bookmarklet">Bookmarklet</h2>
- <p>
- The pkg.go.dev bookmarklet navigates from pages on source code hosts,
- such as GitHub, Bitbucket, Launchpad, etc., to the package documentation.
- To install the bookmarklet, click and drag the following link to your bookmark bar:
- <a href="javascript:(function(){ const pathRegex = window.location.pathname.match(/([^\/]+)(?:\/([^\/]+))?/); const host = window.location.hostname; if (pathRegex) { window.location='https://pkg.go.dev/'+host+'/'+pathRegex[0]; } else { alert('There was an error navigating to pkg.go.dev!'); } })()">Pkg.go.dev Doc</a>
- </p>
+ <h2 id="bookmarklet">Bookmarklet</h2>
+ <p>
+ The pkg.go.dev bookmarklet navigates from pages on source code hosts,
+ such as GitHub, Bitbucket, Launchpad, etc., to the package documentation.
+ To install the bookmarklet, click and drag the following link to your bookmark bar:
+ <a href="javascript:(function(){ const pathRegex = window.location.pathname.match(/([^\/]+)(?:\/([^\/]+))?/); const host = window.location.hostname; if (pathRegex) { window.location='https://pkg.go.dev/'+host+'/'+pathRegex[0]; } else { alert('There was an error navigating to pkg.go.dev!'); } })()">Pkg.go.dev Doc</a>
+ </p>
- <h2 id="license-policy">License policy</h2>
- <p>
- Information for a given package or module may be limited
- if we are not able to detect a suitable license.
- See our <a href="https://pkg.go.dev/license-policy">license policy</a> for more information.
- </p>
+ <h2 id="license-policy">License policy</h2>
+ <p>
+ Information for a given package or module may be limited
+ if we are not able to detect a suitable license.
+ See our <a href="https://pkg.go.dev/license-policy">license policy</a> for more information.
+ </p>
- <h2 id="feedback">Feedback</h2>
- <p>
- Share your ideas, feature requests, and bugs on the
- <a href="https://go.dev/s/discovery-feedback">Go Issue Tracker</a>.
- For questions, please post on the #tools slack channel on the
- <a href="https://invite.slack.golangbridge.org/">Gophers Slack</a>,
- or email the <a href="https://groups.google.com/group/golang-dev">golang-dev mailing list</a>.
- </p>
+ <h2 id="feedback">Feedback</h2>
+ <p>
+ Share your ideas, feature requests, and bugs on the
+ <a href="https://go.dev/s/discovery-feedback">Go Issue Tracker</a>.
+ For questions, please post on the #tools slack channel on the
+ <a href="https://invite.slack.golangbridge.org/">Gophers Slack</a>,
+ or email the <a href="https://groups.google.com/group/golang-dev">golang-dev mailing list</a>.
+ </p>
+ </div>
+ <aside class="Sidebar">
+ <h4>Report Issues</h4>
+ <p>If you spot bugs, mistakes, or inconsistencies in the Go project's code or documentation, please let us know by filing a ticket on our <a href="https://github.com/golang/go/issues">issue tracker.</a> Of course, you should check it's not an existing issue before creating a new one.</p>
+ <a class="btn" href="https://github.com/golang/go/issues/new/choose">Filing a ticket</a>
+ </aside>
</div>
</main>
{{end}}
diff --git a/static/frontend/about/dot.svg b/static/frontend/about/dot.svg
new file mode 100644
index 0000000..e750f96
--- /dev/null
+++ b/static/frontend/about/dot.svg
@@ -0,0 +1 @@
+<svg width="5" height="5" viewBox="0 0 5 5" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><circle cx="2.5" cy="2.5" r="2.5" fill="#007F9F"></circle></svg>
\ No newline at end of file
diff --git a/static/frontend/about/index.js b/static/frontend/about/index.js
new file mode 100644
index 0000000..45b43cd
--- /dev/null
+++ b/static/frontend/about/index.js
@@ -0,0 +1,2 @@
+var O=async function(){if(!["/about"].includes(window.location.pathname))return;let d="h2, h3, h4",u=".LeftNav a",i=document.querySelector(".LeftNav"),c=document.querySelector(".go-Content"),h=!1;function a(t="",r={},...o){if(!t)throw new Error("Provide `type` to create document element.");let n=Object.assign(document.createElement(t),r);return o.forEach(s=>{typeof s=="string"?n.appendChild(document.createTextNode(s)):Array.isArray(s)?s.forEach(l=>n.appendChild(l)):s instanceof HTMLElement&&n.appendChild(s)}),n}function T(){return new Promise((t,r)=>{var s,l,f,L,v,E,p,y,H,A;let o=[],n=[];if(!c||!i)return r(".SiteContent not found.");if(i instanceof HTMLElement&&!((s=i==null?void 0:i.dataset)==null?void 0:s.hydrate))return t(!0);for(let e of c.querySelectorAll(d))if(e instanceof HTMLElement&&!((l=e==null?void 0:e.dataset)==null?void 0:l.ignore))switch(e.tagName){case"H2":o=[...o,{id:e.id,label:((f=e==null?void 0:e.dataset)==null?void 0:f.title)?e.dataset.title:(L=e.textContent)!=null?L:""}];break;case"H3":case"H4":((v=o[o.length-1])==null?void 0:v.subnav)?o[o.length-1].subnav&&((A=o[o.length-1].subnav)==null||A.push({id:e.id,label:((y=e==null?void 0:e.dataset)==null?void 0:y.title)?e.dataset.title:(H=e.textContent)!=null?H:""})):o[o.length-1].subnav=[{id:e.id,label:((E=e==null?void 0:e.dataset)==null?void 0:E.title)?e.dataset.title:(p=e.textContent)!=null?p:""}];break}for(let e of o){let C=a("a",{href:"#"+e.id},a("span",{},e.label));if(n=[...n,C],e==null?void 0:e.subnav){let b=[];for(let M of e.subnav){let x=a("li",{},a("a",{href:"#"+M.id},a("img",{src:"/static/frontend/about/dot.svg",width:"5",height:"5"}),a("span",{},M.label)));b=[...b,x]}let N=a("ul",{className:"LeftSubnav"},b);n=[...n,N]}}return n.forEach(e=>i.appendChild(e)),t(!0)})}function S(){return new Promise(t=>{if(!document.querySelectorAll(u))return t(!0);for(let r of document.querySelectorAll(u))if(r instanceof HTMLAnchorElement&&r.href===location.href){m(r);break}t(!0)})}function k(){return new Promise(t=>{if(!document.querySelectorAll(u))return t(!0);for(let r of document.querySelectorAll(u))r.classList.remove("active");t(!0)})}function m(t){t instanceof HTMLAnchorElement&&k().then(()=>{var o,n,s;t.classList.add("active");let r=(o=t==null?void 0:t.parentNode)==null?void 0:o.parentNode;r instanceof HTMLElement&&((n=r==null?void 0:r.classList)==null?void 0:n.contains("LeftSubnav"))&&((s=r.previousElementSibling)==null||s.classList.add("active"))})}function w(){g();let t=document.querySelector('[href="'+location.hash+'"]');t instanceof HTMLAnchorElement&&m(t)}function g(){h=!0,setTimeout(()=>{h=!1},200)}function q(){var t;if(window.addEventListener("hashchange",w),c==null?void 0:c.querySelectorAll(d)){let r=n=>{if(!h&&Array.isArray(n)&&n.length>0){for(let s of n)if(s.isIntersecting&&s.target instanceof HTMLElement){let{id:l}=s.target,f=document.querySelector('[href="#'+l+'"]');f instanceof HTMLAnchorElement&&m(f);break}}},o=new IntersectionObserver(r,{threshold:0,rootMargin:"0px 0px -50% 0px"});for(let n of c.querySelectorAll(d))n instanceof HTMLElement&&!((t=n==null?void 0:n.dataset)==null?void 0:t.ignore)&&o.observe(n)}}try{await T(),await S(),location.hash&&g(),q()}catch(t){t instanceof Error?console.error(t.message):console.error(t)}};export{O as initJumpLinks};
+//# sourceMappingURL=index.js.map
diff --git a/static/frontend/about/index.js.map b/static/frontend/about/index.js.map
new file mode 100644
index 0000000..aa99842
--- /dev/null
+++ b/static/frontend/about/index.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["index.ts"],
+ "sourcesContent": ["/**\n * Left Navigation.\n */\nexport const initJumpLinks = async function () {\n const pagesWithJumpLinks = ['/about'];\n if (!pagesWithJumpLinks.includes(window.location.pathname)) {\n // stop the file from doing anything else if the page doesn't have jumplinks\n return;\n }\n\n // these might be generated or not so don't grab references to the elements until actually need them.\n const titles = 'h2, h3, h4';\n const nav = '.LeftNav a';\n // these are always in the dom so we can get them now and throw errors if they're not.\n const leftNav = document.querySelector('.LeftNav');\n const siteContent = document.querySelector('.go-Content');\n let isObserverDisabled = false;\n\n /**\n * El function\n * @example el('h1', {className: 'title'}, 'Welcome to the site');\n * @example el('ul', {className: 'list'}, el('li', {}, 'Item one'), el('li', {}, 'Item two'), el('li', {}, 'Item three'));\n * @example el('img', {src: '/url.svg'});\n */\n function el(\n type = '',\n props: { [key: string]: string } = {},\n ...children: (HTMLElement | HTMLElement[] | string | undefined)[]\n ) {\n // Error, no type declared.\n if (!type) {\n throw new Error('Provide `type` to create document element.');\n }\n\n // Create element with optional attribute props\n const docEl = Object.assign(document.createElement(type), props);\n\n // Children: array containing strings or elements\n children.forEach(child => {\n if (typeof child === 'string') {\n docEl.appendChild(document.createTextNode(child));\n } else if (Array.isArray(child)) {\n child.forEach(c => docEl.appendChild(c));\n } else if (child instanceof HTMLElement) {\n docEl.appendChild(child);\n }\n });\n\n return docEl;\n }\n /** Build Nav if data hydrate is present. */\n function buildNav() {\n return new Promise((resolve, reject) => {\n let navItems: { id: string; label: string; subnav?: { id: string; label: string }[] }[] = [];\n let elements: HTMLElement[] = [];\n\n if (!siteContent || !leftNav) {\n return reject('.SiteContent not found.');\n }\n if (leftNav instanceof HTMLElement && !leftNav?.dataset?.hydrate) {\n return resolve(true);\n }\n\n for (const title of siteContent.querySelectorAll(titles)) {\n if (title instanceof HTMLElement && !title?.dataset?.ignore) {\n switch (title.tagName) {\n case 'H2':\n navItems = [\n ...navItems,\n {\n id: title.id,\n label: title?.dataset?.title ? title.dataset.title : title.textContent ?? '',\n },\n ];\n break;\n\n case 'H3':\n case 'H4':\n if (!navItems[navItems.length - 1]?.subnav) {\n navItems[navItems.length - 1].subnav = [\n {\n id: title.id,\n label: title?.dataset?.title ? title.dataset.title : title.textContent ?? '',\n },\n ];\n } else if (navItems[navItems.length - 1].subnav) {\n navItems[navItems.length - 1].subnav?.push({\n id: title.id,\n label: title?.dataset?.title ? title.dataset.title : title.textContent ?? '',\n });\n }\n break;\n }\n }\n }\n\n for (const navItem of navItems) {\n const link = el('a', { href: '#' + navItem.id }, el('span', {}, navItem.label));\n elements = [...elements, link];\n if (navItem?.subnav) {\n let subLinks: HTMLElement[] = [];\n for (const subnavItem of navItem.subnav) {\n const subItem = el(\n 'li',\n {},\n el(\n 'a',\n { href: '#' + subnavItem.id },\n el('img', { src: '/static/frontend/about/dot.svg', width: '5', height: '5' }),\n el('span', {}, subnavItem.label)\n )\n );\n subLinks = [...subLinks, subItem];\n }\n const list = el('ul', { className: 'LeftSubnav' }, subLinks);\n elements = [...elements, list];\n }\n }\n\n elements.forEach(element => leftNav.appendChild(element));\n\n return resolve(true);\n });\n }\n /**\n * Set the correct active element.\n */\n function setNav() {\n return new Promise(resolve => {\n if (!document.querySelectorAll(nav)) return resolve(true);\n for (const a of document.querySelectorAll(nav)) {\n if (a instanceof HTMLAnchorElement && a.href === location.href) {\n setElementActive(a);\n break;\n }\n }\n resolve(true);\n });\n }\n /** resetNav: removes all .active from nav elements */\n function resetNav() {\n return new Promise(resolve => {\n if (!document.querySelectorAll(nav)) return resolve(true);\n for (const a of document.querySelectorAll(nav)) {\n a.classList.remove('active');\n }\n resolve(true);\n });\n }\n /** setElementActive: controls resetting nav and highlighting the appropriate nav items */\n function setElementActive(element: HTMLAnchorElement) {\n if (element instanceof HTMLAnchorElement) {\n resetNav().then(() => {\n element.classList.add('active');\n const parent = element?.parentNode?.parentNode;\n if (parent instanceof HTMLElement && parent?.classList?.contains('LeftSubnav')) {\n parent.previousElementSibling?.classList.add('active');\n }\n });\n }\n }\n /** setLinkManually: disables observer and selects the clicked nav item. */\n function setLinkManually() {\n delayObserver();\n const link = document.querySelector('[href=\"' + location.hash + '\"]');\n if (link instanceof HTMLAnchorElement) {\n setElementActive(link);\n }\n }\n /** delayObserver: Quick on off switch for intersection observer. */\n function delayObserver() {\n isObserverDisabled = true;\n setTimeout(() => {\n isObserverDisabled = false;\n }, 200);\n }\n /** observeSections: kicks off observation of titles as well as manual clicks with hashchange */\n function observeSections() {\n window.addEventListener('hashchange', setLinkManually);\n\n if (siteContent?.querySelectorAll(titles)) {\n const callback: IntersectionObserverCallback = entries => {\n if (!isObserverDisabled && Array.isArray(entries) && entries.length > 0) {\n for (const entry of entries) {\n if (entry.isIntersecting && entry.target instanceof HTMLElement) {\n const { id } = entry.target;\n const link = document.querySelector('[href=\"#' + id + '\"]');\n if (link instanceof HTMLAnchorElement) {\n setElementActive(link);\n }\n break;\n }\n }\n }\n };\n // rootMargin is important when multiple sections are in the observable area **on page load**.\n // they will still be highlighted on scroll because of the root margin.\n const ob = new IntersectionObserver(callback, {\n threshold: 0,\n rootMargin: '0px 0px -50% 0px',\n });\n for (const title of siteContent.querySelectorAll(titles)) {\n if (title instanceof HTMLElement && !title?.dataset?.ignore) {\n ob.observe(title);\n }\n }\n }\n }\n\n try {\n await buildNav();\n await setNav();\n if (location.hash) {\n delayObserver();\n }\n observeSections();\n } catch (e) {\n if (e instanceof Error) {\n console.error(e.message);\n } else {\n console.error(e);\n }\n }\n};\n"],
+ "mappings": "AAGO,GAAM,GAAgB,gBAAkB,CAE7C,GAAI,CAAC,AADsB,CAAC,UACJ,SAAS,OAAO,SAAS,UAE/C,OAIF,GAAM,GAAS,aACT,EAAM,aAEN,EAAU,SAAS,cAAc,YACjC,EAAc,SAAS,cAAc,eACvC,EAAqB,GAQzB,WACE,EAAO,GACP,EAAmC,MAChC,EACH,CAEA,GAAI,CAAC,EACH,KAAM,IAAI,OAAM,8CAIlB,GAAM,GAAQ,OAAO,OAAO,SAAS,cAAc,GAAO,GAG1D,SAAS,QAAQ,GAAS,CACxB,AAAI,MAAO,IAAU,SACnB,EAAM,YAAY,SAAS,eAAe,IACrC,AAAI,MAAM,QAAQ,GACvB,EAAM,QAAQ,GAAK,EAAM,YAAY,IAC5B,YAAiB,cAC1B,EAAM,YAAY,KAIf,EAGT,YAAoB,CAClB,MAAO,IAAI,SAAQ,CAAC,EAAS,IAAW,CApD5C,wBAqDM,GAAI,GAAsF,GACtF,EAA0B,GAE9B,GAAI,CAAC,GAAe,CAAC,EACnB,MAAO,GAAO,2BAEhB,GAAI,YAAmB,cAAe,CAAC,qBAAS,UAAT,cAAkB,SACvD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B,GAAI,CACF,KAAM,KACN,KAAM,KACF,SAAS,MACX,IAEF,UACO,EAAP,CACA,AAAI,YAAa,OACf,QAAQ,MAAM,EAAE,SAEhB,QAAQ,MAAM",
+ "names": []
+}
diff --git a/static/frontend/about/index.ts b/static/frontend/about/index.ts
new file mode 100644
index 0000000..cccc8f0
--- /dev/null
+++ b/static/frontend/about/index.ts
@@ -0,0 +1,224 @@
+/**
+ * Left Navigation.
+ */
+export const initJumpLinks = async function () {
+ const pagesWithJumpLinks = ['/about'];
+ if (!pagesWithJumpLinks.includes(window.location.pathname)) {
+ // stop the file from doing anything else if the page doesn't have jumplinks
+ return;
+ }
+
+ // these might be generated or not so don't grab references to the elements until actually need them.
+ const titles = 'h2, h3, h4';
+ const nav = '.LeftNav a';
+ // these are always in the dom so we can get them now and throw errors if they're not.
+ const leftNav = document.querySelector('.LeftNav');
+ const siteContent = document.querySelector('.go-Content');
+ let isObserverDisabled = false;
+
+ /**
+ * El function
+ * @example el('h1', {className: 'title'}, 'Welcome to the site');
+ * @example el('ul', {className: 'list'}, el('li', {}, 'Item one'), el('li', {}, 'Item two'), el('li', {}, 'Item three'));
+ * @example el('img', {src: '/url.svg'});
+ */
+ function el(
+ type = '',
+ props: { [key: string]: string } = {},
+ ...children: (HTMLElement | HTMLElement[] | string | undefined)[]
+ ) {
+ // Error, no type declared.
+ if (!type) {
+ throw new Error('Provide `type` to create document element.');
+ }
+
+ // Create element with optional attribute props
+ const docEl = Object.assign(document.createElement(type), props);
+
+ // Children: array containing strings or elements
+ children.forEach(child => {
+ if (typeof child === 'string') {
+ docEl.appendChild(document.createTextNode(child));
+ } else if (Array.isArray(child)) {
+ child.forEach(c => docEl.appendChild(c));
+ } else if (child instanceof HTMLElement) {
+ docEl.appendChild(child);
+ }
+ });
+
+ return docEl;
+ }
+ /** Build Nav if data hydrate is present. */
+ function buildNav() {
+ return new Promise((resolve, reject) => {
+ let navItems: { id: string; label: string; subnav?: { id: string; label: string }[] }[] = [];
+ let elements: HTMLElement[] = [];
+
+ if (!siteContent || !leftNav) {
+ return reject('.SiteContent not found.');
+ }
+ if (leftNav instanceof HTMLElement && !leftNav?.dataset?.hydrate) {
+ return resolve(true);
+ }
+
+ for (const title of siteContent.querySelectorAll(titles)) {
+ if (title instanceof HTMLElement && !title?.dataset?.ignore) {
+ switch (title.tagName) {
+ case 'H2':
+ navItems = [
+ ...navItems,
+ {
+ id: title.id,
+ label: title?.dataset?.title ? title.dataset.title : title.textContent ?? '',
+ },
+ ];
+ break;
+
+ case 'H3':
+ case 'H4':
+ if (!navItems[navItems.length - 1]?.subnav) {
+ navItems[navItems.length - 1].subnav = [
+ {
+ id: title.id,
+ label: title?.dataset?.title ? title.dataset.title : title.textContent ?? '',
+ },
+ ];
+ } else if (navItems[navItems.length - 1].subnav) {
+ navItems[navItems.length - 1].subnav?.push({
+ id: title.id,
+ label: title?.dataset?.title ? title.dataset.title : title.textContent ?? '',
+ });
+ }
+ break;
+ }
+ }
+ }
+
+ for (const navItem of navItems) {
+ const link = el('a', { href: '#' + navItem.id }, el('span', {}, navItem.label));
+ elements = [...elements, link];
+ if (navItem?.subnav) {
+ let subLinks: HTMLElement[] = [];
+ for (const subnavItem of navItem.subnav) {
+ const subItem = el(
+ 'li',
+ {},
+ el(
+ 'a',
+ { href: '#' + subnavItem.id },
+ el('img', { src: '/static/frontend/about/dot.svg', width: '5', height: '5' }),
+ el('span', {}, subnavItem.label)
+ )
+ );
+ subLinks = [...subLinks, subItem];
+ }
+ const list = el('ul', { className: 'LeftSubnav' }, subLinks);
+ elements = [...elements, list];
+ }
+ }
+
+ elements.forEach(element => leftNav.appendChild(element));
+
+ return resolve(true);
+ });
+ }
+ /**
+ * Set the correct active element.
+ */
+ function setNav() {
+ return new Promise(resolve => {
+ if (!document.querySelectorAll(nav)) return resolve(true);
+ for (const a of document.querySelectorAll(nav)) {
+ if (a instanceof HTMLAnchorElement && a.href === location.href) {
+ setElementActive(a);
+ break;
+ }
+ }
+ resolve(true);
+ });
+ }
+ /** resetNav: removes all .active from nav elements */
+ function resetNav() {
+ return new Promise(resolve => {
+ if (!document.querySelectorAll(nav)) return resolve(true);
+ for (const a of document.querySelectorAll(nav)) {
+ a.classList.remove('active');
+ }
+ resolve(true);
+ });
+ }
+ /** setElementActive: controls resetting nav and highlighting the appropriate nav items */
+ function setElementActive(element: HTMLAnchorElement) {
+ if (element instanceof HTMLAnchorElement) {
+ resetNav().then(() => {
+ element.classList.add('active');
+ const parent = element?.parentNode?.parentNode;
+ if (parent instanceof HTMLElement && parent?.classList?.contains('LeftSubnav')) {
+ parent.previousElementSibling?.classList.add('active');
+ }
+ });
+ }
+ }
+ /** setLinkManually: disables observer and selects the clicked nav item. */
+ function setLinkManually() {
+ delayObserver();
+ const link = document.querySelector('[href="' + location.hash + '"]');
+ if (link instanceof HTMLAnchorElement) {
+ setElementActive(link);
+ }
+ }
+ /** delayObserver: Quick on off switch for intersection observer. */
+ function delayObserver() {
+ isObserverDisabled = true;
+ setTimeout(() => {
+ isObserverDisabled = false;
+ }, 200);
+ }
+ /** observeSections: kicks off observation of titles as well as manual clicks with hashchange */
+ function observeSections() {
+ window.addEventListener('hashchange', setLinkManually);
+
+ if (siteContent?.querySelectorAll(titles)) {
+ const callback: IntersectionObserverCallback = entries => {
+ if (!isObserverDisabled && Array.isArray(entries) && entries.length > 0) {
+ for (const entry of entries) {
+ if (entry.isIntersecting && entry.target instanceof HTMLElement) {
+ const { id } = entry.target;
+ const link = document.querySelector('[href="#' + id + '"]');
+ if (link instanceof HTMLAnchorElement) {
+ setElementActive(link);
+ }
+ break;
+ }
+ }
+ }
+ };
+ // rootMargin is important when multiple sections are in the observable area **on page load**.
+ // they will still be highlighted on scroll because of the root margin.
+ const ob = new IntersectionObserver(callback, {
+ threshold: 0,
+ rootMargin: '0px 0px -50% 0px',
+ });
+ for (const title of siteContent.querySelectorAll(titles)) {
+ if (title instanceof HTMLElement && !title?.dataset?.ignore) {
+ ob.observe(title);
+ }
+ }
+ }
+ }
+
+ try {
+ await buildNav();
+ await setNav();
+ if (location.hash) {
+ delayObserver();
+ }
+ observeSections();
+ } catch (e) {
+ if (e instanceof Error) {
+ console.error(e.message);
+ } else {
+ console.error(e);
+ }
+ }
+};
diff --git a/static/frontend/frontend.js b/static/frontend/frontend.js
index 31cd64e..f346cd6 100644
--- a/static/frontend/frontend.js
+++ b/static/frontend/frontend.js
@@ -1,4 +1,4 @@
-function N(){let t=document.querySelector(".js-header");document.querySelectorAll(".js-desktop-menu-hover").forEach(a=>{a.addEventListener("mouseenter",c=>{let m=c.target,s=document.querySelector(".forced-open");s&&s!==a&&(s.blur(),s.classList.remove("forced-open")),m.focus(),m.blur()});let r=c=>{var u,v;let m=c.target,s=m==null?void 0:m.classList.contains("forced-open"),o=c.currentTarget;s?(o.removeEventListener("blur",()=>o.classList.remove("forced-open")),o.classList.remove("forced-open"),o.classList.add("forced-closed"),o.blur(),(u=o==null?void 0:o.parentNode)==null||u.addEventListener("mouseout",()=>{o.classList.remove("forced-closed")})):(o.classList.remove("forced-closed"),o.classList.add("forced-open"),o.focus(),o.addEventListener("blur",()=>o.classList.remove("forced-open")),(v=o==null?void 0:o.parentNode)==null||v.removeEventListener("mouseout",()=>{o.classList.remove("forced-closed")}))};a.addEventListener("click",r)}),document.querySelectorAll(".Header-menuItem").forEach(a=>{a.addEventListener("keyup",r=>{var m;let c=r;c.key==="Escape"&&((m=c.target)==null||m.blur())})});let i=document.querySelectorAll(".js-headerMenuButton");i.forEach(a=>{a.addEventListener("click",r=>{r.preventDefault();let c=t==null?void 0:t.classList.contains("is-active");c?h(t):y(t),a.setAttribute("aria-expanded",c?"true":"false")})});let l=document.querySelector(".js-scrim");l==null||l.addEventListener("click",a=>{a.preventDefault(),document.querySelectorAll(".go-NavigationDrawer-submenuItem.is-active").forEach(c=>h(c)),h(t),i.forEach(c=>{c.setAttribute("aria-expanded",t!=null&&t.classList.contains("is-active")?"true":"false")})});let d=a=>{if(!a)return[];let r=Array.from(a.querySelectorAll(":scope > .go-NavigationDrawer-nav > .go-NavigationDrawer-list > .go-NavigationDrawer-listItem > a, :scope > .go-NavigationDrawer-nav > .go-NavigationDrawer-list > .go-NavigationDrawer-listItem > .go-Header-socialIcons > a")||[]),c=a.querySelector(".go-NavigationDrawer-header > a");return c&&r.unshift(c),r},g=a=>{if(!!a)return a.classList.contains("go-NavigationDrawer-submenuItem")},h=a=>{var m,s;if(!a)return;let r=d(a);a.classList.remove("is-active");let c=(m=a.closest(".go-NavigationDrawer-listItem"))==null?void 0:m.querySelector(":scope > a");c==null||c.focus(),r==null||r.forEach(o=>o==null?void 0:o.setAttribute("tabindex","-1")),r&&r[0]&&(r[0].removeEventListener("keydown",p(a)),r[r.length-1].removeEventListener("keydown",L(a))),a===t&&i&&((s=i[0])==null||s.focus())},y=a=>{let r=d(a);a.classList.add("is-active"),r.forEach(c=>c.setAttribute("tabindex","0")),r[0].focus(),r[0].addEventListener("keydown",p(a)),r[r.length-1].addEventListener("keydown",L(a))},p=a=>r=>{r.key==="Tab"&&r.shiftKey&&(r.preventDefault(),h(a))},L=a=>r=>{r.key==="Tab"&&!r.shiftKey&&(r.preventDefault(),h(a))},T=a=>{var m;let r=g(a),c=d(a);a.addEventListener("keyup",s=>{s.key==="Escape"&&h(a)}),c.forEach(s=>{let o=s.closest("li");if(o&&o.classList.contains("js-mobile-subnav-trigger")){let u=o.querySelector(".go-NavigationDrawer-submenuItem");s.addEventListener("click",()=>{y(u)})}}),r&&(h(a),(m=a==null?void 0:a.querySelector(".go-NavigationDrawer-header"))==null||m.addEventListener("click",s=>{s.preventDefault(),h(a)}))};document.querySelectorAll(".go-NavigationDrawer").forEach(a=>T(a)),h(t)}function R(){let t=document.querySelector(".js-searchForm"),e=document.querySelector(".js-expandSearch"),n=t==null?void 0:t.querySelector("input"),i=document.querySelector(".js-headerLogo"),l=document.querySelector(".js-headerMenuButton");e==null||e.addEventListener("click",()=>{t==null||t.classList.add("go-SearchForm--expanded"),i==null||i.classList.add("go-Header-logo--hidden"),l==null||l.classList.add("go-Header-navOpen--hidden"),n==null||n.focus()}),document==null||document.addEventListener("click",d=>{t!=null&&t.contains(d.target)||(t==null||t.classList.remove("go-SearchForm--expanded"),i==null||i.classList.remove("go-Header-logo--hidden"),l==null||l.classList.remove("go-Header-navOpen--hidden"))})}var S=class{constructor(e){this.el=e;this.setActive=e=>{this.activeIndex=(e+this.slides.length)%this.slides.length,this.el.setAttribute("data-slide-index",String(this.activeIndex));for(let n of this.dots)n.classList.remove("go-Carousel-dot--active");this.dots[this.activeIndex].classList.add("go-Carousel-dot--active");for(let n of this.slides)n.setAttribute("aria-hidden","true");this.slides[this.activeIndex].removeAttribute("aria-hidden"),this.liveRegion.textContent="Slide "+(this.activeIndex+1)+" of "+this.slides.length};var n;this.slides=Array.from(e.querySelectorAll(".go-Carousel-slide")),this.dots=[],this.liveRegion=document.createElement("div"),this.activeIndex=Number((n=e.getAttribute("data-slide-index"))!=null?n:0),this.initSlides(),this.initArrows(),this.initDots(),this.initLiveRegion()}initSlides(){for(let[e,n]of this.slides.entries())e!==this.activeIndex&&n.setAttribute("aria-hidden","true")}initArrows(){var n,i;let e=document.createElement("ul");e.classList.add("go-Carousel-arrows"),e.innerHTML=`
+function K(){let n=document.querySelector(".js-header");document.querySelectorAll(".js-desktop-menu-hover").forEach(c=>{c.addEventListener("mouseenter",a=>{let u=a.target,s=document.querySelector(".forced-open");s&&s!==c&&(s.blur(),s.classList.remove("forced-open")),u.focus(),u.blur()});let r=a=>{var d,h;let u=a.target,s=u==null?void 0:u.classList.contains("forced-open"),t=a.currentTarget;s?(t.removeEventListener("blur",()=>t.classList.remove("forced-open")),t.classList.remove("forced-open"),t.classList.add("forced-closed"),t.blur(),(d=t==null?void 0:t.parentNode)==null||d.addEventListener("mouseout",()=>{t.classList.remove("forced-closed")})):(t.classList.remove("forced-closed"),t.classList.add("forced-open"),t.focus(),t.addEventListener("blur",()=>t.classList.remove("forced-open")),(h=t==null?void 0:t.parentNode)==null||h.removeEventListener("mouseout",()=>{t.classList.remove("forced-closed")}))};c.addEventListener("click",r)}),document.querySelectorAll(".Header-menuItem").forEach(c=>{c.addEventListener("keyup",r=>{var u;let a=r;a.key==="Escape"&&((u=a.target)==null||u.blur())})});let i=document.querySelectorAll(".js-headerMenuButton");i.forEach(c=>{c.addEventListener("click",r=>{r.preventDefault();let a=n==null?void 0:n.classList.contains("is-active");a?g(n):M(n),c.setAttribute("aria-expanded",a?"true":"false")})});let l=document.querySelector(".js-scrim");l==null||l.addEventListener("click",c=>{c.preventDefault(),document.querySelectorAll(".go-NavigationDrawer-submenuItem.is-active").forEach(a=>g(a)),g(n),i.forEach(a=>{a.setAttribute("aria-expanded",(n==null?void 0:n.classList.contains("is-active"))?"true":"false")})});let m=c=>{if(!c)return[];let r=Array.from(c.querySelectorAll(":scope > .go-NavigationDrawer-nav > .go-NavigationDrawer-list > .go-NavigationDrawer-listItem > a, :scope > .go-NavigationDrawer-nav > .go-NavigationDrawer-list > .go-NavigationDrawer-listItem > .go-Header-socialIcons > a")||[]),a=c.querySelector(".go-NavigationDrawer-header > a");return a&&r.unshift(a),r},p=c=>{if(!!c)return c.classList.contains("go-NavigationDrawer-submenuItem")},g=c=>{var u,s;if(!c)return;let r=m(c);c.classList.remove("is-active");let a=(u=c.closest(".go-NavigationDrawer-listItem"))==null?void 0:u.querySelector(":scope > a");a==null||a.focus(),r==null||r.forEach(t=>t==null?void 0:t.setAttribute("tabindex","-1")),r&&r[0]&&(r[0].removeEventListener("keydown",L(c)),r[r.length-1].removeEventListener("keydown",b(c))),c===n&&i&&((s=i[0])==null||s.focus())},M=c=>{let r=m(c);c.classList.add("is-active"),r.forEach(a=>a.setAttribute("tabindex","0")),r[0].focus(),r[0].addEventListener("keydown",L(c)),r[r.length-1].addEventListener("keydown",b(c))},L=c=>r=>{r.key==="Tab"&&r.shiftKey&&(r.preventDefault(),g(c))},b=c=>r=>{r.key==="Tab"&&!r.shiftKey&&(r.preventDefault(),g(c))},w=c=>{var u;let r=p(c),a=m(c);c.addEventListener("keyup",s=>{s.key==="Escape"&&g(c)}),a.forEach(s=>{let t=s.closest("li");if(t&&t.classList.contains("js-mobile-subnav-trigger")){let d=t.querySelector(".go-NavigationDrawer-submenuItem");s.addEventListener("click",()=>{M(d)})}}),r&&(g(c),(u=c==null?void 0:c.querySelector(".go-NavigationDrawer-header"))==null||u.addEventListener("click",s=>{s.preventDefault(),g(c)}))};document.querySelectorAll(".go-NavigationDrawer").forEach(c=>w(c)),g(n)}function P(){let n=document.querySelector(".js-searchForm"),e=document.querySelector(".js-expandSearch"),o=n==null?void 0:n.querySelector("input"),i=document.querySelector(".js-headerLogo"),l=document.querySelector(".js-headerMenuButton");e==null||e.addEventListener("click",()=>{n==null||n.classList.add("go-SearchForm--expanded"),i==null||i.classList.add("go-Header-logo--hidden"),l==null||l.classList.add("go-Header-navOpen--hidden"),o==null||o.focus()}),document==null||document.addEventListener("click",m=>{(n==null?void 0:n.contains(m.target))||(n==null||n.classList.remove("go-SearchForm--expanded"),i==null||i.classList.remove("go-Header-logo--hidden"),l==null||l.classList.remove("go-Header-navOpen--hidden"))})}var x=class{constructor(e){this.el=e;this.setActive=e=>{this.activeIndex=(e+this.slides.length)%this.slides.length,this.el.setAttribute("data-slide-index",String(this.activeIndex));for(let o of this.dots)o.classList.remove("go-Carousel-dot--active");this.dots[this.activeIndex].classList.add("go-Carousel-dot--active");for(let o of this.slides)o.setAttribute("aria-hidden","true");this.slides[this.activeIndex].removeAttribute("aria-hidden"),this.liveRegion.textContent="Slide "+(this.activeIndex+1)+" of "+this.slides.length};var o;this.slides=Array.from(e.querySelectorAll(".go-Carousel-slide")),this.dots=[],this.liveRegion=document.createElement("div"),this.activeIndex=Number((o=e.getAttribute("data-slide-index"))!=null?o:0),this.initSlides(),this.initArrows(),this.initDots(),this.initLiveRegion()}initSlides(){for(let[e,o]of this.slides.entries())e!==this.activeIndex&&o.setAttribute("aria-hidden","true")}initArrows(){var o,i;let e=document.createElement("ul");e.classList.add("go-Carousel-arrows"),e.innerHTML=`
<li>
<button class="go-Carousel-prevSlide" aria-label="Go to previous slide">
<img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_left_gm_grey_24dp.svg" alt="">
@@ -9,7 +9,7 @@
<img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_right_gm_grey_24dp.svg" alt="">
</button>
</li>
- `,(n=e.querySelector(".go-Carousel-prevSlide"))==null||n.addEventListener("click",()=>this.setActive(this.activeIndex-1)),(i=e.querySelector(".go-Carousel-nextSlide"))==null||i.addEventListener("click",()=>this.setActive(this.activeIndex+1)),this.el.append(e)}initDots(){let e=document.createElement("ul");e.classList.add("go-Carousel-dots");for(let n=0;n<this.slides.length;n++){let i=document.createElement("li"),l=document.createElement("button");l.classList.add("go-Carousel-dot"),n===this.activeIndex&&l.classList.add("go-Carousel-dot--active"),l.innerHTML=`<span class="go-Carousel-obscured">Slide ${n+1}</span>`,l.addEventListener("click",()=>this.setActive(n)),i.append(l),e.append(i),this.dots.push(l)}this.el.append(e)}initLiveRegion(){this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("aria-atomic","true"),this.liveRegion.setAttribute("class","go-Carousel-obscured"),this.liveRegion.textContent=`Slide ${this.activeIndex+1} of ${this.slides.length}`,this.el.appendChild(this.liveRegion)}};var H=class{constructor(e){this.el=e;var n,i,l,d,g;this.data=(n=e.dataset.toCopy)!=null?n:e.innerText,!this.data&&((i=e.parentElement)==null?void 0:i.classList.contains("go-InputGroup"))&&(this.data=(g=this.data||((d=(l=e.parentElement)==null?void 0:l.querySelector("input"))==null?void 0:d.value))!=null?g:""),e.addEventListener("click",h=>this.handleCopyClick(h))}handleCopyClick(e){e.preventDefault();let n=1e3;if(!navigator.clipboard){this.showTooltipText("Unable to copy",n);return}navigator.clipboard.writeText(this.data).then(()=>{this.showTooltipText("Copied!",n)}).catch(()=>{this.showTooltipText("Unable to copy",n)})}showTooltipText(e,n){this.el.setAttribute("data-tooltip",e),setTimeout(()=>this.el.setAttribute("data-tooltip",""),n)}};var k=class{constructor(e){this.el=e;document.addEventListener("click",n=>{this.el.contains(n.target)||this.el.removeAttribute("open")})}};var A=class{constructor(e){this.el=e;this.el.addEventListener("change",n=>{let i=n.target,l=i.value;i.value.startsWith("/")||(l="/"+l),window.location.href=l})}};var x=class{constructor(e){this.el=e;window.dialogPolyfill&&window.dialogPolyfill.registerDialog(e),this.init()}init(){let e=document.querySelector(`[aria-controls="${this.el.id}"]`);e&&e.addEventListener("click",()=>{var n;this.el.showModal?this.el.showModal():this.el.setAttribute("opened","true"),(n=this.el.querySelector("input"))==null||n.focus()});for(let n of this.el.querySelectorAll("[data-modal-close]"))n.addEventListener("click",()=>{this.el.close?this.el.close():this.el.removeAttribute("opened")})}};function C(t,e,n,i){var l;(l=window.dataLayer)!=null||(window.dataLayer=[]),typeof t=="string"?window.dataLayer.push({event:t,event_category:e,event_action:n,event_label:i}):window.dataLayer.push(t)}function _(t){var e;(e=window.dataLayer)!=null||(window.dataLayer=[]),window.dataLayer.push(t)}var q=class{constructor(){this.handlers={},document.addEventListener("keydown",e=>this.handleKeyPress(e))}on(e,n,i,l){var d,g;return(g=(d=this.handlers)[e])!=null||(d[e]=new Set),this.handlers[e].add({description:n,callback:i,...l}),this}handleKeyPress(e){var n;for(let i of(n=this.handlers[e.key.toLowerCase()])!=null?n:new Set){if(i.target&&i.target!==e.target)return;let l=e.target;if(!i.target&&((l==null?void 0:l.tagName)==="INPUT"||(l==null?void 0:l.tagName)==="SELECT"||(l==null?void 0:l.tagName)==="TEXTAREA")||l!=null&&l.isContentEditable||i.withMeta&&!(e.ctrlKey||e.metaKey)||!i.withMeta&&(e.ctrlKey||e.metaKey))return;C("keypress","hotkeys",`${e.key} pressed`,i.description),i.callback(e)}}},M=new q;function O(){var m;let t=document.querySelector(".JumpDialog"),e=t==null?void 0:t.querySelector(".JumpDialog-body"),n=t==null?void 0:t.querySelector(".JumpDialog-list"),i=t==null?void 0:t.querySelector(".JumpDialog-input"),l=document.querySelector(".js-documentation"),d;function g(){let s=[];if(!!l){for(let o of l.querySelectorAll("[data-kind]"))s.push(h(o));for(let o of s)o.link.addEventListener("click",function(){t==null||t.close()});return s.sort(function(o,u){return o.lower.localeCompare(u.lower)}),s}}function h(s){var w;let o=document.createElement("a"),u=s.getAttribute("id");o.setAttribute("href","#"+u),o.setAttribute("tabindex","-1"),o.setAttribute("data-gtmc","jump to link");let v=s.getAttribute("data-kind");return{link:o,name:u!=null?u:"",kind:v!=null?v:"",lower:(w=u==null?void 0:u.toLowerCase())!=null?w:""}}let y,p=-1;function L(s){for(y=s,d||(d=g()),T(-1);n!=null&&n.firstChild;)n.firstChild.remove();if(s){let o=s.toLowerCase(),u=[],v=[],w=[],I=(f,E,b)=>f.name.substring(0,E)+"<b>"+f.name.substring(E,b)+"</b>"+f.name.substring(b);for(let f of d!=null?d:[]){let E=f.name.toLowerCase();if(E===o)f.link.innerHTML=I(f,0,f.name.length),u.push(f);else if(E.startsWith(o))f.link.innerHTML=I(f,0,s.length),v.push(f);else{let b=E.indexOf(o);b>-1&&(f.link.innerHTML=I(f,b,b+s.length),w.push(f))}}for(let f of u.concat(v).concat(w))n==null||n.appendChild(f.link)}else{if(!d||d.length===0){let o=document.createElement("i");o.innerHTML="There are no symbols on this page.",n==null||n.appendChild(o)}for(let o of d!=null?d:[])o.link.innerHTML=o.name+" <i>"+o.kind+"</i>",n==null||n.appendChild(o.link)}e&&(e.scrollTop=0),(d==null?void 0:d.length)&&n&&n.children.length>0&&T(0)}function T(s){let o=n==null?void 0:n.children;if(!(!o||!e)){if(p>=0&&o[p].classList.remove("JumpDialog-active"),s>=o.length&&(s=o.length-1),s>=0){o[s].classList.add("JumpDialog-active");let u=o[s].offsetTop-o[0].offsetTop,v=u+o[s].clientHeight;u<e.scrollTop?e.scrollTop=u:v>e.scrollTop+e.clientHeight&&(e.scrollTop=v-e.clientHeight)}p=s}}function a(s){if(p<0)return;let o=p+s;o<0&&(o=0),T(o)}i==null||i.addEventListener("keyup",function(){i.value.toUpperCase()!=y.toUpperCase()&&L(i.value)}),i==null||i.addEventListener("keydown",function(s){switch(s.which){case 38:a(-1),s.preventDefault();break;case 40:a(1),s.preventDefault();break;case 13:p>=0&&n&&(n.children[p].click(),s.preventDefault());break}});let r=document.querySelector(".ShortcutsDialog");M.on("f","open jump to modal",s=>{var o;(t==null?void 0:t.open)||(r==null?void 0:r.open)||(s.preventDefault(),i&&(i.value=""),(o=t==null?void 0:t.showModal)==null||o.call(t),i==null||i.focus(),L(""))}).on("?","open shortcuts modal",()=>{var s;(t==null?void 0:t.open)||(r==null?void 0:r.open)||(s=r==null?void 0:r.showModal)==null||s.call(r)});let c=document.querySelector(".js-jumpToInput");c&&c.addEventListener("click",()=>{var s;i&&(i.value=""),L(""),!((t==null?void 0:t.open)||(r==null?void 0:r.open))&&((s=t==null?void 0:t.showModal)==null||s.call(t),i==null||i.focus())}),(m=document.querySelector(".js-openShortcuts"))==null||m.addEventListener("click",()=>{var s;(s=r==null?void 0:r.showModal)==null||s.call(r)})}window.addEventListener("load",()=>{var t;for(let e of document.querySelectorAll(".js-clipboard"))new H(e);for(let e of document.querySelectorAll(".js-modal"))new x(e);for(let e of document.querySelectorAll(".js-tooltip"))new k(e);for(let e of document.querySelectorAll(".js-selectNav"))new A(e);for(let e of document.querySelectorAll(".js-carousel"))new S(e);for(let e of document.querySelectorAll(".js-toggleTheme"))e.addEventListener("click",()=>{U()});((t=document.querySelector(".js-gtmID"))==null?void 0:t.dataset.gtmid)&&window.dataLayer?_(function(){K()}):K(),N(),R(),O()});M.on("/","focus search",t=>{let e=Array.from(document.querySelectorAll(".js-searchFocus")).pop();e&&!window.navigator.userAgent.includes("Firefox")&&(t.preventDefault(),e.focus())});M.on("y","set canonical url",()=>{var e;let t=(e=document.querySelector(".js-canonicalURLPath"))==null?void 0:e.dataset.canonicalUrlPath;if(t&&t!==""){let n=window.location.hash;n&&(t+=n),window.history.replaceState(null,"",t)}});(function(){C({"gtm.start":new Date().getTime(),event:"gtm.js"})})();function K(){let t=new URLSearchParams(window.location.search),e=t.get("utm_source");if(e!=="gopls"&&e!=="godoc"&&e!=="pkggodev")return;let n=new URL(window.location.href);t.delete("utm_source"),n.search=t.toString(),window.history.replaceState(null,"",n.toString())}function U(){let t="dark",e=document.documentElement.getAttribute("data-theme");e==="dark"?t="light":e==="light"&&(t="auto");let n="";location.hostname.endsWith("go.dev")&&(n="domain=.go.dev;"),document.documentElement.setAttribute("data-theme",t),document.cookie=`prefers-color-scheme=${t};${n}path=/;max-age=31536000;`}
+ `,(o=e.querySelector(".go-Carousel-prevSlide"))==null||o.addEventListener("click",()=>this.setActive(this.activeIndex-1)),(i=e.querySelector(".go-Carousel-nextSlide"))==null||i.addEventListener("click",()=>this.setActive(this.activeIndex+1)),this.el.append(e)}initDots(){let e=document.createElement("ul");e.classList.add("go-Carousel-dots");for(let o=0;o<this.slides.length;o++){let i=document.createElement("li"),l=document.createElement("button");l.classList.add("go-Carousel-dot"),o===this.activeIndex&&l.classList.add("go-Carousel-dot--active"),l.innerHTML=`<span class="go-Carousel-obscured">Slide ${o+1}</span>`,l.addEventListener("click",()=>this.setActive(o)),i.append(l),e.append(i),this.dots.push(l)}this.el.append(e)}initLiveRegion(){this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("aria-atomic","true"),this.liveRegion.setAttribute("class","go-Carousel-obscured"),this.liveRegion.textContent=`Slide ${this.activeIndex+1} of ${this.slides.length}`,this.el.appendChild(this.liveRegion)}};var C=class{constructor(e){this.el=e;var o,i,l,m,p;this.data=(o=e.dataset.toCopy)!=null?o:e.innerText,!this.data&&((i=e.parentElement)==null?void 0:i.classList.contains("go-InputGroup"))&&(this.data=(p=this.data||((m=(l=e.parentElement)==null?void 0:l.querySelector("input"))==null?void 0:m.value))!=null?p:""),e.addEventListener("click",g=>this.handleCopyClick(g))}handleCopyClick(e){e.preventDefault();let o=1e3;if(!navigator.clipboard){this.showTooltipText("Unable to copy",o);return}navigator.clipboard.writeText(this.data).then(()=>{this.showTooltipText("Copied!",o)}).catch(()=>{this.showTooltipText("Unable to copy",o)})}showTooltipText(e,o){this.el.setAttribute("data-tooltip",e),setTimeout(()=>this.el.setAttribute("data-tooltip",""),o)}};var q=class{constructor(e){this.el=e;document.addEventListener("click",o=>{this.el.contains(o.target)||this.el.removeAttribute("open")})}};var I=class{constructor(e){this.el=e;this.el.addEventListener("change",o=>{let i=o.target,l=i.value;i.value.startsWith("/")||(l="/"+l),window.location.href=l})}};var N=class{constructor(e){this.el=e;window.dialogPolyfill&&window.dialogPolyfill.registerDialog(e),this.init()}init(){let e=document.querySelector(`[aria-controls="${this.el.id}"]`);e&&e.addEventListener("click",()=>{var o;this.el.showModal?this.el.showModal():this.el.setAttribute("opened","true"),(o=this.el.querySelector("input"))==null||o.focus()});for(let o of this.el.querySelectorAll("[data-modal-close]"))o.addEventListener("click",()=>{this.el.close?this.el.close():this.el.removeAttribute("opened")})}};function k(n,e,o,i){var l;(l=window.dataLayer)!=null||(window.dataLayer=[]),typeof n=="string"?window.dataLayer.push({event:n,event_category:e,event_action:o,event_label:i}):window.dataLayer.push(n)}function U(n){var e;(e=window.dataLayer)!=null||(window.dataLayer=[]),window.dataLayer.push(n)}var W=class{constructor(){this.handlers={},document.addEventListener("keydown",e=>this.handleKeyPress(e))}on(e,o,i,l){var m,p;return(p=(m=this.handlers)[e])!=null||(m[e]=new Set),this.handlers[e].add({description:o,callback:i,...l}),this}handleKeyPress(e){var o;for(let i of(o=this.handlers[e.key.toLowerCase()])!=null?o:new Set){if(i.target&&i.target!==e.target)return;let l=e.target;if(!i.target&&((l==null?void 0:l.tagName)==="INPUT"||(l==null?void 0:l.tagName)==="SELECT"||(l==null?void 0:l.tagName)==="TEXTAREA")||(l==null?void 0:l.isContentEditable)||i.withMeta&&!(e.ctrlKey||e.metaKey)||!i.withMeta&&(e.ctrlKey||e.metaKey))return;k("keypress","hotkeys",`${e.key} pressed`,i.description),i.callback(e)}}},H=new W;function $(){var u;let n=document.querySelector(".JumpDialog"),e=n==null?void 0:n.querySelector(".JumpDialog-body"),o=n==null?void 0:n.querySelector(".JumpDialog-list"),i=n==null?void 0:n.querySelector(".JumpDialog-input"),l=document.querySelector(".js-documentation"),m;function p(){let s=[];if(!!l){for(let t of l.querySelectorAll("[data-kind]"))s.push(g(t));for(let t of s)t.link.addEventListener("click",function(){n==null||n.close()});return s.sort(function(t,d){return t.lower.localeCompare(d.lower)}),s}}function g(s){var E;let t=document.createElement("a"),d=s.getAttribute("id");t.setAttribute("href","#"+d),t.setAttribute("tabindex","-1"),t.setAttribute("data-gtmc","jump to link");let h=s.getAttribute("data-kind");return{link:t,name:d!=null?d:"",kind:h!=null?h:"",lower:(E=d==null?void 0:d.toLowerCase())!=null?E:""}}let M,L=-1;function b(s){for(M=s,m||(m=p()),w(-1);o==null?void 0:o.firstChild;)o.firstChild.remove();if(s){let t=s.toLowerCase(),d=[],h=[],E=[],S=(v,y,T)=>v.name.substring(0,y)+"<b>"+v.name.substring(y,T)+"</b>"+v.name.substring(T);for(let v of m!=null?m:[]){let y=v.name.toLowerCase();if(y===t)v.link.innerHTML=S(v,0,v.name.length),d.push(v);else if(y.startsWith(t))v.link.innerHTML=S(v,0,s.length),h.push(v);else{let T=y.indexOf(t);T>-1&&(v.link.innerHTML=S(v,T,T+s.length),E.push(v))}}for(let v of d.concat(h).concat(E))o==null||o.appendChild(v.link)}else{if(!m||m.length===0){let t=document.createElement("i");t.innerHTML="There are no symbols on this page.",o==null||o.appendChild(t)}for(let t of m!=null?m:[])t.link.innerHTML=t.name+" <i>"+t.kind+"</i>",o==null||o.appendChild(t.link)}e&&(e.scrollTop=0),(m==null?void 0:m.length)&&o&&o.children.length>0&&w(0)}function w(s){let t=o==null?void 0:o.children;if(!(!t||!e)){if(L>=0&&t[L].classList.remove("JumpDialog-active"),s>=t.length&&(s=t.length-1),s>=0){t[s].classList.add("JumpDialog-active");let d=t[s].offsetTop-t[0].offsetTop,h=d+t[s].clientHeight;d<e.scrollTop?e.scrollTop=d:h>e.scrollTop+e.clientHeight&&(e.scrollTop=h-e.clientHeight)}L=s}}function c(s){if(L<0)return;let t=L+s;t<0&&(t=0),w(t)}i==null||i.addEventListener("keyup",function(){i.value.toUpperCase()!=M.toUpperCase()&&b(i.value)}),i==null||i.addEventListener("keydown",function(s){let t=38,d=40,h=13;switch(s.which){case t:c(-1),s.preventDefault();break;case d:c(1),s.preventDefault();break;case h:L>=0&&o&&(o.children[L].click(),s.preventDefault());break}});let r=document.querySelector(".ShortcutsDialog");H.on("f","open jump to modal",s=>{var t;(n==null?void 0:n.open)||(r==null?void 0:r.open)||(s.preventDefault(),i&&(i.value=""),(t=n==null?void 0:n.showModal)==null||t.call(n),i==null||i.focus(),b(""))}).on("?","open shortcuts modal",()=>{var s;(n==null?void 0:n.open)||(r==null?void 0:r.open)||(s=r==null?void 0:r.showModal)==null||s.call(r)});let a=document.querySelector(".js-jumpToInput");a&&a.addEventListener("click",()=>{var s;i&&(i.value=""),b(""),!((n==null?void 0:n.open)||(r==null?void 0:r.open))&&((s=n==null?void 0:n.showModal)==null||s.call(n),i==null||i.focus())}),(u=document.querySelector(".js-openShortcuts"))==null||u.addEventListener("click",()=>{var s;(s=r==null?void 0:r.showModal)==null||s.call(r)})}var G=async function(){if(!["/about"].includes(window.location.pathname))return;let e="h2, h3, h4",o=".LeftNav a",i=document.querySelector(".LeftNav"),l=document.querySelector(".go-Content"),m=!1;function p(a="",u={},...s){if(!a)throw new Error("Provide `type` to create document element.");let t=Object.assign(document.createElement(a),u);return s.forEach(d=>{typeof d=="string"?t.appendChild(document.createTextNode(d)):Array.isArray(d)?d.forEach(h=>t.appendChild(h)):d instanceof HTMLElement&&t.appendChild(d)}),t}function g(){return new Promise((a,u)=>{var d,h,E,S,v,y,T,O,J,R;let s=[],t=[];if(!l||!i)return u(".SiteContent not found.");if(i instanceof HTMLElement&&!((d=i==null?void 0:i.dataset)==null?void 0:d.hydrate))return a(!0);for(let f of l.querySelectorAll(e))if(f instanceof HTMLElement&&!((h=f==null?void 0:f.dataset)==null?void 0:h.ignore))switch(f.tagName){case"H2":s=[...s,{id:f.id,label:((E=f==null?void 0:f.dataset)==null?void 0:E.title)?f.dataset.title:(S=f.textContent)!=null?S:""}];break;case"H3":case"H4":((v=s[s.length-1])==null?void 0:v.subnav)?s[s.length-1].subnav&&((R=s[s.length-1].subnav)==null||R.push({id:f.id,label:((O=f==null?void 0:f.dataset)==null?void 0:O.title)?f.dataset.title:(J=f.textContent)!=null?J:""})):s[s.length-1].subnav=[{id:f.id,label:((y=f==null?void 0:f.dataset)==null?void 0:y.title)?f.dataset.title:(T=f.textContent)!=null?T:""}];break}for(let f of s){let V=p("a",{href:"#"+f.id},p("span",{},f.label));if(t=[...t,V],f==null?void 0:f.subnav){let A=[];for(let _ of f.subnav){let z=p("li",{},p("a",{href:"#"+_.id},p("img",{src:"/static/frontend/about/dot.svg",width:"5",height:"5"}),p("span",{},_.label)));A=[...A,z]}let X=p("ul",{className:"LeftSubnav"},A);t=[...t,X]}}return t.forEach(f=>i.appendChild(f)),a(!0)})}function M(){return new Promise(a=>{if(!document.querySelectorAll(o))return a(!0);for(let u of document.querySelectorAll(o))if(u instanceof HTMLAnchorElement&&u.href===location.href){b(u);break}a(!0)})}function L(){return new Promise(a=>{if(!document.querySelectorAll(o))return a(!0);for(let u of document.querySelectorAll(o))u.classList.remove("active");a(!0)})}function b(a){a instanceof HTMLAnchorElement&&L().then(()=>{var s,t,d;a.classList.add("active");let u=(s=a==null?void 0:a.parentNode)==null?void 0:s.parentNode;u instanceof HTMLElement&&((t=u==null?void 0:u.classList)==null?void 0:t.contains("LeftSubnav"))&&((d=u.previousElementSibling)==null||d.classList.add("active"))})}function w(){c();let a=document.querySelector('[href="'+location.hash+'"]');a instanceof HTMLAnchorElement&&b(a)}function c(){m=!0,setTimeout(()=>{m=!1},200)}function r(){var a;if(window.addEventListener("hashchange",w),l==null?void 0:l.querySelectorAll(e)){let u=t=>{if(!m&&Array.isArray(t)&&t.length>0){for(let d of t)if(d.isIntersecting&&d.target instanceof HTMLElement){let{id:h}=d.target,E=document.querySelector('[href="#'+h+'"]');E instanceof HTMLAnchorElement&&b(E);break}}},s=new IntersectionObserver(u,{threshold:0,rootMargin:"0px 0px -50% 0px"});for(let t of l.querySelectorAll(e))t instanceof HTMLElement&&!((a=t==null?void 0:t.dataset)==null?void 0:a.ignore)&&s.observe(t)}}try{await g(),await M(),location.hash&&c(),r()}catch(a){a instanceof Error?console.error(a.message):console.error(a)}};window.addEventListener("load",()=>{var n;for(let e of document.querySelectorAll(".js-clipboard"))new C(e);for(let e of document.querySelectorAll(".js-modal"))new N(e);for(let e of document.querySelectorAll(".js-tooltip"))new q(e);for(let e of document.querySelectorAll(".js-selectNav"))new I(e);for(let e of document.querySelectorAll(".js-carousel"))new x(e);for(let e of document.querySelectorAll(".js-toggleTheme"))e.addEventListener("click",()=>{Y()});((n=document.querySelector(".js-gtmID"))==null?void 0:n.dataset.gtmid)&&window.dataLayer?U(function(){B()}):B(),K(),P(),$(),G()});H.on("/","focus search",n=>{let e=Array.from(document.querySelectorAll(".js-searchFocus")).pop();e&&!window.navigator.userAgent.includes("Firefox")&&(n.preventDefault(),e.focus())});H.on("y","set canonical url",()=>{var e;let n=(e=document.querySelector(".js-canonicalURLPath"))==null?void 0:e.dataset.canonicalUrlPath;if(n&&n!==""){let o=window.location.hash;o&&(n+=o),window.history.replaceState(null,"",n)}});(function(){k({"gtm.start":new Date().getTime(),event:"gtm.js"})})();function B(){let n=new URLSearchParams(window.location.search),e=n.get("utm_source");if(e!=="gopls"&&e!=="godoc"&&e!=="pkggodev")return;let o=new URL(window.location.href);n.delete("utm_source"),o.search=n.toString(),window.history.replaceState(null,"",o.toString())}function Y(){let n="dark",e=document.documentElement.getAttribute("data-theme");e==="dark"?n="light":e==="light"&&(n="auto");let o="";location.hostname.endsWith("go.dev")&&(o="domain=.go.dev;"),document.documentElement.setAttribute("data-theme",n),document.cookie=`prefers-color-scheme=${n};${o}path=/;max-age=31536000;`}
/*!
* @license
* Copyright 2019-2020 The Go Authors. All rights reserved.
diff --git a/static/frontend/frontend.js.map b/static/frontend/frontend.js.map
index e0016c1..d5135b5 100644
--- a/static/frontend/frontend.js.map
+++ b/static/frontend/frontend.js.map
@@ -1,7 +1,7 @@
{
"version": 3,
- "sources": ["../shared/header/header.ts", "../shared/carousel/carousel.ts", "../shared/clipboard/clipboard.ts", "../shared/tooltip/tooltip.ts", "../shared/outline/select.ts", "../shared/modal/modal.ts", "../shared/analytics/analytics.ts", "../shared/keyboard/keyboard.ts", "../shared/jump/jump.ts", "frontend.ts"],
- "sourcesContent": ["/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nexport function registerHeaderListeners(): void {\n const header = document.querySelector('.js-header') as HTMLElement;\n\n // Desktop menu hover state\n const menuItemHovers = document.querySelectorAll('.js-desktop-menu-hover');\n menuItemHovers.forEach(menuItemHover => {\n // when user clicks on the dropdown menu item on desktop or mobile,\n // force the menu to stay open until the user clicks off of it.\n menuItemHover.addEventListener('mouseenter', e => {\n const target = e.target as HTMLElement;\n const forced = document.querySelector('.forced-open') as HTMLElement;\n if (forced && forced !== menuItemHover) {\n forced.blur();\n forced.classList.remove('forced-open');\n }\n // prevents menus that have been tabbed into from staying open\n // when you hover over another menu\n target.focus();\n target.blur();\n });\n\n const toggleForcedOpen = (e: Event) => {\n const target = e.target as HTMLElement;\n const isForced = target?.classList.contains('forced-open');\n const currentTarget = e.currentTarget as HTMLElement;\n if (isForced) {\n currentTarget.removeEventListener('blur', () =>\n currentTarget.classList.remove('forced-open')\n );\n currentTarget.classList.remove('forced-open');\n currentTarget.classList.add('forced-closed');\n currentTarget.blur();\n currentTarget?.parentNode?.addEventListener('mouseout', () => {\n currentTarget.classList.remove('forced-closed');\n });\n } else {\n currentTarget.classList.remove('forced-closed');\n currentTarget.classList.add('forced-open');\n currentTarget.focus();\n currentTarget.addEventListener('blur', () => currentTarget.classList.remove('forced-open'));\n currentTarget?.parentNode?.removeEventListener('mouseout', () => {\n currentTarget.classList.remove('forced-closed');\n });\n }\n };\n menuItemHover.addEventListener('click', toggleForcedOpen);\n });\n\n // ensure desktop submenus are closed when esc is pressed\n const headerItems = document.querySelectorAll('.Header-menuItem');\n headerItems.forEach(header => {\n header.addEventListener('keyup', e => {\n const event = e as KeyboardEvent;\n if (event.key === 'Escape') {\n (event.target as HTMLElement)?.blur();\n }\n });\n });\n\n // Mobile menu subnav menus\n const headerbuttons = document.querySelectorAll('.js-headerMenuButton');\n headerbuttons.forEach(button => {\n button.addEventListener('click', e => {\n e.preventDefault();\n const isActive = header?.classList.contains('is-active');\n if (isActive) {\n handleNavigationDrawerInactive(header);\n } else {\n handleNavigationDrawerActive(header);\n }\n button.setAttribute('aria-expanded', isActive ? 'true' : 'false');\n });\n });\n\n const scrim = document.querySelector('.js-scrim');\n scrim?.addEventListener('click', e => {\n e.preventDefault();\n\n // find any active submenus and close them\n const activeSubnavs = document.querySelectorAll('.go-NavigationDrawer-submenuItem.is-active');\n activeSubnavs.forEach(subnav => handleNavigationDrawerInactive(subnav as HTMLElement));\n\n handleNavigationDrawerInactive(header);\n\n headerbuttons.forEach(button => {\n button.setAttribute(\n 'aria-expanded',\n header?.classList.contains('is-active') ? 'true' : 'false'\n );\n });\n });\n\n const getNavigationDrawerMenuItems = (navigationDrawer: HTMLElement): HTMLElement[] => {\n if (!navigationDrawer) {\n return [];\n }\n\n const menuItems = Array.from(\n navigationDrawer.querySelectorAll(\n ':scope > .go-NavigationDrawer-nav > .go-NavigationDrawer-list > .go-NavigationDrawer-listItem > a, :scope > .go-NavigationDrawer-nav > .go-NavigationDrawer-list > .go-NavigationDrawer-listItem > .go-Header-socialIcons > a'\n ) || []\n );\n\n const anchorEl = navigationDrawer.querySelector('.go-NavigationDrawer-header > a');\n if (anchorEl) {\n menuItems.unshift(anchorEl);\n }\n return menuItems as HTMLElement[];\n };\n\n const getNavigationDrawerIsSubnav = (navigationDrawer: HTMLElement) => {\n if (!navigationDrawer) {\n return;\n }\n return navigationDrawer.classList.contains('go-NavigationDrawer-submenuItem');\n };\n\n const handleNavigationDrawerInactive = (navigationDrawer: HTMLElement) => {\n if (!navigationDrawer) {\n return;\n }\n const menuItems = getNavigationDrawerMenuItems(navigationDrawer);\n navigationDrawer.classList.remove('is-active');\n const parentMenuItem = navigationDrawer\n .closest('.go-NavigationDrawer-listItem')\n ?.querySelector(':scope > a') as HTMLElement;\n parentMenuItem?.focus();\n menuItems?.forEach(item => item?.setAttribute('tabindex', '-1'));\n if (menuItems && menuItems[0]) {\n menuItems[0].removeEventListener('keydown', handleMenuItemTabLeftFactory(navigationDrawer));\n menuItems[menuItems.length - 1].removeEventListener(\n 'keydown',\n handleMenuItemTabRightFactory(navigationDrawer)\n );\n }\n\n if (navigationDrawer === header) {\n headerbuttons && (headerbuttons[0] as HTMLElement)?.focus();\n }\n };\n\n const handleNavigationDrawerActive = (navigationDrawer: HTMLElement) => {\n const menuItems = getNavigationDrawerMenuItems(navigationDrawer);\n\n navigationDrawer.classList.add('is-active');\n menuItems.forEach(item => item.setAttribute('tabindex', '0'));\n menuItems[0].focus();\n\n menuItems[0].addEventListener('keydown', handleMenuItemTabLeftFactory(navigationDrawer));\n menuItems[menuItems.length - 1].addEventListener(\n 'keydown',\n handleMenuItemTabRightFactory(navigationDrawer)\n );\n };\n\n const handleMenuItemTabLeftFactory = (navigationDrawer: HTMLElement) => {\n return (e: KeyboardEvent) => {\n if (e.key === 'Tab' && e.shiftKey) {\n e.preventDefault();\n handleNavigationDrawerInactive(navigationDrawer);\n }\n };\n };\n\n const handleMenuItemTabRightFactory = (navigationDrawer: HTMLElement) => {\n return (e: KeyboardEvent) => {\n if (e.key === 'Tab' && !e.shiftKey) {\n e.preventDefault();\n handleNavigationDrawerInactive(navigationDrawer);\n }\n };\n };\n\n const prepMobileNavigationDrawer = (navigationDrawer: HTMLElement) => {\n const isSubnav = getNavigationDrawerIsSubnav(navigationDrawer);\n const menuItems = getNavigationDrawerMenuItems(navigationDrawer);\n navigationDrawer.addEventListener('keyup', e => {\n if (e.key === 'Escape') {\n handleNavigationDrawerInactive(navigationDrawer);\n }\n });\n\n menuItems.forEach(item => {\n const parentLi = item.closest('li');\n if (parentLi && parentLi.classList.contains('js-mobile-subnav-trigger')) {\n const submenu = parentLi.querySelector('.go-NavigationDrawer-submenuItem') as HTMLElement;\n item.addEventListener('click', () => {\n handleNavigationDrawerActive(submenu);\n });\n }\n });\n if (isSubnav) {\n handleNavigationDrawerInactive(navigationDrawer);\n navigationDrawer\n ?.querySelector('.go-NavigationDrawer-header')\n ?.addEventListener('click', e => {\n e.preventDefault();\n handleNavigationDrawerInactive(navigationDrawer);\n });\n }\n };\n\n document\n .querySelectorAll('.go-NavigationDrawer')\n .forEach(drawer => prepMobileNavigationDrawer(drawer as HTMLElement));\n\n handleNavigationDrawerInactive(header);\n}\n\nexport function registerSearchFormListeners(): void {\n const searchForm = document.querySelector('.js-searchForm');\n const expandSearch = document.querySelector('.js-expandSearch');\n const input = searchForm?.querySelector('input');\n const headerLogo = document.querySelector('.js-headerLogo');\n const menuButton = document.querySelector('.js-headerMenuButton');\n expandSearch?.addEventListener('click', () => {\n searchForm?.classList.add('go-SearchForm--expanded');\n headerLogo?.classList.add('go-Header-logo--hidden');\n menuButton?.classList.add('go-Header-navOpen--hidden');\n input?.focus();\n });\n document?.addEventListener('click', e => {\n if (!searchForm?.contains(e.target as Node)) {\n searchForm?.classList.remove('go-SearchForm--expanded');\n headerLogo?.classList.remove('go-Header-logo--hidden');\n menuButton?.classList.remove('go-Header-navOpen--hidden');\n }\n });\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * Carousel Controller adds event listeners, accessibility enhancements, and\n * control elements to a carousel component.\n */\nexport class CarouselController {\n /**\n * slides is a collection of slides in the carousel.\n */\n private slides: HTMLLIElement[];\n /**\n * dots is a collection of dot navigation controls, added to the carousel\n * by this controller.\n */\n private dots: HTMLElement[];\n /**\n * liveRegion is a visually hidden element that notifies assitive devices\n * of visual changes to the carousel. They are added to the carousel by\n * this controller.\n */\n private liveRegion: HTMLElement;\n /**\n * activeIndex is the 0-index of the currently active slide.\n */\n private activeIndex: number;\n\n constructor(private el: HTMLElement) {\n this.slides = Array.from(el.querySelectorAll('.go-Carousel-slide'));\n this.dots = [];\n this.liveRegion = document.createElement('div');\n this.activeIndex = Number(el.getAttribute('data-slide-index') ?? 0);\n\n this.initSlides();\n this.initArrows();\n this.initDots();\n this.initLiveRegion();\n }\n\n private initSlides() {\n for (const [i, v] of this.slides.entries()) {\n if (i === this.activeIndex) continue;\n v.setAttribute('aria-hidden', 'true');\n }\n }\n\n private initArrows() {\n const arrows = document.createElement('ul');\n arrows.classList.add('go-Carousel-arrows');\n arrows.innerHTML = `\n <li>\n <button class=\"go-Carousel-prevSlide\" aria-label=\"Go to previous slide\">\n <img class=\"go-Icon\" height=\"24\" width=\"24\" src=\"/static/shared/icon/arrow_left_gm_grey_24dp.svg\" alt=\"\">\n </button>\n </li>\n <li>\n <button class=\"go-Carousel-nextSlide\" aria-label=\"Go to next slide\">\n <img class=\"go-Icon\" height=\"24\" width=\"24\" src=\"/static/shared/icon/arrow_right_gm_grey_24dp.svg\" alt=\"\">\n </button>\n </li>\n `;\n arrows\n .querySelector('.go-Carousel-prevSlide')\n ?.addEventListener('click', () => this.setActive(this.activeIndex - 1));\n arrows\n .querySelector('.go-Carousel-nextSlide')\n ?.addEventListener('click', () => this.setActive(this.activeIndex + 1));\n this.el.append(arrows);\n }\n\n private initDots() {\n const dots = document.createElement('ul');\n dots.classList.add('go-Carousel-dots');\n for (let i = 0; i < this.slides.length; i++) {\n const li = document.createElement('li');\n const button = document.createElement('button');\n button.classList.add('go-Carousel-dot');\n if (i === this.activeIndex) {\n button.classList.add('go-Carousel-dot--active');\n }\n button.innerHTML = `<span class=\"go-Carousel-obscured\">Slide ${i + 1}</span>`;\n button.addEventListener('click', () => this.setActive(i));\n li.append(button);\n dots.append(li);\n this.dots.push(button);\n }\n this.el.append(dots);\n }\n\n private initLiveRegion() {\n this.liveRegion.setAttribute('aria-live', 'polite');\n this.liveRegion.setAttribute('aria-atomic', 'true');\n this.liveRegion.setAttribute('class', 'go-Carousel-obscured');\n this.liveRegion.textContent = `Slide ${this.activeIndex + 1} of ${this.slides.length}`;\n this.el.appendChild(this.liveRegion);\n }\n\n private setActive = (index: number) => {\n this.activeIndex = (index + this.slides.length) % this.slides.length;\n this.el.setAttribute('data-slide-index', String(this.activeIndex));\n for (const d of this.dots) {\n d.classList.remove('go-Carousel-dot--active');\n }\n this.dots[this.activeIndex].classList.add('go-Carousel-dot--active');\n for (const s of this.slides) {\n s.setAttribute('aria-hidden', 'true');\n }\n this.slides[this.activeIndex].removeAttribute('aria-hidden');\n this.liveRegion.textContent = 'Slide ' + (this.activeIndex + 1) + ' of ' + this.slides.length;\n };\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * This class decorates an element to copy arbitrary data attached via a data-\n * attribute to the clipboard.\n */\nexport class ClipboardController {\n /**\n * The data to be copied to the clipboard.\n */\n private data: string;\n\n /**\n * @param el The element that will trigger copying text to the clipboard. The text is\n * expected to be within its data-to-copy attribute.\n */\n constructor(private el: HTMLButtonElement) {\n this.data = el.dataset['toCopy'] ?? el.innerText;\n // if data-to-copy is empty and the button is part of an input group\n // capture the value of the input.\n if (!this.data && el.parentElement?.classList.contains('go-InputGroup')) {\n this.data = (this.data || el.parentElement?.querySelector('input')?.value) ?? '';\n }\n el.addEventListener('click', e => this.handleCopyClick(e));\n }\n\n /**\n * Handles when the primary element is clicked.\n */\n handleCopyClick(e: MouseEvent): void {\n e.preventDefault();\n const TOOLTIP_SHOW_DURATION_MS = 1000;\n\n // This API is not available on iOS.\n if (!navigator.clipboard) {\n this.showTooltipText('Unable to copy', TOOLTIP_SHOW_DURATION_MS);\n return;\n }\n navigator.clipboard\n .writeText(this.data)\n .then(() => {\n this.showTooltipText('Copied!', TOOLTIP_SHOW_DURATION_MS);\n })\n .catch(() => {\n this.showTooltipText('Unable to copy', TOOLTIP_SHOW_DURATION_MS);\n });\n }\n\n /**\n * Shows the given text in a tooltip for a specified amount of time, in milliseconds.\n */\n showTooltipText(text: string, durationMs: number): void {\n this.el.setAttribute('data-tooltip', text);\n setTimeout(() => this.el.setAttribute('data-tooltip', ''), durationMs);\n }\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * ToolTipController handles closing tooltips on external clicks.\n */\nexport class ToolTipController {\n constructor(private el: HTMLDetailsElement) {\n document.addEventListener('click', e => {\n const insideTooltip = this.el.contains(e.target as Element);\n if (!insideTooltip) {\n this.el.removeAttribute('open');\n }\n });\n }\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nimport { TreeNavController } from './tree.js';\n\nexport class SelectNavController {\n constructor(private el: Element) {\n this.el.addEventListener('change', e => {\n const target = e.target as HTMLSelectElement;\n let href = target.value;\n if (!target.value.startsWith('/')) {\n href = '/' + href;\n }\n window.location.href = href;\n });\n }\n}\n\nexport function makeSelectNav(tree: TreeNavController): HTMLLabelElement {\n const label = document.createElement('label');\n label.classList.add('go-Label');\n label.setAttribute('aria-label', 'Menu');\n const select = document.createElement('select');\n select.classList.add('go-Select', 'js-selectNav');\n label.appendChild(select);\n const outline = document.createElement('optgroup');\n outline.label = 'Outline';\n select.appendChild(outline);\n const groupMap: Record<string, HTMLOptGroupElement> = {};\n let group: HTMLOptGroupElement;\n for (const t of tree.treeitems) {\n if (Number(t.depth) > 4) continue;\n if (t.groupTreeitem) {\n group = groupMap[t.groupTreeitem.label];\n if (!group) {\n group = groupMap[t.groupTreeitem.label] = document.createElement('optgroup');\n group.label = t.groupTreeitem.label;\n select.appendChild(group);\n }\n } else {\n group = outline;\n }\n const o = document.createElement('option');\n o.label = t.label;\n o.textContent = t.label;\n o.value = (t.el as HTMLAnchorElement).href.replace(window.location.origin, '').replace('/', '');\n group.appendChild(o);\n }\n tree.addObserver(t => {\n const hash = (t.el as HTMLAnchorElement).hash;\n const value = select.querySelector<HTMLOptionElement>(`[value$=\"${hash}\"]`)?.value;\n if (value) {\n select.value = value;\n }\n }, 50);\n return label;\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\ninterface Window {\n dialogPolyfill?: {\n registerDialog: (el: HTMLDialogElement) => void;\n };\n}\n\ndeclare const window: Window;\n\n/**\n * ModalController registers a dialog element with the polyfill if\n * necessary for the current browser, add adds event listeners to\n * close and open modals.\n */\nexport class ModalController {\n constructor(private el: HTMLDialogElement) {\n if (window.dialogPolyfill) {\n window.dialogPolyfill.registerDialog(el);\n }\n this.init();\n }\n\n init() {\n const button = document.querySelector<HTMLButtonElement>(`[aria-controls=\"${this.el.id}\"]`);\n if (button) {\n button.addEventListener('click', () => {\n if (this.el.showModal) {\n this.el.showModal();\n } else {\n this.el.setAttribute('opened', 'true');\n }\n this.el.querySelector('input')?.focus();\n });\n }\n for (const btn of this.el.querySelectorAll<HTMLButtonElement>('[data-modal-close]')) {\n btn.addEventListener('click', () => {\n if (this.el.close) {\n this.el.close();\n } else {\n this.el.removeAttribute('opened');\n }\n });\n }\n }\n}\n", "interface TagManagerEvent {\n /**\n * event is the name of the event, used to filter events in\n * Google Analytics.\n */\n event: string;\n\n /**\n * event_category is a name that you supply as a way to group objects\n * that to analyze. Typically, you will use the same category name\n * multiple times over related UI elements (buttons, links, etc).\n */\n event_category?: string;\n\n /**\n * event_action is used to name the type of event or interaction you\n * want to measure for a particular web object. For example, with a\n * single \"form\" category, you can analyze a number of specific events\n * with this parameter, such as: form entered, form submitted.\n */\n event_action?: string;\n\n /**\n * event_label provide additional information for events that you want\n * to analyze, such as the text label of a link.\n */\n event_label?: string;\n\n /**\n * gtm.start is used to initialize Google Tag Manager.\n */\n 'gtm.start'?: number;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare global {\n interface Window {\n dataLayer?: (TagManagerEvent | VoidFunction)[];\n ga?: unknown;\n }\n}\n\n/**\n * track sends events to Google Tag Manager.\n */\nexport function track(\n event: string | TagManagerEvent,\n category?: string,\n action?: string,\n label?: string\n): void {\n window.dataLayer ??= [];\n if (typeof event === 'string') {\n window.dataLayer.push({\n event,\n event_category: category,\n event_action: action,\n event_label: label,\n });\n } else {\n window.dataLayer.push(event);\n }\n}\n\n/**\n * func adds functions to run sequentionally after\n * Google Tag Manager is ready.\n */\nexport function func(fn: () => void): void {\n window.dataLayer ??= [];\n window.dataLayer.push(fn);\n}\n", "/*!\n * @license\n * Copyright 2019-2020 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nimport { track } from '../analytics/analytics';\n\n/**\n * Options are keyhandler callback options.\n */\ninterface Options {\n /**\n * target is the element the key event should filter on. The\n * default target is the document.\n */\n target?: Element;\n\n /**\n * withMeta specifies if the event callback should fire when\n * the key is pressed with a meta key (ctrl, alt, etc). By\n * default meta keypresses are ignored.\n */\n withMeta?: boolean;\n}\n\n/**\n * KeyHandler is the config for a keyboard event callback.\n */\ninterface KeyHandler extends Options {\n description: string;\n callback: (e: KeyboardEvent) => void;\n}\n\n/**\n * KeyboardController controls event callbacks for sitewide\n * keyboard events. Multiple callbacks can be registered for\n * a single key and by default the controller ignores events\n * for text input targets.\n */\nclass KeyboardController {\n handlers: Record<string, Set<KeyHandler>>;\n\n constructor() {\n this.handlers = {};\n document.addEventListener('keydown', e => this.handleKeyPress(e));\n }\n\n /**\n * on registers keyboard event callbacks.\n * @param key the key to register.\n * @param description name of the event.\n * @param callback event callback.\n * @param options set target and withMeta options to override the default behaviors.\n */\n on(key: string, description: string, callback: (e: KeyboardEvent) => void, options?: Options) {\n this.handlers[key] ??= new Set();\n this.handlers[key].add({ description, callback, ...options });\n return this;\n }\n\n private handleKeyPress(e: KeyboardEvent) {\n for (const handler of this.handlers[e.key.toLowerCase()] ?? new Set()) {\n if (handler.target && handler.target !== e.target) {\n return;\n }\n const t = e.target as HTMLElement | null;\n if (\n !handler.target &&\n (t?.tagName === 'INPUT' || t?.tagName === 'SELECT' || t?.tagName === 'TEXTAREA')\n ) {\n return;\n }\n if (t?.isContentEditable) {\n return;\n }\n if (\n (handler.withMeta && !(e.ctrlKey || e.metaKey)) ||\n (!handler.withMeta && (e.ctrlKey || e.metaKey))\n ) {\n return;\n }\n track('keypress', 'hotkeys', `${e.key} pressed`, handler.description);\n handler.callback(e);\n }\n }\n}\n\nexport const keyboard = new KeyboardController();\n", "/*!\n * @license\n * Copyright 2019-2020 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n// This file implements the behavior of the \"jump to symbol\" dialog for Go\n// package documentation, as well as the simple dialog that displays keyboard\n// shortcuts.\n\n// The DOM for the dialogs is at the bottom of static/frontend/unit/main/_modals.tmpl.\n// The CSS is in static/frontend/unit/main/_modals.css.\n\n// The dialog is activated by pressing the 'f' key. It presents a list\n// (#JumpDialog-list) of all Go symbols displayed in the documentation.\n// Entering text in the dialog's text box (#JumpDialog-filter) restricts the\n// list to symbols containing the text. Clicking on an symbol jumps to\n// its documentation.\n\n// This code is based on\n// https://go.googlesource.com/gddo/+/refs/heads/master/gddo-server/assets/site.js.\n// It was modified to remove the dependence on jquery and bootstrap.\n\nimport { keyboard } from '../keyboard/keyboard';\n\nexport function initModals(): void {\n const jumpDialog = document.querySelector<HTMLDialogElement>('.JumpDialog');\n const jumpBody = jumpDialog?.querySelector<HTMLDivElement>('.JumpDialog-body');\n const jumpList = jumpDialog?.querySelector<HTMLDivElement>('.JumpDialog-list');\n const jumpFilter = jumpDialog?.querySelector<HTMLInputElement>('.JumpDialog-input');\n const doc = document.querySelector<HTMLDivElement>('.js-documentation');\n\n interface JumpListItem {\n link: HTMLAnchorElement;\n name: string;\n kind: string;\n lower: string;\n }\n\n let jumpListItems: JumpListItem[] | undefined; // All the symbols in the doc; computed only once.\n\n // collectJumpListItems returns a list of items, one for each symbol in the\n // documentation on the current page.\n //\n // It uses the data-kind attribute generated in the documentation HTML to find\n // the symbols and their id attributes.\n //\n // If there are no data-kind attributes, then we have older doc; fall back to\n // a less precise method.\n function collectJumpListItems() {\n const items = [];\n if (!doc) return;\n for (const el of doc.querySelectorAll('[data-kind]')) {\n items.push(newJumpListItem(el));\n }\n\n // Clicking on any of the links closes the dialog.\n for (const item of items) {\n item.link.addEventListener('click', function () {\n jumpDialog?.close();\n });\n }\n // Sort case-insensitively by symbol name.\n items.sort(function (a, b) {\n return a.lower.localeCompare(b.lower);\n });\n return items;\n }\n\n // newJumpListItem creates a new item for the DOM element el.\n // An item is an object with:\n // - name: the element's id (which is the symbol name)\n // - kind: the element's kind (function, variable, etc.),\n // - link: a link ('a' tag) to the element\n // - lower: the name in lower case, just for sorting\n function newJumpListItem(el: Element): JumpListItem {\n const a = document.createElement('a');\n const name = el.getAttribute('id');\n a.setAttribute('href', '#' + name);\n a.setAttribute('tabindex', '-1');\n a.setAttribute('data-gtmc', 'jump to link');\n const kind = el.getAttribute('data-kind');\n return {\n link: a,\n name: name ?? '',\n kind: kind ?? '',\n lower: name?.toLowerCase() ?? '', // for sorting\n };\n }\n\n let lastFilterValue: string; // The last contents of the filter text box.\n let activeJumpItem = -1; // The index of the currently active item in the list.\n\n // updateJumpList sets the elements of the dialog list to\n // everything whose name contains filter.\n function updateJumpList(filter: string) {\n lastFilterValue = filter;\n if (!jumpListItems) {\n jumpListItems = collectJumpListItems();\n }\n setActiveJumpItem(-1);\n\n // Remove all children from list.\n while (jumpList?.firstChild) {\n jumpList.firstChild.remove();\n }\n\n if (filter) {\n // A filter is set. We treat the filter as a substring that can appear in\n // an item name (case insensitive), and find the following matches - in\n // order of priority:\n //\n // 1. Exact matches (the filter matches the item's name exactly)\n // 2. Prefix matches (the item's name starts with filter)\n // 3. Infix matches (the filter is a substring of the item's name)\n const filterLowerCase = filter.toLowerCase();\n\n const exactMatches = [];\n const prefixMatches = [];\n const infixMatches = [];\n\n // makeLinkHtml creates the link name HTML for a list item. item is the DOM\n // item. item.name.substr(boldStart, boldEnd) will be bolded.\n const makeLinkHtml = (item: JumpListItem, boldStart: number, boldEnd: number) => {\n return (\n item.name.substring(0, boldStart) +\n '<b>' +\n item.name.substring(boldStart, boldEnd) +\n '</b>' +\n item.name.substring(boldEnd)\n );\n };\n\n for (const item of jumpListItems ?? []) {\n const nameLowerCase = item.name.toLowerCase();\n\n if (nameLowerCase === filterLowerCase) {\n item.link.innerHTML = makeLinkHtml(item, 0, item.name.length);\n exactMatches.push(item);\n } else if (nameLowerCase.startsWith(filterLowerCase)) {\n item.link.innerHTML = makeLinkHtml(item, 0, filter.length);\n prefixMatches.push(item);\n } else {\n const index = nameLowerCase.indexOf(filterLowerCase);\n if (index > -1) {\n item.link.innerHTML = makeLinkHtml(item, index, index + filter.length);\n infixMatches.push(item);\n }\n }\n }\n\n for (const item of exactMatches.concat(prefixMatches).concat(infixMatches)) {\n jumpList?.appendChild(item.link);\n }\n } else {\n if (!jumpListItems || jumpListItems.length === 0) {\n const msg = document.createElement('i');\n msg.innerHTML = 'There are no symbols on this page.';\n jumpList?.appendChild(msg);\n }\n // No filter set; display all items in their existing order.\n for (const item of jumpListItems ?? []) {\n item.link.innerHTML = item.name + ' <i>' + item.kind + '</i>';\n jumpList?.appendChild(item.link);\n }\n }\n\n if (jumpBody) {\n jumpBody.scrollTop = 0;\n }\n if (jumpListItems?.length && jumpList && jumpList.children.length > 0) {\n setActiveJumpItem(0);\n }\n }\n\n // Set the active jump item to n.\n function setActiveJumpItem(n: number) {\n const cs = jumpList?.children as HTMLCollectionOf<HTMLElement> | null | undefined;\n if (!cs || !jumpBody) {\n return;\n }\n if (activeJumpItem >= 0) {\n cs[activeJumpItem].classList.remove('JumpDialog-active');\n }\n if (n >= cs.length) {\n n = cs.length - 1;\n }\n if (n >= 0) {\n cs[n].classList.add('JumpDialog-active');\n\n // Scroll so the active item is visible.\n // For some reason cs[n].scrollIntoView() doesn't behave as I'd expect:\n // it moves the entire dialog box in the viewport.\n\n // Get the top and bottom of the active item relative to jumpBody.\n const activeTop = cs[n].offsetTop - cs[0].offsetTop;\n const activeBottom = activeTop + cs[n].clientHeight;\n if (activeTop < jumpBody.scrollTop) {\n // Off the top; scroll up.\n jumpBody.scrollTop = activeTop;\n } else if (activeBottom > jumpBody.scrollTop + jumpBody.clientHeight) {\n // Off the bottom; scroll down.\n jumpBody.scrollTop = activeBottom - jumpBody.clientHeight;\n }\n }\n activeJumpItem = n;\n }\n\n // Increment the activeJumpItem by delta.\n function incActiveJumpItem(delta: number) {\n if (activeJumpItem < 0) {\n return;\n }\n let n = activeJumpItem + delta;\n if (n < 0) {\n n = 0;\n }\n setActiveJumpItem(n);\n }\n\n // Pressing a key in the filter updates the list (if the filter actually changed).\n jumpFilter?.addEventListener('keyup', function () {\n if (jumpFilter.value.toUpperCase() != lastFilterValue.toUpperCase()) {\n updateJumpList(jumpFilter.value);\n }\n });\n\n // Pressing enter in the filter selects the first element in the list.\n jumpFilter?.addEventListener('keydown', function (event) {\n const upArrow = 38;\n const downArrow = 40;\n const enterKey = 13;\n switch (event.which) {\n case upArrow:\n incActiveJumpItem(-1);\n event.preventDefault();\n break;\n case downArrow:\n incActiveJumpItem(1);\n event.preventDefault();\n break;\n case enterKey:\n if (activeJumpItem >= 0) {\n if (jumpList) {\n (jumpList.children[activeJumpItem] as HTMLElement).click();\n event.preventDefault();\n }\n }\n break;\n }\n });\n\n const shortcutsDialog = document.querySelector<HTMLDialogElement>('.ShortcutsDialog');\n\n // - Pressing 'f' or 'F' opens the jump-to-symbol dialog.\n // - Pressing '?' opens up the shortcut dialog.\n // Ignore a keypress if a dialog is already open, or if it is pressed on a\n // component that wants to consume it.\n keyboard\n .on('f', 'open jump to modal', e => {\n if (jumpDialog?.open || shortcutsDialog?.open) {\n return;\n }\n e.preventDefault();\n if (jumpFilter) {\n jumpFilter.value = '';\n }\n jumpDialog?.showModal?.();\n jumpFilter?.focus();\n updateJumpList('');\n })\n .on('?', 'open shortcuts modal', () => {\n if (jumpDialog?.open || shortcutsDialog?.open) {\n return;\n }\n shortcutsDialog?.showModal?.();\n });\n\n const jumpOutlineInput = document.querySelector('.js-jumpToInput');\n if (jumpOutlineInput) {\n jumpOutlineInput.addEventListener('click', () => {\n if (jumpFilter) {\n jumpFilter.value = '';\n }\n updateJumpList('');\n if (jumpDialog?.open || shortcutsDialog?.open) {\n return;\n }\n jumpDialog?.showModal?.();\n jumpFilter?.focus();\n });\n }\n\n document.querySelector('.js-openShortcuts')?.addEventListener('click', () => {\n shortcutsDialog?.showModal?.();\n });\n}\n", "/**\n * @license\n * Copyright 2020 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nimport { registerHeaderListeners, registerSearchFormListeners } from 'static/shared/header/header';\nimport { CarouselController } from 'static/shared/carousel/carousel';\nimport { ClipboardController } from 'static/shared/clipboard/clipboard';\nimport { ToolTipController } from 'static/shared/tooltip/tooltip';\nimport { SelectNavController } from 'static/shared/outline/select';\nimport { ModalController } from 'static/shared/modal/modal';\nimport { initModals } from 'static/shared/jump/jump';\n\nimport { keyboard } from 'static/shared/keyboard/keyboard';\nimport * as analytics from 'static/shared/analytics/analytics';\n\nwindow.addEventListener('load', () => {\n for (const el of document.querySelectorAll<HTMLButtonElement>('.js-clipboard')) {\n new ClipboardController(el);\n }\n\n for (const el of document.querySelectorAll<HTMLDialogElement>('.js-modal')) {\n new ModalController(el);\n }\n\n for (const t of document.querySelectorAll<HTMLDetailsElement>('.js-tooltip')) {\n new ToolTipController(t);\n }\n\n for (const el of document.querySelectorAll<HTMLSelectElement>('.js-selectNav')) {\n new SelectNavController(el);\n }\n\n for (const el of document.querySelectorAll<HTMLSelectElement>('.js-carousel')) {\n new CarouselController(el);\n }\n\n for (const el of document.querySelectorAll('.js-toggleTheme')) {\n el.addEventListener('click', () => {\n toggleTheme();\n });\n }\n\n if (document.querySelector<HTMLElement>('.js-gtmID')?.dataset.gtmid && window.dataLayer) {\n analytics.func(function () {\n removeUTMSource();\n });\n } else {\n removeUTMSource();\n }\n\n registerHeaderListeners();\n registerSearchFormListeners();\n initModals();\n});\n\n// Pressing '/' focuses the search box\nkeyboard.on('/', 'focus search', e => {\n const searchInput = Array.from(\n document.querySelectorAll<HTMLInputElement>('.js-searchFocus')\n ).pop();\n // Favoring the Firefox quick find feature over search input\n // focus. See: https://github.com/golang/go/issues/41093.\n if (searchInput && !window.navigator.userAgent.includes('Firefox')) {\n e.preventDefault();\n searchInput.focus();\n }\n});\n\n// Pressing 'y' changes the browser URL to the canonical URL\n// without triggering a reload.\nkeyboard.on('y', 'set canonical url', () => {\n let canonicalURLPath = document.querySelector<HTMLDivElement>('.js-canonicalURLPath')?.dataset[\n 'canonicalUrlPath'\n ];\n if (canonicalURLPath && canonicalURLPath !== '') {\n const fragment = window.location.hash;\n if (fragment) {\n canonicalURLPath += fragment;\n }\n window.history.replaceState(null, '', canonicalURLPath);\n }\n});\n\n/**\n * setupGoogleTagManager initializes Google Tag Manager.\n */\n(function setupGoogleTagManager() {\n analytics.track({\n 'gtm.start': new Date().getTime(),\n event: 'gtm.js',\n });\n})();\n\n/**\n * removeUTMSource removes the utm_source GET parameter if present.\n * This is done using JavaScript, so that the utm_source is still\n * captured by Google Analytics.\n */\nfunction removeUTMSource() {\n const urlParams = new URLSearchParams(window.location.search);\n const utmSource = urlParams.get('utm_source');\n if (utmSource !== 'gopls' && utmSource !== 'godoc' && utmSource !== 'pkggodev') {\n return;\n }\n\n /** Strip the utm_source query parameter and replace the URL. **/\n const newURL = new URL(window.location.href);\n urlParams.delete('utm_source');\n newURL.search = urlParams.toString();\n window.history.replaceState(null, '', newURL.toString());\n}\n\n/**\n * toggleTheme switches the preferred color scheme between auto, light, and dark.\n */\nfunction toggleTheme() {\n let nextTheme = 'dark';\n const theme = document.documentElement.getAttribute('data-theme');\n if (theme === 'dark') {\n nextTheme = 'light';\n } else if (theme === 'light') {\n nextTheme = 'auto';\n }\n let domain = '';\n if (location.hostname.endsWith('go.dev')) {\n domain = 'domain=.go.dev;';\n }\n document.documentElement.setAttribute('data-theme', nextTheme);\n document.cookie = `prefers-color-scheme=${nextTheme};${domain}path=/;max-age=31536000;`;\n}\n"],
- "mappings": "AAOO,SAASA,GAAgC,CAC9C,IAAMC,EAAS,SAAS,cAAc,YAAY,EAG3B,SAAS,iBAAiB,wBAAwB,EAC1D,QAAQC,GAAiB,CAGtCA,EAAc,iBAAiB,aAAcC,GAAK,CAChD,IAAMC,EAASD,EAAE,OACXE,EAAS,SAAS,cAAc,cAAc,EAChDA,GAAUA,IAAWH,IACvBG,EAAO,KAAK,EACZA,EAAO,UAAU,OAAO,aAAa,GAIvCD,EAAO,MAAM,EACbA,EAAO,KAAK,CACd,CAAC,EAED,IAAME,EAAoBH,GAAa,CA5B3C,IAAAI,EAAAC,EA6BM,IAAMJ,EAASD,EAAE,OACXM,EAAWL,GAAA,YAAAA,EAAQ,UAAU,SAAS,eACtCM,EAAgBP,EAAE,cACpBM,GACFC,EAAc,oBAAoB,OAAQ,IACxCA,EAAc,UAAU,OAAO,aAAa,CAC9C,EACAA,EAAc,UAAU,OAAO,aAAa,EAC5CA,EAAc,UAAU,IAAI,eAAe,EAC3CA,EAAc,KAAK,GACnBH,EAAAG,GAAA,YAAAA,EAAe,aAAf,MAAAH,EAA2B,iBAAiB,WAAY,IAAM,CAC5DG,EAAc,UAAU,OAAO,eAAe,CAChD,KAEAA,EAAc,UAAU,OAAO,eAAe,EAC9CA,EAAc,UAAU,IAAI,aAAa,EACzCA,EAAc,MAAM,E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oBC,GAEtB,OAAO,QAAQ,aAAa,KAAM,GAAID,CAAgB,CACxD,CACF,CAAC,GAKA,UAAiC,CACtBE,EAAM,CACd,YAAa,IAAI,KAAK,EAAE,QAAQ,EAChC,MAAO,QACT,CAAC,CACH,GAAG,EAOH,SAAST,GAAkB,CACzB,IAAMU,EAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM,EACtDC,EAAYD,EAAU,IAAI,YAAY,EAC5C,GAAIC,IAAc,SAAWA,IAAc,SAAWA,IAAc,WAClE,OAIF,IAAMC,EAAS,IAAI,IAAI,OAAO,SAAS,IAAI,EAC3CF,EAAU,OAAO,YAAY,EAC7BE,EAAO,OAASF,EAAU,SAAS,EACnC,OAAO,QAAQ,aAAa,KAAM,GAAIE,EAAO,SAAS,CAAC,CACzD,CAKA,SAASd,GAAc,CACrB,IAAIe,EAAY,OACVC,EAAQ,SAAS,gBAAgB,aAAa,YAAY,EAC5DA,IAAU,OACZD,EAAY,QACHC,IAAU,UACnBD,EAAY,QAEd,IAAIE,EAAS,GACT,SAAS,SAAS,SAAS,QAAQ,IACrCA,EAAS,mBAEX,SAAS,gBAAgB,aAAa,aAAcF,CAAS,EAC7D,SAAS,OAAS,wBAAwBA,KAAaE,2BACzD",
- "names": ["registerHeaderListeners", "header", "menuItemHover", "e", "target", "forced", "toggleForcedOpen", "_a", "_b", "isForced", "currentTarget", "event", "headerbuttons", "button", "isActive", "handleNavigationDrawerInactive", "handleNavigationDrawerActive", "scrim", "subnav", "getNavigationDrawerMenuItems", "navigationDrawer", "menuItems", "anchorEl", "getNavigationDrawerIsSubnav", "parentMenuItem", "item", "handleMenuItemTabLeftFactory", "handleMenuItemTabRightFactory", "prepMobileNavigationDrawer", "isSubnav", "parentLi", "submenu", "drawer", "registerSearchFormListeners", "searchForm", "expandSearch", "input", "headerLogo", "menuButton", "CarouselController", "el", "index", "d", "s", "_a", "i", "v", "_b", "arrows", "dots", "li", "button", "ClipboardController", "el", "_a", "_b", "_c", "_d", "_e", "e", "TOOLTIP_SHOW_DURATION_MS", "text", "durationMs", "ToolTipController", "el", "e", "SelectNavController", "el", "e", "target", "href", "ModalController", "el", "button", "_a", "btn", "track", "event", "category", "action", "label", "_a", "func", "fn", "KeyboardController", "key", "description", "callback", "options", "_a", "_b", "handler", "t", "track", "keyboard", "initModals", "_a", "jumpDialog", "jumpBody", "jumpList", "jumpFilter", "doc", "jumpListItems", "collectJumpListItems", "items", "el", "newJumpListItem", "item", "a", "b", "name", "kind", "lastFilterValue", "activeJumpItem", "updateJumpList", "filter", "setActiveJumpItem", "filterLowerCase", "exactMatches", "prefixMatches", "infixMatches", "makeLinkHtml", "boldStart", "boldEnd", "nameLowerCase", "index", "msg", "n", "cs", "activeTop", "activeBottom", "incActiveJumpItem", "delta", "event", "shortcutsDialog", "keyboard", "e", "jumpOutlineInput", "_a", "el", "ClipboardController", "ModalController", "t", "ToolTipController", "SelectNavController", "CarouselController", "toggleTheme", "func", "removeUTMSource", "registerHeaderListeners", "registerSearchFormListeners", "initModals", "keyboard", "e", "searchInput", "canonicalURLPath", "fragment", "track", "urlParams", "utmSource", "newURL", "nextTheme", "theme", "domain"]
+ "sources": ["../shared/header/header.ts", "../shared/carousel/carousel.ts", "../shared/clipboard/clipboard.ts", "../shared/tooltip/tooltip.ts", "../shared/outline/select.ts", "../shared/modal/modal.ts", "../shared/analytics/analytics.ts", "../shared/keyboard/keyboard.ts", "../shared/jump/jump.ts", "about/index.ts", "frontend.ts"],
+ "sourcesContent": ["/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nexport function registerHeaderListeners(): void {\n const header = document.querySelector('.js-header') as HTMLElement;\n\n // Desktop menu hover state\n const menuItemHovers = document.querySelectorAll('.js-desktop-menu-hover');\n menuItemHovers.forEach(menuItemHover => {\n // when user clicks on the dropdown menu item on desktop or mobile,\n // force the menu to stay open until the user clicks off of it.\n menuItemHover.addEventListener('mouseenter', e => {\n const target = e.target as HTMLElement;\n const forced = document.querySelector('.forced-open') as HTMLElement;\n if (forced && forced !== menuItemHover) {\n forced.blur();\n forced.classList.remove('forced-open');\n }\n // prevents menus that have been tabbed into from staying open\n // when you hover over another menu\n target.focus();\n target.blur();\n });\n\n const toggleForcedOpen = (e: Event) => {\n const target = e.target as HTMLElement;\n const isForced = target?.classList.contains('forced-open');\n const currentTarget = e.currentTarget as HTMLElement;\n if (isForced) {\n currentTarget.removeEventListener('blur', () =>\n currentTarget.classList.remove('forced-open')\n );\n currentTarget.classList.remove('forced-open');\n currentTarget.classList.add('forced-closed');\n currentTarget.blur();\n currentTarget?.parentNode?.addEventListener('mouseout', () => {\n currentTarget.classList.remove('forced-closed');\n });\n } else {\n currentTarget.classList.remove('forced-closed');\n currentTarget.classList.add('forced-open');\n currentTarget.focus();\n currentTarget.addEventListener('blur', () => currentTarget.classList.remove('forced-open'));\n currentTarget?.parentNode?.removeEventListener('mouseout', () => {\n currentTarget.classList.remove('forced-closed');\n });\n }\n };\n menuItemHover.addEventListener('click', toggleForcedOpen);\n });\n\n // ensure desktop submenus are closed when esc is pressed\n const headerItems = document.querySelectorAll('.Header-menuItem');\n headerItems.forEach(header => {\n header.addEventListener('keyup', e => {\n const event = e as KeyboardEvent;\n if (event.key === 'Escape') {\n (event.target as HTMLElement)?.blur();\n }\n });\n });\n\n // Mobile menu subnav menus\n const headerbuttons = document.querySelectorAll('.js-headerMenuButton');\n headerbuttons.forEach(button => {\n button.addEventListener('click', e => {\n e.preventDefault();\n const isActive = header?.classList.contains('is-active');\n if (isActive) {\n handleNavigationDrawerInactive(header);\n } else {\n handleNavigationDrawerActive(header);\n }\n button.setAttribute('aria-expanded', isActive ? 'true' : 'false');\n });\n });\n\n const scrim = document.querySelector('.js-scrim');\n scrim?.addEventListener('click', e => {\n e.preventDefault();\n\n // find any active submenus and close them\n const activeSubnavs = document.querySelectorAll('.go-NavigationDrawer-submenuItem.is-active');\n activeSubnavs.forEach(subnav => handleNavigationDrawerInactive(subnav as HTMLElement));\n\n handleNavigationDrawerInactive(header);\n\n headerbuttons.forEach(button => {\n button.setAttribute(\n 'aria-expanded',\n header?.classList.contains('is-active') ? 'true' : 'false'\n );\n });\n });\n\n const getNavigationDrawerMenuItems = (navigationDrawer: HTMLElement): HTMLElement[] => {\n if (!navigationDrawer) {\n return [];\n }\n\n const menuItems = Array.from(\n navigationDrawer.querySelectorAll(\n ':scope > .go-NavigationDrawer-nav > .go-NavigationDrawer-list > .go-NavigationDrawer-listItem > a, :scope > .go-NavigationDrawer-nav > .go-NavigationDrawer-list > .go-NavigationDrawer-listItem > .go-Header-socialIcons > a'\n ) || []\n );\n\n const anchorEl = navigationDrawer.querySelector('.go-NavigationDrawer-header > a');\n if (anchorEl) {\n menuItems.unshift(anchorEl);\n }\n return menuItems as HTMLElement[];\n };\n\n const getNavigationDrawerIsSubnav = (navigationDrawer: HTMLElement) => {\n if (!navigationDrawer) {\n return;\n }\n return navigationDrawer.classList.contains('go-NavigationDrawer-submenuItem');\n };\n\n const handleNavigationDrawerInactive = (navigationDrawer: HTMLElement) => {\n if (!navigationDrawer) {\n return;\n }\n const menuItems = getNavigationDrawerMenuItems(navigationDrawer);\n navigationDrawer.classList.remove('is-active');\n const parentMenuItem = navigationDrawer\n .closest('.go-NavigationDrawer-listItem')\n ?.querySelector(':scope > a') as HTMLElement;\n parentMenuItem?.focus();\n menuItems?.forEach(item => item?.setAttribute('tabindex', '-1'));\n if (menuItems && menuItems[0]) {\n menuItems[0].removeEventListener('keydown', handleMenuItemTabLeftFactory(navigationDrawer));\n menuItems[menuItems.length - 1].removeEventListener(\n 'keydown',\n handleMenuItemTabRightFactory(navigationDrawer)\n );\n }\n\n if (navigationDrawer === header) {\n headerbuttons && (headerbuttons[0] as HTMLElement)?.focus();\n }\n };\n\n const handleNavigationDrawerActive = (navigationDrawer: HTMLElement) => {\n const menuItems = getNavigationDrawerMenuItems(navigationDrawer);\n\n navigationDrawer.classList.add('is-active');\n menuItems.forEach(item => item.setAttribute('tabindex', '0'));\n menuItems[0].focus();\n\n menuItems[0].addEventListener('keydown', handleMenuItemTabLeftFactory(navigationDrawer));\n menuItems[menuItems.length - 1].addEventListener(\n 'keydown',\n handleMenuItemTabRightFactory(navigationDrawer)\n );\n };\n\n const handleMenuItemTabLeftFactory = (navigationDrawer: HTMLElement) => {\n return (e: KeyboardEvent) => {\n if (e.key === 'Tab' && e.shiftKey) {\n e.preventDefault();\n handleNavigationDrawerInactive(navigationDrawer);\n }\n };\n };\n\n const handleMenuItemTabRightFactory = (navigationDrawer: HTMLElement) => {\n return (e: KeyboardEvent) => {\n if (e.key === 'Tab' && !e.shiftKey) {\n e.preventDefault();\n handleNavigationDrawerInactive(navigationDrawer);\n }\n };\n };\n\n const prepMobileNavigationDrawer = (navigationDrawer: HTMLElement) => {\n const isSubnav = getNavigationDrawerIsSubnav(navigationDrawer);\n const menuItems = getNavigationDrawerMenuItems(navigationDrawer);\n navigationDrawer.addEventListener('keyup', e => {\n if (e.key === 'Escape') {\n handleNavigationDrawerInactive(navigationDrawer);\n }\n });\n\n menuItems.forEach(item => {\n const parentLi = item.closest('li');\n if (parentLi && parentLi.classList.contains('js-mobile-subnav-trigger')) {\n const submenu = parentLi.querySelector('.go-NavigationDrawer-submenuItem') as HTMLElement;\n item.addEventListener('click', () => {\n handleNavigationDrawerActive(submenu);\n });\n }\n });\n if (isSubnav) {\n handleNavigationDrawerInactive(navigationDrawer);\n navigationDrawer\n ?.querySelector('.go-NavigationDrawer-header')\n ?.addEventListener('click', e => {\n e.preventDefault();\n handleNavigationDrawerInactive(navigationDrawer);\n });\n }\n };\n\n document\n .querySelectorAll('.go-NavigationDrawer')\n .forEach(drawer => prepMobileNavigationDrawer(drawer as HTMLElement));\n\n handleNavigationDrawerInactive(header);\n}\n\nexport function registerSearchFormListeners(): void {\n const searchForm = document.querySelector('.js-searchForm');\n const expandSearch = document.querySelector('.js-expandSearch');\n const input = searchForm?.querySelector('input');\n const headerLogo = document.querySelector('.js-headerLogo');\n const menuButton = document.querySelector('.js-headerMenuButton');\n expandSearch?.addEventListener('click', () => {\n searchForm?.classList.add('go-SearchForm--expanded');\n headerLogo?.classList.add('go-Header-logo--hidden');\n menuButton?.classList.add('go-Header-navOpen--hidden');\n input?.focus();\n });\n document?.addEventListener('click', e => {\n if (!searchForm?.contains(e.target as Node)) {\n searchForm?.classList.remove('go-SearchForm--expanded');\n headerLogo?.classList.remove('go-Header-logo--hidden');\n menuButton?.classList.remove('go-Header-navOpen--hidden');\n }\n });\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * Carousel Controller adds event listeners, accessibility enhancements, and\n * control elements to a carousel component.\n */\nexport class CarouselController {\n /**\n * slides is a collection of slides in the carousel.\n */\n private slides: HTMLLIElement[];\n /**\n * dots is a collection of dot navigation controls, added to the carousel\n * by this controller.\n */\n private dots: HTMLElement[];\n /**\n * liveRegion is a visually hidden element that notifies assitive devices\n * of visual changes to the carousel. They are added to the carousel by\n * this controller.\n */\n private liveRegion: HTMLElement;\n /**\n * activeIndex is the 0-index of the currently active slide.\n */\n private activeIndex: number;\n\n constructor(private el: HTMLElement) {\n this.slides = Array.from(el.querySelectorAll('.go-Carousel-slide'));\n this.dots = [];\n this.liveRegion = document.createElement('div');\n this.activeIndex = Number(el.getAttribute('data-slide-index') ?? 0);\n\n this.initSlides();\n this.initArrows();\n this.initDots();\n this.initLiveRegion();\n }\n\n private initSlides() {\n for (const [i, v] of this.slides.entries()) {\n if (i === this.activeIndex) continue;\n v.setAttribute('aria-hidden', 'true');\n }\n }\n\n private initArrows() {\n const arrows = document.createElement('ul');\n arrows.classList.add('go-Carousel-arrows');\n arrows.innerHTML = `\n <li>\n <button class=\"go-Carousel-prevSlide\" aria-label=\"Go to previous slide\">\n <img class=\"go-Icon\" height=\"24\" width=\"24\" src=\"/static/shared/icon/arrow_left_gm_grey_24dp.svg\" alt=\"\">\n </button>\n </li>\n <li>\n <button class=\"go-Carousel-nextSlide\" aria-label=\"Go to next slide\">\n <img class=\"go-Icon\" height=\"24\" width=\"24\" src=\"/static/shared/icon/arrow_right_gm_grey_24dp.svg\" alt=\"\">\n </button>\n </li>\n `;\n arrows\n .querySelector('.go-Carousel-prevSlide')\n ?.addEventListener('click', () => this.setActive(this.activeIndex - 1));\n arrows\n .querySelector('.go-Carousel-nextSlide')\n ?.addEventListener('click', () => this.setActive(this.activeIndex + 1));\n this.el.append(arrows);\n }\n\n private initDots() {\n const dots = document.createElement('ul');\n dots.classList.add('go-Carousel-dots');\n for (let i = 0; i < this.slides.length; i++) {\n const li = document.createElement('li');\n const button = document.createElement('button');\n button.classList.add('go-Carousel-dot');\n if (i === this.activeIndex) {\n button.classList.add('go-Carousel-dot--active');\n }\n button.innerHTML = `<span class=\"go-Carousel-obscured\">Slide ${i + 1}</span>`;\n button.addEventListener('click', () => this.setActive(i));\n li.append(button);\n dots.append(li);\n this.dots.push(button);\n }\n this.el.append(dots);\n }\n\n private initLiveRegion() {\n this.liveRegion.setAttribute('aria-live', 'polite');\n this.liveRegion.setAttribute('aria-atomic', 'true');\n this.liveRegion.setAttribute('class', 'go-Carousel-obscured');\n this.liveRegion.textContent = `Slide ${this.activeIndex + 1} of ${this.slides.length}`;\n this.el.appendChild(this.liveRegion);\n }\n\n private setActive = (index: number) => {\n this.activeIndex = (index + this.slides.length) % this.slides.length;\n this.el.setAttribute('data-slide-index', String(this.activeIndex));\n for (const d of this.dots) {\n d.classList.remove('go-Carousel-dot--active');\n }\n this.dots[this.activeIndex].classList.add('go-Carousel-dot--active');\n for (const s of this.slides) {\n s.setAttribute('aria-hidden', 'true');\n }\n this.slides[this.activeIndex].removeAttribute('aria-hidden');\n this.liveRegion.textContent = 'Slide ' + (this.activeIndex + 1) + ' of ' + this.slides.length;\n };\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * This class decorates an element to copy arbitrary data attached via a data-\n * attribute to the clipboard.\n */\nexport class ClipboardController {\n /**\n * The data to be copied to the clipboard.\n */\n private data: string;\n\n /**\n * @param el The element that will trigger copying text to the clipboard. The text is\n * expected to be within its data-to-copy attribute.\n */\n constructor(private el: HTMLButtonElement) {\n this.data = el.dataset['toCopy'] ?? el.innerText;\n // if data-to-copy is empty and the button is part of an input group\n // capture the value of the input.\n if (!this.data && el.parentElement?.classList.contains('go-InputGroup')) {\n this.data = (this.data || el.parentElement?.querySelector('input')?.value) ?? '';\n }\n el.addEventListener('click', e => this.handleCopyClick(e));\n }\n\n /**\n * Handles when the primary element is clicked.\n */\n handleCopyClick(e: MouseEvent): void {\n e.preventDefault();\n const TOOLTIP_SHOW_DURATION_MS = 1000;\n\n // This API is not available on iOS.\n if (!navigator.clipboard) {\n this.showTooltipText('Unable to copy', TOOLTIP_SHOW_DURATION_MS);\n return;\n }\n navigator.clipboard\n .writeText(this.data)\n .then(() => {\n this.showTooltipText('Copied!', TOOLTIP_SHOW_DURATION_MS);\n })\n .catch(() => {\n this.showTooltipText('Unable to copy', TOOLTIP_SHOW_DURATION_MS);\n });\n }\n\n /**\n * Shows the given text in a tooltip for a specified amount of time, in milliseconds.\n */\n showTooltipText(text: string, durationMs: number): void {\n this.el.setAttribute('data-tooltip', text);\n setTimeout(() => this.el.setAttribute('data-tooltip', ''), durationMs);\n }\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * ToolTipController handles closing tooltips on external clicks.\n */\nexport class ToolTipController {\n constructor(private el: HTMLDetailsElement) {\n document.addEventListener('click', e => {\n const insideTooltip = this.el.contains(e.target as Element);\n if (!insideTooltip) {\n this.el.removeAttribute('open');\n }\n });\n }\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nimport { TreeNavController } from './tree.js';\n\nexport class SelectNavController {\n constructor(private el: Element) {\n this.el.addEventListener('change', e => {\n const target = e.target as HTMLSelectElement;\n let href = target.value;\n if (!target.value.startsWith('/')) {\n href = '/' + href;\n }\n window.location.href = href;\n });\n }\n}\n\nexport function makeSelectNav(tree: TreeNavController): HTMLLabelElement {\n const label = document.createElement('label');\n label.classList.add('go-Label');\n label.setAttribute('aria-label', 'Menu');\n const select = document.createElement('select');\n select.classList.add('go-Select', 'js-selectNav');\n label.appendChild(select);\n const outline = document.createElement('optgroup');\n outline.label = 'Outline';\n select.appendChild(outline);\n const groupMap: Record<string, HTMLOptGroupElement> = {};\n let group: HTMLOptGroupElement;\n for (const t of tree.treeitems) {\n if (Number(t.depth) > 4) continue;\n if (t.groupTreeitem) {\n group = groupMap[t.groupTreeitem.label];\n if (!group) {\n group = groupMap[t.groupTreeitem.label] = document.createElement('optgroup');\n group.label = t.groupTreeitem.label;\n select.appendChild(group);\n }\n } else {\n group = outline;\n }\n const o = document.createElement('option');\n o.label = t.label;\n o.textContent = t.label;\n o.value = (t.el as HTMLAnchorElement).href.replace(window.location.origin, '').replace('/', '');\n group.appendChild(o);\n }\n tree.addObserver(t => {\n const hash = (t.el as HTMLAnchorElement).hash;\n const value = select.querySelector<HTMLOptionElement>(`[value$=\"${hash}\"]`)?.value;\n if (value) {\n select.value = value;\n }\n }, 50);\n return label;\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\ninterface Window {\n dialogPolyfill?: {\n registerDialog: (el: HTMLDialogElement) => void;\n };\n}\n\ndeclare const window: Window;\n\n/**\n * ModalController registers a dialog element with the polyfill if\n * necessary for the current browser, add adds event listeners to\n * close and open modals.\n */\nexport class ModalController {\n constructor(private el: HTMLDialogElement) {\n if (window.dialogPolyfill) {\n window.dialogPolyfill.registerDialog(el);\n }\n this.init();\n }\n\n init() {\n const button = document.querySelector<HTMLButtonElement>(`[aria-controls=\"${this.el.id}\"]`);\n if (button) {\n button.addEventListener('click', () => {\n if (this.el.showModal) {\n this.el.showModal();\n } else {\n this.el.setAttribute('opened', 'true');\n }\n this.el.querySelector('input')?.focus();\n });\n }\n for (const btn of this.el.querySelectorAll<HTMLButtonElement>('[data-modal-close]')) {\n btn.addEventListener('click', () => {\n if (this.el.close) {\n this.el.close();\n } else {\n this.el.removeAttribute('opened');\n }\n });\n }\n }\n}\n", "interface TagManagerEvent {\n /**\n * event is the name of the event, used to filter events in\n * Google Analytics.\n */\n event: string;\n\n /**\n * event_category is a name that you supply as a way to group objects\n * that to analyze. Typically, you will use the same category name\n * multiple times over related UI elements (buttons, links, etc).\n */\n event_category?: string;\n\n /**\n * event_action is used to name the type of event or interaction you\n * want to measure for a particular web object. For example, with a\n * single \"form\" category, you can analyze a number of specific events\n * with this parameter, such as: form entered, form submitted.\n */\n event_action?: string;\n\n /**\n * event_label provide additional information for events that you want\n * to analyze, such as the text label of a link.\n */\n event_label?: string;\n\n /**\n * gtm.start is used to initialize Google Tag Manager.\n */\n 'gtm.start'?: number;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare global {\n interface Window {\n dataLayer?: (TagManagerEvent | VoidFunction)[];\n ga?: unknown;\n }\n}\n\n/**\n * track sends events to Google Tag Manager.\n */\nexport function track(\n event: string | TagManagerEvent,\n category?: string,\n action?: string,\n label?: string\n): void {\n window.dataLayer ??= [];\n if (typeof event === 'string') {\n window.dataLayer.push({\n event,\n event_category: category,\n event_action: action,\n event_label: label,\n });\n } else {\n window.dataLayer.push(event);\n }\n}\n\n/**\n * func adds functions to run sequentionally after\n * Google Tag Manager is ready.\n */\nexport function func(fn: () => void): void {\n window.dataLayer ??= [];\n window.dataLayer.push(fn);\n}\n", "/*!\n * @license\n * Copyright 2019-2020 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nimport { track } from '../analytics/analytics';\n\n/**\n * Options are keyhandler callback options.\n */\ninterface Options {\n /**\n * target is the element the key event should filter on. The\n * default target is the document.\n */\n target?: Element;\n\n /**\n * withMeta specifies if the event callback should fire when\n * the key is pressed with a meta key (ctrl, alt, etc). By\n * default meta keypresses are ignored.\n */\n withMeta?: boolean;\n}\n\n/**\n * KeyHandler is the config for a keyboard event callback.\n */\ninterface KeyHandler extends Options {\n description: string;\n callback: (e: KeyboardEvent) => void;\n}\n\n/**\n * KeyboardController controls event callbacks for sitewide\n * keyboard events. Multiple callbacks can be registered for\n * a single key and by default the controller ignores events\n * for text input targets.\n */\nclass KeyboardController {\n handlers: Record<string, Set<KeyHandler>>;\n\n constructor() {\n this.handlers = {};\n document.addEventListener('keydown', e => this.handleKeyPress(e));\n }\n\n /**\n * on registers keyboard event callbacks.\n * @param key the key to register.\n * @param description name of the event.\n * @param callback event callback.\n * @param options set target and withMeta options to override the default behaviors.\n */\n on(key: string, description: string, callback: (e: KeyboardEvent) => void, options?: Options) {\n this.handlers[key] ??= new Set();\n this.handlers[key].add({ description, callback, ...options });\n return this;\n }\n\n private handleKeyPress(e: KeyboardEvent) {\n for (const handler of this.handlers[e.key.toLowerCase()] ?? new Set()) {\n if (handler.target && handler.target !== e.target) {\n return;\n }\n const t = e.target as HTMLElement | null;\n if (\n !handler.target &&\n (t?.tagName === 'INPUT' || t?.tagName === 'SELECT' || t?.tagName === 'TEXTAREA')\n ) {\n return;\n }\n if (t?.isContentEditable) {\n return;\n }\n if (\n (handler.withMeta && !(e.ctrlKey || e.metaKey)) ||\n (!handler.withMeta && (e.ctrlKey || e.metaKey))\n ) {\n return;\n }\n track('keypress', 'hotkeys', `${e.key} pressed`, handler.description);\n handler.callback(e);\n }\n }\n}\n\nexport const keyboard = new KeyboardController();\n", "/*!\n * @license\n * Copyright 2019-2020 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n// This file implements the behavior of the \"jump to symbol\" dialog for Go\n// package documentation, as well as the simple dialog that displays keyboard\n// shortcuts.\n\n// The DOM for the dialogs is at the bottom of static/frontend/unit/main/_modals.tmpl.\n// The CSS is in static/frontend/unit/main/_modals.css.\n\n// The dialog is activated by pressing the 'f' key. It presents a list\n// (#JumpDialog-list) of all Go symbols displayed in the documentation.\n// Entering text in the dialog's text box (#JumpDialog-filter) restricts the\n// list to symbols containing the text. Clicking on an symbol jumps to\n// its documentation.\n\n// This code is based on\n// https://go.googlesource.com/gddo/+/refs/heads/master/gddo-server/assets/site.js.\n// It was modified to remove the dependence on jquery and bootstrap.\n\nimport { keyboard } from '../keyboard/keyboard';\n\nexport function initModals(): void {\n const jumpDialog = document.querySelector<HTMLDialogElement>('.JumpDialog');\n const jumpBody = jumpDialog?.querySelector<HTMLDivElement>('.JumpDialog-body');\n const jumpList = jumpDialog?.querySelector<HTMLDivElement>('.JumpDialog-list');\n const jumpFilter = jumpDialog?.querySelector<HTMLInputElement>('.JumpDialog-input');\n const doc = document.querySelector<HTMLDivElement>('.js-documentation');\n\n interface JumpListItem {\n link: HTMLAnchorElement;\n name: string;\n kind: string;\n lower: string;\n }\n\n let jumpListItems: JumpListItem[] | undefined; // All the symbols in the doc; computed only once.\n\n // collectJumpListItems returns a list of items, one for each symbol in the\n // documentation on the current page.\n //\n // It uses the data-kind attribute generated in the documentation HTML to find\n // the symbols and their id attributes.\n //\n // If there are no data-kind attributes, then we have older doc; fall back to\n // a less precise method.\n function collectJumpListItems() {\n const items = [];\n if (!doc) return;\n for (const el of doc.querySelectorAll('[data-kind]')) {\n items.push(newJumpListItem(el));\n }\n\n // Clicking on any of the links closes the dialog.\n for (const item of items) {\n item.link.addEventListener('click', function () {\n jumpDialog?.close();\n });\n }\n // Sort case-insensitively by symbol name.\n items.sort(function (a, b) {\n return a.lower.localeCompare(b.lower);\n });\n return items;\n }\n\n // newJumpListItem creates a new item for the DOM element el.\n // An item is an object with:\n // - name: the element's id (which is the symbol name)\n // - kind: the element's kind (function, variable, etc.),\n // - link: a link ('a' tag) to the element\n // - lower: the name in lower case, just for sorting\n function newJumpListItem(el: Element): JumpListItem {\n const a = document.createElement('a');\n const name = el.getAttribute('id');\n a.setAttribute('href', '#' + name);\n a.setAttribute('tabindex', '-1');\n a.setAttribute('data-gtmc', 'jump to link');\n const kind = el.getAttribute('data-kind');\n return {\n link: a,\n name: name ?? '',\n kind: kind ?? '',\n lower: name?.toLowerCase() ?? '', // for sorting\n };\n }\n\n let lastFilterValue: string; // The last contents of the filter text box.\n let activeJumpItem = -1; // The index of the currently active item in the list.\n\n // updateJumpList sets the elements of the dialog list to\n // everything whose name contains filter.\n function updateJumpList(filter: string) {\n lastFilterValue = filter;\n if (!jumpListItems) {\n jumpListItems = collectJumpListItems();\n }\n setActiveJumpItem(-1);\n\n // Remove all children from list.\n while (jumpList?.firstChild) {\n jumpList.firstChild.remove();\n }\n\n if (filter) {\n // A filter is set. We treat the filter as a substring that can appear in\n // an item name (case insensitive), and find the following matches - in\n // order of priority:\n //\n // 1. Exact matches (the filter matches the item's name exactly)\n // 2. Prefix matches (the item's name starts with filter)\n // 3. Infix matches (the filter is a substring of the item's name)\n const filterLowerCase = filter.toLowerCase();\n\n const exactMatches = [];\n const prefixMatches = [];\n const infixMatches = [];\n\n // makeLinkHtml creates the link name HTML for a list item. item is the DOM\n // item. item.name.substr(boldStart, boldEnd) will be bolded.\n const makeLinkHtml = (item: JumpListItem, boldStart: number, boldEnd: number) => {\n return (\n item.name.substring(0, boldStart) +\n '<b>' +\n item.name.substring(boldStart, boldEnd) +\n '</b>' +\n item.name.substring(boldEnd)\n );\n };\n\n for (const item of jumpListItems ?? []) {\n const nameLowerCase = item.name.toLowerCase();\n\n if (nameLowerCase === filterLowerCase) {\n item.link.innerHTML = makeLinkHtml(item, 0, item.name.length);\n exactMatches.push(item);\n } else if (nameLowerCase.startsWith(filterLowerCase)) {\n item.link.innerHTML = makeLinkHtml(item, 0, filter.length);\n prefixMatches.push(item);\n } else {\n const index = nameLowerCase.indexOf(filterLowerCase);\n if (index > -1) {\n item.link.innerHTML = makeLinkHtml(item, index, index + filter.length);\n infixMatches.push(item);\n }\n }\n }\n\n for (const item of exactMatches.concat(prefixMatches).concat(infixMatches)) {\n jumpList?.appendChild(item.link);\n }\n } else {\n if (!jumpListItems || jumpListItems.length === 0) {\n const msg = document.createElement('i');\n msg.innerHTML = 'There are no symbols on this page.';\n jumpList?.appendChild(msg);\n }\n // No filter set; display all items in their existing order.\n for (const item of jumpListItems ?? []) {\n item.link.innerHTML = item.name + ' <i>' + item.kind + '</i>';\n jumpList?.appendChild(item.link);\n }\n }\n\n if (jumpBody) {\n jumpBody.scrollTop = 0;\n }\n if (jumpListItems?.length && jumpList && jumpList.children.length > 0) {\n setActiveJumpItem(0);\n }\n }\n\n // Set the active jump item to n.\n function setActiveJumpItem(n: number) {\n const cs = jumpList?.children as HTMLCollectionOf<HTMLElement> | null | undefined;\n if (!cs || !jumpBody) {\n return;\n }\n if (activeJumpItem >= 0) {\n cs[activeJumpItem].classList.remove('JumpDialog-active');\n }\n if (n >= cs.length) {\n n = cs.length - 1;\n }\n if (n >= 0) {\n cs[n].classList.add('JumpDialog-active');\n\n // Scroll so the active item is visible.\n // For some reason cs[n].scrollIntoView() doesn't behave as I'd expect:\n // it moves the entire dialog box in the viewport.\n\n // Get the top and bottom of the active item relative to jumpBody.\n const activeTop = cs[n].offsetTop - cs[0].offsetTop;\n const activeBottom = activeTop + cs[n].clientHeight;\n if (activeTop < jumpBody.scrollTop) {\n // Off the top; scroll up.\n jumpBody.scrollTop = activeTop;\n } else if (activeBottom > jumpBody.scrollTop + jumpBody.clientHeight) {\n // Off the bottom; scroll down.\n jumpBody.scrollTop = activeBottom - jumpBody.clientHeight;\n }\n }\n activeJumpItem = n;\n }\n\n // Increment the activeJumpItem by delta.\n function incActiveJumpItem(delta: number) {\n if (activeJumpItem < 0) {\n return;\n }\n let n = activeJumpItem + delta;\n if (n < 0) {\n n = 0;\n }\n setActiveJumpItem(n);\n }\n\n // Pressing a key in the filter updates the list (if the filter actually changed).\n jumpFilter?.addEventListener('keyup', function () {\n if (jumpFilter.value.toUpperCase() != lastFilterValue.toUpperCase()) {\n updateJumpList(jumpFilter.value);\n }\n });\n\n // Pressing enter in the filter selects the first element in the list.\n jumpFilter?.addEventListener('keydown', function (event) {\n const upArrow = 38;\n const downArrow = 40;\n const enterKey = 13;\n switch (event.which) {\n case upArrow:\n incActiveJumpItem(-1);\n event.preventDefault();\n break;\n case downArrow:\n incActiveJumpItem(1);\n event.preventDefault();\n break;\n case enterKey:\n if (activeJumpItem >= 0) {\n if (jumpList) {\n (jumpList.children[activeJumpItem] as HTMLElement).click();\n event.preventDefault();\n }\n }\n break;\n }\n });\n\n const shortcutsDialog = document.querySelector<HTMLDialogElement>('.ShortcutsDialog');\n\n // - Pressing 'f' or 'F' opens the jump-to-symbol dialog.\n // - Pressing '?' opens up the shortcut dialog.\n // Ignore a keypress if a dialog is already open, or if it is pressed on a\n // component that wants to consume it.\n keyboard\n .on('f', 'open jump to modal', e => {\n if (jumpDialog?.open || shortcutsDialog?.open) {\n return;\n }\n e.preventDefault();\n if (jumpFilter) {\n jumpFilter.value = '';\n }\n jumpDialog?.showModal?.();\n jumpFilter?.focus();\n updateJumpList('');\n })\n .on('?', 'open shortcuts modal', () => {\n if (jumpDialog?.open || shortcutsDialog?.open) {\n return;\n }\n shortcutsDialog?.showModal?.();\n });\n\n const jumpOutlineInput = document.querySelector('.js-jumpToInput');\n if (jumpOutlineInput) {\n jumpOutlineInput.addEventListener('click', () => {\n if (jumpFilter) {\n jumpFilter.value = '';\n }\n updateJumpList('');\n if (jumpDialog?.open || shortcutsDialog?.open) {\n return;\n }\n jumpDialog?.showModal?.();\n jumpFilter?.focus();\n });\n }\n\n document.querySelector('.js-openShortcuts')?.addEventListener('click', () => {\n shortcutsDialog?.showModal?.();\n });\n}\n", "/**\n * Left Navigation.\n */\nexport const initJumpLinks = async function () {\n const pagesWithJumpLinks = ['/about'];\n if (!pagesWithJumpLinks.includes(window.location.pathname)) {\n // stop the file from doing anything else if the page doesn't have jumplinks\n return;\n }\n\n // these might be generated or not so don't grab references to the elements until actually need them.\n const titles = 'h2, h3, h4';\n const nav = '.LeftNav a';\n // these are always in the dom so we can get them now and throw errors if they're not.\n const leftNav = document.querySelector('.LeftNav');\n const siteContent = document.querySelector('.go-Content');\n let isObserverDisabled = false;\n\n /**\n * El function\n * @example el('h1', {className: 'title'}, 'Welcome to the site');\n * @example el('ul', {className: 'list'}, el('li', {}, 'Item one'), el('li', {}, 'Item two'), el('li', {}, 'Item three'));\n * @example el('img', {src: '/url.svg'});\n */\n function el(\n type = '',\n props: { [key: string]: string } = {},\n ...children: (HTMLElement | HTMLElement[] | string | undefined)[]\n ) {\n // Error, no type declared.\n if (!type) {\n throw new Error('Provide `type` to create document element.');\n }\n\n // Create element with optional attribute props\n const docEl = Object.assign(document.createElement(type), props);\n\n // Children: array containing strings or elements\n children.forEach(child => {\n if (typeof child === 'string') {\n docEl.appendChild(document.createTextNode(child));\n } else if (Array.isArray(child)) {\n child.forEach(c => docEl.appendChild(c));\n } else if (child instanceof HTMLElement) {\n docEl.appendChild(child);\n }\n });\n\n return docEl;\n }\n /** Build Nav if data hydrate is present. */\n function buildNav() {\n return new Promise((resolve, reject) => {\n let navItems: { id: string; label: string; subnav?: { id: string; label: string }[] }[] = [];\n let elements: HTMLElement[] = [];\n\n if (!siteContent || !leftNav) {\n return reject('.SiteContent not found.');\n }\n if (leftNav instanceof HTMLElement && !leftNav?.dataset?.hydrate) {\n return resolve(true);\n }\n\n for (const title of siteContent.querySelectorAll(titles)) {\n if (title instanceof HTMLElement && !title?.dataset?.ignore) {\n switch (title.tagName) {\n case 'H2':\n navItems = [\n ...navItems,\n {\n id: title.id,\n label: title?.dataset?.title ? title.dataset.title : title.textContent ?? '',\n },\n ];\n break;\n\n case 'H3':\n case 'H4':\n if (!navItems[navItems.length - 1]?.subnav) {\n navItems[navItems.length - 1].subnav = [\n {\n id: title.id,\n label: title?.dataset?.title ? title.dataset.title : title.textContent ?? '',\n },\n ];\n } else if (navItems[navItems.length - 1].subnav) {\n navItems[navItems.length - 1].subnav?.push({\n id: title.id,\n label: title?.dataset?.title ? title.dataset.title : title.textContent ?? '',\n });\n }\n break;\n }\n }\n }\n\n for (const navItem of navItems) {\n const link = el('a', { href: '#' + navItem.id }, el('span', {}, navItem.label));\n elements = [...elements, link];\n if (navItem?.subnav) {\n let subLinks: HTMLElement[] = [];\n for (const subnavItem of navItem.subnav) {\n const subItem = el(\n 'li',\n {},\n el(\n 'a',\n { href: '#' + subnavItem.id },\n el('img', { src: '/static/frontend/about/dot.svg', width: '5', height: '5' }),\n el('span', {}, subnavItem.label)\n )\n );\n subLinks = [...subLinks, subItem];\n }\n const list = el('ul', { className: 'LeftSubnav' }, subLinks);\n elements = [...elements, list];\n }\n }\n\n elements.forEach(element => leftNav.appendChild(element));\n\n return resolve(true);\n });\n }\n /**\n * Set the correct active element.\n */\n function setNav() {\n return new Promise(resolve => {\n if (!document.querySelectorAll(nav)) return resolve(true);\n for (const a of document.querySelectorAll(nav)) {\n if (a instanceof HTMLAnchorElement && a.href === location.href) {\n setElementActive(a);\n break;\n }\n }\n resolve(true);\n });\n }\n /** resetNav: removes all .active from nav elements */\n function resetNav() {\n return new Promise(resolve => {\n if (!document.querySelectorAll(nav)) return resolve(true);\n for (const a of document.querySelectorAll(nav)) {\n a.classList.remove('active');\n }\n resolve(true);\n });\n }\n /** setElementActive: controls resetting nav and highlighting the appropriate nav items */\n function setElementActive(element: HTMLAnchorElement) {\n if (element instanceof HTMLAnchorElement) {\n resetNav().then(() => {\n element.classList.add('active');\n const parent = element?.parentNode?.parentNode;\n if (parent instanceof HTMLElement && parent?.classList?.contains('LeftSubnav')) {\n parent.previousElementSibling?.classList.add('active');\n }\n });\n }\n }\n /** setLinkManually: disables observer and selects the clicked nav item. */\n function setLinkManually() {\n delayObserver();\n const link = document.querySelector('[href=\"' + location.hash + '\"]');\n if (link instanceof HTMLAnchorElement) {\n setElementActive(link);\n }\n }\n /** delayObserver: Quick on off switch for intersection observer. */\n function delayObserver() {\n isObserverDisabled = true;\n setTimeout(() => {\n isObserverDisabled = false;\n }, 200);\n }\n /** observeSections: kicks off observation of titles as well as manual clicks with hashchange */\n function observeSections() {\n window.addEventListener('hashchange', setLinkManually);\n\n if (siteContent?.querySelectorAll(titles)) {\n const callback: IntersectionObserverCallback = entries => {\n if (!isObserverDisabled && Array.isArray(entries) && entries.length > 0) {\n for (const entry of entries) {\n if (entry.isIntersecting && entry.target instanceof HTMLElement) {\n const { id } = entry.target;\n const link = document.querySelector('[href=\"#' + id + '\"]');\n if (link instanceof HTMLAnchorElement) {\n setElementActive(link);\n }\n break;\n }\n }\n }\n };\n // rootMargin is important when multiple sections are in the observable area **on page load**.\n // they will still be highlighted on scroll because of the root margin.\n const ob = new IntersectionObserver(callback, {\n threshold: 0,\n rootMargin: '0px 0px -50% 0px',\n });\n for (const title of siteContent.querySelectorAll(titles)) {\n if (title instanceof HTMLElement && !title?.dataset?.ignore) {\n ob.observe(title);\n }\n }\n }\n }\n\n try {\n await buildNav();\n await setNav();\n if (location.hash) {\n delayObserver();\n }\n observeSections();\n } catch (e) {\n if (e instanceof Error) {\n console.error(e.message);\n } else {\n console.error(e);\n }\n }\n};\n", "/**\n * @license\n * Copyright 2020 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nimport { registerHeaderListeners, registerSearchFormListeners } from 'static/shared/header/header';\nimport { CarouselController } from 'static/shared/carousel/carousel';\nimport { ClipboardController } from 'static/shared/clipboard/clipboard';\nimport { ToolTipController } from 'static/shared/tooltip/tooltip';\nimport { SelectNavController } from 'static/shared/outline/select';\nimport { ModalController } from 'static/shared/modal/modal';\nimport { initModals } from 'static/shared/jump/jump';\n\nimport { keyboard } from 'static/shared/keyboard/keyboard';\nimport * as analytics from 'static/shared/analytics/analytics';\nimport { initJumpLinks } from './about/index';\n\nwindow.addEventListener('load', () => {\n for (const el of document.querySelectorAll<HTMLButtonElement>('.js-clipboard')) {\n new ClipboardController(el);\n }\n\n for (const el of document.querySelectorAll<HTMLDialogElement>('.js-modal')) {\n new ModalController(el);\n }\n\n for (const t of document.querySelectorAll<HTMLDetailsElement>('.js-tooltip')) {\n new ToolTipController(t);\n }\n\n for (const el of document.querySelectorAll<HTMLSelectElement>('.js-selectNav')) {\n new SelectNavController(el);\n }\n\n for (const el of document.querySelectorAll<HTMLSelectElement>('.js-carousel')) {\n new CarouselController(el);\n }\n\n for (const el of document.querySelectorAll('.js-toggleTheme')) {\n el.addEventListener('click', () => {\n toggleTheme();\n });\n }\n\n if (document.querySelector<HTMLElement>('.js-gtmID')?.dataset.gtmid && window.dataLayer) {\n analytics.func(function () {\n removeUTMSource();\n });\n } else {\n removeUTMSource();\n }\n\n registerHeaderListeners();\n registerSearchFormListeners();\n initModals();\n initJumpLinks();\n});\n\n// Pressing '/' focuses the search box\nkeyboard.on('/', 'focus search', e => {\n const searchInput = Array.from(\n document.querySelectorAll<HTMLInputElement>('.js-searchFocus')\n ).pop();\n // Favoring the Firefox quick find feature over search input\n // focus. See: https://github.com/golang/go/issues/41093.\n if (searchInput && !window.navigator.userAgent.includes('Firefox')) {\n e.preventDefault();\n searchInput.focus();\n }\n});\n\n// Pressing 'y' changes the browser URL to the canonical URL\n// without triggering a reload.\nkeyboard.on('y', 'set canonical url', () => {\n let canonicalURLPath = document.querySelector<HTMLDivElement>('.js-canonicalURLPath')?.dataset[\n 'canonicalUrlPath'\n ];\n if (canonicalURLPath && canonicalURLPath !== '') {\n const fragment = window.location.hash;\n if (fragment) {\n canonicalURLPath += fragment;\n }\n window.history.replaceState(null, '', canonicalURLPath);\n }\n});\n\n/**\n * setupGoogleTagManager initializes Google Tag Manager.\n */\n(function setupGoogleTagManager() {\n analytics.track({\n 'gtm.start': new Date().getTime(),\n event: 'gtm.js',\n });\n})();\n\n/**\n * removeUTMSource removes the utm_source GET parameter if present.\n * This is done using JavaScript, so that the utm_source is still\n * captured by Google Analytics.\n */\nfunction removeUTMSource() {\n const urlParams = new URLSearchParams(window.location.search);\n const utmSource = urlParams.get('utm_source');\n if (utmSource !== 'gopls' && utmSource !== 'godoc' && utmSource !== 'pkggodev') {\n return;\n }\n\n /** Strip the utm_source query parameter and replace the URL. **/\n const newURL = new URL(window.location.href);\n urlParams.delete('utm_source');\n newURL.search = urlParams.toString();\n window.history.replaceState(null, '', newURL.toString());\n}\n\n/**\n * toggleTheme switches the preferred color scheme between auto, light, and dark.\n */\nfunction toggleTheme() {\n let nextTheme = 'dark';\n const theme = document.documentElement.getAttribute('data-theme');\n if (theme === 'dark') {\n nextTheme = 'light';\n } else if (theme === 'light') {\n nextTheme = 'auto';\n }\n let domain = '';\n if (location.hostname.endsWith('go.dev')) {\n domain = 'domain=.go.dev;';\n }\n document.documentElement.setAttribute('data-theme', nextTheme);\n document.cookie = `prefers-color-scheme=${nextTheme};${domain}path=/;max-age=31536000;`;\n}\n"],
+ "mappings": "AAAA,AAOO,YAAyC,CAC9C,GAAM,GAAS,SAAS,cAAc,cAItC,AADuB,SAAS,iBAAiB,0BAClC,QAAQ,GAAiB,CAGtC,EAAc,iBAAiB,aAAc,GAAK,CAChD,GAAM,GAAS,EAAE,OACX,EAAS,SAAS,cAAc,gBACtC,AAAI,GAAU,IAAW,GACvB,GAAO,OACP,EAAO,UAAU,OAAO,gBAI1B,EAAO,QACP,EAAO,SAGT,GAAM,GAAmB,AAAC,GAAa,CA5B3C,QA6BM,GAAM,GAAS,EAAE,OACX,EAAW,iBAAQ,UAAU,SAAS,eACtC,EAAgB,EAAE,cACxB,AAAI,EACF,GAAc,oBAAoB,OAAQ,IACxC,EAAc,UAAU,OAAO,gBAEjC,EAAc,UAAU,OAAO,eAC/B,EAAc,UAAU,IAAI,iBAC5B,EAAc,OACd,oBAAe,aAAf,QAA2B,iBAAiB,WAAY,IAAM,CAC5D,EAAc,UAAU,OAAO,oBAGjC,GAAc,UAAU,OAAO,i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AAU,OACZ,EAAY,QACH,IAAU,SACnB,GAAY,QAEd,GAAI,GAAS,GACb,AAAI,SAAS,SAAS,SAAS,WAC7B,GAAS,mBAEX,SAAS,gBAAgB,aAAa,aAAc,GACpD,SAAS,OAAS,wBAAwB,KAAa",
+ "names": []
}
diff --git a/static/frontend/frontend.ts b/static/frontend/frontend.ts
index 1fe1390..6c1fb2f 100644
--- a/static/frontend/frontend.ts
+++ b/static/frontend/frontend.ts
@@ -15,6 +15,7 @@
import { keyboard } from 'static/shared/keyboard/keyboard';
import * as analytics from 'static/shared/analytics/analytics';
+import { initJumpLinks } from './about/index';
window.addEventListener('load', () => {
for (const el of document.querySelectorAll<HTMLButtonElement>('.js-clipboard')) {
@@ -54,6 +55,7 @@
registerHeaderListeners();
registerSearchFormListeners();
initModals();
+ initJumpLinks();
});
// Pressing '/' focuses the search box
diff --git a/tests/screentest/testdata/about-540x1080.a.png b/tests/screentest/testdata/about-540x1080.a.png
index e369574..a76969a 100644
--- a/tests/screentest/testdata/about-540x1080.a.png
+++ b/tests/screentest/testdata/about-540x1080.a.png
Binary files differ
diff --git a/tests/screentest/testdata/about.a.png b/tests/screentest/testdata/about.a.png
index a1da3a8..6dd0a0a 100644
--- a/tests/screentest/testdata/about.a.png
+++ b/tests/screentest/testdata/about.a.png
Binary files differ