var chem;(()=>{"use strict";var e,r,t={8623:(e,r,t)=>{var o=t(6590);function n(e){return"smiles"===e}onmessage=({data:{op:e,data:r,argList:t,notationType:s}})=>{switch(e){case"chem_properties":postMessage(function(e,r,t){const s={},a=[];for(const t of r)s[t]=new Array(e.length).fill(null);return e.forEach((e,c)=>{try{const a=n(t)?o.Molecule.fromSmiles(e):o.Molecule.fromMolfile(e);r.forEach(e=>{s[e][c]=l[e].valueFunc(a)})}catch(e){a.push(e instanceof Error?e.message:e)}}),{res:s,errors:a}}(r,t,s));break;case"drug_likeness":postMessage(function(e,r){const t="Drug likeness score",l={[t]:new Array(e.length).fill(0)},s=[],a=new o.DruglikenessPredictor;return e.forEach((e,c)=>{try{const s=n(r)?o.Molecule.fromSmiles(e):o.Molecule.fromMolfile(e),u=a.assessDruglikeness(s);l[t][c]=u}catch(e){s.push(e instanceof Error?e.message:e)}}),{res:l,errors:s}}(r,s));case"Molfile_To_V3K":postMessage(function(e){var r;const t=new Array(null!==(r=null==e?void 0:e.length)&&void 0!==r?r:0).fill(""),n=[];return e.forEach((e,r)=>{if(e)try{const n=o.Molecule.fromMolfile(e).toMolfileV3();t[r]=n.replace("STERAC1","STEABS")}catch(e){n.push(e instanceof Error?e.message:e),t[r]=""}else t[r]=""}),{res:t,errors:n}}(r));default:postMessage(function(e,r,t){const l={},s=[];for(const t of r)l[t]=new Array(e.length).fill(0);const a=new o.ToxicityPredictor;return e.forEach((e,c)=>{try{const s=n(t)?o.Molecule.fromSmiles(e):o.Molecule.fromMolfile(e);r.forEach(e=>{l[e][c]=a.assessRisk(s,e)})}catch(e){s.push(e instanceof Error?e.message:e)}}),{res:l,errors:s}}(r,t,s))}};const l={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)}}}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var l=o[e]={exports:{}};return t[e].call(l.exports,l,l.exports,n),l.exports}n.m=t,n.x=()=>{var e=n.O(void 0,[590],()=>n(8623));return n.O(e)},e=[],n.O=(r,t,o,l)=>{if(!t){var s=1/0;for(i=0;i<e.length;i++){for(var[t,o,l]=e[i],a=!0,c=0;c<t.length;c++)(!1&l||s>=l)&&Object.keys(n.O).every(e=>n.O[e](t[c]))?t.splice(c--,1):(a=!1,l<s&&(s=l));if(a){e.splice(i--,1);var u=o();void 0!==u&&(r=u)}}return r}l=l||0;for(var i=e.length;i>0&&e[i-1][2]>l;i--)e[i]=e[i-1];e[i]=[t,o,l]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},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&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={623: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,l,s]=r;for(var a in l)n.o(l,a)&&(n.m[a]=l[a]);for(s&&s(n);o.length;)e[o.pop()]=1;t(r)}})(),r=n.x,n.x=()=>n.e(590).then(r);var l=n.x();chem=l})();
//# sourceMappingURL=623.js.map