/* qS[A]/matches polyfill | @version 1.0 | MIT License | github.com/termi */ ;(function(){ var d=void 0,j=!0,s=null,u=!1,w=window;function C(){throw Error("SYNTAX_ERR");} function aa(a,c,e,i,g,k,t,z,f){var P=e||[],q=!!g,x=!q&&c&&"number"==typeof c.length&&c.nodeType===d,n=q&&(c={})||(!c?document:x?c[0]:c),Q,B=0,b,y,l,J=ba[(a[1]||"").replace(ca,"")]||0,W=2p&&h[2])ma.test(h[2])?"even"===h[2]?h[2]=[s,2]:"odd"===h[2]?h[2]=[s,2,"%",1]:(h[2]=h[2].match(na),h[2][0]=s):h[2]=[s,0,"%",h[2]],h[3]=p?"nodeIndexLast":"nodeIndex",h[4]=p?"lastChild":"firstChild",h[5]=p?"previousSibling":"nextSibling"; else if(17===p)f||C(),q=j,g=x?c:[c],a[r]=s;else if(12==p&&(m=h[2]))oa.test(m.charAt(0))&&oa.test(m.charAt(m.length-1))&&(h[2]=m.substr(1,m.length-2));1==a.length&&a[0]===s&&(a=s)}q&&(J=0);if(1==J)if(L){L=9===n.nodeType?n:n.ownerDocument;if(pa){g=L.getElementsByName(F);H=[];for(r=-1;b=g[++r];)b.id==F&&H.push(b)}else{H=[];for(g=[];b=L.getElementById(F);)g.push(b),m="id"in b?b.id:b.getAttribute("id"),m==F&&H.push(b),b.setAttribute("id",F+" _");for(r=-1;b=g[++r];)b.setAttribute("id",F)}g=s;L=u}else M= M&&!I,R=R&&I&&!!G;q=(!x||1===c.length)&&!t&&!i&&!A&&!a&&!R&&!M&&!L&&!z;do{switch(J){case 0:b=g[0];break;case 1:if(F)if(g=[],H.length)if(1+~\s])\s*/g,Ca=/~=/g,Fa=/(^|,|>|\+|~|\s).*?(?=[,>+~\s]|$)/g,da=/\./g,ra=/\s/g,Ga=/^([,>+~\s])?([\w\-\|\*]*)#?([\w-]*)((?:\.?[\w-])*)(\[.+\])?(?::([^!]+))?(!)?$/,ia=/^\[?['"]?(.*?)['"]?(?:([\*~&\^\$@!]?=)['"]?(.*?)['"]?)?\]?$/,ka=/^([^(]+)(?:\((.+)\))?$/,Da=/\-child\((\dn)\+(\d)\)/g,Ea="-child\\($1%$2\\)",na=/(?:([-]?\d*)n)?(?:(%|-)(\d*))?/,Ia=/([,>+~\s])/,Ja=/^\s+/, ca=/\s/,ma=/\D/,oa=/['"]/,ba={"":1,",":1,">":2,"~":3,"+":4},ja={"":1,"=":2,"&=":3,"^=":4,"$=":5,"*=":6,"|=":7,"!=":8,"@=":9},la={"nth-child":0,"nth-last-child":1,"only-child":2,"first-child":3,"last-child":4,root:5,empty:6,checked:7,lang:8,enabled:9,disabled:10,selected:11,contains:12,not:13,matches:14,"read-only":15,"read-write":16,scope:17,focus:18,"nth-match":19,column:20,"nth-column":21},Ka={checked:s,disabled:s,ismap:s,multiple:s,readonly:s,selected:s},La={value:"defaultValue",checked:"defaultChecked", selected:"defaultSelected"},Ma={action:s,cite:s,codebase:s,data:s,href:s,longdesc:s,lowsrc:s,src:s,usemap:s},Y=document.documentElement;function U(a){for(var c=a.length>>>0,e=new Z,i=0;iparent.NodeList=Array;<\/script>"),Z=w.NodeList);I||(Na=function(a){var c=[],e=this.all,i,g=-1;if(e.length)for(a=RegExp((a+"").replace(K,O));i=e[++g];)i.className&&a.test(i.className)&&c.push(i);return c}); qa=Oa?function(a,c){c=c.toLowerCase();return La[c]!==d?a[La[c]]||"":Ma[c]!==d?a.getAttribute(c,2)||"":Ka[c]!==d?a.getAttribute(c)?c:"":(a=a.getAttributeNode(c))&&a.value||""}:function(a,c){return a.getAttribute(c)}; T=Y.matches||Y.webkitMatchesSelector||Y.mozMatchesSelector||Y.msMatchesSelector||Y.oMatchesSelector?function(a){if(!a)return u;if("*"===a||":root"===a&&this===Y||"body"===a&&this===document.body)return j;var c,e,i=u;if(!Ia.test(a)&&(c=this.parentNode)&&"querySelector"in c)i=c.querySelector(a),i!==s&&(i=i===this);if(!i&&i!==s&&(c=this.ownerDocument))for(e in a=c.querySelectorAll(a),a)if(Object.prototype.hasOwnProperty.call(a,e)&&(i=a[e]===this))return j;return!!i}:function(a){if(!a)return u;if("*"=== a||this===Y&&":root"===a||this===document.body&&"BODY"===a.toUpperCase())return j;var c,e,i=u,g,a=Aa.call(a);if(c=a.match(Ha))switch(a.charAt(0)){case "#":return this.id===a.slice(1);default:return i=!(e=c[2])||this.className&&RegExp(e.replace(da," ").replace(K,O)).test(this.className),!!(i&&!(e=c[1])||this.tagName&&this.tagName.toUpperCase()===e.toUpperCase())}else{if(Ia.test(a)){e=ta.call(this.ownerDocument,a);for(g in e)if(Object.prototype.hasOwnProperty.call(e,g)&&(i=e[g]===this))return j;return u}e= aa(a.match(Ga),s,s,u,this,j);return e[0]===this}};$="matchesSelector";Y[$]||(V.matches=Y.matches=V[$]=Y[$]=T);$="matches";$ in V||(V[$]=document.documentElement[$]=V.matchesSelector);$="querySelectorAll";V[$]=Y[$]=document[$]=function(a,c){return ta.call(this,a,u,c)};$="querySelector";V[$]=Y[$]=document[$]=function(a,c){return ta.call(this,a,j,c)||s};$="getElementsByClassName";document[$]||(V[$]=Y[$]=document[$]=Na);V=$=s; })();