/*! @docsearch/js 3.3.5 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function P(e){for(var t=1;t=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ze(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var o=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var a,c,u=[],i=!0,s=!1;try{for(o=o.call(n);!(i=(a=o.next()).done)&&(u.push(a.value),!r||u.length!==r);i=!0);}catch(l){s=!0,c=l}finally{try{i||o.return==null||o.return()}finally{if(s)throw c}}return u}}(e,t)||Un(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Je(e){return function(t){if(Array.isArray(t))return mt(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Un(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Un(e,t){if(e){if(typeof e=="string")return mt(e,t);var n=Object.prototype.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)?mt(e,t):void 0}}function mt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n3)for(n=[n],a=3;a0?Ee(d.type,d.props,d.key,null,d.__v):d)!=null){if(d.__=n,d.__b=n.__b+1,(m=S[l])===null||m&&d.key==m.key&&d.type===m.type)S[l]=void 0;else for(p=0;p3)for(n=[n],a=3;a=n.__.length&&n.__.push({}),n.__[e]}function Gn(e){return fe=1,Xn(tr,e)}function Xn(e,t,n){var r=De(pe++,2);return r.t=e,r.__c||(r.__=[n?n(t):tr(void 0,t),function(o){var a=r.t(r.__[0],o);r.__[0]!==a&&(r.__=[a,r.__[1]],r.__c.setState({}))}],r.__c=q),r.__}function er(e,t){var n=De(pe++,3);!E.__s&&kt(n.__H,t)&&(n.__=e,n.__H=t,q.__H.__h.push(n))}function Wt(e,t){var n=De(pe++,4);!E.__s&&kt(n.__H,t)&&(n.__=e,n.__H=t,q.__h.push(n))}function at(e,t){var n=De(pe++,7);return kt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Rr(){ht.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(Be),e.__H.__h.forEach(vt),e.__H.__h=[]}catch(t){e.__H.__h=[],E.__e(t,e.__v)}}),ht=[]}E.__b=function(e){q=null,Ht&&Ht(e)},E.__r=function(e){Ut&&Ut(e),pe=0;var t=(q=e.__c).__H;t&&(t.__h.forEach(Be),t.__h.forEach(vt),t.__h=[])},E.diffed=function(e){Ft&&Ft(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(ht.push(t)!==1&&Mt===E.requestAnimationFrame||((Mt=E.requestAnimationFrame)||function(n){var r,o=function(){clearTimeout(a),Kt&&cancelAnimationFrame(r),setTimeout(n)},a=setTimeout(o,100);Kt&&(r=requestAnimationFrame(o))})(Rr)),q=void 0},E.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Be),n.__h=n.__h.filter(function(r){return!r.__||vt(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],E.__e(r,n.__v)}}),Bt&&Bt(e,t)},E.unmount=function(e){Vt&&Vt(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Be)}catch(n){E.__e(n,t.__v)}};var Kt=typeof requestAnimationFrame=="function";function Be(e){var t=q;typeof e.__c=="function"&&e.__c(),q=t}function vt(e){var t=q;e.__c=e.__(),q=t}function kt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function tr(e,t){return typeof t=="function"?t(e):t}function nr(e,t){for(var n in t)e[n]=t[n];return e}function yt(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){this.props=e}(_t.prototype=new W).isPureReactComponent=!0,_t.prototype.shouldComponentUpdate=function(e,t){return yt(this.props,e)||yt(this.state,t)};var zt=E.__b;E.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),zt&&zt(e)};var Tr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Jt=function(e,t){return e==null?null:J(J(e).map(t))},Lr={map:Jt,forEach:Jt,count:function(e){return e?J(e).length:0},only:function(e){var t=J(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:J},qr=E.__e;function Ve(){this.__u=0,this.t=null,this.__b=null}function rr(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function be(){this.u=null,this.o=null}E.__e=function(e,t,n){if(e.then){for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}qr(e,t,n)},(Ve.prototype=new W).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=rr(r.__v),a=!1,c=function(){a||(a=!0,n.componentWillUnmount=n.__c,o?o(u):u())};n.__c=n.componentWillUnmount,n.componentWillUnmount=function(){c(),n.__c&&n.__c()};var u=function(){if(!--r.__u){if(r.state.__e){var s=r.state.__e;r.__v.__k[0]=function p(m,d,_){return m&&(m.__v=null,m.__k=m.__k&&m.__k.map(function(v){return p(v,d,_)}),m.__c&&m.__c.__P===d&&(m.__e&&_.insertBefore(m.__e,m.__d),m.__c.__e=!0,m.__c.__P=_)),m}(s,s.__c.__P,s.__c.__O)}var l;for(r.setState({__e:r.__b=null});l=r.t.pop();)l.forceUpdate()}},i=t.__h===!0;r.__u++||i||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(c,c)},Ve.prototype.componentWillUnmount=function(){this.t=[]},Ve.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]=function a(c,u,i){return c&&(c.__c&&c.__c.__H&&(c.__c.__H.__.forEach(function(s){typeof s.__c=="function"&&s.__c()}),c.__c.__H=null),(c=nr({},c)).__c!=null&&(c.__c.__P===i&&(c.__c.__P=u),c.__c=null),c.__k=c.__k&&c.__k.map(function(s){return a(s,u,i)})),c}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__e&&V(Y,null,e.fallback);return o&&(o.__h=null),[V(Y,null,t.__e?null:e.children),o]};var $t=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),Ie(V(Mr,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function or(e,t){return V(Hr,{__v:e,i:t})}(be.prototype=new W).__e=function(e){var t=this,n=rr(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),$t(t,e,r)):o()};n?n(a):a()}},be.prototype.render=function(e){this.u=null,this.o=new Map;var t=J(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},be.prototype.componentDidUpdate=be.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){$t(e,n,t)})};var ar=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ur=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Fr=function(e){return(typeof Symbol<"u"&&je(Symbol())=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function cr(e,t,n){return t.__k==null&&(t.textContent=""),Ie(e,t),typeof n=="function"&&n(),e?e.__c:null}W.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(W.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Qt=E.event;function Br(){}function Vr(){return this.cancelBubble}function Wr(){return this.defaultPrevented}E.event=function(e){return Qt&&(e=Qt(e)),e.persist=Br,e.isPropagationStopped=Vr,e.isDefaultPrevented=Wr,e.nativeEvent=e};var ir,Zt={configurable:!0,get:function(){return this.class}},Yt=E.vnode;E.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){for(var o in r={},n){var a=n[o];o==="value"&&"defaultValue"in n&&a==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!Fr(n.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():Ur.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():a===null&&(a=void 0),r[o]=a)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=J(n.children).forEach(function(c){c.props.selected=r.value.indexOf(c.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=J(n.children).forEach(function(c){c.props.selected=r.multiple?r.defaultValue.indexOf(c.props.value)!=-1:r.defaultValue==c.props.value})),e.props=r}t&&n.class!=n.className&&(Zt.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",Zt)),e.$$typeof=ar,Yt&&Yt(e)};var Gt=E.__r;E.__r=function(e){Gt&&Gt(e),ir=e.__c};var Kr={ReactCurrentDispatcher:{current:{readContext:function(e){return ir.__n[e.__c].props.value}}}};(typeof performance>"u"?"undefined":je(performance))=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function Xt(e){return!!e&&e.$$typeof===ar}var f={useState:Gn,useReducer:Xn,useEffect:er,useLayoutEffect:Wt,useRef:function(e){return fe=5,at(function(){return{current:e}},[])},useImperativeHandle:function(e,t,n){fe=6,Wt(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))},useMemo:at,useCallback:function(e,t){return fe=8,at(function(){return e},t)},useContext:function(e){var t=q.context[e.__c],n=De(pe++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub(q)),t.props.value):e.__},useDebugValue:function(e,t){E.useDebugValue&&E.useDebugValue(t?t(e):e)},version:"16.8.0",Children:Lr,render:cr,hydrate:function(e,t,n){return Yn(e,t),typeof n=="function"&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(Ie(null,e),!0)},createPortal:or,createElement:V,createContext:function(e,t){var n={__c:t="__cC"+Bn++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,a;return this.getChildContext||(o=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(c){this.props.value!==c.value&&o.some(dt)},this.sub=function(c){o.push(c);var u=c.componentWillUnmount;c.componentWillUnmount=function(){o.splice(o.indexOf(c),1),u&&u.call(c)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return V.bind(null,e)},cloneElement:function(e){return Xt(e)?Nr.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:Y,isValidElement:Xt,findDOMNode:function(e){return e&&(e.base||e.nodeType===1&&e)||null},Component:W,PureComponent:_t,memo:function(e,t){function n(o){var a=this.props.ref,c=a==o.ref;return!c&&a&&(a.call?a(null):a.current=null),t?!t(this.props,o)||!c:yt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,V(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(e){function t(n,r){var o=nr({},n);return delete o.ref,e(o,(r=n.ref||r)&&(je(r)!="object"||"current"in r)?r:null)}return t.$$typeof=Tr,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:Y,Suspense:Ve,SuspenseList:be,lazy:function(e){var t,n,r;function o(a){if(t||(t=e()).then(function(c){n=c.default||c},function(c){r=c}),r)throw r;if(!n)throw t;return V(n,a)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kr};function zr(){return f.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},f.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function ur(){return f.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},f.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var Jr=["translations"];function gt(){return gt=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Zr=f.forwardRef(function(e,t){var n=e.translations,r=n===void 0?{}:n,o=Qr(e,Jr),a=r.buttonText,c=a===void 0?"Search":a,u=r.buttonAriaLabel,i=u===void 0?"Search":u,s=$r(Gn(null),2),l=s[0],p=s[1];return er(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p("⌘"):p("Ctrl"))},[]),f.createElement("button",gt({type:"button",className:"DocSearch DocSearch-Button","aria-label":i},o,{ref:t}),f.createElement("span",{className:"DocSearch-Button-Container"},f.createElement(ur,null),f.createElement("span",{className:"DocSearch-Button-Placeholder"},c)),f.createElement("span",{className:"DocSearch-Button-Keys"},l!==null&&f.createElement(f.Fragment,null,f.createElement("kbd",{className:"DocSearch-Button-Key"},l==="Ctrl"?f.createElement(zr,null):l),f.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))});function ke(e){return e.reduce(function(t,n){return t.concat(n)},[])}var Yr=0;function bt(e){return e.collections.length===0?0:e.collections.reduce(function(t,n){return t+n.items.length},0)}var Ot=function(){},Gr=[{segment:"autocomplete-core",version:"1.8.2"}];function We(e,t){var n=t;return{then:function(r,o){return We(e.then(Re(r,n,e),Re(o,n,e)),n)},catch:function(r){return We(e.catch(Re(r,n,e)),n)},finally:function(r){return r&&n.onCancelList.push(r),We(e.finally(Re(r&&function(){return n.onCancelList=[],r()},n,e)),n)},cancel:function(){n.isCanceled=!0;var r=n.onCancelList;n.onCancelList=[],r.forEach(function(o){o()})},isCanceled:function(){return n.isCanceled===!0}}}function tn(e){return We(e,{isCanceled:!1,onCancelList:[]})}function Re(e,t,n){return e?function(r){return t.isCanceled?r:e(r)}:n}function nn(e,t,n,r){if(!n)return null;if(e<0&&(t===null||r!==null&&t===0))return n+e;var o=(t===null?-1:t)+e;return o<=-1||o>=n?r===null?null:0:o}function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function on(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(a){return a.sources}},e),{},{id:(n=e.id)!==null&&n!==void 0?n:"autocomplete-".concat(Yr++),plugins:o,initialState:ae({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(a){var c;(c=e.onStateChange)===null||c===void 0||c.call(e,a),o.forEach(function(u){var i;return(i=u.onStateChange)===null||i===void 0?void 0:i.call(u,a)})},onSubmit:function(a){var c;(c=e.onSubmit)===null||c===void 0||c.call(e,a),o.forEach(function(u){var i;return(i=u.onSubmit)===null||i===void 0?void 0:i.call(u,a)})},onReset:function(a){var c;(c=e.onReset)===null||c===void 0||c.call(e,a),o.forEach(function(u){var i;return(i=u.onReset)===null||i===void 0?void 0:i.call(u,a)})},getSources:function(a){return Promise.all([].concat(ao(o.map(function(c){return c.getSources})),[e.getSources]).filter(Boolean).map(function(c){return function(u,i){var s=[];return Promise.resolve(u(i)).then(function(l){return Promise.all(l.filter(function(p){return!!p}).map(function(p){if(p.sourceId,s.includes(p.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(p.sourceId)," is not unique."));s.push(p.sourceId);var m={getItemInputValue:function(_){return _.state.query},getItemUrl:function(){},onSelect:function(_){(0,_.setIsOpen)(!1)},onActive:Ot,onResolve:Ot};Object.keys(m).forEach(function(_){m[_].__default=!0});var d=on(on({},m),p);return Promise.resolve(d)}))})}(c,a)})).then(function(c){return ke(c)}).then(function(c){return c.map(function(u){return ae(ae({},u),{},{onSelect:function(i){u.onSelect(i),t.forEach(function(s){var l;return(l=s.onSelect)===null||l===void 0?void 0:l.call(s,i)})},onActive:function(i){u.onActive(i),t.forEach(function(s){var l;return(l=s.onActive)===null||l===void 0?void 0:l.call(s,i)})},onResolve:function(i){u.onResolve(i),t.forEach(function(s){var l;return(l=s.onResolve)===null||l===void 0?void 0:l.call(s,i)})}})})})},navigator:ae({navigate:function(a){var c=a.itemUrl;r.location.assign(c)},navigateNewTab:function(a){var c=a.itemUrl,u=r.open(c,"_blank","noopener");u==null||u.focus()},navigateNewWindow:function(a){var c=a.itemUrl;r.open(c,"_blank","noopener")}},e.navigator)})}function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qe(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mn,ut,He,ge=null,dn=(mn=-1,ut=-1,He=void 0,function(e){var t=++mn;return Promise.resolve(e).then(function(n){return He&&t=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var go=["props","refresh","store"],bo=["inputElement","formElement","panelElement"],Oo=["inputElement"],So=["inputElement","maxLength"],Eo=["sourceIndex"],wo=["sourceIndex"],jo=["item","source","sourceIndex"];function vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function R(e){for(var t=1;t=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Io(e){var t=e.props,n=e.refresh,r=e.store,o=te(e,go),a=function(c,u){return u!==void 0?"".concat(c,"-").concat(u):c};return{getEnvironmentProps:function(c){var u=c.inputElement,i=c.formElement,s=c.panelElement;function l(p){!r.getState().isOpen&&r.pendingRequests.isEmpty()||p.target===u||[i,s].some(function(m){return d=m,_=p.target,d===_||d.contains(_);var d,_})===!1&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return R({onTouchStart:l,onMouseDown:l,onTouchMove:function(p){r.getState().isOpen!==!1&&u===t.environment.document.activeElement&&p.target!==u&&u.blur()}},te(c,bo))},getRootProps:function(c){return R({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},c)},getFormProps:function(c){return c.inputElement,R({action:"",noValidate:!0,role:"search",onSubmit:function(u){var i;u.preventDefault(),t.onSubmit(R({event:u,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),(i=c.inputElement)===null||i===void 0||i.blur()},onReset:function(u){var i;u.preventDefault(),t.onReset(R({event:u,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),(i=c.inputElement)===null||i===void 0||i.focus()}},te(c,Oo))},getLabelProps:function(c){var u=c||{},i=u.sourceIndex,s=te(u,Eo);return R({htmlFor:"".concat(a(t.id,i),"-input"),id:"".concat(a(t.id,i),"-label")},s)},getInputProps:function(c){var u;function i(y){(t.openOnFocus||r.getState().query)&&ue(R({event:y,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var s=c||{},l=(s.inputElement,s.maxLength),p=l===void 0?512:l,m=te(s,So),d=le(r.getState()),_=function(y){return!!(y&&y.match(eo))}(((u=t.environment.navigator)===null||u===void 0?void 0:u.userAgent)||""),v=d!=null&&d.itemUrl&&!_?"go":"search";return R({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&r.getState().activeItemId!==null?"".concat(t.id,"-item-").concat(r.getState().activeItemId):void 0,"aria-controls":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:r.getState().completion||r.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:v,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:p,type:"search",onChange:function(y){ue(R({event:y,props:t,query:y.currentTarget.value.slice(0,p),refresh:n,store:r},o))},onKeyDown:function(y){(function(S){var g=S.event,O=S.props,b=S.refresh,h=S.store,I=_o(S,vo);if(g.key==="ArrowUp"||g.key==="ArrowDown"){var C=function(){var L=O.environment.document.getElementById("".concat(O.id,"-item-").concat(h.getState().activeItemId));L&&(L.scrollIntoViewIfNeeded?L.scrollIntoViewIfNeeded(!1):L.scrollIntoView(!1))},T=function(){var L=le(h.getState());if(h.getState().activeItemId!==null&&L){var G=L.item,nt=L.itemInputValue,Ce=L.itemUrl,re=L.source;re.onActive(ee({event:g,item:G,itemInputValue:nt,itemUrl:Ce,refresh:b,source:re,state:h.getState()},I))}};g.preventDefault(),h.getState().isOpen===!1&&(O.openOnFocus||h.getState().query)?ue(ee({event:g,props:O,query:h.getState().query,refresh:b,store:h},I)).then(function(){h.dispatch(g.key,{nextActiveItemId:O.defaultActiveItemId}),T(),setTimeout(C,0)}):(h.dispatch(g.key,{}),T(),C())}else if(g.key==="Escape")g.preventDefault(),h.dispatch(g.key,null),h.pendingRequests.cancelAll();else if(g.key==="Tab")h.dispatch("blur",null),h.pendingRequests.cancelAll();else if(g.key==="Enter"){if(h.getState().activeItemId===null||h.getState().collections.every(function(L){return L.items.length===0}))return void(O.debug||h.pendingRequests.cancelAll());g.preventDefault();var A=le(h.getState()),D=A.item,N=A.itemInputValue,F=A.itemUrl,B=A.source;if(g.metaKey||g.ctrlKey)F!==void 0&&(B.onSelect(ee({event:g,item:D,itemInputValue:N,itemUrl:F,refresh:b,source:B,state:h.getState()},I)),O.navigator.navigateNewTab({itemUrl:F,item:D,state:h.getState()}));else if(g.shiftKey)F!==void 0&&(B.onSelect(ee({event:g,item:D,itemInputValue:N,itemUrl:F,refresh:b,source:B,state:h.getState()},I)),O.navigator.navigateNewWindow({itemUrl:F,item:D,state:h.getState()}));else if(!g.altKey){if(F!==void 0)return B.onSelect(ee({event:g,item:D,itemInputValue:N,itemUrl:F,refresh:b,source:B,state:h.getState()},I)),void O.navigator.navigate({itemUrl:F,item:D,state:h.getState()});ue(ee({event:g,nextState:{isOpen:!1},props:O,query:N,refresh:b,store:h},I)).then(function(){B.onSelect(ee({event:g,item:D,itemInputValue:N,itemUrl:F,refresh:b,source:B,state:h.getState()},I))})}}})(R({event:y,props:t,refresh:n,store:r},o))},onFocus:i,onBlur:Ot,onClick:function(y){c.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(y)}},m)},getPanelProps:function(c){return R({onMouseDown:function(u){u.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},c)},getListProps:function(c){var u=c||{},i=u.sourceIndex,s=te(u,wo);return R({role:"listbox","aria-labelledby":"".concat(a(t.id,i),"-label"),id:"".concat(a(t.id,i),"-list")},s)},getItemProps:function(c){var u=c.item,i=c.source,s=c.sourceIndex,l=te(c,jo);return R({id:"".concat(a(t.id,s),"-item-").concat(u.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===u.__autocomplete_id,onMouseMove:function(p){if(u.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",u.__autocomplete_id);var m=le(r.getState());if(r.getState().activeItemId!==null&&m){var d=m.item,_=m.itemInputValue,v=m.itemUrl,y=m.source;y.onActive(R({event:p,item:d,itemInputValue:_,itemUrl:v,refresh:n,source:y,state:r.getState()},o))}}},onMouseDown:function(p){p.preventDefault()},onClick:function(p){var m=i.getItemInputValue({item:u,state:r.getState()}),d=i.getItemUrl({item:u,state:r.getState()});(d?Promise.resolve():ue(R({event:p,nextState:{isOpen:!1},props:t,query:m,refresh:n,store:r},o))).then(function(){i.onSelect(R({event:p,item:u,itemInputValue:m,itemUrl:d,refresh:n,source:i,state:r.getState()},o))})}},l)}}}function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ko(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Zo(e){var t=e.translations,n=t===void 0?{}:t,r=Qo(e,Jo),o=n.noResultsText,a=o===void 0?"No results for":o,c=n.suggestedQueryText,u=c===void 0?"Try searching for":c,i=n.reportMissingResultsText,s=i===void 0?"Believe this query should return results?":i,l=n.reportMissingResultsLinkText,p=l===void 0?"Let us know.":l,m=r.state.context.searchSuggestions;return f.createElement("div",{className:"DocSearch-NoResults"},f.createElement("div",{className:"DocSearch-Screen-Icon"},f.createElement(Ko,null)),f.createElement("p",{className:"DocSearch-Title"},a,' "',f.createElement("strong",null,r.state.query),'"'),m&&m.length>0&&f.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},f.createElement("p",{className:"DocSearch-Help"},u,":"),f.createElement("ul",null,m.slice(0,3).reduce(function(d,_){return[].concat($o(d),[f.createElement("li",{key:_},f.createElement("button",{className:"DocSearch-Prefill",key:_,type:"button",onClick:function(){r.setQuery(_.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},_))])},[]))),r.getMissingResultsUrl&&f.createElement("p",{className:"DocSearch-Help"},"".concat(s," "),f.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},p)))}var Yo=["hit","attribute","tagName"];function Sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function En(e){for(var t=1;t=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function wn(e,t){return t.split(".").reduce(function(n,r){return n!=null&&n[r]?n[r]:null},e)}function ie(e){var t=e.hit,n=e.attribute,r=e.tagName;return V(r===void 0?"span":r,En(En({},Xo(e,Yo)),{},{dangerouslySetInnerHTML:{__html:wn(t,"_snippetResult.".concat(n,".value"))||wn(t,n)}}))}function jn(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var o=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var a,c,u=[],i=!0,s=!1;try{for(o=o.call(n);!(i=(a=o.next()).done)&&(u.push(a.value),!r||u.length!==r);i=!0);}catch(l){s=!0,c=l}finally{try{i||o.return==null||o.return()}finally{if(s)throw c}}return u}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Pn(n,r);var o=Object.prototype.toString.call(n).slice(8,-1);if(o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set")return Array.from(n);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Pn(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Pn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n|<\/mark>)/g,na=RegExp(pr.source);function mr(e){var t,n,r,o,a,c=e;if(!c.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var u=((c.__docsearch_parent?(t=c.__docsearch_parent)===null||t===void 0||(n=t._highlightResult)===null||n===void 0||(r=n.hierarchy)===null||r===void 0?void 0:r.lvl0:(o=e._highlightResult)===null||o===void 0||(a=o.hierarchy)===null||a===void 0?void 0:a.lvl0)||{}).value;return u&&na.test(u)?u.replace(pr,""):u}function wt(){return wt=Object.assign||function(e){for(var t=1;t=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ca(e){var t=e.translations,n=t===void 0?{}:t,r=aa(e,oa),o=n.recentSearchesTitle,a=o===void 0?"Recent":o,c=n.noRecentSearchesText,u=c===void 0?"No recent searches":c,i=n.saveRecentSearchButtonTitle,s=i===void 0?"Save this search":i,l=n.removeRecentSearchButtonTitle,p=l===void 0?"Remove this search from history":l,m=n.favoriteSearchesTitle,d=m===void 0?"Favorite":m,_=n.removeFavoriteSearchButtonTitle,v=_===void 0?"Remove this search from favorites":_;return r.state.status==="idle"&&r.hasCollections===!1?r.disableUserPersonalization?null:f.createElement("div",{className:"DocSearch-StartScreen"},f.createElement("p",{className:"DocSearch-Help"},u)):r.hasCollections===!1?null:f.createElement("div",{className:"DocSearch-Dropdown-Container"},f.createElement(Et,Ye({},r,{title:a,collection:r.state.collections[0],renderIcon:function(){return f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(Mo,null))},renderAction:function(y){var S=y.item,g=y.runFavoriteTransition,O=y.runDeleteTransition;return f.createElement(f.Fragment,null,f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:s,type:"submit",onClick:function(b){b.preventDefault(),b.stopPropagation(),g(function(){r.favoriteSearches.add(S),r.recentSearches.remove(S),r.refresh()})}},f.createElement(On,null))),f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:p,type:"submit",onClick:function(b){b.preventDefault(),b.stopPropagation(),O(function(){r.recentSearches.remove(S),r.refresh()})}},f.createElement(St,null))))}})),f.createElement(Et,Ye({},r,{title:d,collection:r.state.collections[1],renderIcon:function(){return f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(On,null))},renderAction:function(y){var S=y.item,g=y.runDeleteTransition;return f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:v,type:"submit",onClick:function(O){O.preventDefault(),O.stopPropagation(),g(function(){r.favoriteSearches.remove(S),r.refresh()})}},f.createElement(St,null)))}})))}var ia=["translations"];function Ge(){return Ge=Object.assign||function(e){for(var t=1;t=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var la=f.memo(function(e){var t=e.translations,n=t===void 0?{}:t,r=ua(e,ia);if(r.state.status==="error")return f.createElement(zo,{translations:n==null?void 0:n.errorScreen});var o=r.state.collections.some(function(a){return a.items.length>0});return r.state.query?o===!1?f.createElement(Zo,Ge({},r,{translations:n==null?void 0:n.noResultsScreen})):f.createElement(ra,r):f.createElement(ca,Ge({},r,{hasCollections:o,translations:n==null?void 0:n.startScreen}))},function(e,t){return t.state.status==="loading"||t.state.status==="stalled"}),sa=["translations"];function Xe(){return Xe=Object.assign||function(e){for(var t=1;t=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function pa(e){var t=e.translations,n=t===void 0?{}:t,r=fa(e,sa),o=n.resetButtonTitle,a=o===void 0?"Clear the query":o,c=n.resetButtonAriaLabel,u=c===void 0?"Clear the query":c,i=n.cancelButtonText,s=i===void 0?"Cancel":i,l=n.cancelButtonAriaLabel,p=l===void 0?"Cancel":l,m=r.getFormProps({inputElement:r.inputRef.current}).onReset;return f.useEffect(function(){r.autoFocus&&r.inputRef.current&&r.inputRef.current.focus()},[r.autoFocus,r.inputRef]),f.useEffect(function(){r.isFromSelection&&r.inputRef.current&&r.inputRef.current.select()},[r.isFromSelection,r.inputRef]),f.createElement(f.Fragment,null,f.createElement("form",{className:"DocSearch-Form",onSubmit:function(d){d.preventDefault()},onReset:m},f.createElement("label",Xe({className:"DocSearch-MagnifierLabel"},r.getLabelProps()),f.createElement(ur,null)),f.createElement("div",{className:"DocSearch-LoadingIndicator"},f.createElement(qo,null)),f.createElement("input",Xe({className:"DocSearch-Input",ref:r.inputRef},r.getInputProps({inputElement:r.inputRef.current,autoFocus:r.autoFocus,maxLength:64}))),f.createElement("button",{type:"reset",title:a,className:"DocSearch-Reset","aria-label":u,hidden:!r.state.query},f.createElement(St,null))),f.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":p,onClick:r.onClose},s))}var ma=["_highlightResult","_snippetResult"];function da(e,t){if(e==null)return{};var n,r,o=function(c,u){if(c==null)return{};var i,s,l={},p=Object.keys(c);for(s=0;s=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ha(e){return function(){var t="__TEST_KEY__";try{return localStorage.setItem(t,""),localStorage.removeItem(t),!0}catch{return!1}}()===!1?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function Dn(e){var t=e.key,n=e.limit,r=n===void 0?5:n,o=ha(t),a=o.getItem().slice(0,r);return{add:function(c){var u=c,i=(u._highlightResult,u._snippetResult,da(u,ma)),s=a.findIndex(function(l){return l.objectID===i.objectID});s>-1&&a.splice(s,1),a.unshift(i),a=a.slice(0,r),o.setItem(a)},remove:function(c){a=a.filter(function(u){return u.objectID!==c.objectID}),o.setItem(a)},getAll:function(){return a}}}var va=["facetName","facetQuery"];function ya(e){var t,n="algoliasearch-client-js-".concat(e.key),r=function(){return t===void 0&&(t=e.localStorage||window.localStorage),t},o=function(){return JSON.parse(r().getItem(n)||"{}")};return{get:function(a,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var i=JSON.stringify(a),s=o()[i];return Promise.all([s||c(),s!==void 0])}).then(function(i){var s=ze(i,2),l=s[0],p=s[1];return Promise.all([l,p||u.miss(l)])}).then(function(i){return ze(i,1)[0]})},set:function(a,c){return Promise.resolve().then(function(){var u=o();return u[JSON.stringify(a)]=c,r().setItem(n,JSON.stringify(u)),c})},delete:function(a){return Promise.resolve().then(function(){var c=o();delete c[JSON.stringify(a)],r().setItem(n,JSON.stringify(c))})},clear:function(){return Promise.resolve().then(function(){r().removeItem(n)})}}}function Oe(e){var t=Je(e.caches),n=t.shift();return n===void 0?{get:function(r,o){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return o().then(function(c){return Promise.all([c,a.miss(c)])}).then(function(c){return ze(c,1)[0]})},set:function(r,o){return Promise.resolve(o)},delete:function(r){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(r,o){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(r,o,a).catch(function(){return Oe({caches:t}).get(r,o,a)})},set:function(r,o){return n.set(r,o).catch(function(){return Oe({caches:t}).set(r,o)})},delete:function(r){return n.delete(r).catch(function(){return Oe({caches:t}).delete(r)})},clear:function(){return n.clear().catch(function(){return Oe({caches:t}).clear()})}}}function st(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var c=r(),u=o&&o.miss||function(){return Promise.resolve()};return c.then(function(i){return u(i)}).then(function(){return c})},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(n){return delete t[JSON.stringify(n)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function _a(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function dr(e,t){return t&&Object.keys(t).forEach(function(n){e[n]=t[n](e)}),e}function et(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var se={Read:1,Write:2,Any:3},hr=1,ga=2,vr=3;function yr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hr;return P(P({},e),{},{status:t,lastUpdate:Date.now()})}function _r(e){return typeof e=="string"?{protocol:"https",url:e,accept:se.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||se.Any}}var xn="GET",tt="POST";function ba(e,t){return Promise.all(t.map(function(n){return e.get(n,function(){return Promise.resolve(yr(n))})})).then(function(n){var r=n.filter(function(c){return function(u){return u.status===hr||Date.now()-u.lastUpdate>12e4}(c)}),o=n.filter(function(c){return function(u){return u.status===vr&&Date.now()-u.lastUpdate<=12e4}(c)}),a=[].concat(Je(r),Je(o));return{getTimeout:function(c,u){return(o.length===0&&c===0?1:o.length+3+c)*u},statelessHosts:a.length>0?a.map(function(c){return _r(c)}):t}})}function An(e,t,n,r){var o=[],a=function(m,d){if(!(m.method===xn||m.data===void 0&&d.data===void 0)){var _=Array.isArray(m.data)?m.data:P(P({},m.data),d.data);return JSON.stringify(_)}}(n,r),c=function(m,d){var _=P(P({},m.headers),d.headers),v={};return Object.keys(_).forEach(function(y){var S=_[y];v[y.toLowerCase()]=S}),v}(e,r),u=n.method,i=n.method!==xn?{}:P(P({},n.data),r.data),s=P(P(P({"x-algolia-agent":e.userAgent.value},e.queryParameters),i),r.queryParameters),l=0,p=function m(d,_){var v=d.pop();if(v===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Nn(o)};var y={data:a,headers:c,method:u,url:Sa(v,n.path,s),connectTimeout:_(l,e.timeouts.connect),responseTimeout:_(l,r.timeout)},S=function(O){var b={request:y,response:O,host:v,triesLeft:d.length};return o.push(b),b},g={onSucess:function(O){return function(b){try{return JSON.parse(b.content)}catch(h){throw function(I,C){return{name:"DeserializationError",message:I,response:C}}(h.message,b)}}(O)},onRetry:function(O){var b=S(O);return O.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",br(b)),e.hostsCache.set(v,yr(v,O.isTimedOut?vr:ga))]).then(function(){return m(d,_)})},onFail:function(O){throw S(O),function(b,h){var I=b.content,C=b.status,T=I;try{T=JSON.parse(I).message}catch{}return function(A,D,N){return{name:"ApiError",message:A,status:D,transporterStackTrace:N}}(T,C,h)}(O,Nn(o))}};return e.requester.send(y).then(function(O){return function(b,h){return function(I){var C=I.status;return I.isTimedOut||function(T){var A=T.isTimedOut,D=T.status;return!A&&~~D==0}(I)||~~(C/100)!=2&&~~(C/100)!=4}(b)?h.onRetry(b):~~(b.status/100)==2?h.onSucess(b):h.onFail(b)}(O,g)})};return ba(e.hostsCache,t).then(function(m){return p(Je(m.statelessHosts).reverse(),m.getTimeout)})}function Oa(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(n){var r="; ".concat(n.segment).concat(n.version!==void 0?" (".concat(n.version,")"):"");return t.value.indexOf(r)===-1&&(t.value="".concat(t.value).concat(r)),t}};return t}function Sa(e,t,n){var r=gr(n),o="".concat(e.protocol,"://").concat(e.url,"/").concat(t.charAt(0)==="/"?t.substr(1):t);return r.length&&(o+="?".concat(r)),o}function gr(e){return Object.keys(e).map(function(t){return et("%s=%s",t,(n=e[t],Object.prototype.toString.call(n)==="[object Object]"||Object.prototype.toString.call(n)==="[object Array]"?JSON.stringify(e[t]):e[t]));var n}).join("&")}function Nn(e){return e.map(function(t){return br(t)})}function br(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return P(P({},e),{},{request:P(P({},e.request),{},{headers:P(P({},e.request.headers),t)})})}var Ea=function(e){var t=e.appId,n=function(a,c,u){var i={"x-algolia-api-key":u,"x-algolia-application-id":c};return{headers:function(){return a===Ke.WithinHeaders?i:{}},queryParameters:function(){return a===Ke.WithinQueryParameters?i:{}}}}(e.authMode!==void 0?e.authMode:Ke.WithinHeaders,t,e.apiKey),r=function(a){var c=a.hostsCache,u=a.logger,i=a.requester,s=a.requestsCache,l=a.responsesCache,p=a.timeouts,m=a.userAgent,d=a.hosts,_=a.queryParameters,v={hostsCache:c,logger:u,requester:i,requestsCache:s,responsesCache:l,timeouts:p,userAgent:m,headers:a.headers,queryParameters:_,hosts:d.map(function(y){return _r(y)}),read:function(y,S){var g=Cn(S,v.timeouts.read),O=function(){return An(v,v.hosts.filter(function(h){return(h.accept&se.Read)!=0}),y,g)};if((g.cacheable!==void 0?g.cacheable:y.cacheable)!==!0)return O();var b={request:y,mappedRequestOptions:g,transporter:{queryParameters:v.queryParameters,headers:v.headers}};return v.responsesCache.get(b,function(){return v.requestsCache.get(b,function(){return v.requestsCache.set(b,O()).then(function(h){return Promise.all([v.requestsCache.delete(b),h])},function(h){return Promise.all([v.requestsCache.delete(b),Promise.reject(h)])}).then(function(h){var I=ze(h,2);return I[0],I[1]})})},{miss:function(h){return v.responsesCache.set(b,h)}})},write:function(y,S){return An(v,v.hosts.filter(function(g){return(g.accept&se.Write)!=0}),y,Cn(S,v.timeouts.write))}};return v}(P(P({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:se.Read},{url:"".concat(t,".algolia.net"),accept:se.Write}].concat(_a([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:P(P(P({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:P(P({},n.queryParameters()),e.queryParameters)})),o={transporter:r,appId:t,addAlgoliaAgent:function(a,c){r.userAgent.add({segment:a,version:c})},clearCache:function(){return Promise.all([r.requestsCache.clear(),r.responsesCache.clear()]).then(function(){})}};return dr(o,e.methods)},Or=function(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={transporter:e.transporter,appId:e.appId,indexName:t};return dr(r,n.methods)}},Rn=function(e){return function(t,n){var r=t.map(function(o){return P(P({},o),{},{params:gr(o.params||{})})});return e.transporter.read({method:tt,path:"1/indexes/*/queries",data:{requests:r},cacheable:!0},n)}},Tn=function(e){return function(t,n){return Promise.all(t.map(function(r){var o=r.params,a=o.facetName,c=o.facetQuery,u=Dr(o,va);return Or(e)(r.indexName,{methods:{searchForFacetValues:Sr}}).searchForFacetValues(a,c,P(P({},n),u))}))}},wa=function(e){return function(t,n,r){return e.transporter.read({method:tt,path:et("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r)}},ja=function(e){return function(t,n){return e.transporter.read({method:tt,path:et("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},n)}},Sr=function(e){return function(t,n,r){return e.transporter.read({method:tt,path:et("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:n},cacheable:!0},r)}},Pa=1,Ia=2,ka=3;function Er(e,t,n){var r,o={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(a){return new Promise(function(c){var u=new XMLHttpRequest;u.open(a.method,a.url,!0),Object.keys(a.headers).forEach(function(p){return u.setRequestHeader(p,a.headers[p])});var i,s=function(p,m){return setTimeout(function(){u.abort(),c({status:0,content:m,isTimedOut:!0})},1e3*p)},l=s(a.connectTimeout,"Connection timeout");u.onreadystatechange=function(){u.readyState>u.OPENED&&i===void 0&&(clearTimeout(l),i=s(a.responseTimeout,"Socket timeout"))},u.onerror=function(){u.status===0&&(clearTimeout(l),clearTimeout(i),c({content:u.responseText||"Network request failed",status:u.status,isTimedOut:!1}))},u.onload=function(){clearTimeout(l),clearTimeout(i),c({content:u.responseText,status:u.status,isTimedOut:!1})},u.send(a.data)})}},logger:(r=ka,{debug:function(a,c){return Pa>=r&&console.debug(a,c),Promise.resolve()},info:function(a,c){return Ia>=r&&console.info(a,c),Promise.resolve()},error:function(a,c){return console.error(a,c),Promise.resolve()}}),responsesCache:st(),requestsCache:st({serializable:!1}),hostsCache:Oe({caches:[ya({key:"".concat("4.8.5","-").concat(e)}),st()]}),userAgent:Oa("4.8.5").add({segment:"Browser",version:"lite"}),authMode:Ke.WithinQueryParameters};return Ea(P(P(P({},o),n),{},{methods:{search:Rn,searchForFacetValues:Tn,multipleQueries:Rn,multipleSearchForFacetValues:Tn,initIndex:function(a){return function(c){return Or(a)(c,{methods:{search:ja,searchForFacetValues:Sr,findAnswers:wa}})}}}}))}Er.version="4.8.5";var Da=["footer","searchBox"];function we(){return we=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(l[i]=c[i]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Na(e){var t=e.appId,n=e.apiKey,r=e.indexName,o=e.placeholder,a=o===void 0?"Search docs":o,c=e.searchParameters,u=e.onClose,i=u===void 0?ta:u,s=e.transformItems,l=s===void 0?kn:s,p=e.hitComponent,m=p===void 0?Lo:p,d=e.resultsFooterComponent,_=d===void 0?function(){return null}:d,v=e.navigator,y=e.initialScrollY,S=y===void 0?0:y,g=e.transformSearchClient,O=g===void 0?kn:g,b=e.disableUserPersonalization,h=b!==void 0&&b,I=e.initialQuery,C=I===void 0?"":I,T=e.translations,A=T===void 0?{}:T,D=e.getMissingResultsUrl,N=A.footer,F=A.searchBox,B=Aa(A,Da),L=xa(f.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),G=L[0],nt=L[1],Ce=f.useRef(null),re=f.useRef(null),Dt=f.useRef(null),xe=f.useRef(null),me=f.useRef(null),$=f.useRef(10),Ct=f.useRef(typeof window<"u"?window.getSelection().toString().slice(0,64):"").current,X=f.useRef(C||Ct).current,xt=function(j,k,M){return f.useMemo(function(){var H=Er(j,k);return H.addAlgoliaAgent("docsearch","3.3.5"),/docsearch.js \(.*\)/.test(H.transporter.userAgent.value)===!1&&H.addAlgoliaAgent("docsearch-react","3.3.5"),M(H)},[j,k,M])}(t,n,O),oe=f.useRef(Dn({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(r),limit:10})).current,de=f.useRef(Dn({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(r),limit:oe.getAll().length===0?7:4})).current,he=f.useCallback(function(j){if(!h){var k=j.type==="content"?j.__docsearch_parent:j;k&&oe.getAll().findIndex(function(M){return M.objectID===k.objectID})===-1&&de.add(k)}},[oe,de,h]),ve=f.useMemo(function(){return No({id:"docsearch",defaultActiveItemId:0,placeholder:a,openOnFocus:!0,initialState:{query:X,context:{searchSuggestions:[]}},navigator:v,onStateChange:function(j){nt(j.state)},getSources:function(j){var k=j.query,M=j.state,H=j.setContext,Q=j.setStatus;return k?xt.search([{query:k,indexName:r,params:ft({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat($.current),"hierarchy.lvl2:".concat($.current),"hierarchy.lvl3:".concat($.current),"hierarchy.lvl4:".concat($.current),"hierarchy.lvl5:".concat($.current),"hierarchy.lvl6:".concat($.current),"content:".concat($.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20},c)}]).catch(function(x){throw x.name==="RetryError"&&Q("error"),x}).then(function(x){var U=x.results[0],Z=U.hits,Pr=U.nbHits,rt=In(Z,function(ot){return mr(ot)});return M.context.searchSuggestions.length0&&(At(),me.current&&me.current.focus())},[X,At]),f.useEffect(function(){function j(){if(re.current){var k=.01*window.innerHeight;re.current.style.setProperty("--docsearch-vh","".concat(k,"px"))}}return j(),window.addEventListener("resize",j),function(){window.removeEventListener("resize",j)}},[]),f.createElement("div",we({ref:Ce},jr({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",G.status==="stalled"&&"DocSearch-Container--Stalled",G.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(j){j.target===j.currentTarget&&i()}}),f.createElement("div",{className:"DocSearch-Modal",ref:re},f.createElement("header",{className:"DocSearch-SearchBar",ref:Dt},f.createElement(pa,we({},ve,{state:G,autoFocus:X.length===0,inputRef:me,isFromSelection:!!X&&X===Ct,translations:F,onClose:i}))),f.createElement("div",{className:"DocSearch-Dropdown",ref:xe},f.createElement(la,we({},ve,{indexName:r,state:G,hitComponent:m,resultsFooterComponent:_,disableUserPersonalization:h,recentSearches:de,favoriteSearches:oe,inputRef:me,translations:B,getMissingResultsUrl:D,onItemClick:function(j,k){he(j),Fe(k)||i()}}))),f.createElement("footer",{className:"DocSearch-Footer"},f.createElement(To,{translations:N}))))}function jt(){return jt=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:window;return typeof t=="string"?n.document.querySelector(t):t}(e.container,e.environment))}export{Ta as default};