mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
14 lines
116 KiB
JavaScript
14 lines
116 KiB
JavaScript
var Yr=Object.defineProperty,Gr=Object.defineProperties;var Zr=Object.getOwnPropertyDescriptors;var Kt=Object.getOwnPropertySymbols;var Xr=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable;var Jt=(e,t,n)=>t in e?Yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qt=(e,t)=>{for(var n in t||(t={}))Xr.call(t,n)&&Jt(e,n,t[n]);if(Kt)for(var n of Kt(t))eo.call(t,n)&&Jt(e,n,t[n]);return e},Yt=(e,t)=>Gr(e,Zr(t));import{_ as K,p as to,c as ur,a as Q,s as no,i as ro,b as oo,l as ao,d as Ve,e as io,f as Gt,g as co}from"./iframe-router.6349d441.js";import{c as st,n as he,a as D,r as $,o as I,F as Ae,b as et,d as R,t as ae,e as ie,f as Y,g as lr,h as uo,w as tt,T as lo,i as Ne,j as so,v as fo,p as po,k as mo,l as ho,m as vo,q as _o,s as go}from"./vue-libs.67be768b.js";const yo={name:"VanDocNavLink",props:{base:String,item:Object},computed:{itemName(){const e=(this.item.title||this.item.name).split(" ");return`${e[0]} <span>${e.slice(1).join(" ")}</span>`},path(){return`${this.base}${this.item.path}`},active(){return this.$route.path===this.path?!0:this.item.path==="home"?this.$route.path===this.base:!1}},watch:{active(){this.scrollIntoView()}},mounted(){this.scrollIntoView()},methods:{scrollIntoView(){this.active&&this.$el&&this.$el.scrollIntoViewIfNeeded&&this.$el.scrollIntoViewIfNeeded()}}},bo=["href","innerHTML"],Oo=["innerHTML"];function So(e,t,n,r,o,a){const i=$("router-link");return n.item.path?(I(),st(i,{key:0,class:he({active:a.active}),to:a.path,innerHTML:a.itemName},null,8,["class","to","innerHTML"])):n.item.link?(I(),D("a",{key:1,href:n.item.link,innerHTML:a.itemName},null,8,bo)):(I(),D("a",{key:2,innerHTML:a.itemName},null,8,Oo))}var Zt=K(yo,[["render",So]]);const wo={name:"VanDocNav",components:{[Zt.name]:Zt},props:{lang:String,navConfig:Array},data(){return{top:64,bottom:0}},computed:{style(){return{top:this.top+"px",bottom:this.bottom+"px"}},base(){return this.lang?`/${this.lang}/`:"/"}},created(){window.addEventListener("scroll",this.onScroll),this.onScroll()},methods:{onScroll(){const{pageYOffset:e}=window;this.top=Math.max(0,64-e)}}},Eo={class:"van-doc-nav__title"};function jo(e,t,n,r,o,a){const i=$("van-doc-nav-link");return I(),D("div",{class:"van-doc-nav",style:lr(a.style)},[(I(!0),D(Ae,null,et(n.navConfig,(c,s)=>(I(),D("div",{class:"van-doc-nav__group",key:s},[R("div",Eo,ae(c.title),1),c.items?(I(!0),D(Ae,{key:0},et(c.items,(l,u)=>(I(),D("div",{key:u,class:"van-doc-nav__item"},[ie(i,{item:l,base:a.base},null,8,["item","base"])]))),128)):Y("v-if",!0)]))),128))],4)}var Po=K(wo,[["render",jo]]);/*! @docsearch/js 3.0.0-alpha.50 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function Xt(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<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xt(Object(n),!0).forEach(function(r){ko(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xt(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Te(e){return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(e)}function ko(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pt(){return Pt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pt.apply(this,arguments)}function Io(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function nt(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var o=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var a,i,c=[],s=!0,l=!1;try{for(o=o.call(n);!(s=(a=o.next()).done)&&(c.push(a.value),!r||c.length!==r);s=!0);}catch(u){l=!0,i=u}finally{try{s||o.return==null||o.return()}finally{if(l)throw i}}return c}}(e,t)||sr(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 rt(e){return function(t){if(Array.isArray(t))return kt(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||sr(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 sr(e,t){if(e){if(typeof e=="string")return kt(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)?kt(e,t):void 0}}function kt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var w,Ce,fr,en,pr,ot={},qt=[],Co=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function G(e,t){for(var n in t)e[n]=t[n];return e}function mr(e){var t=e.parentNode;t&&t.removeChild(e)}function z(e,t,n){var r,o,a,i=arguments,c={};for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:c[a]=t[a];if(arguments.length>3)for(n=[n],a=3;a<arguments.length;a++)n.push(i[a]);if(n!=null&&(c.children=n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)c[a]===void 0&&(c[a]=e.defaultProps[a]);return De(e,c,r,o,null)}function De(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o==null?++w.__v:o};return w.vnode!=null&&w.vnode(a),a}function te(e){return e.children}function W(e,t){this.props=e,this.context=t}function Le(e,t){if(t==null)return e.__?Le(e.__,e.__.__k.indexOf(e)+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"?Le(e):null}function dr(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 dr(e)}}function It(e){(!e.__d&&(e.__d=!0)&&Ce.push(e)&&!at.__r++||en!==w.debounceRendering)&&((en=w.debounceRendering)||fr)(at)}function at(){for(var e;at.__r=Ce.length;)e=Ce.sort(function(t,n){return t.__v.__b-n.__v.__b}),Ce=[],e.some(function(t){var n,r,o,a,i,c;t.__d&&(i=(a=(n=t).__v).__e,(c=n.__P)&&(r=[],(o=G({},a)).__v=a.__v+1,Vt(c,a,o,n.__n,c.ownerSVGElement!==void 0,a.__h!=null?[i]:null,r,i==null?Le(a):i,a.__h),gr(r,a),a.__e!=i&&dr(a)))})}function hr(e,t,n,r,o,a,i,c,s,l){var u,d,m,p,v,h,_,g=r&&r.__k||qt,y=g.length;for(n.__k=[],u=0;u<t.length;u++)if((p=n.__k[u]=(p=t[u])==null||typeof p=="boolean"?null:typeof p=="string"||typeof p=="number"?De(null,p,null,null,p):Array.isArray(p)?De(te,{children:p},null,null,null):p.__b>0?De(p.type,p.props,p.key,null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(m=g[u])===null||m&&p.key==m.key&&p.type===m.type)g[u]=void 0;else for(d=0;d<y;d++){if((m=g[d])&&p.key==m.key&&p.type===m.type){g[d]=void 0;break}m=null}Vt(e,p,m=m||ot,o,a,i,c,s,l),v=p.__e,(d=p.ref)&&m.ref!=d&&(_||(_=[]),m.ref&&_.push(m.ref,null,p),_.push(d,p.__c||v,p)),v!=null?(h==null&&(h=v),typeof p.type=="function"&&p.__k!=null&&p.__k===m.__k?p.__d=s=vr(p,s,e):s=_r(e,p,m,g,v,s),l||n.type!=="option"?typeof n.type=="function"&&(n.__d=s):e.value=""):s&&m.__e==s&&s.parentNode!=e&&(s=Le(m))}for(n.__e=h,u=y;u--;)g[u]!=null&&(typeof n.type=="function"&&g[u].__e!=null&&g[u].__e==n.__d&&(n.__d=Le(r,u+1)),br(g[u],g[u]));if(_)for(u=0;u<_.length;u++)yr(_[u],_[++u],_[++u])}function vr(e,t,n){var r,o;for(r=0;r<e.__k.length;r++)(o=e.__k[r])&&(o.__=e,t=typeof o.type=="function"?vr(o,t,n):_r(n,o,o,e.__k,o.__e,t));return t}function Z(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){Z(n,t)}):t.push(e)),t}function _r(e,t,n,r,o,a){var i,c,s;if(t.__d!==void 0)i=t.__d,t.__d=void 0;else if(n==null||o!=a||o.parentNode==null)e:if(a==null||a.parentNode!==e)e.appendChild(o),i=null;else{for(c=a,s=0;(c=c.nextSibling)&&s<r.length;s+=2)if(c==o)break e;e.insertBefore(o,a),i=a}return i!==void 0?i:o.nextSibling}function tn(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||Co.test(t)?n:n+"px"}function Ue(e,t,n,r,o){var a;e: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||tn(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||tn(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r||e.addEventListener(t,a?rn:nn,a):e.removeEventListener(t,a?rn:nn,a);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function nn(e){this.l[e.type+!1](w.event?w.event(e):e)}function rn(e){this.l[e.type+!0](w.event?w.event(e):e)}function Vt(e,t,n,r,o,a,i,c,s){var l,u,d,m,p,v,h,_,g,y,b,O=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(s=n.__h,c=t.__e=n.__e,t.__h=null,a=[c]),(l=w.__b)&&l(t);try{e:if(typeof O=="function"){if(_=t.props,g=(l=O.contextType)&&r[l.__c],y=l?g?g.props.value:l.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:("prototype"in O&&O.prototype.render?t.__c=u=new O(_,y):(t.__c=u=new W(_,y),u.constructor=O,u.render=xo),g&&g.sub(u),u.props=_,u.state||(u.state={}),u.context=y,u.__n=r,d=u.__d=!0,u.__h=[]),u.__s==null&&(u.__s=u.state),O.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=G({},u.__s)),G(u.__s,O.getDerivedStateFromProps(_,u.__s))),m=u.props,p=u.state,d)O.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(O.getDerivedStateFromProps==null&&_!==m&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(_,y),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(_,u.__s,y)===!1||t.__v===n.__v){u.props=_,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(_,u.__s,y),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(m,p,v)})}u.context=y,u.props=_,u.state=u.__s,(l=w.__r)&&l(t),u.__d=!1,u.__v=t,u.__P=e,l=u.render(u.props,u.state,u.context),u.state=u.__s,u.getChildContext!=null&&(r=G(G({},r),u.getChildContext())),d||u.getSnapshotBeforeUpdate==null||(v=u.getSnapshotBeforeUpdate(m,p)),b=l!=null&&l.type===te&&l.key==null?l.props.children:l,hr(e,Array.isArray(b)?b:[b],t,n,r,o,a,i,c,s),u.base=t.__e,t.__h=null,u.__h.length&&i.push(u),h&&(u.__E=u.__=null),u.__e=!1}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Do(n.__e,t,n,r,o,a,i,s);(l=w.diffed)&&l(t)}catch(S){t.__v=null,(s||a!=null)&&(t.__e=c,t.__h=!!s,a[a.indexOf(c)]=null),w.__e(S,t,n)}}function gr(e,t){w.__c&&w.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){w.__e(r,n.__v)}})}function Do(e,t,n,r,o,a,i,c){var s,l,u,d,m=n.props,p=t.props,v=t.type,h=0;if(v==="svg"&&(o=!0),a!=null){for(;h<a.length;h++)if((s=a[h])&&(s===e||(v?s.localName==v:s.nodeType==3))){e=s,a[h]=null;break}}if(e==null){if(v===null)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,p.is&&p),a=null,c=!1}if(v===null)m===p||c&&e.data===p||(e.data=p);else{if(a=a&&qt.slice.call(e.childNodes),l=(m=n.props||ot).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!c){if(a!=null)for(m={},d=0;d<e.attributes.length;d++)m[e.attributes[d].name]=e.attributes[d].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(_,g,y,b,O){var S;for(S in y)S==="children"||S==="key"||S in g||Ue(_,S,null,y[S],b);for(S in g)O&&typeof g[S]!="function"||S==="children"||S==="key"||S==="value"||S==="checked"||y[S]===g[S]||Ue(_,S,g[S],y[S],b)}(e,p,m,o,c),u)t.__k=[];else if(h=t.props.children,hr(e,Array.isArray(h)?h:[h],t,n,r,o&&v!=="foreignObject",a,i,e.firstChild,c),a!=null)for(h=a.length;h--;)a[h]!=null&&mr(a[h]);c||("value"in p&&(h=p.value)!==void 0&&(h!==e.value||v==="progress"&&!h)&&Ue(e,"value",h,m.value,!1),"checked"in p&&(h=p.checked)!==void 0&&h!==e.checked&&Ue(e,"checked",h,m.checked,!1))}return e}function yr(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){w.__e(r,n)}}function br(e,t,n){var r,o,a;if(w.unmount&&w.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||yr(r,null,t)),n||typeof e.type=="function"||(n=(o=e.__e)!=null),e.__e=e.__d=void 0,(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){w.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&br(r[a],t,n);o!=null&&mr(o)}function xo(e,t,n){return this.constructor(e,n)}function Re(e,t,n){var r,o,a;w.__&&w.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],Vt(t,e=(!r&&n||t).__k=z(te,null,[e]),o||ot,ot,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?qt.slice.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r),gr(a,e)}function Or(e,t){Re(e,t,Or)}function Ao(e,t,n){var r,o,a,i=arguments,c=G({},e.props);for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:c[a]=t[a];if(arguments.length>3)for(n=[n],a=3;a<arguments.length;a++)n.push(i[a]);return n!=null&&(c.children=n),De(e.type,c,r||e.key,o||e.ref,null)}w={__e:function(e,t){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e),o=n.__d),o)return n.__E=n}catch(a){e=a}throw e},__v:0},W.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=G({},this.state),typeof e=="function"&&(e=e(G({},n),this.props)),e&&G(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),It(this))},W.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),It(this))},W.prototype.render=te,Ce=[],fr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,at.__r=0,pr=0;var ve,q,on,pe=0,Ct=[],an=w.__b,cn=w.__r,un=w.diffed,ln=w.__c,sn=w.unmount;function He(e,t){w.__h&&w.__h(q,e,pe||t),pe=0;var n=q.__H||(q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function fn(e,t,n){var r=He(ve++,2);return r.t=e,r.__c||(r.__=[n?n(t):Sr(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 pn(e,t){var n=He(ve++,4);!w.__s&&Ut(n.__H,t)&&(n.__=e,n.__H=t,q.__h.push(n))}function Qe(e,t){var n=He(ve++,7);return Ut(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function No(){Ct.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(Ye),e.__H.__h.forEach(Dt),e.__H.__h=[]}catch(t){e.__H.__h=[],w.__e(t,e.__v)}}),Ct=[]}w.__b=function(e){q=null,an&&an(e)},w.__r=function(e){cn&&cn(e),ve=0;var t=(q=e.__c).__H;t&&(t.__h.forEach(Ye),t.__h.forEach(Dt),t.__h=[])},w.diffed=function(e){un&&un(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(Ct.push(t)!==1&&on===w.requestAnimationFrame||((on=w.requestAnimationFrame)||function(n){var r,o=function(){clearTimeout(a),mn&&cancelAnimationFrame(r),setTimeout(n)},a=setTimeout(o,100);mn&&(r=requestAnimationFrame(o))})(No)),q=void 0},w.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ye),n.__h=n.__h.filter(function(r){return!r.__||Dt(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],w.__e(r,n.__v)}}),ln&&ln(e,t)},w.unmount=function(e){sn&&sn(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Ye)}catch(n){w.__e(n,t.__v)}};var mn=typeof requestAnimationFrame=="function";function Ye(e){var t=q;typeof e.__c=="function"&&e.__c(),q=t}function Dt(e){var t=q;e.__c=e.__(),q=t}function Ut(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Sr(e,t){return typeof t=="function"?t(e):t}function wr(e,t){for(var n in t)e[n]=t[n];return e}function xt(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 At(e){this.props=e}(At.prototype=new W).isPureReactComponent=!0,At.prototype.shouldComponentUpdate=function(e,t){return xt(this.props,e)||xt(this.state,t)};var dn=w.__b;w.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),dn&&dn(e)};var To=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,hn=function(e,t){return e==null?null:Z(Z(e).map(t))},Lo={map:hn,forEach:hn,count:function(e){return e?Z(e).length:0},only:function(e){var t=Z(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Z},Ro=w.__e;function Ge(){this.__u=0,this.t=null,this.__b=null}function Er(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function ke(){this.u=null,this.o=null}w.__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)}Ro(e,t,n)},(Ge.prototype=new W).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Er(r.__v),a=!1,i=function(){a||(a=!0,n.componentWillUnmount=n.__c,o?o(c):c())};n.__c=n.componentWillUnmount,n.componentWillUnmount=function(){i(),n.__c&&n.__c()};var c=function(){if(!--r.__u){if(r.state.__e){var l=r.state.__e;r.__v.__k[0]=function d(m,p,v){return m&&(m.__v=null,m.__k=m.__k&&m.__k.map(function(h){return d(h,p,v)}),m.__c&&m.__c.__P===p&&(m.__e&&v.insertBefore(m.__e,m.__d),m.__c.__e=!0,m.__c.__P=v)),m}(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__e:r.__b=null});u=r.t.pop();)u.forceUpdate()}},s=t.__h===!0;r.__u++||s||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(i,i)},Ge.prototype.componentWillUnmount=function(){this.t=[]},Ge.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(i,c,s){return i&&(i.__c&&i.__c.__H&&(i.__c.__H.__.forEach(function(l){typeof l.__c=="function"&&l.__c()}),i.__c.__H=null),(i=wr({},i)).__c!=null&&(i.__c.__P===s&&(i.__c.__P=c),i.__c=null),i.__k=i.__k&&i.__k.map(function(l){return a(l,c,s)})),i}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__e&&z(te,null,e.fallback);return o&&(o.__h=null),[z(te,null,t.__e?null:e.children),o]};var vn=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]<n[0])break;e.u=n=n[2]}};function Ho(e){return this.getChildContext=function(){return e.context},e.children}function Mo(e){var t=this,n=e.i;t.componentWillUnmount=function(){Re(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Re(z(Ho,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function jr(e,t){return z(Mo,{__v:e,i:t})}(ke.prototype=new W).__e=function(e){var t=this,n=Er(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),vn(t,e,r)):o()};n?n(a):a()}},ke.prototype.render=function(e){this.u=null,this.o=new Map;var t=Z(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},ke.prototype.componentDidUpdate=ke.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){vn(e,n,t)})};var Pr=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,qo=/^(?: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]/,Vo=function(e){return(typeof Symbol!="undefined"&&Te(Symbol())=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function kr(e,t,n){return t.__k==null&&(t.textContent=""),Re(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 _n=w.event;function Uo(){}function Fo(){return this.cancelBubble}function Bo(){return this.defaultPrevented}w.event=function(e){return _n&&(e=_n(e)),e.persist=Uo,e.isPropagationStopped=Fo,e.isDefaultPrevented=Bo,e.nativeEvent=e};var Ir,gn={configurable:!0,get:function(){return this.class}},yn=w.vnode;w.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)&&!Vo(n.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():qo.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=Z(n.children).forEach(function(i){i.props.selected=r.value.indexOf(i.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=Z(n.children).forEach(function(i){i.props.selected=r.multiple?r.defaultValue.indexOf(i.props.value)!=-1:r.defaultValue==i.props.value})),e.props=r}t&&n.class!=n.className&&(gn.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",gn)),e.$$typeof=Pr,yn&&yn(e)};var bn=w.__r;w.__r=function(e){bn&&bn(e),Ir=e.__c};var $o={ReactCurrentDispatcher:{current:{readContext:function(e){return Ir.__n[e.__c].props.value}}}};(typeof performance=="undefined"?"undefined":Te(performance))=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function On(e){return!!e&&e.$$typeof===Pr}var f={useState:function(e){return pe=1,fn(Sr,e)},useReducer:fn,useEffect:function(e,t){var n=He(ve++,3);!w.__s&&Ut(n.__H,t)&&(n.__=e,n.__H=t,q.__H.__h.push(n))},useLayoutEffect:pn,useRef:function(e){return pe=5,Qe(function(){return{current:e}},[])},useImperativeHandle:function(e,t,n){pe=6,pn(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))},useMemo:Qe,useCallback:function(e,t){return pe=8,Qe(function(){return e},t)},useContext:function(e){var t=q.context[e.__c],n=He(ve++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub(q)),t.props.value):e.__},useDebugValue:function(e,t){w.useDebugValue&&w.useDebugValue(t?t(e):e)},version:"16.8.0",Children:Lo,render:kr,hydrate:function(e,t,n){return Or(e,t),typeof n=="function"&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(Re(null,e),!0)},createPortal:jr,createElement:z,createContext:function(e,t){var n={__c:t="__cC"+pr++,__: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(i){this.props.value!==i.value&&o.some(It)},this.sub=function(i){o.push(i);var c=i.componentWillUnmount;i.componentWillUnmount=function(){o.splice(o.indexOf(i),1),c&&c.call(i)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return z.bind(null,e)},cloneElement:function(e){return On(e)?Ao.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:te,isValidElement:On,findDOMNode:function(e){return e&&(e.base||e.nodeType===1&&e)||null},Component:W,PureComponent:At,memo:function(e,t){function n(o){var a=this.props.ref,i=a==o.ref;return!i&&a&&(a.call?a(null):a.current=null),t?!t(this.props,o)||!i:xt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,z(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=wr({},n);return delete o.ref,e(o,(r=n.ref||r)&&(Te(r)!="object"||"current"in r)?r:null)}return t.$$typeof=To,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:te,Suspense:Ge,SuspenseList:ke,lazy:function(e){var t,n,r;function o(a){if(t||(t=e()).then(function(i){n=i.default||i},function(i){r=i}),r)throw r;if(!n)throw t;return z(n,a)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$o};function zo(){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 Cr(){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 Wo=["translations"];function Nt(){return Nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nt.apply(this,arguments)}function Ko(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jo=f.forwardRef(function(e,t){var n=e.translations,r=n===void 0?{}:n,o=Ko(e,Wo),a=r.buttonText,i=a===void 0?"Search":a,c=r.buttonAriaLabel,s=c===void 0?"Search":c,l=Qe(function(){return typeof navigator!="undefined"?/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"\u2318":"Ctrl":null},[]);return f.createElement("button",Nt({type:"button",className:"DocSearch DocSearch-Button","aria-label":s},o,{ref:t}),f.createElement("span",{className:"DocSearch-Button-Container"},f.createElement(Cr,null),f.createElement("span",{className:"DocSearch-Button-Placeholder"},i)),f.createElement("span",{className:"DocSearch-Button-Keys"},l!==null&&f.createElement(f.Fragment,null,f.createElement("span",{className:"DocSearch-Button-Key"},l==="Ctrl"?f.createElement(zo,null):l),f.createElement("span",{className:"DocSearch-Button-Key"},"K"))))});function Me(e){return e.reduce(function(t,n){return t.concat(n)},[])}var Qo=0;function Tt(e){return e.collections.length===0?0:e.collections.reduce(function(t,n){return t+n.items.length},0)}var Yo=function(){},Go=[{segment:"autocomplete-core",version:"1.5.2"}];function Ze(e,t){var n=t;return{then:function(r,o){return Ze(e.then(Fe(r,n,e),Fe(o,n,e)),n)},catch:function(r){return Ze(e.catch(Fe(r,n,e)),n)},finally:function(r){return r&&n.onCancelList.push(r),Ze(e.finally(Fe(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 Sn(e){return Ze(e,{isCanceled:!1,onCancelList:[]})}function Fe(e,t,n){return e?function(r){return t.isCanceled?r:e(r)}:n}function wn(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 En(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 Zo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xo(e,t){var n=[];return Promise.resolve(e(t)).then(function(r){return Promise.all(r.filter(function(o){return Boolean(o)}).map(function(o){if(o.sourceId,n.includes(o.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(o.sourceId)," is not unique."));n.push(o.sourceId);var a=function(i){for(var c=1;c<arguments.length;c++){var s=arguments[c]!=null?arguments[c]:{};c%2?En(Object(s),!0).forEach(function(l){Zo(i,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):En(Object(s)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(s,l))})}return i}({getItemInputValue:function(i){return i.state.query},getItemUrl:function(){},onSelect:function(i){(0,i.setIsOpen)(!1)},onActive:Yo},o);return Promise.resolve(a)}))})}function me(e){var t=function(o){var a=o.collections.map(function(i){return i.items.length}).reduce(function(i,c,s){var l=(i[s-1]||0)+c;return i.push(l),i},[]).reduce(function(i,c){return c<=o.activeItemId?i+1:i},0);return o.collections[a]}(e);if(!t)return null;var n=t.items[function(o){for(var a=o.state,i=o.collection,c=!1,s=0,l=0;c===!1;){var u=a.collections[s];if(u===i){c=!0;break}l+=u.items.length,s++}return a.activeItemId-l}({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function jn(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 Be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jn(Object(n),!0).forEach(function(r){ea(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pn(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 ta(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function na(e,t,n){var r,o=t.initialState;return{getState:function(){return o},dispatch:function(a,i){var c=function(s){for(var l=1;l<arguments.length;l++){var u=arguments[l]!=null?arguments[l]:{};l%2?Pn(Object(u),!0).forEach(function(d){ta(s,d,u[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):Pn(Object(u)).forEach(function(d){Object.defineProperty(s,d,Object.getOwnPropertyDescriptor(u,d))})}return s}({},o);o=e(o,{type:a,props:t,payload:i}),n({state:o,prevState:c})},pendingRequests:(r=[],{add:function(a){return r.push(a),a.finally(function(){r=r.filter(function(i){return i!==a})})},cancelAll:function(){r.forEach(function(a){return a.cancel()})},isEmpty:function(){return r.length===0}})}}function kn(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 $e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kn(Object(n),!0).forEach(function(r){ra(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ra(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oa(e){return function(t){if(Array.isArray(t))return bt(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(!!t){if(typeof t=="string")return bt(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bt(t,n)}}(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 bt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function In(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 le(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?In(Object(n),!0).forEach(function(r){aa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):In(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cn(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 ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cn(Object(n),!0).forEach(function(r){Dr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ia(e){return function(t){if(Array.isArray(t))return Ot(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(!!t){if(typeof t=="string")return Ot(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ot(t,n)}}(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 Ot(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dn(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 xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dn(Object(n),!0).forEach(function(r){ca(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ca(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function We(e){return Boolean(e.execute)}function ua(e,t){return n=e,Boolean(n==null?void 0:n.execute)?xn(xn({},e),{},{requests:e.queries.map(function(r){return{query:r,sourceId:t,transformResponse:e.transformResponse}})}):{items:e,sourceId:t};var n}function la(e){var t=e.reduce(function(n,r){if(!We(r))return n.push(r),n;var o=r.searchClient,a=r.execute,i=r.requests,c=n.find(function(u){return We(r)&&We(u)&&u.searchClient===o&&u.execute===a});if(c){var s;(s=c.items).push.apply(s,ia(i))}else{var l={execute:a,items:i,searchClient:o};n.push(l)}return n},[]).map(function(n){if(!We(n))return Promise.resolve(n);var r=n,o=r.execute,a=r.items;return o({searchClient:r.searchClient,requests:a})});return Promise.all(t).then(function(n){return Me(n)})}function sa(e,t){return t.map(function(n){var r=e.filter(function(c){return c.sourceId===n.sourceId}),o=r.map(function(c){return c.items}),a=r[0].transformResponse,i=a?a(function(c){var s=c.map(function(l){var u;return Be(Be({},l),{},{hits:(u=l.hits)===null||u===void 0?void 0:u.map(function(d){return Be(Be({},d),{},{__autocomplete_indexName:l.index,__autocomplete_queryID:l.queryID})})})});return{results:s,hits:s.map(function(l){return l.hits}).filter(Boolean),facetHits:s.map(function(l){var u;return(u=l.facetHits)===null||u===void 0?void 0:u.map(function(d){return{label:d.value,count:d.count,_highlightResult:{label:{value:d.highlighted}}}})}).filter(Boolean)}}(o)):o;return i.every(Boolean),'The `getItems` function from source "'.concat(n.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),`.
|
|
|
|
Did you forget to return items?
|
|
|
|
See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:n,items:i}})}var fa=["event","nextState","props","query","refresh","store"];function An(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 Ee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?An(Object(n),!0).forEach(function(r){pa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ma(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Nn,St,Ke,je=null,Tn=(Nn=-1,St=-1,Ke=void 0,function(e){var t=++Nn;return Promise.resolve(e).then(function(n){return Ke&&t<St?Ke:(St=t,Ke=n,n)})});function fe(e){var t=e.event,n=e.nextState,r=n===void 0?{}:n,o=e.props,a=e.query,i=e.refresh,c=e.store,s=ma(e,fa);je&&o.environment.clearTimeout(je);var l=s.setCollections,u=s.setIsOpen,d=s.setQuery,m=s.setActiveItemId,p=s.setStatus;if(d(a),m(o.defaultActiveItemId),!a&&o.openOnFocus===!1){var v,h=c.getState().collections.map(function(y){return Ee(Ee({},y),{},{items:[]})});p("idle"),l(h),u((v=r.isOpen)!==null&&v!==void 0?v:o.shouldPanelOpen({state:c.getState()}));var _=Sn(Tn(h).then(function(){return Promise.resolve()}));return c.pendingRequests.add(_)}p("loading"),je=o.environment.setTimeout(function(){p("stalled")},o.stallThreshold);var g=Sn(Tn(o.getSources(Ee({query:a,refresh:i,state:c.getState()},s)).then(function(y){return Promise.all(y.map(function(b){return Promise.resolve(b.getItems(Ee({query:a,refresh:i,state:c.getState()},s))).then(function(O){return ua(O,b.sourceId)})})).then(la).then(function(b){return sa(b,y)}).then(function(b){return function(O){var S=O.collections,k=O.props,A=O.state,L=S.reduce(function(C,N){return ze(ze({},C),{},Dr({},N.source.sourceId,ze(ze({},N.source),{},{getItems:function(){return Me(N.items)}})))},{});return Me(k.reshape({sources:Object.values(L),sourcesBySourceId:L,state:A})).filter(Boolean).map(function(C){return{source:C,items:C.getItems()}})}({collections:b,props:o,state:c.getState()})})}))).then(function(y){var b;p("idle"),l(y);var O=o.shouldPanelOpen({state:c.getState()});u((b=r.isOpen)!==null&&b!==void 0?b:o.openOnFocus&&!a&&O||O);var S=me(c.getState());if(c.getState().activeItemId!==null&&S){var k=S.item,A=S.itemInputValue,L=S.itemUrl,C=S.source;C.onActive(Ee({event:t,item:k,itemInputValue:A,itemUrl:L,refresh:i,source:C,state:c.getState()},s))}}).finally(function(){p("idle"),je&&o.environment.clearTimeout(je)});return c.pendingRequests.add(g)}var da=["event","props","refresh","store"];function Ln(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 re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ln(Object(n),!0).forEach(function(r){ha(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ln(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ha(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function va(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _a=["props","refresh","store"],ga=["inputElement","formElement","panelElement"],ya=["inputElement"],ba=["inputElement","maxLength"],Oa=["item","source"];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 M(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rn(Object(n),!0).forEach(function(r){Sa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pe(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function wa(e){var t=e.props,n=e.refresh,r=e.store,o=Pe(e,_a);return{getEnvironmentProps:function(a){var i=a.inputElement,c=a.formElement,s=a.panelElement;return M({onTouchStart:function(l){!r.getState().isOpen&&r.pendingRequests.isEmpty()||l.target===i||[c,s].some(function(u){return d=u,m=l.target,d===m||d.contains(m);var d,m})===!1&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())},onTouchMove:function(l){r.getState().isOpen!==!1&&i===t.environment.document.activeElement&&l.target!==i&&i.blur()}},Pe(a,ga))},getRootProps:function(a){return M({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")},a)},getFormProps:function(a){return a.inputElement,M({action:"",noValidate:!0,role:"search",onSubmit:function(i){var c;i.preventDefault(),t.onSubmit(M({event:i,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),(c=a.inputElement)===null||c===void 0||c.blur()},onReset:function(i){var c;i.preventDefault(),t.onReset(M({event:i,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),(c=a.inputElement)===null||c===void 0||c.focus()}},Pe(a,ya))},getLabelProps:function(a){return M({htmlFor:"".concat(t.id,"-input"),id:"".concat(t.id,"-label")},a)},getInputProps:function(a){function i(p){(t.openOnFocus||Boolean(r.getState().query))&&fe(M({event:p,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var c="ontouchstart"in t.environment,s=a||{},l=(s.inputElement,s.maxLength),u=l===void 0?512:l,d=Pe(s,ba),m=me(r.getState());return M({"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:m!=null&&m.itemUrl?"go":"search",spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:u,type:"search",onChange:function(p){fe(M({event:p,props:t,query:p.currentTarget.value.slice(0,u),refresh:n,store:r},o))},onKeyDown:function(p){(function(v){var h=v.event,_=v.props,g=v.refresh,y=v.store,b=va(v,da);if(h.key==="ArrowUp"||h.key==="ArrowDown"){var O=function(){var H=_.environment.document.getElementById("".concat(_.id,"-item-").concat(y.getState().activeItemId));H&&(H.scrollIntoViewIfNeeded?H.scrollIntoViewIfNeeded(!1):H.scrollIntoView(!1))},S=function(){var H=me(y.getState());if(y.getState().activeItemId!==null&&H){var dt=H.item,ht=H.itemInputValue,vt=H.itemUrl,_e=H.source;_e.onActive(re({event:h,item:dt,itemInputValue:ht,itemUrl:vt,refresh:g,source:_e,state:y.getState()},b))}};h.preventDefault(),y.getState().isOpen===!1&&(_.openOnFocus||Boolean(y.getState().query))?fe(re({event:h,props:_,query:y.getState().query,refresh:g,store:y},b)).then(function(){y.dispatch(h.key,{nextActiveItemId:_.defaultActiveItemId}),S(),setTimeout(O,0)}):(y.dispatch(h.key,{}),S(),O())}else if(h.key==="Escape")h.preventDefault(),y.dispatch(h.key,null),y.pendingRequests.cancelAll();else if(h.key==="Enter"){if(y.getState().activeItemId===null||y.getState().collections.every(function(H){return H.items.length===0}))return;h.preventDefault();var k=me(y.getState()),A=k.item,L=k.itemInputValue,C=k.itemUrl,N=k.source;if(h.metaKey||h.ctrlKey)C!==void 0&&(N.onSelect(re({event:h,item:A,itemInputValue:L,itemUrl:C,refresh:g,source:N,state:y.getState()},b)),_.navigator.navigateNewTab({itemUrl:C,item:A,state:y.getState()}));else if(h.shiftKey)C!==void 0&&(N.onSelect(re({event:h,item:A,itemInputValue:L,itemUrl:C,refresh:g,source:N,state:y.getState()},b)),_.navigator.navigateNewWindow({itemUrl:C,item:A,state:y.getState()}));else if(!h.altKey){if(C!==void 0)return N.onSelect(re({event:h,item:A,itemInputValue:L,itemUrl:C,refresh:g,source:N,state:y.getState()},b)),void _.navigator.navigate({itemUrl:C,item:A,state:y.getState()});fe(re({event:h,nextState:{isOpen:!1},props:_,query:L,refresh:g,store:y},b)).then(function(){N.onSelect(re({event:h,item:A,itemInputValue:L,itemUrl:C,refresh:g,source:N,state:y.getState()},b))})}}})(M({event:p,props:t,refresh:n,store:r},o))},onFocus:i,onBlur:function(){c||(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())},onClick:function(p){a.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(p)}},d)},getPanelProps:function(a){return M({onMouseDown:function(i){i.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},a)},getListProps:function(a){return M({role:"listbox","aria-labelledby":"".concat(t.id,"-label"),id:"".concat(t.id,"-list")},a)},getItemProps:function(a){var i=a.item,c=a.source,s=Pe(a,Oa);return M({id:"".concat(t.id,"-item-").concat(i.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===i.__autocomplete_id,onMouseMove:function(l){if(i.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",i.__autocomplete_id);var u=me(r.getState());if(r.getState().activeItemId!==null&&u){var d=u.item,m=u.itemInputValue,p=u.itemUrl,v=u.source;v.onActive(M({event:l,item:d,itemInputValue:m,itemUrl:p,refresh:n,source:v,state:r.getState()},o))}}},onMouseDown:function(l){l.preventDefault()},onClick:function(l){var u=c.getItemInputValue({item:i,state:r.getState()}),d=c.getItemUrl({item:i,state:r.getState()});(d?Promise.resolve():fe(M({event:l,nextState:{isOpen:!1},props:t,query:u,refresh:n,store:r},o))).then(function(){c.onSelect(M({event:l,item:i,itemInputValue:u,itemUrl:d,refresh:n,source:c,state:r.getState()},o))})}},s)}}}function Hn(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 Ea(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hn(Object(n),!0).forEach(function(r){xr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ja(e){var t,n,r,o,a=e.plugins,i=e.options,c=(t=(((n=i.__autocomplete_metadata)===null||n===void 0?void 0:n.userAgents)||[])[0])===null||t===void 0?void 0:t.segment,s=c?xr({},c,Object.keys(((r=i.__autocomplete_metadata)===null||r===void 0?void 0:r.options)||{})):{};return{plugins:a.map(function(l){return{name:l.name,options:Object.keys(l.__autocomplete_pluginOptions||[])}}),options:Ea({"autocomplete-core":Object.keys(i)},s),ua:Go.concat(((o=i.__autocomplete_metadata)===null||o===void 0?void 0:o.userAgents)||[])}}function Mn(e){var t,n=e.state;return n.isOpen===!1||n.activeItemId===null?null:((t=me(n))===null||t===void 0?void 0:t.itemInputValue)||null}function qn(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 E(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qn(Object(n),!0).forEach(function(r){Pa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ka=function(e,t){switch(t.type){case"setActiveItemId":case"mousemove":return E(E({},e),{},{activeItemId:t.payload});case"setQuery":return E(E({},e),{},{query:t.payload,completion:null});case"setCollections":return E(E({},e),{},{collections:t.payload});case"setIsOpen":return E(E({},e),{},{isOpen:t.payload});case"setStatus":return E(E({},e),{},{status:t.payload});case"setContext":return E(E({},e),{},{context:E(E({},e.context),t.payload)});case"ArrowDown":var n=E(E({},e),{},{activeItemId:t.payload.hasOwnProperty("nextActiveItemId")?t.payload.nextActiveItemId:wn(1,e.activeItemId,Tt(e),t.props.defaultActiveItemId)});return E(E({},n),{},{completion:Mn({state:n})});case"ArrowUp":var r=E(E({},e),{},{activeItemId:wn(-1,e.activeItemId,Tt(e),t.props.defaultActiveItemId)});return E(E({},r),{},{completion:Mn({state:r})});case"Escape":return e.isOpen?E(E({},e),{},{activeItemId:null,isOpen:!1,completion:null}):E(E({},e),{},{activeItemId:null,query:"",status:"idle",collections:[]});case"submit":return E(E({},e),{},{activeItemId:null,isOpen:!1,status:"idle"});case"reset":return E(E({},e),{},{activeItemId:t.props.openOnFocus===!0?t.props.defaultActiveItemId:null,status:"idle",query:""});case"focus":return E(E({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||Boolean(e.query))&&t.props.shouldPanelOpen({state:e})});case"blur":return t.props.debug?e:E(E({},e),{},{isOpen:!1,activeItemId:null});case"mouseleave":return E(E({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};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 oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vn(Object(n),!0).forEach(function(r){Ia(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ia(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ca(e){var t=[],n=function(c,s){var l,u=typeof window!="undefined"?window:{},d=c.plugins||[];return le(le({debug:!1,openOnFocus:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,environment:u,shouldPanelOpen:function(m){return Tt(m.state)>0},reshape:function(m){return m.sources}},c),{},{id:(l=c.id)!==null&&l!==void 0?l:"autocomplete-".concat(Qo++),plugins:d,initialState:le({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},c.initialState),onStateChange:function(m){var p;(p=c.onStateChange)===null||p===void 0||p.call(c,m),d.forEach(function(v){var h;return(h=v.onStateChange)===null||h===void 0?void 0:h.call(v,m)})},onSubmit:function(m){var p;(p=c.onSubmit)===null||p===void 0||p.call(c,m),d.forEach(function(v){var h;return(h=v.onSubmit)===null||h===void 0?void 0:h.call(v,m)})},onReset:function(m){var p;(p=c.onReset)===null||p===void 0||p.call(c,m),d.forEach(function(v){var h;return(h=v.onReset)===null||h===void 0?void 0:h.call(v,m)})},getSources:function(m){return Promise.all([].concat(oa(d.map(function(p){return p.getSources})),[c.getSources]).filter(Boolean).map(function(p){return Xo(p,m)})).then(function(p){return Me(p)}).then(function(p){return p.map(function(v){return le(le({},v),{},{onSelect:function(h){v.onSelect(h),s.forEach(function(_){var g;return(g=_.onSelect)===null||g===void 0?void 0:g.call(_,h)})},onActive:function(h){v.onActive(h),s.forEach(function(_){var g;return(g=_.onActive)===null||g===void 0?void 0:g.call(_,h)})}})})})},navigator:le({navigate:function(m){var p=m.itemUrl;u.location.assign(p)},navigateNewTab:function(m){var p=m.itemUrl,v=u.open(p,"_blank","noopener");v==null||v.focus()},navigateNewWindow:function(m){var p=m.itemUrl;u.open(p,"_blank","noopener")}},c.navigator)})}(e,t),r=na(ka,n,function(c){var s=c.prevState,l=c.state;n.onStateChange(oe({prevState:s,state:l,refresh:i},o))}),o=function(c){var s=c.store;return{setActiveItemId:function(l){s.dispatch("setActiveItemId",l)},setQuery:function(l){s.dispatch("setQuery",l)},setCollections:function(l){var u=0,d=l.map(function(m){return $e($e({},m),{},{items:Me(m.items).map(function(p){return $e($e({},p),{},{__autocomplete_id:u++})})})});s.dispatch("setCollections",d)},setIsOpen:function(l){s.dispatch("setIsOpen",l)},setStatus:function(l){s.dispatch("setStatus",l)},setContext:function(l){s.dispatch("setContext",l)}}}({store:r}),a=wa(oe({props:n,refresh:i,store:r},o));function i(){return fe(oe({event:new Event("input"),nextState:{isOpen:r.getState().isOpen},props:n,query:r.getState().query,refresh:i,store:r},o))}return n.plugins.forEach(function(c){var s;return(s=c.subscribe)===null||s===void 0?void 0:s.call(c,oe(oe({},o),{},{refresh:i,onSelect:function(l){t.push({onSelect:l})},onActive:function(l){t.push({onActive:l})}}))}),function(c){var s,l=c.metadata,u=c.environment;if(!((s=u.navigator)===null||s===void 0)&&s.userAgent.includes("Algolia Crawler")){var d=u.document.createElement("meta"),m=u.document.querySelector("head");d.name="algolia:metadata",setTimeout(function(){d.content=JSON.stringify(l),m.appendChild(d)},0)}}({metadata:ja({plugins:n.plugins,options:e}),environment:n.environment}),oe(oe({refresh:i},a),o)}function Da(e){var t=e.translations,n=(t===void 0?{}:t).searchByText,r=n===void 0?"Search by":n;return f.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},f.createElement("span",{className:"DocSearch-Label"},r),f.createElement("svg",{width:"77",height:"19"},f.createElement("path",{d:"M2.5067 0h14.0245c1.384.001 2.5058 1.1205 2.5068 2.5017V16.5c-.0014 1.3808-1.1232 2.4995-2.5068 2.5H2.5067C1.1232 18.9995.0014 17.8808 0 16.5V2.4958A2.495 2.495 0 01.735.7294 2.505 2.505 0 012.5068 0zM37.95 15.0695c-3.7068.0168-3.7068-2.986-3.7068-3.4634L34.2372.3576 36.498 0v11.1794c0 .2715 0 1.9889 1.452 1.994v1.8961zm-9.1666-1.8388c.694 0 1.2086-.0397 1.5678-.1088v-2.2934a5.3639 5.3639 0 00-1.3303-.1679 4.8283 4.8283 0 00-.758.0582 2.2845 2.2845 0 00-.688.2024c-.2029.0979-.371.2362-.4919.4142-.1268.1788-.185.2826-.185.5533 0 .5297.185.8359.5205 1.0375.3355.2016.7928.3053 1.365.3053v-.0008zm-.1969-8.1817c.7463 0 1.3768.092 1.8856.2767.5088.1838.9195.4428 1.2204.7717.3068.334.5147.7777.6423 1.251.1327.4723.196.991.196 1.5603v5.798c-.5235.1036-1.05.192-1.5787.2649-.7048.1037-1.4976.156-2.3774.156-.5832 0-1.1215-.0582-1.6016-.167a3.385 3.385 0 01-1.2432-.5364 2.6034 2.6034 0 01-.8037-.9565c-.191-.3922-.29-.9447-.29-1.5208 0-.5533.11-.905.3246-1.2863a2.7351 2.7351 0 01.8849-.9329c.376-.242.8029-.415 1.2948-.5187a7.4517 7.4517 0 011.5381-.156 7.1162 7.1162 0 011.6667.2024V8.886c0-.259-.0296-.5061-.093-.7372a1.5847 1.5847 0 00-.3245-.6158 1.5079 1.5079 0 00-.6119-.4158 2.6788 2.6788 0 00-.966-.173c-.5206 0-.9948.0634-1.4283.1384a6.5481 6.5481 0 00-1.065.259l-.2712-1.849c.2831-.0986.7048-.1964 1.2491-.2943a9.2979 9.2979 0 011.752-.1501v.0008zm44.6597 8.1193c.6947 0 1.2086-.0405 1.567-.1097v-2.2942a5.3743 5.3743 0 00-1.3303-.1679c-.2485 0-.503.0177-.7573.0582a2.2853 2.2853 0 00-.688.2024 1.2333 1.2333 0 00-.4918.4142c-.1268.1788-.1843.2826-.1843.5533 0 .5297.1843.8359.5198 1.0375.3414.2066.7927.3053 1.365.3053v.0009zm-.191-8.1767c.7463 0 1.3768.0912 1.8856.2759.5087.1847.9195.4436 1.2204.7717.3.329.5147.7786.6414 1.251a5.7248 5.7248 0 01.197 1.562v5.7972c-.3466.0742-.874.1602-1.5788.2648-.7049.1038-1.4976.1552-2.3774.1552-.5832 0-1.1215-.0573-1.6016-.167a3.385 3.385 0 01-1.2432-.5356 2.6034 2.6034 0 01-.8038-.9565c-.191-.3922-.2898-.9447-.2898-1.5216 0-.5533.1098-.905.3245-1.2854a2.7373 2.7373 0 01.8849-.9338c.376-.2412.8029-.4141 1.2947-.5178a7.4545 7.4545 0 012.325-.1097c.2781.0287.5672.081.879.156v-.3686a2.7781 2.7781 0 00-.092-.738 1.5788 1.5788 0 00-.3246-.6166 1.5079 1.5079 0 00-.612-.415 2.6797 2.6797 0 00-.966-.1729c-.5205 0-.9947.0633-1.4282.1384a6.5608 6.5608 0 00-1.065.259l-.2712-1.8498c.283-.0979.7048-.1957 1.2491-.2935a9.8597 9.8597 0 011.752-.1494zm-6.79-1.072c-.7576.001-1.373-.6103-1.3759-1.3664 0-.755.6128-1.3664 1.376-1.3664.764 0 1.3775.6115 1.3775 1.3664s-.6195 1.3664-1.3776 1.3664zm1.1393 11.1507h-2.2726V5.3409l2.2734-.3568v10.0845l-.0008.0017zm-3.984 0c-3.707.0168-3.707-2.986-3.707-3.4642L59.7069.3576 61.9685 0v11.1794c0 .2715 0 1.9889 1.452 1.994V15.0703zm-7.3512-4.979c0-.975-.2138-1.7873-.6305-2.3516-.4167-.571-.9998-.852-1.747-.852-.7454 0-1.3302.281-1.7452.852-.4166.5702-.6195 1.3765-.6195 2.3516 0 .9851.208 1.6473.6254 2.2183.4158.576.9998.8587 1.7461.8587.7454 0 1.3303-.2885 1.747-.8595.4158-.5761.6237-1.2315.6237-2.2184v.0009zm2.3132-.006c0 .7609-.1099 1.3361-.3356 1.9654a4.654 4.654 0 01-.9533 1.6076A4.214 4.214 0 0155.613 14.69c-.579.2412-1.4697.3795-1.9143.3795-.4462-.005-1.3303-.1324-1.9033-.3795a4.307 4.307 0 01-1.474-1.0316c-.4115-.4445-.7293-.9801-.9609-1.6076a5.3423 5.3423 0 01-.3465-1.9653c0-.7608.104-1.493.3356-2.1155a4.683 4.683 0 01.9719-1.5958 4.3383 4.3383 0 011.479-1.0257c.5739-.242 1.2043-.3567 1.8864-.3567.6829 0 1.3125.1197 1.8906.3567a4.1245 4.1245 0 011.4816 1.0257 4.7587 4.7587 0 01.9592 1.5958c.2426.6225.3643 1.3547.3643 2.1155zm-17.0198 0c0 .9448.208 1.9932.6238 2.431.4166.4386.955.6579 1.6142.6579.3584 0 .6998-.0523 1.0176-.1502.3186-.0978.5721-.2134.775-.3517V7.0784a8.8706 8.8706 0 00-1.4926-.1906c-.8206-.0236-1.4452.312-1.8847.8468-.4335.5365-.6533 1.476-.6533 2.3516v-.0008zm6.2863 4.4485c0 1.5385-.3938 2.662-1.1866 3.3773-.791.7136-2.0005 1.0712-3.6308 1.0712-.5958 0-1.834-.1156-2.8228-.334l.3643-1.7865c.8282.173 1.9202.2193 2.4932.2193.9077 0 1.555-.1847 1.943-.5533.388-.3686.578-.916.578-1.643v-.3687a6.8289 6.8289 0 01-.8848.3349c-.3634.1096-.786.167-1.261.167-.6246 0-1.1917-.0979-1.7055-.2944a3.5554 3.5554 0 01-1.3244-.8645c-.3642-.3796-.6541-.8579-.8561-1.4289-.2028-.571-.3068-1.59-.3068-2.339 0-.7034.1099-1.5856.3245-2.1735.2198-.5871.5316-1.0949.9542-1.515.4167-.42.9255-.743 1.5213-.98a5.5923 5.5923 0 012.052-.3855c.7353 0 1.4114.092 2.0707.2024.6592.1088 1.2204.2236 1.6776.35v8.945-.0008zM11.5026 4.2418v-.6511c-.0005-.4553-.3704-.8241-.8266-.8241H8.749c-.4561 0-.826.3688-.8265.824v.669c0 .0742.0693.1264.1445.1096a6.0346 6.0346 0 011.6768-.2362 6.125 6.125 0 011.6202.2185.1116.1116 0 00.1386-.1097zm-5.2806.852l-.3296-.3282a.8266.8266 0 00-1.168 0l-.393.3922a.8199.8199 0 000 1.164l.3237.323c.0524.0515.1268.0397.1733-.0117.191-.259.3989-.507.6305-.7372.2374-.2362.48-.4437.7462-.6335.0575-.0354.0634-.1155.017-.1687zm3.5159 2.069v2.818c0 .081.0879.1392.1622.0987l2.5102-1.2964c.0574-.0287.0752-.0987.0464-.1552a3.1237 3.1237 0 00-2.603-1.574c-.0575 0-.115.0456-.115.1097l-.0008-.0009zm.0008 6.789c-2.0933.0005-3.7915-1.6912-3.7947-3.7804C5.9468 8.0821 7.6452 6.39 9.7387 6.391c2.0932-.0005 3.7911 1.6914 3.794 3.7804a3.7783 3.7783 0 01-1.1124 2.675 3.7936 3.7936 0 01-2.6824 1.1054h.0008zM9.738 4.8002c-1.9218 0-3.6975 1.0232-4.6584 2.6841a5.359 5.359 0 000 5.3683c.9609 1.661 2.7366 2.6841 4.6584 2.6841a5.3891 5.3891 0 003.8073-1.5725 5.3675 5.3675 0 001.578-3.7987 5.3574 5.3574 0 00-1.5771-3.797A5.379 5.379 0 009.7387 4.801l-.0008-.0008z",fill:"currentColor",fillRule:"evenodd"})))}function Je(e){return f.createElement("svg",{width:"15",height:"15"},f.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2"},e.children))}function xa(e){var t=e.translations,n=t===void 0?{}:t,r=n.selectText,o=r===void 0?"to select":r,a=n.navigateText,i=a===void 0?"to navigate":a,c=n.closeText,s=c===void 0?"to close":c,l=n.searchByText,u=l===void 0?"Search by":l;return f.createElement(f.Fragment,null,f.createElement("div",{className:"DocSearch-Logo"},f.createElement(Da,{translations:{searchByText:u}})),f.createElement("ul",{className:"DocSearch-Commands"},f.createElement("li",null,f.createElement("span",{className:"DocSearch-Commands-Key"},f.createElement(Je,null,f.createElement("path",{d:"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"}))),f.createElement("span",{className:"DocSearch-Label"},o)),f.createElement("li",null,f.createElement("span",{className:"DocSearch-Commands-Key"},f.createElement(Je,null,f.createElement("path",{d:"M7.5 3.5v8M10.5 8.5l-3 3-3-3"}))),f.createElement("span",{className:"DocSearch-Commands-Key"},f.createElement(Je,null,f.createElement("path",{d:"M7.5 11.5v-8M10.5 6.5l-3-3-3 3"}))),f.createElement("span",{className:"DocSearch-Label"},i)),f.createElement("li",null,f.createElement("span",{className:"DocSearch-Commands-Key"},f.createElement(Je,null,f.createElement("path",{d:"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"}))),f.createElement("span",{className:"DocSearch-Label"},s))))}function Aa(e){var t=e.hit,n=e.children;return f.createElement("a",{href:t.url},n)}function Na(){return f.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},f.createElement("g",{fill:"none",fillRule:"evenodd"},f.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},f.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),f.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},f.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function Ta(){return f.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},f.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},f.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),f.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function Lt(){return f.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},f.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function La(){return f.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},f.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},f.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),f.createElement("path",{d:"M8 17l-6-6 6-6"})))}var Ra=function(){return f.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},f.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Ha(e){switch(e.type){case"lvl1":return f.createElement(Ra,null);case"content":return f.createElement(qa,null);default:return f.createElement(Ma,null)}}function Ma(){return f.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},f.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function qa(){return f.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},f.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Un(){return f.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},f.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Va(){return f.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},f.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function Ua(){return f.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},f.createElement("path",{d:"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"}))}function Fa(e){var t=e.translations,n=t===void 0?{}:t,r=n.titleText,o=r===void 0?"Unable to fetch results":r,a=n.helpText,i=a===void 0?"You might want to check your network connection.":a;return f.createElement("div",{className:"DocSearch-ErrorScreen"},f.createElement("div",{className:"DocSearch-Screen-Icon"},f.createElement(Va,null)),f.createElement("p",{className:"DocSearch-Title"},o),f.createElement("p",{className:"DocSearch-Help"},i))}var Ba=["translations"];function $a(e){return function(t){if(Array.isArray(t))return wt(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(!!t){if(typeof t=="string")return wt(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wt(t,n)}}(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 wt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function za(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Wa(e){var t=e.translations,n=t===void 0?{}:t,r=za(e,Ba),o=n.noResultsText,a=o===void 0?"No results for":o,i=n.suggestedQueryText,c=i===void 0?"Try searching for":i,s=n.reportMissingResultsText,l=s===void 0?"Believe this query should return results?":s,u=n.reportMissingResultsLinkText,d=u===void 0?"Let us know.":u,m=r.state.context.searchSuggestions;return f.createElement("div",{className:"DocSearch-NoResults"},f.createElement("div",{className:"DocSearch-Screen-Icon"},f.createElement(Ua,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"},c,":"),f.createElement("ul",null,m.slice(0,3).reduce(function(p,v){return[].concat($a(p),[f.createElement("li",{key:v},f.createElement("button",{className:"DocSearch-Prefill",key:v,type:"button",onClick:function(){r.setQuery(v.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},v))])},[]))),r.getMissingResultsUrl&&f.createElement("p",{className:"DocSearch-Help"},"".concat(l," "),f.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},d)))}var Ka=["hit","attribute","tagName"];function Fn(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 Bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fn(Object(n),!0).forEach(function(r){Ja(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ja(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qa(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function $n(e,t){return t.split(".").reduce(function(n,r){return n!=null&&n[r]?n[r]:null},e)}function se(e){var t=e.hit,n=e.attribute,r=e.tagName;return z(r===void 0?"span":r,Bn(Bn({},Qa(e,Ka)),{},{dangerouslySetInnerHTML:{__html:$n(t,"_snippetResult.".concat(n,".value"))||$n(t,n)}}))}function zn(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var o=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var a,i,c=[],s=!0,l=!1;try{for(o=o.call(n);!(s=(a=o.next()).done)&&(c.push(a.value),!r||c.length!==r);s=!0);}catch(u){l=!0,i=u}finally{try{s||o.return==null||o.return()}finally{if(l)throw i}}return c}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Wn(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 Wn(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 Wn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function it(){return it=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},it.apply(this,arguments)}function Rt(e){return e.collection&&e.collection.items.length!==0?f.createElement("section",{className:"DocSearch-Hits"},f.createElement("div",{className:"DocSearch-Hit-source"},e.title),f.createElement("ul",e.getListProps(),e.collection.items.map(function(t,n){return f.createElement(Ya,it({key:[e.title,t.objectID].join(":"),item:t,index:n},e))}))):null}function Ya(e){var t=e.item,n=e.index,r=e.renderIcon,o=e.renderAction,a=e.getItemProps,i=e.onItemClick,c=e.collection,s=e.hitComponent,l=zn(f.useState(!1),2),u=l[0],d=l[1],m=zn(f.useState(!1),2),p=m[0],v=m[1],h=f.useRef(null),_=s;return f.createElement("li",it({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",u&&"DocSearch-Hit--deleting",p&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){h.current&&h.current()}},a({item:t,source:c.source,onClick:function(){i(t)}})),f.createElement(_,{hit:t},f.createElement("div",{className:"DocSearch-Hit-Container"},r({item:t,index:n}),t.hierarchy[t.type]&&t.type==="lvl1"&&f.createElement("div",{className:"DocSearch-Hit-content-wrapper"},f.createElement(se,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&f.createElement(se,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&(t.type==="lvl2"||t.type==="lvl3"||t.type==="lvl4"||t.type==="lvl5"||t.type==="lvl6")&&f.createElement("div",{className:"DocSearch-Hit-content-wrapper"},f.createElement(se,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),f.createElement(se,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),t.type==="content"&&f.createElement("div",{className:"DocSearch-Hit-content-wrapper"},f.createElement(se,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),f.createElement(se,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),o({item:t,runDeleteTransition:function(g){d(!0),h.current=g},runFavoriteTransition:function(g){v(!0),h.current=g}}))))}function Kn(e,t){return e.reduce(function(n,r){var o=t(r);return n.hasOwnProperty(o)||(n[o]=[]),n[o].length<5&&n[o].push(r),n},{})}function Jn(e){return e}function Ga(){}var Ar=/(<mark>|<\/mark>)/g,Za=RegExp(Ar.source);function Nr(e){var t,n,r,o,a,i=e;if(!i.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var c=((i.__docsearch_parent?(t=i.__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 c&&Za.test(c)?c.replace(Ar,""):c}function Ht(){return Ht=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ht.apply(this,arguments)}function Xa(e){return f.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map(function(t){if(t.items.length===0)return null;var n=Nr(t.items[0]);return f.createElement(Rt,Ht({},e,{key:t.source.sourceId,title:n,collection:t,renderIcon:function(r){var o,a=r.item,i=r.index;return f.createElement(f.Fragment,null,a.__docsearch_parent&&f.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},f.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.__docsearch_parent!==((o=t.items[i+1])===null||o===void 0?void 0:o.__docsearch_parent)?f.createElement("path",{d:"M8 6v21M20 27H8.3"}):f.createElement("path",{d:"M8 6v42M20 27H8.3"}))),f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(Ha,{type:a.type})))},renderAction:function(){return f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement(La,null))}}))}),e.resultsFooterComponent&&f.createElement("section",{className:"DocSearch-HitsFooter"},f.createElement(e.resultsFooterComponent,{state:e.state})))}var ei=["translations"];function ct(){return ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ct.apply(this,arguments)}function ti(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ni(e){var t=e.translations,n=t===void 0?{}:t,r=ti(e,ei),o=n.recentSearchesTitle,a=o===void 0?"Recent":o,i=n.noRecentSearchesText,c=i===void 0?"No recent searches":i,s=n.saveRecentSearchButtonTitle,l=s===void 0?"Save this search":s,u=n.removeRecentSearchButtonTitle,d=u===void 0?"Remove this search from history":u,m=n.favoriteSearchesTitle,p=m===void 0?"Favorite":m,v=n.removeFavoriteSearchButtonTitle,h=v===void 0?"Remove this search from favorites":v;return r.state.status==="idle"&&r.hasCollections===!1?r.disableUserPersonalization?null:f.createElement("div",{className:"DocSearch-StartScreen"},f.createElement("p",{className:"DocSearch-Help"},c)):r.hasCollections===!1?null:f.createElement("div",{className:"DocSearch-Dropdown-Container"},f.createElement(Rt,ct({},r,{title:a,collection:r.state.collections[0],renderIcon:function(){return f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(Ta,null))},renderAction:function(_){var g=_.item,y=_.runFavoriteTransition,b=_.runDeleteTransition;return f.createElement(f.Fragment,null,f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:l,type:"submit",onClick:function(O){O.preventDefault(),O.stopPropagation(),y(function(){r.favoriteSearches.add(g),r.recentSearches.remove(g),r.refresh()})}},f.createElement(Un,null))),f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:d,type:"submit",onClick:function(O){O.preventDefault(),O.stopPropagation(),b(function(){r.recentSearches.remove(g),r.refresh()})}},f.createElement(Lt,null))))}})),f.createElement(Rt,ct({},r,{title:p,collection:r.state.collections[1],renderIcon:function(){return f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(Un,null))},renderAction:function(_){var g=_.item,y=_.runDeleteTransition;return f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:h,type:"submit",onClick:function(b){b.preventDefault(),b.stopPropagation(),y(function(){r.favoriteSearches.remove(g),r.refresh()})}},f.createElement(Lt,null)))}})))}var ri=["translations"];function ut(){return ut=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ut.apply(this,arguments)}function oi(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ai=f.memo(function(e){var t=e.translations,n=t===void 0?{}:t,r=oi(e,ri);if(r.state.status==="error")return f.createElement(Fa,{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(Wa,ut({},r,{translations:n==null?void 0:n.noResultsScreen})):f.createElement(Xa,r):f.createElement(ni,ut({},r,{hasCollections:o,translations:n==null?void 0:n.startScreen}))},function(e,t){return t.state.status==="loading"||t.state.status==="stalled"}),ii=["translations"];function lt(){return lt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lt.apply(this,arguments)}function ci(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ui(e){var t=e.translations,n=t===void 0?{}:t,r=ci(e,ii),o=n.resetButtonTitle,a=o===void 0?"Clear the query":o,i=n.resetButtonAriaLabel,c=i===void 0?"Clear the query":i,s=n.cancelButtonText,l=s===void 0?"Cancel":s,u=n.cancelButtonAriaLabel,d=u===void 0?"Cancel":u,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(p){p.preventDefault()},onReset:m},f.createElement("label",lt({className:"DocSearch-MagnifierLabel"},r.getLabelProps()),f.createElement(Cr,null)),f.createElement("div",{className:"DocSearch-LoadingIndicator"},f.createElement(Na,null)),f.createElement("input",lt({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":c,hidden:!r.state.query},f.createElement(Lt,null))),f.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":d,onClick:r.onClose},l))}var li=["_highlightResult","_snippetResult"];function si(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function fi(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 Qn(e){var t=e.key,n=e.limit,r=n===void 0?5:n,o=fi(t),a=o.getItem().slice(0,r);return{add:function(i){var c=i,s=(c._highlightResult,c._snippetResult,si(c,li)),l=a.findIndex(function(u){return u.objectID===s.objectID});l>-1&&a.splice(l,1),a.unshift(s),a=a.slice(0,r),o.setItem(a)},remove:function(i){a=a.filter(function(c){return c.objectID!==i.objectID}),o.setItem(a)},getAll:function(){return a}}}var pi=["facetName","facetQuery"];function mi(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,i){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var s=JSON.stringify(a),l=o()[s];return Promise.all([l||i(),l!==void 0])}).then(function(s){var l=nt(s,2),u=l[0],d=l[1];return Promise.all([u,d||c.miss(u)])}).then(function(s){return nt(s,1)[0]})},set:function(a,i){return Promise.resolve().then(function(){var c=o();return c[JSON.stringify(a)]=i,r().setItem(n,JSON.stringify(c)),i})},delete:function(a){return Promise.resolve().then(function(){var i=o();delete i[JSON.stringify(a)],r().setItem(n,JSON.stringify(i))})},clear:function(){return Promise.resolve().then(function(){r().removeItem(n)})}}}function Ie(e){var t=rt(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(i){return Promise.all([i,a.miss(i)])}).then(function(i){return nt(i,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 Ie({caches:t}).get(r,o,a)})},set:function(r,o){return n.set(r,o).catch(function(){return Ie({caches:t}).set(r,o)})},delete:function(r){return n.delete(r).catch(function(){return Ie({caches:t}).delete(r)})},clear:function(){return n.clear().catch(function(){return Ie({caches:t}).clear()})}}}function Et(){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 i=r(),c=o&&o.miss||function(){return Promise.resolve()};return i.then(function(s){return c(s)}).then(function(){return i})},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 di(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 Tr(e,t){return t&&Object.keys(t).forEach(function(n){e[n]=t[n](e)}),e}function ft(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0;return e.replace(/%s/g,function(){return encodeURIComponent(n[o++])})}var Xe={WithinQueryParameters:0,WithinHeaders:1};function Yn(e,t){var n=e||{},r=n.data||{};return Object.keys(n).forEach(function(o){["timeout","headers","queryParameters","data","cacheable"].indexOf(o)===-1&&(r[o]=n[o])}),{data:Object.entries(r).length>0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var de={Read:1,Write:2,Any:3},Lr=1,hi=2,Rr=3;function Hr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Lr;return P(P({},e),{},{status:t,lastUpdate:Date.now()})}function Mr(e){return typeof e=="string"?{protocol:"https",url:e,accept:de.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||de.Any}}var Gn="GET",pt="POST";function vi(e,t){return Promise.all(t.map(function(n){return e.get(n,function(){return Promise.resolve(Hr(n))})})).then(function(n){var r=n.filter(function(i){return function(c){return c.status===Lr||Date.now()-c.lastUpdate>12e4}(i)}),o=n.filter(function(i){return function(c){return c.status===Rr&&Date.now()-c.lastUpdate<=12e4}(i)}),a=[].concat(rt(r),rt(o));return{getTimeout:function(i,c){return(o.length===0&&i===0?1:o.length+3+i)*c},statelessHosts:a.length>0?a.map(function(i){return Mr(i)}):t}})}function Zn(e,t,n,r){var o=[],a=function(m,p){if(!(m.method===Gn||m.data===void 0&&p.data===void 0)){var v=Array.isArray(m.data)?m.data:P(P({},m.data),p.data);return JSON.stringify(v)}}(n,r),i=function(m,p){var v=P(P({},m.headers),p.headers),h={};return Object.keys(v).forEach(function(_){var g=v[_];h[_.toLowerCase()]=g}),h}(e,r),c=n.method,s=n.method!==Gn?{}:P(P({},n.data),r.data),l=P(P(P({"x-algolia-agent":e.userAgent.value},e.queryParameters),s),r.queryParameters),u=0,d=function m(p,v){var h=p.pop();if(h===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Xn(o)};var _={data:a,headers:i,method:c,url:gi(h,n.path,l),connectTimeout:v(u,e.timeouts.connect),responseTimeout:v(u,r.timeout)},g=function(b){var O={request:_,response:b,host:h,triesLeft:p.length};return o.push(O),O},y={onSucess:function(b){return function(O){try{return JSON.parse(O.content)}catch(S){throw function(k,A){return{name:"DeserializationError",message:k,response:A}}(S.message,O)}}(b)},onRetry:function(b){var O=g(b);return b.isTimedOut&&u++,Promise.all([e.logger.info("Retryable failure",Vr(O)),e.hostsCache.set(h,Hr(h,b.isTimedOut?Rr:hi))]).then(function(){return m(p,v)})},onFail:function(b){throw g(b),function(O,S){var k=O.content,A=O.status,L=k;try{L=JSON.parse(k).message}catch{}return function(C,N,H){return{name:"ApiError",message:C,status:N,transporterStackTrace:H}}(L,A,S)}(b,Xn(o))}};return e.requester.send(_).then(function(b){return function(O,S){return function(k){var A=k.status;return k.isTimedOut||function(L){var C=L.isTimedOut,N=L.status;return!C&&~~N==0}(k)||~~(A/100)!=2&&~~(A/100)!=4}(O)?S.onRetry(O):~~(O.status/100)==2?S.onSucess(O):S.onFail(O)}(b,y)})};return vi(e.hostsCache,t).then(function(m){return d(rt(m.statelessHosts).reverse(),m.getTimeout)})}function _i(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 gi(e,t,n){var r=qr(n),o="".concat(e.protocol,"://").concat(e.url,"/").concat(t.charAt(0)==="/"?t.substr(1):t);return r.length&&(o+="?".concat(r)),o}function qr(e){return Object.keys(e).map(function(t){return ft("%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 Xn(e){return e.map(function(t){return Vr(t)})}function Vr(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 yi=function(e){var t=e.appId,n=function(a,i,c){var s={"x-algolia-api-key":c,"x-algolia-application-id":i};return{headers:function(){return a===Xe.WithinHeaders?s:{}},queryParameters:function(){return a===Xe.WithinQueryParameters?s:{}}}}(e.authMode!==void 0?e.authMode:Xe.WithinHeaders,t,e.apiKey),r=function(a){var i=a.hostsCache,c=a.logger,s=a.requester,l=a.requestsCache,u=a.responsesCache,d=a.timeouts,m=a.userAgent,p=a.hosts,v=a.queryParameters,h={hostsCache:i,logger:c,requester:s,requestsCache:l,responsesCache:u,timeouts:d,userAgent:m,headers:a.headers,queryParameters:v,hosts:p.map(function(_){return Mr(_)}),read:function(_,g){var y=Yn(g,h.timeouts.read),b=function(){return Zn(h,h.hosts.filter(function(S){return(S.accept&de.Read)!=0}),_,y)};if((y.cacheable!==void 0?y.cacheable:_.cacheable)!==!0)return b();var O={request:_,mappedRequestOptions:y,transporter:{queryParameters:h.queryParameters,headers:h.headers}};return h.responsesCache.get(O,function(){return h.requestsCache.get(O,function(){return h.requestsCache.set(O,b()).then(function(S){return Promise.all([h.requestsCache.delete(O),S])},function(S){return Promise.all([h.requestsCache.delete(O),Promise.reject(S)])}).then(function(S){var k=nt(S,2);return k[0],k[1]})})},{miss:function(S){return h.responsesCache.set(O,S)}})},write:function(_,g){return Zn(h,h.hosts.filter(function(y){return(y.accept&de.Write)!=0}),_,Yn(g,h.timeouts.write))}};return h}(P(P({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:de.Read},{url:"".concat(t,".algolia.net"),accept:de.Write}].concat(di([{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,i){r.userAgent.add({segment:a,version:i})},clearCache:function(){return Promise.all([r.requestsCache.clear(),r.responsesCache.clear()]).then(function(){})}};return Tr(o,e.methods)},Ur=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 Tr(r,n.methods)}},er=function(e){return function(t,n){var r=t.map(function(o){return P(P({},o),{},{params:qr(o.params||{})})});return e.transporter.read({method:pt,path:"1/indexes/*/queries",data:{requests:r},cacheable:!0},n)}},tr=function(e){return function(t,n){return Promise.all(t.map(function(r){var o=r.params,a=o.facetName,i=o.facetQuery,c=Io(o,pi);return Ur(e)(r.indexName,{methods:{searchForFacetValues:Fr}}).searchForFacetValues(a,i,P(P({},n),c))}))}},bi=function(e){return function(t,n,r){return e.transporter.read({method:pt,path:ft("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r)}},Oi=function(e){return function(t,n){return e.transporter.read({method:pt,path:ft("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},n)}},Fr=function(e){return function(t,n,r){return e.transporter.read({method:pt,path:ft("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:n},cacheable:!0},r)}},Si=1,wi=2,Ei=3;function Br(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(i){var c=new XMLHttpRequest;c.open(a.method,a.url,!0),Object.keys(a.headers).forEach(function(d){return c.setRequestHeader(d,a.headers[d])});var s,l=function(d,m){return setTimeout(function(){c.abort(),i({status:0,content:m,isTimedOut:!0})},1e3*d)},u=l(a.connectTimeout,"Connection timeout");c.onreadystatechange=function(){c.readyState>c.OPENED&&s===void 0&&(clearTimeout(u),s=l(a.responseTimeout,"Socket timeout"))},c.onerror=function(){c.status===0&&(clearTimeout(u),clearTimeout(s),i({content:c.responseText||"Network request failed",status:c.status,isTimedOut:!1}))},c.onload=function(){clearTimeout(u),clearTimeout(s),i({content:c.responseText,status:c.status,isTimedOut:!1})},c.send(a.data)})}},logger:(r=Ei,{debug:function(a,i){return Si>=r&&console.debug(a,i),Promise.resolve()},info:function(a,i){return wi>=r&&console.info(a,i),Promise.resolve()},error:function(a,i){return console.error(a,i),Promise.resolve()}}),responsesCache:Et(),requestsCache:Et({serializable:!1}),hostsCache:Ie({caches:[mi({key:"".concat("4.8.5","-").concat(e)}),Et()]}),userAgent:_i("4.8.5").add({segment:"Browser",version:"lite"}),authMode:Xe.WithinQueryParameters};return yi(P(P(P({},o),n),{},{methods:{search:er,searchForFacetValues:tr,multipleQueries:er,multipleSearchForFacetValues:tr,initIndex:function(a){return function(i){return Ur(a)(i,{methods:{search:Oi,searchForFacetValues:Fr,findAnswers:bi}})}}}}))}Br.version="4.8.5";var ji=["footer","searchBox"];function xe(){return xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xe.apply(this,arguments)}function nr(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 jt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nr(Object(n),!0).forEach(function(r){Pi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ki(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var o=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var a,i,c=[],s=!0,l=!1;try{for(o=o.call(n);!(s=(a=o.next()).done)&&(c.push(a.value),!r||c.length!==r);s=!0);}catch(u){l=!0,i=u}finally{try{s||o.return==null||o.return()}finally{if(l)throw i}}return c}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return rr(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 rr(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 rr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ii(e,t){if(e==null)return{};var n,r,o=function(i,c){if(i==null)return{};var s,l,u={},d=Object.keys(i);for(l=0;l<d.length;l++)s=d[l],c.indexOf(s)>=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ci(e){var t=e.appId,n=t===void 0?"BH4D9OD16A":t,r=e.apiKey,o=e.indexName,a=e.placeholder,i=a===void 0?"Search docs":a,c=e.searchParameters,s=e.onClose,l=s===void 0?Ga:s,u=e.transformItems,d=u===void 0?Jn:u,m=e.hitComponent,p=m===void 0?Aa:m,v=e.resultsFooterComponent,h=v===void 0?function(){return null}:v,_=e.navigator,g=e.initialScrollY,y=g===void 0?0:g,b=e.transformSearchClient,O=b===void 0?Jn:b,S=e.disableUserPersonalization,k=S!==void 0&&S,A=e.initialQuery,L=A===void 0?"":A,C=e.translations,N=C===void 0?{}:C,H=e.getMissingResultsUrl,dt=N.footer,ht=N.searchBox,vt=Ii(N,ji),_e=ki(f.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),ge=_e[0],zr=_e[1],Ft=f.useRef(null),_t=f.useRef(null),Bt=f.useRef(null),qe=f.useRef(null),ye=f.useRef(null),X=f.useRef(10),$t=f.useRef(typeof window!="undefined"?window.getSelection().toString().slice(0,64):"").current,ne=f.useRef(L||$t).current,zt=function(j,x,V){return f.useMemo(function(){var U=Br(j,x);return U.addAlgoliaAgent("docsearch","3.0.0-alpha.50"),/docsearch.js \(.*\)/.test(U.transporter.userAgent.value)===!1&&U.addAlgoliaAgent("docsearch-react","3.0.0-alpha.50"),V(U)},[j,x,V])}(n,r,O),ce=f.useRef(Qn({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(o),limit:10})).current,be=f.useRef(Qn({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(o),limit:ce.getAll().length===0?7:4})).current,Oe=f.useCallback(function(j){if(!k){var x=j.type==="content"?j.__docsearch_parent:j;x&&ce.getAll().findIndex(function(V){return V.objectID===x.objectID})===-1&&be.add(x)}},[ce,be,k]),Se=f.useMemo(function(){return Ca({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:ne,context:{searchSuggestions:[]}},navigator:_,onStateChange:function(j){zr(j.state)},getSources:function(j){var x=j.query,V=j.state,U=j.setContext,ee=j.setStatus;return x?zt.search([{query:x,indexName:o,params:jt({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(X.current),"hierarchy.lvl2:".concat(X.current),"hierarchy.lvl3:".concat(X.current),"hierarchy.lvl4:".concat(X.current),"hierarchy.lvl5:".concat(X.current),"hierarchy.lvl6:".concat(X.current),"content:".concat(X.current)],snippetEllipsisText:"\u2026",highlightPreTag:"<mark>",highlightPostTag:"</mark>",hitsPerPage:20},c)}]).catch(function(T){throw T.name==="RetryError"&&ee("error"),T}).then(function(T){var F=T.results[0],B=F.hits,Jr=F.nbHits,gt=Kn(B,function(yt){return Nr(yt)});return V.context.searchSuggestions.length<Object.keys(gt).length&&U({searchSuggestions:Object.keys(gt)}),U({nbHits:Jr}),Object.values(gt).map(function(yt,Qr){return{sourceId:"hits".concat(Qr),onSelect:function(J){var we=J.item,ue=J.event;Oe(we),ue.shiftKey||ue.ctrlKey||ue.metaKey||l()},getItemUrl:function(J){return J.item.url},getItems:function(){return Object.values(Kn(yt,function(J){return J.hierarchy.lvl1})).map(d).map(function(J){return J.map(function(we){return jt(jt({},we),{},{__docsearch_parent:we.type!=="lvl1"&&J.find(function(ue){return ue.type==="lvl1"&&ue.hierarchy.lvl1===we.hierarchy.lvl1})})})}).flat()}}})}):k?[]:[{sourceId:"recentSearches",onSelect:function(T){var F=T.item,B=T.event;Oe(F),B.shiftKey||B.ctrlKey||B.metaKey||l()},getItemUrl:function(T){return T.item.url},getItems:function(){return be.getAll()}},{sourceId:"favoriteSearches",onSelect:function(T){var F=T.item,B=T.event;Oe(F),B.shiftKey||B.ctrlKey||B.metaKey||l()},getItemUrl:function(T){return T.item.url},getItems:function(){return ce.getAll()}}]}})},[o,c,zt,l,be,ce,Oe,ne,i,_,d,k]),Wr=Se.getEnvironmentProps,Kr=Se.getRootProps,Wt=Se.refresh;return function(j){var x=j.getEnvironmentProps,V=j.panelElement,U=j.formElement,ee=j.inputElement;f.useEffect(function(){if(V&&U&&ee){var T=x({panelElement:V,formElement:U,inputElement:ee}),F=T.onTouchStart,B=T.onTouchMove;return window.addEventListener("touchstart",F),window.addEventListener("touchmove",B),function(){window.removeEventListener("touchstart",F),window.removeEventListener("touchmove",B)}}},[x,V,U,ee])}({getEnvironmentProps:Wr,panelElement:qe.current,formElement:Bt.current,inputElement:ye.current}),function(j){var x=j.container;f.useEffect(function(){if(x){var V=x.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), input:not([disabled])"),U=V[0],ee=V[V.length-1];return x.addEventListener("keydown",T),function(){x.removeEventListener("keydown",T)}}function T(F){F.key==="Tab"&&(F.shiftKey?document.activeElement===U&&(F.preventDefault(),ee.focus()):document.activeElement===ee&&(F.preventDefault(),U.focus()))}},[x])}({container:Ft.current}),f.useEffect(function(){return document.body.classList.add("DocSearch--active"),function(){var j,x;document.body.classList.remove("DocSearch--active"),(j=(x=window).scrollTo)===null||j===void 0||j.call(x,0,y)}},[]),f.useEffect(function(){window.matchMedia("(max-width: 750px)").matches&&(X.current=5)},[]),f.useEffect(function(){qe.current&&(qe.current.scrollTop=0)},[ge.query]),f.useEffect(function(){ne.length>0&&(Wt(),ye.current&&ye.current.focus())},[ne,Wt]),f.useEffect(function(){function j(){if(_t.current){var x=.01*window.innerHeight;_t.current.style.setProperty("--docsearch-vh","".concat(x,"px"))}}return j(),window.addEventListener("resize",j),function(){window.removeEventListener("resize",j)}},[]),f.createElement("div",xe({ref:Ft},Kr({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",ge.status==="stalled"&&"DocSearch-Container--Stalled",ge.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(j){j.target===j.currentTarget&&l()}}),f.createElement("div",{className:"DocSearch-Modal",ref:_t},f.createElement("header",{className:"DocSearch-SearchBar",ref:Bt},f.createElement(ui,xe({},Se,{state:ge,autoFocus:ne.length===0,inputRef:ye,isFromSelection:Boolean(ne)&&ne===$t,translations:ht,onClose:l}))),f.createElement("div",{className:"DocSearch-Dropdown",ref:qe},f.createElement(ai,xe({},Se,{indexName:o,state:ge,hitComponent:p,resultsFooterComponent:h,disableUserPersonalization:k,recentSearches:be,favoriteSearches:ce,inputRef:ye,translations:vt,getMissingResultsUrl:H,onItemClick:function(j){Oe(j),l()}}))),f.createElement("footer",{className:"DocSearch-Footer"},f.createElement(xa,{translations:dt}))))}function Mt(){return Mt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mt.apply(this,arguments)}function or(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var o=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var a,i,c=[],s=!0,l=!1;try{for(o=o.call(n);!(s=(a=o.next()).done)&&(c.push(a.value),!r||c.length!==r);s=!0);}catch(u){l=!0,i=u}finally{try{s||o.return==null||o.return()}finally{if(l)throw i}}return c}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return ar(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 ar(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 ar(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Di(e){var t,n,r=f.useRef(null),o=or(f.useState(!1),2),a=o[0],i=o[1],c=or(f.useState((e==null?void 0:e.initialQuery)||void 0),2),s=c[0],l=c[1],u=f.useCallback(function(){i(!0)},[i]),d=f.useCallback(function(){i(!1)},[i]);return function(m){var p=m.isOpen,v=m.onOpen,h=m.onClose,_=m.onInput,g=m.searchButtonRef;f.useEffect(function(){function y(b){(b.keyCode===27&&p||b.key==="k"&&(b.metaKey||b.ctrlKey)||!function(O){var S=O.target,k=S.tagName;return S.isContentEditable||k==="INPUT"||k==="SELECT"||k==="TEXTAREA"}(b)&&b.key==="/"&&!p)&&(b.preventDefault(),p?h():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||v()),g&&g.current===document.activeElement&&_&&/[a-zA-Z0-9]/.test(String.fromCharCode(b.keyCode))&&_(b)}return window.addEventListener("keydown",y),function(){window.removeEventListener("keydown",y)}},[p,v,h,_,g])}({isOpen:a,onOpen:u,onClose:d,onInput:f.useCallback(function(m){i(!0),l(m.key)},[i,l]),searchButtonRef:r}),f.createElement(f.Fragment,null,f.createElement(Jo,{ref:r,translations:e==null||(t=e.translations)===null||t===void 0?void 0:t.button,onClick:u}),a&&jr(f.createElement(Ci,Mt({},e,{initialScrollY:window.scrollY,initialQuery:s,translations:e==null||(n=e.translations)===null||n===void 0?void 0:n.modal,onClose:d})),document.body))}function xi(e){kr(f.createElement(Di,Pt({},e,{transformSearchClient:function(t){return t.addAlgoliaAgent("docsearch.js","3.0.0-alpha.50"),e.transformSearchClient?e.transformSearchClient(t):t}})),function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window;return typeof t=="string"?n.document.querySelector(t):t}(e.container,e.environment))}const Ai={name:"VanDocSearch",props:{lang:String,searchConfig:Object},watch:{lang(){this.initDocsearch()}},mounted(){this.initDocsearch()},methods:{initDocsearch(){this.searchConfig&&xi(Yt(Qt({},this.searchConfig),{container:"#docsearch"}))}}},Ni={id:"docsearch"};function Ti(e,t,n,r,o,a){return I(),D("div",Ni)}var Li=K(Ai,[["render",Ti]]);const Ri={name:"VanDocHeader",components:{SearchInput:Li},props:{lang:String,config:Object,versions:Array,langConfigs:Array},data(){return{packageVersion:to,showVersionPop:!1}},computed:{langLink(){return`#${this.$route.path.replace(this.lang,this.anotherLang.lang)}`},langLabel(){return this.anotherLang.label},anotherLang(){const e=this.langConfigs.filter(t=>t.lang!==this.lang);return e.length?e[0]:{}},searchConfig(){return this.config.searchConfig}},methods:{toggleVersionPop(){const e=!this.showVersionPop,t=e?"add":"remove";document.body[`${t}EventListener`]("click",this.checkHideVersionPop),this.showVersionPop=e},checkHideVersionPop(e){this.$refs.version.contains(e.target)||(this.showVersionPop=!1)},onSwitchLang(e){this.$router.push(this.$route.path.replace(e.from,e.to))},onSwitchVersion(e){e.link&&(location.href=e.link)}}},Hi={class:"van-doc-header"},Mi={class:"van-doc-row"},qi={class:"van-doc-header__top"},Vi={class:"van-doc-header__logo"},Ui=["src"],Fi={class:"van-doc-header__title"},Bi={key:0,class:"van-doc-header__subtitle"},$i={class:"van-doc-header__top-nav"},zi=["href"],Wi=["src"],Ki={key:1},Ji={key:0,ref:"version",class:"van-doc-header__top-nav-item"},Qi={key:0,class:"van-doc-header__version-pop"},Yi=["onClick"],Gi={key:1,class:"van-doc-header__top-nav-item"},Zi=["href"];function Xi(e,t,n,r,o,a){const i=$("search-input");return I(),D("div",Hi,[R("div",Mi,[R("div",qi,[R("a",Vi,[R("img",{src:n.config.logo},null,8,Ui),R("span",Fi,ae(n.config.title),1),n.config.subtitle?(I(),D("span",Bi,ae(n.config.subtitle),1)):Y("v-if",!0)]),R("ul",$i,[(I(!0),D(Ae,null,et(n.config.links,(c,s)=>(I(),D("li",{key:s,class:"van-doc-header__top-nav-item"},[R("a",{class:"van-doc-header__link",target:"_blank",href:c.url},[c.logo?(I(),D("img",{key:0,src:c.logo},null,8,Wi)):c.text?(I(),D("span",Ki,ae(c.text),1)):Y("v-if",!0)],8,zi)]))),128)),n.versions?(I(),D("li",Ji,[R("span",{class:"van-doc-header__cube van-doc-header__version",onClick:t[0]||(t[0]=(...c)=>a.toggleVersionPop&&a.toggleVersionPop(...c))},[uo(ae(o.packageVersion)+" ",1),ie(lo,{name:"van-doc-dropdown"},{default:tt(()=>[o.showVersionPop?(I(),D("div",Qi,[(I(!0),D(Ae,null,et(n.versions,(c,s)=>(I(),D("div",{key:s,class:"van-doc-header__version-pop-item",onClick:l=>a.onSwitchVersion(c)},ae(c.label),9,Yi))),128))])):Y("v-if",!0)]),_:1})])],512)):Y("v-if",!0),a.langLabel&&a.langLink?(I(),D("li",Gi,[R("a",{class:"van-doc-header__cube",href:a.langLink},ae(a.langLabel),9,Zi)])):Y("v-if",!0),a.searchConfig?(I(),st(i,{key:2,lang:n.lang,"search-config":a.searchConfig},null,8,["lang","search-config"])):Y("v-if",!0)])])])])}var ec=K(Ri,[["render",Xi]]);const tc={name:"VanDocContent",computed:{currentPage(){const{path:e}=this.$route;return e?e.split("/").slice(-1)[0]:this.$route.name}},watch:{$route(e,t){t.path!==e.path&&setTimeout(()=>{this.copyAction()})}},mounted(){this.copyAction()},methods:{onClick({target:e}){["H2","H3","H4","H5"].includes(e.tagName)&&this.scrollToAnchor(e)},scrollToAnchor(e){e.id&&this.$router.push({name:this.$route.name,hash:"#"+e.id})},copyAction(){const e=document.querySelectorAll(".van-doc-card pre code");if(!(!e||!e.length))for(let t=0;t<e.length;t++){const n=e[t];let r=null;n.addEventListener("click",()=>{if(r)return;const o=n.innerText;ur(o),n.classList.add("code-copy-success"),r=setTimeout(()=>{n.classList.remove("code-copy-success"),r=null},1400)})}}}};function nc(e,t,n,r,o,a){return I(),D("div",{class:he(["van-doc-content",`van-doc-content--${a.currentPage}`]),onClick:t[0]||(t[0]=(...i)=>a.onClick&&a.onClick(...i))},[Ne(e.$slots,"default")],2)}var rc=K(tc,[["render",nc]]);const oc={name:"VanDocContainer",props:{hasSimulator:Boolean}};function ac(e,t,n,r,o,a){return I(),D("div",{class:he(["van-doc-container van-doc-row",{"van-doc-container--with-simulator":n.hasSimulator}])},[Ne(e.$slots,"default")],2)}var ic=K(oc,[["render",ac]]);const cc={name:"VanDocSimulator",props:{src:String},data(){return{scrollTop:window.scrollY,windowHeight:window.innerHeight}},computed:{isFixed(){return this.scrollTop>60},simulatorStyle(){return{height:Math.min(640,this.windowHeight-90)+"px"}}},mounted(){window.addEventListener("scroll",()=>{this.scrollTop=window.scrollY}),window.addEventListener("resize",()=>{this.windowHeight=window.innerHeight})}},uc=["src"];function lc(e,t,n,r,o,a){return I(),D("div",{class:he(["van-doc-simulator",{"van-doc-simulator-fixed":a.isFixed}])},[R("iframe",{ref:"iframe",src:n.src,style:lr(a.simulatorStyle),frameborder:"0"},null,12,uc)],2)}var sc=K(cc,[["render",lc]]);const fc={name:"VanDoc",components:{DocNav:Po,DocHeader:ec,DocContent:rc,DocContainer:ic,DocSimulator:sc},props:{lang:String,versions:Array,simulator:String,hasSimulator:Boolean,langConfigs:Array,config:{type:Object,required:!0},base:{type:String,default:""}},emits:["switch-version"],watch:{$route(){this.setNav()}},created(){this.setNav(),this.keyboardHandler()},methods:{setNav(){const{nav:e}=this.config,t=e.reduce((o,a)=>o.concat(a.items),[]),n=this.$route.path.split("/").pop();let r;for(let o=0,a=t.length;o<a;o++)if(t[o].path===n){r=o;break}this.leftNav=t[r-1],this.rightNav=t[r+1]},keyboardNav(e){if(/win(32|64)/.test(navigator.userAgent.toLocaleLowerCase()))return;const t=e==="prev"?this.leftNav:this.rightNav;t.path&&this.$router.push(this.base+t.path)},keyboardHandler(){window.addEventListener("keyup",e=>{switch(e.keyCode){case 37:this.keyboardNav("prev");break;case 39:this.keyboardNav("next");break}})}}},pc={class:"van-doc"};function mc(e,t,n,r,o,a){const i=$("doc-header"),c=$("doc-nav"),s=$("doc-content"),l=$("doc-container"),u=$("doc-simulator");return I(),D("div",pc,[ie(i,{lang:n.lang,config:n.config,versions:n.versions,"lang-configs":n.langConfigs,onSwitchVersion:t[0]||(t[0]=d=>e.$emit("switch-version",d))},null,8,["lang","config","versions","lang-configs"]),ie(c,{lang:n.lang,"nav-config":n.config.nav},null,8,["lang","nav-config"]),ie(l,{"has-simulator":n.hasSimulator},{default:tt(()=>[ie(s,null,{default:tt(()=>[Ne(e.$slots,"default")]),_:3})]),_:3},8,["has-simulator"]),n.hasSimulator?(I(),st(u,{key:0,src:n.simulator},null,8,["src"])):Y("v-if",!0)])}var dc=K(fc,[["render",mc]]);const hc={components:{VanDoc:dc},data(){return{hasSimulator:!0}},computed:{simulator(){var t,n;return(t=Q.site.simulator)!=null&&t.url?(n=Q.site.simulator)==null?void 0:n.url:`${location.pathname.replace(/\/index(\.html)?/,"/")}mobile.html${location.hash}`},lang(){const{lang:e}=this.$route.meta;return e||""},langConfigs(){const{locales:e={}}=Q.site;return Object.keys(e).map(t=>({lang:t,label:e[t].langLabel||""}))},config(){const{locales:e}=Q.site;return e?e[this.lang]:Q.site},versions(){return Q.site.versions||null}},watch:{"$route.path"(){this.setTitleAndToogleSimulator()},lang(e){no(e),this.setTitleAndToogleSimulator()},config:{handler(e){e&&this.setTitleAndToogleSimulator()},immediate:!0}},mounted(){this.$route.hash&&this.$nextTick(()=>{const e=document.querySelector(this.$route.hash);e&&e.scrollIntoView()})},methods:{setTitleAndToogleSimulator(){let{title:e}=this.config;const n=this.config.nav.reduce((r,o)=>[...r,...o.items],[]).find(r=>r.path===this.$route.meta.name);n&&n.title?e=n.title+" - "+e:this.config.description&&(e+=` - ${this.config.description}`),document.title=e,this.hasSimulator=!(Q.site.hideSimulator||this.config.hideSimulator||n&&n.hideSimulator)}}},vc={class:"app"};function _c(e,t,n,r,o,a){const i=$("router-view"),c=$("van-doc");return I(),D("div",vc,[a.config?(I(),st(c,{key:0,lang:a.lang,config:a.config,versions:a.versions,simulator:a.simulator,"has-simulator":o.hasSimulator,"lang-configs":a.langConfigs},{default:tt(()=>[ie(i)]),_:1},8,["lang","config","versions","simulator","has-simulator","lang-configs"])):Y("v-if",!0)])}var gc=K(hc,[["render",_c]]);const yc={name:"DemoPlayground",props:{originCode:String,codeSnippet:String,transform:Boolean,compact:Boolean,inline:Boolean},data(){return{showSource:!1,copyStatus:"ready"}},methods:{unescape,toggleSource(){this.showSource=!this.showSource},copySourceCode(){ur(unescape(this.originCode)),this.copyStatus="copied",setTimeout(()=>{this.copyStatus="ready"},2e3)}}},bc=e=>(po("data-v-356bb874"),e=e(),mo(),e),Oc={class:"demo-playground--code"},Sc={class:"demo-playground--code--actions"},wc=bc(()=>R("span",null,null,-1)),Ec=["data-status"],jc=["innerHTML"];function Pc(e,t,n,r,o,a){return I(),D("div",{class:he({"demo-playground":!n.inline,transform:n.transform})},[n.inline?Ne(e.$slots,"default",{key:0},void 0,!0):(I(),D(Ae,{key:1},[R("div",{class:he(["demo-playground--previewer",{compact:n.compact}])},[Ne(e.$slots,"default",{},void 0,!0)],2),R("div",Oc,[R("div",Sc,[wc,R("button",{title:"Copy source code",class:"action-icon",role:"copy","data-status":o.copyStatus,onClick:t[0]||(t[0]=(...i)=>a.copySourceCode&&a.copySourceCode(...i))},null,8,Ec),R("button",{title:"Toggle source code panel",class:"action-icon",role:"source",onClick:t[1]||(t[1]=(...i)=>a.toggleSource&&a.toggleSource(...i))})]),so(R("div",{innerHTML:a.unescape(n.codeSnippet),class:"demo-playground--code--content"},null,8,jc),[[fo,o.showSource]])])],64))],2)}var ir=K(yc,[["render",Pc],["__scopeId","data-v-356bb874"]]);ro&&location.replace("mobile.html"+location.hash);const{locales:$r,defaultLang:kc}=Q.site;oo(kc);function Ic(e){if(e.indexOf("_")!==-1){const t=e.split("_"),n=t.shift();return{component:`${Gt(n)}`,lang:t.join("-")}}return{component:`${Gt(e)}`,lang:""}}function Cc(e){const t=e.path.split("/")[1];return Object.keys($r).indexOf(t)!==-1?t:co()}function Dc(){const e=[],t=Object.keys(Ve);$r?e.push({name:"notFound",path:"/:path(.*)+",redirect:r=>({name:Cc(r)})}):e.push({name:"notFound",path:"/:path(.*)+",redirect:{name:"home"}});function n(r,o){e.push({name:o||"home",path:`/${o||""}`,component:r,meta:{lang:o}})}return t.forEach(r=>{const{component:o,lang:a}=Ic(r);o==="home"&&n(Ve[r],a),a?e.push({name:`${a}/${o}`,path:`/${a}/${o}`,component:Ve[r],meta:{lang:a,name:o}}):e.push({name:`${o}`,path:`/${o}`,component:Ve[r],meta:{name:o}})}),e}const mt=ho({history:vo(),routes:Dc(),scrollBehavior(e){return e.hash?{el:e.hash}:{top:0}}});mt.afterEach(()=>{_o(io)});var cr;((cr=Q.site.simulator)==null?void 0:cr.syncPathFromSimulator)!==!1&&ao(mt);window.vueRouter=mt;window.app=go(gc).use(mt).component(ir.name,ir);setTimeout(()=>{window.app.mount("#app")},0);
|