w=h[q],l+='<div class="devsite-result-item devsite-nav-label" id="suggestion-reference-'+_ds.Y(q)+'" role="listitem" index=":'+_ds.Y(q)+'">'+B8(w.getPath(),w.getTitle(),_ds.rg(w,14),"Reference Suggestion Click",_ds.u(w,3),
_ds.u(w,4),f,_ds.Gc(w,10,_ds.qc)[0])+"</div>";l+="</devsite-analytics-scope></div>"}l+=0<c.length&&0<b.length+d.length+h.length?'<hr role="none">':"";if(0<c.length){l+='<div class="devsite-suggest-sub-section" role="listitem"><div class="devsite-suggest-header" id="devsite-suggest-header-other-products" role="heading" aria-level="2"><span role="columnheader">Products</span></div><devsite-analytics-scope category="Site-Wide Custom Events" label="Search" role="list" aria-labelledby="devsite-suggest-header-other-products" action="Product Suggestion Click">';
b=c.length;for(d=0;d<b;d++)h=c[d],l+='<div class="devsite-result-item devsite-nav-label" id="suggestion-other-products-'+_ds.Y(d)+'" role="listitem" index=":'+_ds.Y(d)+'">'+B8(h.getPath(),h.getTitle(),_ds.rg(h,14),"Product Suggestion Click")+"</div>";l+="</devsite-analytics-scope></div>"}l+="</div>"+(k?'<div class="devsite-suggest-footer">'+(f?z8(e):"")+A8(g,f,a)+"</div>":"")+"</div>";return(0,_ds.S)(l)};var Bua=/[ .()<>{}\[\]\/:,]+/,Cua=0,Fua=function(a){a.g&&(a.j.listen(a.g,"suggest-service-search",b=>{a:{var c=a.oa.querySelector(".highlight");if(c&&(c=c.querySelector(".devsite-result-item-link"))){c.click();break a}C8(a,b.detail.originalEvent,!!a.ra)}}),a.j.listen(a.g,"suggest-service-suggestions-received",b=>void Dua(a,b)),a.j.listen(a.g,"suggest-service-focus",()=>{D8(a,"cloud-track-search-focus",null);a.Ba=!0;E8(a,!0)}),a.j.listen(a.g,"suggest-service-blur",()=>{E8(a,!1)}),a.j.listen(a.g,"suggest-service-input",
()=>{!a.xa["Text Entered Into Search Bar"]&&a.g.query.trim()&&(a.dispatchEvent(new CustomEvent("devsite-analytics-observation",{detail:{category:"Site-Wide Custom Events",label:"Search",action:"Text Entered Into Search Bar"},bubbles:!0})),a.xa["Text Entered Into Search Bar"]=!0);a.Ba&&(D8(a,"cloud-track-search-input",null),a.Ba=!1)}),a.j.listen(a.g,"suggest-service-navigate",b=>void Eua(a,b)),a.j.listen(document.body,"devsite-page-changed",()=>a.xa={}),_ds.Xba(a.g));a.m&&a.j.listen(a.m,"submit",b=>
{C8(a,b)});a.oa&&a.j.listen(a.oa,"click",b=>{const c=b.target;if(c.closest(".devsite-result-item-link")){E8(a,!1);let d;D8(a,"cloud-track-search-submit",{query:null==(d=a.v)?void 0:d.value,yM:c})}c.classList.contains("devsite-search-project-scope")&&C8(a,b,!0)});a.Ea&&a.j.listen(a.Ea,"click",()=>void E8(a,!0));a.Fa&&a.j.listen(a.Fa,"click",()=>void E8(a,!1))},Dua=function(a,b){b=b.detail;var c=b.suggestions;b=b.query;if(a.g.query.toLowerCase().startsWith(b.toLowerCase()))if(c){var d=c.og();c=d.filter(w=>
2===w.Gj());var e=d.filter(w=>3===w.Gj()),f=d.filter(w=>4===w.Gj()).slice(0,5),g=d.filter(w=>1===w.Gj());d=c.length+f.length+g.length;for(var h of f)h.setPath(_ds.ml(`${a.ra||"/s/results"}/?q=${h.getTitle()}`).toString());var k=b.split(Bua);e.forEach(w=>_ds.Iba(w,_ds.Gc(w,10,_ds.qc).filter(A=>k.some(z=>A.includes(z)))));h=a.getAttribute("project-name")||"";var l=a.hasAttribute("project-scope"),n=a.hasAttribute("enable-search"),q=a.getAttribute("tenant-name")||"";c={pages:c,projectName:h,bC:l,uL:g,
EL:f,query:b,QL:e,nC:n,Ar:q};0===d?_ds.Zp(a.ea,zua,c):(_ds.Zp(a.ea,Aua,c),Gua(a,b));a.setAttribute("aria-expanded","true");a.ea.removeAttribute("hidden")}else a.ea.setAttribute("hidden",""),a.setAttribute("aria-expanded","false")},D8=function(a,b,c=null){a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0}))},E8=function(a,b){if(a.Ca!==b){_ds.yR(a.g,b);if(a.Ca=b)a.setAttribute("search-active","");else{let c=a.oa.querySelector(".highlight");c&&c.classList.remove("highlight");a.removeAttribute("search-active");
a.setAttribute("aria-expanded","false");_ds.Nj(a.ea)}a.hasAttribute("capture")||a.dispatchEvent(new CustomEvent("devsite-search-toggle",{detail:{active:b},bubbles:!0}))}},Eua=function(a,b){var c=b.detail;b=a.ea.querySelector(".highlight");let d;const e=Array.from(a.ea.querySelectorAll(".devsite-result-item"));let f=[];let g,h=-1;if(b){var k=_ds.mk(b,l=>l.classList.contains("devsite-suggest-section"));f=Array.from(k.querySelectorAll(".devsite-result-item"));k=_ds.Vj(b.parentNode.parentNode);g=_ds.Wj(b.parentNode.parentNode);
h=e.indexOf(b)}switch(c.keyCode){case 37:if(!k&&!g)return;b&&(c=b.getAttribute("index"),g?(d=g.querySelector('[index="'+c+'"]'))||(d=_ds.hb(Array.from(g.querySelectorAll("[index]")))):k&&((d=k.querySelector('[index="'+c+'"]'))||(d=_ds.hb(Array.from(k.querySelectorAll("[index]"))))));break;case 39:if(!k&&!g)return;b&&(c=b.getAttribute("index"),k?(d=k.querySelector('[index="'+c+'"]'))||(d=_ds.hb(Array.from(k.querySelectorAll("[index]")))):g&&((d=g.querySelector('[index="'+c+'"]'))||(d=_ds.hb(Array.from(g.querySelectorAll("[index]"))))));
break;case 38:b?(d=e[h-1])||(d=_ds.hb(f)):d=_ds.hb(e);break;case 40:b?(d=e[h+1])||(d=f[0]):d=e[0]}b&&(b.classList.remove("highlight"),b.removeAttribute("aria-selected"));d&&(a.v.setAttribute("aria-activedescendant",d.id),d.setAttribute("aria-selected","true"),d.classList.add("highlight"),d.scrollIntoViewIfNeeded&&d.scrollIntoViewIfNeeded()||d.scrollIntoView())},C8=async function(a,b,c=!1){b.preventDefault();b.stopPropagation();if(a.hasAttribute("enable-search")){a.xa["Full Site Search"]||(a.dispatchEvent(new CustomEvent("devsite-analytics-observation",
{detail:{category:"Site-Wide Custom Events",label:"Search",action:"Full Site Search"},bubbles:!0})),a.xa["Full Site Search"]=!0);let d;D8(a,"cloud-track-search-submit",{query:null==(d=a.v)?void 0:d.value});b=c&&a.ra?_ds.ml(a.ra):_ds.ml(a.m.getAttribute("action"));c=new _ds.Ek(b.href);a.g.query&&_ds.Sk(c,"q",a.g.query);b.search=c.g.toString();await DevsiteApp.fetchPage(b.href,!a.hasAttribute("disable-history"));E8(a,!1)}},Gua=function(a,b){b=new RegExp(`(${_ds.mj(b)})`,"ig");a=a.ea.querySelectorAll(".devsite-suggestion-fragment");
for(const c of a)a=c.innerHTML,a=a.replace(b,"<b>$1</b>"),_ds.Id(c,_ds.ti(a))},F8=class extends _ds.Fi{static get observedAttributes(){return["project-scope","url-scoped","disabled"]}constructor(){super();this.Ca=!1;this.xa={};this.ya="";this.ra=null;this.j=new _ds.E;this.g=null;this.Ba=!1}disconnectedCallback(){_ds.G(this.j);this.g&&(this.g.dispose(),this.g=null)}attributeChangedCallback(a,b,c){switch(a){case "project-scope":this.ya=c||"";this.g&&(this.g.ra=this.ya);break;case "url-scoped":this.ra=
c;break;case "disabled":this.v&&(this.v.disabled=null!==c)}}connectedCallback(){if(this.m=this.querySelector("form")){this.v=this.m.querySelector(".devsite-search-query");this.Ea=this.m.querySelector(".devsite-search-button[search-open]");this.Fa=this.querySelector(".devsite-search-button[search-close]");var a=`devsite-search-popout-container-id-${++Cua}`;this.v.setAttribute("aria-controls",a);this.oa=_ds.M(yua,{id:a});this.ea=this.oa.querySelector(".devsite-suggest-results-container");this.m.appendChild(this.oa);
this.hasAttribute("project-scope")&&(this.ya=this.getAttribute("project-scope"));this.hasAttribute("url-scoped")&&(this.ra=this.getAttribute("url-scoped"));this.m&&this.v&&(this.g=new _ds.zR(this,this.m,this.v),this.g.h=!0,this.g.Ba=this.hasAttribute("enable-query-completion"),this.g.oa=!0,this.g.ya=!0,this.g.Ea=!0,this.g.ra=this.ya,this.g.h=this.hasAttribute("enable-suggestions"));Fua(this)}}};F8.prototype.connectedCallback=F8.prototype.connectedCallback;F8.prototype.attributeChangedCallback=F8.prototype.attributeChangedCallback;
F8.prototype.disconnectedCallback=F8.prototype.disconnectedCallback;try{window.customElements.define("devsite-search",F8)}catch(a){console.warn("devsite.app.customElement.DevsiteSearch",a)};})(_ds_www);
ØA
—Eoúô