1import{r as Z,c as ee,t as te}from"./focus-trap.BjQt658G.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"15cd164079cbf20a10132d4615f9ae3955fe5370"};var n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="40a56750-99bf-4a85-961a-581935776433",e._sentryDebugIdIdentifier="sentry-dbid-40a56750-99bf-4a85-961a-581935776433")}catch{}})();const ne=10;function T(e,n){if(!e||typeof e!="object")return"";const t=e[n];return typeof t=="string"?t:Array.isArray(t)?t.find(s=>typeof s=="string")??"":""}function re(e){return e?`${e} result${e===1?"":"s"}`:""}const ae=300,k=2,se=8,ce='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></svg>';function S(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U(e){return String(e??"").replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}function ie(e,n){const t=U(e);if(!n)return S(t);const a=new RegExp(`(${oe(n)})`,"gi");return S(t).replace(a,"<mark>$1</mark>")}function le(e){if(!e)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":n.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function K(e){try{const n=localStorage.getItem(e);if(!n)return[];const t=JSON.parse(n);return Array.isArray(t)?t.filter(a=>typeof a=="string"):[]}catch{return[]}}function N(e,n){const t=n.trim();if(t.length<k)return;const a=K(e).filter(o=>o.toLowerCase()!==t.toLowerCase()),s=[t,...a].slice(0,se);try{localStorage.setItem(e,JSON.stringify(s))}catch{}}function O(e,n,t){if(!e)return;const a=K(n);if(!a.length){e.innerHTML="",e.closest(".ur-search-initial__section")?.setAttribute("hidden","");return}e.closest(".ur-search-initial__section")?.removeAttribute("hidden"),e.innerHTML=a.map(s=>`<button type="button" class="ur-search-initial__tag" data-recent-term="${S(s)}">${ce}${S(s)}</button>`).join(""),e.querySelectorAll("[data-recent-term]").forEach(s=>{s.addEventListener("click",()=>{const o=s.getAttribute("data-recent-term")??"";t(o)})})}function ue(e,n,t){const a=T(e.meta,"title")||U(e.excerpt??"")||"Untitled",s=T(e.meta,"category"),o=le(T(e.meta,"publishedAt")),i=t(String(e.url??""));return`<li class="ur-search-results__item" role="option"><a href="${S(i)}" class="ur-search-results__link"><div class="ur-search-results__content"><div class="ur-search-results__title">${ie(a,n)}</div><div class="ur-search-results__meta-row">${s?`<span class="ur-search-results__category">${S(s)}</span>`:""}${o?`<span class="ur-search-results__meta">${S(o)}</span>`:""}</div></div></a></li>`}function j(e){const{root:n,input:t,results:a,countEl:s,emptyEl:o,wrapper:i,loadingEl:l,initialEl:u,recentTagsEl:p,clearBtn:g,recentSearchesKey:d,canonicalUrl:E,loadSearchSource:y,site:ge,activeClass:q="ur-search--active",hasValueClass:F="ur-search--has-value",bodyLockClass:x,onClose:R}=e;let D=null,w=null,$=0,f=-1;function m(r){n.classList.toggle(q,r),x&&document.body.classList.toggle(x,r)}function W(){R?R():m(!1)}function Y(r){n.classList.toggle(F,r)}function v(){u&&(u.style.display="none"),l&&(l.style.display="none"),o.style.display="none",i.style.display="none"}function M(){v(),u&&(u.style.display="block"),s.textContent="",O(p,d,r=>{t.value=r,b(r),t.focus()}),m(!0)}function J(){v(),l&&(l.style.display="block"),s.textContent="",m(!0)}function Q(){v(),o.style.display="block",s.textContent="",m(!0)}function X(r,c){v(),i.style.display="block",a.innerHTML=c,s.textContent=re(r),m(!0)}function z(){v(),o.style.display="block";const r=o.querySelector(".ur-search-empty__title"),c=o.querySelector(".ur-search-empty__text");r&&(r.textContent="Search is unavailable right now"),c&&(c.textContent="Press Enter to search, or try again in a moment."),s.textContent="",m(!0)}function B(r){r.forEach((c,h)=>{const L=h===f;c.classList.toggle("ur-search-results__link--focused",L),L&&c.scrollIntoView({block:"nearest"})})}async function b(r){if(w=r,f=-1,Y(!!r),!r){a.innerHTML="",s.textContent="",M();return}if(r.length<k){M();return}J();try{D??(D=await y())}catch{z();return}const c=await D.search(r);if(w!==r)return;const h=await Promise.all(c.results.map(_=>_.data()));if(w!==r)return;const L=h.slice(0,ne);if(!L.length){Q();return}const G=L.map(_=>ue(_,r,E)).join("");X(L.length,G),N(d,r),O(p,d,_=>{t.value=_,b(_)})}t.addEventListener("focus",()=>{y().catch(()=>{}),t.value.trim()?m(!0):M()}),t.addEventListener("input",()=>{const r=t.value.trim();clearTimeout($),$=window.setTimeout(()=>{b(r)},ae)}),t.addEventListener("keydown",r=>{if(!n.classList.contains(q))return;const c=a.querySelectorAll(".ur-search-results__link");switch(r.key){case"ArrowDown":{r.preventDefault(),f=Math.min(f+1,c.length-1),B(c);break}case"ArrowUp":{r.preventDefault(),f=Math.max(f-1,-1),B(c),f===-1&&t.focu
1s();break}case"Enter":{const h=c[f];f>=0&&h instanceof HTMLElement&&(r.preventDefault(),h.click());break}case"Escape":{W(),f=-1,t.blur();break}}}),g?.addEventListener("click",()=>{t.value="",b(""),t.focus()}),a.addEventListener("click",r=>{const c=r.target;if(c instanceof Element&&c.closest("a")){const h=t.value.trim();h.length>=k&&N(d,h)}}),document.addEventListener("click",r=>{const c=r.target;c instanceof Node&&!n.contains(c)&&m(!1)})}const A=new WeakMap,C=new WeakMap;function de(e){e.classList.add("ur-search-modal--active"),e.setAttribute("aria-hidden","false"),document.body.classList.add("ur-search-modal-open"),A.set(e,ee());const n=a=>te(e,a);C.set(e,n),e.addEventListener("keydown",n);const t=e.querySelector(".ur-search-modal__input");t instanceof HTMLInputElement&&(t.focus(),t.dispatchEvent(new Event("focus")))}function H(e){e.classList.remove("ur-search-modal--active"),e.setAttribute("aria-hidden","true"),document.body.classList.remove("ur-search-modal-open");const n=C.get(e);n&&(e.removeEventListener("keydown",n),C.delete(e));const t=A.get(e)??null;A.delete(e),Z(t)}const fe=6e3;function he(e){return{url:e.url,meta:{title:e.title,category:e.category,publishedAt:e.publishedAt},excerpt:e.excerpt}}function V(e){return{async search(n){const t=new URLSearchParams({site:e,q:n}),a=await fetch(`/api/wp/search?${t.toString()}`,{signal:AbortSignal.timeout(fe),headers:{accept:"application/json"}});if(!a.ok)return{results:[]};const s=await a.json();return{results:(Array.isArray(s.items)?s.items:[]).map(i=>({url:i.url,data:async()=>he(i)}))}}}}const P={blog:"blog",kh:"knowledge-hub"};function pe(){document.querySelectorAll("[data-instant-search]").forEach(e=>{if(!(e instanceof HTMLElement)||e.dataset.instantSearchBound==="1")return;e.dataset.instantSearchBound="1";const n=e.dataset.site,t=e.dataset.recentKey,a=n?P[n]:void 0;if(!n||!t||!a)return;const s=e.querySelector(".ur-search__input"),o=e.querySelector("[data-live-search-results]"),i=e.querySelector(".ur-search-dropdown__count"),l=e.querySelector(".ur-search-empty"),u=e.querySelector(".ur-search-loading"),p=e.querySelector(".ur-search__clear"),g=e.querySelector(".ur-search-initial"),d=e.querySelector("[data-recent-tags]"),E=e.querySelector(".ur-search-results-wrapper");!(s instanceof HTMLInputElement)||!(o instanceof HTMLOListElement)||!(i instanceof HTMLElement)||!(l instanceof HTMLElement)||!(E instanceof HTMLElement)||j({root:e,input:s,results:o,countEl:i,emptyEl:l,loadingEl:u instanceof HTMLElement?u:null,wrapper:E,initialEl:g instanceof HTMLElement?g:null,recentTagsEl:d instanceof HTMLElement?d:null,clearBtn:p instanceof HTMLButtonElement?p:null,recentSearchesKey:t,canonicalUrl:y=>y,loadSearchSource:async()=>V(a),site:a})})}function ye(){document.querySelectorAll("[data-search-modal]").forEach(e=>{if(!(e instanceof HTMLElement)||e.dataset.searchModalBound==="1")return;e.dataset.searchModalBound="1";const n=e.dataset.site,t=e.dataset.recentKey,a=n?P[n]:void 0;if(!n||!t||!a)return;const s=e.querySelector(".ur-search-modal__input"),o=e.querySelector("[data-live-search-results]"),i=e.querySelector(".ur-search-dropdown__count"),l=e.querySelector(".ur-search-empty"),u=e.querySelector(".ur-search-loading"),p=e.querySelector(".ur-search-modal__clear"),g=e.querySelector(".ur-search-initial"),d=e.querySelector("[data-recent-tags]"),E=e.querySelector(".ur-search-results-wrapper");!(s instanceof HTMLInputElement)||!(o instanceof HTMLOListElement)||!(i instanceof HTMLElement)||!(l instanceof HTMLElement)||!(E instanceof HTMLElement)||(j({root:e,input:s,results:o,countEl:i,emptyEl:l,loadingEl:u instanceof HTMLElement?u:null,wrapper:E,initialEl:g instanceof HTMLElement?g:null,recentTagsEl:d instanceof HTMLElement?d:null,clearBtn:p instanceof HTMLButtonElement?p:null,recentSearchesKey:t,canonicalUrl:y=>y,loadSearchSource:async()=>V(a),site:a,activeClass:"ur-search-modal--active",hasValueClass:"ur-search-modal--has-value",bodyLockClass:"ur-search-modal-open",onClose:()=>H(e)}),e.querySelectorAll("[data-search-modal-close]").forEach(y=>{y.addEventListener("click",()=>H(e))}))}),window.__urSearchModalOpenBound||(window.__urSearchModalOpenBound=!0,document.addEventListener("click",e=>{const n=e.target;if(!(n instanceof Element)||!n.closest("[data-search-modal-open]"))return;e.preventDefault();const a=document.querySelector("[data-search-modal]");a instanceof HTMLElement&&de(a)}),document.addEventListener("keydown",e=>{e.key==="Escape"&&document.querySelectorAll("[data-search-modal].ur-search-modal--active").forEach(n=>
1{n instanceof HTMLElement&&H(n)})}))}function me(){pe(),ye()}function I(){me()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",I,{once:!0}):I();document.addEventListener("ur-nav-search-ready",I);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.