typedoc-theme-oxide 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/assets/index.js
CHANGED
|
@@ -44,7 +44,7 @@ const ut=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)
|
|
|
44
44
|
* Hosted by Nextapps GmbH
|
|
45
45
|
* https://github.com/nextapps-de/flexsearch
|
|
46
46
|
*/
|
|
47
|
-
var ce;function ue(t,e,i){const n=typeof i,r=typeof t;if("undefined"!==n){if("undefined"!==r){if(i){if("function"===r&&n===r)return function(e){return t(i(e))};if((e=t.constructor)===i.constructor){if(e===Array)return i.concat(t);if(e===Map){var s=new Map(i);for(var o of t)s.set(o[0],o[1]);return s}if(e===Set){for(s of(o=new Set(i),t.values()))o.add(s);return o}}}return t}return i}return"undefined"===r?e:t}function fe(){return Object.create(null)}function de(t){return"string"==typeof t}function pe(t){return"object"==typeof t}function ge(t,e){if(de(e))t=t[e];else for(let i=0;t&&i<e.length;i++)t=t[e[i]];return t}(()=>{let t,e=le,i=[],n=[];(class r extends e{static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(e[Symbol.metadata]??null):void 0;t=[Ut],oe(null,null,t,{kind:"field",name:"_project",static:!1,private:!1,access:{has:t=>"_project"in t,get:t=>t._project,set:(t,e)=>{t._project=e}},metadata:r},i,n),r&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})}type="reference";name;typeArguments;get reflection(){if("number"==typeof this._target)return this._project?.getReflectionById(this._target);const t=this._project?.getReflectionsFromSymbolId(this._target);if(!t?.length)return;const e=this.preferValues?Xt.ValueReferenceTarget:Xt.TypeReferenceTarget;return t.find((t=>t.kindOf(e)))||t.find((t=>t.kindOf(~e)))}highlightedProperties;get symbolId(){if(!this.reflection&&"object"==typeof this._target)return this._target}isIntentionallyBroken(){return!("object"!=typeof this._target||!this._project?.symbolIdHasBeenRemoved(this._target))||(-1===this._target||this.refersToTypeParameter)}toDeclarationReference(){return{resolutionStart:"global",moduleSource:this.package,symbolReference:{path:this.qualifiedName.split(".").map((t=>({path:t,navigation:"."})))}}}qualifiedName;package;externalUrl;refersToTypeParameter=!1;preferValues=!1;_target;_project=ae(this,i,void 0);constructor(t,e,i,r){super(),ae(this,n),this.name=t,this._target="number"==typeof e?e:"variant"in e?e.id:e,this._project=i,this.qualifiedName=r}static createUnresolvedReference(t,e,i,n){return new r(t,e,i,n)}static createResolvedReference(t,e,i){return new r(t,e,i,t)}static createBrokenReference(t,e){return new r(t,-1,e,t)}getTypeString(){const t=this.reflection?this.reflection.name:this.name;let e="";return this.typeArguments&&this.typeArguments.length>0&&(e+="<",e+=this.typeArguments.map((t=>t.stringify(he.referenceTypeArgument))).join(", "),e+=">"),t+e}needsParenthesis(){return!1}toObject(t){let e;e="number"==typeof this._target?this._target:this._project?.symbolIdHasBeenRemoved(this._target)?-1:this.reflection?this.reflection.id:this._target.toObject();const i={type:this.type,target:e,typeArguments:t.toObjectsOptional(this.typeArguments),name:this.name,package:this.package,externalUrl:this.externalUrl};return this.name!==this.qualifiedName&&(i.qualifiedName=this.qualifiedName),this.refersToTypeParameter&&(i.refersToTypeParameter=!0),"number"!=typeof e&&this.preferValues&&(i.preferValues=!0),this.highlightedProperties&&(i.highlightedProperties=Object.fromEntries(Array.from(this.highlightedProperties.entries(),(([t,e])=>[t,Qt.serializeDisplayParts(e)])))),i}fromObject(t,e){if(this.typeArguments=t.reviveMany(e.typeArguments,(e=>t.constructType(e))),"number"==typeof e.target&&-1!==e.target?t.defer((i=>{const n=i.getReflectionById(t.oldIdToNewId[e.target]??-1);n?(this._project=i,this._target=n.id):t.logger.warn(qt.serialized_project_referenced_0_not_part_of_project(JSON.stringify(e.target)))})):-1===e.target?this._target=-1:(this._project=t.project,this._target=new Gt(e.target)),this.qualifiedName=e.qualifiedName??e.name,this.package=e.package,this.refersToTypeParameter=!!e.refersToTypeParameter,this.preferValues=!!e.preferValues,e.highlightedProperties){this.highlightedProperties=new Map;for(const[i,n]of Object.entries(e.highlightedProperties))this.highlightedProperties.set(i,Qt.deserializeDisplayParts(t,n))}}})})();const me=/[^\p{L}\p{N}]+/u,ye=/(\d{3})/g,be=/(\D)(\d{3})/g,ve=/(\d{3})(\D)/g,_e=/[\u0300-\u036f]/g;function we(t={}){if(!this||this.constructor!==we)return new we(...arguments);if(arguments.length)for(t=0;t<arguments.length;t++)this.assign(arguments[t]);else this.assign(t)}function xe(t){t.H=null,t.B.clear(),t.G.clear()}let ke,Se,$e,Pe,Ae;async function Te(t){var e=(t=t.data).task;const i=t.id;let n=t.args;if("init"===e)Se=t.options||{},(e=t.factory)?(Function("return "+e)()(self),ke=new self.FlexSearch.Index(Se),delete self.FlexSearch):ke=new Mi(Se),postMessage({id:i});else{let r;"export"===e&&(n[1]?(n[0]=Se.export,n[2]=0,n[3]=1):n=null),"import"===e?n[0]&&(t=await Se.import.call(ke,n[0]),ke.import(n[0],t)):(r=n&&ke[e].apply(ke,n))&&r.then&&(r=await r),postMessage("search"===e?{id:i,msg:r}:{id:i})}}function je(t){Oe.call(t,"add"),Oe.call(t,"append"),Oe.call(t,"search"),Oe.call(t,"update"),Oe.call(t,"remove")}function Ee(){$e=Ae=0}function Oe(t){this[t+"Async"]=function(){const e=arguments;var i=e[e.length-1];let n;if("function"==typeof i&&(n=i,delete e[e.length-1]),$e?Ae||(Ae=Date.now()-Pe>=this.priority*this.priority*3):($e=setTimeout(Ee,0),Pe=Date.now()),Ae){const i=this;return new Promise((n=>{setTimeout((function(){n(i[t+"Async"].apply(i,e))}),0)}))}const r=this[t].apply(this,e);return i=r.then?r:new Promise((t=>t(r))),n&&i.then(n),i}}(ce=we.prototype).assign=function(t){this.normalize=ue(t.normalize,!0,this.normalize);let e,i=t.include,n=i||t.exclude||t.split;if(n||""===n){if("object"==typeof n&&n.constructor!==RegExp){let t="";e=!i,i||(t+="\\p{Z}"),n.letter&&(t+="\\p{L}"),n.number&&(t+="\\p{N}",e=!!i),n.symbol&&(t+="\\p{S}"),n.punctuation&&(t+="\\p{P}"),n.control&&(t+="\\p{C}"),(n=n.char)&&(t+="object"==typeof n?n.join(""):n);try{this.split=new RegExp("["+(i?"^":"")+t+"]+","u")}catch(t){this.split=/\s+/}}else this.split=n,e=!1===n||2>"a1a".split(n).length;this.numeric=ue(t.numeric,e)}else{try{this.split=ue(this.split,me)}catch(t){this.split=/\s+/}this.numeric=ue(t.numeric,ue(this.numeric,!0))}if(this.prepare=ue(t.prepare,null,this.prepare),this.finalize=ue(t.finalize,null,this.finalize),n=t.filter,this.filter="function"==typeof n?n:ue(n&&new Set(n),null,this.filter),this.dedupe=ue(t.dedupe,!0,this.dedupe),this.matcher=ue((n=t.matcher)&&new Map(n),null,this.matcher),this.mapper=ue((n=t.mapper)&&new Map(n),null,this.mapper),this.stemmer=ue((n=t.stemmer)&&new Map(n),null,this.stemmer),this.replacer=ue(t.replacer,null,this.replacer),this.minlength=ue(t.minlength,1,this.minlength),this.maxlength=ue(t.maxlength,1024,this.maxlength),this.rtl=ue(t.rtl,!1,this.rtl),(this.cache=n=ue(t.cache,!0,this.cache))&&(this.H=null,this.S="number"==typeof n?n:2e5,this.B=new Map,this.G=new Map,this.L=this.K=128),this.h="",this.M=null,this.A="",this.N=null,this.matcher)for(const t of this.matcher.keys())this.h+=(this.h?"|":"")+t;if(this.stemmer)for(const t of this.stemmer.keys())this.A+=(this.A?"|":"")+t;return this},ce.addStemmer=function(t,e){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(t,e),this.A+=(this.A?"|":"")+t,this.N=null,this.cache&&xe(this),this},ce.addFilter=function(t){return"function"==typeof t?this.filter=t:(this.filter||(this.filter=new Set),this.filter.add(t)),this.cache&&xe(this),this},ce.addMapper=function(t,e){return"object"==typeof t?this.addReplacer(t,e):1<t.length?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&&xe(this),this)},ce.addMatcher=function(t,e){return"object"==typeof t?this.addReplacer(t,e):2>t.length&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?"|":"")+t,this.M=null,this.cache&&xe(this),this)},ce.addReplacer=function(t,e){return"string"==typeof t?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&&xe(this),this)},ce.encode=function(t,e){if(this.cache&&t.length<=this.K)if(this.H){if(this.B.has(t))return this.B.get(t)}else this.H=setTimeout(xe,50,this);this.normalize&&(t="function"==typeof this.normalize?this.normalize(t):_e?t.normalize("NFKD").replace(_e,"").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&3<t.length&&(t=t.replace(be,"$1 $2").replace(ve,"$1 $2").replace(ye,"$1 "));const i=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let n,r,s=[],o=fe(),a=this.split||""===this.split?t.split(this.split):[t];for(let t,h,c=0;c<a.length;c++)if((t=h=a[c])&&!(t.length<this.minlength||t.length>this.maxlength)){if(e){if(o[t])continue;o[t]=1}else{if(n===t)continue;n=t}if(i)s.push(t);else if(!this.filter||("function"==typeof this.filter?this.filter(t):!this.filter.has(t))){if(this.cache&&t.length<=this.L)if(this.H){var l=this.G.get(t);if(l||""===l){l&&s.push(l);continue}}else this.H=setTimeout(xe,50,this);if(this.stemmer){let e;for(this.N||(this.N=new RegExp("(?!^)("+this.A+")$"));e!==t&&2<t.length;)e=t,t=t.replace(this.N,(t=>this.stemmer.get(t)))}if(t&&(this.mapper||this.dedupe&&1<t.length)){l="";for(let e,i,n=0,r="";n<t.length;n++)e=t.charAt(n),e===r&&this.dedupe||((i=this.mapper&&this.mapper.get(e))||""===i?i===r&&this.dedupe||!(r=i)||(l+=i):l+=r=e);t=l}if(this.matcher&&1<t.length&&(this.M||(this.M=new RegExp("("+this.h+")","g")),t=t.replace(this.M,(t=>this.matcher.get(t)))),t&&this.replacer)for(l=0;t&&l<this.replacer.length;l+=2)t=t.replace(this.replacer[l],this.replacer[l+1]);if(this.cache&&h.length<=this.L&&(this.G.set(h,t),this.G.size>this.S&&(this.G.clear(),this.L=this.L/1.1|0)),t){if(t!==h)if(e){if(o[t])continue;o[t]=1}else{if(r===t)continue;r=t}s.push(t)}}}return this.finalize&&(s=this.finalize(s)||s),this.cache&&t.length<=this.K&&(this.B.set(t,s),this.B.size>this.S&&(this.B.clear(),this.K=this.K/1.1|0)),s};let Ce=0;function Me(e={}){function i(t){function i(t){const e=(t=t.data||t).id,i=e&&s.h[e];i&&(i(t.msg),delete s.h[e])}if(this.worker=t,this.h=fe(),this.worker)return r?this.worker.on("message",i):this.worker.onmessage=i,e.config?new Promise((function(t){s.h[++Ce]=function(){t(s),1e9<Ce&&(Ce=0)},s.worker.postMessage({id:Ce,task:"init",factory:n,options:e})})):(this.worker.postMessage({task:"init",factory:n,options:e}),this.priority=e.priority||4,this)}if(!this||this.constructor!==Me)return new Me(e);let n="undefined"!=typeof self?self._factory:"undefined"!=typeof window?window._factory:null;n&&(n=n.toString());const r="undefined"==typeof window,s=this,o=function(e,i,n){return i?"undefined"!=typeof module?new(require("worker_threads").Worker)(__dirname+"/worker/node.js"):import("worker_threads").then((function(t){return new t.Worker(void 0+"/node/node.mjs")})):e?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Te.toString()],{type:"text/javascript"}))):new window.Worker("string"==typeof n?n:(t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("index.js",document.baseURI).href).replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js"),{type:"module"})}(n,r,e.worker);return o.then?o.then((function(t){return i.call(s,t)})):i.call(this,o)}function Ne(t){Me.prototype[t]=function(){const e=this,i=[].slice.call(arguments);var n=i[i.length-1];let r;return"function"==typeof n&&(r=n,i.pop()),n=new Promise((function(n){"export"===t&&"function"==typeof i[0]&&(i[0]=null),e.h[++Ce]=n,e.worker.postMessage({task:t,id:Ce,args:i})})),r?(n.then(r),this):n}}function Ie(t,e=0){let i=[],n=[];e&&(e=25e4/e*5e3|0);for(const r of t.entries())n.push(r),n.length===e&&(i.push(n),n=[]);return n.length&&i.push(n),i}function De(t,e){e||(e=new Map);for(let i,n=0;n<t.length;n++)i=t[n],e.set(i[0],i[1]);return e}function Re(t,e=0){let i=[],n=[];e&&(e=25e4/e*1e3|0);for(const r of t.entries())n.push([r[0],Ie(r[1])[0]]),n.length===e&&(i.push(n),n=[]);return n.length&&i.push(n),i}function ze(t,e){e||(e=new Map);for(let i,n,r=0;r<t.length;r++)i=t[r],n=e.get(i[0]),e.set(i[0],De(i[1],n));return e}function Fe(t){let e=[],i=[];for(const n of t.keys())i.push(n),25e4===i.length&&(e.push(i),i=[]);return i.length&&e.push(i),e}function Le(t,e){e||(e=new Set);for(let i=0;i<t.length;i++)e.add(t[i]);return e}function Ue(t,e,i,n,r,s,o=0){const a=n&&n.constructor===Array;var l=a?n.shift():n;if(!l)return this.export(t,e,r,s+1);if((l=t((e?e+".":"")+(o+1)+"."+i,JSON.stringify(l)))&&l.then){const h=this;return l.then((function(){return Ue.call(h,t,e,i,a?n:null,r,s,o+1)}))}return Ue.call(this,t,e,i,a?n:null,r,s,o+1)}function Be(t,e){let i="";for(const n of t.entries()){t=n[0];const r=n[1];let s="";for(let t,i=0;i<r.length;i++){t=r[i]||[""];let n="";for(let i=0;i<t.length;i++)n+=(n?",":"")+("string"===e?'"'+t[i]+'"':t[i]);n="["+n+"]",s+=(s?",":"")+n}s='["'+t+'",['+s+"]]",i+=(i?",":"")+s}return i}function qe(t,e,i,n){let r=[];for(let s,o=0;o<t.index.length;o++)if(s=t.index[o],e>=s.length)e-=s.length;else{const o=(e=s[n?"splice":"slice"](e,i)).length;if(o&&(r=r.length?r.concat(e):e,i-=o,n&&(t.length-=o),!i))break;e=0}return r}function He(t){if(!this||this.constructor!==He)return new He(t);this.index=t?[t]:[],this.length=t?t.length:0;const e=this;return new Proxy([],{get:(t,i)=>"length"===i?e.length:"push"===i?function(t){e.index[e.index.length-1].push(t),e.length++}:"pop"===i?function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()}:"indexOf"===i?function(t){let i=0;for(let n,r,s=0;s<e.index.length;s++){if(n=e.index[s],r=n.indexOf(t),0<=r)return i+r;i+=n.length}return-1}:"includes"===i?function(t){for(let i=0;i<e.index.length;i++)if(e.index[i].includes(t))return!0;return!1}:"slice"===i?function(t,i){return qe(e,t||0,i||e.length,!1)}:"splice"===i?function(t,i){return qe(e,t||0,i||e.length,!0)}:"constructor"===i?Array:"symbol"!=typeof i?(t=e.index[i/2**31|0])&&t[i]:void 0,set:(t,i,n)=>(t=i/2**31|0,(e.index[t]||(e.index[t]=[]))[i]=n,e.length++,!0)})}function Ve(t=8){if(!this||this.constructor!==Ve)return new Ve(t);this.index=fe(),this.h=[],this.size=0,32<t?(this.B=Je,this.A=BigInt(t)):(this.B=Ge,this.A=t)}function We(t=8){if(!this||this.constructor!==We)return new We(t);this.index=fe(),this.h=[],this.size=0,32<t?(this.B=Je,this.A=BigInt(t)):(this.B=Ge,this.A=t)}function Ge(t){let e=2**this.A-1;if("number"==typeof t)return t&e;let i=0,n=this.A+1;for(let r=0;r<t.length;r++)i=(i*n^t.charCodeAt(r))&e;return 32===this.A?i+2**31:i}function Je(t){let e=BigInt(2)**this.A-BigInt(1);var i=typeof t;if("bigint"===i)return t&e;if("number"===i)return BigInt(t)&e;i=BigInt(0);let n=this.A+BigInt(1);for(let r=0;r<t.length;r++)i=(i*n^BigInt(t.charCodeAt(r)))&e;return i}function Ke(t,e,i,n,r,s){if(t=t[r],n===i.length-1)e[r]=s||t;else if(t)if(t.constructor===Array)for(e=e[r]=Array(t.length),r=0;r<t.length;r++)Ke(t,e,i,n,r);else e=e[r]||(e[r]=fe()),r=i[++n],Ke(t,e,i,n,r)}function Ze(t,e,i,n,r,s,o,a){if(t=t[o])if(n===e.length-1){if(t.constructor===Array){if(i[n]){for(e=0;e<t.length;e++)r.add(s,t[e],!0,!0);return}t=t.join(" ")}r.add(s,t,a,!0)}else if(t.constructor===Array)for(o=0;o<t.length;o++)Ze(t,e,i,n,r,s,o,a);else o=e[++n],Ze(t,e,i,n,r,s,o,a);else r.db&&r.remove(s)}function Qe(t,e,i,n,r,s,o){const a=t.length;let l,h,c=[];l=fe();for(let u,f,d,p,g=0;g<e;g++)for(let e=0;e<a;e++)if(d=t[e],g<d.length&&(u=d[g]))for(let t=0;t<u.length;t++){if(f=u[t],(h=l[f])?l[f]++:(h=0,l[f]=1),p=c[h]||(c[h]=[]),!o){let t=g+(e||!r?0:s||0);p=p[t]||(p[t]=[])}if(p.push(f),o&&i&&h===a-1&&p.length-n===i)return n?p.slice(n):p}if(t=c.length)if(r)c=1<c.length?Xe(c,i,n,o,s):(c=c[0]).length>i||n?c.slice(n,i+n):c;else{if(t<a)return[];if(c=c[t-1],i||n)if(o)(c.length>i||n)&&(c=c.slice(n,i+n));else{r=[];for(let t,e=0;e<c.length;e++)if(t=c[e],t.length>n)n-=t.length;else if((t.length>i||n)&&(t=t.slice(n,i+n),i-=t.length,n&&(n-=t.length)),r.push(t),!i)break;c=1<r.length?[].concat.apply([],r):r[0]}}return c}function Xe(t,e,i,n,r){const s=[],o=fe();let a;var l=t.length;let h;if(n){for(r=l-1;0<=r;r--)if(h=(n=t[r])&&n.length)for(l=0;l<h;l++)if(a=n[l],!o[a])if(o[a]=1,i)i--;else if(s.push(a),s.length===e)return s}else for(let c,u=l-1,f=0;0<=u;u--){c=t[u];for(let t=0;t<c.length;t++)if(h=(n=c[t])&&n.length)for(let c=0;c<h;c++)if(a=n[c],!o[a])if(o[a]=1,i)i--;else{let i=(t+(u<l-1&&r||0))/(u+1)|0;if((s[i]||(s[i]=[])).push(a),++f===e)return s}}return s}function Ye(t,e,i){const n=fe(),r=[];for(let t,i=0;i<e.length;i++){t=e[i];for(let e=0;e<t.length;e++)n[t[e]]=1}if(i)for(let e,i=0;i<t.length;i++)e=t[i],n[e]&&(r.push(e),n[e]=0);else for(let i,s,o=0;o<t.result.length;o++)for(i=t.result[o],e=0;e<i.length;e++)s=i[e],n[s]&&((r[o]||(r[o]=[])).push(s),n[s]=0);return r}function ti(t,e,i,n){if(!t.length)return t;if(1===t.length)return t=t[0],t=i||t.length>e?e?t.slice(i,i+e):t.slice(i):t,n?fi.call(this,t):t;let r=[];for(let s,o,a=0;a<t.length;a++)if((s=t[a])&&(o=s.length)){if(i){if(i>=o){i-=o;continue}i<o&&(s=e?s.slice(i,i+e):s.slice(i),o=s.length,i=0)}if(o>e&&(s=s.slice(0,e),o=e),!r.length&&o>=e)return n?fi.call(this,s):s;if(r.push(s),!(e-=o))break}return r=1<r.length?[].concat.apply([],r):r[0],n?fi.call(this,r):r}function ei(t,e,i){var n=i[0];if(n.then)return Promise.all(i).then((function(i){return t[e].apply(t,i)}));if(n[0]&&n[0].index)return t[e].apply(t,n);n=[];let r,s,o,a=[],l=0,h=0;for(let c,u=0;u<i.length;u++)if(c=i[u]){let i;if(c.constructor===li)i=c.result;else if(c.constructor===Array)i=c;else if(l=c.limit||0,h=c.offset||0,o=c.suggest,s=c.resolve,r=c.enrich&&s,c.index)c.resolve=!1,i=c.index.search(c).result,c.resolve=s;else if(c.and)i=t.and(c.and);else if(c.or)i=t.or(c.or);else if(c.xor)i=t.xor(c.xor);else{if(!c.not)continue;i=t.not(c.not)}if(i.then)a.push(i);else if(i.length)n[u]=i;else if(!o&&("and"===e||"xor"===e)){n=[];break}}return{O:n,P:a,limit:l,offset:h,enrich:r,resolve:s,suggest:o}}function ii(t,e,i,n,r,s){if(e.length){const o=this;return Promise.all(e).then((function(e){t=[];for(let i,n=0;n<e.length;n++)(i=e[n]).length&&(t[n]=i);return ii.call(o,t,[],i,n,r,s)}))}return t.length&&(this.result.length&&t.push(this.result),2>t.length?this.result=t[0]:(this.result=Xe(t,i,n,!1,this.h),n=0)),s?this.resolve(i,n,r):this}function ni(t,e,i,n,r,s,o){if(e.length){const a=this;return Promise.all(e).then((function(e){t=[];for(let i,n=0;n<e.length;n++)(i=e[n]).length&&(t[n]=i);return ni.call(a,t,[],i,n,r,s,o)}))}if(t.length)if(this.result.length&&t.unshift(this.result),2>t.length)this.result=t[0];else{if(e=function(t){let e=0;for(let i,n=0;n<t.length;n++)(i=t[n])&&e<i.length&&(e=i.length);return e}(t))return this.result=Qe(t,e,i,n,o,this.h,s),s?r?fi.call(this.index,this.result):this.result:this;this.result=[]}else o||(this.result=t);return s?this.resolve(i,n,r):this}function ri(t,e,i,n,r,s,o){if(e.length){const a=this;return Promise.all(e).then((function(e){t=[];for(let i,n=0;n<e.length;n++)(i=e[n]).length&&(t[n]=i);return ri.call(a,t,[],i,n,r,s,o)}))}if(t.length){if(this.result.length&&t.unshift(this.result),!(2>t.length))return this.result=si.call(this,t,i,n,s,this.h),s?r?fi.call(this.index,this.result):this.result:this;this.result=t[0]}else o||(this.result=t);return s?this.resolve(i,n,r):this}function si(t,e,i,n,r){const s=[],o=fe();let a=0;for(let e,i=0;i<t.length;i++)if(e=t[i]){a<e.length&&(a=e.length);for(let t,i=0;i<e.length;i++)if(t=e[i])for(let e,i=0;i<t.length;i++)e=t[i],o[e]=o[e]?2:1}for(let l,h=0,c=0;h<a;h++)for(let a,u=0;u<t.length;u++)if((a=t[u])&&(l=a[h]))for(let t,a=0;a<l.length;a++)if(t=l[a],1===o[t])if(i)i--;else if(n){if(s.push(t),s.length===e)return s}else{const i=h+(u?r:0);if(s[i]||(s[i]=[]),s[i].push(t),++c===e)return s}return s}function oi(t,e,i,n,r,s,o){if(e.length){const a=this;return Promise.all(e).then((function(e){t=[];for(let i,n=0;n<e.length;n++)(i=e[n]).length&&(t[n]=i);return oi.call(a,t,[],i,n,r,s,o)}))}if(t.length&&this.result.length)this.result=ai.call(this,t,i,n,s);else if(s)return this.resolve(i,n,r);return s?r?fi.call(this.index,this.result):this.result:this}function ai(t,e,i,n){const r=[];t=new Set(t.flat().flat());for(let s,o=0,a=0;o<this.result.length;o++)if(s=this.result[o])for(let l,h=0;h<s.length;h++)if(l=s[h],!t.has(l))if(i)i--;else if(n){if(r.push(l),r.length===e)return r}else if(r[o]||(r[o]=[]),r[o].push(l),++a===e)return r;return r}function li(t){return this&&this.constructor===li?t&&t.index?(t.resolve=!1,this.index=t.index,this.h=t.boost||0,this.result=t.index.search(t).result,this):(this.index=null,this.result=t||[],void(this.h=0)):new li(t)}function hi(t,e,i,n,r){let s,o,a;"string"==typeof r?(s=r,r=""):s=r.template,o=s.indexOf("$1"),a=s.substring(o+2),o=s.substring(0,o);let l=r&&r.boundary,h=!r||!1!==r.clip,c=r&&r.merge&&a&&o&&new RegExp(a+" "+o,"g");var u=0;if("object"==typeof(r=r&&r.ellipsis)){var f=r.template;u=f.length-2,r=r.pattern}let d,p;"string"!=typeof r&&(r=!1===r?"":"..."),u&&(r=f.replace("$1",r)),f=r.length-u,"object"==typeof l&&(d=l.before,0===d&&(d=-1),p=l.after,0===p&&(p=-1),l=l.total||9e5),u=new Map;for(let M,N,I,D=0;D<e.length;D++){let R;if(n)R=e,I=n;else{var g=e[D];if(I=g.field,!I)continue;R=g.result}N=i.get(I),M=N.encoder,"string"!=typeof(g=u.get(M))&&(g=M.encode(t),u.set(M,g));for(let t=0;t<R.length;t++){var m=R[t].doc;if(!m)continue;if(!(m=ge(m,I)))continue;var y=m.trim().split(/\s+/);if(!y.length)continue;m="";var b=[];let e=[];for(var v=-1,_=-1,w=0,x=0;x<y.length;x++){var k=y[x],S=M.encode(k);let t;if((S=1<S.length?S.join(" "):S[0])&&k){for(var $=k.length,P=(M.split?k.replace(M.split,""):k).length-S.length,A="",T=0,j=0;j<g.length;j++){var E=g[j];if(E){var O=E.length;O+=P,T&&O<=T||-1<(E=S.indexOf(E))&&(A=(E?k.substring(0,E):"")+o+k.substring(E,E+O)+a+(E+O<$?k.substring(E+O):""),T=O,t=!0)}}A&&(l&&(0>v&&(v=m.length+(m?1:0)),_=m.length+(m?1:0)+A.length,w+=$,e.push(b.length),b.push({match:A})),m+=(m?" ":"")+A)}if(t){if(l&&w>=l)break}else m+=(m?" ":"")+(k=y[x]),l&&b.push({text:k})}if(w=e.length*(s.length-2),d||p||l&&m.length-w>l)if(x=_-v,0<d&&(x+=d),0<p&&(x+=p),x<=(w=l+w-2*f))y=d?v-(0<d?d:0):v-((w-x)/2|0),b=p?_+(0<p?p:0):y+w,h||(0<y&&" "!==m.charAt(y)&&" "!==m.charAt(y-1)&&(0>(y=m.indexOf(" ",y))&&(y=0)),b<m.length&&" "!==m.charAt(b-1)&&" "!==m.charAt(b)&&((b=m.lastIndexOf(" ",b))<_?b=_:++b)),m=(y?r:"")+m.substring(y,b)+(b<m.length?r:"");else{for(_=[],v={},w={},x={},k={},S={},A=P=$=0,j=T=1;;){var C=void 0;for(let t,i=0;i<e.length;i++){if(t=e[i],A)if(P!==A){if(x[i+1])continue;if(t+=A,v[t]){$-=f,w[i+1]=1,x[i+1]=1;continue}if(t>=b.length-1){if(t>=b.length){x[i+1]=1,t>=y.length&&(w[i+1]=1);continue}$-=f}if(m=b[t].text,O=p&&S[i]){if(!(0<O)){x[i+1]=1;continue}if(m.length>O){if(x[i+1]=1,!h)continue;m=m.substring(0,O)}(O-=m.length)||(O=-1),S[i]=O}if($+m.length+1<=l)m=" "+m,_[i]+=m;else{if(!h){x[i+1]=1;continue}0<(C=l-$-1)&&(m=" "+m.substring(0,C),_[i]+=m),x[i+1]=1}}else{if(x[i])continue;if(t-=P,v[t]){$-=f,x[i]=1,w[i]=1;continue}if(0>=t){if(0>t){x[i]=1,w[i]=1;continue}$-=f}if(m=b[t].text,O=d&&k[i]){if(!(0<O)){x[i]=1;continue}if(m.length>O){if(x[i]=1,!h)continue;m=m.substring(m.length-O)}(O-=m.length)||(O=-1),k[i]=O}if($+m.length+1<=l)m+=" ",_[i]=m+_[i];else{if(!h){x[i]=1;continue}0<=(C=m.length+1-(l-$))&&C<m.length&&(m=m.substring(C)+" ",_[i]=m+_[i]),x[i]=1}}else{let e;if(m=b[t].match,d&&(k[i]=d),p&&(S[i]=p),i&&$++,t?!i&&f&&($+=f):(w[i]=1,x[i]=1),t>=y.length-1||t<b.length-1&&b[t+1].match?e=1:f&&($+=f),$-=s.length-2,i&&!($+m.length<=l)){C=T=j=w[i]=0;break}_[i]=m,e&&(w[i+1]=1,x[i+1]=1)}$+=m.length,C=v[t]=1}if(C)P===A?A++:P++;else{if(P===A?T=0:j=0,!T&&!j)break;T?A=++P:A++}}m="";for(let t,e=0;e<_.length;e++)t=(e&&w[e]?" ":(e&&!r?" ":"")+r)+_[e],m+=t;r&&!w[_.length]&&(m+=r)}c&&(m=m.replace(c," ")),R[t].highlight=m}if(n)break}return e}function ci(t){const e=[],i=fe();for(let n,r,s=0;s<t.length;s++){n=t[s],r=n.result;for(let t,s,o,a=0;a<r.length;a++)s=r[a],"object"!=typeof s&&(s={id:s}),t=s.id,(o=i[t])?o.push(n.field):(s.field=i[t]=[n.field],e.push(s))}return e}function ui(t,e,i,n,r){return(t=this.tag.get(t))?(e=(t=t&&t.get(e))&&t.length-n)&&0<e?((e>i||n)&&(t=t.slice(n,n+i)),r&&(t=fi.call(this,t)),t):void 0:[]}function fi(t){if(!this||!this.store)return t;const e=Array(t.length);for(let i,n=0;n<t.length;n++)i=t[n],e[n]={id:i,doc:this.store.get(i)};return e}function di(t){if(!this||this.constructor!==di)return new di(t);const e=t.document||t.doc||t;let i,n;if(this.F=[],this.field=[],this.J=[],this.key=(i=e.key||e.id)&&gi(i,this.J)||"id",(n=t.keystore||0)&&(this.keystore=n),this.fastupdate=!!t.fastupdate,this.reg=!this.fastupdate||t.worker||t.db?n?new We(n):new Set:n?new Ve(n):new Map,this.C=(i=e.store||null)&&i&&!0!==i&&[],this.store=i&&(n?new Ve(n):new Map),this.cache=(i=t.cache||null)&&new yi(i),t.cache=!1,this.worker=t.worker||!1,this.priority=t.priority||4,this.index=pi.call(this,t,e),this.tag=null,(i=e.tag)&&("string"==typeof i&&(i=[i]),i.length)){this.tag=new Map,this.D=[],this.R=[];for(let t,e,n=0;n<i.length;n++){if(t=i[n],e=t.field||t,!e)throw Error("The tag field from the document descriptor is undefined.");t.custom?this.D[n]=t.custom:(this.D[n]=gi(e,this.J),t.filter&&("string"==typeof this.D[n]&&(this.D[n]=new String(this.D[n])),this.D[n].I=t.filter)),this.R[n]=e,this.tag.set(e,new Map)}}if(this.worker){this.fastupdate=!1;const t=[];for(const e of this.index.values())e.then&&t.push(e);if(t.length){const e=this;return Promise.all(t).then((function(i){const n=new Map;let r=0;for(const o of e.index.entries()){const a=o[0];var s=o[1];if(s.then){s=t[r].encoder||{};let o=n.get(s);o||(o=s.encode?s:new we(s),n.set(s,o)),(s=i[r]).encoder=o,e.index.set(a,s),r++}}return e}))}}else t.db&&(this.fastupdate=!1,this.mount(t.db))}function pi(t,e){const i=new Map;let n=e.index||e.field||e;de(n)&&(n=[n]);for(let e,r,s=0;s<n.length;s++){if(e=n[s],de(e)||(r=e,e=e.field),r=pe(r)?Object.assign({},t,r):t,this.worker){const t=new Me(r);t.encoder=r.encoder,i.set(e,t)}this.worker||i.set(e,new Mi(r,this.reg)),r.custom?this.F[s]=r.custom:(this.F[s]=gi(e,this.J),r.filter&&("string"==typeof this.F[s]&&(this.F[s]=new String(this.F[s])),this.F[s].I=r.filter)),this.field[s]=e}if(this.C){de(t=e.store)&&(t=[t]);for(let e,i,n=0;n<t.length;n++)e=t[n],i=e.field||e,e.custom?(this.C[n]=e.custom,e.custom.V=i):(this.C[n]=gi(i,this.J),e.filter&&("string"==typeof this.C[n]&&(this.C[n]=new String(this.C[n])),this.C[n].I=e.filter))}return i}function gi(t,e){const i=t.split(":");let n=0;for(let r=0;r<i.length;r++)"]"===(t=i[r])[t.length-1]&&(t=t.substring(0,t.length-2))&&(e[n]=!0),t&&(i[n++]=t);return n<i.length&&(i.length=n),1<n?i:i[0]}function mi(t,e,i){const n=("object"==typeof t?""+t.query:t).toLowerCase();this.cache||(this.cache=new yi);let r=this.cache.get(n);if(!r){if(r=this.search(t,e,i),r.then){const t=this;r.then((function(e){return t.cache.set(n,e),e}))}this.cache.set(n,r)}return r}function yi(t){this.limit=t&&!0!==t?t:1e3,this.cache=new Map,this.h=""}Ne("add"),Ne("append"),Ne("search"),Ne("update"),Ne("remove"),Ne("clear"),Ne("export"),Ne("import"),je(Me.prototype),He.prototype.clear=function(){this.index.length=0},He.prototype.destroy=function(){this.proxy=this.index=null},He.prototype.push=function(){},Ve.prototype.get=function(t){const e=this.index[this.B(t)];return e&&e.get(t)},Ve.prototype.set=function(t,e){var i=this.B(t);let n=this.index[i];n?(i=n.size,n.set(t,e),(i-=n.size)&&this.size++):(this.index[i]=n=new Map([[t,e]]),this.h.push(n),this.size++)},We.prototype.add=function(t){var e=this.B(t);let i=this.index[e];i?(e=i.size,i.add(t),(e-=i.size)&&this.size++):(this.index[e]=i=new Set([t]),this.h.push(i),this.size++)},(ce=Ve.prototype).has=We.prototype.has=function(t){const e=this.index[this.B(t)];return e&&e.has(t)},ce.delete=We.prototype.delete=function(t){const e=this.index[this.B(t)];e&&e.delete(t)&&this.size--},ce.clear=We.prototype.clear=function(){this.index=fe(),this.h=[],this.size=0},ce.values=We.prototype.values=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].values())yield e},ce.keys=We.prototype.keys=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].keys())yield e},ce.entries=We.prototype.entries=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].entries())yield e},di.prototype.add=function(t,e,i){if(pe(t)&&(t=ge(e=t,this.key)),e&&(t||0===t)){if(!i&&this.reg.has(t))return this.update(t,e);for(let s,o=0;o<this.field.length;o++){s=this.F[o];var n=this.index.get(this.field[o]);if("function"==typeof s){var r=s(e);r&&n.add(t,r,!1,!0)}else(!(r=s.I)||r(e))&&(s.constructor===String?s=[""+s]:de(s)&&(s=[s]),Ze(e,s,this.J,0,n,t,s[0],i))}if(this.tag)for(n=0;n<this.D.length;n++){var s=this.D[n];r=this.tag.get(this.R[n]);let a=fe();if("function"==typeof s){if(!(s=s(e)))continue}else{var o=s.I;if(o&&!o(e))continue;s.constructor===String&&(s=""+s),s=ge(e,s)}if(r&&s){de(s)&&(s=[s]);for(let e,n,l=0;l<s.length;l++)if(e=s[l],!a[e]&&(a[e]=1,(o=r.get(e))?n=o:r.set(e,n=[]),!i||!n.includes(t))){if(n.length===2**31-1){if(o=new He(n),this.fastupdate)for(let t of this.reg.values())t.includes(n)&&(t[t.indexOf(n)]=o);r.set(e,n=o)}n.push(t),this.fastupdate&&((o=this.reg.get(t))?o.push(n):this.reg.set(t,[n]))}}}if(this.store&&(!i||!this.store.has(t))){let n;if(this.C){n=fe();for(let t,r=0;r<this.C.length;r++){if(t=this.C[r],(i=t.I)&&!i(e))continue;let s;if("function"==typeof t){if(s=t(e),!s)continue;t=[t.V]}else if(de(t)||t.constructor===String){n[t]=e[t];continue}Ke(e,n,t,0,t[0],s)}}this.store.set(t,n||e)}this.worker&&(this.fastupdate||this.reg.add(t))}return this},li.prototype.or=function(){const{O:t,P:e,limit:i,offset:n,enrich:r,resolve:s}=ei(this,"or",arguments);return ii.call(this,t,e,i,n,r,s)},li.prototype.and=function(){let t,e,i,n,r=this.result.length;if(!r){const s=arguments[0];s&&(r=!!s.suggest,n=s.resolve,t=s.limit,e=s.offset,i=s.enrich&&n)}if(r){const{O:t,P:e,limit:i,offset:n,enrich:r,resolve:s,suggest:o}=ei(this,"and",arguments);return ni.call(this,t,e,i,n,r,s,o)}return n?this.resolve(t,e,i):this},li.prototype.xor=function(){const{O:t,P:e,limit:i,offset:n,enrich:r,resolve:s,suggest:o}=ei(this,"xor",arguments);return ri.call(this,t,e,i,n,r,s,o)},li.prototype.not=function(){const{O:t,P:e,limit:i,offset:n,enrich:r,resolve:s,suggest:o}=ei(this,"not",arguments);return oi.call(this,t,e,i,n,r,s,o)},li.prototype.limit=function(t){if(this.result.length){const e=[];for(let i,n=0;n<this.result.length;n++)if(i=this.result[n]){if(!(i.length<=t)){e[n]=i.slice(0,t);break}if(e[n]=i,!(t-=i.length))break}this.result=e}return this},li.prototype.offset=function(t){if(this.result.length){const e=[];for(let i,n=0;n<this.result.length;n++)(i=this.result[n])&&(i.length<=t?t-=i.length:(e[n]=i.slice(t),t=0));this.result=e}return this},li.prototype.boost=function(t){return this.h+=t,this},li.prototype.resolve=function(t,e,i){const n=this.result,r=this.index;return this.result=this.index=null,n.length?("object"==typeof t&&(i=t.enrich,e=t.offset,t=t.limit),ti.call(r,n,t||100,e,i)):n},di.prototype.search=function(t,e,i,n){i||(!e&&pe(t)?(i=t,t=""):pe(e)&&(i=e,e=0));let r=[];var s=[];let o,a,l,h,c=0;var u=!0;let f,d;if(i){i.constructor===Array&&(i={index:i}),t=i.query||t,o=i.pluck,a=i.merge,l=o||i.field||(l=i.index)&&(l.index?null:l),h=this.tag&&i.tag;var p=i.suggest;(u=!1!==i.resolve)||o||!(l=l||this.field)||(de(l)?o=l:(l.constructor===Array&&1===l.length&&(l=l[0]),o=l.field||l.index));var g=(f=u&&this.store&&i.highlight)||u&&this.store&&i.enrich;e=i.limit||e;var m=i.offset||0;if(e||(e=100),h&&(!this.db||!n)){h.constructor!==Array&&(h=[h]);var y=[];for(let t,e=0;e<h.length;e++)if(t=h[e],t.field&&t.tag){var b=t.tag;if(b.constructor===Array)for(var v=0;v<b.length;v++)y.push(t.field,b[v]);else y.push(t.field,b)}else{b=Object.keys(t);for(let e,i,n=0;n<b.length;n++)if(e=b[n],i=t[e],i.constructor===Array)for(v=0;v<i.length;v++)y.push(e,i[v]);else y.push(e,i)}if(h=y,!t){if(u=[],y.length)for(s=0;s<y.length;s+=2){if(this.db){if(!(p=this.index.get(y[s])))continue;u.push(p=p.db.tag(y[s+1],e,m,g))}else p=ui.call(this,y[s],y[s+1],e,m,g);r.push({field:y[s],tag:y[s+1],result:p})}return u.length?Promise.all(u).then((function(t){for(let e=0;e<t.length;e++)r[e].result=t[e];return r})):r}}l&&l.constructor!==Array&&(l=[l])}l||(l=this.field),y=!n&&(this.worker||this.db)&&[];for(let o,a,_,w=0;w<l.length;w++){if(a=l[w],this.db&&this.tag&&!this.F[w])continue;let x;if(de(a)||(x=a,a=x.field,t=x.query||t,e=x.limit||e,m=x.offset||m,p=x.suggest||p,f=(g=this.store&&(x.enrich||g))&&(i.highlight||f)),n)o=n[w];else{if(b=x||i,v=this.index.get(a),h&&(this.db&&(b.tag=h,d=v.db.support_tag_search,b.field=l),d||(b.enrich=!1)),y){y[w]=v.search(t,e,b),b&&g&&(b.enrich=g);continue}o=v.search(t,e,b),b&&g&&(b.enrich=g)}if(_=o&&(u?o.length:o.result.length),h&&_){if(b=[],v=0,this.db&&n){if(!d)for(let t=l.length;t<n.length;t++){let e=n[t];if(e&&e.length)v++,b.push(e);else if(!p)return u?r:new li(r)}}else for(let t,e,i=0;i<h.length;i+=2){if(t=this.tag.get(h[i]),!t){if(p)continue;return u?r:new li(r)}if(e=(t=t&&t.get(h[i+1]))&&t.length)v++,b.push(t);else if(!p)return u?r:new li(r)}if(v){if(o=Ye(o,b,u),_=o.length,!_&&!p)return u?o:new li(o);v--}}if(_)s[c]=a,r.push(o),c++;else if(1===l.length)return u?r:new li(r)}if(y){if(this.db&&h&&h.length&&!d)for(g=0;g<h.length;g+=2){if(!(s=this.index.get(h[g]))){if(p)continue;return u?r:new li(r)}y.push(s.db.tag(h[g+1],e,m,!1))}const n=this;return Promise.all(y).then((function(r){return r.length?n.search(t,e,i,r):r}))}if(!c)return u?r:new li(r);if(o&&(!g||!this.store))return r[0];for(y=[],m=0;m<s.length;m++){if(p=r[m],g&&p.length&&void 0===p[0].doc&&(this.db?y.push(p=this.index.get(this.field[0]).db.enrich(p)):p=fi.call(this,p)),o)return u?f?hi(t,p,this.index,o,f):p:new li(p);r[m]={field:s[m],result:p}}if(g&&this.db&&y.length){const e=this;return Promise.all(y).then((function(i){for(let t=0;t<i.length;t++)r[t].result=i[t];return a?ci(r):f?hi(t,r,e.index,o,f):r}))}return a?ci(r):f?hi(t,r,this.index,o,f):r},(ce=di.prototype).mount=function(t){let e=this.field;if(this.tag)for(let t,n=0;n<this.R.length;n++){t=this.R[n];var i=void 0;this.index.set(t,i=new Mi({},this.reg)),e===this.field&&(e=e.slice(0)),e.push(t),i.tag=this.tag.get(t)}i=[];const n={db:t.db,type:t.type,fastupdate:t.fastupdate};for(let r,s,o=0;o<e.length;o++){n.field=s=e[o],r=this.index.get(s);const a=new t.constructor(t.id,n);a.id=t.id,i[o]=a.mount(r),r.document=!0,o?r.bypass=!0:r.store=this.store}const r=this;return this.db=Promise.all(i).then((function(){r.db=!0}))},ce.commit=async function(t,e){const i=[];for(const n of this.index.values())i.push(n.commit(t,e));await Promise.all(i),this.reg.clear()},ce.destroy=function(){const t=[];for(const e of this.index.values())t.push(e.destroy());return Promise.all(t)},ce.append=function(t,e){return this.add(t,e,!0)},ce.update=function(t,e){return this.remove(t).add(t,e)},ce.remove=function(t){for(var e of(pe(t)&&(t=ge(t,this.key)),this.index.values()))e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let i of this.tag.values())for(let n of i){e=n[0];const r=n[1],s=r.indexOf(t);-1<s&&(1<r.length?r.splice(s,1):i.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this},ce.clear=function(){const t=[];for(const e of this.index.values()){const i=e.clear();i.then&&t.push(i)}if(this.tag)for(const t of this.tag.values())t.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this},ce.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)},ce.cleanup=function(){for(const t of this.index.values())t.cleanup();return this},ce.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then((function(t){return t[0]&&t[0].doc||null})):this.store.get(t)||null},ce.set=function(t,e){return"object"==typeof t&&(t=ge(e=t,this.key)),this.store.set(t,e),this},ce.searchCache=mi,ce.export=function(t,e,i=0,n=0){if(i<this.field.length){const r=this.field[i];if((e=this.index.get(r).export(t,r,i,n=1))&&e.then){const n=this;return e.then((function(){return n.export(t,r,i+1)}))}return this.export(t,r,i+1)}let r,s;switch(n){case 0:r="reg",s=Fe(this.reg),e=null;break;case 1:r="tag",s=this.tag&&Re(this.tag,this.reg.size),e=null;break;case 2:r="doc",s=this.store&&Ie(this.store),e=null;break;default:return}return Ue.call(this,t,e,r,s,i,n)},ce.import=function(t,e){var i=t.split(".");"json"===i[i.length-1]&&i.pop();const n=2<i.length?i[0]:"";if(i=2<i.length?i[2]:i[1],this.worker&&n)return this.index.get(n).import(t);if(e){if("string"==typeof e&&(e=JSON.parse(e)),n)return this.index.get(n).import(i,e);switch(i){case"reg":this.fastupdate=!1,this.reg=Le(e,this.reg);for(let t,e=0;e<this.field.length;e++)t=this.index.get(this.field[e]),t.fastupdate=!1,t.reg=this.reg;if(this.worker){e=[];for(const i of this.index.values())e.push(i.import(t));return Promise.all(e)}break;case"tag":this.tag=ze(e,this.tag);break;case"doc":this.store=De(e,this.store)}}},je(di.prototype),yi.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)},yi.prototype.get=function(t){const e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e},yi.prototype.remove=function(t){for(const e of this.cache){const i=e[0];e[1].includes(t)&&this.cache.delete(i)}},yi.prototype.clear=function(){this.cache.clear(),this.h=""};const bi={normalize:!1,numeric:!1,dedupe:!1},vi={},_i=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),wi=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),xi=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],ki={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,"ß":2,d:3,t:3,l:4,m:5,n:5,r:6};var Si={Exact:bi,Default:vi,Normalize:vi,LatinBalance:{mapper:_i},LatinAdvanced:{mapper:_i,matcher:wi,replacer:xi},LatinExtra:{mapper:_i,replacer:xi.concat([/(?!^)[aeo]/g,""]),matcher:wi},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let i=0;i<t.length;i++){var e=t[i];let n=e.charAt(0),r=ki[n];for(let t,i=1;i<e.length&&(t=e.charAt(i),"h"===t||"w"===t||!(t=ki[t])||t===r||(n+=t,r=t,4!==n.length));i++);t[i]=n}}},CJK:{split:""},LatinExact:bi,LatinDefault:vi,LatinSimple:vi};function $i(t,e){let i=0;var n=void 0===e;if(t.constructor===Array){for(let r,s,o=0;o<t.length;o++)if((r=t[o])&&r.length)if(n)i++;else{if(s=r.indexOf(e),0<=s){1<r.length?(r.splice(s,1),i++):delete t[o];break}i++}}else for(let r of t.entries()){n=r[0];const s=$i(r[1],e);s?i+=s:t.delete(n)}return i}Mi.prototype.remove=function(t,e){const i=this.reg.size&&(this.fastupdate?this.reg.get(t):this.reg.has(t));if(i){if(this.fastupdate){for(let e,n=0;n<i.length;n++)if(e=i[n])if(2>e.length)e.pop();else{const n=e.indexOf(t);n===i.length-1?e.pop():e.splice(n,1)}}else $i(this.map,t),this.depth&&$i(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.T&&Ni(this)),this.cache&&this.cache.remove(t),this};const Pi={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};function Ai(t,e,i,n,r,s,o){let a,l=o?t.ctx:t.map;if((!e[i]||o&&!(a=e[i])[o])&&(o?((e=a||(e[i]=fe()))[o]=1,(a=l.get(o))?l=a:l.set(o,l=new Map)):e[i]=1,(a=l.get(i))?l=a:l.set(i,l=a=[]),l=l[n]||(l[n]=[]),!s||!l.includes(r))){if(l.length===2**31-1){if(e=new He(l),t.fastupdate)for(let i of t.reg.values())i.includes(l)&&(i[i.indexOf(l)]=e);a[n]=l=e}l.push(r),t.fastupdate&&((n=t.reg.get(r))?n.push(l):t.reg.set(r,[l]))}}function Ti(t,e,i,n,r){return i&&1<t?e+(n||0)<=t?i+(r||0):(t-1)/(e+(n||0))*(i+(r||0))+1|0:0}function ji(t,e,i,n,r,s,o){let a=t.length,l=t;if(1<a)l=Qe(t,e,i,n,r,s,o);else if(1===a)return o?ti.call(null,t[0],i,n):new li(t[0]);return o?l:new li(l)}function Ei(t,e,i,n,r,s,o){return t=Ci(this,t,e,i,n,r,s,o),this.db?t.then((function(t){return r?t||[]:new li(t)})):t&&t.length?r?ti.call(this,t,i,n):new li(t):r?[]:new li}function Oi(t,e,i,n){let r=[];if(t&&t.length){if(t.length<=n)return void e.push(t);for(let e,i=0;i<n;i++)(e=t[i])&&(r[i]=e);if(r.length)return void e.push(r)}if(!i)return r}function Ci(t,e,i,n,r,s,o,a){let l;return i&&(l=t.bidirectional&&e>i)&&(l=i,i=e,e=l),t.db?t.db.get(e,i,n,r,s,o,a):t=i?(t=t.ctx.get(i))&&t.get(e):t.map.get(e)}function Mi(t,e){if(!this||this.constructor!==Mi)return new Mi(t);if(t){var i=de(t)?t:t.preset;i&&(t=Object.assign({},Pi[i],t))}else t={};const n=!0===(i=t.context)?{depth:1}:i||{},r=de(t.encoder)?Si[t.encoder]:t.encode||t.encoder||{};this.encoder=r.encode?r:"object"==typeof r?new we(r):{encode:r},this.resolution=t.resolution||9,this.tokenize=i=(i=t.tokenize)&&"default"!==i&&"exact"!==i&&i||"strict",this.depth="strict"===i&&n.depth||0,this.bidirectional=!1!==n.bidirectional,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(i=t.keystore||0)&&(this.keystore=i),this.map=i?new Ve(i):new Map,this.ctx=i?new Ve(i):new Map,this.reg=e||(this.fastupdate?i?new Ve(i):new Map:i?new We(i):new Set),this.U=n.resolution||3,this.rtl=r.rtl||t.rtl||!1,this.cache=(i=t.cache||null)&&new yi(i),this.resolve=!1!==t.resolve,(i=t.db)&&(this.db=this.mount(i)),this.T=!1!==t.commit,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}function Ni(t){t.commit_timer||(t.commit_timer=setTimeout((function(){t.commit_timer=null,t.db.commit(t,void 0,void 0)}),1))}Mi.prototype.add=function(t,e,i,n){if(e&&(t||0===t)){if(!n&&!i&&this.reg.has(t))return this.update(t,e);n=this.depth;const h=(e=this.encoder.encode(e,!n)).length;if(h){const c=fe(),u=fe(),f=this.resolution;for(let d=0;d<h;d++){let p=e[this.rtl?h-1-d:d];var r=p.length;if(r&&(n||!u[p])){var s=this.score?this.score(e,p,d,null,0):Ti(f,h,d),o="";switch(this.tokenize){case"full":if(2<r){for(let n,l=0;l<r;l++)for(s=r;s>l;s--){o=p.substring(l,s),n=this.rtl?r-1-l:l;var a=this.score?this.score(e,p,d,o,n):Ti(f,h,d,r,n);Ai(this,u,o,a,t,i)}break}case"bidirectional":case"reverse":if(1<r){for(a=r-1;0<a;a--){o=p[this.rtl?r-1-a:a]+o;var l=this.score?this.score(e,p,d,o,a):Ti(f,h,d,r,a);Ai(this,u,o,l,t,i)}o=""}case"forward":if(1<r){for(a=0;a<r;a++)Ai(this,u,o+=p[this.rtl?r-1-a:a],s,t,i);break}default:if(Ai(this,u,p,s,t,i),n&&1<h&&d<h-1)for(r=fe(),o=this.U,s=p,a=Math.min(n+1,this.rtl?d+1:h-d),r[s]=1,l=1;l<a;l++)if((p=e[this.rtl?h-1-d-l:d+l])&&!r[p]){r[p]=1;const n=this.score?this.score(e,s,d,p,l-1):Ti(o+(h/2>o?0:1),h,d,a-1,l-1),u=this.bidirectional&&p>s;Ai(this,c,u?s:p,n,t,i,u?p:s)}}}}this.fastupdate||this.reg.add(t)}else e=""}return this.db&&(e||this.commit_task.push({del:t}),this.T&&Ni(this)),this},Mi.prototype.search=function(t,e,i){i||(e||"object"!=typeof t?"object"==typeof e&&(i=e,e=0):(i=t,t=""));let n,r,s,o,a,l,h,c,u=[],f=0;i?(t=i.query||t,e=i.limit||e,f=i.offset||0,r=i.context,s=i.suggest,c=(o=!1!==i.resolve)&&i.enrich,l=i.boost,h=i.resolution,a=this.db&&i.tag):o=this.resolve,r=this.depth&&!1!==r;let d=this.encoder.encode(t,!r);if(n=d.length,e=e||(o?100:0),1===n)return Ei.call(this,d[0],"",e,f,o,c,a);if(2===n&&r&&!s)return Ei.call(this,d[1],d[0],e,f,o,c,a);let p,g=fe(),m=0;if(r&&(p=d[0],m=1),h||0===h||(h=p?this.U:this.resolution),this.db){if(this.db.search&&!1!==(t=this.db.search(this,d,e,f,s,o,c,a)))return t;const i=this;return async function(){for(let t,e;m<n;m++){if((e=d[m])&&!g[e]){if(g[e]=1,t=await Ci(i,e,p,0,0,!1,!1),t=Oi(t,u,s,h)){u=t;break}p&&(s&&t&&u.length||(p=e))}s&&p&&m===n-1&&!u.length&&(h=i.resolution,p="",m=-1,g=fe())}return ji(u,h,e,f,s,l,o)}()}for(let t,e;m<n;m++){if((e=d[m])&&!g[e]){if(g[e]=1,t=Ci(this,e,p,0,0,!1,!1),t=Oi(t,u,s,h)){u=t;break}p&&(s&&t&&u.length||(p=e))}s&&p&&m===n-1&&!u.length&&(h=this.resolution,p="",m=-1,g=fe())}return ji(u,h,e,f,s,l,o)},(ce=Mi.prototype).mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)},ce.commit=function(t,e){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this,t,e)},ce.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()},ce.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db&&(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[{clear:!0}]),this},ce.append=function(t,e){return this.add(t,e,!0)},ce.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)},ce.update=function(t,e){const i=this,n=this.remove(t);return n&&n.then?n.then((()=>i.add(t,e))):this.add(t,e)},ce.cleanup=function(){return this.fastupdate?($i(this.map),this.depth&&$i(this.ctx),this):this},ce.searchCache=mi,ce.export=function(t,e,i=0,n=0){let r,s;switch(n){case 0:r="reg",s=Fe(this.reg);break;case 1:r="cfg",s=null;break;case 2:r="map",s=Ie(this.map,this.reg.size);break;case 3:r="ctx",s=Re(this.ctx,this.reg.size);break;default:return}return Ue.call(this,t,e,r,s,i,n)},ce.import=function(t,e){if(e)switch("string"==typeof e&&(e=JSON.parse(e)),t=t.split("."),"json"===t[t.length-1]&&t.pop(),3===t.length&&t.shift(),t=1<t.length?t[1]:t[0],t){case"reg":this.fastupdate=!1,this.reg=Le(e,this.reg);break;case"map":this.map=De(e,this.map);break;case"ctx":this.ctx=ze(e,this.ctx)}},ce.serialize=function(t=!0){let e="",i="",n="";if(this.reg.size){let t;for(var r of this.reg.keys())t||(t=typeof r),e+=(e?",":"")+("string"===t?'"'+r+'"':r);e="index.reg=new Set(["+e+"]);",i=Be(this.map,t),i="index.map=new Map(["+i+"]);";for(const e of this.ctx.entries()){r=e[0];let i=Be(e[1],t);i="new Map(["+i+"])",i='["'+r+'",'+i+"]",n+=(n?",":"")+i}n="index.ctx=new Map(["+n+"]);"}return t?"function inject(index){"+e+i+n+"}":e+i+n},je(Mi.prototype);const Ii="undefined"!=typeof window&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Di=["map","ctx","tag","reg","cfg"],Ri=fe();function zi(t,e,i){const n=t.value;let r,s=0;for(let t,o=0;o<n.length;o++){if(t=i?n:n[o]){for(let i,s,a=0;a<e.length;a++)if(s=e[a],i=t.indexOf(s),0<=i){if(r=1,!(1<t.length)){n[o]=[];break}t.splice(i,1)}s+=t.length}if(i)break}s?r&&t.update(n):t.delete(),t.continue()}function Fi(t,e){return new Promise(((i,n)=>{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,i(this.result)},t.onerror=t.onblocked=n,t=null}))}ce=function t(e,i={}){if(!this||this.constructor!==t)return new t(e,i);"object"==typeof e&&(i=e,e=e.name),e||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(e?":"+e.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=i.field?i.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=i.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}.prototype,ce.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())},ce.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist(),Ri[t.id]||(Ri[t.id]=[]),Ri[t.id].push(t.field);const e=Ii.open(t.id,1);return e.onupgradeneeded=function(){const e=t.db=this.result;for(let i,n=0;n<Di.length;n++){i=Di[n];for(let n,r=0;r<Ri[t.id].length;r++)n=Ri[t.id][r],e.objectStoreNames.contains(i+("reg"!==i&&n?":"+n:""))||e.createObjectStore(i+("reg"!==i&&n?":"+n:""))}},t.db=Fi(e,(function(e){t.db=e,t.db.onversionchange=function(){t.close()}}))},ce.close=function(){this.db&&this.db.close(),this.db=null},ce.destroy=function(){return Fi(Ii.deleteDatabase(this.id))},ce.clear=function(){const t=[];for(let e,i=0;i<Di.length;i++){e=Di[i];for(let i,n=0;n<Ri[this.id].length;n++)i=Ri[this.id][n],t.push(e+("reg"!==e&&i?":"+i:""))}const e=this.db.transaction(t,"readwrite");for(let i=0;i<t.length;i++)e.objectStore(t[i]).clear();return Fi(e)},ce.get=function(t,e,i=0,n=0,r=!0,s=!1){t=this.db.transaction((e?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((e?"ctx":"map")+(this.field?":"+this.field:"")).get(e?e+":"+t:t);const o=this;return Fi(t).then((function(t){let e=[];if(!t||!t.length)return e;if(r){if(!i&&!n&&1===t.length)return t[0];for(let r,s=0;s<t.length;s++)if((r=t[s])&&r.length){if(n>=r.length){n-=r.length;continue}const t=i?n+Math.min(r.length-n,i):r.length;for(let i=n;i<t;i++)e.push(r[i]);if(n=0,e.length===i)break}return s?o.enrich(e):e}return t}))},ce.tag=function(t,e=0,i=0,n=!1){t=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(t);const r=this;return Fi(t).then((function(t){return!t||!t.length||i>=t.length?[]:e||i?(t=t.slice(i,i+e),n?r.enrich(t):t):t}))},ce.enrich=function(t){"object"!=typeof t&&(t=[t]);const e=this.db.transaction("reg","readonly").objectStore("reg"),i=[];for(let n=0;n<t.length;n++)i[n]=Fi(e.get(t[n]));return Promise.all(i).then((function(e){for(let i=0;i<e.length;i++)e[i]={id:t[i],doc:e[i]?JSON.parse(e[i]):null};return e}))},ce.has=function(t){return Fi(t=this.db.transaction("reg","readonly").objectStore("reg").getKey(t)).then((function(t){return!!t}))},ce.search=null,ce.info=function(){},ce.transaction=function(t,e,i){t+="reg"!==t&&this.field?":"+this.field:"";let n=this.h[t+":"+e];if(n)return i.call(this,n);let r=this.db.transaction(t,e);this.h[t+":"+e]=n=r.objectStore(t);const s=i.call(this,n);return this.h[t+":"+e]=null,Fi(r).finally((function(){return r=n=null,s}))},ce.commit=async function(t,e,i){if(e)await this.clear(),t.commit_task=[];else{let n=t.commit_task;t.commit_task=[];for(let t,i=0;i<n.length;i++){if(t=n[i],t.clear){await this.clear(),e=!0;break}n[i]=t.del}e||(i||(n=n.concat(function(t){const e=[];for(const i of t.keys())e.push(i);return e}(t.reg))),n.length&&await this.remove(n))}t.reg.size&&(await this.transaction("map","readwrite",(function(i){for(const n of t.map){const t=n[0],r=n[1];r.length&&(e?i.put(r,t):i.get(t).onsuccess=function(){let e=this.result;var n;if(e&&e.length){const t=Math.max(e.length,r.length);for(let i,s,o=0;o<t;o++)if((s=r[o])&&s.length){if((i=e[o])&&i.length)for(n=0;n<s.length;n++)i.push(s[n]);else e[o]=s;n=1}}else e=r,n=1;n&&i.put(e,t)})}})),await this.transaction("ctx","readwrite",(function(i){for(const n of t.ctx){const t=n[0],r=n[1];for(const n of r){const r=n[0],s=n[1];s.length&&(e?i.put(s,t+":"+r):i.get(t+":"+r).onsuccess=function(){let e=this.result;var n;if(e&&e.length){const t=Math.max(e.length,s.length);for(let i,r,o=0;o<t;o++)if((r=s[o])&&r.length){if((i=e[o])&&i.length)for(n=0;n<r.length;n++)i.push(r[n]);else e[o]=r;n=1}}else e=s,n=1;n&&i.put(e,t+":"+r)})}}})),t.store?await this.transaction("reg","readwrite",(function(e){for(const i of t.store){const t=i[0],n=i[1];e.put("object"==typeof n?JSON.stringify(n):1,t)}})):t.bypass||await this.transaction("reg","readwrite",(function(e){for(const i of t.reg.keys())e.put(1,i)})),t.tag&&await this.transaction("tag","readwrite",(function(e){for(const i of t.tag){const t=i[0],n=i[1];n.length&&(e.get(t).onsuccess=function(){let i=this.result;i=i&&i.length?i.concat(n):n,e.put(i,t)})}})),t.map.clear(),t.ctx.clear(),t.tag&&t.tag.clear(),t.store&&t.store.clear(),t.document||t.reg.clear())},ce.remove=function(t){return"object"!=typeof t&&(t=[t]),Promise.all([this.transaction("map","readwrite",(function(e){e.openCursor().onsuccess=function(){const e=this.result;e&&zi(e,t)}})),this.transaction("ctx","readwrite",(function(e){e.openCursor().onsuccess=function(){const e=this.result;e&&zi(e,t)}})),this.transaction("tag","readwrite",(function(e){e.openCursor().onsuccess=function(){const e=this.result;e&&zi(e,t,!0)}})),this.transaction("reg","readwrite",(function(e){for(let i=0;i<t.length;i++)e.delete(t[i])}))])};const Li=Si,Ui=di;async function Bi(){const t=new Ui({document:{id:"id",store:!0,index:[{field:"name",tokenize:"forward",encoder:Li.LatinBalance,priority:9},{field:"comment",tokenize:"forward",encoder:Li.LatinBalance}],tag:[]}}),e=`${document.documentElement.dataset.base}assets/oxide`,i=await async function(t){const e=await fetch(t),i=(await e.blob()).stream().pipeThrough(new DecompressionStream("deflate"));return await new Response(i).json()}(`${e}/search-index.defalte`);for(const[e,n]of Object.entries(i))t.import(e,n);return t}document.addEventListener("DOMContentLoaded",(async()=>{const t=document.querySelector("rustdoc-search .search-form"),e=document.querySelector("rustdoc-search .search-input"),i=document.getElementById("main-content"),n=document.getElementById("alternative-display");let r,s;t.addEventListener("submit",(t=>{t.preventDefault(),t.stopPropagation()})),e.addEventListener("input",function(t,e,i){var n=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return jt(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),zt(t,e,{leading:n,maxWait:e,trailing:r})}((async t=>{var e;r||(r=Bi());const o=null===(e=t.target.value)||void 0===e?void 0:e.trim(),[a,l]=o?[i,n]:[n,i];a.classList.add("hidden"),l.classList.remove("hidden"),null==s||s.abort(),s=new AbortController;const h=s.signal;await async function(t,e,i){if(e.aborted||!t.length)return;const n=await i.search({query:t,enrich:!0,merge:!0});if(e.aborted)return;const r=document.querySelector('meta[name="rustdoc-vars"]'),s=document.querySelector("oxide-search-results#search");s.loading=!1,s.project=r.dataset.currentCrate,s.query=t,s.items=n.map((t=>t.doc)).filter((t=>null!==t))}(o,h,await r)}),300))})),(()=>{var t,s,o,a;let l,h,c,u,f,d,p=[ut("oxide-search-results")],g=[],m=ht,y=[],b=[],v=[],_=[],w=[],x=[],k=[],S=[];var $=h=class extends m{get loading(){return n(this,t,"f")}set loading(e){r(this,t,e,"f")}get project(){return n(this,s,"f")}set project(t){r(this,s,t,"f")}get query(){return n(this,o,"f")}set query(t){r(this,o,t,"f")}get items(){return n(this,a,"f")}set items(t){r(this,a,t,"f")}createRenderRoot(){return this}render(){if(this.loading)return V`
|
|
47
|
+
var ce;function ue(t,e,i){const n=typeof i,r=typeof t;if("undefined"!==n){if("undefined"!==r){if(i){if("function"===r&&n===r)return function(e){return t(i(e))};if((e=t.constructor)===i.constructor){if(e===Array)return i.concat(t);if(e===Map){var s=new Map(i);for(var o of t)s.set(o[0],o[1]);return s}if(e===Set){for(s of(o=new Set(i),t.values()))o.add(s);return o}}}return t}return i}return"undefined"===r?e:t}function fe(){return Object.create(null)}function de(t){return"string"==typeof t}function pe(t){return"object"==typeof t}function ge(t,e){if(de(e))t=t[e];else for(let i=0;t&&i<e.length;i++)t=t[e[i]];return t}(()=>{let t,e=le,i=[],n=[];(class r extends e{static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(e[Symbol.metadata]??null):void 0;t=[Ut],oe(null,null,t,{kind:"field",name:"_project",static:!1,private:!1,access:{has:t=>"_project"in t,get:t=>t._project,set:(t,e)=>{t._project=e}},metadata:r},i,n),r&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})}type="reference";name;typeArguments;get reflection(){if("number"==typeof this._target)return this._project?.getReflectionById(this._target);const t=this._project?.getReflectionsFromSymbolId(this._target);if(!t?.length)return;const e=this.preferValues?Xt.ValueReferenceTarget:Xt.TypeReferenceTarget;return t.find((t=>t.kindOf(e)))||t.find((t=>t.kindOf(~e)))}highlightedProperties;get symbolId(){if(!this.reflection&&"object"==typeof this._target)return this._target}isIntentionallyBroken(){return!("object"!=typeof this._target||!this._project?.symbolIdHasBeenRemoved(this._target))||(-1===this._target||this.refersToTypeParameter)}toDeclarationReference(){return{resolutionStart:"global",moduleSource:this.package,symbolReference:{path:this.qualifiedName.split(".").map((t=>({path:t,navigation:"."})))}}}qualifiedName;package;externalUrl;refersToTypeParameter=!1;preferValues=!1;_target;_project=ae(this,i,void 0);constructor(t,e,i,r){super(),ae(this,n),this.name=t,this._target="number"==typeof e?e:"variant"in e?e.id:e,this._project=i,this.qualifiedName=r}static createUnresolvedReference(t,e,i,n){return new r(t,e,i,n)}static createResolvedReference(t,e,i){return new r(t,e,i,t)}static createBrokenReference(t,e){return new r(t,-1,e,t)}getTypeString(){const t=this.reflection?this.reflection.name:this.name;let e="";return this.typeArguments&&this.typeArguments.length>0&&(e+="<",e+=this.typeArguments.map((t=>t.stringify(he.referenceTypeArgument))).join(", "),e+=">"),t+e}needsParenthesis(){return!1}toObject(t){let e;e="number"==typeof this._target?this._target:this._project?.symbolIdHasBeenRemoved(this._target)?-1:this.reflection?this.reflection.id:this._target.toObject();const i={type:this.type,target:e,typeArguments:t.toObjectsOptional(this.typeArguments),name:this.name,package:this.package,externalUrl:this.externalUrl};return this.name!==this.qualifiedName&&(i.qualifiedName=this.qualifiedName),this.refersToTypeParameter&&(i.refersToTypeParameter=!0),"number"!=typeof e&&this.preferValues&&(i.preferValues=!0),this.highlightedProperties&&(i.highlightedProperties=Object.fromEntries(Array.from(this.highlightedProperties.entries(),(([t,e])=>[t,Qt.serializeDisplayParts(e)])))),i}fromObject(t,e){if(this.typeArguments=t.reviveMany(e.typeArguments,(e=>t.constructType(e))),"number"==typeof e.target&&-1!==e.target?t.defer((i=>{const n=i.getReflectionById(t.oldIdToNewId[e.target]??-1);n?(this._project=i,this._target=n.id):t.logger.warn(qt.serialized_project_referenced_0_not_part_of_project(JSON.stringify(e.target)))})):-1===e.target?this._target=-1:(this._project=t.project,this._target=new Gt(e.target)),this.qualifiedName=e.qualifiedName??e.name,this.package=e.package,this.refersToTypeParameter=!!e.refersToTypeParameter,this.preferValues=!!e.preferValues,e.highlightedProperties){this.highlightedProperties=new Map;for(const[i,n]of Object.entries(e.highlightedProperties))this.highlightedProperties.set(i,Qt.deserializeDisplayParts(t,n))}}})})();const me=/[^\p{L}\p{N}]+/u,ye=/(\d{3})/g,be=/(\D)(\d{3})/g,ve=/(\d{3})(\D)/g,_e=/[\u0300-\u036f]/g;function we(t={}){if(!this||this.constructor!==we)return new we(...arguments);if(arguments.length)for(t=0;t<arguments.length;t++)this.assign(arguments[t]);else this.assign(t)}function xe(t){t.H=null,t.B.clear(),t.G.clear()}let ke,Se,$e,Pe,Ae;async function Te(t){var e=(t=t.data).task;const i=t.id;let n=t.args;if("init"===e)Se=t.options||{},(e=t.factory)?(Function("return "+e)()(self),ke=new self.FlexSearch.Index(Se),delete self.FlexSearch):ke=new Mi(Se),postMessage({id:i});else{let r;"export"===e&&(n[1]?(n[0]=Se.export,n[2]=0,n[3]=1):n=null),"import"===e?n[0]&&(t=await Se.import.call(ke,n[0]),ke.import(n[0],t)):(r=n&&ke[e].apply(ke,n))&&r.then&&(r=await r),postMessage("search"===e?{id:i,msg:r}:{id:i})}}function je(t){Oe.call(t,"add"),Oe.call(t,"append"),Oe.call(t,"search"),Oe.call(t,"update"),Oe.call(t,"remove")}function Ee(){$e=Ae=0}function Oe(t){this[t+"Async"]=function(){const e=arguments;var i=e[e.length-1];let n;if("function"==typeof i&&(n=i,delete e[e.length-1]),$e?Ae||(Ae=Date.now()-Pe>=this.priority*this.priority*3):($e=setTimeout(Ee,0),Pe=Date.now()),Ae){const i=this;return new Promise((n=>{setTimeout((function(){n(i[t+"Async"].apply(i,e))}),0)}))}const r=this[t].apply(this,e);return i=r.then?r:new Promise((t=>t(r))),n&&i.then(n),i}}(ce=we.prototype).assign=function(t){this.normalize=ue(t.normalize,!0,this.normalize);let e,i=t.include,n=i||t.exclude||t.split;if(n||""===n){if("object"==typeof n&&n.constructor!==RegExp){let t="";e=!i,i||(t+="\\p{Z}"),n.letter&&(t+="\\p{L}"),n.number&&(t+="\\p{N}",e=!!i),n.symbol&&(t+="\\p{S}"),n.punctuation&&(t+="\\p{P}"),n.control&&(t+="\\p{C}"),(n=n.char)&&(t+="object"==typeof n?n.join(""):n);try{this.split=new RegExp("["+(i?"^":"")+t+"]+","u")}catch(t){this.split=/\s+/}}else this.split=n,e=!1===n||2>"a1a".split(n).length;this.numeric=ue(t.numeric,e)}else{try{this.split=ue(this.split,me)}catch(t){this.split=/\s+/}this.numeric=ue(t.numeric,ue(this.numeric,!0))}if(this.prepare=ue(t.prepare,null,this.prepare),this.finalize=ue(t.finalize,null,this.finalize),n=t.filter,this.filter="function"==typeof n?n:ue(n&&new Set(n),null,this.filter),this.dedupe=ue(t.dedupe,!0,this.dedupe),this.matcher=ue((n=t.matcher)&&new Map(n),null,this.matcher),this.mapper=ue((n=t.mapper)&&new Map(n),null,this.mapper),this.stemmer=ue((n=t.stemmer)&&new Map(n),null,this.stemmer),this.replacer=ue(t.replacer,null,this.replacer),this.minlength=ue(t.minlength,1,this.minlength),this.maxlength=ue(t.maxlength,1024,this.maxlength),this.rtl=ue(t.rtl,!1,this.rtl),(this.cache=n=ue(t.cache,!0,this.cache))&&(this.H=null,this.S="number"==typeof n?n:2e5,this.B=new Map,this.G=new Map,this.L=this.K=128),this.h="",this.M=null,this.A="",this.N=null,this.matcher)for(const t of this.matcher.keys())this.h+=(this.h?"|":"")+t;if(this.stemmer)for(const t of this.stemmer.keys())this.A+=(this.A?"|":"")+t;return this},ce.addStemmer=function(t,e){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(t,e),this.A+=(this.A?"|":"")+t,this.N=null,this.cache&&xe(this),this},ce.addFilter=function(t){return"function"==typeof t?this.filter=t:(this.filter||(this.filter=new Set),this.filter.add(t)),this.cache&&xe(this),this},ce.addMapper=function(t,e){return"object"==typeof t?this.addReplacer(t,e):1<t.length?this.addMatcher(t,e):(this.mapper||(this.mapper=new Map),this.mapper.set(t,e),this.cache&&xe(this),this)},ce.addMatcher=function(t,e){return"object"==typeof t?this.addReplacer(t,e):2>t.length&&(this.dedupe||this.mapper)?this.addMapper(t,e):(this.matcher||(this.matcher=new Map),this.matcher.set(t,e),this.h+=(this.h?"|":"")+t,this.M=null,this.cache&&xe(this),this)},ce.addReplacer=function(t,e){return"string"==typeof t?this.addMatcher(t,e):(this.replacer||(this.replacer=[]),this.replacer.push(t,e),this.cache&&xe(this),this)},ce.encode=function(t,e){if(this.cache&&t.length<=this.K)if(this.H){if(this.B.has(t))return this.B.get(t)}else this.H=setTimeout(xe,50,this);this.normalize&&(t="function"==typeof this.normalize?this.normalize(t):_e?t.normalize("NFKD").replace(_e,"").toLowerCase():t.toLowerCase()),this.prepare&&(t=this.prepare(t)),this.numeric&&3<t.length&&(t=t.replace(be,"$1 $2").replace(ve,"$1 $2").replace(ye,"$1 "));const i=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let n,r,s=[],o=fe(),a=this.split||""===this.split?t.split(this.split):[t];for(let t,h,c=0;c<a.length;c++)if((t=h=a[c])&&!(t.length<this.minlength||t.length>this.maxlength)){if(e){if(o[t])continue;o[t]=1}else{if(n===t)continue;n=t}if(i)s.push(t);else if(!this.filter||("function"==typeof this.filter?this.filter(t):!this.filter.has(t))){if(this.cache&&t.length<=this.L)if(this.H){var l=this.G.get(t);if(l||""===l){l&&s.push(l);continue}}else this.H=setTimeout(xe,50,this);if(this.stemmer){let e;for(this.N||(this.N=new RegExp("(?!^)("+this.A+")$"));e!==t&&2<t.length;)e=t,t=t.replace(this.N,(t=>this.stemmer.get(t)))}if(t&&(this.mapper||this.dedupe&&1<t.length)){l="";for(let e,i,n=0,r="";n<t.length;n++)e=t.charAt(n),e===r&&this.dedupe||((i=this.mapper&&this.mapper.get(e))||""===i?i===r&&this.dedupe||!(r=i)||(l+=i):l+=r=e);t=l}if(this.matcher&&1<t.length&&(this.M||(this.M=new RegExp("("+this.h+")","g")),t=t.replace(this.M,(t=>this.matcher.get(t)))),t&&this.replacer)for(l=0;t&&l<this.replacer.length;l+=2)t=t.replace(this.replacer[l],this.replacer[l+1]);if(this.cache&&h.length<=this.L&&(this.G.set(h,t),this.G.size>this.S&&(this.G.clear(),this.L=this.L/1.1|0)),t){if(t!==h)if(e){if(o[t])continue;o[t]=1}else{if(r===t)continue;r=t}s.push(t)}}}return this.finalize&&(s=this.finalize(s)||s),this.cache&&t.length<=this.K&&(this.B.set(t,s),this.B.size>this.S&&(this.B.clear(),this.K=this.K/1.1|0)),s};let Ce=0;function Me(e={}){function i(t){function i(t){const e=(t=t.data||t).id,i=e&&s.h[e];i&&(i(t.msg),delete s.h[e])}if(this.worker=t,this.h=fe(),this.worker)return r?this.worker.on("message",i):this.worker.onmessage=i,e.config?new Promise((function(t){s.h[++Ce]=function(){t(s),1e9<Ce&&(Ce=0)},s.worker.postMessage({id:Ce,task:"init",factory:n,options:e})})):(this.worker.postMessage({task:"init",factory:n,options:e}),this.priority=e.priority||4,this)}if(!this||this.constructor!==Me)return new Me(e);let n="undefined"!=typeof self?self._factory:"undefined"!=typeof window?window._factory:null;n&&(n=n.toString());const r="undefined"==typeof window,s=this,o=function(e,i,n){return i?"undefined"!=typeof module?new(require("worker_threads").Worker)(__dirname+"/worker/node.js"):import("worker_threads").then((function(t){return new t.Worker(void 0+"/node/node.mjs")})):e?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Te.toString()],{type:"text/javascript"}))):new window.Worker("string"==typeof n?n:(t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("index.js",document.baseURI).href).replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js"),{type:"module"})}(n,r,e.worker);return o.then?o.then((function(t){return i.call(s,t)})):i.call(this,o)}function Ne(t){Me.prototype[t]=function(){const e=this,i=[].slice.call(arguments);var n=i[i.length-1];let r;return"function"==typeof n&&(r=n,i.pop()),n=new Promise((function(n){"export"===t&&"function"==typeof i[0]&&(i[0]=null),e.h[++Ce]=n,e.worker.postMessage({task:t,id:Ce,args:i})})),r?(n.then(r),this):n}}function Ie(t,e=0){let i=[],n=[];e&&(e=25e4/e*5e3|0);for(const r of t.entries())n.push(r),n.length===e&&(i.push(n),n=[]);return n.length&&i.push(n),i}function De(t,e){e||(e=new Map);for(let i,n=0;n<t.length;n++)i=t[n],e.set(i[0],i[1]);return e}function Re(t,e=0){let i=[],n=[];e&&(e=25e4/e*1e3|0);for(const r of t.entries())n.push([r[0],Ie(r[1])[0]]),n.length===e&&(i.push(n),n=[]);return n.length&&i.push(n),i}function ze(t,e){e||(e=new Map);for(let i,n,r=0;r<t.length;r++)i=t[r],n=e.get(i[0]),e.set(i[0],De(i[1],n));return e}function Fe(t){let e=[],i=[];for(const n of t.keys())i.push(n),25e4===i.length&&(e.push(i),i=[]);return i.length&&e.push(i),e}function Le(t,e){e||(e=new Set);for(let i=0;i<t.length;i++)e.add(t[i]);return e}function Ue(t,e,i,n,r,s,o=0){const a=n&&n.constructor===Array;var l=a?n.shift():n;if(!l)return this.export(t,e,r,s+1);if((l=t((e?e+".":"")+(o+1)+"."+i,JSON.stringify(l)))&&l.then){const h=this;return l.then((function(){return Ue.call(h,t,e,i,a?n:null,r,s,o+1)}))}return Ue.call(this,t,e,i,a?n:null,r,s,o+1)}function Be(t,e){let i="";for(const n of t.entries()){t=n[0];const r=n[1];let s="";for(let t,i=0;i<r.length;i++){t=r[i]||[""];let n="";for(let i=0;i<t.length;i++)n+=(n?",":"")+("string"===e?'"'+t[i]+'"':t[i]);n="["+n+"]",s+=(s?",":"")+n}s='["'+t+'",['+s+"]]",i+=(i?",":"")+s}return i}function qe(t,e,i,n){let r=[];for(let s,o=0;o<t.index.length;o++)if(s=t.index[o],e>=s.length)e-=s.length;else{const o=(e=s[n?"splice":"slice"](e,i)).length;if(o&&(r=r.length?r.concat(e):e,i-=o,n&&(t.length-=o),!i))break;e=0}return r}function He(t){if(!this||this.constructor!==He)return new He(t);this.index=t?[t]:[],this.length=t?t.length:0;const e=this;return new Proxy([],{get:(t,i)=>"length"===i?e.length:"push"===i?function(t){e.index[e.index.length-1].push(t),e.length++}:"pop"===i?function(){if(e.length)return e.length--,e.index[e.index.length-1].pop()}:"indexOf"===i?function(t){let i=0;for(let n,r,s=0;s<e.index.length;s++){if(n=e.index[s],r=n.indexOf(t),0<=r)return i+r;i+=n.length}return-1}:"includes"===i?function(t){for(let i=0;i<e.index.length;i++)if(e.index[i].includes(t))return!0;return!1}:"slice"===i?function(t,i){return qe(e,t||0,i||e.length,!1)}:"splice"===i?function(t,i){return qe(e,t||0,i||e.length,!0)}:"constructor"===i?Array:"symbol"!=typeof i?(t=e.index[i/2**31|0])&&t[i]:void 0,set:(t,i,n)=>(t=i/2**31|0,(e.index[t]||(e.index[t]=[]))[i]=n,e.length++,!0)})}function Ve(t=8){if(!this||this.constructor!==Ve)return new Ve(t);this.index=fe(),this.h=[],this.size=0,32<t?(this.B=Je,this.A=BigInt(t)):(this.B=Ge,this.A=t)}function We(t=8){if(!this||this.constructor!==We)return new We(t);this.index=fe(),this.h=[],this.size=0,32<t?(this.B=Je,this.A=BigInt(t)):(this.B=Ge,this.A=t)}function Ge(t){let e=2**this.A-1;if("number"==typeof t)return t&e;let i=0,n=this.A+1;for(let r=0;r<t.length;r++)i=(i*n^t.charCodeAt(r))&e;return 32===this.A?i+2**31:i}function Je(t){let e=BigInt(2)**this.A-BigInt(1);var i=typeof t;if("bigint"===i)return t&e;if("number"===i)return BigInt(t)&e;i=BigInt(0);let n=this.A+BigInt(1);for(let r=0;r<t.length;r++)i=(i*n^BigInt(t.charCodeAt(r)))&e;return i}function Ke(t,e,i,n,r,s){if(t=t[r],n===i.length-1)e[r]=s||t;else if(t)if(t.constructor===Array)for(e=e[r]=Array(t.length),r=0;r<t.length;r++)Ke(t,e,i,n,r);else e=e[r]||(e[r]=fe()),r=i[++n],Ke(t,e,i,n,r)}function Ze(t,e,i,n,r,s,o,a){if(t=t[o])if(n===e.length-1){if(t.constructor===Array){if(i[n]){for(e=0;e<t.length;e++)r.add(s,t[e],!0,!0);return}t=t.join(" ")}r.add(s,t,a,!0)}else if(t.constructor===Array)for(o=0;o<t.length;o++)Ze(t,e,i,n,r,s,o,a);else o=e[++n],Ze(t,e,i,n,r,s,o,a);else r.db&&r.remove(s)}function Qe(t,e,i,n,r,s,o){const a=t.length;let l,h,c=[];l=fe();for(let u,f,d,p,g=0;g<e;g++)for(let e=0;e<a;e++)if(d=t[e],g<d.length&&(u=d[g]))for(let t=0;t<u.length;t++){if(f=u[t],(h=l[f])?l[f]++:(h=0,l[f]=1),p=c[h]||(c[h]=[]),!o){let t=g+(e||!r?0:s||0);p=p[t]||(p[t]=[])}if(p.push(f),o&&i&&h===a-1&&p.length-n===i)return n?p.slice(n):p}if(t=c.length)if(r)c=1<c.length?Xe(c,i,n,o,s):(c=c[0]).length>i||n?c.slice(n,i+n):c;else{if(t<a)return[];if(c=c[t-1],i||n)if(o)(c.length>i||n)&&(c=c.slice(n,i+n));else{r=[];for(let t,e=0;e<c.length;e++)if(t=c[e],t.length>n)n-=t.length;else if((t.length>i||n)&&(t=t.slice(n,i+n),i-=t.length,n&&(n-=t.length)),r.push(t),!i)break;c=1<r.length?[].concat.apply([],r):r[0]}}return c}function Xe(t,e,i,n,r){const s=[],o=fe();let a;var l=t.length;let h;if(n){for(r=l-1;0<=r;r--)if(h=(n=t[r])&&n.length)for(l=0;l<h;l++)if(a=n[l],!o[a])if(o[a]=1,i)i--;else if(s.push(a),s.length===e)return s}else for(let c,u=l-1,f=0;0<=u;u--){c=t[u];for(let t=0;t<c.length;t++)if(h=(n=c[t])&&n.length)for(let c=0;c<h;c++)if(a=n[c],!o[a])if(o[a]=1,i)i--;else{let i=(t+(u<l-1&&r||0))/(u+1)|0;if((s[i]||(s[i]=[])).push(a),++f===e)return s}}return s}function Ye(t,e,i){const n=fe(),r=[];for(let t,i=0;i<e.length;i++){t=e[i];for(let e=0;e<t.length;e++)n[t[e]]=1}if(i)for(let e,i=0;i<t.length;i++)e=t[i],n[e]&&(r.push(e),n[e]=0);else for(let i,s,o=0;o<t.result.length;o++)for(i=t.result[o],e=0;e<i.length;e++)s=i[e],n[s]&&((r[o]||(r[o]=[])).push(s),n[s]=0);return r}function ti(t,e,i,n){if(!t.length)return t;if(1===t.length)return t=t[0],t=i||t.length>e?e?t.slice(i,i+e):t.slice(i):t,n?fi.call(this,t):t;let r=[];for(let s,o,a=0;a<t.length;a++)if((s=t[a])&&(o=s.length)){if(i){if(i>=o){i-=o;continue}i<o&&(s=e?s.slice(i,i+e):s.slice(i),o=s.length,i=0)}if(o>e&&(s=s.slice(0,e),o=e),!r.length&&o>=e)return n?fi.call(this,s):s;if(r.push(s),!(e-=o))break}return r=1<r.length?[].concat.apply([],r):r[0],n?fi.call(this,r):r}function ei(t,e,i){var n=i[0];if(n.then)return Promise.all(i).then((function(i){return t[e].apply(t,i)}));if(n[0]&&n[0].index)return t[e].apply(t,n);n=[];let r,s,o,a=[],l=0,h=0;for(let c,u=0;u<i.length;u++)if(c=i[u]){let i;if(c.constructor===li)i=c.result;else if(c.constructor===Array)i=c;else if(l=c.limit||0,h=c.offset||0,o=c.suggest,s=c.resolve,r=c.enrich&&s,c.index)c.resolve=!1,i=c.index.search(c).result,c.resolve=s;else if(c.and)i=t.and(c.and);else if(c.or)i=t.or(c.or);else if(c.xor)i=t.xor(c.xor);else{if(!c.not)continue;i=t.not(c.not)}if(i.then)a.push(i);else if(i.length)n[u]=i;else if(!o&&("and"===e||"xor"===e)){n=[];break}}return{O:n,P:a,limit:l,offset:h,enrich:r,resolve:s,suggest:o}}function ii(t,e,i,n,r,s){if(e.length){const o=this;return Promise.all(e).then((function(e){t=[];for(let i,n=0;n<e.length;n++)(i=e[n]).length&&(t[n]=i);return ii.call(o,t,[],i,n,r,s)}))}return t.length&&(this.result.length&&t.push(this.result),2>t.length?this.result=t[0]:(this.result=Xe(t,i,n,!1,this.h),n=0)),s?this.resolve(i,n,r):this}function ni(t,e,i,n,r,s,o){if(e.length){const a=this;return Promise.all(e).then((function(e){t=[];for(let i,n=0;n<e.length;n++)(i=e[n]).length&&(t[n]=i);return ni.call(a,t,[],i,n,r,s,o)}))}if(t.length)if(this.result.length&&t.unshift(this.result),2>t.length)this.result=t[0];else{if(e=function(t){let e=0;for(let i,n=0;n<t.length;n++)(i=t[n])&&e<i.length&&(e=i.length);return e}(t))return this.result=Qe(t,e,i,n,o,this.h,s),s?r?fi.call(this.index,this.result):this.result:this;this.result=[]}else o||(this.result=t);return s?this.resolve(i,n,r):this}function ri(t,e,i,n,r,s,o){if(e.length){const a=this;return Promise.all(e).then((function(e){t=[];for(let i,n=0;n<e.length;n++)(i=e[n]).length&&(t[n]=i);return ri.call(a,t,[],i,n,r,s,o)}))}if(t.length){if(this.result.length&&t.unshift(this.result),!(2>t.length))return this.result=si.call(this,t,i,n,s,this.h),s?r?fi.call(this.index,this.result):this.result:this;this.result=t[0]}else o||(this.result=t);return s?this.resolve(i,n,r):this}function si(t,e,i,n,r){const s=[],o=fe();let a=0;for(let e,i=0;i<t.length;i++)if(e=t[i]){a<e.length&&(a=e.length);for(let t,i=0;i<e.length;i++)if(t=e[i])for(let e,i=0;i<t.length;i++)e=t[i],o[e]=o[e]?2:1}for(let l,h=0,c=0;h<a;h++)for(let a,u=0;u<t.length;u++)if((a=t[u])&&(l=a[h]))for(let t,a=0;a<l.length;a++)if(t=l[a],1===o[t])if(i)i--;else if(n){if(s.push(t),s.length===e)return s}else{const i=h+(u?r:0);if(s[i]||(s[i]=[]),s[i].push(t),++c===e)return s}return s}function oi(t,e,i,n,r,s,o){if(e.length){const a=this;return Promise.all(e).then((function(e){t=[];for(let i,n=0;n<e.length;n++)(i=e[n]).length&&(t[n]=i);return oi.call(a,t,[],i,n,r,s,o)}))}if(t.length&&this.result.length)this.result=ai.call(this,t,i,n,s);else if(s)return this.resolve(i,n,r);return s?r?fi.call(this.index,this.result):this.result:this}function ai(t,e,i,n){const r=[];t=new Set(t.flat().flat());for(let s,o=0,a=0;o<this.result.length;o++)if(s=this.result[o])for(let l,h=0;h<s.length;h++)if(l=s[h],!t.has(l))if(i)i--;else if(n){if(r.push(l),r.length===e)return r}else if(r[o]||(r[o]=[]),r[o].push(l),++a===e)return r;return r}function li(t){return this&&this.constructor===li?t&&t.index?(t.resolve=!1,this.index=t.index,this.h=t.boost||0,this.result=t.index.search(t).result,this):(this.index=null,this.result=t||[],void(this.h=0)):new li(t)}function hi(t,e,i,n,r){let s,o,a;"string"==typeof r?(s=r,r=""):s=r.template,o=s.indexOf("$1"),a=s.substring(o+2),o=s.substring(0,o);let l=r&&r.boundary,h=!r||!1!==r.clip,c=r&&r.merge&&a&&o&&new RegExp(a+" "+o,"g");var u=0;if("object"==typeof(r=r&&r.ellipsis)){var f=r.template;u=f.length-2,r=r.pattern}let d,p;"string"!=typeof r&&(r=!1===r?"":"..."),u&&(r=f.replace("$1",r)),f=r.length-u,"object"==typeof l&&(d=l.before,0===d&&(d=-1),p=l.after,0===p&&(p=-1),l=l.total||9e5),u=new Map;for(let M,N,I,D=0;D<e.length;D++){let R;if(n)R=e,I=n;else{var g=e[D];if(I=g.field,!I)continue;R=g.result}N=i.get(I),M=N.encoder,"string"!=typeof(g=u.get(M))&&(g=M.encode(t),u.set(M,g));for(let t=0;t<R.length;t++){var m=R[t].doc;if(!m)continue;if(!(m=ge(m,I)))continue;var y=m.trim().split(/\s+/);if(!y.length)continue;m="";var b=[];let e=[];for(var v=-1,_=-1,w=0,x=0;x<y.length;x++){var k=y[x],S=M.encode(k);let t;if((S=1<S.length?S.join(" "):S[0])&&k){for(var $=k.length,P=(M.split?k.replace(M.split,""):k).length-S.length,A="",T=0,j=0;j<g.length;j++){var E=g[j];if(E){var O=E.length;O+=P,T&&O<=T||-1<(E=S.indexOf(E))&&(A=(E?k.substring(0,E):"")+o+k.substring(E,E+O)+a+(E+O<$?k.substring(E+O):""),T=O,t=!0)}}A&&(l&&(0>v&&(v=m.length+(m?1:0)),_=m.length+(m?1:0)+A.length,w+=$,e.push(b.length),b.push({match:A})),m+=(m?" ":"")+A)}if(t){if(l&&w>=l)break}else m+=(m?" ":"")+(k=y[x]),l&&b.push({text:k})}if(w=e.length*(s.length-2),d||p||l&&m.length-w>l)if(x=_-v,0<d&&(x+=d),0<p&&(x+=p),x<=(w=l+w-2*f))y=d?v-(0<d?d:0):v-((w-x)/2|0),b=p?_+(0<p?p:0):y+w,h||(0<y&&" "!==m.charAt(y)&&" "!==m.charAt(y-1)&&(0>(y=m.indexOf(" ",y))&&(y=0)),b<m.length&&" "!==m.charAt(b-1)&&" "!==m.charAt(b)&&((b=m.lastIndexOf(" ",b))<_?b=_:++b)),m=(y?r:"")+m.substring(y,b)+(b<m.length?r:"");else{for(_=[],v={},w={},x={},k={},S={},A=P=$=0,j=T=1;;){var C=void 0;for(let t,i=0;i<e.length;i++){if(t=e[i],A)if(P!==A){if(x[i+1])continue;if(t+=A,v[t]){$-=f,w[i+1]=1,x[i+1]=1;continue}if(t>=b.length-1){if(t>=b.length){x[i+1]=1,t>=y.length&&(w[i+1]=1);continue}$-=f}if(m=b[t].text,O=p&&S[i]){if(!(0<O)){x[i+1]=1;continue}if(m.length>O){if(x[i+1]=1,!h)continue;m=m.substring(0,O)}(O-=m.length)||(O=-1),S[i]=O}if($+m.length+1<=l)m=" "+m,_[i]+=m;else{if(!h){x[i+1]=1;continue}0<(C=l-$-1)&&(m=" "+m.substring(0,C),_[i]+=m),x[i+1]=1}}else{if(x[i])continue;if(t-=P,v[t]){$-=f,x[i]=1,w[i]=1;continue}if(0>=t){if(0>t){x[i]=1,w[i]=1;continue}$-=f}if(m=b[t].text,O=d&&k[i]){if(!(0<O)){x[i]=1;continue}if(m.length>O){if(x[i]=1,!h)continue;m=m.substring(m.length-O)}(O-=m.length)||(O=-1),k[i]=O}if($+m.length+1<=l)m+=" ",_[i]=m+_[i];else{if(!h){x[i]=1;continue}0<=(C=m.length+1-(l-$))&&C<m.length&&(m=m.substring(C)+" ",_[i]=m+_[i]),x[i]=1}}else{let e;if(m=b[t].match,d&&(k[i]=d),p&&(S[i]=p),i&&$++,t?!i&&f&&($+=f):(w[i]=1,x[i]=1),t>=y.length-1||t<b.length-1&&b[t+1].match?e=1:f&&($+=f),$-=s.length-2,i&&!($+m.length<=l)){C=T=j=w[i]=0;break}_[i]=m,e&&(w[i+1]=1,x[i+1]=1)}$+=m.length,C=v[t]=1}if(C)P===A?A++:P++;else{if(P===A?T=0:j=0,!T&&!j)break;T?A=++P:A++}}m="";for(let t,e=0;e<_.length;e++)t=(e&&w[e]?" ":(e&&!r?" ":"")+r)+_[e],m+=t;r&&!w[_.length]&&(m+=r)}c&&(m=m.replace(c," ")),R[t].highlight=m}if(n)break}return e}function ci(t){const e=[],i=fe();for(let n,r,s=0;s<t.length;s++){n=t[s],r=n.result;for(let t,s,o,a=0;a<r.length;a++)s=r[a],"object"!=typeof s&&(s={id:s}),t=s.id,(o=i[t])?o.push(n.field):(s.field=i[t]=[n.field],e.push(s))}return e}function ui(t,e,i,n,r){return(t=this.tag.get(t))?(e=(t=t&&t.get(e))&&t.length-n)&&0<e?((e>i||n)&&(t=t.slice(n,n+i)),r&&(t=fi.call(this,t)),t):void 0:[]}function fi(t){if(!this||!this.store)return t;const e=Array(t.length);for(let i,n=0;n<t.length;n++)i=t[n],e[n]={id:i,doc:this.store.get(i)};return e}function di(t){if(!this||this.constructor!==di)return new di(t);const e=t.document||t.doc||t;let i,n;if(this.F=[],this.field=[],this.J=[],this.key=(i=e.key||e.id)&&gi(i,this.J)||"id",(n=t.keystore||0)&&(this.keystore=n),this.fastupdate=!!t.fastupdate,this.reg=!this.fastupdate||t.worker||t.db?n?new We(n):new Set:n?new Ve(n):new Map,this.C=(i=e.store||null)&&i&&!0!==i&&[],this.store=i&&(n?new Ve(n):new Map),this.cache=(i=t.cache||null)&&new yi(i),t.cache=!1,this.worker=t.worker||!1,this.priority=t.priority||4,this.index=pi.call(this,t,e),this.tag=null,(i=e.tag)&&("string"==typeof i&&(i=[i]),i.length)){this.tag=new Map,this.D=[],this.R=[];for(let t,e,n=0;n<i.length;n++){if(t=i[n],e=t.field||t,!e)throw Error("The tag field from the document descriptor is undefined.");t.custom?this.D[n]=t.custom:(this.D[n]=gi(e,this.J),t.filter&&("string"==typeof this.D[n]&&(this.D[n]=new String(this.D[n])),this.D[n].I=t.filter)),this.R[n]=e,this.tag.set(e,new Map)}}if(this.worker){this.fastupdate=!1;const t=[];for(const e of this.index.values())e.then&&t.push(e);if(t.length){const e=this;return Promise.all(t).then((function(i){const n=new Map;let r=0;for(const o of e.index.entries()){const a=o[0];var s=o[1];if(s.then){s=t[r].encoder||{};let o=n.get(s);o||(o=s.encode?s:new we(s),n.set(s,o)),(s=i[r]).encoder=o,e.index.set(a,s),r++}}return e}))}}else t.db&&(this.fastupdate=!1,this.mount(t.db))}function pi(t,e){const i=new Map;let n=e.index||e.field||e;de(n)&&(n=[n]);for(let e,r,s=0;s<n.length;s++){if(e=n[s],de(e)||(r=e,e=e.field),r=pe(r)?Object.assign({},t,r):t,this.worker){const t=new Me(r);t.encoder=r.encoder,i.set(e,t)}this.worker||i.set(e,new Mi(r,this.reg)),r.custom?this.F[s]=r.custom:(this.F[s]=gi(e,this.J),r.filter&&("string"==typeof this.F[s]&&(this.F[s]=new String(this.F[s])),this.F[s].I=r.filter)),this.field[s]=e}if(this.C){de(t=e.store)&&(t=[t]);for(let e,i,n=0;n<t.length;n++)e=t[n],i=e.field||e,e.custom?(this.C[n]=e.custom,e.custom.V=i):(this.C[n]=gi(i,this.J),e.filter&&("string"==typeof this.C[n]&&(this.C[n]=new String(this.C[n])),this.C[n].I=e.filter))}return i}function gi(t,e){const i=t.split(":");let n=0;for(let r=0;r<i.length;r++)"]"===(t=i[r])[t.length-1]&&(t=t.substring(0,t.length-2))&&(e[n]=!0),t&&(i[n++]=t);return n<i.length&&(i.length=n),1<n?i:i[0]}function mi(t,e,i){const n=("object"==typeof t?""+t.query:t).toLowerCase();this.cache||(this.cache=new yi);let r=this.cache.get(n);if(!r){if(r=this.search(t,e,i),r.then){const t=this;r.then((function(e){return t.cache.set(n,e),e}))}this.cache.set(n,r)}return r}function yi(t){this.limit=t&&!0!==t?t:1e3,this.cache=new Map,this.h=""}Ne("add"),Ne("append"),Ne("search"),Ne("update"),Ne("remove"),Ne("clear"),Ne("export"),Ne("import"),je(Me.prototype),He.prototype.clear=function(){this.index.length=0},He.prototype.destroy=function(){this.proxy=this.index=null},He.prototype.push=function(){},Ve.prototype.get=function(t){const e=this.index[this.B(t)];return e&&e.get(t)},Ve.prototype.set=function(t,e){var i=this.B(t);let n=this.index[i];n?(i=n.size,n.set(t,e),(i-=n.size)&&this.size++):(this.index[i]=n=new Map([[t,e]]),this.h.push(n),this.size++)},We.prototype.add=function(t){var e=this.B(t);let i=this.index[e];i?(e=i.size,i.add(t),(e-=i.size)&&this.size++):(this.index[e]=i=new Set([t]),this.h.push(i),this.size++)},(ce=Ve.prototype).has=We.prototype.has=function(t){const e=this.index[this.B(t)];return e&&e.has(t)},ce.delete=We.prototype.delete=function(t){const e=this.index[this.B(t)];e&&e.delete(t)&&this.size--},ce.clear=We.prototype.clear=function(){this.index=fe(),this.h=[],this.size=0},ce.values=We.prototype.values=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].values())yield e},ce.keys=We.prototype.keys=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].keys())yield e},ce.entries=We.prototype.entries=function*(){for(let t=0;t<this.h.length;t++)for(let e of this.h[t].entries())yield e},di.prototype.add=function(t,e,i){if(pe(t)&&(t=ge(e=t,this.key)),e&&(t||0===t)){if(!i&&this.reg.has(t))return this.update(t,e);for(let s,o=0;o<this.field.length;o++){s=this.F[o];var n=this.index.get(this.field[o]);if("function"==typeof s){var r=s(e);r&&n.add(t,r,!1,!0)}else(!(r=s.I)||r(e))&&(s.constructor===String?s=[""+s]:de(s)&&(s=[s]),Ze(e,s,this.J,0,n,t,s[0],i))}if(this.tag)for(n=0;n<this.D.length;n++){var s=this.D[n];r=this.tag.get(this.R[n]);let a=fe();if("function"==typeof s){if(!(s=s(e)))continue}else{var o=s.I;if(o&&!o(e))continue;s.constructor===String&&(s=""+s),s=ge(e,s)}if(r&&s){de(s)&&(s=[s]);for(let e,n,l=0;l<s.length;l++)if(e=s[l],!a[e]&&(a[e]=1,(o=r.get(e))?n=o:r.set(e,n=[]),!i||!n.includes(t))){if(n.length===2**31-1){if(o=new He(n),this.fastupdate)for(let t of this.reg.values())t.includes(n)&&(t[t.indexOf(n)]=o);r.set(e,n=o)}n.push(t),this.fastupdate&&((o=this.reg.get(t))?o.push(n):this.reg.set(t,[n]))}}}if(this.store&&(!i||!this.store.has(t))){let n;if(this.C){n=fe();for(let t,r=0;r<this.C.length;r++){if(t=this.C[r],(i=t.I)&&!i(e))continue;let s;if("function"==typeof t){if(s=t(e),!s)continue;t=[t.V]}else if(de(t)||t.constructor===String){n[t]=e[t];continue}Ke(e,n,t,0,t[0],s)}}this.store.set(t,n||e)}this.worker&&(this.fastupdate||this.reg.add(t))}return this},li.prototype.or=function(){const{O:t,P:e,limit:i,offset:n,enrich:r,resolve:s}=ei(this,"or",arguments);return ii.call(this,t,e,i,n,r,s)},li.prototype.and=function(){let t,e,i,n,r=this.result.length;if(!r){const s=arguments[0];s&&(r=!!s.suggest,n=s.resolve,t=s.limit,e=s.offset,i=s.enrich&&n)}if(r){const{O:t,P:e,limit:i,offset:n,enrich:r,resolve:s,suggest:o}=ei(this,"and",arguments);return ni.call(this,t,e,i,n,r,s,o)}return n?this.resolve(t,e,i):this},li.prototype.xor=function(){const{O:t,P:e,limit:i,offset:n,enrich:r,resolve:s,suggest:o}=ei(this,"xor",arguments);return ri.call(this,t,e,i,n,r,s,o)},li.prototype.not=function(){const{O:t,P:e,limit:i,offset:n,enrich:r,resolve:s,suggest:o}=ei(this,"not",arguments);return oi.call(this,t,e,i,n,r,s,o)},li.prototype.limit=function(t){if(this.result.length){const e=[];for(let i,n=0;n<this.result.length;n++)if(i=this.result[n]){if(!(i.length<=t)){e[n]=i.slice(0,t);break}if(e[n]=i,!(t-=i.length))break}this.result=e}return this},li.prototype.offset=function(t){if(this.result.length){const e=[];for(let i,n=0;n<this.result.length;n++)(i=this.result[n])&&(i.length<=t?t-=i.length:(e[n]=i.slice(t),t=0));this.result=e}return this},li.prototype.boost=function(t){return this.h+=t,this},li.prototype.resolve=function(t,e,i){const n=this.result,r=this.index;return this.result=this.index=null,n.length?("object"==typeof t&&(i=t.enrich,e=t.offset,t=t.limit),ti.call(r,n,t||100,e,i)):n},di.prototype.search=function(t,e,i,n){i||(!e&&pe(t)?(i=t,t=""):pe(e)&&(i=e,e=0));let r=[];var s=[];let o,a,l,h,c=0;var u=!0;let f,d;if(i){i.constructor===Array&&(i={index:i}),t=i.query||t,o=i.pluck,a=i.merge,l=o||i.field||(l=i.index)&&(l.index?null:l),h=this.tag&&i.tag;var p=i.suggest;(u=!1!==i.resolve)||o||!(l=l||this.field)||(de(l)?o=l:(l.constructor===Array&&1===l.length&&(l=l[0]),o=l.field||l.index));var g=(f=u&&this.store&&i.highlight)||u&&this.store&&i.enrich;e=i.limit||e;var m=i.offset||0;if(e||(e=100),h&&(!this.db||!n)){h.constructor!==Array&&(h=[h]);var y=[];for(let t,e=0;e<h.length;e++)if(t=h[e],t.field&&t.tag){var b=t.tag;if(b.constructor===Array)for(var v=0;v<b.length;v++)y.push(t.field,b[v]);else y.push(t.field,b)}else{b=Object.keys(t);for(let e,i,n=0;n<b.length;n++)if(e=b[n],i=t[e],i.constructor===Array)for(v=0;v<i.length;v++)y.push(e,i[v]);else y.push(e,i)}if(h=y,!t){if(u=[],y.length)for(s=0;s<y.length;s+=2){if(this.db){if(!(p=this.index.get(y[s])))continue;u.push(p=p.db.tag(y[s+1],e,m,g))}else p=ui.call(this,y[s],y[s+1],e,m,g);r.push({field:y[s],tag:y[s+1],result:p})}return u.length?Promise.all(u).then((function(t){for(let e=0;e<t.length;e++)r[e].result=t[e];return r})):r}}l&&l.constructor!==Array&&(l=[l])}l||(l=this.field),y=!n&&(this.worker||this.db)&&[];for(let o,a,_,w=0;w<l.length;w++){if(a=l[w],this.db&&this.tag&&!this.F[w])continue;let x;if(de(a)||(x=a,a=x.field,t=x.query||t,e=x.limit||e,m=x.offset||m,p=x.suggest||p,f=(g=this.store&&(x.enrich||g))&&(i.highlight||f)),n)o=n[w];else{if(b=x||i,v=this.index.get(a),h&&(this.db&&(b.tag=h,d=v.db.support_tag_search,b.field=l),d||(b.enrich=!1)),y){y[w]=v.search(t,e,b),b&&g&&(b.enrich=g);continue}o=v.search(t,e,b),b&&g&&(b.enrich=g)}if(_=o&&(u?o.length:o.result.length),h&&_){if(b=[],v=0,this.db&&n){if(!d)for(let t=l.length;t<n.length;t++){let e=n[t];if(e&&e.length)v++,b.push(e);else if(!p)return u?r:new li(r)}}else for(let t,e,i=0;i<h.length;i+=2){if(t=this.tag.get(h[i]),!t){if(p)continue;return u?r:new li(r)}if(e=(t=t&&t.get(h[i+1]))&&t.length)v++,b.push(t);else if(!p)return u?r:new li(r)}if(v){if(o=Ye(o,b,u),_=o.length,!_&&!p)return u?o:new li(o);v--}}if(_)s[c]=a,r.push(o),c++;else if(1===l.length)return u?r:new li(r)}if(y){if(this.db&&h&&h.length&&!d)for(g=0;g<h.length;g+=2){if(!(s=this.index.get(h[g]))){if(p)continue;return u?r:new li(r)}y.push(s.db.tag(h[g+1],e,m,!1))}const n=this;return Promise.all(y).then((function(r){return r.length?n.search(t,e,i,r):r}))}if(!c)return u?r:new li(r);if(o&&(!g||!this.store))return r[0];for(y=[],m=0;m<s.length;m++){if(p=r[m],g&&p.length&&void 0===p[0].doc&&(this.db?y.push(p=this.index.get(this.field[0]).db.enrich(p)):p=fi.call(this,p)),o)return u?f?hi(t,p,this.index,o,f):p:new li(p);r[m]={field:s[m],result:p}}if(g&&this.db&&y.length){const e=this;return Promise.all(y).then((function(i){for(let t=0;t<i.length;t++)r[t].result=i[t];return a?ci(r):f?hi(t,r,e.index,o,f):r}))}return a?ci(r):f?hi(t,r,this.index,o,f):r},(ce=di.prototype).mount=function(t){let e=this.field;if(this.tag)for(let t,n=0;n<this.R.length;n++){t=this.R[n];var i=void 0;this.index.set(t,i=new Mi({},this.reg)),e===this.field&&(e=e.slice(0)),e.push(t),i.tag=this.tag.get(t)}i=[];const n={db:t.db,type:t.type,fastupdate:t.fastupdate};for(let r,s,o=0;o<e.length;o++){n.field=s=e[o],r=this.index.get(s);const a=new t.constructor(t.id,n);a.id=t.id,i[o]=a.mount(r),r.document=!0,o?r.bypass=!0:r.store=this.store}const r=this;return this.db=Promise.all(i).then((function(){r.db=!0}))},ce.commit=async function(t,e){const i=[];for(const n of this.index.values())i.push(n.commit(t,e));await Promise.all(i),this.reg.clear()},ce.destroy=function(){const t=[];for(const e of this.index.values())t.push(e.destroy());return Promise.all(t)},ce.append=function(t,e){return this.add(t,e,!0)},ce.update=function(t,e){return this.remove(t).add(t,e)},ce.remove=function(t){for(var e of(pe(t)&&(t=ge(t,this.key)),this.index.values()))e.remove(t,!0);if(this.reg.has(t)){if(this.tag&&!this.fastupdate)for(let i of this.tag.values())for(let n of i){e=n[0];const r=n[1],s=r.indexOf(t);-1<s&&(1<r.length?r.splice(s,1):i.delete(e))}this.store&&this.store.delete(t),this.reg.delete(t)}return this.cache&&this.cache.remove(t),this},ce.clear=function(){const t=[];for(const e of this.index.values()){const i=e.clear();i.then&&t.push(i)}if(this.tag)for(const t of this.tag.values())t.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),t.length?Promise.all(t):this},ce.contain=function(t){return this.db?this.index.get(this.field[0]).db.has(t):this.reg.has(t)},ce.cleanup=function(){for(const t of this.index.values())t.cleanup();return this},ce.get=function(t){return this.db?this.index.get(this.field[0]).db.enrich(t).then((function(t){return t[0]&&t[0].doc||null})):this.store.get(t)||null},ce.set=function(t,e){return"object"==typeof t&&(t=ge(e=t,this.key)),this.store.set(t,e),this},ce.searchCache=mi,ce.export=function(t,e,i=0,n=0){if(i<this.field.length){const r=this.field[i];if((e=this.index.get(r).export(t,r,i,n=1))&&e.then){const n=this;return e.then((function(){return n.export(t,r,i+1)}))}return this.export(t,r,i+1)}let r,s;switch(n){case 0:r="reg",s=Fe(this.reg),e=null;break;case 1:r="tag",s=this.tag&&Re(this.tag,this.reg.size),e=null;break;case 2:r="doc",s=this.store&&Ie(this.store),e=null;break;default:return}return Ue.call(this,t,e,r,s,i,n)},ce.import=function(t,e){var i=t.split(".");"json"===i[i.length-1]&&i.pop();const n=2<i.length?i[0]:"";if(i=2<i.length?i[2]:i[1],this.worker&&n)return this.index.get(n).import(t);if(e){if("string"==typeof e&&(e=JSON.parse(e)),n)return this.index.get(n).import(i,e);switch(i){case"reg":this.fastupdate=!1,this.reg=Le(e,this.reg);for(let t,e=0;e<this.field.length;e++)t=this.index.get(this.field[e]),t.fastupdate=!1,t.reg=this.reg;if(this.worker){e=[];for(const i of this.index.values())e.push(i.import(t));return Promise.all(e)}break;case"tag":this.tag=ze(e,this.tag);break;case"doc":this.store=De(e,this.store)}}},je(di.prototype),yi.prototype.set=function(t,e){this.cache.set(this.h=t,e),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)},yi.prototype.get=function(t){const e=this.cache.get(t);return e&&this.h!==t&&(this.cache.delete(t),this.cache.set(this.h=t,e)),e},yi.prototype.remove=function(t){for(const e of this.cache){const i=e[0];e[1].includes(t)&&this.cache.delete(i)}},yi.prototype.clear=function(){this.cache.clear(),this.h=""};const bi={normalize:!1,numeric:!1,dedupe:!1},vi={},_i=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),wi=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),xi=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],ki={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,"ß":2,d:3,t:3,l:4,m:5,n:5,r:6};var Si={Exact:bi,Default:vi,Normalize:vi,LatinBalance:{mapper:_i},LatinAdvanced:{mapper:_i,matcher:wi,replacer:xi},LatinExtra:{mapper:_i,replacer:xi.concat([/(?!^)[aeo]/g,""]),matcher:wi},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(t){for(let i=0;i<t.length;i++){var e=t[i];let n=e.charAt(0),r=ki[n];for(let t,i=1;i<e.length&&(t=e.charAt(i),"h"===t||"w"===t||!(t=ki[t])||t===r||(n+=t,r=t,4!==n.length));i++);t[i]=n}}},CJK:{split:""},LatinExact:bi,LatinDefault:vi,LatinSimple:vi};function $i(t,e){let i=0;var n=void 0===e;if(t.constructor===Array){for(let r,s,o=0;o<t.length;o++)if((r=t[o])&&r.length)if(n)i++;else{if(s=r.indexOf(e),0<=s){1<r.length?(r.splice(s,1),i++):delete t[o];break}i++}}else for(let r of t.entries()){n=r[0];const s=$i(r[1],e);s?i+=s:t.delete(n)}return i}Mi.prototype.remove=function(t,e){const i=this.reg.size&&(this.fastupdate?this.reg.get(t):this.reg.has(t));if(i){if(this.fastupdate){for(let e,n=0;n<i.length;n++)if(e=i[n])if(2>e.length)e.pop();else{const n=e.indexOf(t);n===i.length-1?e.pop():e.splice(n,1)}}else $i(this.map,t),this.depth&&$i(this.ctx,t);e||this.reg.delete(t)}return this.db&&(this.commit_task.push({del:t}),this.T&&Ni(this)),this.cache&&this.cache.remove(t),this};const Pi={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};function Ai(t,e,i,n,r,s,o){let a,l=o?t.ctx:t.map;if((!e[i]||o&&!(a=e[i])[o])&&(o?((e=a||(e[i]=fe()))[o]=1,(a=l.get(o))?l=a:l.set(o,l=new Map)):e[i]=1,(a=l.get(i))?l=a:l.set(i,l=a=[]),l=l[n]||(l[n]=[]),!s||!l.includes(r))){if(l.length===2**31-1){if(e=new He(l),t.fastupdate)for(let i of t.reg.values())i.includes(l)&&(i[i.indexOf(l)]=e);a[n]=l=e}l.push(r),t.fastupdate&&((n=t.reg.get(r))?n.push(l):t.reg.set(r,[l]))}}function Ti(t,e,i,n,r){return i&&1<t?e+(n||0)<=t?i+(r||0):(t-1)/(e+(n||0))*(i+(r||0))+1|0:0}function ji(t,e,i,n,r,s,o){let a=t.length,l=t;if(1<a)l=Qe(t,e,i,n,r,s,o);else if(1===a)return o?ti.call(null,t[0],i,n):new li(t[0]);return o?l:new li(l)}function Ei(t,e,i,n,r,s,o){return t=Ci(this,t,e,i,n,r,s,o),this.db?t.then((function(t){return r?t||[]:new li(t)})):t&&t.length?r?ti.call(this,t,i,n):new li(t):r?[]:new li}function Oi(t,e,i,n){let r=[];if(t&&t.length){if(t.length<=n)return void e.push(t);for(let e,i=0;i<n;i++)(e=t[i])&&(r[i]=e);if(r.length)return void e.push(r)}if(!i)return r}function Ci(t,e,i,n,r,s,o,a){let l;return i&&(l=t.bidirectional&&e>i)&&(l=i,i=e,e=l),t.db?t.db.get(e,i,n,r,s,o,a):t=i?(t=t.ctx.get(i))&&t.get(e):t.map.get(e)}function Mi(t,e){if(!this||this.constructor!==Mi)return new Mi(t);if(t){var i=de(t)?t:t.preset;i&&(t=Object.assign({},Pi[i],t))}else t={};const n=!0===(i=t.context)?{depth:1}:i||{},r=de(t.encoder)?Si[t.encoder]:t.encode||t.encoder||{};this.encoder=r.encode?r:"object"==typeof r?new we(r):{encode:r},this.resolution=t.resolution||9,this.tokenize=i=(i=t.tokenize)&&"default"!==i&&"exact"!==i&&i||"strict",this.depth="strict"===i&&n.depth||0,this.bidirectional=!1!==n.bidirectional,this.fastupdate=!!t.fastupdate,this.score=t.score||null,(i=t.keystore||0)&&(this.keystore=i),this.map=i?new Ve(i):new Map,this.ctx=i?new Ve(i):new Map,this.reg=e||(this.fastupdate?i?new Ve(i):new Map:i?new We(i):new Set),this.U=n.resolution||3,this.rtl=r.rtl||t.rtl||!1,this.cache=(i=t.cache||null)&&new yi(i),this.resolve=!1!==t.resolve,(i=t.db)&&(this.db=this.mount(i)),this.T=!1!==t.commit,this.commit_task=[],this.commit_timer=null,this.priority=t.priority||4}function Ni(t){t.commit_timer||(t.commit_timer=setTimeout((function(){t.commit_timer=null,t.db.commit(t,void 0,void 0)}),1))}Mi.prototype.add=function(t,e,i,n){if(e&&(t||0===t)){if(!n&&!i&&this.reg.has(t))return this.update(t,e);n=this.depth;const h=(e=this.encoder.encode(e,!n)).length;if(h){const c=fe(),u=fe(),f=this.resolution;for(let d=0;d<h;d++){let p=e[this.rtl?h-1-d:d];var r=p.length;if(r&&(n||!u[p])){var s=this.score?this.score(e,p,d,null,0):Ti(f,h,d),o="";switch(this.tokenize){case"full":if(2<r){for(let n,l=0;l<r;l++)for(s=r;s>l;s--){o=p.substring(l,s),n=this.rtl?r-1-l:l;var a=this.score?this.score(e,p,d,o,n):Ti(f,h,d,r,n);Ai(this,u,o,a,t,i)}break}case"bidirectional":case"reverse":if(1<r){for(a=r-1;0<a;a--){o=p[this.rtl?r-1-a:a]+o;var l=this.score?this.score(e,p,d,o,a):Ti(f,h,d,r,a);Ai(this,u,o,l,t,i)}o=""}case"forward":if(1<r){for(a=0;a<r;a++)Ai(this,u,o+=p[this.rtl?r-1-a:a],s,t,i);break}default:if(Ai(this,u,p,s,t,i),n&&1<h&&d<h-1)for(r=fe(),o=this.U,s=p,a=Math.min(n+1,this.rtl?d+1:h-d),r[s]=1,l=1;l<a;l++)if((p=e[this.rtl?h-1-d-l:d+l])&&!r[p]){r[p]=1;const n=this.score?this.score(e,s,d,p,l-1):Ti(o+(h/2>o?0:1),h,d,a-1,l-1),u=this.bidirectional&&p>s;Ai(this,c,u?s:p,n,t,i,u?p:s)}}}}this.fastupdate||this.reg.add(t)}else e=""}return this.db&&(e||this.commit_task.push({del:t}),this.T&&Ni(this)),this},Mi.prototype.search=function(t,e,i){i||(e||"object"!=typeof t?"object"==typeof e&&(i=e,e=0):(i=t,t=""));let n,r,s,o,a,l,h,c,u=[],f=0;i?(t=i.query||t,e=i.limit||e,f=i.offset||0,r=i.context,s=i.suggest,c=(o=!1!==i.resolve)&&i.enrich,l=i.boost,h=i.resolution,a=this.db&&i.tag):o=this.resolve,r=this.depth&&!1!==r;let d=this.encoder.encode(t,!r);if(n=d.length,e=e||(o?100:0),1===n)return Ei.call(this,d[0],"",e,f,o,c,a);if(2===n&&r&&!s)return Ei.call(this,d[1],d[0],e,f,o,c,a);let p,g=fe(),m=0;if(r&&(p=d[0],m=1),h||0===h||(h=p?this.U:this.resolution),this.db){if(this.db.search&&!1!==(t=this.db.search(this,d,e,f,s,o,c,a)))return t;const i=this;return async function(){for(let t,e;m<n;m++){if((e=d[m])&&!g[e]){if(g[e]=1,t=await Ci(i,e,p,0,0,!1,!1),t=Oi(t,u,s,h)){u=t;break}p&&(s&&t&&u.length||(p=e))}s&&p&&m===n-1&&!u.length&&(h=i.resolution,p="",m=-1,g=fe())}return ji(u,h,e,f,s,l,o)}()}for(let t,e;m<n;m++){if((e=d[m])&&!g[e]){if(g[e]=1,t=Ci(this,e,p,0,0,!1,!1),t=Oi(t,u,s,h)){u=t;break}p&&(s&&t&&u.length||(p=e))}s&&p&&m===n-1&&!u.length&&(h=this.resolution,p="",m=-1,g=fe())}return ji(u,h,e,f,s,l,o)},(ce=Mi.prototype).mount=function(t){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),t.mount(this)},ce.commit=function(t,e){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this,t,e)},ce.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()},ce.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db&&(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[{clear:!0}]),this},ce.append=function(t,e){return this.add(t,e,!0)},ce.contain=function(t){return this.db?this.db.has(t):this.reg.has(t)},ce.update=function(t,e){const i=this,n=this.remove(t);return n&&n.then?n.then((()=>i.add(t,e))):this.add(t,e)},ce.cleanup=function(){return this.fastupdate?($i(this.map),this.depth&&$i(this.ctx),this):this},ce.searchCache=mi,ce.export=function(t,e,i=0,n=0){let r,s;switch(n){case 0:r="reg",s=Fe(this.reg);break;case 1:r="cfg",s=null;break;case 2:r="map",s=Ie(this.map,this.reg.size);break;case 3:r="ctx",s=Re(this.ctx,this.reg.size);break;default:return}return Ue.call(this,t,e,r,s,i,n)},ce.import=function(t,e){if(e)switch("string"==typeof e&&(e=JSON.parse(e)),t=t.split("."),"json"===t[t.length-1]&&t.pop(),3===t.length&&t.shift(),t=1<t.length?t[1]:t[0],t){case"reg":this.fastupdate=!1,this.reg=Le(e,this.reg);break;case"map":this.map=De(e,this.map);break;case"ctx":this.ctx=ze(e,this.ctx)}},ce.serialize=function(t=!0){let e="",i="",n="";if(this.reg.size){let t;for(var r of this.reg.keys())t||(t=typeof r),e+=(e?",":"")+("string"===t?'"'+r+'"':r);e="index.reg=new Set(["+e+"]);",i=Be(this.map,t),i="index.map=new Map(["+i+"]);";for(const e of this.ctx.entries()){r=e[0];let i=Be(e[1],t);i="new Map(["+i+"])",i='["'+r+'",'+i+"]",n+=(n?",":"")+i}n="index.ctx=new Map(["+n+"]);"}return t?"function inject(index){"+e+i+n+"}":e+i+n},je(Mi.prototype);const Ii="undefined"!=typeof window&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Di=["map","ctx","tag","reg","cfg"],Ri=fe();function zi(t,e,i){const n=t.value;let r,s=0;for(let t,o=0;o<n.length;o++){if(t=i?n:n[o]){for(let i,s,a=0;a<e.length;a++)if(s=e[a],i=t.indexOf(s),0<=i){if(r=1,!(1<t.length)){n[o]=[];break}t.splice(i,1)}s+=t.length}if(i)break}s?r&&t.update(n):t.delete(),t.continue()}function Fi(t,e){return new Promise(((i,n)=>{t.onsuccess=t.oncomplete=function(){e&&e(this.result),e=null,i(this.result)},t.onerror=t.onblocked=n,t=null}))}ce=function t(e,i={}){if(!this||this.constructor!==t)return new t(e,i);"object"==typeof e&&(i=e,e=e.name),e||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(e?":"+e.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=i.field?i.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=i.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}.prototype,ce.mount=function(t){return t.index?t.mount(this):(t.db=this,this.open())},ce.open=function(){if(this.db)return this.db;let t=this;navigator.storage&&navigator.storage.persist(),Ri[t.id]||(Ri[t.id]=[]),Ri[t.id].push(t.field);const e=Ii.open(t.id,1);return e.onupgradeneeded=function(){const e=t.db=this.result;for(let i,n=0;n<Di.length;n++){i=Di[n];for(let n,r=0;r<Ri[t.id].length;r++)n=Ri[t.id][r],e.objectStoreNames.contains(i+("reg"!==i&&n?":"+n:""))||e.createObjectStore(i+("reg"!==i&&n?":"+n:""))}},t.db=Fi(e,(function(e){t.db=e,t.db.onversionchange=function(){t.close()}}))},ce.close=function(){this.db&&this.db.close(),this.db=null},ce.destroy=function(){return Fi(Ii.deleteDatabase(this.id))},ce.clear=function(){const t=[];for(let e,i=0;i<Di.length;i++){e=Di[i];for(let i,n=0;n<Ri[this.id].length;n++)i=Ri[this.id][n],t.push(e+("reg"!==e&&i?":"+i:""))}const e=this.db.transaction(t,"readwrite");for(let i=0;i<t.length;i++)e.objectStore(t[i]).clear();return Fi(e)},ce.get=function(t,e,i=0,n=0,r=!0,s=!1){t=this.db.transaction((e?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((e?"ctx":"map")+(this.field?":"+this.field:"")).get(e?e+":"+t:t);const o=this;return Fi(t).then((function(t){let e=[];if(!t||!t.length)return e;if(r){if(!i&&!n&&1===t.length)return t[0];for(let r,s=0;s<t.length;s++)if((r=t[s])&&r.length){if(n>=r.length){n-=r.length;continue}const t=i?n+Math.min(r.length-n,i):r.length;for(let i=n;i<t;i++)e.push(r[i]);if(n=0,e.length===i)break}return s?o.enrich(e):e}return t}))},ce.tag=function(t,e=0,i=0,n=!1){t=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(t);const r=this;return Fi(t).then((function(t){return!t||!t.length||i>=t.length?[]:e||i?(t=t.slice(i,i+e),n?r.enrich(t):t):t}))},ce.enrich=function(t){"object"!=typeof t&&(t=[t]);const e=this.db.transaction("reg","readonly").objectStore("reg"),i=[];for(let n=0;n<t.length;n++)i[n]=Fi(e.get(t[n]));return Promise.all(i).then((function(e){for(let i=0;i<e.length;i++)e[i]={id:t[i],doc:e[i]?JSON.parse(e[i]):null};return e}))},ce.has=function(t){return Fi(t=this.db.transaction("reg","readonly").objectStore("reg").getKey(t)).then((function(t){return!!t}))},ce.search=null,ce.info=function(){},ce.transaction=function(t,e,i){t+="reg"!==t&&this.field?":"+this.field:"";let n=this.h[t+":"+e];if(n)return i.call(this,n);let r=this.db.transaction(t,e);this.h[t+":"+e]=n=r.objectStore(t);const s=i.call(this,n);return this.h[t+":"+e]=null,Fi(r).finally((function(){return r=n=null,s}))},ce.commit=async function(t,e,i){if(e)await this.clear(),t.commit_task=[];else{let n=t.commit_task;t.commit_task=[];for(let t,i=0;i<n.length;i++){if(t=n[i],t.clear){await this.clear(),e=!0;break}n[i]=t.del}e||(i||(n=n.concat(function(t){const e=[];for(const i of t.keys())e.push(i);return e}(t.reg))),n.length&&await this.remove(n))}t.reg.size&&(await this.transaction("map","readwrite",(function(i){for(const n of t.map){const t=n[0],r=n[1];r.length&&(e?i.put(r,t):i.get(t).onsuccess=function(){let e=this.result;var n;if(e&&e.length){const t=Math.max(e.length,r.length);for(let i,s,o=0;o<t;o++)if((s=r[o])&&s.length){if((i=e[o])&&i.length)for(n=0;n<s.length;n++)i.push(s[n]);else e[o]=s;n=1}}else e=r,n=1;n&&i.put(e,t)})}})),await this.transaction("ctx","readwrite",(function(i){for(const n of t.ctx){const t=n[0],r=n[1];for(const n of r){const r=n[0],s=n[1];s.length&&(e?i.put(s,t+":"+r):i.get(t+":"+r).onsuccess=function(){let e=this.result;var n;if(e&&e.length){const t=Math.max(e.length,s.length);for(let i,r,o=0;o<t;o++)if((r=s[o])&&r.length){if((i=e[o])&&i.length)for(n=0;n<r.length;n++)i.push(r[n]);else e[o]=r;n=1}}else e=s,n=1;n&&i.put(e,t+":"+r)})}}})),t.store?await this.transaction("reg","readwrite",(function(e){for(const i of t.store){const t=i[0],n=i[1];e.put("object"==typeof n?JSON.stringify(n):1,t)}})):t.bypass||await this.transaction("reg","readwrite",(function(e){for(const i of t.reg.keys())e.put(1,i)})),t.tag&&await this.transaction("tag","readwrite",(function(e){for(const i of t.tag){const t=i[0],n=i[1];n.length&&(e.get(t).onsuccess=function(){let i=this.result;i=i&&i.length?i.concat(n):n,e.put(i,t)})}})),t.map.clear(),t.ctx.clear(),t.tag&&t.tag.clear(),t.store&&t.store.clear(),t.document||t.reg.clear())},ce.remove=function(t){return"object"!=typeof t&&(t=[t]),Promise.all([this.transaction("map","readwrite",(function(e){e.openCursor().onsuccess=function(){const e=this.result;e&&zi(e,t)}})),this.transaction("ctx","readwrite",(function(e){e.openCursor().onsuccess=function(){const e=this.result;e&&zi(e,t)}})),this.transaction("tag","readwrite",(function(e){e.openCursor().onsuccess=function(){const e=this.result;e&&zi(e,t,!0)}})),this.transaction("reg","readwrite",(function(e){for(let i=0;i<t.length;i++)e.delete(t[i])}))])};const Li=Si,Ui=we,Bi=di;async function qi(){const t=new Bi({document:{id:"id",store:!0,index:[{field:"name",tokenize:"bidirectional",priority:9,encoder:new Ui(Li.LatinBalance).assign({normalize(t){let e=t.replace(/\d+/g,"").split(/(?<=[a-z])(?=[A-Z])/);return e.length>1&&e.push(t),e.map((t=>t.toLowerCase())).join(" ")}})},{field:"comment",tokenize:"default",encoder:Li.LatinSoundex}],tag:[]}}),e=`${document.documentElement.dataset.base}assets/oxide`,i=await async function(t){const e=await fetch(t),i=(await e.blob()).stream().pipeThrough(new DecompressionStream("deflate"));return await new Response(i).json()}(`${e}/search-index.defalte`);for(const[e,n]of Object.entries(i))t.import(e,n);return t}document.addEventListener("DOMContentLoaded",(async()=>{const t=document.querySelector("rustdoc-search .search-form"),e=document.querySelector("rustdoc-search .search-input"),i=document.getElementById("main-content"),n=document.getElementById("alternative-display");let r,s;t.addEventListener("submit",(t=>{t.preventDefault(),t.stopPropagation()})),e.addEventListener("input",function(t,e,i){var n=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return jt(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),zt(t,e,{leading:n,maxWait:e,trailing:r})}((async t=>{var e;r||(r=qi());const o=null===(e=t.target.value)||void 0===e?void 0:e.trim(),[a,l]=o?[i,n]:[n,i];a.classList.add("hidden"),l.classList.remove("hidden"),null==s||s.abort(),s=new AbortController;const h=s.signal;await async function(t,e,i){if(e.aborted||!t.length)return;const n=await i.search({query:t,enrich:!0,merge:!0});if(console.log(n),e.aborted)return;const r=document.querySelector('meta[name="rustdoc-vars"]'),s=document.querySelector("oxide-search-results#search");s.loading=!1,s.project=r.dataset.currentCrate,s.query=t,s.items=n.map((t=>t.doc)).filter((t=>null!==t))}(o,h,await r)}),300))})),(()=>{var t,s,o,a;let l,h,c,u,f,d,p=[ut("oxide-search-results")],g=[],m=ht,y=[],b=[],v=[],_=[],w=[],x=[],k=[],S=[];var $=h=class extends m{get loading(){return n(this,t,"f")}set loading(e){r(this,t,e,"f")}get project(){return n(this,s,"f")}set project(t){r(this,s,t,"f")}get query(){return n(this,o,"f")}set query(t){r(this,o,t,"f")}get items(){return n(this,a,"f")}set items(t){r(this,a,t,"f")}createRenderRoot(){return this}render(){if(this.loading)return V`
|
|
48
48
|
<div class="main-heading">
|
|
49
49
|
<h1 class="search-results-title">Results</h1>
|
|
50
50
|
</div>
|