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