From f5c231b9de178815fce4753f7ce66739450cf622 Mon Sep 17 00:00:00 2001 From: ardean Date: Mon, 28 May 2018 18:38:11 +0200 Subject: [PATCH] refactor --- assets/service-worker.js | 9 +++++---- docs/jsgbc-web.js | 2 +- docs/service-worker.js | 9 +++++---- docs/styles/github.css | 10 ++++++---- jsgbc-web.js | 2 +- src/homescreen.ts | 5 +++-- src/index.ts | 32 ++++++++++++++++++++++---------- styles/github.css | 10 ++++++---- 8 files changed, 49 insertions(+), 30 deletions(-) diff --git a/assets/service-worker.js b/assets/service-worker.js index 910a28c..159f618 100644 --- a/assets/service-worker.js +++ b/assets/service-worker.js @@ -19,10 +19,11 @@ self.addEventListener("install", function (e) { ); }); -self.addEventListener("fetch", function (event) { - event.respondWith( - caches.match(event.request).then(function (response) { - return response || fetch(event.request); +self.addEventListener("fetch", function (e) { + console.log("loading:", e.request.url); + e.respondWith( + caches.match(e.request).then(function (response) { + return response || fetch(e.request); }) ); }); \ No newline at end of file diff --git a/docs/jsgbc-web.js b/docs/jsgbc-web.js index b7f3357..a5853a6 100644 --- a/docs/jsgbc-web.js +++ b/docs/jsgbc-web.js @@ -36,4 +36,4 @@ * * Date: 2016-08-08 */ -function(e){var t,r,i,n,s,o,a,h,c,u,l,f,p,d,m,g,y,v,C,b="sizzle"+1*new Date,S=e.document,B=0,k=0,R=oe(),w=oe(),T=oe(),L=function(e,t){return e===t&&(l=!0),0},F={}.hasOwnProperty,A=[],x=A.pop,H=A.push,P=A.push,M=A.slice,E=function(e,t){for(var r=0,i=e.length;r+~]|"+D+")"+D+"*"),U=new RegExp("="+D+"*([^\\]'\"]*?)"+D+"*\\]","g"),Z=new RegExp(N),z=new RegExp("^"+W+"$"),V={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),TAG:new RegExp("^("+W+"|[*])"),ATTR:new RegExp("^"+G),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},J=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,K=new RegExp("\\\\([\\da-f]{1,6}"+D+"?|("+D+")|.)","ig"),ee=function(e,t,r){var i="0x"+t-65536;return i!=i||r?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){f()},ne=ve(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{P.apply(A=M.call(S.childNodes),S.childNodes),A[S.childNodes.length].nodeType}catch(e){P={apply:A.length?function(e,t){H.apply(e,M.call(t))}:function(e,t){for(var r=e.length,i=0;e[r++]=t[i++];);e.length=r-1}}}function se(e,t,i,n){var s,a,c,u,l,d,y,v=t&&t.ownerDocument,B=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==B&&9!==B&&11!==B)return i;if(!n&&((t?t.ownerDocument||t:S)!==p&&f(t),t=t||p,m)){if(11!==B&&(l=X.exec(e)))if(s=l[1]){if(9===B){if(!(c=t.getElementById(s)))return i;if(c.id===s)return i.push(c),i}else if(v&&(c=v.getElementById(s))&&C(t,c)&&c.id===s)return i.push(c),i}else{if(l[2])return P.apply(i,t.getElementsByTagName(e)),i;if((s=l[3])&&r.getElementsByClassName&&t.getElementsByClassName)return P.apply(i,t.getElementsByClassName(s)),i}if(r.qsa&&!T[e+" "]&&(!g||!g.test(e))){if(1!==B)v=t,y=e;else if("object"!==t.nodeName.toLowerCase()){for((u=t.getAttribute("id"))?u=u.replace(te,re):t.setAttribute("id",u=b),a=(d=o(e)).length;a--;)d[a]="#"+u+" "+ye(d[a]);y=d.join(","),v=Q.test(e)&&me(t.parentNode)||t}if(y)try{return P.apply(i,v.querySelectorAll(y)),i}catch(e){}finally{u===b&&t.removeAttribute("id")}}}return h(e.replace(q,"$1"),t,i,n)}function oe(){var e=[];return function t(r,n){return e.push(r+" ")>i.cacheLength&&delete t[e.shift()],t[r+" "]=n}}function ae(e){return e[b]=!0,e}function he(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var r=e.split("|"),n=r.length;n--;)i.attrHandle[r[n]]=t}function ue(e,t){var r=t&&e,i=r&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function le(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var r=t.nodeName.toLowerCase();return("input"===r||"button"===r)&&t.type===e}}function pe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ne(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function de(e){return ae(function(t){return t=+t,ae(function(r,i){for(var n,s=e([],r.length,t),o=s.length;o--;)r[n=s[o]]&&(r[n]=!(i[n]=r[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in r=se.support={},s=se.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},f=se.setDocument=function(e){var t,n,o=e?e.ownerDocument||e:S;return o!==p&&9===o.nodeType&&o.documentElement?(d=(p=o).documentElement,m=!s(p),S!==p&&(n=p.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ie,!1):n.attachEvent&&n.attachEvent("onunload",ie)),r.attributes=he(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=he(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=$.test(p.getElementsByClassName),r.getById=he(function(e){return d.appendChild(e).id=b,!p.getElementsByName||!p.getElementsByName(b).length}),r.getById?(i.filter.ID=function(e){var t=e.replace(K,ee);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var r=t.getElementById(e);return r?[r]:[]}}):(i.filter.ID=function(e){var t=e.replace(K,ee);return function(e){var r=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return r&&r.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var r,i,n,s=t.getElementById(e);if(s){if((r=s.getAttributeNode("id"))&&r.value===e)return[s];for(n=t.getElementsByName(e),i=0;s=n[i++];)if((r=s.getAttributeNode("id"))&&r.value===e)return[s]}return[]}}),i.find.TAG=r.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):r.qsa?t.querySelectorAll(e):void 0}:function(e,t){var r,i=[],n=0,s=t.getElementsByTagName(e);if("*"===e){for(;r=s[n++];)1===r.nodeType&&i.push(r);return i}return s},i.find.CLASS=r.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},y=[],g=[],(r.qsa=$.test(p.querySelectorAll))&&(he(function(e){d.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+D+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+D+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+b+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]")}),he(function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+D+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),d.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=$.test(v=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&he(function(e){r.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),y.push("!=",N)}),g=g.length&&new RegExp(g.join("|")),y=y.length&&new RegExp(y.join("|")),t=$.test(d.compareDocumentPosition),C=t||$.test(d.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},L=t?function(e,t){if(e===t)return l=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===p||e.ownerDocument===S&&C(S,e)?-1:t===p||t.ownerDocument===S&&C(S,t)?1:u?E(u,e)-E(u,t):0:4&i?-1:1)}:function(e,t){if(e===t)return l=!0,0;var r,i=0,n=e.parentNode,s=t.parentNode,o=[e],a=[t];if(!n||!s)return e===p?-1:t===p?1:n?-1:s?1:u?E(u,e)-E(u,t):0;if(n===s)return ue(e,t);for(r=e;r=r.parentNode;)o.unshift(r);for(r=t;r=r.parentNode;)a.unshift(r);for(;o[i]===a[i];)i++;return i?ue(o[i],a[i]):o[i]===S?-1:a[i]===S?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&f(e),t=t.replace(U,"='$1']"),r.matchesSelector&&m&&!T[t+" "]&&(!y||!y.test(t))&&(!g||!g.test(t)))try{var i=v.call(e,t);if(i||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!==p&&f(e),C(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==p&&f(e);var n=i.attrHandle[t.toLowerCase()],s=n&&F.call(i.attrHandle,t.toLowerCase())?n(e,t,!m):void 0;return void 0!==s?s:r.attributes||!m?e.getAttribute(t):(s=e.getAttributeNode(t))&&s.specified?s.value:null},se.escape=function(e){return(e+"").replace(te,re)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,i=[],n=0,s=0;if(l=!r.detectDuplicates,u=!r.sortStable&&e.slice(0),e.sort(L),l){for(;t=e[s++];)t===e[s]&&(n=i.push(s));for(;n--;)e.splice(i[n],1)}return u=null,e},n=se.getText=function(e){var t,r="",i=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=n(e)}else if(3===s||4===s)return e.nodeValue}else for(;t=e[i++];)r+=n(t);return r},(i=se.selectors={cacheLength:50,createPseudo:ae,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(K,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(K,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,r=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":r&&Z.test(r)&&(t=o(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(K,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=R[e+" "];return t||(t=new RegExp("(^|"+D+")"+e+"("+D+"|$)"))&&R(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,r){return function(i){var n=se.attr(i,e);return null==n?"!="===t:!t||(n+="","="===t?n===r:"!="===t?n!==r:"^="===t?r&&0===n.indexOf(r):"*="===t?r&&n.indexOf(r)>-1:"$="===t?r&&n.slice(-r.length)===r:"~="===t?(" "+n.replace(_," ")+" ").indexOf(r)>-1:"|="===t&&(n===r||n.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,r,i,n){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===n?function(e){return!!e.parentNode}:function(t,r,h){var c,u,l,f,p,d,m=s!==o?"nextSibling":"previousSibling",g=t.parentNode,y=a&&t.nodeName.toLowerCase(),v=!h&&!a,C=!1;if(g){if(s){for(;m;){for(f=t;f=f[m];)if(a?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;d=m="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?g.firstChild:g.lastChild],o&&v){for(C=(p=(c=(u=(l=(f=g)[b]||(f[b]={}))[f.uniqueID]||(l[f.uniqueID]={}))[e]||[])[0]===B&&c[1])&&c[2],f=p&&g.childNodes[p];f=++p&&f&&f[m]||(C=p=0)||d.pop();)if(1===f.nodeType&&++C&&f===t){u[e]=[B,p,C];break}}else if(v&&(C=p=(c=(u=(l=(f=t)[b]||(f[b]={}))[f.uniqueID]||(l[f.uniqueID]={}))[e]||[])[0]===B&&c[1]),!1===C)for(;(f=++p&&f&&f[m]||(C=p=0)||d.pop())&&((a?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++C||(v&&((u=(l=f[b]||(f[b]={}))[f.uniqueID]||(l[f.uniqueID]={}))[e]=[B,C]),f!==t)););return(C-=n)===i||C%i==0&&C/i>=0}}},PSEUDO:function(e,t){var r,n=i.pseudos[e]||i.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return n[b]?n(t):n.length>1?(r=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ae(function(e,r){for(var i,s=n(e,t),o=s.length;o--;)e[i=E(e,s[o])]=!(r[i]=s[o])}):function(e){return n(e,0,r)}):n}},pseudos:{not:ae(function(e){var t=[],r=[],i=a(e.replace(q,"$1"));return i[b]?ae(function(e,t,r,n){for(var s,o=i(e,null,n,[]),a=e.length;a--;)(s=o[a])&&(e[a]=!(t[a]=s))}):function(e,n,s){return t[0]=e,i(t,null,s,r),t[0]=null,!r.pop()}}),has:ae(function(e){return function(t){return se(e,t).length>0}}),contains:ae(function(e){return e=e.replace(K,ee),function(t){return(t.textContent||t.innerText||n(t)).indexOf(e)>-1}}),lang:ae(function(e){return z.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(K,ee).toLowerCase(),function(t){var r;do{if(r=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(r=r.toLowerCase())===e||0===r.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var r=e.location&&e.location.hash;return r&&r.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:de(function(){return[0]}),last:de(function(e,t){return[t-1]}),eq:de(function(e,t,r){return[r<0?r+t:r]}),even:de(function(e,t){for(var r=0;r=0;)e.push(i);return e}),gt:de(function(e,t,r){for(var i=r<0?r+t:r;++i1?function(t,r,i){for(var n=e.length;n--;)if(!e[n](t,r,i))return!1;return!0}:e[0]}function be(e,t,r,i,n){for(var s,o=[],a=0,h=e.length,c=null!=t;a-1&&(s[c]=!(o[c]=l))}}else y=be(y===o?y.splice(d,y.length):y),n?n(null,o,y,h):P.apply(o,y)})}function Be(e){for(var t,r,n,s=e.length,o=i.relative[e[0].type],a=o||i.relative[" "],h=o?1:0,u=ve(function(e){return e===t},a,!0),l=ve(function(e){return E(t,e)>-1},a,!0),f=[function(e,r,i){var n=!o&&(i||r!==c)||((t=r).nodeType?u(e,r,i):l(e,r,i));return t=null,n}];h1&&Ce(f),h>1&&ye(e.slice(0,h-1).concat({value:" "===e[h-2].type?"*":""})).replace(q,"$1"),r,h0,n=e.length>0,s=function(s,o,a,h,u){var l,d,g,y=0,v="0",C=s&&[],b=[],S=c,k=s||n&&i.find.TAG("*",u),R=B+=null==S?1:Math.random()||.1,w=k.length;for(u&&(c=o===p||o||u);v!==w&&null!=(l=k[v]);v++){if(n&&l){for(d=0,o||l.ownerDocument===p||(f(l),a=!m);g=e[d++];)if(g(l,o||p,a)){h.push(l);break}u&&(B=R)}r&&((l=!g&&l)&&y--,s&&C.push(l))}if(y+=v,r&&v!==y){for(d=0;g=t[d++];)g(C,b,o,a);if(s){if(y>0)for(;v--;)C[v]||b[v]||(b[v]=x.call(h));b=be(b)}P.apply(h,b),u&&!s&&b.length>0&&y+t.length>1&&se.uniqueSort(h)}return u&&(B=R,c=S),C};return r?ae(s):s}(s,n))).selector=e}return a},h=se.select=function(e,t,r,n){var s,h,c,u,l,f="function"==typeof e&&e,p=!n&&o(e=f.selector||e);if(r=r||[],1===p.length){if((h=p[0]=p[0].slice(0)).length>2&&"ID"===(c=h[0]).type&&9===t.nodeType&&m&&i.relative[h[1].type]){if(!(t=(i.find.ID(c.matches[0].replace(K,ee),t)||[])[0]))return r;f&&(t=t.parentNode),e=e.slice(h.shift().value.length)}for(s=V.needsContext.test(e)?0:h.length;s--&&(c=h[s],!i.relative[u=c.type]);)if((l=i.find[u])&&(n=l(c.matches[0].replace(K,ee),Q.test(h[0].type)&&me(t.parentNode)||t))){if(h.splice(s,1),!(e=n.length&&ye(h)))return P.apply(r,n),r;break}}return(f||a(e,p))(n,t,!m,r,!t||Q.test(e)&&me(t.parentNode)||t),r},r.sortStable=b.split("").sort(L).join("")===b,r.detectDuplicates=!!l,f(),r.sortDetached=he(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),he(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||ce("type|href|height|width",function(e,t,r){if(!r)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),r.attributes&&he(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ce("value",function(e,t,r){if(!r&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),he(function(e){return null==e.getAttribute("disabled")})||ce(O,function(e,t,r){var i;if(!r)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),se}(r);k.find=T,k.expr=T.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=T.uniqueSort,k.text=T.getText,k.isXMLDoc=T.isXML,k.contains=T.contains,k.escapeSelector=T.escape;var L=function(e,t,r){for(var i=[],n=void 0!==r;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(n&&k(e).is(r))break;i.push(e)}return i},F=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r},A=k.expr.match.needsContext;function x(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var H=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(e,t,r){return v(t)?k.grep(e,function(e,i){return!!t.call(e,i,e)!==r}):t.nodeType?k.grep(e,function(e){return e===t!==r}):"string"!=typeof t?k.grep(e,function(e){return l.call(t,e)>-1!==r}):k.filter(t,e,r)}k.filter=function(e,t,r){var i=t[0];return r&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?k.find.matchesSelector(i,e)?[i]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,r,i=this.length,n=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t1?k.uniqueSort(r):r},filter:function(e){return this.pushStack(P(this,e||[],!1))},not:function(e){return this.pushStack(P(this,e||[],!0))},is:function(e){return!!P(this,"string"==typeof e&&A.test(e)?k(e):e||[],!1).length}});var M,E=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,r){var i,n;if(!e)return this;if(r=r||M,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:E.exec(e))||!i[1]&&t)return!t||t.jquery?(t||r).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),H.test(i[1])&&k.isPlainObject(t))for(i in t)v(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(n=o.getElementById(i[2]))&&(this[0]=n,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==r.ready?r.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,M=k(o);var O=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function W(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),r=t.length;return this.filter(function(){for(var e=0;e-1:1===r.nodeType&&k.find.matchesSelector(r,e))){s.push(r);break}return this.pushStack(s.length>1?k.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?l.call(k(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return L(e,"parentNode")},parentsUntil:function(e,t,r){return L(e,"parentNode",r)},next:function(e){return W(e,"nextSibling")},prev:function(e){return W(e,"previousSibling")},nextAll:function(e){return L(e,"nextSibling")},prevAll:function(e){return L(e,"previousSibling")},nextUntil:function(e,t,r){return L(e,"nextSibling",r)},prevUntil:function(e,t,r){return L(e,"previousSibling",r)},siblings:function(e){return F((e.parentNode||{}).firstChild,e)},children:function(e){return F(e.firstChild)},contents:function(e){return x(e,"iframe")?e.contentDocument:(x(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(e,t){k.fn[e]=function(r,i){var n=k.map(this,t,r);return"Until"!==e.slice(-5)&&(i=r),i&&"string"==typeof i&&(n=k.filter(i,n)),this.length>1&&(D[e]||k.uniqueSort(n),O.test(e)&&n.reverse()),this.pushStack(n)}});var G=/[^\x20\t\r\n\f]+/g;function N(e){return e}function _(e){throw e}function q(e,t,r,i){var n;try{e&&v(n=e.promise)?n.call(e).done(t).fail(r):e&&v(n=e.then)?n.call(e,t,r):t.apply(void 0,[e].slice(i))}catch(e){r.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match(G)||[],function(e,r){t[r]=!0}),t}(e):k.extend({},e);var t,r,i,n,s=[],o=[],a=-1,h=function(){for(n=n||e.once,i=t=!0;o.length;a=-1)for(r=o.shift();++a-1;)s.splice(r,1),r<=a&&a--}),this},has:function(e){return e?k.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return n=o=[],s=r="",this},disabled:function(){return!s},lock:function(){return n=o=[],r||t||(s=r=""),this},locked:function(){return!!n},fireWith:function(e,r){return n||(r=[e,(r=r||[]).slice?r.slice():r],o.push(r),t||h()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",n={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return n.then(null,e)},pipe:function(){var e=arguments;return k.Deferred(function(r){k.each(t,function(t,i){var n=v(e[i[4]])&&e[i[4]];s[i[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[i[0]+"With"](this,n?[e]:arguments)})}),e=null}).promise()},then:function(e,i,n){var s=0;function o(e,t,i,n){return function(){var a=this,h=arguments,c=function(){var r,c;if(!(e=s&&(i!==_&&(a=void 0,h=[r]),t.rejectWith(a,h))}};e?u():(k.Deferred.getStackHook&&(u.stackTrace=k.Deferred.getStackHook()),r.setTimeout(u))}}return k.Deferred(function(r){t[0][3].add(o(0,r,v(n)?n:N,r.notifyWith)),t[1][3].add(o(0,r,v(e)?e:N)),t[2][3].add(o(0,r,v(i)?i:_))}).promise()},promise:function(e){return null!=e?k.extend(e,n):n}},s={};return k.each(t,function(e,r){var o=r[2],a=r[5];n[r[1]]=o.add,a&&o.add(function(){i=a},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(r[3].fire),s[r[0]]=function(){return s[r[0]+"With"](this===s?void 0:this,arguments),this},s[r[0]+"With"]=o.fireWith}),n.promise(s),e&&e.call(s,s),s},when:function(e){var t=arguments.length,r=t,i=Array(r),n=h.call(arguments),s=k.Deferred(),o=function(e){return function(r){i[e]=this,n[e]=arguments.length>1?h.call(arguments):r,--t||s.resolveWith(i,n)}};if(t<=1&&(q(e,s.done(o(r)).resolve,s.reject,!t),"pending"===s.state()||v(n[r]&&n[r].then)))return s.then();for(;r--;)q(n[r],o(r),s.reject);return s.promise()}});var I=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&I.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){r.setTimeout(function(){throw e})};var j=k.Deferred();function U(){o.removeEventListener("DOMContentLoaded",U),r.removeEventListener("load",U),k.ready()}k.fn.ready=function(e){return j.then(e).catch(function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||j.resolveWith(o,[k]))}}),k.ready.then=j.then,"complete"===o.readyState||"loading"!==o.readyState&&!o.documentElement.doScroll?r.setTimeout(k.ready):(o.addEventListener("DOMContentLoaded",U),r.addEventListener("load",U));var Z=function(e,t,r,i,n,s,o){var a=0,h=e.length,c=null==r;if("object"===B(r))for(a in n=!0,r)Z(e,t,a,r[a],!0,s,o);else if(void 0!==i&&(n=!0,v(i)||(o=!0),c&&(o?(t.call(e,i),t=null):(c=t,t=function(e,t,r){return c.call(k(e),r)})),t))for(;a1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),k.extend({queue:function(e,t,r){var i;if(e)return t=(t||"fx")+"queue",i=Q.get(e,t),r&&(!i||Array.isArray(r)?i=Q.access(e,t,k.makeArray(r)):i.push(r)),i||[]},dequeue:function(e,t){t=t||"fx";var r=k.queue(e,t),i=r.length,n=r.shift(),s=k._queueHooks(e,t);"inprogress"===n&&(n=r.shift(),i--),n&&("fx"===t&&r.unshift("inprogress"),delete s.stop,n.call(e,function(){k.dequeue(e,t)},s)),!i&&s&&s.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return Q.get(e,r)||Q.access(e,r,{empty:k.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",r])})})}}),k.fn.extend({queue:function(e,t){var r=2;return"string"!=typeof e&&(t=e,e="fx",r--),arguments.length\x20\t\r\n\f]+)/i,de=/^$|^module$|\/(?:java|ecma)script/i,me={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ge(e,t){var r;return r=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&x(e,t)?k.merge([e],r):r}function ye(e,t){for(var r=0,i=e.length;r-1)n&&n.push(s);else if(c=k.contains(s.ownerDocument,s),o=ge(l.appendChild(s),"script"),c&&ye(o),r)for(u=0;s=o[u++];)de.test(s.type||"")&&r.push(s);return l}ve=o.createDocumentFragment().appendChild(o.createElement("div")),(Ce=o.createElement("input")).setAttribute("type","radio"),Ce.setAttribute("checked","checked"),Ce.setAttribute("name","t"),ve.appendChild(Ce),y.checkClone=ve.cloneNode(!0).cloneNode(!0).lastChild.checked,ve.innerHTML="",y.noCloneChecked=!!ve.cloneNode(!0).lastChild.defaultValue;var Be=o.documentElement,ke=/^key/,Re=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,we=/^([^.]*)(?:\.(.+)|)/;function Te(){return!0}function Le(){return!1}function Fe(){try{return o.activeElement}catch(e){}}function Ae(e,t,r,i,n,s){var o,a;if("object"==typeof t){for(a in"string"!=typeof r&&(i=i||r,r=void 0),t)Ae(e,a,r,i,t[a],s);return e}if(null==i&&null==n?(n=r,i=r=void 0):null==n&&("string"==typeof r?(n=i,i=void 0):(n=i,i=r,r=void 0)),!1===n)n=Le;else if(!n)return e;return 1===s&&(o=n,(n=function(e){return k().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=k.guid++)),e.each(function(){k.event.add(this,t,n,i,r)})}k.event={global:{},add:function(e,t,r,i,n){var s,o,a,h,c,u,l,f,p,d,m,g=Q.get(e);if(g)for(r.handler&&(r=(s=r).handler,n=s.selector),n&&k.find.matchesSelector(Be,n),r.guid||(r.guid=k.guid++),(h=g.events)||(h=g.events={}),(o=g.handle)||(o=g.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(G)||[""]).length;c--;)p=m=(a=we.exec(t[c])||[])[1],d=(a[2]||"").split(".").sort(),p&&(l=k.event.special[p]||{},p=(n?l.delegateType:l.bindType)||p,l=k.event.special[p]||{},u=k.extend({type:p,origType:m,data:i,handler:r,guid:r.guid,selector:n,needsContext:n&&k.expr.match.needsContext.test(n),namespace:d.join(".")},s),(f=h[p])||((f=h[p]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(e,i,d,o)||e.addEventListener&&e.addEventListener(p,o)),l.add&&(l.add.call(e,u),u.handler.guid||(u.handler.guid=r.guid)),n?f.splice(f.delegateCount++,0,u):f.push(u),k.event.global[p]=!0)},remove:function(e,t,r,i,n){var s,o,a,h,c,u,l,f,p,d,m,g=Q.hasData(e)&&Q.get(e);if(g&&(h=g.events)){for(c=(t=(t||"").match(G)||[""]).length;c--;)if(p=m=(a=we.exec(t[c])||[])[1],d=(a[2]||"").split(".").sort(),p){for(l=k.event.special[p]||{},f=h[p=(i?l.delegateType:l.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=f.length;s--;)u=f[s],!n&&m!==u.origType||r&&r.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(f.splice(s,1),u.selector&&f.delegateCount--,l.remove&&l.remove.call(e,u));o&&!f.length&&(l.teardown&&!1!==l.teardown.call(e,d,g.handle)||k.removeEvent(e,p,g.handle),delete h[p])}else for(p in h)k.event.remove(e,p+t[c],r,i,!0);k.isEmptyObject(h)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,r,i,n,s,o,a=k.event.fix(e),h=new Array(arguments.length),c=(Q.get(this,"events")||{})[a.type]||[],u=k.event.special[a.type]||{};for(h[0]=a,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(s=[],o={},r=0;r-1:k.find(n,this,null,[c]).length),o[n]&&s.push(i);s.length&&a.push({elem:c,handlers:s})}return c=this,h\x20\t\r\n\f]*)[^>]*)\/>/gi,He=/\s*$/g;function Ee(e,t){return x(e,"table")&&x(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Oe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function We(e,t){var r,i,n,s,o,a,h,c;if(1===t.nodeType){if(Q.hasData(e)&&(s=Q.access(e),o=Q.set(t,s),c=s.events))for(n in delete o.handle,o.events={},c)for(r=0,i=c[n].length;r1&&"string"==typeof d&&!y.checkClone&&Pe.test(d))return e.each(function(n){var s=e.eq(n);m&&(t[0]=d.call(this,n,s.html())),Ge(s,t,r,i)});if(f&&(s=(n=Se(t,e[0].ownerDocument,!1,e,i)).firstChild,1===n.childNodes.length&&(n=s),s||i)){for(a=(o=k.map(ge(n,"script"),Oe)).length;l")},clone:function(e,t,r){var i,n,s,o,a,h,c,u=e.cloneNode(!0),l=k.contains(e.ownerDocument,e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(o=ge(u),i=0,n=(s=ge(e)).length;i0&&ye(o,!l&&ge(e,"script")),u},cleanData:function(e){for(var t,r,i,n=k.event.special,s=0;void 0!==(r=e[s]);s++)if($(r)){if(t=r[Q.expando]){if(t.events)for(i in t.events)n[i]?k.event.remove(r,i):k.removeEvent(r,i,t.handle);r[Q.expando]=void 0}r[K.expando]&&(r[K.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Ne(this,e,!0)},remove:function(e){return Ne(this,e)},text:function(e){return Z(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ge(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ee(this,e).appendChild(e)})},prepend:function(){return Ge(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ee(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ge(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ge(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return Z(this,function(e){var t=this[0]||{},r=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!He.test(e)&&!me[(pe.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;r=0&&(h+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-h-a-.5))),h}function et(e,t,r){var i=qe(e),n=je(e,t,i),s="border-box"===k.css(e,"boxSizing",!1,i),o=s;if(_e.test(n)){if(!r)return n;n="auto"}return o=o&&(y.boxSizingReliable()||n===e.style[t]),("auto"===n||!parseFloat(n)&&"inline"===k.css(e,"display",!1,i))&&(n=e["offset"+t[0].toUpperCase()+t.slice(1)],o=!0),(n=parseFloat(n)||0)+Ke(e,t,r||(s?"border":"content"),o,i,n)+"px"}function tt(e,t,r,i,n){return new tt.prototype.init(e,t,r,i,n)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var r=je(e,"opacity");return""===r?"1":r}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var n,s,o,a=Y(t),h=ze.test(t),c=e.style;if(h||(t=Xe(a)),o=k.cssHooks[t]||k.cssHooks[a],void 0===r)return o&&"get"in o&&void 0!==(n=o.get(e,!1,i))?n:c[t];"string"===(s=typeof r)&&(n=ne.exec(r))&&n[1]&&(r=he(e,t,n),s="number"),null!=r&&r==r&&("number"===s&&(r+=n&&n[3]||(k.cssNumber[a]?"":"px")),y.clearCloneStyle||""!==r||0!==t.indexOf("background")||(c[t]="inherit"),o&&"set"in o&&void 0===(r=o.set(e,r,i))||(h?c.setProperty(t,r):c[t]=r))}},css:function(e,t,r,i){var n,s,o,a=Y(t);return ze.test(t)||(t=Xe(a)),(o=k.cssHooks[t]||k.cssHooks[a])&&"get"in o&&(n=o.get(e,!0,r)),void 0===n&&(n=je(e,t,i)),"normal"===n&&t in Je&&(n=Je[t]),""===r||r?(s=parseFloat(n),!0===r||isFinite(s)?s||0:n):n}}),k.each(["height","width"],function(e,t){k.cssHooks[t]={get:function(e,r,i){if(r)return!Ze.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,i):ae(e,Ve,function(){return et(e,t,i)})},set:function(e,r,i){var n,s=qe(e),o="border-box"===k.css(e,"boxSizing",!1,s),a=i&&Ke(e,t,i,o,s);return o&&y.scrollboxSize()===s.position&&(a-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-Ke(e,t,"border",!1,s)-.5)),a&&(n=ne.exec(r))&&"px"!==(n[3]||"px")&&(e.style[t]=r,r=k.css(e,t)),Qe(0,r,a)}}}),k.cssHooks.marginLeft=Ue(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(je(e,"marginLeft"))||e.getBoundingClientRect().left-ae(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(e,t){k.cssHooks[e+t]={expand:function(r){for(var i=0,n={},s="string"==typeof r?r.split(" "):[r];i<4;i++)n[e+se[i]+t]=s[i]||s[i-2]||s[0];return n}},"margin"!==e&&(k.cssHooks[e+t].set=Qe)}),k.fn.extend({css:function(e,t){return Z(this,function(e,t,r){var i,n,s={},o=0;if(Array.isArray(t)){for(i=qe(e),n=t.length;o1)}}),k.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,r,i,n,s){this.elem=e,this.prop=r,this.easing=n||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=s||(k.cssNumber[r]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,r=tt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[k.cssProps[e.prop]]&&!k.cssHooks[e.prop]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=tt.prototype.init,k.fx.step={};var rt,it,nt=/^(?:toggle|show|hide)$/,st=/queueHooks$/;function ot(){it&&(!1===o.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ot):r.setTimeout(ot,k.fx.interval),k.fx.tick())}function at(){return r.setTimeout(function(){rt=void 0}),rt=Date.now()}function ht(e,t){var r,i=0,n={height:e};for(t=t?1:0;i<4;i+=2-t)n["margin"+(r=se[i])]=n["padding"+r]=e;return t&&(n.opacity=n.width=e),n}function ct(e,t,r){for(var i,n=(ut.tweeners[t]||[]).concat(ut.tweeners["*"]),s=0,o=n.length;s1)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,r){var i,n,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===e.getAttribute?k.prop(e,t,r):(1===s&&k.isXMLDoc(e)||(n=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?lt:void 0)),void 0!==r?null===r?void k.removeAttr(e,t):n&&"set"in n&&void 0!==(i=n.set(e,r,t))?i:(e.setAttribute(t,r+""),r):n&&"get"in n&&null!==(i=n.get(e,t))?i:null==(i=k.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&x(e,"input")){var r=e.value;return e.setAttribute("type",t),r&&(e.value=r),t}}}},removeAttr:function(e,t){var r,i=0,n=t&&t.match(G);if(n&&1===e.nodeType)for(;r=n[i++];)e.removeAttribute(r)}}),lt={set:function(e,t,r){return!1===t?k.removeAttr(e,r):e.setAttribute(r,r),r}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var r=ft[t]||k.find.attr;ft[t]=function(e,t,i){var n,s,o=t.toLowerCase();return i||(s=ft[o],ft[o]=n,n=null!=r(e,t,i)?o:null,ft[o]=s),n}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function mt(e){return(e.match(G)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(G)||[]}k.fn.extend({prop:function(e,t){return Z(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,r){var i,n,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&k.isXMLDoc(e)||(t=k.propFix[t]||t,n=k.propHooks[t]),void 0!==r?n&&"set"in n&&void 0!==(i=n.set(e,r,t))?i:e[t]=r:n&&"get"in n&&null!==(i=n.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(e){var t,r,i,n,s,o,a,h=0;if(v(e))return this.each(function(t){k(this).addClass(e.call(this,t,gt(this)))});if((t=yt(e)).length)for(;r=this[h++];)if(n=gt(r),i=1===r.nodeType&&" "+mt(n)+" "){for(o=0;s=t[o++];)i.indexOf(" "+s+" ")<0&&(i+=s+" ");n!==(a=mt(i))&&r.setAttribute("class",a)}return this},removeClass:function(e){var t,r,i,n,s,o,a,h=0;if(v(e))return this.each(function(t){k(this).removeClass(e.call(this,t,gt(this)))});if(!arguments.length)return this.attr("class","");if((t=yt(e)).length)for(;r=this[h++];)if(n=gt(r),i=1===r.nodeType&&" "+mt(n)+" "){for(o=0;s=t[o++];)for(;i.indexOf(" "+s+" ")>-1;)i=i.replace(" "+s+" "," ");n!==(a=mt(i))&&r.setAttribute("class",a)}return this},toggleClass:function(e,t){var r=typeof e,i="string"===r||Array.isArray(e);return"boolean"==typeof t&&i?t?this.addClass(e):this.removeClass(e):v(e)?this.each(function(r){k(this).toggleClass(e.call(this,r,gt(this),t),t)}):this.each(function(){var t,n,s,o;if(i)for(n=0,s=k(this),o=yt(e);t=o[n++];)s.hasClass(t)?s.removeClass(t):s.addClass(t);else void 0!==e&&"boolean"!==r||((t=gt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,r,i=0;for(t=" "+e+" ";r=this[i++];)if(1===r.nodeType&&(" "+mt(gt(r))+" ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g;k.fn.extend({val:function(e){var t,r,i,n=this[0];return arguments.length?(i=v(e),this.each(function(r){var n;1===this.nodeType&&(null==(n=i?e.call(this,r,k(this).val()):e)?n="":"number"==typeof n?n+="":Array.isArray(n)&&(n=k.map(n,function(e){return null==e?"":e+""})),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,n,"value")||(this.value=n))})):n?(t=k.valHooks[n.type]||k.valHooks[n.nodeName.toLowerCase()])&&"get"in t&&void 0!==(r=t.get(n,"value"))?r:"string"==typeof(r=n.value)?r.replace(vt,""):null==r?"":r:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:mt(k.text(e))}},select:{get:function(e){var t,r,i,n=e.options,s=e.selectedIndex,o="select-one"===e.type,a=o?null:[],h=o?s+1:n.length;for(i=s<0?h:o?s:0;i-1)&&(r=!0);return r||(e.selectedIndex=-1),s}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},y.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in r;var Ct=/^(?:focusinfocus|focusoutblur)$/,bt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,i,n){var s,a,h,c,u,l,f,p,m=[i||o],g=d.call(e,"type")?e.type:e,y=d.call(e,"namespace")?e.namespace.split("."):[];if(a=p=h=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!Ct.test(g+k.event.triggered)&&(g.indexOf(".")>-1&&(g=(y=g.split(".")).shift(),y.sort()),u=g.indexOf(":")<0&&"on"+g,(e=e[k.expando]?e:new k.Event(g,"object"==typeof e&&e)).isTrigger=n?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:k.makeArray(t,[e]),f=k.event.special[g]||{},n||!f.trigger||!1!==f.trigger.apply(i,t))){if(!n&&!f.noBubble&&!C(i)){for(c=f.delegateType||g,Ct.test(c+g)||(a=a.parentNode);a;a=a.parentNode)m.push(a),h=a;h===(i.ownerDocument||o)&&m.push(h.defaultView||h.parentWindow||r)}for(s=0;(a=m[s++])&&!e.isPropagationStopped();)p=a,e.type=s>1?c:f.bindType||g,(l=(Q.get(a,"events")||{})[e.type]&&Q.get(a,"handle"))&&l.apply(a,t),(l=u&&a[u])&&l.apply&&$(a)&&(e.result=l.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,n||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(m.pop(),t)||!$(i)||u&&v(i[g])&&!C(i)&&((h=i[u])&&(i[u]=null),k.event.triggered=g,e.isPropagationStopped()&&p.addEventListener(g,bt),i[g](),e.isPropagationStopped()&&p.removeEventListener(g,bt),k.event.triggered=void 0,h&&(i[u]=h)),e.result}},simulate:function(e,t,r){var i=k.extend(new k.Event,r,{type:e,isSimulated:!0});k.event.trigger(i,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var r=this[0];if(r)return k.event.trigger(e,t,r,!0)}}),y.focusin||k.each({focus:"focusin",blur:"focusout"},function(e,t){var r=function(e){k.event.simulate(t,e.target,k.event.fix(e))};k.event.special[t]={setup:function(){var i=this.ownerDocument||this,n=Q.access(i,t);n||i.addEventListener(e,r,!0),Q.access(i,t,(n||0)+1)},teardown:function(){var i=this.ownerDocument||this,n=Q.access(i,t)-1;n?Q.access(i,t,n):(i.removeEventListener(e,r,!0),Q.remove(i,t))}}});var St=r.location,Bt=Date.now(),kt=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Rt=/\[\]$/,wt=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,Lt=/^(?:input|select|textarea|keygen)/i;function Ft(e,t,r,i){var n;if(Array.isArray(t))k.each(t,function(t,n){r||Rt.test(e)?i(e,n):Ft(e+"["+("object"==typeof n&&null!=n?t:"")+"]",n,r,i)});else if(r||"object"!==B(t))i(e,t);else for(n in t)Ft(e+"["+n+"]",t[n],r,i)}k.param=function(e,t){var r,i=[],n=function(e,t){var r=v(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==r?"":r)};if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){n(this.name,this.value)});else for(r in e)Ft(r,e[r],t,n);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Lt.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!fe.test(e))}).map(function(e,t){var r=k(this).val();return null==r?null:Array.isArray(r)?k.map(r,function(e){return{name:t.name,value:e.replace(wt,"\r\n")}}):{name:t.name,value:r.replace(wt,"\r\n")}}).get()}});var At=/%20/g,xt=/#.*$/,Ht=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Mt=/^(?:GET|HEAD)$/,Et=/^\/\//,Ot={},Dt={},Wt="*/".concat("*"),Gt=o.createElement("a");function Nt(e){return function(t,r){"string"!=typeof t&&(r=t,t="*");var i,n=0,s=t.toLowerCase().match(G)||[];if(v(r))for(;i=s[n++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(r)):(e[i]=e[i]||[]).push(r)}}function _t(e,t,r,i){var n={},s=e===Dt;function o(a){var h;return n[a]=!0,k.each(e[a]||[],function(e,a){var c=a(t,r,i);return"string"!=typeof c||s||n[c]?s?!(h=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),h}return o(t.dataTypes[0])||!n["*"]&&o("*")}function qt(e,t){var r,i,n=k.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((n[r]?e:i||(i={}))[r]=t[r]);return i&&k.extend(!0,e,i),e}Gt.href=St.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,k.ajaxSettings),t):qt(k.ajaxSettings,e)},ajaxPrefilter:Nt(Ot),ajaxTransport:Nt(Dt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,n,s,a,h,c,u,l,f,p,d=k.ajaxSetup({},t),m=d.context||d,g=d.context&&(m.nodeType||m.jquery)?k(m):k.event,y=k.Deferred(),v=k.Callbacks("once memory"),C=d.statusCode||{},b={},S={},B="canceled",R={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Pt.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(e,t){return null==u&&(e=S[e.toLowerCase()]=S[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==u&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)R.always(e[R.status]);else for(t in e)C[t]=[C[t],e[t]];return this},abort:function(e){var t=e||B;return i&&i.abort(t),w(0,t),this}};if(y.promise(R),d.url=((e||d.url||St.href)+"").replace(Et,St.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(G)||[""],null==d.crossDomain){c=o.createElement("a");try{c.href=d.url,c.href=c.href,d.crossDomain=Gt.protocol+"//"+Gt.host!=c.protocol+"//"+c.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=k.param(d.data,d.traditional)),_t(Ot,d,t,R),u)return R;for(f in(l=k.event&&d.global)&&0==k.active++&&k.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Mt.test(d.type),n=d.url.replace(xt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(At,"+")):(p=d.url.slice(n.length),d.data&&(d.processData||"string"==typeof d.data)&&(n+=(kt.test(n)?"&":"?")+d.data,delete d.data),!1===d.cache&&(n=n.replace(Ht,"$1"),p=(kt.test(n)?"&":"?")+"_="+Bt+++p),d.url=n+p),d.ifModified&&(k.lastModified[n]&&R.setRequestHeader("If-Modified-Since",k.lastModified[n]),k.etag[n]&&R.setRequestHeader("If-None-Match",k.etag[n])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&R.setRequestHeader("Content-Type",d.contentType),R.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Wt+"; q=0.01":""):d.accepts["*"]),d.headers)R.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(m,R,d)||u))return R.abort();if(B="abort",v.add(d.complete),R.done(d.success),R.fail(d.error),i=_t(Dt,d,t,R)){if(R.readyState=1,l&&g.trigger("ajaxSend",[R,d]),u)return R;d.async&&d.timeout>0&&(h=r.setTimeout(function(){R.abort("timeout")},d.timeout));try{u=!1,i.send(b,w)}catch(e){if(u)throw e;w(-1,e)}}else w(-1,"No Transport");function w(e,t,o,a){var c,f,p,b,S,B=t;u||(u=!0,h&&r.clearTimeout(h),i=void 0,s=a||"",R.readyState=e>0?4:0,c=e>=200&&e<300||304===e,o&&(b=function(e,t,r){for(var i,n,s,o,a=e.contents,h=e.dataTypes;"*"===h[0];)h.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(n in a)if(a[n]&&a[n].test(i)){h.unshift(n);break}if(h[0]in r)s=h[0];else{for(n in r){if(!h[0]||e.converters[n+" "+h[0]]){s=n;break}o||(o=n)}s=s||o}if(s)return s!==h[0]&&h.unshift(s),r[s]}(d,R,o)),b=function(e,t,r,i){var n,s,o,a,h,c={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)c[o.toLowerCase()]=e.converters[o];for(s=u.shift();s;)if(e.responseFields[s]&&(r[e.responseFields[s]]=t),!h&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),h=s,s=u.shift())if("*"===s)s=h;else if("*"!==h&&h!==s){if(!(o=c[h+" "+s]||c["* "+s]))for(n in c)if((a=n.split(" "))[1]===s&&(o=c[h+" "+a[0]]||c["* "+a[0]])){!0===o?o=c[n]:!0!==c[n]&&(s=a[0],u.unshift(a[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+h+" to "+s}}}return{state:"success",data:t}}(d,b,R,c),c?(d.ifModified&&((S=R.getResponseHeader("Last-Modified"))&&(k.lastModified[n]=S),(S=R.getResponseHeader("etag"))&&(k.etag[n]=S)),204===e||"HEAD"===d.type?B="nocontent":304===e?B="notmodified":(B=b.state,f=b.data,c=!(p=b.error))):(p=B,!e&&B||(B="error",e<0&&(e=0))),R.status=e,R.statusText=(t||B)+"",c?y.resolveWith(m,[f,B,R]):y.rejectWith(m,[R,B,p]),R.statusCode(C),C=void 0,l&&g.trigger(c?"ajaxSuccess":"ajaxError",[R,d,c?f:p]),v.fireWith(m,[R,B]),l&&(g.trigger("ajaxComplete",[R,d]),--k.active||k.event.trigger("ajaxStop")))}return R},getJSON:function(e,t,r){return k.get(e,t,r,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,t){k[t]=function(e,r,i,n){return v(r)&&(n=n||i,i=r,r=void 0),k.ajax(k.extend({url:e,type:t,dataType:n,data:r,success:i},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return v(e)?this.each(function(t){k(this).wrapInner(e.call(this,t))}):this.each(function(){var t=k(this),r=t.contents();r.length?r.wrapAll(e):t.append(e)})},wrap:function(e){var t=v(e);return this.each(function(r){k(this).wrapAll(t?e.call(this,r):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var It={0:200,1223:204},jt=k.ajaxSettings.xhr();y.cors=!!jt&&"withCredentials"in jt,y.ajax=jt=!!jt,k.ajaxTransport(function(e){var t,i;if(y.cors||jt&&!e.crossDomain)return{send:function(n,s){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];for(o in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)a.setRequestHeader(o,n[o]);t=function(e){return function(){t&&(t=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(It[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),i=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout(function(){t&&i()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(e){var t,r;if(e.crossDomain)return{send:function(i,n){t=k("