1System.register(["react/jsx-runtime","react","@vp/ubik-context","@vp/swan","@vp/tracking"],(function(_n){"use strict";var H,we,rt,nt,de,pe,at,jt,ot,st,Bt,Wt,Qt,it,qt,Yt,Vt,Xt,Jt;return{setters:[function(w){H=w.jsx,we=w.Fragment,rt=w.jsxs},function(w){nt=w,de=w.useState,pe=w.useEffect,at=w.default,jt=w.useMemo},function(w){ot=w.useUserContext},function(w){st=w.Typography,Bt=w.ComboboxPopover,Wt=w.ComboboxList,Qt=w.ComboboxSection,it=w.ComboboxOption,qt=w.useAsyncList,Yt=w.Combobox,Vt=w.ComboboxSearchInput,Xt=w.Box},function(w){Jt=w.getTracking}],execute:(function(){var w="S\xF8g",yn="Seneste s\xF8gninger",An="Ryd alle de seneste s\xF8gninger",bn="Popul\xE6re s\xF8gninger",Rn="Foresl\xE5ede s\xF8gninger",In={searchPlaceholder:w,recentSearches:yn,clearAllRecentSearches:An,popularSearches:bn,suggestedQueries:Rn},vn="Suchen",Ln="Zuletzt durchgef\xFChrte Suchen",On="Letzte Suchen l\xF6schen",Pn="H\xE4ufig gesucht",Nn="Suchvorschl\xE4ge",Cn={searchPlaceholder:vn,recentSearches:Ln,clearAllRecentSearches:On,popularSearches:Pn,suggestedQueries:Nn},wn="Search",Dn="Recent searches",xn="Clear all recent",kn="Popular searches",Mn="Suggested searches",Un={searchPlaceholder:wn,recentSearches:Dn,clearAllRecentSearches:xn,popularSearches:kn,suggestedQueries:Mn},Fn="Search",$n="Recent searches",Hn="Clear all recent",zn="Popular searches",Gn="Suggested searches",jn={searchPlaceholder:Fn,recentSearches:$n,clearAllRecentSearches:Hn,popularSearches:zn,suggestedQueries:Gn},Bn="Buscar",Wn="B\xFAsquedas recientes",Qn="Eliminar todas las b\xFAsquedas recientes",qn="B\xFAsquedas populares",Yn="B\xFAsquedas sugeridas",Vn={searchPlaceholder:Bn,recentSearches:Wn,clearAllRecentSearches:Qn,popularSearches:qn,suggestedQueries:Yn},Xn="Buscar",Jn="B\xFAsquedas recientes",Kn="Borrar todo lo reciente",Zn="B\xFAsquedas populares",ea="B\xFAsquedas sugeridas",ta={searchPlaceholder:Xn,recentSearches:Jn,clearAllRecentSearches:Kn,popularSearches:Zn,suggestedQueries:ea},ra="Hae",na="\xC4skett\xE4iset haut",aa="Tyhjenn\xE4 kaikki \xE4skett\xE4iset",oa="Suosittuja hakuja",sa="Ehdotettuja hakuja",ia={searchPlaceholder:ra,recentSearches:na,clearAllRecentSearches:aa,popularSearches:oa,suggestedQueries:sa},ca="Rechercher",la="Recherches r\xE9centes",ua="Effacer toutes les recherches r\xE9centes",fa="Recherches fr\xE9quentes",da="Suggestions de recherches",pa={searchPlaceholder:ca,recentSearches:la,clearAllRecentSearches:ua,popularSearches:fa,suggestedQueries:da},ha="Rechercher",ma="Recherches r\xE9centes",ga="Effacer les recherches r\xE9centes",Sa="Recherches populaires",Ta="Suggestions de recherche",Ea={searchPlaceholder:ha,recentSearches:ma,clearAllRecentSearches:ga,popularSearches:Sa,suggestedQueries:Ta},_a="Cerca",ya="Ricerche recenti",Aa="Cancella tutti i dati recenti",ba="Ricerche popolari",Ra="Ricerche consigliate",Ia={searchPlaceholder:_a,recentSearches:ya,clearAllRecentSearches:Aa,popularSearches:ba,suggestedQueries:Ra},va="S\xF8k",La="Nylige s\xF8k",Oa="Fjern alle nylige",Pa="Popul\xE6re s\xF8k",Na="Foresl\xE5tte s\xF8k",Ca={searchPlaceholder:va,recentSearches:La,clearAllRecentSearches:Oa,popularSearches:Pa,suggestedQueries:Na},wa="Zoeken",Da="Recente zoekopdrachten",xa="Wis alle recente",ka="Populaire zoekopdrachten",Ma="Voorgestelde zoekopdrachten",Ua={searchPlaceholder:wa,recentSearches:Da,clearAllRecentSearches:xa,popularSearches:ka,suggestedQueries:Ma},Fa="Procurar",$a="Pesquisas recentes",Ha="Limpar todas as recentes",za="Pesquisas populares",Ga="Pesquisas sugeridas",ja={searchPlaceholder:Fa,recentSearches:$a,clearAllRecentSearches:Ha,popularSearches:za,suggestedQueries:Ga},Ba="S\xF6k",Wa="Nyligen gjorda s\xF6kningar",Qa="Rensa allt nyligt",qa="Popul\xE4ra s\xF6kningar",Ya="F\xF6rslag p\xE5 s\xF6kningar",Va={searchPlaceholder:Ba,recentSearches:Wa,clearAllRecentSearches:Qa,popularSearches:qa,suggestedQueries:Ya};const Xa={"da-dk":In,"de-de":Cn,"en-gb":Un,"en-us":jn,"es-us":ta,"es-es":Vn,"fi-fi":ia,"fr-ca":pa,"fr-fr":Ea,"it-it":Ia,"nb-no":Ca,"nl-nl":Ua,"pt-pt":ja,"sv-se":Va},Ja={de:"de-de",en:"en-us",es:"es-es",fr:"fr-fr",it:"it-it",nl:"nl-nl"};function Ae(e,t){try{const n=Xa,a=n[t.toLowerCase()]?.[e];if(!a){const s=t.toLowerCase().substring(0,2),i=n[Ja[s]]?.[e];return i||e}return a}catch{return""}}const Kt=(e,t)=>
1{try{const n=localStorage.getItem(e);return n?JSON.parse(n):null}catch(n){t.warn("Error getting item from localStorage",{contextData:{message:n.message}})}return null},ct=(e,t,n)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch(a){n.warn("Error setting item from localStorage",{contextData:{message:a.message}})}},Ka="recentSearches",Za=5,eo=/^[a-zA-Z]{2}(-[a-zA-Z]{2})?$/,to="SearchBarFlyout",ro="https://popular-searches.productdiscovery.vpsvc.com/{{tenant}}/{{locale}}.json",lt="EM_TAG_PLACEHOLDER",ut="END_EM_TAG_PLACEHOLDER",no=new RegExp(`(${lt}|${ut})`),Zt="ais-highlight-0000000000",ao="em",oo=new RegExp(Zt,"g"),er="/search",tr="clearAllRecentSearches";function so(){const e=nt.createContext(void 0);function t(){const n=nt.useContext(e);if(!n)throw new Error("useContext must be inside a Provider with a value");return n}return[t,e.Provider]}var io=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},co={},De=io.performance||{};De.now||De.mozNow||De.msNow||De.oNow||De.webkitNow;var lo={env:co};function uo(e){const t='{"vistaprint":{"applicationId":"A31FV0KTHH","environment":"prod","ubik-api-key":"3c8303762a6fd26f6c5386d112f1507f"},"national-pen":{"applicationId":"E153A8F7PN","environment":"prod","ubik-api-key":"16b6f2f39e4e2a7c7f6e4e30d79a2b6b"}}',n=(t?.startsWith("{")?t:void 0)??lo.env.ALGOLIA_CONFIGURATION_JSON??globalThis.ALGOLIA_CONFIGURATION_JSON??void 0;if(!n){console.warn("Algolia configuration is not available in environment variables.");return}try{const a=JSON.parse(n);if(typeof a=="object"&&a!==null){const s=Object.keys(a).find(i=>i.toLowerCase()===e.toLowerCase());return s?{...a[s],tenant:s}:void 0}else{console.warn("Parsed Algolia configuration is not an object.");return}}catch(a){console.warn("Error parsing ALGOLIA_CONFIGURATION_JSON:",a);return}}const[ft,fo]=so(),po=({children:e,locale:t,resultsPageUrl:n,applicationName:a,logger:s,pathname:i})=>{const c=ot()?.tenant??"",l=uo(c);return H(fo,{value:{locale:t,tenant:c,resultsPageUrl:n,applicationName:a,logger:s,pathname:i,algoliaConfiguration:l,featureGates:{}},children:H("div",{className:"search-context-inner-wrapper",children:e})})};/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function rr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function ho(e){if(Array.isArray(e))return e}function mo(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,s,i,d,c=[],l=!0,T=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(m){T=!0,s=m}finally{try{if(!l&&n.return!=null&&(d=n.return(),Object(d)!==d))return}finally{if(T)throw s}}return c}}function go(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function So(e,t){return ho(e)||mo(e,t)||To(e,t)||go()}function To(e,t){if(e){if(typeof e=="string")return rr(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rr(e,t):void 0}}const nr=Object.entries,ar=Object.setPrototypeOf,Eo=Object.isFrozen,_o=Object.getPrototypeOf,yo=Object.getOwnPropertyDescriptor;let j=Object.freeze,B=Object.seal,be=Object.create,or=typeof Reflect<"u"&&Reflect,dt=or.apply,pt=or.construct;j||(j=function(t){return t}),B||(B=function(t){return t}),dt||(dt=function(t,n){for(var a=arguments.length,s=new Array(a>2?a-2:0),i=2;i<a;i++)s[i-2]=arguments[i];return t.apply(n,s)}),pt||(pt=function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];return new t(...a)});const xe=F(Array.prototype.forEach),Ao=F(Array.prototype.lastIndexOf),sr=F(Array.prototype.pop),Re=F(Array.prototype.push),bo=F(Array.prototype.splice),he=Array.isArray,ke=F(String.prototype.toLowerCase),ht=F(String.prototype.toString),ir=F(String.prototype.match),Me=F(String.prototype.replace),cr=F(String.prototype.indexOf),Ro=F(String.prototype.trim),Io=F(Number.prototype.toString),vo=F(Boolean.prototype.toString),lr=typeof BigInt>"u"?null:F(BigInt.prototype.toString),ur=typeof Symbol>"u"?null:F(Symbol.prototype.toString),z=F(Object.prototype.hasOwnProperty),Ue=F(Object.prototype.toString),W=F(RegExp.prototype.test),Ee=Lo(TypeError);function F(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,a=new Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];return dt(e,t,a)}}function Lo(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return pt(e,n)}}function R(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ke;if(ar&&ar(e,null),!he(t))return e;let a=t.length;for(;a--;){let s=t[a];if(typeof s=="string"){const i=n(s);i!==s&&(Eo(t)||(t[a]=i),s=i)}e[s]=!0}return e}function Oo(e){for(let t=0;t<e.length;t++)z(e,t)||(e[t]=null);return e}function J(e){const t=be(null);for(const a of nr(e)){var n=So(a,2);const s=n[0],i=n[1];
vendor: 4,151 bytes, line 2
2z(e,s)&&(he(i)?t[s]=Oo(i):i&&typeof i=="object"&&i.constructor===Object?t[s]=J(i):t[s]=i)}return t}function Po(e){switch(typeof e){case"string":return e;case"number":return Io(e);case"boolean":return vo(e);case"bigint":return lr?lr(e):"0";case"symbol":return ur?ur(e):"Symbol()";case"undefined":return Ue(e);case"function":case"object":{if(e===null)return Ue(e);const t=e,n=se(t,"toString");if(typeof n=="function"){const a=n(t);return typeof a=="string"?a:Ue(a)}return Ue(e)}default:return Ue(e)}}function se(e,t){for(;e!==null;){const a=yo(e,t);if(a){if(a.get)return F(a.get);if(typeof a.value=="function")return F(a.value)}e=_o(e)}function n(){return null}return n}function No(e){try{return W(e,""),!0}catch{return!1}}const fr=j(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),mt=j(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),gt=j(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Co=j(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),St=j(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),wo=j(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dr=j(["#text"]),pr=j(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
2spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Tt=j(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hr=j(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),We=j(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Do=B(/{{[\w\W]*|^[\w\W]*}}/g),xo=B(/<%[\w\W]*|^[\w\W]*%>/g),ko=B(/\${[\w\W]*/g),Mo=B(/^data-[\-\w.\u00B7-\uFFFF]+$/),Uo=B(/^aria-[\-\w]+$/),mr=B(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Fo=B(/^(?:\w+script|data):/i),$o=B(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ho=B(/^html$/i),zo=B(/^[a-z][.\w]*(-[.\w]+)+$/i),gr=B(/<[/\w!]/g),Go=B(/<[/\w]/g),jo=B(/<\/no(script|embed|frames)/i),Bo=B(/\/>/i),ie={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Wo=function(){return typeof window>"u"?null:window},Qo=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;
vendor: 4,085 bytes, line 2
2const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(a=n.getAttribute(s));const i="dompurify"+(a?"#"+a:"");try{return t.createPolicy(i,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Sr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},me=function(t,n,a,s){return z(t,n)&&he(t[n])?R(s.base?J(s.base):{},t[n],s.transform):a};function Tr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wo();const t=f=>Tr(f);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==ie.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const a=n,s=a.currentScript;e.DocumentFragment;const i=e.HTMLTemplateElement,d=e.Node,c=e.Element,l=e.NodeFilter,T=e.NamedNodeMap;T===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const m=e.DOMParser,y=e.trustedTypes,g=c.prototype,E=se(g,"cloneNode"),I=se(g,"remove"),C=se(g,"nextSibling"),S=se(g,"childNodes"),_=se(g,"parentNode"),Q=se(g,"shadowRoot"),D=se(g,"attributes"),P=d&&d.prototype?se(d.prototype,"nodeType"):null,L=d&&d.prototype?se(d.prototype,"nodeName"):null;if(typeof i=="function"){const f=n.createElement("template");f.content&&f.content.ownerDocument&&(n=f.content.ownerDocument)}let p,N="",K,te=!1,Y=0;const Z=function(){if(Y>0)throw Ee('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},V=function(r){Z(),Y++;try{return p.createHTML(r)}finally{Y--}},X=function(r){Z(),Y++;try{return p.createScriptURL(r)}finally{Y--}},ve=function(){return te||(K=Qo(y,s),te=!0),K},A=n,q=A.implementation,ae=A.createNodeIterator,ce=A.createDocumentFragment,re=A.getElementsByTagName,qe=a.importNode;let O=Sr();t.isSupported=typeof nr=="function"&&typeof _=="function"&&q&&q.createHTMLDocument!==void 0;const He=Do,Ye=xo,Di=ko,xi=Mo,ki=Uo,Mi=Fo,qr=$o,Ui=zo;let Yr=mr,x=null;const Vr=R({},[...fr,...mt,...gt,...St,...dr]);let k=null;const Xr=R({},[...pr,...Tt,...hr,...We]);let M=Object.seal(be(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ze=null,Jr=null;const ge=Object.seal(be(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Kr=!0,vt=!0,Zr=!1,en=!0,Se=!1,Ge=!0,_e=!1,Lt=!1,Ot=null,Pt=null,Nt=!1,Le=!1,Ve=!1,Xe=!1,tn=!0,rn=!1;const nn="user-content-";let Ct=!0,wt=!1,Oe={},le=null;const Dt=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let an=null;const on=R({},["audio","video","img","source","image","track"]);let xt=null;const sn=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml";let Pe=ue,kt=!1,Mt=null;const Fi=R({},[Je,Ke,ue],ht),cn=j(["mi","mo","mn","ms","mtext"]);let Ut=R({},cn);const ln=j(["annotation-xml"]);let Ft=R({},ln);const $i=R({},["title","style","font","a","script"]);let je=null;const Hi=["application/xhtml+xml","text/html"],zi="text/html";let U=null,Ne=null;const Gi=n.createElement("form"),un=function(r){return r instanceof RegExp||r instanceof Function},$t=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ne&&Ne===r)return;(!r||typeof r!="object")&&(r={}
vendor: 7,764 bytes, line 2
2),r=J(r),je=Hi.indexOf(r.PARSER_MEDIA_TYPE)===-1?zi:r.PARSER_MEDIA_TYPE,U=je==="application/xhtml+xml"?ht:ke,x=me(r,"ALLOWED_TAGS",Vr,{transform:U}),k=me(r,"ALLOWED_ATTR",Xr,{transform:U}),Mt=me(r,"ALLOWED_NAMESPACES",Fi,{transform:ht}),xt=me(r,"ADD_URI_SAFE_ATTR",sn,{transform:U,base:sn}),an=me(r,"ADD_DATA_URI_TAGS",on,{transform:U,base:on}),le=me(r,"FORBID_CONTENTS",Dt,{transform:U}),ze=me(r,"FORBID_TAGS",J({}),{transform:U}),Jr=me(r,"FORBID_ATTR",J({}),{transform:U}),Oe=z(r,"USE_PROFILES")?r.USE_PROFILES&&typeof r.USE_PROFILES=="object"?J(r.USE_PROFILES):r.USE_PROFILES:!1,Kr=r.ALLOW_ARIA_ATTR!==!1,vt=r.ALLOW_DATA_ATTR!==!1,Zr=r.ALLOW_UNKNOWN_PROTOCOLS||!1,en=r.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=r.SAFE_FOR_TEMPLATES||!1,Ge=r.SAFE_FOR_XML!==!1,_e=r.WHOLE_DOCUMENT||!1,Le=r.RETURN_DOM||!1,Ve=r.RETURN_DOM_FRAGMENT||!1,Xe=r.RETURN_TRUSTED_TYPE||!1,Nt=r.FORCE_BODY||!1,tn=r.SANITIZE_DOM!==!1,rn=r.SANITIZE_NAMED_PROPS||!1,Ct=r.KEEP_CONTENT!==!1,wt=r.IN_PLACE||!1,Yr=No(r.ALLOWED_URI_REGEXP)?r.ALLOWED_URI_REGEXP:mr,Pe=typeof r.NAMESPACE=="string"?r.NAMESPACE:ue,Ut=z(r,"MATHML_TEXT_INTEGRATION_POINTS")&&r.MATHML_TEXT_INTEGRATION_POINTS&&typeof r.MATHML_TEXT_INTEGRATION_POINTS=="object"?J(r.MATHML_TEXT_INTEGRATION_POINTS):R({},cn),Ft=z(r,"HTML_INTEGRATION_POINTS")&&r.HTML_INTEGRATION_POINTS&&typeof r.HTML_INTEGRATION_POINTS=="object"?J(r.HTML_INTEGRATION_POINTS):R({},ln);const o=z(r,"CUSTOM_ELEMENT_HANDLING")&&r.CUSTOM_ELEMENT_HANDLING&&typeof r.CUSTOM_ELEMENT_HANDLING=="object"?J(r.CUSTOM_ELEMENT_HANDLING):be(null);if(M=be(null),z(o,"tagNameCheck")&&un(o.tagNameCheck)&&(M.tagNameCheck=o.tagNameCheck),z(o,"attributeNameCheck")&&un(o.attributeNameCheck)&&(M.attributeNameCheck=o.attributeNameCheck),z(o,"allowCustomizedBuiltInElements")&&typeof o.allowCustomizedBuiltInElements=="boolean"&&(M.allowCustomizedBuiltInElements=o.allowCustomizedBuiltInElements),B(M),Se&&(vt=!1),Ve&&(Le=!0),Oe&&(x=R({},dr),k=be(null),Oe.html===!0&&(R(x,fr),R(k,pr)),Oe.svg===!0&&(R(x,mt),R(k,Tt),R(k,We)),Oe.svgFilters===!0&&(R(x,gt),R(k,Tt),R(k,We)),Oe.mathMl===!0&&(R(x,St),R(k,hr),R(k,We))),ge.tagCheck=null,ge.attributeCheck=null,z(r,"ADD_TAGS")&&(typeof r.ADD_TAGS=="function"?ge.tagCheck=r.ADD_TAGS:he(r.ADD_TAGS)&&(x===Vr&&(x=J(x)),R(x,r.ADD_TAGS,U))),z(r,"ADD_ATTR")&&(typeof r.ADD_ATTR=="function"?ge.attributeCheck=r.ADD_ATTR:he(r.ADD_ATTR)&&(k===Xr&&(k=J(k)),R(k,r.ADD_ATTR,U))),z(r,"ADD_URI_SAFE_ATTR")&&he(r.ADD_URI_SAFE_ATTR)&&R(xt,r.ADD_URI_SAFE_ATTR,U),z(r,"FORBID_CONTENTS")&&he(r.FORBID_CONTENTS)&&(le===Dt&&(le=J(le)),R(le,r.FORBID_CONTENTS,U)),z(r,"ADD_FORBID_CONTENTS")&&he(r.ADD_FORBID_CONTENTS)&&(le===Dt&&(le=J(le)),R(le,r.ADD_FORBID_CONTENTS,U)),Ct&&(x["#text"]=!0),_e&&R(x,["html","head","body"]),x.table&&(R(x,["tbody"]),delete ze.tbody),r.TRUSTED_TYPES_POLICY){if(typeof r.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ee('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof r.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ee('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const u=p;p=r.TRUSTED_TYPES_POLICY;try{N=V("")}catch(h){throw p=u,h}}else r.TRUSTED_TYPES_POLICY===null?(p=void 0,N=""):(p===void 0&&(p=ve()),p&&typeof N=="string"&&(N=V("")));j&&j(r),Ne=r},fn=R({},[...mt,...gt,...Co]),dn=R({},[...St,...wo]),ji=function(r,o,u){return o.namespaceURI===ue?r==="svg":o.namespaceURI===Je?r==="svg"&&(u==="annotation-xml"||Ut[u]):!!fn[r]},Bi=function(r,o,u){return o.namespaceURI===ue?r==="math":o.namespaceURI===Ke?r==="math"&&Ft[u]:!!dn[r]},Wi=function(r,o,u){return o.namespaceURI===Ke&&!Ft[u]||o.namespaceURI===Je&&!Ut[u]?!1:!dn[r]&&($i[r]||!fn[r])},Qi=function(r){let o=_(r);(!o||!o.tagName)&&(o={namespaceURI:Pe,tagName:"template"});const u=ke(r.tagName),h=ke(o.tagName);return Mt[r.namespaceURI]?r.namespaceURI===Ke?ji(u,o,h):r.namespaceURI===Je?Bi(u,o,h):r.namespaceURI===ue?Wi(u,o,h):!!(je==="application/xhtml+xml"&&Mt[r.namespaceURI]):!1},Te=function(r){Re(t.removed,{element:r});try{_(r).removeChild(r)}catch{if(I(r),!_(r))throw Ee("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},pn=function(r){const o=S(r);if(o){const h=[];xe(o,b=>{Re(h,b)}),xe(h,b=>{try{I(b)}catch{}})}const u=D(r);if(u)for(let h=u.length-1;h>=0;--h){const b=u[h],v=b&&b.name;if(typeof v=="string")try{r.removeAttribute(v)}catch{}}},ye=function(r,o){try{Re(t.removed,{attribute:o.getAttributeNode(r),from:o})}catch{Re(t.removed,{attribute:null,from:o})}if(o.removeAttribute(r),r==="is")if(Le||Ve)try{Te(o)}catch{}else try{o.setAttribute(r,"")}catch{}},qi=function(r){const o=D(r);if(o)for(let u=o.length-1;u>=0;--u){const h=o[u],b=h&&h.name;if(!(typeof b!="string"||k[U(b)]))try{r.removeAttribute(b)}catch{}}},Yi=function(r){const o=[r];for(;o.length>0;){const u=o.pop();(P?P(u):u.nodeType)===ie.element&&qi(u);const b=S(u);if(b)for(let v=b.length-1;v>=0;--v)o.push(b[v])}},hn=function(r){let o=null,u=null;if(Nt)r="<remove></remove>"+r;else{const v=ir(r,/^[\r\n\t ]+/);u=v&&v[0]}je==="application/xhtml+xml"&&Pe===ue&&(r='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+r+"</body></html>");const h=p?V(r):r;if(Pe===ue)try{o=new m().parseFromString(h,je)}catch{}if(!o||!o.documentElement){o=q.createDocument(Pe,"template",null);try{o.documentElement.innerHTML=kt?N:h}catch{}}const b=o.body||o.documentElement;return r&&u&&b.insertBefore(n.createTextNode(u),b.childNodes[0]||null),Pe===ue?re.call(o,_e?"html":"body")[0]:_e?o.documentElement:b},mn=function(r){return ae.call(r.ownerDocument||r,r,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ze=function(r){return r=Me(r,He," "),r=Me(r,Ye," "),r=Me(r,Di," "),r},Ht=function(r){var o;r.normalize();const u=ae.call(r.ownerDocument||r,r,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let h=u.nextNode();for(;h;)h.data=Ze(h.data),h=u.nextNode();const b=(o=r.querySelectorAll)===null||o===void 0?void 0:o.call(r,"template");b&&xe(b,v=>{Ce(v.content)&&Ht(v.content)})},et=function(r){const o=L?L(r):null;return typeof o!="string"||U(o)!=="form"?!1:typeof r.nodeName!="string"||typeof r.textContent!="string"||typeof r.removeChild!="function"||r.attributes!==D(r)||typeof r.removeAttribute!="function"||typeof r.setAttribute!="function"||typeof r.namespaceURI!="string"||typeof r.insertBefore!="function"||typeof r.hasChildNodes!="function"||r.nodeType!==P(r)||r.childNodes!==S(r)},Ce=function(r){if(!P||typeof r!="object"||r===null)return!1;try{return P(r)===ie.documentFragment}catch{return!1}},Be=function(r){if(!P||typeof r!="object"||r===null)return!1;try{return typeof P(r)=="number"}catch{return!1}};function fe(f,r,o){f.length!==0&&xe(f,u=>{u.call(t,r,o,Ne)})}const Vi=function(r,o){return!!(Ge&&r.hasChildNodes()&&!Be(r.firstElementChild)&&W(gr,r.textContent)&&W(gr,r.innerHTML)||Ge&&r.namespaceURI===ue&&o==="style"&&Be(r.firstElementChild)||r.nodeType===ie.processingInstruction||Ge&&r.nodeType===ie.comment&&W(Go,r.data))},Xi=function(r,o){if(!ze[o]&&Tn(o)&&(M.tagNameCheck instanceof RegExp&&W(M.tagNameCheck,o)||M.tagNameCheck instanceof Function&&M.tagNameCheck(o)))return!1;if(Ct&&!le[o]){const u=_(r),h=S(r);if(h&&u){const b=h.length;for(let v=b-1;v>=0;--v){const G=wt?h[v]:E(h[v],!0);u.insertBefore(G,C(r))}}}return Te(r),!0},gn=function(r){if(fe(O.beforeSanitizeElements,r,null),et(r))return Te(r),!0;const o=U(L?L(r):r.nodeName);if(fe(O.uponSanitizeElement,r,{tagName:o,allowedTags:x}),Vi(r,o))return Te(r),!0;if(ze[o]||!(ge.tagCheck instanceof Function&&ge.tagCheck(o))&&!x[o])return Xi(r,o);if((P?P(r):r.nodeType)===ie.element&&!Qi(r)||(o==="noscript"||o==="noembed"||o==="noframes")&&W(jo,r.innerHTML))return Te(r),!0;
2if(Se&&r.nodeType===ie.text){const h=Ze(r.textContent);r.textContent!==h&&(Re(t.removed,{element:r.cloneNode()}),r.textContent=h)}return fe(O.afterSanitizeElements,r,null),!1},Sn=function(r,o,u){if(Jr[o]||tn&&(o==="id"||o==="name")&&(u in n||u in Gi))return!1;const h=k[o]||ge.attributeCheck instanceof Function&&ge.attributeCheck(o,r);if(!(vt&&W(xi,o))){if(!(Kr&&W(ki,o))){if(h){if(!xt[o]){if(!W(Yr,Me(u,qr,""))){if(!((o==="src"||o==="xlink:href"||o==="href")&&r!=="script"&&cr(u,"data:")===0&&an[r])){if(!(Zr&&!W(Mi,Me(u,qr,"")))){if(u)return!1}}}}}else if(!(Tn(r)&&(M.tagNameCheck instanceof RegExp&&W(M.tagNameCheck,r)||M.tagNameCheck instanceof Function&&M.tagNameCheck(r))&&(M.attributeNameCheck instanceof RegExp&&W(M.attributeNameCheck,o)||M.attributeNameCheck instanceof Function&&M.attributeNameCheck(o,r))||o==="is"&&M.allowCustomizedBuiltInElements&&(M.tagNameCheck instanceof RegExp&&W(M.tagNameCheck,u)||M.tagNameCheck instanceof Function&&M.tagNameCheck(u))))return!1}}return!0},Ji=R({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Tn=function(r){return!Ji[ke(r)]&&W(Ui,r)},Ki=function(r,o,u,h){if(p&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!u)switch(y.getAttributeType(r,o)){case"TrustedHTML":return V(h);case"TrustedScriptURL":return X(h)}return h},Zi=function(r,o,u,h){try{u?r.setAttributeNS(u,o,h):r.setAttribute(o,h),et(r)?Te(r):sr(t.removed)}catch{ye(o,r)}},En=function(r){fe(O.beforeSanitizeAttributes,r,null);const o=r.attributes;if(!o||et(r))return;const u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0};let h=o.length;const b=U(r.nodeName);for(;h--;){const v=o[h],G=v.name,$=v.namespaceURI,ne=v.value,oe=U(G),Gt=ne;let ee=G==="value"?Gt:Ro(Gt);if(u.attrName=oe,u.attrValue=ee,u.keepAttr=!0,u.forceKeepAttr=void 0,fe(O.uponSanitizeAttribute,r,u),ee=u.attrValue,rn&&(oe==="id"||oe==="name")&&cr(ee,nn)!==0&&(ye(G,r),ee=nn+ee),Ge&&W(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ee)){ye(G,r);continue}if(oe==="attributename"&&ir(ee,"href")){ye(G,r);continue}if(!u.forceKeepAttr){if(!u.keepAttr){ye(G,r);continue}if(!en&&W(Bo,ee)){ye(G,r);continue}if(Se&&(ee=Ze(ee)),!Sn(b,oe,ee)){ye(G,r);continue}ee=Ki(b,oe,$,ee),ee!==Gt&&Zi(r,G,$,ee)}}fe(O.afterSanitizeAttributes,r,null)},tt=function(r){let o=null;const u=mn(r);for(fe(O.beforeSanitizeShadowDOM,r,null);o=u.nextNode();)if(fe(O.uponSanitizeShadowNode,o,null),gn(o),En(o),Ce(o.content)&&tt(o.content),(P?P(o):o.nodeType)===ie.element){const b=Q(o);Ce(b)&&(zt(b),tt(b))}fe(O.afterSanitizeShadowDOM,r,null)},zt=function(r){const o=[{node:r,shadow:null}];for(;o.length>0;){const u=o.pop();if(u.shadow){tt(u.shadow);continue}const h=u.node,v=(P?P(h):h.nodeType)===ie.element,G=S(h);if(G)for(let $=G.length-1;$>=0;--$)o.push({node:G[$],shadow:null});if(v){const $=L?L(h):null;if(typeof $=="string"&&U($)==="template"){const ne=h.content;Ce(ne)&&o.push({node:ne,shadow:null})}}if(v){const $=Q(h);Ce($)&&o.push({node:null,shadow:$},{node:$,shadow:null})}}};return t.sanitize=function(f){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=null,u=null,h=null,b=null;if(kt=!f,kt&&(f="<!-->"),typeof f!="string"&&!Be(f)&&(f=Po(f),typeof f!="string"))throw Ee("dirty is not a string, aborting");if(!t.isSupported)return f;Lt?(x=Ot,k=Pt):$t(r),(O.uponSanitizeElement.length>0||O.uponSanitizeAttribute.length>0)&&(x=J(x)),O.uponSanitizeAttribute.length>0&&(k=J(k)),t.removed=[];const v=wt&&typeof f!="string"&&Be(f);if(v){const ne=L?L(f):f.nodeName;if(typeof ne=="string"){const oe=U(ne);if(!x[oe]||ze[oe])throw Ee("root node is forbidden and cannot be sanitized in-place")}if(et(f))throw Ee("root node is clobbered and cannot be sanitized in-place");try{zt(f)}catch(oe){throw pn(f),oe}}else if(Be(f))o=hn("<!---->"),u=o.ownerDocument.importNode(f,!0),u.nodeType===ie.element&&u.nodeName==="BODY"||u.nodeName==="HTML"?o=u:o.appendChild(u),zt(u);else{if(!Le&&!Se&&!_e&&f.indexOf("<")===-1)return p&&Xe?V(f):f;if(o=hn(f),!o)return Le?null:Xe?N:""}o&&Nt&&Te(o.firstChild);const G=mn(v?f:o);try{for(;h=G.nextNode();)gn(h),En(h),Ce(h.content)&&tt(h.content)}catch(ne){throw v&&pn(f),ne}if(v)return xe(t.removed,ne=>{ne.element&&Yi(ne.element)}),Se&&Ht(f),f;if(Le){if(Se&&Ht(o),Ve)for(b=ce.call(o.ownerDocument);o.firstChild;)b.appendChild(o.firstChild);else b=o;return(k.shadowroot||k.shadowrootmode)&&(b=qe.call(a,b,!0)),b}let $=_e?o.outerHTML:o.innerHTML;return _e&&x["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&W(Ho,o.ownerDocument.doctype.name)&&($="<!DOCTYPE "+o.ownerDocument.doctype.name+`> 3`+$),Se&&($=Ze($)),p&&Xe?V($):$},t.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$t(f),Lt=!0,Ot=x,Pt=k},t.clearConfig=function(){Ne=null,Lt=!1,Ot=null,Pt=null,p=K,N=""},t.isValidAttribute=function(f,r,o){Ne||$t({});const u=U(f),h=U(r);return Sn(u,h,o)},t.addHook=function(f,r){typeof r=="function"&&z(O,f)&&Re(O[f],r)},t.removeHook=function(f,r){if(z(O,f)){if(r!==void 0){const o=Ao(O[f],r);return o===-1?void 0:bo(O[f],o,1)[0]}return sr(O[f])}},t.removeHooks=function(f){z(O,f)&&(O[f]=[])},t.removeAllHooks=function(){O=Sr()},t}var qo=Tr();function Yo(e){const t=qo.sanitize(e);return Vo(t).trim().replace(/\s+/g," ")}const Er=e=>Yo(e).toLowerCase();function Vo(e){const t=/(https?:\/\/[^\s]+)|(www\.[^\s]+)/gi;return e.replace(t,"")}const Xo=(e,t)=>`recentSearches_${e}_${t}`,_r=()=>{const[e,t]=de([]),[n,a]=de(!1),{logger:s,tenant:i,locale:d}=ft(),c=Xo(i,d);return pe(()=>{let y=Kt(c,s);y||(y=Kt(Ka,s)),y&&t(y),a(!0)},[c,s]),{recentSearches:e,addRecentSearch:y=>{const g=Er(y);t(E=>{const I=E.filter(S=>S!==g),C=[g,...I].slice(0,Za);return ct(c,C,s),C})},removeRecentSearch:y=>{const g=Er(y);t(E=>{const I=E.filter(C=>C!==g);return ct(c,I,s),I})},clearRecentSearches:()=>{ct(c,[],s),t([])},isRecentSearchesLoaded:n}},yr="RECENT_SEARCHES",Jo="POPULAR_SEARCHES",Ko="SUGGESTED_QUERIES";var Qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};
3function Zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var es="Expected a function",Ar=NaN,ts="[object Symbol]",rs=/^\s+|\s+$/g,ns=/^[-+]0x[0-9a-f]+$/i,as=/^0b[01]+$/i,os=/^0o[0-7]+$/i,ss=parseInt,is=typeof Qe=="object"&&Qe&&Qe.Object===Object&&Qe,cs=typeof self=="object"&&self&&self.Object===Object&&self,ls=is||cs||Function("return this")(),us=Object.prototype,fs=us.toString,ds=Math.max,ps=Math.min,Et=function(){return ls.Date.now()};function hs(e,t,n){var a,s,i,d,c,l,T=0,m=!1,y=!1,g=!0;if(typeof e!="function")throw new TypeError(es);t=br(t)||0,_t(n)&&(m=!!n.leading,y="maxWait"in n,i=y?ds(br(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g);function E(p){var N=a,K=s;return a=s=void 0,T=p,d=e.apply(K,N),d}function I(p){return T=p,c=setTimeout(_,t),m?E(p):d}function C(p){var N=p-l,K=p-T,te=t-N;return y?ps(te,i-K):te}function S(p){var N=p-l,K=p-T;return l===void 0||N>=t||N<0||y&&K>=i}function _(){var p=Et();if(S(p))return Q(p);c=setTimeout(_,C(p))}function Q(p){return c=void 0,g&&a?E(p):(a=s=void 0,d)}function D(){c!==void 0&&clearTimeout(c),T=0,a=l=s=c=void 0}function P(){return c===void 0?d:Q(Et())}function L(){var p=Et(),N=S(p);if(a=arguments,s=this,l=p,N){if(c===void 0)return I(l);if(y)return c=setTimeout(_,t),E(l)}return c===void 0&&(c=setTimeout(_,t)),d}return L.cancel=D,L.flush=P,L}function _t(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ms(e){return!!e&&typeof e=="object"}function gs(e){return typeof e=="symbol"||ms(e)&&fs.call(e)==ts}function br(e){if(typeof e=="number")return e;if(gs(e))return Ar;if(_t(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=_t(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(rs,"");var n=as.test(e);return n||os.test(e)?ss(e.slice(2),n?2:8):ns.test(e)?Ar:+e}var Ss=hs,Ts=Zo(Ss);const Es=e=>{const{tenant:t,locale:n,logger:a}=e,[s,i]=at.useState([]),[d,c]=at.useState(!1),l="Failed to fetch popular searches",T="Invalid data format for popular searches:";return pe(()=>{(async(y,g)=>{try{const E=ro.replace("{{tenant}}",y.toLowerCase()).replace("{{locale}}",g.toLowerCase()),I=await fetch(E,{method:"GET"});if(!I.ok){a.warn(l,{contextData:{locale:g,status:I.status,statusText:I.statusText}}),i([]);return}const C=await I.json();if(!C||!Array.isArray(C.popularSearches)){a.warn(T,{contextData:{locale:g,data:C}}),i([]);return}i(C?.popularSearches)}catch(E){a.warn(l,{contextData:{locale:g,error:E instanceof Error?E.message:String(E)}}),i([])}finally{c(!0)}})(t,n)},[n,t]),{popularSearches:s,isPopularSearchesLoaded:d}};function _s(e){let t;const n=`algolia-client-js-${e.key}`;function a(){return t===void 0&&(t=e.localStorage||window.localStorage),t}function s(){return JSON.parse(a().getItem(n)||"{}")}function i(l){a().setItem(n,JSON.stringify(l))}function d(){return new Promise(l=>setTimeout(l,0))}function c(){const l=e.timeToLive?e.timeToLive*1e3:null,T=s(),m=new Date().getTime();let y=!1;return{namespace:Object.fromEntries(Object.entries(T).filter(([,E])=>!E||E.timestamp===void 0||l&&E.timestamp+l<m?(y=!0,!1):!0)),changed:y}}return{get(l,T,m={miss:()=>Promise.resolve()}){return d().then(()=>{const{namespace:y,changed:g}=c(),E=y[JSON.stringify(l)];return g&&i(y),E?E.value:T().then(I=>m.miss(I).then(()=>I))})},set(l,T){return d().then(()=>{const m=s();return m[JSON.stringify(l)]={timestamp:new Date().getTime(),value:T},a().setItem(n,JSON.stringify(m)),T})},delete(l){return d().then(()=>{const T=s();delete T[JSON.stringify(l)],a().setItem(n,JSON.stringify(T))})},clear(){return Promise.resolve().then(()=>{a().removeItem(n)})}}}function ys(){return{get(e,t,n={miss:()=>Promise.resolve()}){return t().then(s=>Promise.all([s,n.miss(s)])).then(([s])=>s)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function Fe(e){const t=[...e.caches],n=t.shift();return n===void 0?ys():{get(a,s,i={miss:()=>Promise.resolve()}){return n.get(a,s,i).catch(()=>Fe({caches:t}).get(a,s,i))},set(a,s){return n.set(a,s).catch(()=>Fe({caches:t}).set(a,s))},delete(a){return n.delete(a).catch(()=>Fe({caches:t}).delete(a))}
3,clear(){return n.clear().catch(()=>Fe({caches:t}).clear())}}}function yt(e={serializable:!0}){let t={};return{get(n,a,s={miss:()=>Promise.resolve()}){const i=JSON.stringify(n);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const d=a();return d.then(c=>s.miss(c)).then(()=>d)},set(n,a){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)},delete(n){return delete t[JSON.stringify(n)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function As(e){const t={value:`Algolia for JavaScript (${e})`,add(n){const a=`; ${n.segment}${n.version!==void 0?` (${n.version})`:""}`;return t.value.indexOf(a)===-1&&(t.value=`${t.value}${a}`),t}};return t}function bs(e,t,n="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers(){return n==="WithinHeaders"?a:{}},queryParameters(){return n==="WithinQueryParameters"?a:{}}}}function Rs({algoliaAgents:e,client:t,version:n}){const a=As(n).add({segment:t,version:n});return e.forEach(s=>a.add(s)),a}function Is(){return{debug(e,t){return Promise.resolve()},info(e,t){return Promise.resolve()},error(e,t){return Promise.resolve()}}}var vs=10*1024*1024;async function*Ls(e){const t=e.getReader();try{for(;;){const{done:n,value:a}=await t.read();if(n)return;yield a}}finally{t.releaseLock()}}function Os(e){return Symbol.asyncIterator in e?e:Ls(e)}async function*Ps(e){const t=new TextDecoder("utf-8"),n=[];let a=0,s=!1,i=!0;for await(const c of Os(e)){const l=t.decode(c,{stream:!0});let T=0;for(s&&(s=!1,l.length>0&&l[0]===` 4`&&(T=1));T<l.length;){const m=l.indexOf("\r",T),y=l.indexOf(` 5`,T);if(m===-1&&y===-1){const S=l.slice(T);if(n.push(S),a+=S.length,a>vs)throw new Error("SSE line buffer exceeded 10MB");break}let g,E;m!==-1&&(y===-1||m<y)?(g=m,m+1<l.length?E=l[m+1]===` 6`?2:1:(s=!0,E=1)):(g=y,E=1);const I=l.slice(T,g);n.push(I);let C=n.length===1?n[0]:n.join("");n.length=0,a=0,i&&(C.startsWith("\uFEFF")&&(C=C.slice(1)),i=!1),yield C,T=g+E}}const d=t.decode();if(d&&n.push(d),n.length>0){let c=n.join("");i&&c.startsWith("\uFEFF")&&(c=c.slice(1)),yield c}}var Ns=class{data=[];eventType="";lastEventId=null;retry=null;decode(e){if(e==="")return this.dispatch();if(e[0]===":")return null;const t=e.indexOf(":");let n,a;switch(t===-1?(n=e,a=""):(n=e.slice(0,t),a=e.slice(t+1),a[0]===" "&&(a=a.slice(1))),n){case"data":this.data.push(a);break;case"event":this.eventType=a;break;case"id":a.includes("\0")||(this.lastEventId=a);break;case"retry":/^[0-9]+$/.test(a)&&(this.retry=parseInt(a,10));break}return null}dispatch(){const e=this.eventType;if(this.eventType="",this.data.length===0)return null;const t={data:this.data.join(` 7`),event:e,id:this.lastEventId,retry:this.retry};return this.data=[],t}};async function*Cs(e){const t=new Ns;for await(const n of Ps(e)){const a=t.decode(n);a!==null&&(yield a)}}var ws=750,Rr=120*1e3;function Ir(e,t="up"){const n=Date.now();function a(){return t==="up"||Date.now()-n>Rr}function s(){return t==="timed out"&&Date.now()-n<=Rr}return{...e,status:t,lastUpdate:n,isUp:a,isTimedOut:s}}var vr=class extends Error{name="AlgoliaError";constructor(e,t){super(e),t&&(this.name=t)}},Lr=class extends vr{stackTrace;constructor(e,t,n){super(e,n),this.stackTrace=t}},Or=class extends Lr{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",e,"RetryError")}},At=class extends Lr{status;constructor(e,t,n,a="ApiError"){super(e,n,a),this.status=t}},Ds=class extends vr{response;constructor(e,t){super(e,"DeserializationError"),this.response=t}},xs=class extends At{error;constructor(e,t,n,a){super(e,t,a,"DetailedApiError"),this.error=n}};function ks(e){const t=e;for(let n=e.length-1;n>0;n--){const a=Math.floor(Math.random()*(n+1)),s=e[n];t[n]=e[a],t[a]=s}return t}function Pr(e,t,n){const a=Ms(n);let s=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return a.length&&(s+=`?${a}`),s}function Ms(e){return Object.keys(e).filter(t=>e[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(e[t])==="[object Array]"?e[t].join(","):e[t]).replace(/\+/g,"%20")}`).join("&")}function Nr(e,t){if(e.method==="GET"||e.data===void 0&&t.data===void 0)return;const n=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(n)}function Cr(e,t,n){const a={Accept:"application/json",...e,...t,...n},s={};
7return Object.keys(a).forEach(i=>{const d=a[i];s[i.toLowerCase()]=d}),s}function Us(e){if(!(e.status===204||e.content.length===0))try{return JSON.parse(e.content)}catch(t){throw new Ds(t.message,e)}}function Fs({content:e,status:t},n){try{const a=JSON.parse(e);return"error"in a?new xs(a.message,t,a.error,n):new At(a.message,t,n)}catch{}return new At(e,t,n)}function $s({isTimedOut:e,status:t}){return!e&&~~t===0}function Hs({isTimedOut:e,status:t}){return e||$s({isTimedOut:e,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function zs({status:e}){return~~(e/100)===2}function Gs(e){return e.map(t=>wr(t))}function wr(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function js({hosts:e,hostsCache:t,baseHeaders:n,logger:a,baseQueryParameters:s,algoliaAgent:i,timeouts:d,requester:c,requestsCache:l,responsesCache:T,compress:m,compression:y}){async function g(S){const _=await Promise.all(S.map(p=>t.get(p,()=>Promise.resolve(Ir(p))))),Q=_.filter(p=>p.isUp()),D=_.filter(p=>p.isTimedOut()),P=[...Q,...D];return{hosts:P.length>0?P:S,getTimeout(p,N){return(D.length===0&&p===0?1:D.length+3+p)*N}}}async function E(S,_,Q){const D=[],P=Nr(S,_),L=Cr(n,S.headers,_.headers),p=y==="gzip"&&P!==void 0&&P.length>ws&&(S.method==="POST"||S.method==="PUT");p&&m===void 0&&a.info("Compression is disabled because no compress method is available.");const N=p&&m!==void 0,K=N?await m(P):P;N&&(L["content-encoding"]="gzip");const te=S.method==="GET"?{...S.data,..._.data}:{},Y={...s,...S.queryParameters,...te};if(i.value&&(Y["x-algolia-agent"]=i.value),_&&_.queryParameters)for(const A of Object.keys(_.queryParameters))!_.queryParameters[A]||Object.prototype.toString.call(_.queryParameters[A])==="[object Object]"?Y[A]=_.queryParameters[A]:Y[A]=_.queryParameters[A].toString();let Z=0;const V=async(A,q)=>{const ae=A.pop();if(ae===void 0)throw new Or(Gs(D));const ce={...d,..._.timeouts},re={data:K,headers:L,method:S.method,url:Pr(ae,S.path,Y),connectTimeout:q(Z,ce.connect),responseTimeout:q(Z,Q?ce.read:ce.write)},qe=He=>{const Ye={request:re,response:He,host:ae,triesLeft:A.length};return D.push(Ye),Ye},O=await c.send(re);if(Hs(O)){const He=qe(O);return O.isTimedOut&&Z++,a.info("Retryable failure",wr(He)),await t.set(ae,Ir(ae,O.isTimedOut?"timed out":"down")),V(A,q)}if(zs(O))return Us(O);throw qe(O),Fs(O,D)},X=e.filter(A=>A.accept==="readWrite"||(Q?A.accept==="read":A.accept==="write")),ve=await g(X);return V([...ve.hosts].reverse(),ve.getTimeout)}function I(S,_={}){const Q=()=>E(S,_,D),D=S.useReadTransporter||S.method==="GET";if((_.cacheable||S.cacheable)!==!0)return Q();const L={request:S,requestOptions:_,transporter:{queryParameters:s,headers:n}};return T.get(L,()=>l.get(L,()=>l.set(L,Q()).then(p=>Promise.all([l.delete(L),p]),p=>Promise.all([l.delete(L),Promise.reject(p)])).then(([p,N])=>N)),{miss:p=>T.set(L,p)})}async function*C(S,_={}){if(!c.sendStream)throw new Error("This requester does not support streaming");const Q=Nr(S,_),D=Cr(n,S.headers,_.headers);D.accept="text/event-stream";const P=S.method==="GET"?{...S.data,..._.data}:{},L={...s,...S.queryParameters,...P};if(i.value&&(L["x-algolia-agent"]=i.value),_&&_.queryParameters)for(const X of Object.keys(_.queryParameters))!_.queryParameters[X]||Object.prototype.toString.call(_.queryParameters[X])==="[object Object]"?L[X]=_.queryParameters[X]:L[X]=_.queryParameters[X].toString();const p=S.useReadTransporter||S.method==="GET",N=e.filter(X=>X.accept==="readWrite"||(p?X.accept==="read":X.accept==="write")),te=(await g(N)).hosts[0];if(!te)throw new Or([]);const Y={...d,..._.timeouts},Z={data:Q,headers:D,method:S.method,url:Pr(te,S.path,L),connectTimeout:Y.connect,responseTimeout:p?Y.read:Y.write},V=await c.sendStream(Z);yield*Cs(V)}return{hostsCache:t,requester:c,timeouts:d,logger:a,algoliaAgent:i,baseHeaders:n,baseQueryParameters:s,hosts:e,request:I,requestStream:C,requestsCache:l,responsesCache:T}}function $e(e,t,n){if(n==null||typeof n=="string"&&n.length===0)throw new Error(`Parameter \`${e}\` is required when calling \`${t}\`.`)}function Bs(){function e(t){return new Promise(n=>{let a=new XMLHttpRequest;
7a.open(t.method,t.url,!0),Object.keys(t.headers).forEach(c=>a.setRequestHeader(c,t.headers[c]));let s=(c,l)=>setTimeout(()=>{a.abort(),n({status:0,content:l,isTimedOut:!0})},c),i=s(t.connectTimeout,"Connection timeout"),d;a.onreadystatechange=()=>{a.readyState>a.OPENED&&d===void 0&&(clearTimeout(i),d=s(t.responseTimeout,"Socket timeout"))},a.onerror=()=>{a.status===0&&(clearTimeout(i),clearTimeout(d),n({content:a.responseText||"Network request failed",status:a.status,isTimedOut:!1}))},a.onload=()=>{clearTimeout(i),clearTimeout(d),n({content:a.responseText,status:a.status,isTimedOut:!1})},a.send(t.data)})}return{send:e}}var Dr="5.55.1";function Ws(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(ks([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Qs({appId:e,apiKey:t,authMode:n,algoliaAgents:a,...s}){const i=bs(e,t,n),d=js({hosts:Ws(e),...s,algoliaAgent:Rs({algoliaAgents:a,client:"Lite",version:Dr}),baseHeaders:{"content-type":"text/plain",...i.headers(),...s.baseHeaders},baseQueryParameters:{...i.queryParameters(),...s.baseQueryParameters}});return{transporter:d,appId:e,apiKey:t,clearCache(){return Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then(()=>{})},get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(c,l){d.algoliaAgent.add({segment:c,version:l})},setClientApiKey({apiKey:c}){!n||n==="WithinHeaders"?d.baseHeaders["x-algolia-api-key"]=c:d.baseQueryParameters["x-algolia-api-key"]=c},searchForHits(c,l){return this.search(c,l)},searchForFacets(c,l){return this.search(c,l)},customPost({path:c,parameters:l,body:T},m){$e("path","customPost",c);const I={method:"POST",path:"/{path}".replace("{path}",c),queryParameters:l||{},headers:{},data:T||{}};return d.request(I,m)},getRecommendations(c,l){c&&Array.isArray(c)&&(c={requests:c}),$e("getRecommendationsParams","getRecommendations",c),$e("getRecommendationsParams.requests","getRecommendations",c.requests);const g={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:c,useReadTransporter:!0,cacheable:!0};return d.request(g,l)},search(c,l){c&&Array.isArray(c)&&(c={requests:c.map(({params:I,...C})=>C.type==="facet"?{...C,...I,type:"facet"}:{...C,...I,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),$e("searchMethodParams","search",c),$e("searchMethodParams.requests","search",c.requests);const g={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:c,useReadTransporter:!0,cacheable:!0};return d.request(g,l)}}}function qs(e,t,n){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");const{compression:a,...s}={};return Qs({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:Is(),requester:Bs(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:yt(),requestsCache:yt({serializable:!1}),hostsCache:Fe({caches:[_s({key:`${Dr}-${e}`}),yt()]}),...s})}const Ys="query_suggestions";let bt;const Vs=e=>(bt||(bt=qs(e.applicationId,e["ubik-api-key"])),bt),Xs=(e,t,n)=>`${e.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1).toLowerCase()).join("-")}_${t}_Discovery_${n}`,Js=(e,t)=>{const{tenant:n,environment:a}=e;return`${Xs(n,a,t)}_${Ys}`},Ks=200,Zs="Search Result Section",ei="Personalization Viewed",xr="Personalization",kr="Experience Personalization",Mr="Recent Searches",Ur="search_bar",Fr="manually-defined",ti="Personalization Clicked",ri="Search Submitted",$r="Recent Search",ni="Popular Search",ai="Free Text Search",oi="Search Bar Engaged",si="Focus",ii="Typed",ci="Suggested Search",li="Fly-Out Clicked",ui={clickAnalytics:!0,attributesToRetrieve:["objectID","query","popularity"],attributesToHighlight:["query"],ruleContexts:[],getRankingInfo:!0,hitsPerPage:Ks},fi=async e=>{const{query:t,locale:n,querySuggestionSearchParameters:a,algoliaConfiguration:s}=e;if(!s)return;const i=Js(s,n),d=Vs(s),l={requests:[{indexName:i,query:t,...a??ui}]};return await d.search(l)},Rt=8,di=(e,t,n)=>{const a=Hr(t);return{isLoading:!1,loadingState:"idle",items:a.length>0?[{name:Ae("suggestedQueries",n),taxonomyId:Ko,items:a}]:[],selectedKeys:new Set,filterText:e,sortDescriptor:{key:"popularity",direction:"descending",column:"query"}}},pi=(e,t,n,a)=>{const s=t.results[0];return{query:e,taxonomyId:"Suggested Search",numberOfResultsToShow:Rt<(s.nbHits??0)?Rt:s.nbHits??0,indexName:s.index??"",results:Hr(t),rulesApplied:[],applicationName:n,pathname:a}},Hr=e=>e.results.flatMap(a=>
7hi(a)).slice(0,Rt),hi=e=>e.hits.map(mi),mi=e=>({objectID:e.objectID,title:e.query,isSuggestedQuery:!0,trackingLabel:ci,popularity:e.popularity,highlightResult:e._highlightResult?.query?.value,_rankingInfo:e._rankingInfo}),gi=e=>{const t=e?.results;if(!t)return"";const n=t.map(a=>Si(a));return n&&n.length>0?n.join(","):""},Si=e=>e?e.queryID?e.queryID:e.hits&&e.hits.length>0?e.hits.map(t=>t.objectID).join(","):"":"",Ti=e=>/^\s*(<em>\s*<\/em>)?\s*$/.test(e)?[]:e.trim().replace(/<em>/g,lt).replace(/<\/em>/g,ut).split(no).filter(s=>s!==""),Ei=({resultText:e})=>{if(!e)return null;if(e.indexOf(Zt)!==-1&&(e=e.replace(oo,ao)),e.indexOf("<em>")===-1)return H(we,{children:e});const t=Ti(e);let n=!1;return H(we,{children:t.map((a,s)=>{if(a===lt){n=!0;return}if(a===ut){n=!1;return}return n?a:H(st,{as:"mark",fontWeight:"bold",backgroundColor:"transparent",color:"standard",children:a},a+s)})})};function Ie(e,t){try{const n=Jt();e(n)}catch(n){t.warn("Failed to send tracking event",n)}}function zr(){const e=t=>document.querySelector(`meta[name="${t}"]`)?.content??"";return{pageName:e("pageName"),pageSection:e("pageSection"),pagetStage:e("pagetStage"),urlId:e("urlId")}}function It(e,t){Ie(n=>{n.track(ri,e)},t)}function Gr(e,t){return`${e}?query=${encodeURIComponent(t).replace(/%20/g,"+")}`}const _i=(e,t)=>{const{placementIdLabel:n}=e,a=zr(),i={placementId:`${a.pageSection}|${a.urlId}|${n}`,category:xr,decisionMaker:Fr,label:kr,placementType:Ur};Ie(d=>{d.track(ti,i)},t)},yi=({queryResults:e,currentQuery:t})=>{const{locale:n,resultsPageUrl:a,applicationName:s,pathname:i,logger:d}=ft(),{addRecentSearch:c}=_r(),l=m=>{let y="";m instanceof HTMLElement&&(y=(m instanceof HTMLAnchorElement?m:m.closest("a"))?.dataset.key??"");const g=e?.items??[],E=jr(g,y);if(!E)return;const I=Br(g,E.objectID);It({label:E.trackingLabel,query:E.title,application:s,location:i,searchTerm:t??"",position:I},d),c(E.title)},T=(m,y)=>{const g=e?.items??[],E=jr(g,y);if(!E)return;const I=Br(g,y);It({query:E.title,application:s,location:i,label:E.trackingLabel,searchTerm:t??"",position:I},d),E.trackingLabel===$r&&_i({placementIdLabel:Mr},d),c(E.title),document.location.href=m};return H(Bt,{children:H(Wt,{"data-testid":"query-suggestions-list",onAuxClick:m=>{m.button===1&&l(m.target)},onContextMenu:m=>{l(m.target)},onClick:m=>{m.target instanceof HTMLAnchorElement&&(m.preventDefault(),T(m.target.href,m.target.dataset.key??""))},children:e&&e.items.length>0?e.items.map(m=>rt(Qt,{title:m.name,children:[Ai({section:m,resultsPageUrl:a}),bi(m,n)]},`section_${m.taxonomyId}`)):null})})},Ai=({section:e,resultsPageUrl:t})=>{const n=e.items.map(a=>{const s=Gr(t,a.title);return H(it,{textValue:a.title,href:s,children:H(Ei,{resultText:a.highlightResult||a.title})},a.objectID)});return H(we,{children:n})};function bi(e,t){if(e?.taxonomyId===yr){const n=Ae("clearAllRecentSearches",t);return H(it,{textValue:n,children:H(st,{fontSize:"small",style:{textDecoration:"underline"},children:n})},tr)}return null}function jr(e,t){return e.flatMap(n=>n.items).find(n=>n.objectID===t)}function Br(e,t){for(const n of e){const a=n.items.findIndex(s=>s.objectID===t);if(a!==-1)return a+1}return 0}function Ri(e,t){const{query:n,applicationName:a,pathname:s,taxonomyId:i,results:d,indexName:c,rulesApplied:l,numberOfResultsToShow:T}=e,m=d.filter(g=>(g._rankingInfo?.nbTypos??0)>0),y={query:n,location:s,applicationName:a,sectionName:i,resultsInSection:d.map(g=>({resultSource:c,id:g.objectID})),rulesApplied:l,resultsWithTyposCount:m.length,totalResultCount:d.length,shownResultsInSection:d.slice(0,T).map(g=>({resultSource:c,id:g.objectID}))};Ie(g=>{g.track(Zs,y)},t)}function Wr(e,t){Ie(n=>{n.track(oi,e)},t)}const Ii=(e,t)=>{const{placementIdLabel:n}=e,a=zr(),i={placementId:`${a.pageSection}|${a.urlId}|${n}`,category:xr,decisionMaker:Fr,label:kr,placementType:Ur};Ie(d=>{d.track(ei,i)},t)};function vi(e){Ie(t=>{t.track(li,{label:"Clear all recent",category:"Fly-Out"})},e)}const Li=e=>{const{searchLabel:t}=e,[n,a]=de(""),[s,i]=de(!1),[d,c]=de(!1),{recentSearches:l,addRecentSearch:T,isRecentSearchesLoaded:m,clearRecentSearches:y}=_r(),{resultsPageUrl:g,applicationName:E,pathname:I,tenant:C,locale:S,logger:_,algoliaConfiguration:Q}=ft(),{popularSearches:D,isPopularSearchesLoaded:P}=Es({tenant:C,locale:S,logger:_}),L=()=>{d||(Wr({path:window.location.pathname,application:E,label:si},_),l.length>0&&Ii({placementIdLabel:Mr},_),c(!0))};function p(A){Z.setFilterText(A)}const N=jt(()=>Ts(q=>{p(q)},200,{maxWait:1e3}),[D,l]);pe(()=>()=>{N.cancel()},[N]),pe(()=>{const A=document?.location.search&&new URLSearchParams(document.location.search),q=A?A?.has("query")&&A?.get("query"):"";q&&(a(q),p(q))},[]),pe(()=>{!P||!m||Z?.reload()},[JSON.stringify(l),JSON.stringify(D),P,m]);function K(A){s||(Wr({path:window.location.pathname,application:E,label:ii},_),i(!0)),a(A),ve(A)?p(A):N(A)}const te=Ae("searchPlaceholder",S);function Y(A){A.preventDefault(),n&&(T(n),It({query:n,application:E,location:I,searchTerm:n,label:ai,position:0},_)),document.location.href=Gr(g,n)}const Z=qt({async load({signal:A,filterText:q}){if(!q){if(l.length===0&&D.length===0)return{items:[]};const ce=[];return l.length>0?(ce.push({name:Ae("recentSearches",S),taxonomyId:yr,items:l.map(re=>({objectID:`recentSearch_${re}`,title:re,isSuggestedQuery:!0,trackingLabel:$r,highlightResult:re}))}),{items:ce}):(D.length>0&&ce.push({name:Ae("popularSearches",S),taxonomyId:Jo,items:D.map(re=>({objectID:`popularSearch_${re}`,title:re,isSuggestedQuery:!0,trackingLabel:ni,highlightResult:re}))}),{items:ce})}const ae=await fi({algoliaConfiguration:Q,query:q,locale:S});return X(ae),di(q,ae,S)}}),[V,X]=de(null);pe(()=>{if(!n||!V||V.results.length===0)return;const A=pi(n,V,E,I);Ri(A,_)},[n,gi(V)]);const ve=A=>!A||Z&&Z.filterText.includes(A);return rt(Yt,{maxHeight:1200,"aria-label":t||Ae("searchPlaceholder",S),menuTrigger:"focus",inputValue:n,onInputChange:K,onFocus:L,disableAutoFilter:!0,selectedKey:"","data-testid":"query-suggestions-combobox",onSelectionChange:A=>
7{if(A===tr){y(),vi(_),Z.reload();return}},allowsCustomValue:!0,children:[H(Vt,{placeholder:te,onSearchSubmit:Y,onFocusCapture:L,"data-testid":"query-suggestions"}),H(yi,{queryResults:Z,currentQuery:n})]})},Oi=e=>{if(!e||!eo.test(e))return"en-US";const t=e.split("-");return t&&t.length===2?`${t[0]?.toLowerCase()}-${t[1]?.toUpperCase()}`:e.toLowerCase()},Pi="https://url.prod.merch.vpsvc.com",Ni="search-bar",Ci="other%3Asearch",Qr=new Map,wi=async(e,t)=>{const n=`${e}|${t}`,a=Qr.get(n);if(a)return a;const s=await fetch(`${Pi}/v3/url/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${Ci}?requestor=${Ni}`);if(!s.ok)throw new Error(`URL service responded with status ${s.status}`);const{url:i}=await s.json();return Qr.set(n,i),i},ec=_n("SearchBar",e=>{const t=Oi(e.locale),a=ot()?.tenant??"",[s,i]=de(er),d=to;return a?(pe(()=>{wi(a,t).then(i).catch(()=>{e.logger.error("Failed to fetch search page URL from URL service",{contextData:{tenant:a,locale:t}}),i(er)})},[a,t]),H(po,{applicationName:d,locale:t,logger:e.logger,resultsPageUrl:s,pathname:e.pathname,children:H(Xt,{"data-testid":"search-application-name",children:H(Li,{searchLabel:e.searchLabel})})})):H(we,{})})})}})); 8//# sourceMappingURL=search-bar-BXtEw6pl.js.map
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.