@mdn/fred 2.10.0 → 2.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.c8rc.json +1 -1
- package/.nvmrc +1 -1
- package/CHANGELOG.md +17 -0
- package/components/content-section/server.css +2 -0
- package/components/table-container/README.md +7 -1
- package/components/table-container/global.css +3 -0
- package/l10n/locales/ja.ftl +59 -41
- package/out/service-worker.js +1 -1
- package/out/service-worker.js.map +1 -1
- package/out/static/client/{7027.4a1f5f3b9de03a78.js → 7027.6f1e3a6e6f360c5b.js} +61 -43
- package/out/static/client/7027.6f1e3a6e6f360c5b.js.map +1 -0
- package/out/static/{legacy/8292.36d2018207ff6ee8.js → client/8292.bf87f8021c83c2b4.js} +2 -2
- package/out/static/client/8292.bf87f8021c83c2b4.js.map +1 -0
- package/out/static/client/{8520.bcdbc55afd253de5.js → 8520.bb553a4d9076f9b0.js} +2 -2
- package/out/static/client/{8520.bcdbc55afd253de5.js.map → 8520.bb553a4d9076f9b0.js.map} +1 -1
- package/out/static/client/{index.6ebc0aa4b4c45812.js → index.aa5c9b4c9f8c4e0a.js} +3 -3
- package/out/static/client/{index.6ebc0aa4b4c45812.js.map → index.aa5c9b4c9f8c4e0a.js.map} +1 -1
- package/out/static/client/runtime.6a87eece5e71217d.js +2 -0
- package/out/static/client/runtime.6a87eece5e71217d.js.map +1 -0
- package/out/static/client/stats.json +181 -181
- package/out/static/client/{styles-content-section.098f0ffcf7f8155f.css → styles-content-section.b4a31c1c8089aa76.css} +2 -2
- package/out/static/client/{styles-content-section.098f0ffcf7f8155f.css.map → styles-content-section.b4a31c1c8089aa76.css.map} +1 -1
- package/out/static/client/{styles-global.4771b5dde17426f6.css → styles-global.746caad259db7618.css} +2 -2
- package/out/static/client/styles-global.746caad259db7618.css.map +1 -0
- package/out/static/client/{styles-global.ad4652c26bbb385c.js → styles-global.b17582b912fff79f.js} +1 -1
- package/out/static/legacy/{7478.41da8b8017c08e2c.js → 7478.2673b5d86edfd82b.js} +3 -3
- package/out/static/legacy/{7478.41da8b8017c08e2c.js.map → 7478.2673b5d86edfd82b.js.map} +1 -1
- package/out/static/{client/8292.36d2018207ff6ee8.js → legacy/8292.bf87f8021c83c2b4.js} +2 -2
- package/out/static/legacy/8292.bf87f8021c83c2b4.js.map +1 -0
- package/out/static/legacy/asset-manifest.json +68 -68
- package/out/static/legacy/{index.2110089c62a398bd.html → index.8d147c8cce1fbb4e.html} +1 -1
- package/out/static/legacy/stats.json +8 -8
- package/out/static/legacy/{yari.8761b6f1c0b03e17.js → yari.ab99fd7414eac59d.js} +3 -3
- package/out/static/legacy/{yari.8761b6f1c0b03e17.js.map → yari.ab99fd7414eac59d.js.map} +1 -1
- package/out/static/ssr/7027.js +60 -42
- package/out/static/ssr/7027.js.map +1 -1
- package/out/static/ssr/8292.js +1 -1
- package/out/static/ssr/8292.js.map +1 -1
- package/out/static/ssr/index.js +2 -2
- package/out/static/ssr/index.js.map +1 -1
- package/out/static/ssr/stats.json +4 -4
- package/package.json +24 -24
- package/scripts/tests.js +7 -1
- package/server.js +13 -9
- package/test/README.md +6 -0
- package/test/specs-dev/dev-server.e2e.js +37 -0
- package/vendor/yari/libs/play/package-lock.json +1 -1
- package/vendor/yari/libs/play/package.json +2 -1
- package/wdio.dev.conf.js +8 -0
- package/out/static/client/7027.4a1f5f3b9de03a78.js.map +0 -1
- package/out/static/client/8292.36d2018207ff6ee8.js.map +0 -1
- package/out/static/client/runtime.597e247f6c1f7aeb.js +0 -2
- package/out/static/client/runtime.597e247f6c1f7aeb.js.map +0 -1
- package/out/static/client/styles-global.4771b5dde17426f6.css.map +0 -1
- package/out/static/legacy/8292.36d2018207ff6ee8.js.map +0 -1
- /package/out/static/client/{index.6ebc0aa4b4c45812.js.LICENSE.txt → index.aa5c9b4c9f8c4e0a.js.LICENSE.txt} +0 -0
- /package/out/static/legacy/{7478.41da8b8017c08e2c.js.LICENSE.txt → 7478.2673b5d86edfd82b.js.LICENSE.txt} +0 -0
- /package/out/static/legacy/{yari.8761b6f1c0b03e17.js.LICENSE.txt → yari.ab99fd7414eac59d.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! LICENSE: index.
|
|
1
|
+
/*! LICENSE: index.aa5c9b4c9f8c4e0a.js.LICENSE.txt */
|
|
2
2
|
export const __rspack_esm_id=8410;export const __rspack_esm_ids=[8410];export const __webpack_modules__={537(e,t,o){let a=`# WARNING: don't use this file as a source for strings requiring l10n, use ../template.ftl instead:
|
|
3
3
|
# this file only contains manually added strings, not ones inlined in code. See ../README.md for more details.
|
|
4
4
|
|
|
@@ -273,5 +273,5 @@ writer-reload-polling = Polling every { $seconds }s
|
|
|
273
273
|
</li>`:r.s6}
|
|
274
274
|
</ul>
|
|
275
275
|
</dialog>
|
|
276
|
-
`}updated(){if(this._shiftFocus){let e=this._getSelectedItem();e instanceof HTMLElement&&e.focus()}}};function d(e){return(e=e.trim().toLowerCase()).startsWith(".")||e.endsWith(".")?e.split(/[ ,]+/):e.split(/[ ,.]+/)}customElements.define("mdn-search-modal",MDNSearchModal),o.d(t,{MDNSearchModal:()=>MDNSearchModal,splitQuery:()=>d})},45742(e,t,o){let a;var r=o(22207);let n={country:"United States",country_iso:"US"},s={username:null,isAuthenticated:!1,avatarUrl:null,isSubscriber:!1,subscriptionType:null,email:null,geo:n,settings:null};function l(){return r.QD?new Promise(()=>{}):(a||(a=i().catch(e=>(console.error(e),s))),a)}async function i(){let e=await fetch("/api/v1/whoami");if(!e.ok)throw Error(e.statusText);try{let t=await e.json(),o=t?.settings?{aiHelpHistory:"boolean"==typeof t.settings?.ai_help_history?t.settings.ai_help_history:null,noAds:t.settings?.no_ads??null}:s.settings;return c.noAds=o?.noAds||!1,{username:t.username??s.username,isAuthenticated:t.is_authenticated??s.isAuthenticated,avatarUrl:t.avatar_url??s.avatarUrl,isSubscriber:t.is_subscriber??s.isSubscriber,subscriptionType:"core"===t.subscription_type?"mdn_core":t.subscription_type??s.subscriptionType,email:t.email??s.email,geo:{country:(t.geo&&t.geo.country)??n.country,country_iso:(t.geo&&t.geo.country_iso)??n.country_iso},settings:o}}catch{throw Error(e.statusText)}}let c={set noAds(e){e?globalThis.localStorage.setItem("nop","yes"):globalThis.localStorage.removeItem("nop")},get noAds(){return globalThis.localStorage?.getItem?.("nop")==="yes"}};o.d(t,{L:()=>l})},81519(e,t,o){function a(e="id-"){return Math.random().toString(36).replace("0.",e)}o.d(t,{O:()=>a})},18376(e,t,o){let a={threshold:.5};let ViewedObserver=class ViewedObserver{#t;#o;#a;#r=null;#n=null;#s=!1;#l=!globalThis.document?.hidden;#i=this.#c.bind(this);constructor(e,t,o=a){this.#t=e,this.#o=t,this.#a=o}connect(){document.addEventListener("visibilitychange",this.#i),this.#r=new IntersectionObserver(e=>{for(let t of e)this.#d(t.isIntersecting)},this.#a),this.#r.observe(this.#t)}disconnect(){this.#r&&(this.#r.disconnect(),this.#r=null),null!==this.#n&&(clearTimeout(this.#n),this.#n=null),document.removeEventListener("visibilitychange",this.#i)}#c(){this.#l=!document.hidden,this.#d()}#d(e=!1){!this.#s&&this.#l&&e?null===this.#n&&(this.#n=globalThis.setTimeout(()=>{this.#s=!0,this.#o()},1e3)):null!==this.#n&&(clearTimeout(this.#n),this.#n=null)}};o.d(t,{x:()=>ViewedObserver})},33779(e,t,o){o.a(e,async function(e,t){try{o(95831),o(98821),o(41857),o(98769);var a=o(17765);o(31557),o(51874),o(70315),o(36153),o(70408);var r=o(88068),n=o(76787);o(98109);var s=o(15381),l=e([a,r,n,s]);[a,r,n,s]=l.then?(await l)():l,t()}catch(e){t(e)}})},88068(e,t,o){o.a(e,async function(e,t){try{for(let e of document.querySelectorAll('div.code-example pre:not(.hidden):not([class*="live-sample"]):not([class*="interactive-example"])')){let{upgradePre:t}=await Promise.all([o.e(7489),o.e(1861),o.e(1598),o.e(7065)]).then(o.bind(o,84352));t(e)}t()}catch(e){t(e)}},1)},98769(){"closedBy"in HTMLDialogElement.prototype||addEventListener("click",e=>{let t=e.composedPath()[0];if(t instanceof HTMLDialogElement&&"any"===t.getAttribute("closedby")){let o=t.getBoundingClientRect(),{clientX:a,clientY:r}=e;o.top<=r&&r<=o.bottom&&o.left<=a&&a<=o.right||t.close()}})},41857(e,t,o){var a=o(70955),r=o(22207),n=o(18376),s=o(23727);let l=!document.cookie.split("; ").includes("moz-1st-party-data-opt-out=true")&&r._0;for(let e of(r.i7&&(a.A.setDebugViewTag("mdn-dev"),a.A.setLogPings(!0)),a.A.initialize("mdn-fred",l,{enableAutoPageLoadEvents:!0,enableAutoElementClickEvents:!0,channel:r.g_}),document.addEventListener("toggle",e=>{for(let t of e.composedPath())t instanceof HTMLElement&&"string"==typeof t.dataset.gleanToggleOpen&&"open"in t&&t.open&&(0,s.w)(t.dataset.gleanToggleOpen)}),document.querySelectorAll("[data-glean-view]"))){let t=e.dataset.gleanView;if(t){let o=new n.x(e,()=>{(0,s.w)(t),o.disconnect()});o.connect()}}document.addEventListener("click",e=>{let t=e.composedPath(),o=t?.[0];if(o!==e.target&&o instanceof Element)for(let e of t)e instanceof HTMLElement&&"string"==typeof e.dataset.gleanId&&(0,s.w)(e.dataset.gleanId);let a=o??e.target;if(a instanceof Element){let e=a.closest("a");if(e instanceof HTMLAnchorElement&&e.href&&e.origin&&e.origin!==document.location.origin&&(0,s.w)(`external-link: ${e.href}`),e instanceof HTMLAnchorElement&&e.href&&e.closest(".left-sidebar")){let t=e.getAttribute("href")||e.href;(0,s.w)(`sidebar_click: sidebar ${t}`)}}})},76787(e,t,o){o.a(e,async function(e,t){try{for(let e of document.querySelectorAll("iframe[data-live-id]"))if(e instanceof HTMLIFrameElement){let{liveId:t,livePath:a}=e.dataset;if(t){let r={},n=[],s=t.replaceAll(".",String.raw`\.`);for(let e of document.querySelectorAll(`.live-sample___${s}, .live-sample---${s}`)){let{MDNCodeExample:t,upgradePre:a}=await Promise.all([o.e(7489),o.e(1861),o.e(1598),o.e(7065)]).then(o.bind(o,84352)),s=e instanceof t?e:a(e);if(s){n.push(s);let{language:e,code:t}=s;r[e]?r[e]+=t:r[e]=t}}await Promise.all([o.e(7489),o.e(3708),o.e(5950),o.e(4098),o.e(1861),o.e(8401)]).then(o.bind(o,47849));let l=document.createElement("mdn-live-sample-result");for(let o of(l.liveId=t,l.code=r,l.srcPrefix=a,l.allow=e.allow||void 0,l.sandbox=e.sandbox.toString(),l.height=e.height,e.closest(".code-example")?.replaceWith(l),n))o.liveSample||=l}}t()}catch(e){t(e)}},1)},31557(e,t,o){let a=new Set;for(let e of document.querySelectorAll("*")){let t=e.tagName.toLowerCase();if(t.startsWith("mdn-")||"interactive-example"===t){let e=t.replace("mdn-","");a.has(e)||(a.add(e),o(95061)(`./${e}/element.js`).catch(t=>{console.error(`couldn't load code for <${e}>: does the element's code not match the naming schema?`,t)}))}}},70315(){let e=document.querySelector("#main-sidebar"),t=e?.querySelector('[aria-current="page"]');e&&t instanceof HTMLElement&&e.scrollTo({top:t.offsetTop-window.innerHeight/4})},98109(e,t,o){var a=o(97154);let r=document.querySelector('.a11y-menu a[href="#mdn-search"]');if(r instanceof HTMLAnchorElement){let e=document.querySelector("#mdn-search");e instanceof a.MDNSearchModal?r.addEventListener("click",t=>{let{target:o}=t;o instanceof HTMLElement&&(o.blur(),t.preventDefault()),e.showModal()}):(console.error("MDNSearchModal not found!"),r.hidden=!0)}},70408(){for(let e of document.querySelectorAll(".generic-toc, .reference-toc, .document-toc, .blog-toc"))e instanceof HTMLElement&&function(e){let t=[...e.querySelectorAll("a")],o=new Map;for(let e of t.reverse()){let t=document.querySelector(`[id="${CSS.escape(decodeURIComponent(e.hash).slice(1))}"]`);if(!t)continue;let a=t.closest("section");for(;a&&a instanceof HTMLElement&&!o.has(a);)o.set(a,e),a=a.nextElementSibling}let a=new WeakMap,r=new Set,n={threshold:0},s=document.querySelector("header");s instanceof HTMLElement&&(n.rootMargin=`-${s.clientHeight}px 0px 0px 0px`);let l=new IntersectionObserver(e=>{for(let{target:t,isIntersecting:n}of e){if(!(t instanceof HTMLElement))continue;if(!r.has(t))if(!n)continue;else r.add(t);let e=o.get(t);if(!e)continue;let s=(a.get(e)??0)+(n?1:-1);e.ariaCurrent=s>0?"true":null,a.set(e,s)}},n);for(let e of o.keys())l.observe(e)}(e)},15381(e,t,o){o.a(e,async function(e,t){try{var a=o(45742);try{let e=await (0,a.L)(),t=new Date(localStorage.getItem("next-ping")||0);if(navigator.sendBeacon&&e.isAuthenticated&&t<new Date){let e=new URLSearchParams;navigator.sendBeacon("/api/v1/ping",e);let t=new Date;t.setUTCDate(t.getUTCDate()+1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),localStorage.setItem("next-ping",t.toISOString())}}catch(e){console.error("Failed to send ping",e)}t()}catch(e){t(e)}},1)},99704(e,t,o){var a=o(45379),r=o(81233),n=o(76722),s=o(537);let l={"en-US":s.default},i=new Set(["i","strong","br","em"]),c=["title","aria-label"];let Fluent=class Fluent{constructor(e="en-US",t=[]){this.locale=e,this.usBundle=Fluent.constructBundle(new a.Np(e,{useIsolating:!1}),[s.default]),t.length>0&&(this.bundle=Fluent.constructBundle(new a.Np(e,{useIsolating:!1}),[s.default,...t]))}static constructBundle(e,t=[]){for(let o of t){let t=e.addResource(new a.B$(o),{allowOverrides:!0});t.length>0&&console.error(t)}return e}get(e,t,o,a){let r=this.getMessage(e,t,o);if(r)return Fluent.sanitize(r,a)}static sanitize(e,t={}){let o={};for(let e of Object.values(t))o[e.tag]=[...Object.keys(e).filter(e=>"tag"!==e),...c];let a=[...Object.values(t).map(e=>e.tag),...i],s=!0,l=r(e,{allowedAttributes:o,allowedTags:a,allowedSchemes:["http","https","mailto"],filter(e){let o=e.attrs["data-l10n-name"];if(o)for(let[a,r]of Object.entries(t[o]||{}))e.attrs[a]=r;return!!(i.has(e.tag)||o&&Object.keys(t).includes(o)&&t[o]?.tag===e.tag)&&(s=!1,!0)}},!0);return s?l:(0,n._)(l)}getMessage(e,t,o={},a=this.bundle,r=!1){let n,s=a?a.getMessage(e):void 0;if("qai"===this.locale)return`[${e}${t?`.${t}`:""}]`;if(!s){if(r)return;return this.getMessage(e,t,o,this.usBundle,!0)}if(t){if(!(n=s.attributes[t])){if(r)return;return this.getMessage(e,t,o,this.usBundle,!0)}}else s.value&&(n=s.value);if(!n||!a)return"";let l=[],i=a?.formatPattern(n,function(e){let t={};for(let[o,a]of Object.entries(e))void 0!==a&&(t[o]="string"==typeof a?a.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">"):a);return t}(o),l);return l.length>0&&console.error(l),i}};let d=new Map;function h(e){if(e){if(!d.has(e)){let t=l[e];if(!t)return new Fluent(e);let o=new Fluent(e,[t]);d.set(e,o)}return d.get(e)}}async function u(e){if("qai"!==e&&!l[e])try{let{default:t}=await o(91369)(`./${e}.ftl`);l[e]=t}catch(e){console.error(e)}}function g(e){function t(t,o){let a=h(e)?.get(t),r="string"==typeof a?a:void 0,n=`[${t}]`,s=e=>{let t=e[0];return r||t||n};return s.toString=()=>r||n,s}return t.raw=function({id:t,attr:o,args:a,elements:r}){let n=h(e);return n?n.get(t,o,a,r):`[${t}]`},t}o.d(t,{Ay:()=>g,FU:()=>u})},17765(e,t,o){o.a(e,async function(e,t){try{var a=o(36611),r=o(99704);let e=(0,a.V)().locale;e&&await (0,r.FU)(e),t()}catch(e){t(e)}},1)},70693(e,t,o){var a=o(36611),r=o(99704);o.d(t,{},{J:e=>class extends e{constructor(...e){super(...e);let t=(0,a.V)();this.locale=t.locale,this.l10n=(0,r.Ay)(this.locale)}}})},36611(e,t,o){function a(){let e=globalThis.__MDNServerContext?.getStore(),t=globalThis.__MDNClientContext;return e||t}o.d(t,{V:()=>a})},95831(){globalThis.__MDNClientContext={locale:globalThis.location.pathname.split("/",2)[1]||"en-US"}},23727(e,t,o){var a=o(34388);function r(e){a.A.recordElementClick({id:e,url:globalThis.location.href,referrer:document.referrer,title:document.title})}o.d(t,{w:()=>r})},14632(e,t,o){function a(e,t){let o=e.replaceAll("_"," ").split("/").filter(e=>!["","docs"].includes(e)),a=o.shift();return"Web"===o.at(0)&&"API"===o.at(1)&&(o[1]="Web APIs"),o.length>1&&"Web"===o.at(0)&&o.shift(),o.length>1&&o.pop(),[...a===t?[]:[a],...o].join(" / ")}o.d(t,{o:()=>a})}};import{__webpack_require__ as e}from"./runtime.597e247f6c1f7aeb.js";import*as t from"./5909.489e266d049aa182.js";e.C(t);import*as o from"./4585.e30f706b333273cd.js";e.C(o);import*as a from"./1216.2fdb44f0bb574bc2.js";e.C(a);import*as r from"./index.6ebc0aa4b4c45812.js";e.C(r),e(e.s=33779);
|
|
277
|
-
//# sourceMappingURL=index.
|
|
276
|
+
`}updated(){if(this._shiftFocus){let e=this._getSelectedItem();e instanceof HTMLElement&&e.focus()}}};function d(e){return(e=e.trim().toLowerCase()).startsWith(".")||e.endsWith(".")?e.split(/[ ,]+/):e.split(/[ ,.]+/)}customElements.define("mdn-search-modal",MDNSearchModal),o.d(t,{MDNSearchModal:()=>MDNSearchModal,splitQuery:()=>d})},45742(e,t,o){let a;var r=o(22207);let n={country:"United States",country_iso:"US"},s={username:null,isAuthenticated:!1,avatarUrl:null,isSubscriber:!1,subscriptionType:null,email:null,geo:n,settings:null};function l(){return r.QD?new Promise(()=>{}):(a||(a=i().catch(e=>(console.error(e),s))),a)}async function i(){let e=await fetch("/api/v1/whoami");if(!e.ok)throw Error(e.statusText);try{let t=await e.json(),o=t?.settings?{aiHelpHistory:"boolean"==typeof t.settings?.ai_help_history?t.settings.ai_help_history:null,noAds:t.settings?.no_ads??null}:s.settings;return c.noAds=o?.noAds||!1,{username:t.username??s.username,isAuthenticated:t.is_authenticated??s.isAuthenticated,avatarUrl:t.avatar_url??s.avatarUrl,isSubscriber:t.is_subscriber??s.isSubscriber,subscriptionType:"core"===t.subscription_type?"mdn_core":t.subscription_type??s.subscriptionType,email:t.email??s.email,geo:{country:(t.geo&&t.geo.country)??n.country,country_iso:(t.geo&&t.geo.country_iso)??n.country_iso},settings:o}}catch{throw Error(e.statusText)}}let c={set noAds(e){e?globalThis.localStorage.setItem("nop","yes"):globalThis.localStorage.removeItem("nop")},get noAds(){return globalThis.localStorage?.getItem?.("nop")==="yes"}};o.d(t,{L:()=>l})},81519(e,t,o){function a(e="id-"){return Math.random().toString(36).replace("0.",e)}o.d(t,{O:()=>a})},18376(e,t,o){let a={threshold:.5};let ViewedObserver=class ViewedObserver{#t;#o;#a;#r=null;#n=null;#s=!1;#l=!globalThis.document?.hidden;#i=this.#c.bind(this);constructor(e,t,o=a){this.#t=e,this.#o=t,this.#a=o}connect(){document.addEventListener("visibilitychange",this.#i),this.#r=new IntersectionObserver(e=>{for(let t of e)this.#d(t.isIntersecting)},this.#a),this.#r.observe(this.#t)}disconnect(){this.#r&&(this.#r.disconnect(),this.#r=null),null!==this.#n&&(clearTimeout(this.#n),this.#n=null),document.removeEventListener("visibilitychange",this.#i)}#c(){this.#l=!document.hidden,this.#d()}#d(e=!1){!this.#s&&this.#l&&e?null===this.#n&&(this.#n=globalThis.setTimeout(()=>{this.#s=!0,this.#o()},1e3)):null!==this.#n&&(clearTimeout(this.#n),this.#n=null)}};o.d(t,{x:()=>ViewedObserver})},33779(e,t,o){o.a(e,async function(e,t){try{o(95831),o(98821),o(41857),o(98769);var a=o(17765);o(31557),o(51874),o(70315),o(36153),o(70408);var r=o(88068),n=o(76787);o(98109);var s=o(15381),l=e([a,r,n,s]);[a,r,n,s]=l.then?(await l)():l,t()}catch(e){t(e)}})},88068(e,t,o){o.a(e,async function(e,t){try{for(let e of document.querySelectorAll('div.code-example pre:not(.hidden):not([class*="live-sample"]):not([class*="interactive-example"])')){let{upgradePre:t}=await Promise.all([o.e(7489),o.e(1861),o.e(1598),o.e(7065)]).then(o.bind(o,84352));t(e)}t()}catch(e){t(e)}},1)},98769(){"closedBy"in HTMLDialogElement.prototype||addEventListener("click",e=>{let t=e.composedPath()[0];if(t instanceof HTMLDialogElement&&"any"===t.getAttribute("closedby")){let o=t.getBoundingClientRect(),{clientX:a,clientY:r}=e;o.top<=r&&r<=o.bottom&&o.left<=a&&a<=o.right||t.close()}})},41857(e,t,o){var a=o(70955),r=o(22207),n=o(18376),s=o(23727);let l=!document.cookie.split("; ").includes("moz-1st-party-data-opt-out=true")&&r._0;for(let e of(r.i7&&(a.A.setDebugViewTag("mdn-dev"),a.A.setLogPings(!0)),a.A.initialize("mdn-fred",l,{enableAutoPageLoadEvents:!0,enableAutoElementClickEvents:!0,channel:r.g_}),document.addEventListener("toggle",e=>{for(let t of e.composedPath())t instanceof HTMLElement&&"string"==typeof t.dataset.gleanToggleOpen&&"open"in t&&t.open&&(0,s.w)(t.dataset.gleanToggleOpen)}),document.querySelectorAll("[data-glean-view]"))){let t=e.dataset.gleanView;if(t){let o=new n.x(e,()=>{(0,s.w)(t),o.disconnect()});o.connect()}}document.addEventListener("click",e=>{let t=e.composedPath(),o=t?.[0];if(o!==e.target&&o instanceof Element)for(let e of t)e instanceof HTMLElement&&"string"==typeof e.dataset.gleanId&&(0,s.w)(e.dataset.gleanId);let a=o??e.target;if(a instanceof Element){let e=a.closest("a");if(e instanceof HTMLAnchorElement&&e.href&&e.origin&&e.origin!==document.location.origin&&(0,s.w)(`external-link: ${e.href}`),e instanceof HTMLAnchorElement&&e.href&&e.closest(".left-sidebar")){let t=e.getAttribute("href")||e.href;(0,s.w)(`sidebar_click: sidebar ${t}`)}}})},76787(e,t,o){o.a(e,async function(e,t){try{for(let e of document.querySelectorAll("iframe[data-live-id]"))if(e instanceof HTMLIFrameElement){let{liveId:t,livePath:a}=e.dataset;if(t){let r={},n=[],s=t.replaceAll(".",String.raw`\.`);for(let e of document.querySelectorAll(`.live-sample___${s}, .live-sample---${s}`)){let{MDNCodeExample:t,upgradePre:a}=await Promise.all([o.e(7489),o.e(1861),o.e(1598),o.e(7065)]).then(o.bind(o,84352)),s=e instanceof t?e:a(e);if(s){n.push(s);let{language:e,code:t}=s;r[e]?r[e]+=t:r[e]=t}}await Promise.all([o.e(7489),o.e(3708),o.e(5950),o.e(4098),o.e(1861),o.e(8401)]).then(o.bind(o,47849));let l=document.createElement("mdn-live-sample-result");for(let o of(l.liveId=t,l.code=r,l.srcPrefix=a,l.allow=e.allow||void 0,l.sandbox=e.sandbox.toString(),l.height=e.height,e.closest(".code-example")?.replaceWith(l),n))o.liveSample||=l}}t()}catch(e){t(e)}},1)},31557(e,t,o){let a=new Set;for(let e of document.querySelectorAll("*")){let t=e.tagName.toLowerCase();if(t.startsWith("mdn-")||"interactive-example"===t){let e=t.replace("mdn-","");a.has(e)||(a.add(e),o(95061)(`./${e}/element.js`).catch(t=>{console.error(`couldn't load code for <${e}>: does the element's code not match the naming schema?`,t)}))}}},70315(){let e=document.querySelector("#main-sidebar"),t=e?.querySelector('[aria-current="page"]');e&&t instanceof HTMLElement&&e.scrollTo({top:t.offsetTop-window.innerHeight/4})},98109(e,t,o){var a=o(97154);let r=document.querySelector('.a11y-menu a[href="#mdn-search"]');if(r instanceof HTMLAnchorElement){let e=document.querySelector("#mdn-search");e instanceof a.MDNSearchModal?r.addEventListener("click",t=>{let{target:o}=t;o instanceof HTMLElement&&(o.blur(),t.preventDefault()),e.showModal()}):(console.error("MDNSearchModal not found!"),r.hidden=!0)}},70408(){for(let e of document.querySelectorAll(".generic-toc, .reference-toc, .document-toc, .blog-toc"))e instanceof HTMLElement&&function(e){let t=[...e.querySelectorAll("a")],o=new Map;for(let e of t.reverse()){let t=document.querySelector(`[id="${CSS.escape(decodeURIComponent(e.hash).slice(1))}"]`);if(!t)continue;let a=t.closest("section");for(;a&&a instanceof HTMLElement&&!o.has(a);)o.set(a,e),a=a.nextElementSibling}let a=new WeakMap,r=new Set,n={threshold:0},s=document.querySelector("header");s instanceof HTMLElement&&(n.rootMargin=`-${s.clientHeight}px 0px 0px 0px`);let l=new IntersectionObserver(e=>{for(let{target:t,isIntersecting:n}of e){if(!(t instanceof HTMLElement))continue;if(!r.has(t))if(!n)continue;else r.add(t);let e=o.get(t);if(!e)continue;let s=(a.get(e)??0)+(n?1:-1);e.ariaCurrent=s>0?"true":null,a.set(e,s)}},n);for(let e of o.keys())l.observe(e)}(e)},15381(e,t,o){o.a(e,async function(e,t){try{var a=o(45742);try{let e=await (0,a.L)(),t=new Date(localStorage.getItem("next-ping")||0);if(navigator.sendBeacon&&e.isAuthenticated&&t<new Date){let e=new URLSearchParams;navigator.sendBeacon("/api/v1/ping",e);let t=new Date;t.setUTCDate(t.getUTCDate()+1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),localStorage.setItem("next-ping",t.toISOString())}}catch(e){console.error("Failed to send ping",e)}t()}catch(e){t(e)}},1)},99704(e,t,o){var a=o(45379),r=o(81233),n=o(76722),s=o(537);let l={"en-US":s.default},i=new Set(["i","strong","br","em"]),c=["title","aria-label"];let Fluent=class Fluent{constructor(e="en-US",t=[]){this.locale=e,this.usBundle=Fluent.constructBundle(new a.Np(e,{useIsolating:!1}),[s.default]),t.length>0&&(this.bundle=Fluent.constructBundle(new a.Np(e,{useIsolating:!1}),[s.default,...t]))}static constructBundle(e,t=[]){for(let o of t){let t=e.addResource(new a.B$(o),{allowOverrides:!0});t.length>0&&console.error(t)}return e}get(e,t,o,a){let r=this.getMessage(e,t,o);if(r)return Fluent.sanitize(r,a)}static sanitize(e,t={}){let o={};for(let e of Object.values(t))o[e.tag]=[...Object.keys(e).filter(e=>"tag"!==e),...c];let a=[...Object.values(t).map(e=>e.tag),...i],s=!0,l=r(e,{allowedAttributes:o,allowedTags:a,allowedSchemes:["http","https","mailto"],filter(e){let o=e.attrs["data-l10n-name"];if(o)for(let[a,r]of Object.entries(t[o]||{}))e.attrs[a]=r;return!!(i.has(e.tag)||o&&Object.keys(t).includes(o)&&t[o]?.tag===e.tag)&&(s=!1,!0)}},!0);return s?l:(0,n._)(l)}getMessage(e,t,o={},a=this.bundle,r=!1){let n,s=a?a.getMessage(e):void 0;if("qai"===this.locale)return`[${e}${t?`.${t}`:""}]`;if(!s){if(r)return;return this.getMessage(e,t,o,this.usBundle,!0)}if(t){if(!(n=s.attributes[t])){if(r)return;return this.getMessage(e,t,o,this.usBundle,!0)}}else s.value&&(n=s.value);if(!n||!a)return"";let l=[],i=a?.formatPattern(n,function(e){let t={};for(let[o,a]of Object.entries(e))void 0!==a&&(t[o]="string"==typeof a?a.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">"):a);return t}(o),l);return l.length>0&&console.error(l),i}};let d=new Map;function h(e){if(e){if(!d.has(e)){let t=l[e];if(!t)return new Fluent(e);let o=new Fluent(e,[t]);d.set(e,o)}return d.get(e)}}async function u(e){if("qai"!==e&&!l[e])try{let{default:t}=await o(91369)(`./${e}.ftl`);l[e]=t}catch(e){console.error(e)}}function g(e){function t(t,o){let a=h(e)?.get(t),r="string"==typeof a?a:void 0,n=`[${t}]`,s=e=>{let t=e[0];return r||t||n};return s.toString=()=>r||n,s}return t.raw=function({id:t,attr:o,args:a,elements:r}){let n=h(e);return n?n.get(t,o,a,r):`[${t}]`},t}o.d(t,{Ay:()=>g,FU:()=>u})},17765(e,t,o){o.a(e,async function(e,t){try{var a=o(36611),r=o(99704);let e=(0,a.V)().locale;e&&await (0,r.FU)(e),t()}catch(e){t(e)}},1)},70693(e,t,o){var a=o(36611),r=o(99704);o.d(t,{},{J:e=>class extends e{constructor(...e){super(...e);let t=(0,a.V)();this.locale=t.locale,this.l10n=(0,r.Ay)(this.locale)}}})},36611(e,t,o){function a(){let e=globalThis.__MDNServerContext?.getStore(),t=globalThis.__MDNClientContext;return e||t}o.d(t,{V:()=>a})},95831(){globalThis.__MDNClientContext={locale:globalThis.location.pathname.split("/",2)[1]||"en-US"}},23727(e,t,o){var a=o(34388);function r(e){a.A.recordElementClick({id:e,url:globalThis.location.href,referrer:document.referrer,title:document.title})}o.d(t,{w:()=>r})},14632(e,t,o){function a(e,t){let o=e.replaceAll("_"," ").split("/").filter(e=>!["","docs"].includes(e)),a=o.shift();return"Web"===o.at(0)&&"API"===o.at(1)&&(o[1]="Web APIs"),o.length>1&&"Web"===o.at(0)&&o.shift(),o.length>1&&o.pop(),[...a===t?[]:[a],...o].join(" / ")}o.d(t,{o:()=>a})}};import{__webpack_require__ as e}from"./runtime.6a87eece5e71217d.js";import*as t from"./5909.489e266d049aa182.js";e.C(t);import*as o from"./4585.e30f706b333273cd.js";e.C(o);import*as a from"./1216.2fdb44f0bb574bc2.js";e.C(a);import*as r from"./index.aa5c9b4c9f8c4e0a.js";e.C(r),e(e.s=33779);
|
|
277
|
+
//# sourceMappingURL=index.aa5c9b4c9f8c4e0a.js.map
|