var chem;(()=>{"use strict";var e,r,t={3318:(e,r,t)=>{var o=t(9547);const n={MW:{name:"MW",type:"float",valueFunc:e=>e.getMolecularFormula().absoluteWeight},HBA:{name:"HBA",type:"int",valueFunc:e=>new o.MoleculeProperties(e).acceptorCount},HBD:{name:"HBD",type:"int",valueFunc:e=>new o.MoleculeProperties(e).donorCount},LogP:{name:"LogP",type:"float",valueFunc:e=>new o.MoleculeProperties(e).logP},LogS:{name:"LogS",type:"float",valueFunc:e=>new o.MoleculeProperties(e).logS},PSA:{name:"PSA",type:"float",valueFunc:e=>new o.MoleculeProperties(e).polarSurfaceArea},"Rotatable bonds":{name:"Rotatable bonds",type:"int",valueFunc:e=>new o.MoleculeProperties(e).rotatableBondCount},"Stereo centers":{name:"Stereo centers",type:"int",valueFunc:e=>new o.MoleculeProperties(e).stereoCenterCount},"Molecule charge":{name:"Molecule charge",type:"int",valueFunc:e=>function(e){const r=e.getAllAtoms();let t=0;for(let o=0;o<=r;++o)t+=e.getAtomCharge(o);return t}(e)}};function s(e){return"smiles"===e}onmessage=({data:{op:e,data:r,argList:t,notationType:l}})=>{switch(e){case"chem_properties":postMessage(function(e,r,t){const l={},c=[];for(const t of r)l[t]=new Array(e.length).fill(null);return e.forEach(((e,a)=>{try{const c=s(t)?o.Molecule.fromSmiles(e):o.Molecule.fromMolfile(e);r.forEach((e=>{l[e][a]=n[e].valueFunc(c)}))}catch(e){c.push(e instanceof Error?e.message:e)}})),{res:l,errors:c}}(r,t,l));break;case"drug_likeness":postMessage(function(e,r){const t="Drug likeness score",n={[t]:new Array(e.length).fill(0)},l=[],c=new o.DruglikenessPredictor;return e.forEach(((e,a)=>{try{const l=s(r)?o.Molecule.fromSmiles(e):o.Molecule.fromMolfile(e),u=c.assessDruglikeness(l);n[t][a]=u}catch(e){l.push(e instanceof Error?e.message:e)}})),{res:n,errors:l}}(r,l));default:postMessage(function(e,r,t){const n={},l=[];for(const t of r)n[t]=new Array(e.length).fill(0);const c=new o.ToxicityPredictor;return e.forEach(((e,a)=>{try{const l=s(t)?o.Molecule.fromSmiles(e):o.Molecule.fromMolfile(e);r.forEach((e=>{n[e][a]=c.assessRisk(l,e)}))}catch(e){l.push(e instanceof Error?e.message:e)}})),{res:n,errors:l}}(r,t,l))}}}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var s=o[e]={exports:{}};return t[e].call(s.exports,s,s.exports,n),s.exports}n.m=t,n.x=()=>{var e=n.O(void 0,[547],(()=>n(3318)));return n.O(e)},e=[],n.O=(r,t,o,s)=>{if(!t){var l=1/0;for(i=0;i<e.length;i++){for(var[t,o,s]=e[i],c=!0,a=0;a<t.length;a++)(!1&s||l>=s)&&Object.keys(n.O).every((e=>n.O[e](t[a])))?t.splice(a--,1):(c=!1,s<l&&(l=s));if(c){e.splice(i--,1);var u=o();void 0!==u&&(r=u)}}return r}s=s||0;for(var i=e.length;i>0&&e[i-1][2]>s;i--)e[i]=e[i-1];e[i]=[t,o,s]},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((r,t)=>(n.f[t](e,r),r)),[])),n.u=e=>e+".js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var r=n.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");t.length&&(e=t[t.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={318:1};n.f.i=(r,t)=>{e[r]||importScripts(n.p+n.u(r))};var r=self.webpackChunkchem=self.webpackChunkchem||[],t=r.push.bind(r);r.push=r=>{var[o,s,l]=r;for(var c in s)n.o(s,c)&&(n.m[c]=s[c]);for(l&&l(n);o.length;)e[o.pop()]=1;t(r)}})(),r=n.x,n.x=()=>n.e(547).then(r);var s=n.x();chem=s})();
//# sourceMappingURL=318.js.map