html-reporter
Version:
Html-reporter and GUI for viewing and managing results of a tests run. Currently supports Testplane and Hermione.
1 lines • 26 kB
JavaScript
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[76],{5634:(t,e,s)=>{s(95003),s(16162),s(50011);var r=s(24778),n=Object.keys(r),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);var h=s(30499);h.pbkdf2,h.pbkdf2Sync;var o=s(93667);o.Cipher,o.createCipher,o.Cipheriv,o.createCipheriv,o.Decipher,o.createDecipher,o.Decipheriv,o.createDecipheriv,o.getCiphers,o.listCiphers;var a=s(67602);a.DiffieHellmanGroup,a.createDiffieHellmanGroup,a.getDiffieHellman,a.createDiffieHellman,a.DiffieHellman;var u=s(95263);u.createSign,u.Sign,u.createVerify,u.Verify,s(95363);var c=s(8493);c.publicEncrypt,c.privateEncrypt,c.publicDecrypt,c.privateDecrypt;var l=s(69631);l.randomFill,l.randomFillSync},883:(t,e,s)=>{var r=s(59639),n=s(25225);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var h=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),l=["%","/","?",";","#"].concat(c),p=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},A={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},C=s(56642);function y(t,e,s){if(t&&n.isObject(t)&&t instanceof i)return t;var r=new i;return r.parse(t,e,s),r}i.prototype.parse=function(t,e,s){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),o=-1!==i&&i<t.indexOf("#")?"?":"#",u=t.split(o);u[0]=u[0].replace(/\\/g,"/");var y=t=u.join(o);if(y=y.trim(),!s&&1===t.split("#").length){var v=a.exec(y);if(v)return this.path=y,this.href=y,this.pathname=v[1],v[2]?(this.search=v[2],this.query=e?C.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var x=h.exec(y);if(x){var D=(x=x[0]).toLowerCase();this.protocol=D,y=y.substr(x.length)}if(s||x||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var F="//"===y.substr(0,2);!F||x&&m[x]||(y=y.substr(2),this.slashes=!0)}if(!m[x]&&(F||x&&!A[x])){for(var M,E,B=-1,k=0;k<p.length;k++){-1!==(b=y.indexOf(p[k]))&&(-1===B||b<B)&&(B=b)}-1!==(E=-1===B?y.lastIndexOf("@"):y.lastIndexOf("@",B))&&(M=y.slice(0,E),y=y.slice(E+1),this.auth=decodeURIComponent(M)),B=-1;for(k=0;k<l.length;k++){var b;-1!==(b=y.indexOf(l[k]))&&(-1===B||b<B)&&(B=b)}-1===B&&(B=y.length),this.host=y.slice(0,B),y=y.slice(B),this.parseHost(),this.hostname=this.hostname||"";var L="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!L)for(var S=this.hostname.split(/\./),_=(k=0,S.length);k<_;k++){var w=S[k];if(w&&!w.match(f)){for(var I="",O=0,$=w.length;O<$;O++)w.charCodeAt(O)>127?I+="x":I+=w[O];if(!I.match(f)){var j=S.slice(0,k),N=S.slice(k+1),R=w.match(d);R&&(j.push(R[1]),N.unshift(R[2])),N.length&&(y="/"+N.join(".")+y),this.hostname=j.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),L||(this.hostname=r.toASCII(this.hostname));var q=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+q,this.href+=this.host,L&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!g[D])for(k=0,_=c.length;k<_;k++){var z=c[k];if(-1!==y.indexOf(z)){var H=encodeURIComponent(z);H===z&&(H=escape(z)),y=y.split(z).join(H)}}var U=y.indexOf("#");-1!==U&&(this.hash=y.substr(U),y=y.slice(0,U));var K=y.indexOf("?");if(-1!==K?(this.search=y.substr(K),this.query=y.substr(K+1),e&&(this.query=C.parse(this.query)),y=y.slice(0,K)):e&&(this.search="",this.query={}),y&&(this.pathname=y),A[D]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){q=this.pathname||"";var P=this.search||"";this.path=q+P}return this.href=this.format(),this},i.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",s=this.pathname||"",r=this.hash||"",i=!1,h="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(h=C.stringify(this.query));var o=this.search||h&&"?"+h||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||A[e])&&!1!==i?(i="//"+(i||""),s&&"/"!==s.charAt(0)&&(s="/"+s)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),o&&"?"!==o.charAt(0)&&(o="?"+o),e+i+(s=s.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(o=o.replace("#","%23"))+r},i.prototype.resolve=function(t){return this.resolveObject(y(t,!1,!0)).format()},i.prototype.resolveObject=function(t){if(n.isString(t)){var e=new i;e.parse(t,!1,!0),t=e}for(var s=new i,r=Object.keys(this),h=0;h<r.length;h++){var o=r[h];s[o]=this[o]}if(s.hash=t.hash,""===t.href)return s.href=s.format(),s;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),u=0;u<a.length;u++){var c=a[u];"protocol"!==c&&(s[c]=t[c])}return A[s.protocol]&&s.hostname&&!s.pathname&&(s.path=s.pathname="/"),s.href=s.format(),s}if(t.protocol&&t.protocol!==s.protocol){if(!A[t.protocol]){for(var l=Object.keys(t),p=0;p<l.length;p++){var f=l[p];s[f]=t[f]}return s.href=s.format(),s}if(s.protocol=t.protocol,t.host||m[t.protocol])s.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),s.pathname=d.join("/")}if(s.search=t.search,s.query=t.query,s.host=t.host||"",s.auth=t.auth,s.hostname=t.hostname||t.host,s.port=t.port,s.pathname||s.search){var g=s.pathname||"",C=s.search||"";s.path=g+C}return s.slashes=s.slashes||t.slashes,s.href=s.format(),s}var y=s.pathname&&"/"===s.pathname.charAt(0),v=t.host||t.pathname&&"/"===t.pathname.charAt(0),x=v||y||s.host&&t.pathname,D=x,F=s.pathname&&s.pathname.split("/")||[],M=(d=t.pathname&&t.pathname.split("/")||[],s.protocol&&!A[s.protocol]);if(M&&(s.hostname="",s.port=null,s.host&&(""===F[0]?F[0]=s.host:F.unshift(s.host)),s.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),x=x&&(""===d[0]||""===F[0])),v)s.host=t.host||""===t.host?t.host:s.host,s.hostname=t.hostname||""===t.hostname?t.hostname:s.hostname,s.search=t.search,s.query=t.query,F=d;else if(d.length)F||(F=[]),F.pop(),F=F.concat(d),s.search=t.search,s.query=t.query;else if(!n.isNullOrUndefined(t.search)){if(M)s.hostname=s.host=F.shift(),(L=!!(s.host&&s.host.indexOf("@")>0)&&s.host.split("@"))&&(s.auth=L.shift(),s.host=s.hostname=L.shift());return s.search=t.search,s.query=t.query,n.isNull(s.pathname)&&n.isNull(s.search)||(s.path=(s.pathname?s.pathname:"")+(s.search?s.search:"")),s.href=s.format(),s}if(!F.length)return s.pathname=null,s.search?s.path="/"+s.search:s.path=null,s.href=s.format(),s;for(var E=F.slice(-1)[0],B=(s.host||t.host||F.length>1)&&("."===E||".."===E)||""===E,k=0,b=F.length;b>=0;b--)"."===(E=F[b])?F.splice(b,1):".."===E?(F.splice(b,1),k++):k&&(F.splice(b,1),k--);if(!x&&!D)for(;k--;k)F.unshift("..");!x||""===F[0]||F[0]&&"/"===F[0].charAt(0)||F.unshift(""),B&&"/"!==F.join("/").substr(-1)&&F.push("");var L,S=""===F[0]||F[0]&&"/"===F[0].charAt(0);M&&(s.hostname=s.host=S?"":F.length?F.shift():"",(L=!!(s.host&&s.host.indexOf("@")>0)&&s.host.split("@"))&&(s.auth=L.shift(),s.host=s.hostname=L.shift()));return(x=x||s.host&&F.length)&&!S&&F.unshift(""),F.length?s.pathname=F.join("/"):(s.pathname=null,s.path=null),n.isNull(s.pathname)&&n.isNull(s.search)||(s.path=(s.pathname?s.pathname:"")+(s.search?s.search:"")),s.auth=t.auth||s.auth,s.slashes=s.slashes||t.slashes,s.href=s.format(),s},i.prototype.parseHost=function(){var t=this.host,e=o.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},89325:(t,e,s)=>{function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===p(t)}s.d(e,{Z:()=>Q});const n=1/0;function i(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-n?"-0":e}(t)}function h(t){return"string"==typeof t}function o(t){return"number"==typeof t}function a(t){return!0===t||!1===t||function(t){return u(t)&&null!==t}(t)&&"[object Boolean]"==p(t)}function u(t){return"object"==typeof t}function c(t){return null!=t}function l(t){return!t.trim().length}function p(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const f=t=>`Missing ${t} property in key`,d=t=>`Property 'weight' in key '${t}' must be a positive integer`,g=Object.prototype.hasOwnProperty;class m{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach((t=>{let s=A(t);this._keys.push(s),this._keyMap[s.id]=s,e+=s.weight})),this._keys.forEach((t=>{t.weight/=e}))}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function A(t){let e=null,s=null,n=null,i=1,o=null;if(h(t)||r(t))n=t,e=C(t),s=y(t);else{if(!g.call(t,"name"))throw new Error(f("name"));const r=t.name;if(n=r,g.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(d(r));e=C(r),s=y(r),o=t.getFn}return{path:e,id:s,weight:i,src:n,getFn:o}}function C(t){return r(t)?t:t.split(".")}function y(t){return r(t)?t.join("."):t}var v={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(t,e){let s=[],n=!1;const u=(t,e,l)=>{if(c(t))if(e[l]){const p=t[e[l]];if(!c(p))return;if(l===e.length-1&&(h(p)||o(p)||a(p)))s.push(i(p));else if(r(p)){n=!0;for(let t=0,s=p.length;t<s;t+=1)u(p[t],e,l+1)}else e.length&&u(p,e,l+1)}else s.push(t)};return u(t,h(e)?e.split("."):e,0),n?s:s[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const x=/[^ ]+/g;class D{constructor({getFn:t=v.getFn,fieldNormWeight:e=v.fieldNormWeight}={}){this.norm=function(t=1,e=3){const s=new Map,r=Math.pow(10,e);return{get(e){const n=e.match(x).length;if(s.has(n))return s.get(n);const i=1/Math.pow(n,.5*t),h=parseFloat(Math.round(i*r)/r);return s.set(n,h),h},clear(){s.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach(((t,e)=>{this._keysMap[t.id]=e}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,h(this.docs[0])?this.docs.forEach(((t,e)=>{this._addString(t,e)})):this.docs.forEach(((t,e)=>{this._addObject(t,e)})),this.norm.clear())}add(t){const e=this.size();h(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,s=this.size();e<s;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!c(t)||l(t))return;let s={v:t,i:e,n:this.norm.get(t)};this.records.push(s)}_addObject(t,e){let s={i:e,$:{}};this.keys.forEach(((e,n)=>{let i=e.getFn?e.getFn(t):this.getFn(t,e.path);if(c(i))if(r(i)){let t=[];const e=[{nestedArrIndex:-1,value:i}];for(;e.length;){const{nestedArrIndex:s,value:n}=e.pop();if(c(n))if(h(n)&&!l(n)){let e={v:n,i:s,n:this.norm.get(n)};t.push(e)}else r(n)&&n.forEach(((t,s)=>{e.push({nestedArrIndex:s,value:t})}))}s.$[n]=t}else if(h(i)&&!l(i)){let t={v:i,n:this.norm.get(i)};s.$[n]=t}})),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function F(t,e,{getFn:s=v.getFn,fieldNormWeight:r=v.fieldNormWeight}={}){const n=new D({getFn:s,fieldNormWeight:r});return n.setKeys(t.map(A)),n.setSources(e),n.create(),n}function M(t,{errors:e=0,currentLocation:s=0,expectedLocation:r=0,distance:n=v.distance,ignoreLocation:i=v.ignoreLocation}={}){const h=e/t.length;if(i)return h;const o=Math.abs(r-s);return n?h+o/n:o?1:h}const E=32;function B(t,e,s,{location:r=v.location,distance:n=v.distance,threshold:i=v.threshold,findAllMatches:h=v.findAllMatches,minMatchCharLength:o=v.minMatchCharLength,includeMatches:a=v.includeMatches,ignoreLocation:u=v.ignoreLocation}={}){if(e.length>E)throw new Error(`Pattern length exceeds max of ${E}.`);const c=e.length,l=t.length,p=Math.max(0,Math.min(r,l));let f=i,d=p;const g=o>1||a,m=g?Array(l):[];let A;for(;(A=t.indexOf(e,d))>-1;){let t=M(e,{currentLocation:A,expectedLocation:p,distance:n,ignoreLocation:u});if(f=Math.min(t,f),d=A+c,g){let t=0;for(;t<c;)m[A+t]=1,t+=1}}d=-1;let C=[],y=1,x=c+l;const D=1<<c-1;for(let r=0;r<c;r+=1){let i=0,o=x;for(;i<o;){M(e,{errors:r,currentLocation:p+o,expectedLocation:p,distance:n,ignoreLocation:u})<=f?i=o:x=o,o=Math.floor((x-i)/2+i)}x=o;let a=Math.max(1,p-o+1),A=h?l:Math.min(p+o,l)+c,v=Array(A+2);v[A+1]=(1<<r)-1;for(let i=A;i>=a;i-=1){let h=i-1,o=s[t.charAt(h)];if(g&&(m[h]=+!!o),v[i]=(v[i+1]<<1|1)&o,r&&(v[i]|=(C[i+1]|C[i])<<1|1|C[i+1]),v[i]&D&&(y=M(e,{errors:r,currentLocation:h,expectedLocation:p,distance:n,ignoreLocation:u}),y<=f)){if(f=y,d=h,d<=p)break;a=Math.max(1,2*p-d)}}if(M(e,{errors:r+1,currentLocation:p,expectedLocation:p,distance:n,ignoreLocation:u})>f)break;C=v}const F={isMatch:d>=0,score:Math.max(.001,y)};if(g){const t=function(t=[],e=v.minMatchCharLength){let s=[],r=-1,n=-1,i=0;for(let h=t.length;i<h;i+=1){let h=t[i];h&&-1===r?r=i:h||-1===r||(n=i-1,n-r+1>=e&&s.push([r,n]),r=-1)}return t[i-1]&&i-r>=e&&s.push([r,i-1]),s}(m,o);t.length?a&&(F.indices=t):F.isMatch=!1}return F}function k(t){let e={};for(let s=0,r=t.length;s<r;s+=1){const n=t.charAt(s);e[n]=(e[n]||0)|1<<r-s-1}return e}const b=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class L{constructor(t,{location:e=v.location,threshold:s=v.threshold,distance:r=v.distance,includeMatches:n=v.includeMatches,findAllMatches:i=v.findAllMatches,minMatchCharLength:h=v.minMatchCharLength,isCaseSensitive:o=v.isCaseSensitive,ignoreDiacritics:a=v.ignoreDiacritics,ignoreLocation:u=v.ignoreLocation}={}){if(this.options={location:e,threshold:s,distance:r,includeMatches:n,findAllMatches:i,minMatchCharLength:h,isCaseSensitive:o,ignoreDiacritics:a,ignoreLocation:u},t=o?t:t.toLowerCase(),t=a?b(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const c=(t,e)=>{this.chunks.push({pattern:t,alphabet:k(t),startIndex:e})},l=this.pattern.length;if(l>E){let t=0;const e=l%E,s=l-e;for(;t<s;)c(this.pattern.substr(t,E),t),t+=E;if(e){const t=l-E;c(this.pattern.substr(t),t)}}else c(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:s,includeMatches:r}=this.options;if(t=e?t:t.toLowerCase(),t=s?b(t):t,this.pattern===t){let e={isMatch:!0,score:0};return r&&(e.indices=[[0,t.length-1]]),e}const{location:n,distance:i,threshold:h,findAllMatches:o,minMatchCharLength:a,ignoreLocation:u}=this.options;let c=[],l=0,p=!1;this.chunks.forEach((({pattern:e,alphabet:s,startIndex:f})=>{const{isMatch:d,score:g,indices:m}=B(t,e,s,{location:n+f,distance:i,threshold:h,findAllMatches:o,minMatchCharLength:a,includeMatches:r,ignoreLocation:u});d&&(p=!0),l+=g,d&&m&&(c=[...c,...m])}));let f={isMatch:p,score:p?l/this.chunks.length:1};return p&&r&&(f.indices=c),f}}class S{constructor(t){this.pattern=t}static isMultiMatch(t){return _(t,this.multiRegex)}static isSingleMatch(t){return _(t,this.singleRegex)}search(){}}function _(t,e){const s=t.match(e);return s?s[1]:null}class w extends S{constructor(t,{location:e=v.location,threshold:s=v.threshold,distance:r=v.distance,includeMatches:n=v.includeMatches,findAllMatches:i=v.findAllMatches,minMatchCharLength:h=v.minMatchCharLength,isCaseSensitive:o=v.isCaseSensitive,ignoreDiacritics:a=v.ignoreDiacritics,ignoreLocation:u=v.ignoreLocation}={}){super(t),this._bitapSearch=new L(t,{location:e,threshold:s,distance:r,includeMatches:n,findAllMatches:i,minMatchCharLength:h,isCaseSensitive:o,ignoreDiacritics:a,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class I extends S{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,s=0;const r=[],n=this.pattern.length;for(;(e=t.indexOf(this.pattern,s))>-1;)s=e+n,r.push([e,s-1]);const i=!!r.length;return{isMatch:i,score:i?0:1,indices:r}}}const O=[class extends S{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},I,class extends S{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends S{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends S{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends S{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends S{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},w],$=O.length,j=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const N=new Set([w.type,I.type]);class R{constructor(t,{isCaseSensitive:e=v.isCaseSensitive,ignoreDiacritics:s=v.ignoreDiacritics,includeMatches:r=v.includeMatches,minMatchCharLength:n=v.minMatchCharLength,ignoreLocation:i=v.ignoreLocation,findAllMatches:h=v.findAllMatches,location:o=v.location,threshold:a=v.threshold,distance:u=v.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:s,includeMatches:r,minMatchCharLength:n,findAllMatches:h,ignoreLocation:i,location:o,threshold:a,distance:u},t=e?t:t.toLowerCase(),t=s?b(t):t,this.pattern=t,this.query=function(t,e={}){return t.split("|").map((t=>{let s=t.trim().split(j).filter((t=>t&&!!t.trim())),r=[];for(let t=0,n=s.length;t<n;t+=1){const n=s[t];let i=!1,h=-1;for(;!i&&++h<$;){const t=O[h];let s=t.isMultiMatch(n);s&&(r.push(new t(s,e)),i=!0)}if(!i)for(h=-1;++h<$;){const t=O[h];let s=t.isSingleMatch(n);if(s){r.push(new t(s,e));break}}}return r}))}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:r,ignoreDiacritics:n}=this.options;t=r?t:t.toLowerCase(),t=n?b(t):t;let i=0,h=[],o=0;for(let r=0,n=e.length;r<n;r+=1){const n=e[r];h.length=0,i=0;for(let e=0,r=n.length;e<r;e+=1){const r=n[e],{isMatch:a,indices:u,score:c}=r.search(t);if(!a){o=0,i=0,h.length=0;break}if(i+=1,o+=c,s){const t=r.constructor.type;N.has(t)?h=[...h,...u]:h.push(u)}}if(i){let t={isMatch:!0,score:o/i};return s&&(t.indices=h),t}}return{isMatch:!1,score:1}}}const q=[];function W(t,e){for(let s=0,r=q.length;s<r;s+=1){let r=q[s];if(r.condition(t,e))return new r(t,e)}return new L(t,e)}const z="$and",H="$or",U="$path",K="$val",P=t=>!(!t[z]&&!t[H]),V=t=>({[z]:Object.keys(t).map((e=>({[e]:t[e]})))});function J(t,e,{auto:s=!0}={}){const n=t=>{let i=Object.keys(t);const o=(t=>!!t[U])(t);if(!o&&i.length>1&&!P(t))return n(V(t));if((t=>!r(t)&&u(t)&&!P(t))(t)){const r=o?t[U]:i[0],n=o?t[K]:t[r];if(!h(n))throw new Error((t=>`Invalid value for key ${t}`)(r));const a={keyId:y(r),pattern:n};return s&&(a.searcher=W(n,e)),a}let a={children:[],operator:i[0]};return i.forEach((e=>{const s=t[e];r(s)&&s.forEach((t=>{a.children.push(n(t))}))})),a};return P(t)||(t=V(t)),n(t)}function Z(t,e){const s=t.matches;e.matches=[],c(s)&&s.forEach((t=>{if(!c(t.indices)||!t.indices.length)return;const{indices:s,value:r}=t;let n={indices:s,value:r};t.key&&(n.key=t.key.src),t.idx>-1&&(n.refIndex=t.idx),e.matches.push(n)}))}function G(t,e){e.score=t.score}class Q{constructor(t,e={},s){this.options={...v,...e},this.options.useExtendedSearch,this._keyStore=new m(this.options.keys),this.setCollection(t,s)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof D))throw new Error("Incorrect 'index' type");this._myIndex=e||F(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){c(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=(()=>!1)){const e=[];for(let s=0,r=this._docs.length;s<r;s+=1){const n=this._docs[s];t(n,s)&&(this.removeAt(s),s-=1,r-=1,e.push(n))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:s,includeScore:r,shouldSort:n,sortFn:i,ignoreFieldNorm:a}=this.options;let u=h(t)?h(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=v.ignoreFieldNorm}){t.forEach((t=>{let s=1;t.matches.forEach((({key:t,norm:r,score:n})=>{const i=t?t.weight:null;s*=Math.pow(0===n&&i?Number.EPSILON:n,(i||1)*(e?1:r))})),t.score=s}))}(u,{ignoreFieldNorm:a}),n&&u.sort(i),o(e)&&e>-1&&(u=u.slice(0,e)),function(t,e,{includeMatches:s=v.includeMatches,includeScore:r=v.includeScore}={}){const n=[];return s&&n.push(Z),r&&n.push(G),t.map((t=>{const{idx:s}=t,r={item:e[s],refIndex:s};return n.length&&n.forEach((e=>{e(t,r)})),r}))}(u,this._docs,{includeMatches:s,includeScore:r})}_searchStringList(t){const e=W(t,this.options),{records:s}=this._myIndex,r=[];return s.forEach((({v:t,i:s,n})=>{if(!c(t))return;const{isMatch:i,score:h,indices:o}=e.searchIn(t);i&&r.push({item:t,idx:s,matches:[{score:h,value:t,norm:n,indices:o}]})})),r}_searchLogical(t){const e=J(t,this.options),s=(t,e,r)=>{if(!t.children){const{keyId:s,searcher:n}=t,i=this._findMatches({key:this._keyStore.get(s),value:this._myIndex.getValueForItemAtKeyId(e,s),searcher:n});return i&&i.length?[{idx:r,item:e,matches:i}]:[]}const n=[];for(let i=0,h=t.children.length;i<h;i+=1){const h=t.children[i],o=s(h,e,r);if(o.length)n.push(...o);else if(t.operator===z)return[]}return n},r=this._myIndex.records,n={},i=[];return r.forEach((({$:t,i:r})=>{if(c(t)){let h=s(e,t,r);h.length&&(n[r]||(n[r]={idx:r,item:t,matches:[]},i.push(n[r])),h.forEach((({matches:t})=>{n[r].matches.push(...t)})))}})),i}_searchObjectList(t){const e=W(t,this.options),{keys:s,records:r}=this._myIndex,n=[];return r.forEach((({$:t,i:r})=>{if(!c(t))return;let i=[];s.forEach(((s,r)=>{i.push(...this._findMatches({key:s,value:t[r],searcher:e}))})),i.length&&n.push({idx:r,item:t,matches:i})})),n}_findMatches({key:t,value:e,searcher:s}){if(!c(e))return[];let n=[];if(r(e))e.forEach((({v:e,i:r,n:i})=>{if(!c(e))return;const{isMatch:h,score:o,indices:a}=s.searchIn(e);h&&n.push({score:o,key:t,value:e,idx:r,norm:i,indices:a})}));else{const{v:r,n:i}=e,{isMatch:h,score:o,indices:a}=s.searchIn(r);h&&n.push({score:o,key:t,value:r,norm:i,indices:a})}return n}}Q.version="7.1.0",Q.createIndex=F,Q.parseIndex=function(t,{getFn:e=v.getFn,fieldNormWeight:s=v.fieldNormWeight}={}){const{keys:r,records:n}=t,i=new D({getFn:e,fieldNormWeight:s});return i.setKeys(r),i.setIndexRecords(n),i},Q.config=v,Q.parseQuery=J,function(...t){q.push(...t)}(R)}}]);