3 lines
97 KiB
JavaScript
3 lines
97 KiB
JavaScript
|
function bruh_moment(){alert("this is a bruh moment")}function get_smiles_from_element_text(t){t=`https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/${document.getElementById(t).value}/property/CanonicalSMILES/JSON`;console.log(t),fetch(t).then(t=>t.json()).then(t=>{console.log("Aye, got that dub from PubChem"),document.getElementById("inputSMILES").value=t.PropertyTable.Properties[0].CanonicalSMILES}).catch(t=>{throw bruh_moment(),t})}function draw_me_like_one_of_your_french_girls(t){t.condense_abbreviations();var e=document.getElementById("draw-canvas-2");t.draw_to_canvas(e,-1,-1)}function calculate_and_disperse(t){try{var e=JSON.parse(t.get_descriptors())}catch(t){alert("oo wee, failed to calculate descriptors senpai")}let n=document.getElementById("analyse_table");var i=Object.keys(e);for(let t=0;t<i.length;t++){var o=i[t];console.log(o,e[o]);var r=n.insertRow(-1),a=r.insertCell(0),s=r.insertCell(-1),r=document.createTextNode(o),o=document.createTextNode(e[o]);a.appendChild(r),s.appendChild(o)}}function analyse_me_senpai(t){t=document.getElementById(t).value,t=Module.get_mol(t);draw_me_like_one_of_your_french_girls(t),calculate_and_disperse(t)}!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Popper=e()}(this,function(){"use strict";var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,i=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(n&&0<=navigator.userAgent.indexOf(t[e]))return 1;return 0}();var o=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},i))}};function r(t){return t&&"[object Function]"==={}.toString.call(t)}function f(t,e){if(1!==t.nodeType)return[];t=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?t[e]:t}function u(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function c(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=f(t),n=e.overflow,i=e.overflowX,e=e.overflowY;return/(auto|scroll|overlay)/.test(n+e+i)?t:c(u(t))}function d(t){return t&&t.referenceNode?t.referenceNode:t}var e=n&&!(!window.MSInputMethodContext||!document.documentMode),a=n&&/MSIE 10/.test(navigator.userAgent);function p(t){return 11===t?e:10!==t&&e||a}function g(t){if(!t)return document.documentElement;for(var e=p(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===f(n,"position")?g(n):n:(t?t.ownerDocument:document).documentElement}function s(t){return null!==t.parentNode?s(t.parentNode):t}function h(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,n=document.createRange();n.setStart(i,0),n.setEnd(o,0);n=n.commonAncestorContainer;if(t!==n&&e!==n||i.contains(o))return"BODY"===(o=(i=n).nodeName)||"HTML"!==o&&g(i.firstElementChild)!==i?g(n):n;n=s(t);return n.host?h(n.host,e):h(t,s(e).host)}function m(t,e){var n="top"===(1<arguments.length&&void 0!==e?e:"top")?"scrollTop":"scrollLeft",e=t.nodeName;if("BODY"!==e&&"HTML"!==e)return t[n];e=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||e)[n]}function l(t,e){var n="x"===e?"Left":"Top",e="Left"==n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+e+"Width"])}function _(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],p(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function v(t){var e=t.body,n=t.documentElement,t=p(10)&&getComputedStyle(n);return{height:_("Height",e,n,t),width:_("Width",e,n,t)}}var b=function(t,e){if(!(t instan
|
||
|
//# sourceMappingURL=main.min.js.map
|