var chem;(()=>{"use strict";var e,r,t={4111:(e,r,t)=>{var n=t(6066);const o=e=>null==e;var a=t(2780),s=t(8774);onmessage=async e=>{const{values:r,startIdx:t,endIdx:c,threshold:l,fnNames:i,opts:h,aggregationMethod:p,weights:u}=e.data;try{const e=[],f=[],g=[],v=c-t,d=function(e,r){return e===n.G.MANHATTAN?e=>e.reduce((e,t,n)=>e+t*r[n],0):e=>{const t=e.reduce((e,t,n)=>e+(t*r[n])**2,0);return Math.sqrt(t)}}(p,u);r.forEach((e,t)=>{if((0,a.lW)(i[t]))for(let n=0;n<e.length;++n)o(e[n])||(r[t][n]=new s.A(r[t][n]._data,r[t][n]._length))});let m=0;const w=new Array(i.length).fill(null).map((e,r)=>new a.t$(i[r]).getMeasure(h[r])),b=r[0].length-2-Math.floor(Math.sqrt(-8*t+4*r[0].length*(r[0].length-1)-7)/2-.5),y=t-r[0].length*b+Math.floor((b+1)*(b+2)/2);let x=b,O=y;for(;m<v;){const t=w.map((e,t)=>o(r[t][x])||o(r[t][O])?1:e(r[t][x],r[t][O])),n=1===t.length?t[0]:d(t);1-n>=l&&(e.push(x),f.push(O),g.push(n)),m++,O++,O===r[0].length&&(x++,O=x+1)}const A=new Int32Array(e),M=new Int32Array(f),j=new Float32Array(g);postMessage({i:A,j:M,distance:j})}catch(e){postMessage({error:e})}}}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,o.x=()=>{var e=o.O(void 0,[242,589],()=>o(4111));return o.O(e)},e=[],o.O=(r,t,n,a)=>{if(!t){var s=1/0;for(h=0;h<e.length;h++){for(var[t,n,a]=e[h],c=!0,l=0;l<t.length;l++)(!1&a||s>=a)&&Object.keys(o.O).every(e=>o.O[e](t[l]))?t.splice(l--,1):(c=!1,a<s&&(s=a));if(c){e.splice(h--,1);var i=n();void 0!==i&&(r=i)}}return r}a=a||0;for(var h=e.length;h>0&&e[h-1][2]>a;h--)e[h]=e[h-1];e[h]=[t,n,a]},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((r,t)=>(o.f[t](e,r),r),[])),o.u=e=>e+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var r=o.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={111:1};o.f.i=(r,t)=>{e[r]||importScripts(o.p+o.u(r))};var r=self.webpackChunkchem=self.webpackChunkchem||[],t=r.push.bind(r);r.push=r=>{var[n,a,s]=r;for(var c in a)o.o(a,c)&&(o.m[c]=a[c]);for(s&&s(o);n.length;)e[n.pop()]=1;t(r)}})(),r=o.x,o.x=()=>Promise.all([o.e(242),o.e(589)]).then(r);var a=o.x();chem=a})();
//# sourceMappingURL=111.js.map