UNPKG

@algolia/sitesearch

Version:

Opinionated site search modal for the web. Ships zero-build CDN bundles (JS + CSS) and a one-line init API. Powered by Algolia InstantSearch.

1 lines 458 kB
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.SiteSearchAskAI={}))})(this,function(exports){Object.defineProperty(exports,`__esModule`,{value:!0});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(e&&(t=e(e=0)),t),c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),l=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},u=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},d=(e,r,i)=>(i=e==null?{}:t(a(e)),u(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),f=e=>u(n({},`__esModule`,{value:!0}),e);function p(e,t){for(var n in t)e[n]=t[n];return e}function m(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function h(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?xe.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return g(e,o,r,i,null)}function g(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Se,__i:-1,__u:0};return i==null&&C.vnode!=null&&C.vnode(a),a}function _(){return{current:null}}function v(e){return e.children}function y(e,t){this.props=e,this.context=t}function b(e,t){if(t==null)return e.__?b(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?b(e):null}function x(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return x(e)}}function ee(e){(!e.__d&&(e.__d=!0)&&we.push(e)&&!S.__r++||Te!=C.debounceRendering)&&((Te=C.debounceRendering)||Ee)(S)}function S(){for(var e,t,n,r,i,a,o,s=1;we.length;)we.length>s&&we.sort(De),e=we.shift(),s=we.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,a=[],o=[],t.__P&&((n=p({},r)).__v=r.__v+1,C.vnode&&C.vnode(n),le(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,a,i??b(r),!!(32&r.__u),o),n.__v=r.__v,n.__.__k[n.__i]=n,de(a,n,o),r.__e=r.__=null,n.__e!=i&&x(n)));S.__r=0}function te(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||Pe,y=t.length;for(c=ne(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i==-1?Ne:v[p.__i]||Ne,p.__i=d,g=le(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&me(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?c=re(p,c,e,_):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function ne(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?g(null,o,null,null,null):Ie(o)?g(v,{children:o},null,null,null):o.constructor==null&&o.__b>0?g(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=ae(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=b(s)),he(s,s));return r}function re(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=re(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=b(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ie(e,t){return t||=[],e==null||typeof e==`boolean`||(Ie(e)?e.some(function(e){ie(e,t)}):t.push(e)),t}function ae(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>(u?1:0)){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function oe(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||Fe.test(t)?n:n+`px`}function se(e,t,n,r,i){var a,o;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||oe(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||oe(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(Oe,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n.u=r.u:(n.u=ke,e.addEventListener(t,a?je:Ae,a)):e.removeEventListener(t,a?je:Ae,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function ce(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=ke++;else if(t.t<n.u)return;return n(C.event?C.event(t):t)}}}function le(e,t,n,r,i,a,o,s,c,l){var u,d,f,h,g,_,b,x,ee,S,ne,re,ie,ae,oe,se,ce,le=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=C.__b)&&u(t);n:if(typeof le==`function`)try{if(x=t.props,ee=`prototype`in le&&le.prototype.render,S=(u=le.contextType)&&r[u.__c],ne=u?S?S.props.value:u.__:r,n.__c?b=(d=t.__c=n.__c).__=d.__E:(ee?t.__c=d=new le(x,ne):(t.__c=d=new y(x,ne),d.constructor=le,d.render=ge),S&&S.sub(d),d.props=x,d.state||={},d.context=ne,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),ee&&d.__s==null&&(d.__s=d.state),ee&&le.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=p({},d.__s)),p(d.__s,le.getDerivedStateFromProps(x,d.__s))),h=d.props,g=d.state,d.__v=t,f)ee&&le.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),ee&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(ee&&le.getDerivedStateFromProps==null&&x!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(x,ne),!d.__e&&d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(x,d.__s,ne)||t.__v==n.__v){for(t.__v!=n.__v&&(d.props=x,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),re=0;re<d._sb.length;re++)d.__h.push(d._sb[re]);d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(x,d.__s,ne),ee&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,g,_)})}if(d.context=ne,d.props=x,d.__P=e,d.__e=!1,ie=C.__r,ae=0,ee){for(d.state=d.__s,d.__d=!1,ie&&ie(t),u=d.render(d.props,d.state,d.context),oe=0;oe<d._sb.length;oe++)d.__h.push(d._sb[oe]);d._sb=[]}else do d.__d=!1,ie&&ie(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++ae<25);d.state=d.__s,d.getChildContext!=null&&(r=p(p({},r),d.getChildContext())),ee&&!f&&d.getSnapshotBeforeUpdate!=null&&(_=d.getSnapshotBeforeUpdate(h,g)),se=u,u!=null&&u.type===v&&u.key==null&&(se=fe(u.props.children)),s=te(e,Ie(se)?se:[se],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),b&&(d.__E=d.__=null)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(ce=a.length;ce--;)m(a[ce]);ue(t)}else t.__e=n.__e,t.__k=n.__k,e.then||ue(t);C.__e(e,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=pe(n.__e,t,n,r,i,a,o,c,l);return(u=C.diffed)&&u(t),128&t.__u?void 0:s}function ue(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(ue)}function de(e,t,n){for(var r=0;r<n.length;r++)me(n[r],n[++r],n[++r]);C.__c&&C.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){C.__e(e,t.__v)}})}function fe(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:Ie(e)?e.map(fe):p({},e)}function pe(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,h,g,_=n.props,v=t.props,y=t.type;if(y==`svg`?i=`http://www.w3.org/2000/svg`:y==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!y&&(y?p.localName==y:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(y==null)return document.createTextNode(v);e=document.createElementNS(i,y,v.is&&v),s&&(C.__m&&C.__m(t,a),s=!1),a=null}if(y==null)_===v||s&&e.data==v||(e.data=v);else{if(a&&=xe.call(e.childNodes),_=n.props||Ne,!s&&a!=null)for(_={},l=0;l<e.attributes.length;l++)_[(p=e.attributes[l]).name]=p.value;for(l in _)if(p=_[l],l!=`children`){if(l==`dangerouslySetInnerHTML`)d=p;else if(!(l in v)){if(l==`value`&&`defaultValue`in v||l==`checked`&&`defaultChecked`in v)continue;se(e,l,null,p,i)}}for(l in v)p=v[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?h=p:l==`checked`?g=p:s&&typeof p!=`function`||_[l]===p||se(e,l,p,_[l],i);if(u)s||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),te(t.type==`template`?e.content:e,Ie(f)?f:[f],t,n,r,y==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&b(n,0),s,c),a!=null)for(l=a.length;l--;)m(a[l]);s||(l=`value`,y==`progress`&&h==null?e.removeAttribute(`value`):h!=null&&(h!==e[l]||y==`progress`&&!h||y==`option`&&h!=_[l])&&se(e,l,h,_[l],i),l=`checked`,g!=null&&g!=e[l]&&se(e,l,g,_[l],i))}return e}function me(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){C.__e(e,n)}}function he(e,t,n){var r,i;if(C.unmount&&C.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||me(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){C.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&he(r[i],t,n||typeof e.type!=`function`);n||m(e.__e),e.__c=e.__=e.__e=void 0}function ge(e,t,n){return this.constructor(e,n)}function _e(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),C.__&&C.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],le(t,e=(!r&&n||t).__k=h(v,null,[e]),i||Ne,Ne,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?xe.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),de(a,e,o)}function ve(e,t){_e(e,t,ve)}function ye(e,t,n){var r,i,a,o,s=p({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a==`key`?r=t[a]:a==`ref`?i=t[a]:s[a]=t[a]===void 0&&o!=null?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?xe.call(arguments,2):n),g(e.type,s,r||e.key,i||e.ref,null)}function be(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,ee(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+ Me++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}var xe,C,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le=s(()=>{Ne={},Pe=[],Fe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ie=Array.isArray,xe=Pe.slice,C={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},Se=0,Ce=function(e){return e!=null&&e.constructor==null},y.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=p({},this.state),typeof e==`function`&&(e=e(p({},n),this.props)),e&&p(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ee(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ee(this))},y.prototype.render=v,we=[],Ee=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,De=function(e,t){return e.__v.__b-t.__v.__b},S.__r=0,Oe=/(PointerCapture)$|Capture$/i,ke=0,Ae=ce(!1),je=ce(!0),Me=0});function Re(){function e(e){return new Promise(t=>{let n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach(t=>n.setRequestHeader(t,e.headers[t]));let r=(e,r)=>setTimeout(()=>{n.abort(),t({status:0,content:r,isTimedOut:!0})},e),i=r(e.connectTimeout,`Connection timeout`),a;n.onreadystatechange=()=>{n.readyState>n.OPENED&&a===void 0&&(clearTimeout(i),a=r(e.responseTimeout,`Socket timeout`))},n.onerror=()=>{n.status===0&&(clearTimeout(i),clearTimeout(a),t({content:n.responseText||`Network request failed`,status:n.status,isTimedOut:!1}))},n.onload=()=>{clearTimeout(i),clearTimeout(a),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)})}return{send:e}}function ze(e){let t,n=`algolia-client-js-${e.key}`;function r(){return t===void 0&&(t=e.localStorage||window.localStorage),t}function i(){return JSON.parse(r().getItem(n)||`{}`)}function a(e){r().setItem(n,JSON.stringify(e))}function o(){let t=e.timeToLive?e.timeToLive*1e3:null,n=i(),r=Object.fromEntries(Object.entries(n).filter(([,e])=>e.timestamp!==void 0));if(a(r),!t)return;let o=Object.fromEntries(Object.entries(r).filter(([,e])=>{let n=new Date().getTime(),r=e.timestamp+t<n;return!r}));a(o)}return{get(e,t,n={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(o(),i()[JSON.stringify(e)])).then(e=>Promise.all([e?e.value:t(),e!==void 0])).then(([e,t])=>Promise.all([e,t||n.miss(e)])).then(([e])=>e)},set(e,t){return Promise.resolve().then(()=>{let a=i();return a[JSON.stringify(e)]={timestamp:new Date().getTime(),value:t},r().setItem(n,JSON.stringify(a)),t})},delete(e){return Promise.resolve().then(()=>{let t=i();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))})},clear(){return Promise.resolve().then(()=>{r().removeItem(n)})}}}function Be(){return{get(e,t,n={miss:()=>Promise.resolve()}){let r=t();return r.then(e=>Promise.all([e,n.miss(e)])).then(([e])=>e)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function Ve(e){let t=[...e.caches],n=t.shift();return n===void 0?Be():{get(e,r,i={miss:()=>Promise.resolve()}){return n.get(e,r,i).catch(()=>Ve({caches:t}).get(e,r,i))},set(e,r){return n.set(e,r).catch(()=>Ve({caches:t}).set(e,r))},delete(e){return n.delete(e).catch(()=>Ve({caches:t}).delete(e))},clear(){return n.clear().catch(()=>Ve({caches:t}).clear())}}}function He(e={serializable:!0}){let t={};return{get(n,r,i={miss:()=>Promise.resolve()}){let a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);let o=r();return o.then(e=>i.miss(e)).then(()=>o)},set(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function Ue(e){let t={value:`Algolia for JavaScript (${e})`,add(e){let n=`; ${e.segment}${e.version===void 0?``:` (${e.version})`}`;return t.value.indexOf(n)===-1&&(t.value=`${t.value}${n}`),t}};return t}function We(e,t,n=`WithinHeaders`){let r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers(){return n===`WithinHeaders`?r:{}},queryParameters(){return n===`WithinQueryParameters`?r:{}}}}function Ge({algoliaAgents:e,client:t,version:n}){let r=Ue(n).add({segment:t,version:n});return e.forEach(e=>r.add(e)),r}function Ke(){return{debug(e,t){return Promise.resolve()},info(e,t){return Promise.resolve()},error(e,t){return Promise.resolve()}}}var qe=2*60*1e3;function Je(e,t=`up`){let n=Date.now();function r(){return t===`up`||Date.now()-n>qe}function i(){return t===`timed out`&&Date.now()-n<=qe}return{...e,status:t,lastUpdate:n,isUp:r,isTimedOut:i}}var Ye=class extends Error{name=`AlgoliaError`;constructor(e,t){super(e),t&&(this.name=t)}},Xe=class extends Ye{stackTrace;constructor(e,t,n){super(e,n),this.stackTrace=t}},Ze=class extends Xe{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`)}},Qe=class extends Xe{status;constructor(e,t,n,r=`ApiError`){super(e,n,r),this.status=t}},$e=class extends Ye{response;constructor(e,t){super(e,`DeserializationError`),this.response=t}},et=class extends Qe{error;constructor(e,t,n,r){super(e,t,r,`DetailedApiError`),this.error=n}};function tt(e){let t=e;for(let n=e.length-1;n>0;n--){let r=Math.floor(Math.random()*(n+1)),i=e[n];t[n]=e[r],t[r]=i}return t}function nt(e,t,n){let r=rt(n),i=`${e.protocol}://${e.url}${e.port?`:${e.port}`:``}/${t.charAt(0)===`/`?t.substring(1):t}`;return r.length&&(i+=`?${r}`),i}function rt(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 it(e,t){if(e.method===`GET`||e.data===void 0&&t.data===void 0)return;let n=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(n)}function at(e,t,n){let r={Accept:`application/json`,...e,...t,...n},i={};return Object.keys(r).forEach(e=>{let t=r[e];i[e.toLowerCase()]=t}),i}function ot(e){try{return JSON.parse(e.content)}catch(t){throw new $e(t.message,e)}}function st({content:e,status:t},n){try{let r=JSON.parse(e);return`error`in r?new et(r.message,t,r.error,n):new Qe(r.message,t,n)}catch{}return new Qe(e,t,n)}function ct({isTimedOut:e,status:t}){return!e&&~~t===0}function lt({isTimedOut:e,status:t}){return e||ct({isTimedOut:e,status:t})||~~(t/100)!=2&&~~(t/100)!=4}function ut({status:e}){return~~(e/100)==2}function dt(e){return e.map(e=>ft(e))}function ft(e){let t=e.request.headers[`x-algolia-api-key`]?{"x-algolia-api-key":`*****`}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function pt({hosts:e,hostsCache:t,baseHeaders:n,logger:r,baseQueryParameters:i,algoliaAgent:a,timeouts:o,requester:s,requestsCache:c,responsesCache:l}){async function u(e){let n=await Promise.all(e.map(e=>t.get(e,()=>Promise.resolve(Je(e))))),r=n.filter(e=>e.isUp()),i=n.filter(e=>e.isTimedOut()),a=[...r,...i],o=a.length>0?a:e;return{hosts:o,getTimeout(e,t){let n=i.length===0&&e===0?1:i.length+3+e;return n*t}}}async function d(c,l,d=!0){let f=[],p=it(c,l),m=at(n,c.headers,l.headers),h=c.method===`GET`?{...c.data,...l.data}:{},g={...i,...c.queryParameters,...h};if(a.value&&(g[`x-algolia-agent`]=a.value),l&&l.queryParameters)for(let e of Object.keys(l.queryParameters))!l.queryParameters[e]||Object.prototype.toString.call(l.queryParameters[e])===`[object Object]`?g[e]=l.queryParameters[e]:g[e]=l.queryParameters[e].toString();let _=0,v=async(e,n)=>{let i=e.pop();if(i===void 0)throw new Ze(dt(f));let a={...o,...l.timeouts},u={data:p,headers:m,method:c.method,url:nt(i,c.path,g),connectTimeout:n(_,a.connect),responseTimeout:n(_,d?a.read:a.write)},h=t=>{let n={request:u,response:t,host:i,triesLeft:e.length};return f.push(n),n},y=await s.send(u);if(lt(y)){let a=h(y);return y.isTimedOut&&_++,r.info(`Retryable failure`,ft(a)),await t.set(i,Je(i,y.isTimedOut?`timed out`:`down`)),v(e,n)}if(ut(y))return ot(y);throw h(y),st(y,f)},y=e.filter(e=>e.accept===`readWrite`||(d?e.accept===`read`:e.accept===`write`)),b=await u(y);return v([...b.hosts].reverse(),b.getTimeout)}function f(e,t={}){let r=e.useReadTransporter||e.method===`GET`;if(!r)return d(e,t,r);let a=()=>d(e,t),o=t.cacheable||e.cacheable;if(o!==!0)return a();let s={request:e,requestOptions:t,transporter:{queryParameters:i,headers:n}};return l.get(s,()=>c.get(s,()=>c.set(s,a()).then(e=>Promise.all([c.delete(s),e]),e=>Promise.all([c.delete(s),Promise.reject(e)])).then(([e,t])=>t)),{miss:e=>l.set(s,e)})}return{hostsCache:t,requester:s,timeouts:o,logger:r,algoliaAgent:a,baseHeaders:n,baseQueryParameters:i,hosts:e,request:f,requestsCache:c,responsesCache:l}}var mt=`5.40.0`;function ht(e){return[{url:`${e}-dsn.algolia.net`,accept:`read`,protocol:`https`},{url:`${e}.algolia.net`,accept:`write`,protocol:`https`}].concat(tt([{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 gt({appId:e,apiKey:t,authMode:n,algoliaAgents:r,...i}){let a=We(e,t,n),o=pt({hosts:ht(e),...i,algoliaAgent:Ge({algoliaAgents:r,client:`Lite`,version:mt}),baseHeaders:{"content-type":`text/plain`,...a.headers(),...i.baseHeaders},baseQueryParameters:{...a.queryParameters(),...i.baseQueryParameters}});return{transporter:o,appId:e,apiKey:t,clearCache(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then(()=>void 0)},get _ua(){return o.algoliaAgent.value},addAlgoliaAgent(e,t){o.algoliaAgent.add({segment:e,version:t})},setClientApiKey({apiKey:e}){!n||n===`WithinHeaders`?o.baseHeaders[`x-algolia-api-key`]=e:o.baseQueryParameters[`x-algolia-api-key`]=e},searchForHits(e,t){return this.search(e,t)},searchForFacets(e,t){return this.search(e,t)},customPost({path:e,parameters:t,body:n},r){if(!e)throw Error("Parameter `path` is required when calling `customPost`.");let i=`/{path}`.replace(`{path}`,e),a={},s=t||{},c={method:`POST`,path:i,queryParameters:s,headers:a,data:n||{}};return o.request(c,r)},getRecommendations(e,t){if(e&&Array.isArray(e)){let t={requests:e};e=t}if(!e)throw Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");let n=`/1/indexes/*/recommendations`,r={},i={},a={method:`POST`,path:n,queryParameters:i,headers:r,data:e,useReadTransporter:!0,cacheable:!0};return o.request(a,t)},search(e,t){if(e&&Array.isArray(e)){let t={requests:e.map(({params:e,...t})=>t.type===`facet`?{...t,...e,type:`facet`}:{...t,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})};e=t}if(!e)throw Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw Error("Parameter `searchMethodParams.requests` is required when calling `search`.");let n=`/1/indexes/*/queries`,r={},i={},a={method:`POST`,path:n,queryParameters:i,headers:r,data:e,useReadTransporter:!0,cacheable:!0};return o.request(a,t)}}}function _t(e,t,n){if(!e||typeof e!=`string`)throw Error("`appId` is missing.");if(!t||typeof t!=`string`)throw Error("`apiKey` is missing.");return gt({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:Ke(),requester:Re(),algoliaAgents:[{segment:`Browser`}],authMode:`WithinQueryParameters`,responsesCache:He(),requestsCache:He({serializable:!1}),hostsCache:Ve({caches:[ze({key:`${mt}-${e}`}),He()]}),...n})}function vt(e,t){T.__h&&T.__h(w,e,Bt||t),Bt=0;var n=w.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function yt(e){return Bt=1,bt(It,e)}function bt(e,t,n){var r=vt(Lt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):It(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=w,!w.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};w.__f=!0;var a=w.shouldComponentUpdate,o=w.componentWillUpdate;w.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},w.shouldComponentUpdate=i}return r.__N||r.__}function xt(e,t){var n=vt(Lt++,3);!T.__s&&Ft(n.__H,t)&&(n.__=e,n.u=t,w.__H.__h.push(n))}function St(e,t){var n=vt(Lt++,4);!T.__s&&Ft(n.__H,t)&&(n.__=e,n.u=t,w.__h.push(n))}function Ct(e){return Bt=5,Tt(function(){return{current:e}},[])}function wt(e,t,n){Bt=6,St(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Tt(e,t){var n=vt(Lt++,7);return Ft(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Et(e,t){return Bt=8,Tt(function(){return e},t)}function Dt(e){var t=w.context[e.__c],n=vt(Lt++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(w)),t.props.value):e.__}function Ot(e,t){T.useDebugValue&&T.useDebugValue(t?t(e):e)}function kt(e){var t=vt(Lt++,10),n=yt();return t.__=e,w.componentDidCatch||=function(e,r){t.__&&t.__(e,r),n[1](e)},[n[0],function(){n[1](void 0)}]}function At(){var e=vt(Lt++,11);if(!e.__){for(var t=w.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+ n[1]++}return e.__}function jt(){for(var e;e=Vt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Nt),e.__H.__h.forEach(Pt),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}function Mt(e){var t,n=function(){clearTimeout(r),Jt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Jt&&(t=requestAnimationFrame(n))}function Nt(e){var t=w,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),w=t}function Pt(e){var t=w;e.__c=e.__(),w=t}function Ft(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function It(e,t){return typeof t==`function`?t(e):t}var Lt,w,Rt,zt,Bt,Vt,T,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt=s(()=>{Le(),Bt=0,Vt=[],T=C,Ht=T.__b,Ut=T.__r,Wt=T.diffed,Gt=T.__c,Kt=T.unmount,qt=T.__,T.__b=function(e){w=null,Ht&&Ht(e)},T.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),qt&&qt(e,t)},T.__r=function(e){Ut&&Ut(e),Lt=0;var t=(w=e.__c).__H;t&&(Rt===w?(t.__h=[],w.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Nt),t.__h.forEach(Pt),t.__h=[],Lt=0)),Rt=w},T.diffed=function(e){Wt&&Wt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Vt.push(t)!==1&&zt===T.requestAnimationFrame||((zt=T.requestAnimationFrame)||Mt)(jt)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Rt=w=null},T.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Nt),e.__h=e.__h.filter(function(e){return!e.__||Pt(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],T.__e(n,e.__v)}}),Gt&&Gt(e,t)},T.unmount=function(e){Kt&&Kt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Nt(e)}catch(e){t=e}}),n.__H=void 0,t&&T.__e(t,n.__v))},Jt=typeof requestAnimationFrame==`function`}),Xt={};l(Xt,{Children:()=>Nn,Component:()=>y,Fragment:()=>v,PureComponent:()=>an,StrictMode:()=>$n,Suspense:()=>un,SuspenseList:()=>pn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Yn,cloneElement:()=>En,createContext:()=>be,createElement:()=>h,createFactory:()=>Sn,createPortal:()=>gn,createRef:()=>_,default:()=>tr,findDOMNode:()=>On,flushSync:()=>Qn,forwardRef:()=>sn,hydrate:()=>vn,isElement:()=>er,isFragment:()=>wn,isMemo:()=>Tn,isValidElement:()=>Cn,lazy:()=>fn,memo:()=>on,render:()=>_n,startTransition:()=>tn,unmountComponentAtNode:()=>Dn,unstable_batchedUpdates:()=>Zn,useCallback:()=>Et,useContext:()=>Dt,useDebugValue:()=>Ot,useDeferredValue:()=>nn,useEffect:()=>xt,useErrorBoundary:()=>kt,useId:()=>At,useImperativeHandle:()=>wt,useInsertionEffect:()=>kn,useLayoutEffect:()=>St,useMemo:()=>Tt,useReducer:()=>bt,useRef:()=>Ct,useState:()=>yt,useSyncExternalStore:()=>$t,useTransition:()=>rn,version:()=>Xn});function Zt(e,t){for(var n in t)e[n]=t[n];return e}function Qt(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function $t(e,t){var n=t(),r=yt({t:{__:n,u:t}}),i=r[0].t,a=r[1];return St(function(){i.__=n,i.u=t,en(i)&&a({t:i})},[e,n,t]),xt(function(){return en(i)&&a({t:i}),e(function(){en(i)&&a({t:i})})},[e]),n}function en(e){var t,n,r=e.u,i=e.__;try{var a=r();return!((t=i)===(n=a)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function tn(e){e()}function nn(e){return e}function rn(){return[!1,tn]}function an(e,t){this.props=e,this.context=t}function on(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Qt(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}function sn(e){function t(t){var n=Zt({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=jn,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}function cn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=Zt({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return cn(e,t,n)})),e}function ln(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return ln(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function un(){this.__u=0,this.o=null,this.__b=null}function dn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function fn(e){var t,n,r;function i(i){if(t||(t=e()).then(function(e){n=e.default||e},function(e){r=e}),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName=`Lazy`,i.__f=!0,i}function pn(){this.i=null,this.l=null}function mn(e){return this.getChildContext=function(){return e.context},e.children}function hn(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){_e(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}_e(h(mn,{context:t.context},e.__v),t.v)}function gn(e,t){var n=h(hn,{__v:e,h:t});return n.containerInfo=t,n}function _n(e,t,n){return t.__k??(t.textContent=``),_e(e,t),typeof n==`function`&&n(),e?e.__c:null}function vn(e,t,n){return ve(e,t),typeof n==`function`&&n(),e?e.__c:null}function yn(){}function bn(){return this.cancelBubble}function xn(){return this.defaultPrevented}function Sn(e){return h.bind(null,e)}function Cn(e){return!!e&&e.$$typeof===Ln}function wn(e){return Cn(e)&&e.type===v}function Tn(e){return!!e&&!!e.displayName&&(typeof e.displayName==`string`||e.displayName instanceof String)&&e.displayName.startsWith(`Memo(`)}function En(e){return Cn(e)?ye.apply(null,arguments):e}function Dn(e){return!!e.__k&&(_e(null,e),!0)}function On(e){return e&&(e.base||e.nodeType===1&&e)||null}var kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,E=s(()=>{Le(),Yt(),Yt(),kn=St,(an.prototype=new y).isPureReactComponent=!0,an.prototype.shouldComponentUpdate=function(e,t){return Qt(this.props,e)||Qt(this.state,t)},An=C.__b,C.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),An&&An(e)},jn=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911,Mn=function(e,t){return e==null?null:ie(ie(e).map(t))},Nn={map:Mn,forEach:Mn,count:function(e){return e?ie(e).length:0},only:function(e){var t=ie(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:ie},Pn=C.__e,C.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Pn(e,t,n,r)},Fn=C.unmount,C.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Fn&&Fn(e)},(un.prototype=new y).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=dn(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=ln(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},un.prototype.componentWillUnmount=function(){this.o=[]},un.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=cn(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(v,null,e.fallback);return i&&(i.__u&=-33),[h(v,null,t.__a?null:e.children),i]},In=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}},(pn.prototype=new y).__a=function(e){var t=this,n=dn(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),In(t,e,r)):i()};n?n(a):a()}},pn.prototype.render=function(e){this.i=null,this.l=new Map;var t=ie(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},pn.prototype.componentDidUpdate=pn.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){In(e,n,t)})},Ln=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,Rn=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,zn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Bn=/[A-Z0-9]/g,Vn=typeof document<`u`,Hn=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)},y.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}),Un=C.event,C.event=function(e){return Un&&(e=Un(e)),e.persist=yn,e.isPropagationStopped=bn,e.isDefaultPrevented=xn,e.nativeEvent=e},Gn={enumerable:!1,configurable:!0,get:function(){return this.class}},Kn=C.vnode,C.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)===-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||Vn&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&!0===o?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||Hn(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:zn.test(a)&&(a=s):s=a=`oninput`:i&&Rn.test(a)?a=a.replace(Bn,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=ie(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),n==`select`&&r.defaultValue!=null&&(r.value=ie(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,`className`,Gn)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Ln,Kn&&Kn(e)},qn=C.__r,C.__r=function(e){qn&&qn(e),Wn=e.__c},Jn=C.diffed,C.diffed=function(e){Jn&&Jn(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value),Wn=null},Yn={ReactCurrentDispatcher:{current:{readContext:function(e){return Wn.__n[e.__c].props.value},useCallback:Et,useContext:Dt,useDebugValue:Ot,useDeferredValue:nn,useEffect:xt,useId:At,useImperativeHandle:wt,useInsertionEffect:kn,useLayoutEffect:St,useMemo:Tt,useReducer:bt,useRef:Ct,useState:yt,useSyncExternalStore:$t,useTransition:rn}}},Xn=`18.3.1`,Zn=function(e,t){return e(t)},Qn=function(e,t){return e(t)},$n=v,er=Cn,tr={useState:yt,useId:At,useReducer:bt,useEffect:xt,useLayoutEffect:St,useInsertionEffect:kn,useTransition:rn,useDeferredValue:nn,useSyncExternalStore:$t,startTransition:tn,useRef:Ct,useImperativeHandle:wt,useMemo:Tt,useCallback:Et,useContext:Dt,useDebugValue:Ot,version:`18.3.1`,Children:Nn,render:_n,hydrate:vn,unmountComponentAtNode:Dn,createPortal:gn,createElement:h,createContext:be,createFactory:Sn,cloneElement:En,createRef:_,Fragment:v,isValidElement:Cn,isElement:er,isFragment:wn,isMemo:Tn,findDOMNode:On,Component:y,PureComponent:an,memo:on,forwardRef:sn,flushSync:Qn,unstable_batchedUpdates:Zn,StrictMode:$n,Suspense:un,SuspenseList:pn,lazy:fn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Yn}}),nr=`7.16.3`,rr=c((exports,t)=>{function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}t.exports=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError(`n must be a positive number`);return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,c,l;if(this._events||={},e===`error`&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var u=Error(`Uncaught, unspecified "error" event. (`+t+`)`);throw u.context=t,u}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),l=n.slice(),i=l.length,c=0;c<i;c++)l[c].apply(this,s);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError(`listener must be a function`);return this._events||={},this._events.newListener&&this.emit(`newListener`,e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(i=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error(`(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.`,this._events[e].length),typeof console.trace==`function`&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!r(t))throw TypeError(`listener must be a function`);var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError(`listener must be a function`);if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit(`removeListener`,e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;n.length===1?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit(`removeListener`,e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(t in this._events){if(t===`removeListener`)continue;this.removeAllListeners(t)}return this.removeAllListeners(`removeListener`),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=!this._events||!this._events[e]?[]:r(this._events[e])?[this._events[e]]:this._events[e].slice(),t},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)};function r(e){return typeof e==`function`}function i(e){return typeof e==`number`}function a(e){return typeof e==`object`&&!!e}function o(e){return e===void 0}}),ir=c((exports,t)=>{function n(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}t.exports=n}),ar=c((exports,t)=>{var n=rr(),r=ir();function i(e,t,n){this.main=e,this.fn=t,this.recommendFn=n,this.lastResults=null,this.lastRecommendResults=null}r(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},t.exports=i}),or=c((exports,t)=>{function n(e){return typeof e==`string`?String(e).replace(/^-/,`\\-`):e}function r(e){return typeof e==`string`?e.replace(/^\\-/,`-`):e}t.exports={escapeFacetValue:n,unescapeFacetValue:r}}),sr=c((exports,t)=>{function n(e){return typeof e==`object`&&e?i(Array.isArray(e)?[]:{},e):e}function r(e){return typeof e==`function`||Array.isArray(e)||Object.prototype.toString.call(e)===`[object Object]`}function i(e,t){if(e===t)return e;for(var a in t){if(!Object.prototype.hasOwnProperty.call(t,a)||a===`__proto__`||a===`constructor`)continue;var o=t[a],s=e[a];if(s!==void 0&&o===void 0)continue;r(s)&&r(o)?e[a]=i(s,o):e[a]=n(o)}return e}function a(e){r(e)||(e={});for(var t=1,n=arguments.length;t<n;t++){var a=arguments[t];r(a)&&i(e,a)}return e}t.exports=a}),cr=c((exports,t)=>{function n(e){return e&&Object.keys(e).length>0}t.exports=n}),lr=c((exports,t)=>{function n(e,t){if(e===null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}t.exports=n}),ur=c((exports,t)=>{function n(e){e||={},this.params=e.params||[]}n.prototype={constructor:n,addParams:function(e){var t=this.params.slice();return t.push(e),new n({params:t})},removeParams:function(e){return new n({params:this.params.filter(function(t){return t.$$id!==e})})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:`bought-together`}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:`related-products`}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:`trending-items`}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:`trending-facets`}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:`looking-similar`}))},_buildQueries:function(e,t){return this.params.filter(function(e){return t[e.$$id]===void 0}).map(function(t){var n=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete n.$$id,n})}},t.exports=n}),dr=c((exports,t)=>{function n(e,t){this._state=e,this._rawResults={};var n=this;e.params.forEach(function(e){var r=e.$$id;n[r]=t[r],n._rawResults[r]=t[r]})}n.prototype={constructor:n},t.exports=n}),fr=c((exports,t)=>{var n=sr();function r(e){return Object.keys(e).sort().reduce(function(t,n){return t[n]=e[n],t},{})}var i={_getQueries:function(e,t){var n=[];return n.push({indexName:e,params:i._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach(function(r){n.push({indexName:e,params:i._getDisjunctiveFacetSearchParams(t,r)})}),t.getRefinedHierarchicalFacets().forEach(function(r){var a=t.getHierarchicalFacetByName(r),o=t.getHierarchicalRefinement(r),s=t._getHierarchicalFacetSeparator(a);if(o.length>0&&o[0].split(s).length>1){var c=o[0].split(s).slice(0,-1).reduce(function(e,t,n){return e.concat({attribute:a.attributes[n],value:n===0?t:[e[e.length-1].value,t].join(s)})},[]);c.forEach(function(r,o){var s=i._getDisjunctiveFacetSearchParams(t,r.attribute,o===0);function l(e){return a.attributes.some(function(t){return t===e.split(`:`)[0]})}var u=(s.facetFilters||[]).reduce(function(e,t){if(Array.isArray(t)){var n=t.filter(function(e){return!l(e)});n.length>0&&e.push(n)}return typeof t==`string`&&!l(t)&&e.push(t),e},[]),d=c[o-1];o>0?s.facetFilters=u.concat(d.attribute+`:`+d.value):u.length>0?s.facetFilters=u:delete s.facetFilters,n.push({indexName:e,params:s})})}}),n},_getCompositionQueries:function(e){return[{compositionID:e.index,requestBody:{params:i._getCompositionHitsSearchParams(e)}}]},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(i._getHitsHierarchicalFacetsAttributes(e)).sort(),a=i._getFacetFilters(e),o=i._getNumericFilters(e),s=i._getTagFilters(e),c={};return t.length>0&&(c.facets=t.indexOf(`*`)>-1?[`*`]:t),s.length>0&&(c.tagFilters=s),a.length>0&&(c.facetFilters=a),o.length>0&&(c.numericFilters=o),r(n({},e.getQueryParams(),c))},_getCompositionHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets.map(function(t){return e.disjunctiveFacetsRefinements&&e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].length>0?`disjunctive(`+t+`)`:t})).concat(i._getHitsHierarchicalFacetsAttributes(e)).sort(),a=i._getFacetFilters(e),o=i._getNumericFilters(e),s=i._getTagFilters(e),c={};t.length>0&&(c.facets=t.indexOf(`*`)>-1?[`*`]:t),s.length>0&&(c.tagFilters=s),a.length>0&&(c.facetFilters=a),o.length>0&&(c.numericFilters=o);var l=e.getQueryParams();return delete l.highlightPreTag,delete l.highlightPostTag,delete l.index,r(n({},l,c))},_getDisjunctiveFacetSearchParams:function(e,t,a){var o=i._getFacetFilters(e,t,a),s=i._getNumericFilters(e,t),c=i._getTagFilters(e),l={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};c.length>0&&(l.tagFilters=c);var u=e.getHierarchicalFacetByName(t);return u?l.facets=i._getDisjunctiveHierarchicalFacetAttribute(e,u,a):l.facets=t,s.length>0&&(l.numericFilters=s),o.length>0&&(l.facetFilters=o),r(n({},e.getQueryParams(),l))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var n=[];return Object.keys(e.numericRefinements).forEach(function(r){var i=e.numericRefinements[r]||{};Object.keys(i).forEach(function(e){var a=i[e]||[];t!==r&&a.forEach(function(t){if(Array.isArray(t)){var i=t.map(function(t){return r+e+t});n.push(i)}else n.push(r+e+t)})})}),n},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(`,`)},_getFacetFilters:function(e,t,n){var r=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach(function(e){var t=i[e]||[];t.slice().sort().forEach(function(t){r.push(e+`:`+t)})});var a=e.facetsExcludes||{};Object.keys(a).sort().forEach(function(e){var t=a[e]||[];t.sort().forEach(function(t){r.push(e+`:-`+t)})});var o=e.disjunctiveFacetsRefinements||{};Object.keys(o).sort().forEach(function(e){var n=o[e]||[];if(!(e===t||!n||n.length===0)){var i=[];n.slice().sort().forEach(function(t){i.push(e+`:`+t)}),r.push(i)}});var s=e.hierarchicalFacetsRefinements||{};return Object.keys(s).sort().forEach(function(i){var a=s[i]||[],o=a[0];if(o!==void 0){var c=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(c),u=e._getHierarchicalRootPath(c),d,f;if(t===i){if(o.indexOf(l)===-1||!u&&n===!0||u&&u.split(l).length===o.split(l).length)return;u?(f=u.split(l).length-1,o=u):(f=o.split(l).length-2,o=o.slice(0,o.lastIndexOf(l))),d=c.attributes[f]}else f=o.split(l).length-1,d=c.attributes[f];d&&r.push([d+`:`+o])}}),r},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return e.hierarchicalFacets.reduce(function(t,n){var r=e.getHierarchicalRefinement(n.name)[0];if(!r)return t.push(n.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(n),a=r.split(i).length,o=n.attributes.slice(0,a+1);return t.concat(o)},t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r=e._getHierarchicalFacetSeparator(t);if(n===!0){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(r).length),[t.attributes[a]]}var o=e.getHierarchicalRefinement(t.name)[0]||``,s=o.split(r).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,a,o){var s=o.isDisjunctiveFacet(e)?o.clearRefinements(e):o,c={facetQuery:t,facetName:e};return typeof a==`number`&&(c.maxFacetHits=a),r(n({},i._getHitsSearchParams(s),c))}};t.exports=i}),pr=c((exports,t)=>{t.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight(function(e,t){return Object.keys(Object(t)).forEach(function(n){t[n]!==void 0&&(e[n]!==void 0&&delete e[n],e[n]=t[n])}),e},{})}}),mr=c((exports,t)=>{t.exports=function(e,t){if(Array.isArray(e)){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}}}),hr=c((exports,t)=>{function n(e,t){return e.filter(function(n,r){return t.indexOf(n)>-1&&e.indexOf(n)===r})}t.exports=n}),gr=c((exports,t)=>{function n(e){if(typeof e==`number`)return e;if(typeof e==`string`)return parseFloat(e);if(Array.isArray(e))return e.map(n);throw Error(`The value should be a number, a parsable string or an array of those.`)}t.exports=n}),_r=c((exports,t)=>{t.exports=function(e){return e===null?!1:/^[a-zA-Z0-9_-]{1,64}$/.test(e)}}),vr=c((exports,t)=>{var n=pr(),r=cr(),i=lr(),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=``+r,o=e[t]?e[t].concat(i):[i],s={};return s[t]=o,n(s,e)},removeRefinement:function(e,t,n){if(n===void 0)return a.clearRefinement(e,function(e,n){return t===n});var r=``+n;return a.clearRefinement(e,function(e,n){return t===n&&r===e})},toggleRefinement:function(e,t,n){if(n===void 0)throw Error(`toggleRefinement should be used with a value`);return a.isRefined(e,t,n)?a.removeRefinement(e,t,n):a.addRefinement(e,t,n)},clearRefinement:function(e,t,n){if(t===void 0)return r(e)?{}:e;if(typeof t==`string`)return i(e,[t]);if(typeof t==`function`){var a=!1,o=Object.keys(e).reduce(function(r,i){var o=e[i]||[],s=o.filter(function(e){return!t(e,i,n)});return s.length!==o.length&&(a=!0),r[i]=s,r},{});return a?o:e}},isRefined:function(e,t,n){var r=!!e[t]&&e[t].length>0;if(n===void 0||!r)return r;var i=``+n;ret