From f435359675d4d72ad8772e68977181b3c3c8a465 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sun, 14 Mar 2021 16:12:06 +0530 Subject: updating web version --- docs/js/main.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/js/main.min.js') diff --git a/docs/js/main.min.js b/docs/js/main.min.js index 5a96393..8875411 100644 --- a/docs/js/main.min.js +++ b/docs/js/main.min.js @@ -1,2 +1,2 @@ -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=n.clientWidth&&t>=n.clientHeight}),e=(0l[t]&&!i.escapeWithReference&&(n=Math.min(u[e],l[t]-("right"===t?u.width:u.height))),w({},e,n)}};return s.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";u=E({},u,c[e](t))}),t.offsets.popper=u,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=(r=t.offsets).popper,n=r.reference,i=t.placement.split("-")[0],o=Math.floor,r=(a=-1!==["top","bottom"].indexOf(i))?"right":"bottom",i=a?"left":"top",a=a?"width":"height";return e[r]o(n[r])&&(t.offsets.popper[i]=o(n[r])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){if(!Q(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=(c=t.offsets).popper,r=c.reference,a=-1!==["left","right"].indexOf(i),s=a?"height":"width",l=a?"Top":"Left",u=l.toLowerCase(),e=a?"left":"top",c=a?"bottom":"right",i=k(n)[s];return r[c]-io[c]&&(t.offsets.popper[u]+=r[u]+i-o[c]),t.offsets.popper=T(t.offsets.popper),a=r[u]+r[s]/2-i/2,c=f(t.instance.popper),r=parseFloat(c["margin"+l]),l=parseFloat(c["border"+l+"Width"]),l=a-t.offsets.popper[u]-r-l,l=Math.max(Math.min(o[s]-i,l),0),t.arrowElement=n,t.offsets.arrow=(w(n={},u,Math.round(l)),w(n,e,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(u,c){if(I(u.instance.modifiers,"inner"))return u;if(u.flipped&&u.placement===u.originalPlacement)return u;var f=C(u.instance.popper,u.instance.reference,c.padding,c.boundariesElement,u.positionFixed),d=u.placement.split("-")[0],p=S(d),h=u.placement.split("-")[1]||"",m=[];switch(c.behavior){case K:m=[d,p];break;case V:m=Y(d);break;case X:m=Y(d,!0);break;default:m=c.behavior}return m.forEach(function(t,e){if(d!==t||m.length===e+1)return u;d=u.placement.split("-")[0],p=S(d);var n=u.offsets.popper,i=u.offsets.reference,o=Math.floor,r="left"===d&&o(n.right)>o(i.left)||"right"===d&&o(n.left)o(i.top)||"bottom"===d&&o(n.top)o(f.right),l=o(n.top)o(f.bottom),i="left"===d&&a||"right"===d&&s||"top"===d&&l||"bottom"===d&&t,n=-1!==["top","bottom"].indexOf(d),o=!!c.flipVariations&&(n&&"start"===h&&a||n&&"end"===h&&s||!n&&"start"===h&&l||!n&&"end"===h&&t),l=!!c.flipVariationsByContent&&(n&&"start"===h&&s||n&&"end"===h&&a||!n&&"start"===h&&t||!n&&"end"===h&&l),l=o||l;(r||i||l)&&(u.flipped=!0,(r||i)&&(d=m[e+1]),l&&(h="end"===(l=h)?"start":"start"===l?"end":l),u.placement=d+(h?"-"+h:""),u.offsets.popper=E({},u.offsets.popper,N(u.instance.popper,u.offsets.reference,u.placement)),u=P(u.instance.modifiers,u,"flip"))}),u},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=(a=t.offsets).popper,o=a.reference,r=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return i[r?"left":"top"]=o[n]-(a?i[r?"width":"height"]:0),t.placement=S(e),t.offsets.popper=T(i),t}},hide:{order:800,enabled:!0,fn:function(t){if(!Q(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=x(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottomn.right||e.top>n.bottom||e.rightthis._items.length-1||t<0))if(this._isSliding)d.default.one(this._element,C,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();this._slide(ndocument.documentElement.clientHeight)||(this._element.style.overflowY="hidden"),this._element.classList.add(M),e=p(this._dialog),s.default.off(this._element,"transitionend"),s.default.one(this._element,"transitionend",function(){n._element.classList.remove(M),t||(s.default.one(n._element,"transitionend",function(){n._element.style.overflowY=""}),h(n._element,e))}),h(this._element,e),this._element.focus())},n._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;(!this._isBodyOverflowing&&t&&!w||this._isBodyOverflowing&&!t&&w)&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),(this._isBodyOverflowing&&!t&&!w||!this._isBodyOverflowing&&t&&w)&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)

