From f9244ef90598951e6aa58c75650761264e09e635 Mon Sep 17 00:00:00 2001 From: Nedas Date: Tue, 31 Mar 2026 09:44:49 +0200 Subject: [PATCH 1/3] Added missing strings --- README.md | 9 +++ content/_ui-strings.json | 11 ++- localizedContent/es/content/_ui-strings.json | 11 ++- localizedContent/zh/content/_ui-strings.json | 11 ++- templates/tabulareditor/layout/_master.tmpl | 36 ++++----- templates/tabulareditor/public/docfx.min.css | 2 +- .../tabulareditor/public/docfx.min.css.map | 4 +- templates/tabulareditor/public/docfx.min.js | 74 +++++++++---------- .../tabulareditor/public/docfx.min.js.map | 6 +- 9 files changed, 100 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index b25523b6..c516c171 100644 --- a/README.md +++ b/README.md @@ -166,3 +166,12 @@ If a key is missing from a language's file, or no `_ui-strings.json` exists at a | `changeTheme` | `Change theme` | Theme picker label | | `copy` | `Copy` | Code block copy button | | `downloadPdf` | `Download PDF` | PDF download button | +| `search` | `Search documentation` | Search input placeholder | +| `note` | `Note` | Alert box heading | +| `warning` | `Warning` | Alert box heading | +| `tip` | `Tip` | Alert box heading | +| `important` | `Important` | Alert box heading | +| `caution` | `Caution` | Alert box heading | +| `tableOfContents` | `Table of Contents` | Mobile TOC offcanvas title | +| `selectLanguage` | `Select language` | Language picker label | +| `copyCode` | `Copy code` | Code block copy button aria-label | diff --git a/content/_ui-strings.json b/content/_ui-strings.json index 16076eed..5829eb73 100644 --- a/content/_ui-strings.json +++ b/content/_ui-strings.json @@ -35,5 +35,14 @@ "themeAuto": "Auto", "changeTheme": "Change theme", "copy": "Copy", - "downloadPdf": "Download PDF" + "downloadPdf": "Download PDF", + "search": "Search documentation", + "note": "Note", + "warning": "Warning", + "tip": "Tip", + "important": "Important", + "caution": "Caution", + "tableOfContents": "Table of Contents", + "selectLanguage": "Select language", + "copyCode": "Copy code" } diff --git a/localizedContent/es/content/_ui-strings.json b/localizedContent/es/content/_ui-strings.json index 589764cb..5b6b37c6 100644 --- a/localizedContent/es/content/_ui-strings.json +++ b/localizedContent/es/content/_ui-strings.json @@ -35,5 +35,14 @@ "themeAuto": "Automático", "changeTheme": "Cambiar tema", "copy": "Copiar", - "downloadPdf": "Descargar PDF" + "downloadPdf": "Descargar PDF", + "search": "Buscar documentación", + "note": "Nota", + "warning": "Advertencia", + "tip": "Consejo", + "important": "Importante", + "caution": "Precaución", + "tableOfContents": "Tabla de contenidos", + "selectLanguage": "Seleccionar idioma", + "copyCode": "Copiar código" } diff --git a/localizedContent/zh/content/_ui-strings.json b/localizedContent/zh/content/_ui-strings.json index 5525fb60..cfffdf19 100644 --- a/localizedContent/zh/content/_ui-strings.json +++ b/localizedContent/zh/content/_ui-strings.json @@ -35,5 +35,14 @@ "themeAuto": "自动", "changeTheme": "切换主题", "copy": "复制", - "downloadPdf": "下载 PDF" + "downloadPdf": "下载 PDF", + "search": "搜索文档", + "note": "注意", + "warning": "警告", + "tip": "提示", + "important": "重要", + "caution": "注意事项", + "tableOfContents": "目录", + "selectLanguage": "选择语言", + "copyCode": "复制代码" } diff --git a/templates/tabulareditor/layout/_master.tmpl b/templates/tabulareditor/layout/_master.tmpl index 617aab41..ca6a64ac 100644 --- a/templates/tabulareditor/layout/_master.tmpl +++ b/templates/tabulareditor/layout/_master.tmpl @@ -99,24 +99,17 @@
`;function u(R){R>=0&&Rn.toLowerCase()),b=c.toLowerCase(),o=[],l=0;for(let n=0;n=0&&(o.push(f`${c.slice(l,r)}`),o.push(f`${c.slice(r,r+a.length)}`),l=r+a.length)}return o.push(f`${c.slice(l)}`),f`${o}`}async function bl(){let c=await fI(),i=at("docfx:tocrel");if(!i)return el(),[];let t=at("docfx:disabletocfilter")==="true",e=new URL(i.replace(/.html$/gi,".json"),window.location.href),b="",o="";if(c.length<=0)return el(),[];UI();let l=t?"":localStorage?.getItem("tocFilterUrl")||"",n=t?"":localStorage?.getItem("tocFilter")||"";(l===""||l!==e.toString())&&(n="",t||(localStorage?.setItem("tocFilter",""),localStorage?.setItem("tocFilterUrl",e.toString())));let a=[],r=[];c.forEach(m);let d=document.getElementById("toc");if(d){C();let u=d.querySelectorAll("li.active"),R=u[u.length-1];R&&(R.scrollIntoView({block:"nearest"}),location.hash&&(location.href=location.href))}return r.length>0&&AI(c,r[0]),a;function m(u){let R;if(u.href){let V=new URL(u.href,e),G=u.shortcut??!1;R=Vc(V)?!1:Po(V,window.location)&&!G,R&&(u.items&&(u.expanded=!0),r.push(u))}if(u.items)for(let V of u.items)m(V)&&(R=!0,u.expanded=!0);return R?(a.unshift(u),!0):!1}function C(){it(f` + ${s()}
${I(c,!1)||Z()}
- ${W()}`,d)}function I(u,R){let V=u.map(G=>{let{href:F,name:p,items:Q,expanded:s}=G;if(!p)return null;let h=!Q||Q.length<=0,X=R||n!==""&&p.toLowerCase().includes(n.toLowerCase()),x=h?null:I(Q,X);if(n!==""&&!x&&!p.toLowerCase().includes(n.toLowerCase())&&!X)return null;let A=F?f`${st(p)}`:h?f`${st(p)}`:f`${st(p)}`,U=n!==""&&s!==!1&&x!=null||s===!0;return f` + ${W()}`,d)}function I(u,R){let V=u.map(G=>{let{href:F,name:p,items:Q,expanded:g}=G;if(!p)return null;let h=!Q||Q.length<=0,X=R||n!==""&&p.toLowerCase().includes(n.toLowerCase()),x=h?null:I(Q,X);if(n!==""&&!x&&!p.toLowerCase().includes(n.toLowerCase())&&!X)return null;let A=F?f`${gt(p)}`:h?f`${gt(p)}`:f`${gt(p)}`,U=n!==""&&g!==!1&&x!=null||g===!0;return f`
  • - ${h?null:f``} + ${h?null:f``} ${A} ${x} -
  • `;function v(Y){Y.preventDefault(),G.expanded=!U,C()}}).filter(G=>G);return V.length>0?f`
      ${V}
    `:null}function g(){return t?null:f` + `;function O(Y){Y.preventDefault(),G.expanded=!U,C()}}).filter(G=>G);return V.length>0?f`
      ${V}
    `:null}function s(){return t?null:f`
    - -
    `;function u(R){n=R.target.value.trim(),localStorage?.setItem("tocFilter",n),C()}}function Z(){return n===""?null:f`
    ${_("searchNoResults",{query:n})}
    `}function W(){return b?f``:null}}function AI(c,i){let t=document.getElementById("nextArticle");if(!t)return;let e=r(c),b=e.findIndex(d=>d===i),o=e[b-1],l=e[b+1];if(!o&&!l)return;let n=o?f``:null,a=l?f``:null;it(f`${n} ${a}`,t);function r(d){let m=[];for(let C of d)C.href&&m.push(C),C.items&&m.push(...r(C.items));return m}}async function fI(){let c=at("docfx:navrel");if(!c)return[];let i=new URL(c.replace(/.html$/gi,".json"),window.location.href),{items:t}=await fetch(i).then(b=>b.json()),e=at("docfx:rel");for(let b of t){let o=b.tocHref??"";if(o){let r=b.homepage??"";if(r){let d=new URL(e+r,window.location.href);b.href=d.href}else b.href=""}else{b.items=[],b.href=e+b.href;continue}let l=new URL(e+o.replace(/.html$/gi,".json"),window.location.href),n=l.pathname.split("/").slice(0,-1).join("/")+"/",{items:a}=await(await fetch(l)).json();for(let r of a){let d=r.href??r.topicHref??"";if(d){let m=new URL(n+d,window.location.href);r.href=m.href}r.items&&bl(l,n,r.items)}b.items=a}return t}function bl(c,i,t){for(let e of t)e.href&&(e.href=new URL(i+e.href,c).href,e.shortcut=!e.href.includes(i)),e.items&&bl(c,i,e.items)}function cl(){let c=document.getElementById("toc-actionbar");c&&!c.classList.contains("visually-hidden")&&c.classList.add("visually-hidden");let i=document.getElementById("toc-toggler-header");i&&!i.classList.contains("visually-hidden")&&i.classList.add("visually-hidden")}function UI(){let c=document.getElementById("toc-actionbar");c&&c.classList.contains("visually-hidden")&&c.classList.remove("visually-hidden");let i=document.getElementById("toc-toggler-header");i&&i.classList.contains("visually-hidden")&&i.classList.remove("visually-hidden")}var ll=wc(ol());async function nl(){let c=document.getElementById("navbar");if(!c)return[];let i=await l(),t=OI(i),e=n=>f`${st(n.name)}`,b=f` - ${i.map(n=>e(n))}`;async function o(){let n=f``;it(f`${b} ${n}`,c)}return await o(),t?[t]:[];async function l(){let n=at("docfx:navrel");if(!n)return[];let a=new URL(n.replace(/.html$/gi,".json"),window.location.href),{items:r}=await fetch(a).then(d=>d.json());return r.map(d=>"items"in d?{name:d.name,items:d.items.map(m=>({name:m.name,href:new URL(m.href,a)}))}:{name:d.name,href:new URL(d.href,a)})}}function al(c){let i=document.getElementById("breadcrumb");i&&it(f` + + `;function u(R){n=R.target.value.trim(),localStorage?.setItem("tocFilter",n),C()}}function Z(){return n===""?null:f`
    ${D("searchNoResults",{query:n})}
    `}function W(){return b?f``:null}}function AI(c,i){let t=document.getElementById("nextArticle");if(!t)return;let e=r(c),b=e.findIndex(d=>d===i),o=e[b-1],l=e[b+1];if(!o&&!l)return;let n=o?f``:null,a=l?f``:null;it(f`${n} ${a}`,t);function r(d){let m=[];for(let C of d)C.href&&m.push(C),C.items&&m.push(...r(C.items));return m}}async function fI(){let c=at("docfx:navrel");if(!c)return[];let i=new URL(c.replace(/.html$/gi,".json"),window.location.href),{items:t}=await fetch(i).then(b=>b.json()),e=at("docfx:rel");for(let b of t){let o=b.tocHref??"";if(o){let r=b.homepage??"";if(r){let d=new URL(e+r,window.location.href);b.href=d.href}else b.href=""}else{b.items=[],b.href=e+b.href;continue}let l=new URL(e+o.replace(/.html$/gi,".json"),window.location.href),n=l.pathname.split("/").slice(0,-1).join("/")+"/",{items:a}=await(await fetch(l)).json();for(let r of a){let d=r.href??r.topicHref??"";if(d){let m=new URL(n+d,window.location.href);r.href=m.href}r.items&&ol(l,n,r.items)}b.items=a}return t}function ol(c,i,t){for(let e of t)e.href&&(e.href=new URL(i+e.href,c).href,e.shortcut=!e.href.includes(i)),e.items&&ol(c,i,e.items)}function el(){let c=document.getElementById("toc-actionbar");c&&(c.classList.contains("visually-hidden")||c.classList.add("visually-hidden"))}function UI(){let c=document.getElementById("toc-actionbar");c&&c.classList.contains("visually-hidden")&&c.classList.remove("visually-hidden")}var nl=wc(ll());async function al(){let c=document.getElementById("navbar");if(!c)return[];let i=await l(),t=LI(i),e=n=>f`${gt(n.name)}`,b=f` + ${i.map(n=>e(n))}`;async function o(){let n=f``;it(f`${b} ${n}`,c)}return await o(),t?[t]:[];async function l(){let n=at("docfx:navrel");if(!n)return[];let a=new URL(n.replace(/.html$/gi,".json"),window.location.href),{items:r}=await fetch(a).then(d=>d.json());return r.map(d=>"items"in d?{name:d.name,items:d.items.map(m=>({name:m.name,href:new URL(m.href,a)}))}:{name:d.name,href:new URL(d.href,a)})}}function dl(c){let i=document.getElementById("breadcrumb");i&&it(f` `,i)}async function dl(){let c=Array.from(document.querySelectorAll("article h1")).length>1;await YI(c);let i=document.getElementById("affix");i&&it(vI(c),i)}async function YI(c){let i=new ll.default,{anchors:t}=await It();i.options=Object.assign({visible:"hover",icon:"\uE9CB",placement:"left"},t),c?i.add("article h1:not(.no-anchor), article h2:not(.no-anchor), article h3:not(.no-anchor), article h4:not(.no-anchor)"):i.add("article h2:not(.no-anchor), article h3:not(.no-anchor), article h4:not(.no-anchor)"),location.hash&&(location.href=location.href)}function vI(c){let i=c?"article h1, article h2":"article h2, article h3",t=c?"H1":"H2",e=Array.from(document.querySelectorAll(i));if(e.length>0)return f` -
    ${_("inThisArticle")}
    - - `}function OI(c){let i=new URL(window.location.href),t,e=0;for(let b of c.map(o=>"items"in o?o.items:o).flat()){if(Vc(b.href))continue;let o=LI(i,b.href);o===e?t=void 0:o>e&&(e=o,t=b)}return t}function LI(c,i){let t=c.pathname.split("/"),e=i.pathname.split("/"),b=0;for(;b0){let i=c[0].toLowerCase();if(i.length>=2&&i.length<=5&&/^[a-z-]+$/.test(i))return i}return"en"}function Il(c){let i=Uc(),t=window.location.pathname,e=window.location.hash,b=window.location.search,o=t.split("/").filter(Boolean);if(o.length>0){let n=o[0].toLowerCase();n.length>=2&&n.length<=5&&/^[a-z-]+$/.test(n)?o[0]=c:o.unshift(c)}else o.push(c);let l="/"+o.join("/");return(t.endsWith("/")||!l.endsWith(".html")&&!l.includes("."))&&(l+="/"),l+b+e}async function NI(){let c=document.getElementById("language-picker");if(!c)return;let i=await JI();if(!i||i.languages.length<=1){c.style.display="none";return}let t=Uc(),e=i.languages.find(l=>l.code===t)||i.languages.find(l=>l.default)||i.languages[0],b=(l,n)=>{l.preventDefault(),n.code!==t&&(window.location.href=Il(n.code))},o=f` + ${c.map(t=>f``)} + `,i)}async function rl(){let c=Array.from(document.querySelectorAll("article h1")).length>1;await YI(c);let i=document.getElementById("affix");i&&it(OI(c),i)}async function YI(c){let i=new nl.default,{anchors:t}=await It();i.options=Object.assign({visible:"hover",icon:"\uE9CB",placement:"left"},t),c?i.add("article h1:not(.no-anchor), article h2:not(.no-anchor), article h3:not(.no-anchor), article h4:not(.no-anchor)"):i.add("article h2:not(.no-anchor), article h3:not(.no-anchor), article h4:not(.no-anchor)"),location.hash&&(location.href=location.href)}function OI(c){let i=c?"article h1, article h2":"article h2, article h3",t=c?"H1":"H2",e=Array.from(document.querySelectorAll(i));if(e.length>0)return f` +
    ${D("inThisArticle")}
    + + `}function LI(c){let i=new URL(window.location.href),t,e=0;for(let b of c.map(o=>"items"in o?o.items:o).flat()){if(Vc(b.href))continue;let o=vI(i,b.href);o===e?t=void 0:o>e&&(e=o,t=b)}return t}function vI(c,i){let t=c.pathname.split("/"),e=i.pathname.split("/"),b=0;for(;b0){let i=c[0].toLowerCase();if(i.length>=2&&i.length<=5&&/^[a-z-]+$/.test(i))return i}return"en"}function gl(c){let i=Uc(),t=window.location.pathname,e=window.location.hash,b=window.location.search,o=t.split("/").filter(Boolean);if(o.length>0){let n=o[0].toLowerCase();n.length>=2&&n.length<=5&&/^[a-z-]+$/.test(n)?o[0]=c:o.unshift(c)}else o.push(c);let l="/"+o.join("/");return(t.endsWith("/")||!l.endsWith(".html")&&!l.includes("."))&&(l+="/"),l+b+e}async function NI(){let c=document.getElementById("language-picker");if(!c)return;let i=await JI();if(!i||i.languages.length<=1){c.style.display="none";return}let t=Uc(),e=i.languages.find(a=>a.code===t)||i.languages.find(a=>a.default)||i.languages[0],o=(await ib()).selectLanguage||"Select language",l=(a,r)=>{a.preventDefault(),r.code!==t&&(window.location.href=gl(r.code))},n=f` - `;it(o,c)}async function gl(){await NI()}async function ml(){let c=await sl();document.querySelectorAll("[data-ui-string]").forEach(i=>{let t=i.getAttribute("data-ui-string");t&&c[t]!==void 0&&(i.textContent=c[t])}),document.querySelectorAll('meta[name^="loc:"]').forEach(i=>{let t=i.name.replace("loc:","");c[t]!==void 0&&(i.content=c[t])})}async function Zl(){if(Uc()==="en"||document.getElementById("ai-translation-warning"))return;let i=await sl(),t=document.createElement("div");t.id="ai-translation-warning",t.className="ai-translation-warning",t.setAttribute("role","alert"),t.innerHTML=` + `;it(n,c)}async function sl(){await NI()}async function ml(){let c=await ib();if(document.querySelectorAll("[data-ui-string]").forEach(t=>{let e=t.getAttribute("data-ui-string");e&&c[e]!==void 0&&(t.textContent=c[e])}),document.querySelectorAll('meta[name^="loc:"]').forEach(t=>{let e=t.name.replace("loc:","");c[e]!==void 0&&(t.content=c[e])}),c.search){let t=document.getElementById("search-query");t&&(t.placeholder=c.search,t.setAttribute("aria-label",c.search));let e=document.getElementById("header-search__form-label");e&&(e.textContent=c.search)}let i={NOTE:"note",TIP:"tip",WARNING:"warning",IMPORTANT:"important",CAUTION:"caution"};for(let[t,e]of Object.entries(i))c[e]&&document.querySelectorAll(`.${t} > h5`).forEach(b=>{b.textContent=c[e]})}async function Zl(){if(Uc()==="en"||document.getElementById("ai-translation-warning"))return;let i=await ib(),t=document.createElement("div");t.id="ai-translation-warning",t.className="ai-translation-warning",t.setAttribute("role","alert"),t.innerHTML=`
    ${i.aiTranslationWarning}
    - `;let e=document.querySelector("header.global-header_wrp");e?e.appendChild(t):document.body.insertBefore(t,document.body.firstChild),requestAnimationFrame(()=>{let b=t.offsetHeight;document.documentElement.style.setProperty("--ai-banner-height",`${b+5}px`)})}function Xl(){let c=document.getElementById("headerSearch");if(!c)return;let i=c.querySelector(".header-search__form"),t=c.querySelector(".header-search__form-input"),e=c.querySelector(".header-search__form-btn"),b=c.querySelector(".header-search__suggestions");function o(I,g,Z){g.classList.contains("header-search--show")||(g.classList.add("header-search--show"),document.body.classList.contains("open-search_wrp")||document.body.classList.add("open-search_wrp"),i.tabIndex===0&&(i.tabIndex=-1),e.tabIndex===-1&&(e.tabIndex=0),t.tabIndex===-1&&(t.tabIndex=0),t.focus(),Z&&I.preventDefault())}function l(I,g,Z){g.classList.contains("header-search--show")&&(g.classList.remove("header-search--show"),document.body.classList.contains("open-search_wrp")&&document.body.classList.remove("open-search_wrp"),g.classList.contains("header-search--open")&&(g.classList.remove("header-search--open"),b.innerHTML=""),i.tabIndex===-1&&(i.tabIndex=0),e.tabIndex===0&&(e.tabIndex=-1),t.tabIndex===0&&(t.tabIndex=-1),t.blur(),t.value="",Z&&I.preventDefault())}function n(I){c.classList.contains("header-search--show")?l(I,c,!0):o(I,c,!0)}e.addEventListener("click",n,{once:!1,passive:!1});function a(I){o(I,c,!1)}t.addEventListener("focus",a,{once:!1,passive:!0});function r(I){I.code==="Enter"&&o(I,c,!1)}i.addEventListener("keyup",r,{once:!1,passive:!0});function d(I){I.code==="Escape"&&l(I,c,!1)}document.addEventListener("keyup",d,{once:!1,passive:!0});function m(I){I.relatedTarget&&!I.relatedTarget.closest(".header-search__form_wrp")&&l(I,c,!1)}t.addEventListener("blur",m,{once:!1,passive:!0}),e.addEventListener("blur",m,{once:!1,passive:!0});function C(I){I.target.closest(".header-search__form_wrp")||l(I,c,!1)}document.addEventListener("click",C,{once:!1,passive:!0})}var Wl=wc(Bl());async function DI(){window.docfx=window.docfx||{};let{start:c}=await It();c?.(),navigator.userAgent.indexOf("docfx/pdf")>=0?await Promise.all([qe(),_e()]):(await ml(),await Promise.all([Po(),il(),dl(),qe(),t(),_e(),gl(),Zl()])),window.docfx.ready=!0;async function t(){let[I,g]=await Promise.all([nl(),el()]);al([...I,...g])}Xl();let e={};function b(I,g){return new Wl.default(I,g)}document.querySelectorAll("article a").forEach(I=>{I.querySelector("img")&&b(I,e)});let o=window.pageYOffset||document.documentElement.scrollTop,l="down",n="+80% 0px -10%",a="0px 0px +80%",r=!0,d=(()=>{let I=!1;return function(){I||(window.requestAnimationFrame(()=>{let g=document.getElementById("article");if(!g)return;let Z=window.pageYOffset||document.documentElement.scrollTop,W=Z>o?"down":"up";W!==l&&(l=W,vc.default.getInstance(g)?.dispose(),vc.default.getOrCreateInstance(g,{target:"#affix",smoothScroll:!1,rootMargin:l==="down"?n:a}).refresh()),o=Z<=0?0:Z,I=!1}),I=!0)}})();r&&window.addEventListener("scroll",d,{passive:!0});let m=document.getElementById("article");vc.default.getOrCreateInstance(m,{target:"#affix",smoothScroll:!1,rootMargin:n}).refresh()}DI().catch(console.error); + `;let e=document.querySelector("header.global-header_wrp");e?e.appendChild(t):document.body.insertBefore(t,document.body.firstChild),requestAnimationFrame(()=>{let b=t.offsetHeight;document.documentElement.style.setProperty("--ai-banner-height",`${b+5}px`)})}function Xl(){let c=document.getElementById("headerSearch");if(!c)return;let i=c.querySelector(".header-search__form"),t=c.querySelector(".header-search__form-input"),e=c.querySelector(".header-search__form-btn"),b=c.querySelector(".header-search__suggestions");function o(I,s,Z){s.classList.contains("header-search--show")||(s.classList.add("header-search--show"),document.body.classList.contains("open-search_wrp")||document.body.classList.add("open-search_wrp"),i.tabIndex===0&&(i.tabIndex=-1),e.tabIndex===-1&&(e.tabIndex=0),t.tabIndex===-1&&(t.tabIndex=0),t.focus(),Z&&I.preventDefault())}function l(I,s,Z){s.classList.contains("header-search--show")&&(s.classList.remove("header-search--show"),document.body.classList.contains("open-search_wrp")&&document.body.classList.remove("open-search_wrp"),s.classList.contains("header-search--open")&&(s.classList.remove("header-search--open"),b.innerHTML=""),i.tabIndex===-1&&(i.tabIndex=0),e.tabIndex===0&&(e.tabIndex=-1),t.tabIndex===0&&(t.tabIndex=-1),t.blur(),t.value="",Z&&I.preventDefault())}function n(I){c.classList.contains("header-search--show")?l(I,c,!0):o(I,c,!0)}e.addEventListener("click",n,{once:!1,passive:!1});function a(I){o(I,c,!1)}t.addEventListener("focus",a,{once:!1,passive:!0});function r(I){I.code==="Enter"&&o(I,c,!1)}i.addEventListener("keyup",r,{once:!1,passive:!0});function d(I){I.code==="Escape"&&l(I,c,!1)}document.addEventListener("keyup",d,{once:!1,passive:!0});function m(I){I.relatedTarget&&!I.relatedTarget.closest(".header-search__form_wrp")&&l(I,c,!1)}t.addEventListener("blur",m,{once:!1,passive:!0}),e.addEventListener("blur",m,{once:!1,passive:!0});function C(I){I.target.closest(".header-search__form_wrp")||l(I,c,!1)}document.addEventListener("click",C,{once:!1,passive:!0})}var Wl=wc(Bl());async function DI(){window.docfx=window.docfx||{};let{start:c}=await It();c?.(),navigator.userAgent.indexOf("docfx/pdf")>=0?await Promise.all([qe(),_e()]):(await ml(),await Promise.all([$o(),cl(),rl(),qe(),t(),_e(),sl(),Zl()])),window.docfx.ready=!0;async function t(){let[I,s]=await Promise.all([al(),bl()]);dl([...I,...s])}Xl();let e={};function b(I,s){return new Wl.default(I,s)}document.querySelectorAll("article a").forEach(I=>{I.querySelector("img")&&b(I,e)});let o=window.pageYOffset||document.documentElement.scrollTop,l="down",n="+80% 0px -10%",a="0px 0px +80%",r=!0,d=(()=>{let I=!1;return function(){I||(window.requestAnimationFrame(()=>{let s=document.getElementById("article");if(!s)return;let Z=window.pageYOffset||document.documentElement.scrollTop,W=Z>o?"down":"up";W!==l&&(l=W,Oc.default.getInstance(s)?.dispose(),Oc.default.getOrCreateInstance(s,{target:"#affix",smoothScroll:!1,rootMargin:l==="down"?n:a}).refresh()),o=Z<=0?0:Z,I=!1}),I=!0)}})();r&&window.addEventListener("scroll",d,{passive:!0});let m=document.getElementById("article");Oc.default.getOrCreateInstance(m,{target:"#affix",smoothScroll:!1,rootMargin:n}).refresh()}DI().catch(console.error); /*! Bundled license information: bootstrap/js/dist/dom/data.js: diff --git a/templates/tabulareditor/public/docfx.min.js.map b/templates/tabulareditor/public/docfx.min.js.map index 887f42b8..9e4a462b 100644 --- a/templates/tabulareditor/public/docfx.min.js.map +++ b/templates/tabulareditor/public/docfx.min.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../node_modules/bootstrap/js/src/dom/data.js", "../../node_modules/bootstrap/js/src/util/index.js", "../../node_modules/bootstrap/js/src/dom/event-handler.js", "../../node_modules/bootstrap/js/src/dom/manipulator.js", "../../node_modules/bootstrap/js/src/util/config.js", "../../node_modules/bootstrap/js/src/base-component.js", "../../node_modules/bootstrap/js/src/dom/selector-engine.js", "../../node_modules/bootstrap/js/src/scrollspy.js", "../../node_modules/anchor-js/anchor.js", "../../node_modules/simplelightbox/dist/simple-lightbox.modules.js", "../../node_modules/@popperjs/core/lib/index.js", "../../node_modules/@popperjs/core/lib/enums.js", "../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../node_modules/@popperjs/core/lib/utils/math.js", "../../node_modules/@popperjs/core/lib/utils/userAgent.js", "../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../node_modules/@popperjs/core/lib/utils/within.js", "../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../node_modules/@popperjs/core/lib/utils/getVariation.js", "../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../node_modules/@popperjs/core/lib/modifiers/flip.js", "../../node_modules/@popperjs/core/lib/modifiers/hide.js", "../../node_modules/@popperjs/core/lib/modifiers/offset.js", "../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../node_modules/@popperjs/core/lib/utils/debounce.js", "../../node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../node_modules/@popperjs/core/lib/createPopper.js", "../../node_modules/@popperjs/core/lib/popper-lite.js", "../../node_modules/@popperjs/core/lib/popper.js", "../../node_modules/bootstrap/js/src/dom/data.js", "../../node_modules/bootstrap/js/src/util/index.js", "../../node_modules/bootstrap/js/src/dom/event-handler.js", "../../node_modules/bootstrap/js/src/dom/manipulator.js", "../../node_modules/bootstrap/js/src/util/config.js", "../../node_modules/bootstrap/js/src/base-component.js", "../../node_modules/bootstrap/js/src/dom/selector-engine.js", "../../node_modules/bootstrap/js/src/util/component-functions.js", "../../node_modules/bootstrap/js/src/alert.js", "../../node_modules/bootstrap/js/src/button.js", "../../node_modules/bootstrap/js/src/util/swipe.js", "../../node_modules/bootstrap/js/src/carousel.js", "../../node_modules/bootstrap/js/src/collapse.js", "../../node_modules/bootstrap/js/src/dropdown.js", "../../node_modules/bootstrap/js/src/util/backdrop.js", "../../node_modules/bootstrap/js/src/util/focustrap.js", "../../node_modules/bootstrap/js/src/util/scrollbar.js", "../../node_modules/bootstrap/js/src/modal.js", "../../node_modules/bootstrap/js/src/offcanvas.js", "../../node_modules/bootstrap/js/src/util/sanitizer.js", "../../node_modules/bootstrap/js/src/util/template-factory.js", "../../node_modules/bootstrap/js/src/tooltip.js", "../../node_modules/bootstrap/js/src/popover.js", "../../node_modules/bootstrap/js/src/scrollspy.js", "../../node_modules/bootstrap/js/src/tab.js", "../../node_modules/bootstrap/js/src/toast.js", "../src/docfx.ts", "../../node_modules/lit-html/src/lit-html.ts", "../src/helper.ts", "../src/highlight.ts", "../src/theme.ts", "../src/markdown.ts", "../../node_modules/lit-html/src/directive.ts", "../../node_modules/lit-html/src/directives/class-map.ts", "../src/search.ts", "../src/toc.ts", "../src/nav.ts", "../src/language.ts", "../src/hubspot/modules/site-header.ts"], - "sourcesContent": ["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1_000_000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n/**\n * Properly escape IDs selectors to handle weird IDs\n * @param {string} selector\n * @returns {string}\n */\nconst parseSelector = selector => {\n if (selector && window.CSS && window.CSS.escape) {\n // document.querySelector needs escaping to handle IDs (html5+) containing for instance /\n selector = selector.replace(/#([^\\s\"#']+)/g, (match, id) => `#${CSS.escape(id)}`)\n }\n\n return selector\n}\n\n// Shout-out Angus Croll (https://goo.gl/pxwQGp)\nconst toType = object => {\n if (object === null || object === undefined) {\n return `${object}`\n }\n\n return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * Public Util API\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = object => {\n if (!object || typeof object !== 'object') {\n return false\n }\n\n if (typeof object.jquery !== 'undefined') {\n object = object[0]\n }\n\n return typeof object.nodeType !== 'undefined'\n}\n\nconst getElement = object => {\n // it's a jQuery object or a node element\n if (isElement(object)) {\n return object.jquery ? object[0] : object\n }\n\n if (typeof object === 'string' && object.length > 0) {\n return document.querySelector(parseSelector(object))\n }\n\n return null\n}\n\nconst isVisible = element => {\n if (!isElement(element) || element.getClientRects().length === 0) {\n return false\n }\n\n const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'\n // Handle `details` element as its content may falsie appear visible when it is closed\n const closedDetails = element.closest('details:not([open])')\n\n if (!closedDetails) {\n return elementIsVisible\n }\n\n if (closedDetails !== element) {\n const summary = element.closest('summary')\n if (summary && summary.parentNode !== closedDetails) {\n return false\n }\n\n if (summary === null) {\n return false\n }\n }\n\n return elementIsVisible\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\n/**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\nconst reflow = element => {\n element.offsetHeight // eslint-disable-line no-unused-expressions\n}\n\nconst getjQuery = () => {\n if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return window.jQuery\n }\n\n return null\n}\n\nconst DOMContentLoadedCallbacks = []\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n for (const callback of DOMContentLoadedCallbacks) {\n callback()\n }\n })\n }\n\n DOMContentLoadedCallbacks.push(callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {\n return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue\n}\n\nconst executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback)\n return\n }\n\n const durationPadding = 5\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding\n\n let called = false\n\n const handler = ({ target }) => {\n if (target !== transitionElement) {\n return\n }\n\n called = true\n transitionElement.removeEventListener(TRANSITION_END, handler)\n execute(callback)\n }\n\n transitionElement.addEventListener(TRANSITION_END, handler)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement)\n }\n }, emulatedDuration)\n}\n\n/**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\nconst getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n const listLength = list.length\n let index = list.indexOf(activeElement)\n\n // if the element does not exist in the list return an element\n // depending on the direction and if cycle is allowed\n if (index === -1) {\n return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0]\n }\n\n index += shouldGetNext ? 1 : -1\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))]\n}\n\nexport {\n defineJQueryPlugin,\n execute,\n executeAfterTransition,\n findShadowRoot,\n getElement,\n getjQuery,\n getNextActiveElement,\n getTransitionDurationFromElement,\n getUID,\n isDisabled,\n isElement,\n isRTL,\n isVisible,\n noop,\n onDOMContentLoaded,\n parseSelector,\n reflow,\n triggerTransitionEnd,\n toType\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from '../util/index.js'\n\n/**\n * Constants\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nconst eventRegistry = {} // Events storage\nlet uidEvent = 1\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n}\n\nconst nativeEvents = new Set([\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll'\n])\n\n/**\n * Private methods\n */\n\nfunction makeEventUid(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++\n}\n\nfunction getElementEvents(element) {\n const uid = makeEventUid(element)\n\n element.uidEvent = uid\n eventRegistry[uid] = eventRegistry[uid] || {}\n\n return eventRegistry[uid]\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n hydrateObj(event, { delegateTarget: element })\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn)\n }\n\n return fn.apply(element, [event])\n }\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector)\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (const domElement of domElements) {\n if (domElement !== target) {\n continue\n }\n\n hydrateObj(event, { delegateTarget: target })\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn)\n }\n\n return fn.apply(target, [event])\n }\n }\n }\n}\n\nfunction findHandler(events, callable, delegationSelector = null) {\n return Object.values(events)\n .find(event => event.callable === callable && event.delegationSelector === delegationSelector)\n}\n\nfunction normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n const isDelegated = typeof handler === 'string'\n // TODO: tooltip passes `false` instead of selector, so we need to check\n const callable = isDelegated ? delegationFunction : (handler || delegationFunction)\n let typeEvent = getTypeEvent(originalTypeEvent)\n\n if (!nativeEvents.has(typeEvent)) {\n typeEvent = originalTypeEvent\n }\n\n return [isDelegated, callable, typeEvent]\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n\n // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n if (originalTypeEvent in customEvents) {\n const wrapFunction = fn => {\n return function (event) {\n if (!event.relatedTarget || (event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget))) {\n return fn.call(this, event)\n }\n }\n }\n\n callable = wrapFunction(callable)\n }\n\n const events = getElementEvents(element)\n const handlers = events[typeEvent] || (events[typeEvent] = {})\n const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null)\n\n if (previousFunction) {\n previousFunction.oneOff = previousFunction.oneOff && oneOff\n\n return\n }\n\n const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''))\n const fn = isDelegated ?\n bootstrapDelegationHandler(element, handler, callable) :\n bootstrapHandler(element, callable)\n\n fn.delegationSelector = isDelegated ? handler : null\n fn.callable = callable\n fn.oneOff = oneOff\n fn.uidEvent = uid\n handlers[uid] = fn\n\n element.addEventListener(typeEvent, fn, isDelegated)\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n if (!fn) {\n return\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector))\n delete events[typeEvent][fn.uidEvent]\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {}\n\n for (const [handlerKey, event] of Object.entries(storeElementEvent)) {\n if (handlerKey.includes(namespace)) {\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector)\n }\n }\n}\n\nfunction getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '')\n return customEvents[event] || event\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, false)\n },\n\n one(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, true)\n },\n\n off(element, originalTypeEvent, handler, delegationFunction) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n const inNamespace = typeEvent !== originalTypeEvent\n const events = getElementEvents(element)\n const storeElementEvent = events[typeEvent] || {}\n const isNamespace = originalTypeEvent.startsWith('.')\n\n if (typeof callable !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!Object.keys(storeElementEvent).length) {\n return\n }\n\n removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null)\n return\n }\n\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))\n }\n }\n\n for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '')\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector)\n }\n }\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null\n }\n\n const $ = getjQuery()\n const typeEvent = getTypeEvent(event)\n const inNamespace = event !== typeEvent\n\n let jQueryEvent = null\n let bubbles = true\n let nativeDispatch = true\n let defaultPrevented = false\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args)\n\n $(element).trigger(jQueryEvent)\n bubbles = !jQueryEvent.isPropagationStopped()\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped()\n defaultPrevented = jQueryEvent.isDefaultPrevented()\n }\n\n const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args)\n\n if (defaultPrevented) {\n evt.preventDefault()\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt)\n }\n\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault()\n }\n\n return evt\n }\n}\n\nfunction hydrateObj(obj, meta = {}) {\n for (const [key, value] of Object.entries(meta)) {\n try {\n obj[key] = value\n } catch {\n Object.defineProperty(obj, key, {\n configurable: true,\n get() {\n return value\n }\n })\n }\n }\n\n return obj\n}\n\nexport default EventHandler\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n if (value === 'true') {\n return true\n }\n\n if (value === 'false') {\n return false\n }\n\n if (value === Number(value).toString()) {\n return Number(value)\n }\n\n if (value === '' || value === 'null') {\n return null\n }\n\n if (typeof value !== 'string') {\n return value\n }\n\n try {\n return JSON.parse(decodeURIComponent(value))\n } catch {\n return value\n }\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'))\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n }\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n }\n}\n\nexport default Manipulator\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Manipulator from '../dom/manipulator.js'\nimport { isElement, toType } from './index.js'\n\n/**\n * Class definition\n */\n\nclass Config {\n // Getters\n static get Default() {\n return {}\n }\n\n static get DefaultType() {\n return {}\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!')\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n _configAfterMerge(config) {\n return config\n }\n\n _mergeConfigObj(config, element) {\n const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {} // try to parse\n\n return {\n ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n }\n }\n\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const [property, expectedTypes] of Object.entries(configTypes)) {\n const value = config[property]\n const valueType = isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n }\n }\n}\n\nexport default Config\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data.js'\nimport EventHandler from './dom/event-handler.js'\nimport Config from './util/config.js'\nimport { executeAfterTransition, getElement } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.3.3'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super()\n\n element = getElement(element)\n if (!element) {\n return\n }\n\n this._element = element\n this._config = this._getConfig(config)\n\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n // Public\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated)\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n // Static\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY)\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`\n }\n}\n\nexport default BaseComponent\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { isDisabled, isVisible, parseSelector } from '../util/index.js'\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttribute || (!hrefAttribute.includes('#') && !hrefAttribute.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`\n }\n\n selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null\n }\n\n return selector ? selector.split(',').map(sel => parseSelector(sel)).join(',') : null\n}\n\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector))\n },\n\n parents(element, selector) {\n const parents = []\n let ancestor = element.parentNode.closest(selector)\n\n while (ancestor) {\n parents.push(ancestor)\n ancestor = ancestor.parentNode.closest(selector)\n }\n\n return parents\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous]\n }\n\n previous = previous.previousElementSibling\n }\n\n return []\n },\n // TODO: this is now unused; remove later along with prev()\n next(element, selector) {\n let next = element.nextElementSibling\n\n while (next) {\n if (next.matches(selector)) {\n return [next]\n }\n\n next = next.nextElementSibling\n }\n\n return []\n },\n\n focusableChildren(element) {\n const focusables = [\n 'a',\n 'button',\n 'input',\n 'textarea',\n 'select',\n 'details',\n '[tabindex]',\n '[contenteditable=\"true\"]'\n ].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',')\n\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el))\n },\n\n getSelectorFromElement(element) {\n const selector = getSelector(element)\n\n if (selector) {\n return SelectorEngine.findOne(selector) ? selector : null\n }\n\n return null\n },\n\n getElementFromSelector(element) {\n const selector = getSelector(element)\n\n return selector ? SelectorEngine.findOne(selector) : null\n },\n\n getMultipleElementsFromSelector(element) {\n const selector = getSelector(element)\n\n return selector ? SelectorEngine.find(selector) : []\n }\n}\n\nexport default SelectorEngine\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport {\n defineJQueryPlugin, getElement, isDisabled, isVisible\n} from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'scrollspy'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]'\nconst SELECTOR_TARGET_LINKS = '[href]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst Default = {\n offset: null, // TODO: v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: '0px 0px -25%',\n smoothScroll: false,\n target: null,\n threshold: [0.1, 0.5, 1]\n}\n\nconst DefaultType = {\n offset: '(number|null)', // TODO v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: 'string',\n smoothScroll: 'boolean',\n target: 'element',\n threshold: 'array'\n}\n\n/**\n * Class definition\n */\n\nclass ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element, config)\n\n // this._element is the observablesContainer and config.target the menu links wrapper\n this._targetLinks = new Map()\n this._observableSections = new Map()\n this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element\n this._activeTarget = null\n this._observer = null\n this._previousScrollData = {\n visibleEntryTop: 0,\n parentScrollTop: 0\n }\n this.refresh() // initialize\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n refresh() {\n this._initializeTargetsAndObservables()\n this._maybeEnableSmoothScroll()\n\n if (this._observer) {\n this._observer.disconnect()\n } else {\n this._observer = this._getNewObserver()\n }\n\n for (const section of this._observableSections.values()) {\n this._observer.observe(section)\n }\n }\n\n dispose() {\n this._observer.disconnect()\n super.dispose()\n }\n\n // Private\n _configAfterMerge(config) {\n // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case\n config.target = getElement(config.target) || document.body\n\n // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only\n config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin\n\n if (typeof config.threshold === 'string') {\n config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value))\n }\n\n return config\n }\n\n _maybeEnableSmoothScroll() {\n if (!this._config.smoothScroll) {\n return\n }\n\n // unregister any previous listeners\n EventHandler.off(this._config.target, EVENT_CLICK)\n\n EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {\n const observableSection = this._observableSections.get(event.target.hash)\n if (observableSection) {\n event.preventDefault()\n const root = this._rootElement || window\n const height = observableSection.offsetTop - this._element.offsetTop\n if (root.scrollTo) {\n root.scrollTo({ top: height, behavior: 'smooth' })\n return\n }\n\n // Chrome 60 doesn't support `scrollTo`\n root.scrollTop = height\n }\n })\n }\n\n _getNewObserver() {\n const options = {\n root: this._rootElement,\n threshold: this._config.threshold,\n rootMargin: this._config.rootMargin\n }\n\n return new IntersectionObserver(entries => this._observerCallback(entries), options)\n }\n\n // The logic of selection\n _observerCallback(entries) {\n const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`)\n const activate = entry => {\n this._previousScrollData.visibleEntryTop = entry.target.offsetTop\n this._process(targetElement(entry))\n }\n\n const parentScrollTop = (this._rootElement || document.documentElement).scrollTop\n const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop\n this._previousScrollData.parentScrollTop = parentScrollTop\n\n for (const entry of entries) {\n if (!entry.isIntersecting) {\n this._activeTarget = null\n this._clearActiveClass(targetElement(entry))\n\n continue\n }\n\n const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop\n // if we are scrolling down, pick the bigger offsetTop\n if (userScrollsDown && entryIsLowerThanPrevious) {\n activate(entry)\n // if parent isn't scrolled, let's keep the first visible item, breaking the iteration\n if (!parentScrollTop) {\n return\n }\n\n continue\n }\n\n // if we are scrolling up, pick the smallest offsetTop\n if (!userScrollsDown && !entryIsLowerThanPrevious) {\n activate(entry)\n }\n }\n }\n\n _initializeTargetsAndObservables() {\n this._targetLinks = new Map()\n this._observableSections = new Map()\n\n const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target)\n\n for (const anchor of targetLinks) {\n // ensure that the anchor has an id and is not disabled\n if (!anchor.hash || isDisabled(anchor)) {\n continue\n }\n\n const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element)\n\n // ensure that the observableSection exists & is visible\n if (isVisible(observableSection)) {\n this._targetLinks.set(decodeURI(anchor.hash), anchor)\n this._observableSections.set(anchor.hash, observableSection)\n }\n }\n }\n\n _process(target) {\n if (this._activeTarget === target) {\n return\n }\n\n this._clearActiveClass(this._config.target)\n this._activeTarget = target\n target.classList.add(CLASS_NAME_ACTIVE)\n this._activateParents(target)\n\n EventHandler.trigger(this._element, EVENT_ACTIVATE, { relatedTarget: target })\n }\n\n _activateParents(target) {\n // Activate dropdown parents\n if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, target.closest(SELECTOR_DROPDOWN))\n .classList.add(CLASS_NAME_ACTIVE)\n return\n }\n\n for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {\n // Set triggered links parents as active\n // With both
    `;return f`${W} ${C()}`}function C(){let s=Math.max(0,Math.min(a-2,r-5)),Z=Math.min(r,s+5),W=Array.from(new Array(Z-s).keys()).map(R=>R+s);if(W.length<=1)return null;return f` `;function u(R){R>=0&&Rn.toLowerCase()),b=c.toLowerCase(),o=[],l=0;for(let n=0;n=0&&(o.push(f`${c.slice(l,r)}`),o.push(f`${c.slice(r,r+a.length)}`),l=r+a.length)}return o.push(f`${c.slice(l)}`),f`${o}`}async function bl(){let c=await fI(),i=at("docfx:tocrel");if(!i)return el(),[];let t=at("docfx:disabletocfilter")==="true",e=new URL(i.replace(/.html$/gi,".json"),window.location.href),b="",o="";if(c.length<=0)return el(),[];UI();let l=t?"":localStorage?.getItem("tocFilterUrl")||"",n=t?"":localStorage?.getItem("tocFilter")||"";(l===""||l!==e.toString())&&(n="",t||(localStorage?.setItem("tocFilter",""),localStorage?.setItem("tocFilterUrl",e.toString())));let a=[],r=[];c.forEach(m);let d=document.getElementById("toc");if(d){C();let u=d.querySelectorAll("li.active"),R=u[u.length-1];R&&(R.scrollIntoView({block:"nearest"}),location.hash&&(location.href=location.href))}return r.length>0&&AI(c,r[0]),a;function m(u){let R;if(u.href){let V=new URL(u.href,e),G=u.shortcut??!1;R=Vc(V)?!1:Po(V,window.location)&&!G,R&&(u.items&&(u.expanded=!0),r.push(u))}if(u.items)for(let V of u.items)m(V)&&(R=!0,u.expanded=!0);return R?(a.unshift(u),!0):!1}function C(){it(f` + `;function u(R){R>=0&&Rn.toLowerCase()),b=c.toLowerCase(),o=[],l=0;for(let n=0;n=0&&(o.push(f`${c.slice(l,d)}`),o.push(f`${c.slice(d,d+a.length)}`),l=d+a.length)}return o.push(f`${c.slice(l)}`),f`${o}`}async function dl(){let c=await YI(),i=at("docfx:tocrel");if(!i)return al(),[];let t=at("docfx:disabletocfilter")==="true",e=new URL(i.replace(/.html$/gi,".json"),window.location.href),b="",o="";if(c.length<=0)return al(),[];OI();let l=t?"":localStorage?.getItem("tocFilterUrl")||"",n=t?"":localStorage?.getItem("tocFilter")||"";(l===""||l!==e.toString())&&(n="",t||(localStorage?.setItem("tocFilter",""),localStorage?.setItem("tocFilterUrl",e.toString())));let a=[],d=[];c.forEach(m);let r=document.getElementById("toc");if(r){C();let u=r.querySelectorAll("li.active"),R=u[u.length-1];R&&(R.scrollIntoView({block:"nearest"}),location.hash&&(location.href=location.href))}return d.length>0&&UI(c,d[0]),a;function m(u){let R;if(u.href){let V=new URL(u.href,e),G=u.shortcut??!1;R=Qc(V)?!1:Po(V,window.location)&&!G,R&&(u.items&&(u.expanded=!0),d.push(u))}if(u.items)for(let V of u.items)m(V)&&(R=!0,u.expanded=!0);return R?(a.unshift(u),!0):!1}function C(){nt(f` ${s()}
    ${I(c,!1)||Z()}
    - ${W()}`,d)}function I(u,R){let V=u.map(G=>{let{href:F,name:p,items:Q,expanded:g}=G;if(!p)return null;let h=!Q||Q.length<=0,X=R||n!==""&&p.toLowerCase().includes(n.toLowerCase()),x=h?null:I(Q,X);if(n!==""&&!x&&!p.toLowerCase().includes(n.toLowerCase())&&!X)return null;let A=F?f`${gt(p)}`:h?f`${gt(p)}`:f`${gt(p)}`,U=n!==""&&g!==!1&&x!=null||g===!0;return f` + ${W()}`,r)}function I(u,R){let V=u.map(G=>{let{href:F,name:p,items:Q,expanded:g}=G;if(!p)return null;let h=!Q||Q.length<=0,X=R||n!==""&&p.toLowerCase().includes(n.toLowerCase()),x=h?null:I(Q,X);if(n!==""&&!x&&!p.toLowerCase().includes(n.toLowerCase())&&!X)return null;let A=F?f`${gt(p)}`:h?f`${gt(p)}`:f`${gt(p)}`,U=n!==""&&g!==!1&&x!=null||g===!0;return f`
  • ${h?null:f``} ${A} @@ -54,50 +89,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
  • `;function O(Y){Y.preventDefault(),G.expanded=!U,C()}}).filter(G=>G);return V.length>0?f`
      ${V}
    `:null}function s(){return t?null:f`
    - -
    `;function u(R){n=R.target.value.trim(),localStorage?.setItem("tocFilter",n),C()}}function Z(){return n===""?null:f`
    ${D("searchNoResults",{query:n})}
    `}function W(){return b?f``:null}}function AI(c,i){let t=document.getElementById("nextArticle");if(!t)return;let e=r(c),b=e.findIndex(d=>d===i),o=e[b-1],l=e[b+1];if(!o&&!l)return;let n=o?f``:null,a=l?f``:null;it(f`${n} ${a}`,t);function r(d){let m=[];for(let C of d)C.href&&m.push(C),C.items&&m.push(...r(C.items));return m}}async function fI(){let c=at("docfx:navrel");if(!c)return[];let i=new URL(c.replace(/.html$/gi,".json"),window.location.href),{items:t}=await fetch(i).then(b=>b.json()),e=at("docfx:rel");for(let b of t){let o=b.tocHref??"";if(o){let r=b.homepage??"";if(r){let d=new URL(e+r,window.location.href);b.href=d.href}else b.href=""}else{b.items=[],b.href=e+b.href;continue}let l=new URL(e+o.replace(/.html$/gi,".json"),window.location.href),n=l.pathname.split("/").slice(0,-1).join("/")+"/",{items:a}=await(await fetch(l)).json();for(let r of a){let d=r.href??r.topicHref??"";if(d){let m=new URL(n+d,window.location.href);r.href=m.href}r.items&&ol(l,n,r.items)}b.items=a}return t}function ol(c,i,t){for(let e of t)e.href&&(e.href=new URL(i+e.href,c).href,e.shortcut=!e.href.includes(i)),e.items&&ol(c,i,e.items)}function el(){let c=document.getElementById("toc-actionbar");c&&(c.classList.contains("visually-hidden")||c.classList.add("visually-hidden"))}function UI(){let c=document.getElementById("toc-actionbar");c&&c.classList.contains("visually-hidden")&&c.classList.remove("visually-hidden")}var nl=wc(ll());async function al(){let c=document.getElementById("navbar");if(!c)return[];let i=await l(),t=LI(i),e=n=>f`${gt(n.name)}`,b=f` - ${i.map(n=>e(n))}`;async function o(){let n=f``;it(f`${b} ${n}`,c)}return await o(),t?[t]:[];async function l(){let n=at("docfx:navrel");if(!n)return[];let a=new URL(n.replace(/.html$/gi,".json"),window.location.href),{items:r}=await fetch(a).then(d=>d.json());return r.map(d=>"items"in d?{name:d.name,items:d.items.map(m=>({name:m.name,href:new URL(m.href,a)}))}:{name:d.name,href:new URL(d.href,a)})}}function dl(c){let i=document.getElementById("breadcrumb");i&&it(f` + + `;function u(R){n=R.target.value.trim(),localStorage?.setItem("tocFilter",n),C()}}function Z(){return n===""?null:f`
    ${q("searchNoResults",{query:n})}
    `}function W(){return b?f``:null}}function UI(c,i){let t=document.getElementById("nextArticle");if(!t)return;let e=d(c),b=e.findIndex(r=>r===i),o=e[b-1],l=e[b+1];if(!o&&!l)return;let n=o?f``:null,a=l?f``:null;nt(f`${n} ${a}`,t);function d(r){let m=[];for(let C of r)C.href&&m.push(C),C.items&&m.push(...d(C.items));return m}}async function YI(){let c=at("docfx:navrel");if(!c)return[];let i=new URL(c.replace(/.html$/gi,".json"),window.location.href),{items:t}=await fetch(i).then(b=>b.json()),e=at("docfx:rel");for(let b of t){let o=b.tocHref??"";if(o){let d=b.homepage??"";if(d){let r=new URL(e+d,window.location.href);b.href=r.href}else b.href=""}else{b.items=[],b.href=e+b.href;continue}let l=new URL(e+o.replace(/.html$/gi,".json"),window.location.href),n=l.pathname.split("/").slice(0,-1).join("/")+"/",{items:a}=await(await fetch(l)).json();for(let d of a){let r=d.href??d.topicHref??"";if(r){let m=new URL(n+r,window.location.href);d.href=m.href}d.items&&rl(l,n,d.items)}b.items=a}return t}function rl(c,i,t){for(let e of t)e.href&&(e.href=new URL(i+e.href,c).href,e.shortcut=!e.href.includes(i)),e.items&&rl(c,i,e.items)}function al(){let c=document.getElementById("toc-actionbar");c&&(c.classList.contains("visually-hidden")||c.classList.add("visually-hidden"))}function OI(){let c=document.getElementById("toc-actionbar");c&&c.classList.contains("visually-hidden")&&c.classList.remove("visually-hidden")}var gl=kc(Il());async function sl(){let c=document.getElementById("navbar");if(!c)return[];let i=await l(),t=JI(i),e=n=>f`${gt(n.name)}`,b=f` + ${i.map(n=>e(n))}`;async function o(){let n=f``;nt(f`${b} ${n}`,c)}return await o(),t?[t]:[];async function l(){let n=at("docfx:navrel");if(!n)return[];let a=new URL(n.replace(/.html$/gi,".json"),window.location.href),{items:d}=await fetch(a).then(r=>r.json());return d.map(r=>"items"in r?{name:r.name,items:r.items.map(m=>({name:m.name,href:new URL(m.href,a)}))}:{name:r.name,href:new URL(r.href,a)})}}function ml(c){let i=document.getElementById("breadcrumb");i&&nt(f` `,i)}async function rl(){let c=Array.from(document.querySelectorAll("article h1")).length>1;await YI(c);let i=document.getElementById("affix");i&&it(OI(c),i)}async function YI(c){let i=new nl.default,{anchors:t}=await It();i.options=Object.assign({visible:"hover",icon:"\uE9CB",placement:"left"},t),c?i.add("article h1:not(.no-anchor), article h2:not(.no-anchor), article h3:not(.no-anchor), article h4:not(.no-anchor)"):i.add("article h2:not(.no-anchor), article h3:not(.no-anchor), article h4:not(.no-anchor)"),location.hash&&(location.href=location.href)}function OI(c){let i=c?"article h1, article h2":"article h2, article h3",t=c?"H1":"H2",e=Array.from(document.querySelectorAll(i));if(e.length>0)return f` -
    ${D("inThisArticle")}
    + `,i)}async function Zl(){let c=Array.from(document.querySelectorAll("article h1")).length>1;await LI(c);let i=document.getElementById("affix");i&&nt(vI(c),i)}async function LI(c){let i=new gl.default,{anchors:t}=await It();i.options=Object.assign({visible:"hover",icon:"\uE9CB",placement:"left"},t),c?i.add("article h1:not(.no-anchor), article h2:not(.no-anchor), article h3:not(.no-anchor), article h4:not(.no-anchor)"):i.add("article h2:not(.no-anchor), article h3:not(.no-anchor), article h4:not(.no-anchor)"),location.hash&&(location.href=location.href)}function vI(c){let i=c?"article h1, article h2":"article h2, article h3",t=c?"H1":"H2",e=Array.from(document.querySelectorAll(i));if(e.length>0)return f` +
    ${q("inThisArticle")}
    - `}function LI(c){let i=new URL(window.location.href),t,e=0;for(let b of c.map(o=>"items"in o?o.items:o).flat()){if(Vc(b.href))continue;let o=vI(i,b.href);o===e?t=void 0:o>e&&(e=o,t=b)}return t}function vI(c,i){let t=c.pathname.split("/"),e=i.pathname.split("/"),b=0;for(;b0){let i=c[0].toLowerCase();if(i.length>=2&&i.length<=5&&/^[a-z-]+$/.test(i))return i}return"en"}function gl(c){let i=Uc(),t=window.location.pathname,e=window.location.hash,b=window.location.search,o=t.split("/").filter(Boolean);if(o.length>0){let n=o[0].toLowerCase();n.length>=2&&n.length<=5&&/^[a-z-]+$/.test(n)?o[0]=c:o.unshift(c)}else o.push(c);let l="/"+o.join("/");return(t.endsWith("/")||!l.endsWith(".html")&&!l.includes("."))&&(l+="/"),l+b+e}async function NI(){let c=document.getElementById("language-picker");if(!c)return;let i=await JI();if(!i||i.languages.length<=1){c.style.display="none";return}let t=Uc(),e=i.languages.find(a=>a.code===t)||i.languages.find(a=>a.default)||i.languages[0],o=(await ib()).selectLanguage||"Select language",l=(a,r)=>{a.preventDefault(),r.code!==t&&(window.location.href=gl(r.code))},n=f` - - `;it(n,c)}async function sl(){await NI()}async function ml(){let c=await ib();if(document.querySelectorAll("[data-ui-string]").forEach(t=>{let e=t.getAttribute("data-ui-string");e&&c[e]!==void 0&&(t.textContent=c[e])}),document.querySelectorAll('meta[name^="loc:"]').forEach(t=>{let e=t.name.replace("loc:","");c[e]!==void 0&&(t.content=c[e])}),c.search){let t=document.getElementById("search-query");t&&(t.placeholder=c.search,t.setAttribute("aria-label",c.search));let e=document.getElementById("header-search__form-label");e&&(e.textContent=c.search)}let i={NOTE:"note",TIP:"tip",WARNING:"warning",IMPORTANT:"important",CAUTION:"caution"};for(let[t,e]of Object.entries(i))c[e]&&document.querySelectorAll(`.${t} > h5`).forEach(b=>{b.textContent=c[e]})}async function Zl(){if(Uc()==="en"||document.getElementById("ai-translation-warning"))return;let i=await ib(),t=document.createElement("div");t.id="ai-translation-warning",t.className="ai-translation-warning",t.setAttribute("role","alert"),t.innerHTML=` -
    - - - ${i.aiTranslationWarning} - -
    - `;let e=document.querySelector("header.global-header_wrp");e?e.appendChild(t):document.body.insertBefore(t,document.body.firstChild),requestAnimationFrame(()=>{let b=t.offsetHeight;document.documentElement.style.setProperty("--ai-banner-height",`${b+5}px`)})}function Xl(){let c=document.getElementById("headerSearch");if(!c)return;let i=c.querySelector(".header-search__form"),t=c.querySelector(".header-search__form-input"),e=c.querySelector(".header-search__form-btn"),b=c.querySelector(".header-search__suggestions");function o(I,s,Z){s.classList.contains("header-search--show")||(s.classList.add("header-search--show"),document.body.classList.contains("open-search_wrp")||document.body.classList.add("open-search_wrp"),i.tabIndex===0&&(i.tabIndex=-1),e.tabIndex===-1&&(e.tabIndex=0),t.tabIndex===-1&&(t.tabIndex=0),t.focus(),Z&&I.preventDefault())}function l(I,s,Z){s.classList.contains("header-search--show")&&(s.classList.remove("header-search--show"),document.body.classList.contains("open-search_wrp")&&document.body.classList.remove("open-search_wrp"),s.classList.contains("header-search--open")&&(s.classList.remove("header-search--open"),b.innerHTML=""),i.tabIndex===-1&&(i.tabIndex=0),e.tabIndex===0&&(e.tabIndex=-1),t.tabIndex===0&&(t.tabIndex=-1),t.blur(),t.value="",Z&&I.preventDefault())}function n(I){c.classList.contains("header-search--show")?l(I,c,!0):o(I,c,!0)}e.addEventListener("click",n,{once:!1,passive:!1});function a(I){o(I,c,!1)}t.addEventListener("focus",a,{once:!1,passive:!0});function r(I){I.code==="Enter"&&o(I,c,!1)}i.addEventListener("keyup",r,{once:!1,passive:!0});function d(I){I.code==="Escape"&&l(I,c,!1)}document.addEventListener("keyup",d,{once:!1,passive:!0});function m(I){I.relatedTarget&&!I.relatedTarget.closest(".header-search__form_wrp")&&l(I,c,!1)}t.addEventListener("blur",m,{once:!1,passive:!0}),e.addEventListener("blur",m,{once:!1,passive:!0});function C(I){I.target.closest(".header-search__form_wrp")||l(I,c,!1)}document.addEventListener("click",C,{once:!1,passive:!0})}var Wl=wc(Bl());async function DI(){window.docfx=window.docfx||{};let{start:c}=await It();c?.(),navigator.userAgent.indexOf("docfx/pdf")>=0?await Promise.all([qe(),_e()]):(await ml(),await Promise.all([$o(),cl(),rl(),qe(),t(),_e(),sl(),Zl()])),window.docfx.ready=!0;async function t(){let[I,s]=await Promise.all([al(),bl()]);dl([...I,...s])}Xl();let e={};function b(I,s){return new Wl.default(I,s)}document.querySelectorAll("article a").forEach(I=>{I.querySelector("img")&&b(I,e)});let o=window.pageYOffset||document.documentElement.scrollTop,l="down",n="+80% 0px -10%",a="0px 0px +80%",r=!0,d=(()=>{let I=!1;return function(){I||(window.requestAnimationFrame(()=>{let s=document.getElementById("article");if(!s)return;let Z=window.pageYOffset||document.documentElement.scrollTop,W=Z>o?"down":"up";W!==l&&(l=W,Oc.default.getInstance(s)?.dispose(),Oc.default.getOrCreateInstance(s,{target:"#affix",smoothScroll:!1,rootMargin:l==="down"?n:a}).refresh()),o=Z<=0?0:Z,I=!1}),I=!0)}})();r&&window.addEventListener("scroll",d,{passive:!0});let m=document.getElementById("article");Oc.default.getOrCreateInstance(m,{target:"#affix",smoothScroll:!1,rootMargin:n}).refresh()}DI().catch(console.error); + `}function JI(c){let i=new URL(window.location.href),t,e=0;for(let b of c.map(o=>"items"in o?o.items:o).flat()){if(Qc(b.href))continue;let o=NI(i,b.href);o===e?t=void 0:o>e&&(e=o,t=b)}return t}function NI(c,i){let t=c.pathname.split("/"),e=i.pathname.split("/"),b=0;for(;b=0?await Promise.all([tb(),Pe()]):(await il(),await Promise.all([el(),nl(),Zl(),tb(),t(),Pe(),tl(),cl()])),window.docfx.ready=!0;async function t(){let[I,s]=await Promise.all([sl(),dl()]);ml([...I,...s])}Xl();let e={};function b(I,s){return new Wl.default(I,s)}document.querySelectorAll("article a").forEach(I=>{I.querySelector("img")&&b(I,e)});let o=window.pageYOffset||document.documentElement.scrollTop,l="down",n="+80% 0px -10%",a="0px 0px +80%",d=!0,r=(()=>{let I=!1;return function(){I||(window.requestAnimationFrame(()=>{let s=document.getElementById("article");if(!s)return;let Z=window.pageYOffset||document.documentElement.scrollTop,W=Z>o?"down":"up";W!==l&&(l=W,Lc.default.getInstance(s)?.dispose(),Lc.default.getOrCreateInstance(s,{target:"#affix",smoothScroll:!1,rootMargin:l==="down"?n:a}).refresh()),o=Z<=0?0:Z,I=!1}),I=!0)}})();d&&window.addEventListener("scroll",r,{passive:!0});let m=document.getElementById("article");Lc.default.getOrCreateInstance(m,{target:"#affix",smoothScroll:!1,rootMargin:n}).refresh()}DI().catch(console.error); /*! Bundled license information: bootstrap/js/dist/dom/data.js: diff --git a/templates/tabulareditor/public/docfx.min.js.map b/templates/tabulareditor/public/docfx.min.js.map index 9e4a462b..2b58fdd7 100644 --- a/templates/tabulareditor/public/docfx.min.js.map +++ b/templates/tabulareditor/public/docfx.min.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../../node_modules/bootstrap/js/src/dom/data.js", "../../node_modules/bootstrap/js/src/util/index.js", "../../node_modules/bootstrap/js/src/dom/event-handler.js", "../../node_modules/bootstrap/js/src/dom/manipulator.js", "../../node_modules/bootstrap/js/src/util/config.js", "../../node_modules/bootstrap/js/src/base-component.js", "../../node_modules/bootstrap/js/src/dom/selector-engine.js", "../../node_modules/bootstrap/js/src/scrollspy.js", "../../node_modules/anchor-js/anchor.js", "../../node_modules/simplelightbox/dist/simple-lightbox.modules.js", "../../node_modules/@popperjs/core/lib/index.js", "../../node_modules/@popperjs/core/lib/enums.js", "../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../node_modules/@popperjs/core/lib/utils/math.js", "../../node_modules/@popperjs/core/lib/utils/userAgent.js", "../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../node_modules/@popperjs/core/lib/utils/within.js", "../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../node_modules/@popperjs/core/lib/utils/getVariation.js", "../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../node_modules/@popperjs/core/lib/modifiers/flip.js", "../../node_modules/@popperjs/core/lib/modifiers/hide.js", "../../node_modules/@popperjs/core/lib/modifiers/offset.js", "../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../node_modules/@popperjs/core/lib/utils/debounce.js", "../../node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../node_modules/@popperjs/core/lib/createPopper.js", "../../node_modules/@popperjs/core/lib/popper-lite.js", "../../node_modules/@popperjs/core/lib/popper.js", "../../node_modules/bootstrap/js/src/dom/data.js", "../../node_modules/bootstrap/js/src/util/index.js", "../../node_modules/bootstrap/js/src/dom/event-handler.js", "../../node_modules/bootstrap/js/src/dom/manipulator.js", "../../node_modules/bootstrap/js/src/util/config.js", "../../node_modules/bootstrap/js/src/base-component.js", "../../node_modules/bootstrap/js/src/dom/selector-engine.js", "../../node_modules/bootstrap/js/src/util/component-functions.js", "../../node_modules/bootstrap/js/src/alert.js", "../../node_modules/bootstrap/js/src/button.js", "../../node_modules/bootstrap/js/src/util/swipe.js", "../../node_modules/bootstrap/js/src/carousel.js", "../../node_modules/bootstrap/js/src/collapse.js", "../../node_modules/bootstrap/js/src/dropdown.js", "../../node_modules/bootstrap/js/src/util/backdrop.js", "../../node_modules/bootstrap/js/src/util/focustrap.js", "../../node_modules/bootstrap/js/src/util/scrollbar.js", "../../node_modules/bootstrap/js/src/modal.js", "../../node_modules/bootstrap/js/src/offcanvas.js", "../../node_modules/bootstrap/js/src/util/sanitizer.js", "../../node_modules/bootstrap/js/src/util/template-factory.js", "../../node_modules/bootstrap/js/src/tooltip.js", "../../node_modules/bootstrap/js/src/popover.js", "../../node_modules/bootstrap/js/src/scrollspy.js", "../../node_modules/bootstrap/js/src/tab.js", "../../node_modules/bootstrap/js/src/toast.js", "../src/docfx.ts", "../../node_modules/lit-html/src/lit-html.ts", "../src/helper.ts", "../src/highlight.ts", "../src/theme.ts", "../src/markdown.ts", "../../node_modules/lit-html/src/directive.ts", "../../node_modules/lit-html/src/directives/class-map.ts", "../src/search.ts", "../src/toc.ts", "../src/nav.ts", "../src/language.ts", "../src/hubspot/modules/site-header.ts"], - "sourcesContent": ["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1_000_000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n/**\n * Properly escape IDs selectors to handle weird IDs\n * @param {string} selector\n * @returns {string}\n */\nconst parseSelector = selector => {\n if (selector && window.CSS && window.CSS.escape) {\n // document.querySelector needs escaping to handle IDs (html5+) containing for instance /\n selector = selector.replace(/#([^\\s\"#']+)/g, (match, id) => `#${CSS.escape(id)}`)\n }\n\n return selector\n}\n\n// Shout-out Angus Croll (https://goo.gl/pxwQGp)\nconst toType = object => {\n if (object === null || object === undefined) {\n return `${object}`\n }\n\n return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * Public Util API\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = object => {\n if (!object || typeof object !== 'object') {\n return false\n }\n\n if (typeof object.jquery !== 'undefined') {\n object = object[0]\n }\n\n return typeof object.nodeType !== 'undefined'\n}\n\nconst getElement = object => {\n // it's a jQuery object or a node element\n if (isElement(object)) {\n return object.jquery ? object[0] : object\n }\n\n if (typeof object === 'string' && object.length > 0) {\n return document.querySelector(parseSelector(object))\n }\n\n return null\n}\n\nconst isVisible = element => {\n if (!isElement(element) || element.getClientRects().length === 0) {\n return false\n }\n\n const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'\n // Handle `details` element as its content may falsie appear visible when it is closed\n const closedDetails = element.closest('details:not([open])')\n\n if (!closedDetails) {\n return elementIsVisible\n }\n\n if (closedDetails !== element) {\n const summary = element.closest('summary')\n if (summary && summary.parentNode !== closedDetails) {\n return false\n }\n\n if (summary === null) {\n return false\n }\n }\n\n return elementIsVisible\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\n/**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\nconst reflow = element => {\n element.offsetHeight // eslint-disable-line no-unused-expressions\n}\n\nconst getjQuery = () => {\n if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return window.jQuery\n }\n\n return null\n}\n\nconst DOMContentLoadedCallbacks = []\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n for (const callback of DOMContentLoadedCallbacks) {\n callback()\n }\n })\n }\n\n DOMContentLoadedCallbacks.push(callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {\n return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue\n}\n\nconst executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback)\n return\n }\n\n const durationPadding = 5\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding\n\n let called = false\n\n const handler = ({ target }) => {\n if (target !== transitionElement) {\n return\n }\n\n called = true\n transitionElement.removeEventListener(TRANSITION_END, handler)\n execute(callback)\n }\n\n transitionElement.addEventListener(TRANSITION_END, handler)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement)\n }\n }, emulatedDuration)\n}\n\n/**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\nconst getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n const listLength = list.length\n let index = list.indexOf(activeElement)\n\n // if the element does not exist in the list return an element\n // depending on the direction and if cycle is allowed\n if (index === -1) {\n return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0]\n }\n\n index += shouldGetNext ? 1 : -1\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))]\n}\n\nexport {\n defineJQueryPlugin,\n execute,\n executeAfterTransition,\n findShadowRoot,\n getElement,\n getjQuery,\n getNextActiveElement,\n getTransitionDurationFromElement,\n getUID,\n isDisabled,\n isElement,\n isRTL,\n isVisible,\n noop,\n onDOMContentLoaded,\n parseSelector,\n reflow,\n triggerTransitionEnd,\n toType\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from '../util/index.js'\n\n/**\n * Constants\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nconst eventRegistry = {} // Events storage\nlet uidEvent = 1\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n}\n\nconst nativeEvents = new Set([\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll'\n])\n\n/**\n * Private methods\n */\n\nfunction makeEventUid(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++\n}\n\nfunction getElementEvents(element) {\n const uid = makeEventUid(element)\n\n element.uidEvent = uid\n eventRegistry[uid] = eventRegistry[uid] || {}\n\n return eventRegistry[uid]\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n hydrateObj(event, { delegateTarget: element })\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn)\n }\n\n return fn.apply(element, [event])\n }\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector)\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (const domElement of domElements) {\n if (domElement !== target) {\n continue\n }\n\n hydrateObj(event, { delegateTarget: target })\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn)\n }\n\n return fn.apply(target, [event])\n }\n }\n }\n}\n\nfunction findHandler(events, callable, delegationSelector = null) {\n return Object.values(events)\n .find(event => event.callable === callable && event.delegationSelector === delegationSelector)\n}\n\nfunction normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n const isDelegated = typeof handler === 'string'\n // TODO: tooltip passes `false` instead of selector, so we need to check\n const callable = isDelegated ? delegationFunction : (handler || delegationFunction)\n let typeEvent = getTypeEvent(originalTypeEvent)\n\n if (!nativeEvents.has(typeEvent)) {\n typeEvent = originalTypeEvent\n }\n\n return [isDelegated, callable, typeEvent]\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n\n // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n if (originalTypeEvent in customEvents) {\n const wrapFunction = fn => {\n return function (event) {\n if (!event.relatedTarget || (event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget))) {\n return fn.call(this, event)\n }\n }\n }\n\n callable = wrapFunction(callable)\n }\n\n const events = getElementEvents(element)\n const handlers = events[typeEvent] || (events[typeEvent] = {})\n const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null)\n\n if (previousFunction) {\n previousFunction.oneOff = previousFunction.oneOff && oneOff\n\n return\n }\n\n const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''))\n const fn = isDelegated ?\n bootstrapDelegationHandler(element, handler, callable) :\n bootstrapHandler(element, callable)\n\n fn.delegationSelector = isDelegated ? handler : null\n fn.callable = callable\n fn.oneOff = oneOff\n fn.uidEvent = uid\n handlers[uid] = fn\n\n element.addEventListener(typeEvent, fn, isDelegated)\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n if (!fn) {\n return\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector))\n delete events[typeEvent][fn.uidEvent]\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {}\n\n for (const [handlerKey, event] of Object.entries(storeElementEvent)) {\n if (handlerKey.includes(namespace)) {\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector)\n }\n }\n}\n\nfunction getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '')\n return customEvents[event] || event\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, false)\n },\n\n one(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, true)\n },\n\n off(element, originalTypeEvent, handler, delegationFunction) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n const inNamespace = typeEvent !== originalTypeEvent\n const events = getElementEvents(element)\n const storeElementEvent = events[typeEvent] || {}\n const isNamespace = originalTypeEvent.startsWith('.')\n\n if (typeof callable !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!Object.keys(storeElementEvent).length) {\n return\n }\n\n removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null)\n return\n }\n\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))\n }\n }\n\n for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '')\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector)\n }\n }\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null\n }\n\n const $ = getjQuery()\n const typeEvent = getTypeEvent(event)\n const inNamespace = event !== typeEvent\n\n let jQueryEvent = null\n let bubbles = true\n let nativeDispatch = true\n let defaultPrevented = false\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args)\n\n $(element).trigger(jQueryEvent)\n bubbles = !jQueryEvent.isPropagationStopped()\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped()\n defaultPrevented = jQueryEvent.isDefaultPrevented()\n }\n\n const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args)\n\n if (defaultPrevented) {\n evt.preventDefault()\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt)\n }\n\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault()\n }\n\n return evt\n }\n}\n\nfunction hydrateObj(obj, meta = {}) {\n for (const [key, value] of Object.entries(meta)) {\n try {\n obj[key] = value\n } catch {\n Object.defineProperty(obj, key, {\n configurable: true,\n get() {\n return value\n }\n })\n }\n }\n\n return obj\n}\n\nexport default EventHandler\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n if (value === 'true') {\n return true\n }\n\n if (value === 'false') {\n return false\n }\n\n if (value === Number(value).toString()) {\n return Number(value)\n }\n\n if (value === '' || value === 'null') {\n return null\n }\n\n if (typeof value !== 'string') {\n return value\n }\n\n try {\n return JSON.parse(decodeURIComponent(value))\n } catch {\n return value\n }\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'))\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n }\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n }\n}\n\nexport default Manipulator\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Manipulator from '../dom/manipulator.js'\nimport { isElement, toType } from './index.js'\n\n/**\n * Class definition\n */\n\nclass Config {\n // Getters\n static get Default() {\n return {}\n }\n\n static get DefaultType() {\n return {}\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!')\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n _configAfterMerge(config) {\n return config\n }\n\n _mergeConfigObj(config, element) {\n const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {} // try to parse\n\n return {\n ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n }\n }\n\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const [property, expectedTypes] of Object.entries(configTypes)) {\n const value = config[property]\n const valueType = isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n }\n }\n}\n\nexport default Config\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data.js'\nimport EventHandler from './dom/event-handler.js'\nimport Config from './util/config.js'\nimport { executeAfterTransition, getElement } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.3.3'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super()\n\n element = getElement(element)\n if (!element) {\n return\n }\n\n this._element = element\n this._config = this._getConfig(config)\n\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n // Public\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated)\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n // Static\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY)\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`\n }\n}\n\nexport default BaseComponent\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { isDisabled, isVisible, parseSelector } from '../util/index.js'\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttribute || (!hrefAttribute.includes('#') && !hrefAttribute.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`\n }\n\n selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null\n }\n\n return selector ? selector.split(',').map(sel => parseSelector(sel)).join(',') : null\n}\n\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector))\n },\n\n parents(element, selector) {\n const parents = []\n let ancestor = element.parentNode.closest(selector)\n\n while (ancestor) {\n parents.push(ancestor)\n ancestor = ancestor.parentNode.closest(selector)\n }\n\n return parents\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous]\n }\n\n previous = previous.previousElementSibling\n }\n\n return []\n },\n // TODO: this is now unused; remove later along with prev()\n next(element, selector) {\n let next = element.nextElementSibling\n\n while (next) {\n if (next.matches(selector)) {\n return [next]\n }\n\n next = next.nextElementSibling\n }\n\n return []\n },\n\n focusableChildren(element) {\n const focusables = [\n 'a',\n 'button',\n 'input',\n 'textarea',\n 'select',\n 'details',\n '[tabindex]',\n '[contenteditable=\"true\"]'\n ].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',')\n\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el))\n },\n\n getSelectorFromElement(element) {\n const selector = getSelector(element)\n\n if (selector) {\n return SelectorEngine.findOne(selector) ? selector : null\n }\n\n return null\n },\n\n getElementFromSelector(element) {\n const selector = getSelector(element)\n\n return selector ? SelectorEngine.findOne(selector) : null\n },\n\n getMultipleElementsFromSelector(element) {\n const selector = getSelector(element)\n\n return selector ? SelectorEngine.find(selector) : []\n }\n}\n\nexport default SelectorEngine\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport {\n defineJQueryPlugin, getElement, isDisabled, isVisible\n} from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'scrollspy'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]'\nconst SELECTOR_TARGET_LINKS = '[href]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst Default = {\n offset: null, // TODO: v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: '0px 0px -25%',\n smoothScroll: false,\n target: null,\n threshold: [0.1, 0.5, 1]\n}\n\nconst DefaultType = {\n offset: '(number|null)', // TODO v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: 'string',\n smoothScroll: 'boolean',\n target: 'element',\n threshold: 'array'\n}\n\n/**\n * Class definition\n */\n\nclass ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element, config)\n\n // this._element is the observablesContainer and config.target the menu links wrapper\n this._targetLinks = new Map()\n this._observableSections = new Map()\n this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element\n this._activeTarget = null\n this._observer = null\n this._previousScrollData = {\n visibleEntryTop: 0,\n parentScrollTop: 0\n }\n this.refresh() // initialize\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n refresh() {\n this._initializeTargetsAndObservables()\n this._maybeEnableSmoothScroll()\n\n if (this._observer) {\n this._observer.disconnect()\n } else {\n this._observer = this._getNewObserver()\n }\n\n for (const section of this._observableSections.values()) {\n this._observer.observe(section)\n }\n }\n\n dispose() {\n this._observer.disconnect()\n super.dispose()\n }\n\n // Private\n _configAfterMerge(config) {\n // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case\n config.target = getElement(config.target) || document.body\n\n // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only\n config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin\n\n if (typeof config.threshold === 'string') {\n config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value))\n }\n\n return config\n }\n\n _maybeEnableSmoothScroll() {\n if (!this._config.smoothScroll) {\n return\n }\n\n // unregister any previous listeners\n EventHandler.off(this._config.target, EVENT_CLICK)\n\n EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {\n const observableSection = this._observableSections.get(event.target.hash)\n if (observableSection) {\n event.preventDefault()\n const root = this._rootElement || window\n const height = observableSection.offsetTop - this._element.offsetTop\n if (root.scrollTo) {\n root.scrollTo({ top: height, behavior: 'smooth' })\n return\n }\n\n // Chrome 60 doesn't support `scrollTo`\n root.scrollTop = height\n }\n })\n }\n\n _getNewObserver() {\n const options = {\n root: this._rootElement,\n threshold: this._config.threshold,\n rootMargin: this._config.rootMargin\n }\n\n return new IntersectionObserver(entries => this._observerCallback(entries), options)\n }\n\n // The logic of selection\n _observerCallback(entries) {\n const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`)\n const activate = entry => {\n this._previousScrollData.visibleEntryTop = entry.target.offsetTop\n this._process(targetElement(entry))\n }\n\n const parentScrollTop = (this._rootElement || document.documentElement).scrollTop\n const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop\n this._previousScrollData.parentScrollTop = parentScrollTop\n\n for (const entry of entries) {\n if (!entry.isIntersecting) {\n this._activeTarget = null\n this._clearActiveClass(targetElement(entry))\n\n continue\n }\n\n const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop\n // if we are scrolling down, pick the bigger offsetTop\n if (userScrollsDown && entryIsLowerThanPrevious) {\n activate(entry)\n // if parent isn't scrolled, let's keep the first visible item, breaking the iteration\n if (!parentScrollTop) {\n return\n }\n\n continue\n }\n\n // if we are scrolling up, pick the smallest offsetTop\n if (!userScrollsDown && !entryIsLowerThanPrevious) {\n activate(entry)\n }\n }\n }\n\n _initializeTargetsAndObservables() {\n this._targetLinks = new Map()\n this._observableSections = new Map()\n\n const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target)\n\n for (const anchor of targetLinks) {\n // ensure that the anchor has an id and is not disabled\n if (!anchor.hash || isDisabled(anchor)) {\n continue\n }\n\n const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element)\n\n // ensure that the observableSection exists & is visible\n if (isVisible(observableSection)) {\n this._targetLinks.set(decodeURI(anchor.hash), anchor)\n this._observableSections.set(anchor.hash, observableSection)\n }\n }\n }\n\n _process(target) {\n if (this._activeTarget === target) {\n return\n }\n\n this._clearActiveClass(this._config.target)\n this._activeTarget = target\n target.classList.add(CLASS_NAME_ACTIVE)\n this._activateParents(target)\n\n EventHandler.trigger(this._element, EVENT_ACTIVATE, { relatedTarget: target })\n }\n\n _activateParents(target) {\n // Activate dropdown parents\n if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, target.closest(SELECTOR_DROPDOWN))\n .classList.add(CLASS_NAME_ACTIVE)\n return\n }\n\n for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {\n // Set triggered links parents as active\n // With both