vare;!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define([],t):"object"==typeofexports?exports.OptimalSelect=t():e.OptimalSelect=t()}(this,function(){returnfunction(r){vari={};functionn(e){if(i[e])returni[e].exports;vart=i[e]={i:e,l:!1,exports:{}};returnr[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}returnn.m=r,n.c=i,n.i=function(e){returne},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,"a",t),t},n.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertNodeList=function(e){for(vart=e.length,r=newArray(t),i=0;i<t;i++)r[i]=e[i];returnr},t.escapeValue=function(e){returne&&e.replace(/['"`\\/:\?&!#$%^()[\]{|}*+;,.<=>@~]/g,"\\$&").replace(/\n/g,"A")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCommonAncestor=function(e){vart=(1<arguments.length&&void0!==arguments[1]?arguments[1]:{}).root,i=void0===t?document:t,n=[];e.forEach(function(e,t){for(varr=[];e!==i;)e=e.parentNode,r.unshift(e);n[t]=r}),n.sort(function(e,t){returne.length-t.length});for(varr=n.shift(),a=null,o=function(){vart=r[s],e=n.some(function(e){return!e.some(function(e){returne===t})});if(e)return"break";a=t},s=0,u=r.length;s<u;s++){varl=o();if("break"===l)break}returna},t.getCommonProperties=function(e){varc={classes:[],attributes:{},tag:null};returne.forEach(function(e){varn,i,t,r,a=c.classes,o=c.attributes,s=c.tag;if(void0!==a){varu=e.getAttribute("class");u?(u=u.trim().split(" "),a.length?(a=a.filter(function(t){returnu.some(function(e){returne===t})})).length?c.classes=a:deletec.classes:c.classes=u):deletec.classes}if(void0!==o&&(n=e.attributes,i=Object.keys(n).reduce(function(e,t){varr=n[t],i=r.name;returnr&&"class"!==i&&(e[i]=r.value),e},{}),t=Object.keys(i),r=Object.keys(o),t.length?r.length?(o=r.reduce(function(e,t){varr=o[t];returnr===i[t]&&(e[t]=r),e},{}),Object.keys(o).length?c.attributes=o:deletec.attributes):c.attributes=i:deletec.attributes),void0!==s){varl=e.tagName.toLowerCase();s?l!==s&&deletec.tag:c.tag=l}}),c}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){varr=2<arguments.length&&void0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=t.length?(0,h.convertNodeList)(t):[t]);if(!t.length||t.some(function(e){return1!==e.nodeType}))thrownewError('Invalid input - to compare HTMLElements its necessary to provide a reference of the selected node(s)! (missing "elements")');(0,c.default)(t[0],r);vari=e.replace(/> /g,">").split(/\s+(?=(?:(?:[^"]*"){2})*[^"]*$)/);if(i.length<2)returnf("",e,"",t);varn=[i.pop()];for(;1<i.length;){vara=i.pop(),o=i.join(" "),s=n.join(" "),u=o+" "+s,l=document.querySelectorAll(u);l.length!==t.length&&n.unshift(f(o,a,s,t))}n.unshift(i[0]),(i=n)[0]=f("",i[0],i.slice(1).join(" "),t),i[i.length-1]=f(i.slice(0,-1).join(" "),i[i.length-1],"",t);returni.join(" ").replace(/>/g,"> ").trim()};vari,n=r(3),c=(i=n)&&i.__esModule?i:{default:i},h=r(0);functionf(r,i,n,a){if(r.length&&(r+=" "),n.length&&(n=" "+n),/\[*\]/.test(i)){vare=i.replace(/=.*$/,"]"),o=""+r+e+n;if(g(document.querySelectorAll(o),a))i=e;elsefor(vars=document.querySelectorAll(""+r+e),t=function(){vart=s[u];if(a.some(function(e){returnt.contains(e)})){vare=t.tagName.toLowerCase();returno=""+r+e+n,g(document.querySelectorAll(o),a)&&(i=e),"break"}},u=0,l=s.length;u<l;u++){if("break"===t())break}}if(/>/.test(i)){varc=i.replace(/>/,"");o=""+r+c+n;g(document.querySelectorAll(o),a)&&(i=c)}if(/:nth-child/.test(i)){varh=i.replace(/nth-child/g,"nth-of-type");o=""+r+h+n;g(document.querySelectorAll(o),a)&&(i=h)}if(/\.\S+\.\S+/.test(i)){for(varf=i.trim().split(".").slice(1).map(function(e){return"."+e}).sort(function(e,t){returne.length-t.length});f.length;){vard=i.replace(f.shif