'}),v=o({},n.default.DefaultType,{content:"(string|element|function)"}),b={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,INSERTED:"inserted"+h,CLICK:"click"+h,FOCUSIN:"focusin"+h,FOCUSOUT:"focusout"+h,MOUSEENTER:"mouseenter"+h,MOUSELEAVE:"mouseleave"+h},n=function(t){function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),l(e.prototype.constructor=e,n);var e,n,o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.setContent=function(){var t=this.getTipElement();this.setElementContent(a.default.findOne(".popover-header",t),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this._element)),this.setElementContent(a.default.findOne(".popover-body",t),e),t.classList.remove("fade","show")},o._addAttachmentClass=function(t){this.getTipElement().classList.add(m+"-"+this.updateAttachment(t))},o._getContent=function(){return this._element.getAttribute("data-bs-content")||this.config.content},o._cleanTipClass=function(){var e=this.getTipElement(),t=e.getAttribute("class").match(g);null!==t&&0=this._offsets[i]&&(void 0===this._offsets[i+1]||t .dropdown-menu .active",e.parentNode))&&i.classList.remove(g),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)),t.classList.add(g),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),t.offsetHeight,t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&t.parentNode.classList.contains("dropdown-menu")&&(t.closest(".dropdown")&&s.default.find(".dropdown-toggle").forEach(function(t){return t.classList.add(g)}),t.setAttribute("aria-expanded",!0)),n&&n()},n.jQueryInterface=function(e){return this.each(function(){var t=r.default.getData(this,m)||new n(this);if("string"==typeof e){if(void 0===t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},e=n,i=[{key:"DATA_KEY",get:function(){return m}}],(o=null)&&l(e.prototype,o),i&&l(e,i),n}(o(i).default);return a.default.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',function(t){t.preventDefault(),(r.default.getData(this,m)||new b(this)).show()}),d="tab",p=b,h=function(){var t,e,n=(t=window.jQuery)&&!document.body.hasAttribute("data-bs-no-jquery")?t:null;n&&(e=n.fn[d],n.fn[d]=p.jQueryInterface,n.fn[d].Constructor=p,n.fn[d].noConflict=function(){return n.fn[d]=e,p.jQueryInterface})},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",h):h(),b}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("./dom/data.js"),require("./dom/event-handler.js"),require("./dom/manipulator.js"),require("./base-component.js")):"function"==typeof define&&define.amd?define(["./dom/data","./dom/event-handler","./dom/manipulator","./base-component"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).Toast=e(t.Data,t.EventHandler,t.Manipulator,t.Base)}(this,function(t,e,n,i){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=o(t),a=o(e),s=o(n);function l(t,e){for(var n=0;n
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:o,popperConfig:null},B={HIDE:"hide"+S,HIDDEN:"hidden"+S,SHOW:"show"+S,SHOWN:"shown"+S,INSERTED:"inserted"+S,CLICK:"click"+S,FOCUSIN:"focusin"+S,FOCUSOUT:"focusout"+S,MOUSEENTER:"mouseenter"+S,MOUSELEAVE:"mouseleave"+S},H="fade",F="show",W="show",R="hover",Q="focus",n=function(n){function i(t,e){if(void 0===l)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");return(t=n.call(this,t)||this)._isEnabled=!0,t._timeout=0,t._hoverState="",t._activeTrigger={},t._popper=null,t.config=t._getConfig(e),t.tip=null,t._setListeners(),t}e=n,(t=i).prototype=Object.create(e.prototype),m(t.prototype.constructor=t,e);var t,e,o=i.prototype;return o.enable=function(){this._isEnabled=!0},o.disable=function(){this._isEnabled=!1},o.toggleEnabled=function(){this._isEnabled=!this._isEnabled},o.toggle=function(t){this._isEnabled&&(t?((t=this._initializeOnDelegatedTarget(t))._activeTrigger.click=!t._activeTrigger.click,t._isWithActiveTrigger()?t._enter(null,t):t._leave(null,t)):this.getTipElement().classList.contains(F)?this._leave(null,this):this._enter(null,this))},o.dispose=function(){clearTimeout(this._timeout),c.default.off(this._element,this.constructor.EVENT_KEY),c.default.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.parentNode&&this.tip.parentNode.removeChild(this.tip),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.config=null,this.tip=null,n.prototype.dispose.call(this)},o.show=function(){var t,e,n,i,o=this;if("none"===this._element.style.display)throw new Error("Please use show on visible elements");this.isWithContent()&&this._isEnabled&&(n=c.default.trigger(this._element,this.constructor.Event.SHOW),t=(null===(e=b(this._element))?this._element.ownerDocument.documentElement:e).contains(this._element),!n.defaultPrevented&&t&&(e=this.getTipElement(),n=function(t){for(;t+=Math.floor(1e6*Math.random()),document.getElementById(t););return t}(this.constructor.NAME),e.setAttribute("id",n),this._element.setAttribute("aria-describedby",n),this.setContent(),this.config.animation&&e.classList.add(H),t="function"==typeof this.config.placement?this.config.placement.call(this,e,this._element):this.config.placement,n=this._getAttachment(t),this._addAttachmentClass(n),t=this._getContainer(),u.default.setData(e,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||t.appendChild(e),c.default.trigger(this._element,this.constructor.Event.INSERTED),this._popper=r.createPopper(this._element,e,this._getPopperConfig(n)),e.classList.add(F),(n="function"==typeof this.config.customClass?this.config.customClass():this.config.customClass)&&(e=e.classList).add.apply(e,n.split(" ")),"ontouchstart"in document.documentElement&&(i=[]).concat.apply(i,document.body.children).forEach(function(t){c.default.on(t,"mouseover",y())}),n=function(){var t=o._hoverState;o._hoverState=null,c.default.trigger(o._element,o.constructor.Event.SHOWN),"out"===t&&o._leave(null,o)},this.tip.classList.contains(H)?(i=g(this.tip),c.default.one(this.tip,"transitionend",n),v(this.tip,i)):n()))},o.hide=function(){var t,e,n,i=this;this._popper&&(t=this.getTipElement(),e=function(){i._hoverState!==W&&t.parentNode&&t.parentNode.removeChild(t),i._cleanTipClass(),i._element.removeAttribute("aria-describedby"),c.default.trigger(i._element,i.constructor.Event.HIDDEN),i._popper&&(i._popper.destroy(),i._popper=null)},c.default.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented||(t.classList.remove(F),"ontouchstart"in document.documentElement&&(n=[]).concat.apply(n,document.body.children).forEach(function(t){return c.default.off(t,"mouseover",y)}),this._activeTrigger.click=!1,this._activeTrigger[Q]=!1,this._activeTrigger[R]=!1,this.tip.classList.contains(H)?(n=g(t),c.default.one(t,"transitionend",e),v(t,n)):e(),this._hoverState=""))},o.update=function(){null!==this._popper&&this._popper.update()},o.isWithContent=function(){return Boolean(this.getTitle())},o.getTipElement=function(){if(this.tip)return this.tip;var t=document.createElement("div");return t.innerHTML=this.config.template,this.tip=t.children[0],this.tip},o.setContent=function(){var t=this.getTipElement();this.setElementContent(d.default.findOne(".tooltip-inner",t),this.getTitle()),t.classList.remove(H,F)},o.setElementContent=function(t,e){if(null!==t)return"object"==typeof e&&_(e)?(e.jquery&&(e=e[0]),void(this.config.html?e.parentNode!==t&&(t.innerHTML="",t.appendChild(e)):t.textContent=e.textContent)):void(this.config.html?(this.config.sanitize&&(e=O(e,this.config.allowList,this.config.sanitizeFn)),t.innerHTML=e):t.textContent=e)},o.getTitle=function(){return this._element.getAttribute("data-bs-original-title")||("function"==typeof this.config.title?this.config.title.call(this._element):this.config.title)},o.updateAttachment=function(t){return"right"===t?"end":"left"===t?"start":t},o._initializeOnDelegatedTarget=function(t,e){var n=this.constructor.DATA_KEY;return(e=e||u.default.getData(t.delegateTarget,n))||(e=new this.constructor(t.delegateTarget,this._getDelegateConfig()),u.default.setData(t.delegateTarget,n,e)),e},o._getOffset=function(){var e=this,n=this.config.offset;return"string"==typeof n?n.split(",").map(function(t){return Number.parseInt(t,10)}):"function"==typeof n?function(t){return n(t,e._element)}:n},o._getPopperConfig=function(t){var e=this,t={placement:t,modifiers:[{name:"flip",options:{altBoundary:!0,fallbackPlacements:this.config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this.config.boundary}},{name:"arrow",options:{element:"."+this.constructor.NAME+"-arrow"}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:function(t){return e._handlePopperPlacementChange(t)}}],onFirstUpdate:function(t){t.options.placement!==t.placement&&e._handlePopperPlacementChange(t)}};return h({},t,"function"==typeof this.config.popperConfig?this.config.popperConfig(t):this.config.popperConfig)},o._addAttachmentClass=function(t){this.getTipElement().classList.add(N+"-"+this.updateAttachment(t))},o._getContainer=function(){return!1===this.config.container?document.body:_(this.config.container)?this.config.container:d.default.findOne(this.config.container)},o._getAttachment=function(t){return M[t.toUpperCase()]},o._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(t){var e;"click"===t?c.default.on(n._element,n.constructor.Event.CLICK,n.config.selector,function(t){return n.toggle(t)}):"manual"!==t&&(e=t===R?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,t=t===R?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT,c.default.on(n._element,e,n.config.selector,function(t){return n._enter(t)}),c.default.on(n._element,t,n.config.selector,function(t){return n._leave(t)}))}),this._hideModalHandler=function(){n._element&&n.hide()},c.default.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=h({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},o._fixTitle=function(){var t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");!t&&"string"==e||(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))},o._enter=function(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?Q:R]=!0),e.getTipElement().classList.contains(F)||e._hoverState===W?e._hoverState=W:(clearTimeout(e._timeout),e._hoverState=W,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===W&&e.show()},e.config.delay.show):e.show())},o._leave=function(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?Q:R]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){"out"===e._hoverState&&e.hide()},e.config.delay.hide):e.hide())},o._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},o._getConfig=function(t){var o,r,a,e=f.default.getDataAttributes(this._element);return Object.keys(e).forEach(function(t){P.has(t)&&delete e[t]}),t&&"object"==typeof t.container&&t.container.jquery&&(t.container=t.container[0]),"number"==typeof(t=h({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),o=A,r=t,a=this.constructor.DefaultType,Object.keys(a).forEach(function(t){var e,n=a[t],i=r[t],e=i&&_(i)?"element":null==(e=i)?""+e:{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(e))throw new TypeError(o.toUpperCase()+': Option "'+t+'" provided type "'+e+'" but expected type "'+n+'".')}),t.sanitize&&(t.template=O(t.template,t.allowList,t.sanitizeFn)),t},o._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},o._cleanTipClass=function(){var e=this.getTipElement(),t=e.getAttribute("class").match(x);null!==t&&0{const o=document.createElement("a");n=new Blob([e],{type:n});o.href=URL.createObjectURL(n),o.download=t,o.click(),URL.revokeObjectURL(o.href)};function get_smiles_from_element_text(e){e=`https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/${document.getElementById(e).value}/property/CanonicalSMILES/JSON`;console.log(e),fetch(e).then(e=>e.json()).then(e=>{console.log("Aye, got that dub from PubChem"),document.getElementById("inputSMILES").value=e.PropertyTable.Properties[0].CanonicalSMILES}).catch(e=>{throw bruh_moment(),e})}function draw_me_like_one_of_your_french_girls(e){e.condense_abbreviations();var t=document.getElementById("draw-output"),e=e.get_svg();t.outerHTML="
"+e+"
",document.getElementById("drawing-1").children[0].setAttribute("height","100%"),document.getElementById("drawing-1").children[0].setAttribute("width","100%")}function calculate_and_disperse(e){const t=["NumUnspecifiedAtomStereoCenters","NumAliphaticHeterocycles","NumSaturatedHeterocycles","NumAromaticHeterocycles","NumAmideBonds","NumAromaticRings","NumAliphaticRings","NumSaturatedRings","NumSpiroAtoms","NumBridgeheadAtoms","NumAtomStereoCenters"];try{var n=JSON.parse(e.get_descriptors())}catch(e){alert("oo wee, failed to calculate descriptors senpai")}let o=document.getElementById("analyse_table");var r=Object.keys(n);for(let e=0;e