;!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function sr(e){return"function"==typeof e&&"number"!=typeof e.nodeType},m=function ur(e){return null!=e&&e===e.window},v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){n=n||r;var i,o,a=n.createElement("script");if(a.text=e,t)for(i in v)o=t[i]||t.getAttribute&&t.getAttribute(i),o&&a.setAttribute(i,o);n.head.appendChild(a).parentNode.removeChild(a)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.4.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:b,constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):0>e?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);u>s;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||w.isPlainObject(n)?n:{},i=!1,a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+(b+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return e&&"[object Object]"===c.call(e)?(t=i(e))?(n=f.call(t,"constructor")&&t.constructor,"function"==typeof n&&p.call(n)===d):!0:!1},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){y(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;n>r;r++)if(t.call(e[r],r,e[r])===!1)break}else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;a>o;o++)r=!t(e[o],o),r!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;r>o;o++)i=t(e[o],o,n),null!=i&&s.push(i);else for(o in e)i=t(e[o],o,n),null!=i&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return g(e)||m(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,m,v,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ct(),k=ct(),S=ct(),N=ct(),A=function(e,t){return e===t&&(f=!0),0},D={}.hasOwnProperty,j=[],q=j.pop,L=j.push,H=j.push,O=j.slice,P=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\x00-\\xa0])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),_=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),z=new RegExp("^"+M+"*,"+M+"*"),U=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),X=new RegExp(M+"|>"),V=new RegExp(F),G=new RegExp("^"+I+"$"),Y={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,et=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,nt=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ot=function(e,t){return t?"\x00"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},at=function(){p()},st=Tt(function(e){return e.disabled===!0&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(j=O.call(w.childNodes),w.childNodes),j[w.childNodes.length].nodeType}catch(ut){H={apply:j.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function lt(e,t,r,i){var o,s,l,c,f,h,v,y=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=et.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return H.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return H.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!N[e+" "]&&(!m||!m.test(e))&&(1!==T||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===T&&X.test(e)){(c=t.getAttribute("id"))?c=c.replace(it,ot):t.setAttribute("id",c=b),h=a(e),s=h.length;while(s--)h[s]="#"+c+" "+wt(h[s]);v=h.join(","),y=tt.test(e)&&xt(t.parentNode)||t}try{return H.apply(r,y.querySelectorAll(v)),r}catch(C){N(e,!0)}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(_,"$1"),t,r,i)}function ct(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function ft(e){return e[b]=!0,e}function pt(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function dt(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ht(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function gt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function mt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function vt(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&st(t)===e:t.disabled===e:"label"in t?t.disabled===e:!1}}function yt(e){return ft(function(t){return t=+t,ft(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function xt(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=lt.support={},o=lt.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Q.test(t||n&&n.nodeName||"HTML")},p=lt.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",at,!1):i.attachEvent&&i.attachEvent("onunload",at)),n.attributes=pt(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=pt(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Z.test(d.getElementsByClassName),n.getById=pt(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&g?t.getElementsByClassName(e):void 0},v=[],m=[],(n.qsa=Z.test(d.querySelectorAll))&&(pt(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+b+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||m.push(".#.+[+~]")}),pt(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Z.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&pt(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",F)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=Z.test(h.compareDocumentPosition),x=t||Z.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?P(c,e)-P(c,t):0;if(i===o)return ht(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ht(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},lt.matches=function(e,t){return lt(e,null,null,t)},lt.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),n.matchesSelector&&g&&!N[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){N(t,!0)}return lt(t,d,null,[e]).length>0},lt.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},lt.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},lt.escape=function(e){return(e+"").replace(it,ot)},lt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},lt.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=lt.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},r=lt.selectors={cacheLength:50,createPseudo:ft,match:Y,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(nt,rt),e[3]=(e[3]||e[4]||e[5]||"").replace(nt,rt),"~="===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]||lt.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]&<.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=lt.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){p=m,f=p[b]||(p[b]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),l=c[e]||[],d=l[0]===T&&l[1],x=d&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(y&&(p=t,f=p[b]||(p[b]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),l=c[e]||[],d=l[0]===T&&l[1],x=d),x===!1)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(y&&(f=p[b]||(p[b]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),c[e]=[T,x]),p===t))break;return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||lt.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ft(function(e,n){var r,o=i(e,t),a=o.length;while(a--)r=P(e,o[a]),e[r]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ft(function(e){var t=[],n=[],r=s(e.replace(_,"$1"));return r[b]?ft(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:ft(function(e){return function(t){return lt(e,t).length>0}}),contains:ft(function(e){return e=e.replace(nt,rt),function(t){return(t.textContent||i(t)).indexOf(e)>-1}}),lang:ft(function(e){return G.test(e||"")||lt.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:vt(!1),disabled:vt(!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,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return K.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:yt(function(){return[0]}),last:yt(function(e,t){return[t-1]}),eq:yt(function(e,t,n){return[0>n?n+t:n]}),even:yt(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:yt(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:yt(function(e,t,n){for(var r=0>n?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:yt(function(e,t,n){for(var r=0>n?n+t:n;++rt;t++)r+=e[t].value;return r}function Tt(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function Ct(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Et(e,t,n){for(var r=0,i=t.length;i>r;r++)lt(e,t[r],n);return n}function kt(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function St(e,t,n,r,i,o){return r&&!r[b]&&(r=St(r)),i&&!i[b]&&(i=St(i,o)),ft(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||Et(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:kt(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,v,s,u),r){l=kt(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(m[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(m[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&(l=i?P(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=kt(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):H.apply(a,v)})}function Nt(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=Tt(function(e){return e===t},s,!0),f=Tt(function(e){return P(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];o>u;u++)if(n=r.relative[e[u].type])p=[Tt(Ct(p),n)];else{if(n=r.filter[e[u].type].apply(null,e[u].matches),n[b]){for(i=++u;o>i;i++)if(r.relative[e[i].type])break;return St(u>1&&Ct(p),u>1&&wt(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(_,"$1"),n,i>u&&Nt(e.slice(u,i)),o>i&&Nt(e=e.slice(i)),o>i&&wt(e))}p.push(n)}return Ct(p)}function At(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,m,v=0,y="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);y!==k&&null!=(f=C[y]);y++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(m=e[h++])if(m(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!m&&f)&&v--,o&&x.push(f))}if(v+=y,n&&y!==v){h=0;while(m=t[h++])m(x,b,a,s);if(o){if(v>0)while(y--)x[y]||b[y]||(b[y]=q.call(u));b=kt(b)}H.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&<.uniqueSort(u)}return c&&(T=E,l=w),x};return n?ft(o):o}return s=lt.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)o=Nt(t[n]),o[b]?r.push(o):i.push(o);o=S(e,At(i,r)),o.selector=e}return o},u=lt.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if(u=d[0]=d[0].slice(0),u.length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(t=(r.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=Y.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(nt,rt),tt.test(u[0].type)&&xt(t.parentNode)||t))){if(u.splice(o,1),e=i.length&&wt(u),!e)return H.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||tt.test(e)&&xt(t.parentNode)||t),n},n.sortStable=b.split("").sort(A).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=pt(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),pt(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||dt("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&pt(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||dt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),pt(function(e){return null==e.getAttribute("disabled")})||dt(R,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),lt}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=w.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;r>t;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;r>t;t++)w.find(e,i[t],n);return r>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&N.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),D.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return o=r.getElementById(i[2]),o&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)};H.prototype=w.fn,q=w(r);var O=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!N.test(e))for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function R(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return R(e,"nextSibling")},prev:function(e){return R(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return"undefined"!=typeof e.contentDocument?e.contentDocument:(A(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(P[e]||w.uniqueSort(i),O.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function I(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?I(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s-1)o.splice(n,1),s>=n&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function W(e){return e}function F(e){throw e}function B(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(o>t)){if(e=r.apply(s,u),e===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,a(o,n,W,i),a(o,n,F,i)):(o++,l.call(e,a(o,n,W,i),a(o,n,F,i),a(o,n,W,n.notifyWith))):(r!==W&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==F&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:W,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:W)),n[2][3].add(a(0,e,g(r)?r:F))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(1>=t&&(B(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)B(i[n],s(n),a.reject);return a.promise()}});var _=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&_.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var z=w.Deferred();w.fn.ready=function(e){return z.then(e).catch(function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--w.readyWait:w.isReady)||(w.isReady=!0,e!==!0&&--w.readyWait>0||z.resolveWith(r,[w]))}}),w.ready.then=z.then;function U(){r.removeEventListener("DOMContentLoaded",U),e.removeEventListener("load",U),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",U),e.addEventListener("load",U));var X=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)X(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;u>s;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n))); return i?e:l?t.call(e):u?t(e[0],n):o},V=/^-ms-/,G=/-([a-z])/g;function Y(e,t){return t.toUpperCase()}function Q(e){return e.replace(V,"ms-").replace(G,Y)}var J=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function K(){this.expando=w.expando+K.uid++}K.uid=1,K.prototype={cache:function(e){var t=e[this.expando];return t||(t={},J(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[Q(t)]=n;else for(r in t)i[Q(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Q(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(Q):(t=Q(t),t=t in r?[t]:t.match(M)||[]),n=t.length;while(n--)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var Z=new K,et=new K,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,nt=/[A-Z]/g;function rt(e){return"true"===e?!0:"false"===e?!1:"null"===e?null:e===+e+""?+e:tt.test(e)?JSON.parse(e):e}function it(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(nt,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=rt(n)}catch(i){}et.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return et.hasData(e)||Z.hasData(e)},data:function(e,t,n){return et.access(e,t,n)},removeData:function(e,t){et.remove(e,t)},_data:function(e,t,n){return Z.access(e,t,n)},_removeData:function(e,t){Z.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=et.get(o),1===o.nodeType&&!Z.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=Q(r.slice(5)),it(o,r,i[r])));Z.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){et.set(this,e)}):X(this,function(t){var n;if(o&&void 0===t){if(n=et.get(o,e),void 0!==n)return n;if(n=it(o,e),void 0!==n)return n}else this.each(function(){et.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){et.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=Z.get(e,t),n&&(!r||Array.isArray(n)?r=Z.access(e,t,w.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Z.get(e,n)||Z.access(e,n,{empty:w.Callbacks("once memory").add(function(){Z.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.lengtho;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=Z.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ft(r)&&(i[o]=gt(r))):"none"!==n&&(i[o]="none",Z.set(r,"display",n)));for(o=0;a>o;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.fn.extend({show:function(){return mt(this,!0)},hide:function(){return mt(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ft(this)?w(this).show():w(this).hide()})}});var vt=/^(?:checkbox|radio)$/i,yt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,xt=/^$|^module$|\/(?:java|ecma)script/i,bt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};bt.optgroup=bt.option,bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td;function wt(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?w.merge([e],n):n}function Tt(e,t){for(var n=0,r=e.length;r>n;n++)Z.set(e[n],"globalEval",!t||Z.get(t[n],"globalEval"))}var Ct=/<|&#?\w+;/;function Et(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;h>d;d++)if(o=e[d],o||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(Ct.test(o)){a=a||f.appendChild(t.createElement("div")),s=(yt.exec(o)||["",""])[1].toLowerCase(),u=bt[s]||bt._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),a=f.firstChild,a.textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=lt(o),a=wt(f.appendChild(o),"script"),l&&Tt(a),n){c=0;while(o=a[c++])xt.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment(),t=e.appendChild(r.createElement("div")),n=r.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),h.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",h.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var kt=/^key/,St=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Nt=/^([^.]*)(?:\.(.+)|)/;function At(){return!0}function Dt(){return!1}function jt(e,t){return e===qt()==("focus"===t)}function qt(){try{return r.activeElement}catch(e){}}function Lt(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)Lt(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=Dt;else if(!i)return e;return 1===o&&(a=i,i=function(e){return w().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=Z.get(e);if(m){n.handler&&(o=n,n=o.handler,i=o.selector),i&&w.find.matchesSelector(ut,i),n.guid||(n.guid=w.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(M)||[""],l=t.length;while(l--)s=Nt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||(p=u[d]=[],p.delegateCount=0,f.setup&&f.setup.call(e,r,h,a)!==!1||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=Z.hasData(e)&&Z.get(e);if(m&&(u=m.events)){t=(t||"").match(M)||[""],l=t.length;while(l--)if(s=Nt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||w.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&Z.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(Z.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||l.disabled!==!0)){for(o=[],a={},n=0;u>n;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Pt=/\s*$/g;function It(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function Wt(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function $t(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ft(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Z.hasData(e)&&(o=Z.access(e),a=Z.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)w.event.add(t,i,l[i][n])}et.hasData(e)&&(s=et.access(e),u=w.extend({},s),et.set(t,u))}}function Bt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&vt.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function _t(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,m=t[0],v=g(m);if(v||p>1&&"string"==typeof m&&!h.checkClone&&Rt.test(m))return e.each(function(i){var o=e.eq(i);v&&(t[0]=m.call(this,i,o.html())),_t(o,t,n,r)});if(p&&(i=Et(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=w.map(wt(i,"script"),Wt),u=s.length;p>f;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(s,wt(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,$t),f=0;u>f;f++)l=s[f],xt.test(l.type||"")&&!Z.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&!l.noModule&&w._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")}):y(l.textContent.replace(Mt,""),l,c))}return e}function zt(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(wt(r)),r.parentNode&&(n&<(r)&&Tt(wt(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(Ot,"<$1>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=lt(e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=wt(s),o=wt(e),r=0,i=o.length;i>r;r++)Bt(o[r],a[r]);if(t)if(n)for(o=o||wt(e),a=a||wt(s),r=0,i=o.length;i>r;r++)Ft(o[r],a[r]);else Ft(e,s);return a=wt(s,"script"),a.length>0&&Tt(a,!u&&wt(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(J(n)){if(t=n[Z.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[Z.expando]=void 0}n[et.expando]&&(n[et.expando]=void 0)}}}),w.fn.extend({detach:function(e){return zt(this,e,!0)},remove:function(e){return zt(this,e)},text:function(e){return X(this,function(e){return void 0===e?w.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 _t(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=It(this,e);t.appendChild(e)}})},prepend:function(){return _t(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=It(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return _t(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return _t(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&&(w.cleanData(wt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return X(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Pt.test(e)&&!bt[(yt.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(w.cleanData(wt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return _t(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(wt(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),w(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var Ut=new RegExp("^("+ot+")(?!px)[a-z%]+$","i"),Xt=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Vt=new RegExp(st.join("|"),"i");!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ut.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",s=36===n(t.right),o=36===n(t.width),c.style.position="absolute",a=12===n(c.offsetWidth/3),ut.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,a,s,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))}();function Gt(e,t,n){var r,i,o,a,s=e.style;return n=n||Xt(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||lt(e)||(a=w.style(e,t)),!h.pixelBoxStyles()&&Ut.test(a)&&Vt.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Yt(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}var Qt=["Webkit","Moz","ms"],Jt=r.createElement("div").style,Kt={};function Zt(e){var t=e[0].toUpperCase()+e.slice(1),n=Qt.length;while(n--)if(e=Qt[n]+t,e in Jt)return e}function en(e){var t=w.cssProps[e]||Kt[e];return t?t:e in Jt?e:Kt[e]=Zt(e)||e}var tn=/^(none|table(?!-c[ea]).+)/,nn=/^--/,rn={position:"absolute",visibility:"hidden",display:"block"},on={letterSpacing:"0",fontWeight:"400"};function an(e,t,n){var r=at.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function sn(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;4>a;a+=2)"margin"===n&&(u+=w.css(e,n+st[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+st[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+st[a]+"Width",!0,i))):(u+=w.css(e,"padding"+st[a],!0,i),"padding"!==n?u+=w.css(e,"border"+st[a]+"Width",!0,i):s+=w.css(e,"border"+st[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function un(e,t,n){var r=Xt(e),i=!h.boxSizingReliable()||n,o=i&&"border-box"===w.css(e,"boxSizing",!1,r),a=o,s=Gt(e,t,r),u="offset"+t[0].toUpperCase()+t.slice(1);if(Ut.test(s)){if(!n)return s;s="auto"}return(!h.boxSizingReliable()&&o||"auto"===s||!parseFloat(s)&&"inline"===w.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===w.css(e,"boxSizing",!1,r),a=u in e,a&&(s=e[u])),s=parseFloat(s)||0,s+sn(e,t,n||(o?"border":"content"),a,r,s)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=Q(t),u=nn.test(t),l=e.style;return u||(t=en(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t]:(o=typeof n,"string"===o&&(i=at.exec(n))&&i[1]&&(n=dt(e,t,i),o="number"),null!=n&&n===n&&("number"!==o||u||(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n)),void 0)}},css:function(e,t,n,r){var i,o,a,s=Q(t),u=nn.test(t);return u||(t=en(s)),a=w.cssHooks[t]||w.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Gt(e,t,r)),"normal"===i&&t in on&&(i=on[t]),""===n||n?(o=parseFloat(i),n===!0||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){return n?!tn.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?un(e,t,r):pt(e,rn,function(){return un(e,t,r)}):void 0},set:function(e,n,r){var i,o=Xt(e),a=!h.scrollboxSize()&&"absolute"===o.position,s=a||r,u=s&&"border-box"===w.css(e,"boxSizing",!1,o),l=r?sn(e,t,r,u,o):0;return u&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-sn(e,t,"border",!1,o)-.5)),l&&(i=at.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),an(e,n,l)}}}),w.cssHooks.marginLeft=Yt(h.reliableMarginLeft,function(e,t){return t?(parseFloat(Gt(e,"marginLeft"))||e.getBoundingClientRect().left-pt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+st[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=an)}),w.fn.extend({css:function(e,t){return X(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xt(e),i=t.length;i>a;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function ln(e,t,n,r,i){return new ln.prototype.init(e,t,n,r,i)}w.Tween=ln,ln.prototype={constructor:ln,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=ln.propHooks[this.prop];return e&&e.get?e.get(this):ln.propHooks._default.get(this)},run:function(e){var t,n=ln.propHooks[this.prop];return this.pos=t=this.options.duration?w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ln.propHooks._default.set(this),this}},ln.prototype.init.prototype=ln.prototype,ln.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=w.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||!w.cssHooks[e.prop]&&null==e.elem.style[en(e.prop)]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},ln.propHooks.scrollTop=ln.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=ln.prototype.init,w.fx.step={};var cn,fn,pn=/^(?:toggle|show|hide)$/,dn=/queueHooks$/;function hn(){fn&&(r.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(hn):e.setTimeout(hn,w.fx.interval),w.fx.tick())}function gn(){return e.setTimeout(function(){cn=void 0}),cn=Date.now()}function mn(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)n=st[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function vn(e,t,n){for(var r,i=(bn.tweeners[t]||[]).concat(bn.tweeners["*"]),o=0,a=i.length;a>o;o++)if(r=i[o].call(n,t,e))return r}function yn(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ft(e),m=Z.get(e,"fxshow");n.queue||(a=w._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],pn.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;g=!0}d[r]=m&&m[r]||w.style(e,r)}if(u=!w.isEmptyObject(t),u||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],l=m&&m.display,null==l&&(l=Z.get(e,"display")),c=w.css(e,"display"),"none"===c&&(l?c=l:(mt([e],!0),l=e.style.display||l,c=w.css(e,"display"),mt([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(m?"hidden"in m&&(g=m.hidden):m=Z.access(e,"fxshow",{display:l}),o&&(m.hidden=!g),g&&mt([e],!0),p.done(function(){g||mt([e]),Z.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=vn(g?m[r]:0,r,p),r in m||(m[r]=u.start,g&&(u.end=u.start,u.start=0))}}function xn(e,t){var n,r,i,o,a;for(n in e)if(r=Q(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=w.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function bn(e,t,n){var r,i,o=0,a=bn.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=cn||gn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(u||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:cn||gn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(xn(c,l.opts.specialEasing);a>o;o++)if(r=bn.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,vn,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(bn,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return dt(n.elem,e,at.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(M);for(var n,r=0,i=e.length;i>r;r++)n=e[r],bn.tweeners[n]=bn.tweeners[n]||[],bn.tweeners[n].unshift(t)},prefilters:[yn],prefilter:function(e,t){t?bn.prefilters.unshift(e):bn.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration=r.duration in w.fx.speeds?w.fx.speeds[r.duration]:w.fx.speeds._default),(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ft).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=bn(this,w.extend({},e),o);(i||Z.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,a=Z.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&dn.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&w.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Z.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(mn(t,!0),e,r,i)}}),w.each({slideDown:mn("show"),slideUp:mn("hide"),slideToggle:mn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(cn=Date.now();t1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?wn:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=w.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),wn={set:function(e,t,n){return t===!1?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Tn[t]||w.find.attr;Tn[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=Tn[a],Tn[a]=i,i=null!=n(e,t,r)?a:null,Tn[a]=o),i}});var Cn=/^(?:input|select|textarea|button)$/i,En=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return X(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):Cn.test(e.nodeName)||En.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.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)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function kn(e){var t=e.match(M)||[];return t.join(" ")}function Sn(e){return e.getAttribute&&e.getAttribute("class")||""}function Nn(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,Sn(this)))});if(t=Nn(e),t.length)while(n=this[u++])if(i=Sn(n),r=1===n.nodeType&&" "+kn(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=kn(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,Sn(this)))});if(!arguments.length)return this.attr("class","");if(t=Nn(e),t.length)while(n=this[u++])if(i=Sn(n),r=1===n.nodeType&&" "+kn(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");s=kn(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):this.each(g(e)?function(n){w(this).toggleClass(e.call(this,n,Sn(this),t),t)}:function(){var t,i,o,a;if(r){i=0,o=w(this),a=Nn(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(void 0===e||"boolean"===n)&&(t=Sn(this),t&&Z.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Z.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+kn(Sn(n))+" ").indexOf(t)>-1)return!0;return!1}});var An=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,w(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(An,""):null==n?"":n)}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:kn(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=0>o?u:a?o:0;u>r;r++)if(n=i[r],(n.selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){return Array.isArray(t)?e.checked=w.inArray(w(e).val(),t)>-1:void 0}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var Dn=/^(?:focusinfocus|focusoutblur)$/,jn=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],y=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!Dn.test(y+w.event.triggered)&&(y.indexOf(".")>-1&&(x=y.split("."),y=x.shift(),x.sort()),c=y.indexOf(":")<0&&"on"+y,t=t[w.expando]?t:new w.Event(y,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[y]||{},o||!d.trigger||d.trigger.apply(i,n)!==!1)){if(!o&&!d.noBubble&&!m(i)){for(l=d.delegateType||y,Dn.test(l+y)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||y,p=(Z.get(s,"events")||{})[t.type]&&Z.get(s,"handle"),p&&p.apply(s,n),p=c&&s[c],p&&p.apply&&J(s)&&(t.result=p.apply(s,n),t.result===!1&&t.preventDefault());return t.type=y,o||t.isDefaultPrevented()||d._default&&d._default.apply(v.pop(),n)!==!1||!J(i)||c&&g(i[y])&&!m(i)&&(u=i[c],u&&(i[c]=null),w.event.triggered=y,t.isPropagationStopped()&&h.addEventListener(y,jn),i[y](),t.isPropagationStopped()&&h.removeEventListener(y,jn),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?w.event.trigger(e,t,n,!0):void 0}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Z.access(r,t);i||r.addEventListener(e,n,!0),Z.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Z.access(r,t)-1;i?Z.access(r,t,i):(r.removeEventListener(e,n,!0),Z.remove(r,t))}}});var qn=e.location,Ln=Date.now(),Hn=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(r){n=void 0}return(!n||n.getElementsByTagName("parsererror").length)&&w.error("Invalid XML: "+t),n};var On=/\[\]$/,Pn=/\r?\n/g,Rn=/^(?:submit|button|image|reset|file)$/i,Mn=/^(?:input|select|textarea|keygen)/i;function In(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||On.test(e)?r(e,i):In(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)In(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)In(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&Mn.test(this.nodeName)&&!Rn.test(e)&&(this.checked||!vt.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Pn,"\r\n")}}):{name:t.name,value:n.replace(Pn,"\r\n")}}).get()}});var Wn=/%20/g,$n=/#.*$/,Fn=/([?&])_=[^&]*/,Bn=/^(.*?):[ \t]*([^\r\n]*)$/gm,_n=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,zn=/^(?:GET|HEAD)$/,Un=/^\/\//,Xn={},Vn={},Gn="*/".concat("*"),Yn=r.createElement("a");Yn.href=qn.href;function Qn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Jn(e,t,n,r){var i={},o=e===Vn;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Kn(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Zn(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}return o?(o!==u[0]&&u.unshift(o),n[o]):void 0}function er(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(a=l[u+" "+o]||l["* "+o],!a)for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){a===!0?a=l[i]:l[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qn.href,type:"GET",isLocal:_n.test(qn.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Gn,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":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Kn(Kn(e,w.ajaxSettings),t):Kn(w.ajaxSettings,e)},ajaxPrefilter:Qn(Xn),ajaxTransport:Qn(Vn),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,m=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),y=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Bn.exec(a))s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),S(0,t),this}};if(v.promise(E),h.url=((t||h.url||qn.href)+"").replace(Un,qn.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Yn.protocol+"//"+Yn.host!=l.protocol+"//"+l.host}catch(k){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),Jn(Xn,h,n,E),c)return E;f=w.event&&h.global,f&&0===w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!zn.test(h.type),o=h.url.replace($n,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Wn,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(Hn.test(o)?"&":"?")+h.data,delete h.data),h.cache===!1&&(o=o.replace(Fn,"$1"),d=(Hn.test(o)?"&":"?")+"_="+Ln++ +d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Gn+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(h.beforeSend.call(g,E,h)===!1||c))return E.abort();if(C="abort",y.add(h.complete),E.done(h.success),E.fail(h.error),i=Jn(Vn,h,n,E)){if(E.readyState=1,f&&m.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,S)}catch(k){if(c)throw k;S(-1,k)}}else S(-1,"No Transport");function S(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&300>t||304===t,r&&(b=Zn(h,E,r)),b=er(h,b,E,l),l?(h.ifModified&&(T=E.getResponseHeader("Last-Modified"),T&&(w.lastModified[o]=T),T=E.getResponseHeader("etag"),T&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,d=b.error,l=!d)):(d=C,(t||!C)&&(C="error",0>t&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&m.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),y.fireWith(g,[E,C]),f&&(m.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e,t){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){w.globalEval(e,t)}})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return this.each(g(e)?function(t){w(this).wrapInner(e.call(this,t))}:function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var tr={0:200,1223:204},nr=w.ajaxSettings.xhr();h.cors=!!nr&&"withCredentials"in nr,h.ajax=nr=!!nr,w.ajaxTransport(function(t){var n,r;return h.cors||nr&&!t.crossDomain?{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(tr[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(u){if(n)throw u}},abort:function(){n&&n()}}:void 0}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.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 w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain||e.scriptAttrs){var t,n;return{send:function(i,o){t=w("');}});},setTriState:function(value,$checkbox){switch(value){case('1'):$checkbox.prop('checked',true).prop('indeterminate',false);break;case('0'):$checkbox.prop('checked',false).prop('indeterminate',false);break;case('unchanged'):$checkbox.prop('checked',false).prop('indeterminate',true);break;}},toggleMobileMenu:function(e){var $sidebar=$('#sidebar');var $target=$(e.target);var href=$target.attr('href');if(href){if(href!=='#'){$sidebar.removeClass('expanded');}}else if(!$target.is('input')){$sidebar.toggleClass('expanded');}},closeMobileMenu:function(e){var $search=$('#search');if(e.which===13&&$search.is(':focus')){$('#sidebar').removeClass('expanded');$search[0].blur();}},initializeControls:function(container){var $container=$(container);if($container.parent('.dashboard').length||$('#layout').hasClass('fullscreen-layout')){return;} $container.find('.controls').each(function(){var $controls=$(this);if(!$controls.prev('.fake-controls').length){var $tabs=$controls.find('.tabs',$controls);if($tabs.length&&$controls.children().length>1&&!$tabs.next('.tabs-spacer').length){$tabs.after($('
'));} var $fakeControls=$('
');$fakeControls.height($controls.height()).css({float:'right'});$controls.before($fakeControls).css({position:'fixed'});}});this.fixControls($container);},fixControls:function($container){var $layout=$('#layout');if($layout.hasClass('fullscreen-layout')){return;} if(typeof $container==='undefined'){var $header=$('#header');var $headerLogo=$('#header-logo-container');var $main=$('#main');var $search=$('#search');var $sidebar=$('#sidebar');$header.css({height:'auto'});if($layout.hasClass('minimal-layout')){if(!this.mobileMenu&&$sidebar.length){$header.css({top:$sidebar.outerHeight()+'px'});$headerLogo.css({display:'none'});$main.css({top:$header.outerHeight()+$sidebar.outerHeight()});$sidebar.on('click',this.toggleMobileMenu).prepend($('
'));$('#header-logo').clone().attr('id','mobile-menu-logo').appendTo('#mobile-menu-toggle');$(window).on('keypress',this.closeMobileMenu);this.mobileMenu=true;}}else{$headerLogo.css({top:$header.css('height')});$main.css({top:$header.css('height')});if(!!$headerLogo.length){$sidebar.css({top:$headerLogo.offset().top+$headerLogo.outerHeight()});} if(this.mobileMenu){$header.css({top:0});$headerLogo.css({display:'block'});$sidebar.removeClass('expanded').off('click',this.toggleMobileMenu);$search.off('keypress',this.closeMobileMenu);$('#mobile-menu-toggle').remove();this.mobileMenu=false;}} var _this=this;$('.container').each(function(){_this.fixControls($(this));});return;} if($container.parent('.dashboard').length){return;} $container.find('.controls').each(function(){var $controls=$(this);var $fakeControls=$controls.prev('.fake-controls');$fakeControls.css({float:'',height:$controls.height()});$controls.css({top:$container.offsetParent().position().top,width:$fakeControls.outerWidth()});});var $statusBar=$container.children('.monitoring-statusbar');if($statusBar.length){$statusBar.css({left:$container.offset().left,width:$container.width()});$statusBar.prev('.monitoring-statusbar-ghost').height($statusBar.outerHeight(true));}},toggleFullscreen:function(){$('#layout').toggleClass('fullscreen-layout');this.fixControls();},getUniqueContainerId:function($cont){if(typeof $cont==='undefined'||!$cont.length){return null;} var containerId=$cont.data('icingaContainerId');if(typeof containerId==='undefined'){if($cont.attr('id')==='menu'||$cont.attr('id')==='col1'){return null;} containerId=this.icinga.utils.generateId(6);$cont.data('icingaContainerId',containerId);} return containerId;},getWindowId:function(){if(!this.hasWindowId()){return undefined;} return window.name.match(/^Icinga-([a-zA-Z0-9]+)$/)[1];},hasWindowId:function(){var res=window.name.match(/^Icinga-([a-zA-Z0-9]+)$/);return typeof res==='object'&&null!==res;},setWindowId:function(id){this.icinga.logger.debug('Setting new window id',id);window.name='Icinga-'+id;},destroy:function(){this.icinga=null;this.debugTimer=null;this.timeCounterTimer=null;}};}(Icinga,jQuery));(function(Icinga,$){'use strict';Icinga.Timer=function(icinga){this.icinga=icinga;this.ticker=null;this.interval=250;this.observers=[];this.stepCounter=0;this.start=(new Date()).getTime();this.lastRuntime=[];this.isRunning=false;};Icinga.Timer.prototype={initialize:function(){this.isRunning=true;var _this=this;var f=function(){if(_this.isRunning){_this.tick();setTimeout(f,_this.interval);}};f();},tick:function(){var icinga=this.icinga;$.each(this.observers,function(idx,observer){if(observer.isDue()){observer.run();}else{}});icinga=null;},register:function(callback,scope,interval){var observer;try{if(typeof scope==='undefined'){observer=new Icinga.Timer.Interval(callback,interval);}else{observer=new Icinga.Timer.Interval(callback.bind(scope),interval);} this.observers.push(observer);}catch(err){this.icinga.logger.error(err);} return observer;},unregister:function(observer){var idx=$.inArray(observer,this.observers);if(idx>-1){this.observers.splice(idx,1);} return this;},destroy:function(){this.isRunning=false;this.icinga=null;$.each(this.observers,function(idx,observer){observer.destroy();});this.observers=[];}};Icinga.Timer.Interval=function(callback,interval){if('undefined'===typeof interval){throw'Timer interval is required';} if(interval<100){throw'Timer interval cannot be less than 100ms, got '+interval;} this.lastRun=(new Date()).getTime();this.interval=interval;this.scheduledNextRun=this.lastRun+interval;this.callback=callback;};Icinga.Timer.Interval.prototype={isDue:function(){return this.scheduledNextRun<(new Date()).getTime();},run:function(){this.lastRun=(new Date()).getTime();while(this.scheduledNextRun0;},autorefresh:function(){var _this=this;$('.container').filter(this.filterAutorefreshingContainers).each(function(idx,el){var $el=$(el);var id=$el.attr('id');if(id!=='application-state'&&(!_this.autorefreshEnabled||_this.autorefreshSuspended)){return true;} if(typeof _this.requests[id]!=='undefined'){_this.icinga.logger.debug('No refresh, request pending for ',id);return;} var interval=$el.data('icingaRefresh');var lastUpdate=$el.data('lastUpdate');if(typeof interval==='undefined'||!interval){_this.icinga.logger.info('No interval, setting default',id);interval=10;} if(typeof lastUpdate==='undefined'||!lastUpdate){_this.icinga.logger.info('No lastUpdate, setting one',id);$el.data('lastUpdate',(new Date()).getTime());return;} interval=interval*1000;if((lastUpdate+interval)>(new Date()).getTime()){return;} if(_this.loadUrl($el.data('icingaUrl'),$el,undefined,undefined,undefined,true)===false){_this.icinga.logger.debug('NOT autorefreshing '+id+', even if '+interval+' ms passed. Request pending?');}else{_this.icinga.logger.debug('Autorefreshing '+id+' '+interval+' ms passed');} el=null;});},disableAutorefresh:function(){this.autorefreshEnabled=false;},enableAutorefresh:function(){this.autorefreshEnabled=true;},processNotificationHeader:function(req){var header=req.getResponseHeader('X-Icinga-Notification');var _this=this;if(!header)return false;var list=header.split('&');$.each(list,function(idx,el){var parts=decodeURIComponent(el).split(' ');_this.createNotice(parts.shift(),parts.join(' '));});return true;},addUrlFlag:function(url,flag){if(url.match(/\?/)){return url+'&'+flag;}else{return url+'?'+flag;}},processRedirectHeader:function(req){var icinga=this.icinga,redirect=req.getResponseHeader('X-Icinga-Redirect');if(!redirect){return false;} redirect=decodeURIComponent(redirect);if(redirect.match(/__SELF__/)){if(req.autorefresh){redirect=redirect.replace(/__SELF__/,encodeURIComponent(document.location.pathname+document.location.search+document.location.hash));}else{redirect=redirect.replace(/__SELF__/,req.url);}} var useHttp=req.getResponseHeader('X-Icinga-Redirect-Http');if(useHttp==='yes'){window.location.replace(redirect);return true;} this.redirectToUrl(redirect,req.$target,req);return true;},redirectToUrl:function(url,$target,referrer){var icinga=this.icinga,rerenderLayout,autoRefreshInterval,forceFocus,origin;if(typeof referrer!=='undefined'){rerenderLayout=referrer.getResponseHeader('X-Icinga-Rerender-Layout');autoRefreshInterval=referrer.autoRefreshInterval;forceFocus=referrer.forceFocus;origin=referrer.url;} icinga.logger.debug('Got redirect for ',$target,', URL was '+url);if(rerenderLayout){var parts=url.split(/#!/);url=parts.shift();var redirectionUrl=this.addUrlFlag(url,'renderLayout');var r=this.loadUrl(redirectionUrl,$('#layout'));r.historyUrl=url;if(parts.length){r.loadNext=parts;}else if(!!document.location.hash){parts=document.location.hash.split('#!').splice(1);if(parts.length){r.loadNext=$.grep(parts,function(url){if(url!==origin){icinga.logger.debug('Retaining detail url '+url);return true;} icinga.logger.debug('Discarding detail url '+url+' as it\'s the origin of the redirect');return false;});}}}else{if(url.match(/#!/)){var parts=url.split(/#!/);icinga.ui.layout2col();this.loadUrl(parts.shift(),$('#col1'));this.loadUrl(parts.shift(),$('#col2'));}else{if($target.attr('id')==='col2'){if($('#col1').data('icingaUrl').split('?')[0]===url.split('?')[0]){icinga.ui.layout1col();$target=$('#col1');delete(this.requests['col2']);}} var req=this.loadUrl(url,$target);req.forceFocus=url===origin?forceFocus:null;req.autoRefreshInterval=autoRefreshInterval;req.referrer=referrer;}}},cacheLoadedIcons:function($container){return;var _this=this;$('img.icon',$container).each(function(idx,img){var src=$(img).attr('src');if(typeof _this.iconCache[src]!=='undefined'){return;} var cache=new Image();cache.src=src _this.iconCache[src]=cache;});},onResponse:function(data,textStatus,req){var _this=this;if(this.failureNotice!==null){if(!this.failureNotice.hasClass('fading-out')){this.failureNotice.remove();} this.failureNotice=null;} this.icinga.logger.debug('Got response for ',req.$target,', URL was '+req.url);this.processNotificationHeader(req);var cssreload=req.getResponseHeader('X-Icinga-Reload-Css');if(cssreload){this.icinga.ui.reloadCss();} if(req.getResponseHeader('X-Icinga-Redirect')){return;} if(req.getResponseHeader('X-Icinga-Announcements')==='refresh'){_this.loadUrl(_this.url('/layout/announcements'),$('#announcements'));} var $resp=$('
'+req.responseText+'
');var active=false;var rendered=false;var classes;if(req.autorefresh){active=$('[href].active',req.$target).attr('href');} var target=req.getResponseHeader('X-Icinga-Container');var newBody=false;var oldNotifications=false;if(target){if(target==='ignore'){return;} delete this.requests[req.$target.attr('id')];req.$target=$('#'+target);if(target==='layout'){oldNotifications=$('#notifications li').detach();} this.icinga.ui.layout1col();newBody=true;} if(target!=='layout'){var moduleName=req.getResponseHeader('X-Icinga-Module');classes=$.grep(req.$target.classes(),function(el){if(el==='icinga-module'||el.match(/^module\-/)){return false;} return true;});if(moduleName){req.$target.data('icingaModule',moduleName);classes.push('icinga-module');classes.push('module-'+moduleName);}else{req.$target.removeData('icingaModule');if(req.$target.attr('data-icinga-module')){req.$target.removeAttr('data-icinga-module');}} req.$target.attr('class',classes.join(' '));var refresh=req.autoRefreshInterval||req.getResponseHeader('X-Icinga-Refresh');if(refresh){req.$target.data('icingaRefresh',refresh);}else{req.$target.removeData('icingaRefresh');if(req.$target.attr('data-icinga-refresh')){req.$target.removeAttr('data-icinga-refresh');}}} var title=req.getResponseHeader('X-Icinga-Title');if(title&&(target==='layout'||req.$target.is('#layout'))){this.icinga.ui.setTitle(decodeURIComponent(title));}else if(title&&!req.autorefresh&&req.$target.closest('.dashboard').length===0){req.$target.data('icingaTitle',decodeURIComponent(title));} var windowId=req.getResponseHeader('X-Icinga-WindowId');if(windowId){this.icinga.ui.setWindowId(windowId);} if(req.url.match(/^\/search/)&&req.$target.data('icingaUrl').match(/^\/search/)&&$('.dashboard',$resp).length>0&&$('.dashboard .container',req.$target).length>0){var targets=[];$('.dashboard .container',req.$target).each(function(idx,el){targets.push($(el));});var i=0;$('.dashboard .container',$resp).each(function(idx,el){var $el=$(el);if($el.hasClass('dashboard')){return;} var url=$el.data('icingaUrl');targets[i].data('icingaUrl',url);var title=$('h1',$el).first();$('h1',targets[i]).first().replaceWith(title);_this.loadUrl(url,targets[i]);i++;});rendered=true;} var referrer=req.referrer;if(typeof referrer==='undefined'){referrer=req;} var autoSubmit=false;if(referrer.method==='POST'){var newUrl=this.icinga.utils.parseUrl(req.url);var currentUrl=this.icinga.utils.parseUrl(req.$target.data('icingaUrl'));if(newUrl.path===currentUrl.path&&this.icinga.utils.objectsEqual(newUrl.params,currentUrl.params)){autoSubmit=true;}} req.$target.data('icingaUrl',req.url);this.icinga.ui.initializeTriStates($resp);if(rendered){return;} if(typeof req.progressTimer!=='undefined'){this.icinga.timer.unregister(req.progressTimer);} this.renderContentToContainer($resp.html(),req.$target,req.action,req.autorefresh,req.forceFocus,autoSubmit);if(oldNotifications){oldNotifications.appendTo($('#notifications'));} if(newBody){this.icinga.ui.fixDebugVisibility().triggerWindowResize();} _this.cacheLoadedIcons(req.$target);},onComplete:function(dataOrReq,textStatus,reqOrError){var req;if(typeof dataOrReq==='object'){req=dataOrReq;}else{req=reqOrError;} if(req.$target.hasClass('impact')){req.$target.removeClass('impact');} if(!req.autorefresh){var url=req.url;if(req.$target[0].id==='col1'){this.icinga.behaviors.navigation.trySetActiveAndSelectedByUrl(url);} var $forms=$('[action="'+this.icinga.utils.parseUrl(url).path+'"]');var $matches=$.merge($('[href="'+url+'"]'),$forms);$matches.each(function(idx,el){var $el=$(el);if($el.closest('#menu').length){if($el.is('form')){$('input',$el).addClass('active');} return false;}});} if(!req.autorefresh&&req.addToHistory){if(req.$target.hasClass('container')){if(req.$target.parent().closest('.container').length===0){this.icinga.history.pushCurrentState();}}else{var url=typeof req.historyUrl!=='undefined'?req.historyUrl:req.url;this.icinga.history.pushUrl(url);}} req.$target.data('lastUpdate',(new Date()).getTime());delete this.requests[req.$target.attr('id')];this.icinga.ui.fadeNotificationsAway();if(this.processRedirectHeader(req)){return;} if(typeof req.loadNext!=='undefined'&&req.loadNext.length){if($('#col2').length){var r=this.loadUrl(req.loadNext[0],$('#col2'));r.addToHistory=req.addToHistory;this.icinga.ui.layout2col();}else{this.icinga.logger.error('Failed to load URL for #col2',req.loadNext);}} req.$target.trigger('rendered');this.icinga.ui.refreshDebug();},onFailure:function(req,textStatus,errorThrown){var url=req.url;if(req.addToHistory&&!req.autorefresh){req.$target.data('icingaRefresh',0);req.$target.data('icingaUrl',url);icinga.history.pushCurrentState();} if(typeof req.progressTimer!=='undefined'){this.icinga.timer.unregister(req.progressTimer);} if(req.status>0){this.icinga.logger.error(req.status,errorThrown+':',$(req.responseText).text().replace(/\s+/g,' ').slice(0,100));this.renderContentToContainer(req.responseText,req.$target,req.action,req.autorefresh);}else{if(errorThrown==='abort'){this.icinga.logger.debug('Request to '+url+' has been aborted for ',req.$target);req.addToHistory=false;}else{if(this.failureNotice===null){var now=new Date();var padString=this.icinga.utils.padString;this.failureNotice=this.createNotice('error','The connection to the Icinga web server was lost at ' +now.getFullYear() +'-'+padString(now.getMonth()+1,0,2) +'-'+padString(now.getDate(),0,2) +' '+padString(now.getHours(),0,2) +':'+padString(now.getMinutes(),0,2) +'.',true);this.icinga.ui.fixControls();} this.icinga.logger.error('Failed to contact web server loading ',url,' for ',req.$target);}}},createNotice:function(severity,message,persist){var c=severity;if(persist){c+=' persist';} var $notice=$('
  • '+this.icinga.utils.escape(message)+'
  • ').appendTo($('#notifications'));this.icinga.ui.fixControls();if(!persist){this.icinga.ui.fadeNotificationsAway();} return $notice;},renderContentToContainer:function(content,$container,action,autorefresh,forceFocus,autoSubmit){var scrollPos=false;var _this=this;var containerId=$container.attr('id');var activeElementPath=false;var navigationAnchor=false;var focusFallback=false;if(forceFocus&&forceFocus.length){if(typeof forceFocus==='string'){navigationAnchor=forceFocus;}else{activeElementPath=this.icinga.utils.getCSSPath($(forceFocus));}}else if(document.activeElement&&document.activeElement.id==='search'){activeElementPath='#search';}else if(document.activeElement&&document.activeElement!==document.body&&$.contains($container[0],document.activeElement)){var $activeElement=$(document.activeElement);var $pagination=$activeElement.closest('.pagination-control');if($pagination.length){focusFallback={'parent':this.icinga.utils.getCSSPath($pagination),'child':'.active > a'};} activeElementPath=this.icinga.utils.getCSSPath($activeElement);} if(!forceFocus&&typeof containerId!=='undefined'){if(autorefresh||autoSubmit){scrollPos=$container.scrollTop();}else{scrollPos=0;}} $container.trigger('beforerender');var discard=false;$.each(_this.icinga.behaviors,function(name,behavior){if(behavior.renderHook){var changed=behavior.renderHook(content,$container,action,autorefresh);if(!changed){discard=true;}else{content=changed;}}});if(discard){return;} var $content=$('
    '+content+'
    ');$('.container',$container).each(function(){_this.stopPendingRequestsFor($(this));});if(false&&$('.dashboard',$content).length>0&&$('.dashboard',$container).length===0){}else{if($container.closest('.dashboard').length){var title=$('h1',$container).first().detach();$container.html(title).append(content);}else if(action==='replace'){$container.html(content);}else{$container.append(content);}} this.icinga.ui.assignUniqueContainerIds();if(navigationAnchor){setTimeout(this.icinga.ui.focusElement,0,navigationAnchor,$container);}else if(!activeElementPath){if(!autorefresh){setTimeout(function(){if(typeof $container.attr('tabindex')==='undefined'){$container.attr('tabindex',-1);} if($(document.activeElement).closest('.container').attr('id')!==containerId){_this.icinga.ui.focusElement($container);}},0);}}else{setTimeout(function(){var $activeElement=$(activeElementPath);if($activeElement.length&&$activeElement.is(':visible')){$activeElement[0].focus({preventScroll:autorefresh});}else if(!autorefresh){if(focusFallback){_this.icinga.ui.focusElement($(focusFallback.parent).find(focusFallback.child));}else if(typeof $container.attr('tabindex')==='undefined'){$container.attr('tabindex',-1);} _this.icinga.ui.focusElement($container);}},0);} var icinga=this.icinga;icinga.ui.initializeControls($container);icinga.ui.fixControls();if(scrollPos!==false){$container.scrollTop(scrollPos);setTimeout(function(){if($container.scrollTop()!==scrollPos){$container.scrollTop(scrollPos);}},0);}},destroy:function(){$.each(this.requests,function(id,request){request.abort();});this.icinga=null;this.requests={};}};}(Icinga,jQuery));(function(Icinga,$){"use strict";var EventListener=function(icinga){this.icinga=icinga;this.handlers=[];};EventListener.prototype.on=function(evt,cond,fn,scope){if(typeof cond==='function'){scope=fn;fn=cond;cond='body';} this.icinga.logger.debug('on: '+evt+'('+cond+')');this.handlers.push({evt:evt,cond:cond,fn:fn,scope:scope});};EventListener.prototype.bind=function(emitter){var _this=this;$.each(this.handlers,function(i,handler){_this.icinga.logger.debug('bind: '+handler.evt+'('+handler.cond+')');emitter.on(handler.evt,handler.cond,{self:handler.scope||emitter,icinga:_this.icinga},handler.fn);});};EventListener.prototype.unbind=function(emitter){var _this=this;$.each(this.handlers,function(i,handler){_this.icinga.logger.debug('unbind: '+handler.evt+'('+handler.cond+')');emitter.off(handler.evt,handler.cond,handler.fn);});};Icinga.EventListener=EventListener;})(Icinga,jQuery);(function(Icinga,$){'use strict';Icinga.Events=function(icinga){this.icinga=icinga;this.searchValue='';this.searchTimer=null;this.initializeModules=true;};Icinga.Events.prototype={initialize:function(){this.applyGlobalDefaults();$('#layout').trigger('rendered');$('.container').each(function(idx,el){icinga.ui.initializeControls($(el));});},applyHandlers:function(event){var $target=$(event.target);var _this=event.data.self;var icinga=_this.icinga;if(!icinga){console.log('Got no icinga in applyHandlers');return;} if(_this.initializeModules){var loaded=false;var moduleName=$target.data('icingaModule');if(moduleName){if(icinga.hasModule(moduleName)&&!icinga.isLoadedModule(moduleName)){loaded|=icinga.loadModule(moduleName);}} $('.icinga-module',$target).each(function(idx,mod){moduleName=$(mod).data('icingaModule');if(icinga.hasModule(moduleName)&&!icinga.isLoadedModule(moduleName)){loaded|=icinga.loadModule(moduleName);}});if(loaded){event.stopImmediatePropagation();_this.initializeModules=false;var $container=$target.closest('.container');if(!$container.length){$container=$('.container');} $container.trigger('rendered');return false;}}else{_this.initializeModules=true;} $('.dashboard > div',$target).each(function(idx,el){var $element=$(el);var $url=$element.data('icingaUrl');if(typeof $url!=='undefined'){icinga.loader.loadUrl($url,$element).autorefresh=true;}});var $searchField=$('#menu input.search',$target);if($searchField.length&&$searchField.val().length){_this.searchValue=$searchField.val();}},applyGlobalDefaults:function(){$(document).on('rendered',{self:this},this.applyHandlers);$(document).on('visibilitychange',{self:this},this.onVisibilityChange);$.each(this.icinga.behaviors,function(name,behavior){behavior.bind($(document));});$(window).on('resize',{self:this.icinga.ui},this.icinga.ui.onWindowResize);$(window).on('load',{self:this},this.onLoad);$(window).on('unload',{self:this},this.onUnload);$(window).on('beforeunload',{self:this},this.onUnload);$(document).on('click','#notifications li',function(){$(this).remove();});$(document).on('click','a',{self:this},this.linkClicked);$(document).on('click','tr[href]',{self:this},this.linkClicked);$(document).on('click','input[type="submit"], button[type="submit"]',this.rememberSubmitButton);$(document).on('submit','form',{self:this},this.submitForm);$(document).on('change','form select.autosubmit',{self:this},this.autoSubmitForm);$(document).on('change','form input.autosubmit',{self:this},this.autoSubmitForm);$(document).on('focus','form select[data-related-radiobtn]',{self:this},this.autoCheckRadioButton);$(document).on('focus','form input[data-related-radiobtn]',{self:this},this.autoCheckRadioButton);$(document).on('keyup','#menu input.search',{self:this},this.autoSubmitSearch);$(document).on('click','.tree .handle',{self:this},this.treeNodeToggle);$(document).on('click','#search + .search-reset',this.clearSearch);},treeNodeToggle:function(){var $parent=$(this).closest('li');if($parent.hasClass('collapsed')){$('li',$parent).addClass('collapsed');$parent.removeClass('collapsed');}else{$parent.addClass('collapsed');} icinga.ui.fixControls($parent.closest('.container'));},onLoad:function(event){$('body').removeClass('loading');},onUnload:function(event){var icinga=event.data.self.icinga;icinga.logger.info('Unloading Icinga');icinga.destroy();},onVisibilityChange:function(event){var icinga=event.data.self.icinga;if(document.visibilityState===undefined||document.visibilityState==='visible'){icinga.loader.autorefreshSuspended=false;icinga.logger.debug('Page visible, enabling auto-refresh');}else{icinga.loader.autorefreshSuspended=true;icinga.logger.debug('Page invisible, disabling auto-refresh');}},autoCheckRadioButton:function(event){var $input=$(event.currentTarget);var $radio=$('#'+$input.attr('data-related-radiobtn'));if($radio.length){$radio.prop('checked',true);} return true;},autoSubmitSearch:function(event){var _this=event.data.self;if($('#menu input.search').val()===_this.searchValue){return;} _this.searchValue=$('#menu input.search').val();if(_this.searchTimer!==null){clearTimeout(_this.searchTimer);_this.searchTimer=null;} var _event=$.extend({},event);_this.searchTimer=setTimeout(function(){_this.submitForm(_event,true);_this.searchTimer=null;},500);},rememberSubmitButton:function(e){var $button=$(this);var $form=$button.closest('form');$form.data('submitButton',$button);},autoSubmitForm:function(event){return event.data.self.submitForm(event,true);},submitForm:function(event,autosubmit){var _this=event.data.self;var icinga=_this.icinga;var $form=$(event.currentTarget).closest('form');var url=$form.attr('action');var method=$form.attr('method');var encoding=$form.attr('enctype');var $button=$('input[type=submit]:focus',$form).add('button[type=submit]:focus',$form);var progressTimer;var $target;var data;var $rememberedSubmittButton=$form.data('submitButton');if(typeof $rememberedSubmittButton!='undefined'){if($form.has($rememberedSubmittButton)){$button=$rememberedSubmittButton;} $form.removeData('submitButton');} if($form.closest('[data-no-icinga-ajax]').length>0){return true;} if($button.length===0){var $el;if(typeof event.originalEvent!=='undefined'&&typeof event.originalEvent.explicitOriginalTarget==='object'){$el=$(event.originalEvent.explicitOriginalTarget);icinga.logger.debug('events/submitForm: Button is event.originalEvent.explicitOriginalTarget');}else{$el=$(event.currentTarget);icinga.logger.debug('events/submitForm: Button is event.currentTarget');} if($el&&($el.is('input[type=submit]')||$el.is('button[type=submit]'))){$button=$el;}else{icinga.logger.debug('events/submitForm: Can not determine submit button, using the first one in form');}} if(typeof method==='undefined'){method='POST';}else{method=method.toUpperCase();} if(typeof encoding==='undefined'){encoding='application/x-www-form-urlencoded';} if(typeof autosubmit==='undefined'){autosubmit=false;} if($button.length===0){$button=$('input[type=submit]',$form).add('button[type=submit]',$form).first();} if($button.length){if($button.hasClass('spinner')){$button.addClass('active');} $target=_this.getLinkTargetFor($button);}else{$target=_this.getLinkTargetFor($form);} if(!url){url=$target.closest('.container').data('icinga-url');} icinga.logger.debug('Submitting form: '+method+' '+url,method);if(method==='GET'){var dataObj=$form.serializeObject();if(!autosubmit){if($button.length&&$button.attr('name')!=='undefined'){dataObj[$button.attr('name')]=$button.attr('value');}} url=icinga.utils.addUrlParams(url,dataObj);}else{if(encoding==='multipart/form-data'){data=new window.FormData($form[0]);}else{data=$form.serializeArray();} if(!autosubmit){if($button.length&&$button.attr('name')!=='undefined'){if(encoding==='multipart/form-data'){data.append($button.attr('name'),$button.attr('value'));}else{data.push({name:$button.attr('name'),value:$button.attr('value')});}}}} if($target.attr('id')===$form.closest('.container').attr('id')){$form.find(':input:not(#search):not(:disabled)').prop('disabled',true);} if(autosubmit&&typeof $el!=='undefined'&&$el.siblings('.spinner').length){$el.siblings('.spinner').first().addClass('active');}else if($button.length&&$button.is('button')&&$button.hasClass('animated')){$button.addClass('active');}else if($button.length&&$button.attr('data-progress-label')){var isInput=$button.is('input');if(isInput){$button.prop('value',$button.attr('data-progress-label')+'...');}else{$button.html($button.attr('data-progress-label')+'...');} $button.css('width',$button.css('width'));progressTimer=icinga.timer.register(function(){var label=isInput?$button.prop('value'):$button.html();var dots=label.substr(-3);if(dots==='...'){label=label.slice(0,-2)+' ';}else if(dots==='.. '){label=label.slice(0,-1)+'.';}else if(dots==='. '){label=label.slice(0,-2)+'. ';} if(isInput){$button.prop('value',label);}else{$button.html(label);}},null,100);}else if($button.length&&$button.next().hasClass('spinner')){$('i',$button.next()).addClass('active');}else if($form.attr('data-progress-element')){var $progressElement=$('#'+$form.attr('data-progress-element'));if($progressElement.length){if($progressElement.hasClass('spinner')){$('i',$progressElement).addClass('active');}else{$('i.spinner',$progressElement).addClass('active');}}} var req=icinga.loader.loadUrl(url,$target,data,method);req.forceFocus=autosubmit?$(event.currentTarget):$button.length?$button:null;req.progressTimer=progressTimer;event.stopPropagation();event.preventDefault();return false;},handleExternalTarget:function($node){var linkTarget=$node.attr('target');if(linkTarget==='_blank'||linkTarget==='_self'){window.open($node.attr('href'),linkTarget);return true;} return false;},linkClicked:function(event){var _this=event.data.self;var icinga=_this.icinga;var $a=$(this);var $eventTarget=$(event.target);var href=$a.attr('href');var linkTarget=$a.attr('target');var $target;var formerUrl;if(href.match(/^(?:(?:mailto|javascript|data):|[a-z]+:\/\/)/)){event.stopPropagation();return true;} if($a.closest('[data-no-icinga-ajax]').length>0){return true;} if((event.ctrlKey||event.metaKey)&&href!=='#'&&$a.is('a')){window.open(href,linkTarget);return false;} if(!$a.is('tr[href]')&&$a.closest('table.action').length>0){if($a.closest('table.multiselect').length>0&&(event.ctrlKey||event.metaKey||event.shiftKey)){return true;} if($a.attr('href')===$a.closest('tr[href]').attr('href')){return true;}} if(linkTarget==='_blank'||linkTarget==='_self'){window.open(href,linkTarget);return false;} if(!$eventTarget.is($a)){if($eventTarget.is('input')||$eventTarget.is('button')){return;}else{var $button=$('input[type=submit]:focus').add('button[type=submit]:focus');if($button.length>0&&$.contains($button[0],$eventTarget[0])){return;}}} if($a.is('tr')&&$a.closest('table.multiselect').length>0){return;} event.stopPropagation();event.preventDefault();if(href.substr(0,1)==='#'&&href.length>1&&href.substr(1,1)!=='!'){icinga.ui.focusElement(href.substr(1),$a.closest('.container'));return;} if($a.hasClass('spinner')){$a.addClass('active');} if(href.match(/#/)){if(href==='#'){if($a.hasClass('close-container-control')){if(!icinga.ui.isOneColLayout()){var $cont=$a.closest('.container').first();if($cont.attr('id')==='col1'){icinga.ui.moveToLeft();icinga.ui.layout1col();}else{icinga.ui.layout1col();} icinga.history.pushCurrentState();}} return false;} $target=_this.getLinkTargetFor($a);formerUrl=$target.data('icingaUrl');if(typeof formerUrl!=='undefined'&&formerUrl.split(/#/)[0]===href.split(/#/)[0]){icinga.ui.focusElement(href.split(/#/)[1],$target);$target.data('icingaUrl',href);if(formerUrl!==href){icinga.history.pushCurrentState();} return false;}}else{$target=_this.getLinkTargetFor($a);} icinga.loader.loadUrl(href,$target);if($a.closest('#menu').length>0){icinga.ui.layout1col();} return false;},getLinkTargetFor:function($el){var targetId;var $target=$('#col1');var $container=$el.closest('.container');if($container.length){$target=$container;} if($el.closest('[data-base-target]').length){targetId=$el.closest('[data-base-target]').data('baseTarget');if(targetId==='_next'){if(this.icinga.ui.hasOnlyOneColumn()){targetId='col1';$target=$('#'+targetId);}else{if($el.closest('#col2').length){this.icinga.ui.moveToLeft();} targetId='col2';$target=$('#'+targetId);}}else if(targetId==='_self'){$target=$el.closest('.container');targetId=$target.attr('id');}else if(targetId==='_main'){targetId='col1';$target=$('#'+targetId);this.icinga.ui.layout1col();}else{$target=$('#'+targetId);if(!$target.length){this.icinga.logger.warn('Link target "#'+targetId+'" does not exist in DOM.');}}} if($target.attr('id')==='col2'){this.icinga.ui.layout2col();} return $target;},clearSearch:function(event){$(event.target).parent().find('#search').attr('value','');},unbindGlobalHandlers:function(){$.each(this.icinga.behaviors,function(name,behavior){behavior.unbind($(document));});$(window).off('resize',this.onWindowResize);$(window).off('load',this.onLoad);$(window).off('unload',this.onUnload);$(window).off('beforeunload',this.onUnload);$(document).off('scroll','.container',this.onContainerScroll);$(document).off('click','a',this.linkClicked);$(document).off('submit','form',this.submitForm);$(document).off('change','form select.autosubmit',this.submitForm);$(document).off('change','form input.autosubmit',this.submitForm);$(document).off('focus','form select[data-related-radiobtn]',this.autoCheckRadioButton);$(document).off('focus','form input[data-related-radiobtn]',this.autoCheckRadioButton);$(document).off('visibilitychange',this.onVisibilityChange);},destroy:function(){this.unbindGlobalHandlers();this.icinga=null;}};}(Icinga,jQuery));(function(Icinga,$){'use strict';Icinga.History=function(icinga){this.icinga=icinga;this.baseUrl=icinga.config.baseUrl;this.initialUrl=location.href;this.enabled=false;};Icinga.History.prototype={initialize:function(){if('undefined'!==typeof window.history&&typeof window.history.pushState==='function'){this.enabled=true;this.icinga.logger.debug('History API enabled');this.applyLocationBar(true);$(window).on('popstate',{self:this},this.onHistoryChange);}},pushCurrentState:function(){if(!this.enabled){return;} var url='';var title='';$('#main > .container').each(function(idx,container){var $container=$(container),cUrl=$container.data('icingaUrl'),cTitle=$container.data('icingaTitle');if('undefined'!==typeof cUrl){if(url===''){url=cUrl;}else{url=url+'#!'+cUrl;}} if(typeof cTitle!=='undefined'){title=cTitle;}});if(url!==''){this.icinga.logger.debug('Pushing current state to history');this.push(url);} if(title!==''){this.icinga.ui.setTitle(title);}},pushUrl:function(url){if(!this.enabled){return;} this.push(url);},push:function(url){url=url.replace(/[\?&]?_(render|reload)=[a-z0-9]+/g,'');if(this.lastPushUrl===url){this.icinga.logger.debug('Ignoring history state push for url '+url+' as it\' currently on top of the stack');return;} this.lastPushUrl=url;window.history.pushState(this.getBehaviorState(),null,url);},getBehaviorState:function(){var data={};$.each(this.icinga.behaviors,function(i,behavior){if(behavior.onPushState instanceof Function){data[i]=behavior.onPushState();}});return data;},onHistoryChange:function(event){var _this=event.data.self,icinga=_this.icinga;icinga.logger.debug('Got a history change');if(event.originalEvent.state===null){icinga.logger.debug('No more history steps available');}else{icinga.logger.debug('History state',event.originalEvent.state);} _this.lastPushUrl=location.href;_this.applyLocationBar();$.each(this.icinga.behaviors,function(i,behavior){if(behavior.onPopState instanceof Function&&history.state){behavior.onPopState(location.href,history.state[i]);}});},applyLocationBar:function(onload){var icinga=this.icinga,main,parts;if(typeof onload==='undefined'){onload=false;} main=document.location.pathname+document.location.search;if(!onload&&$('#col1').data('icingaUrl')!==main){icinga.loader.loadUrl(main,$('#col1')).addToHistory=false;} if(this.getPaneAnchor(0)){$('#col1').data('icingaUrl',$('#col1').data('icingaUrl')+'#'+this.getPaneAnchor(0));} var hash=this.getCol2State();if(hash&&hash.match(/^#!/)){parts=hash.split(/#!/);if($('#layout > #login').length){var redirect=$('#login form input[name=redirect]').first();redirect.val(redirect.val()+'#!'+parts[1]);}else{if($('#col2').data('icingaUrl')!==parts[1]){var req=icinga.loader.loadUrl(parts[1],$('#col2'));req.addToHistory=false;req.autorefresh=onload;}} icinga.ui.layout2col();}else{icinga.ui.layout1col();}},getPaneAnchor:function(col){if(col!==1&&col!==0){throw'Trying to get anchor for non-existing column: '+col;} var panes=document.location.toString().split('#!')[col];return panes&&panes.split('#')[1]||'';},getCol2State:function(){var hash=document.location.hash;if(hash){if(hash.match(/^#[^!]/)){var hashs=hash.split('#');hashs.shift();hashs.shift();hash='#'+hashs.join('#');}} return hash||'';},getCol1State:function(){var anchor=this.getPaneAnchor(0);var hash=window.location.pathname+window.location.search+ (anchor.length?('#'+anchor):'');return hash||'';},destroy:function(){$(window).off('popstate',this.onHistoryChange);this.icinga=null;}};}(Icinga,jQuery));(function(Icinga,$){'use strict';Icinga.Module=function(icinga,name,prototyp){this.icinga=icinga;this.handlers=[];this.registeredHandlers=[];this.name=name;this.prototyp=prototyp;this.object={};this.initialize();};Icinga.Module.prototype={initialize:function(){if(typeof this.prototyp!=='function'){this.icinga.logger.error('Unable to load module "'+this.name+'", constructor is missing');return false;} try{this.object=new this.prototyp(this);this.applyHandlers();}catch(e){this.icinga.logger.error('Failed to load module '+this.name+': ',e);return false;} this.icinga.logger.debug('Module '+this.name+' has been initialized');return true;},on:function(event,filter,handler){if(typeof handler==='undefined'){handler=filter;filter='.module-'+this.name;}else{filter='.module-'+this.name+' '+filter;} this.registeredHandlers.push({event:event,filter:filter,handler:handler});},applyHandlers:function(){var _this=this;$.each(this.registeredHandlers,function(key,on){_this.bindEventHandler(on.event,on.filter,on.handler);});_this=null;return this;},bindEventHandler:function(event,filter,handler){var _this=this;this.icinga.logger.debug('Bound '+filter+' .'+event+'()');this.handlers.push([event,filter,handler]);$(document).on(event,filter,handler.bind(_this.object));},unbindEventHandlers:function(){$.each(this.handlers,function(idx,handler){$(document).off(handler[0],handler[1],handler[2]);});},destroy:function(){this.unbindEventHandlers();if(typeof this.object.destroy==='function'){this.object.destroy();} this.object=null;this.icinga=null;this.prototyp=null;}};}(Icinga,jQuery));(function(Icinga,$){'use strict';Date.prototype.getStdTimezoneOffset=function(){var year=new Date().getFullYear();var offsetInJanuary=new Date(year,0,2).getTimezoneOffset();var offsetInJune=new Date(year,5,2).getTimezoneOffset();return Math.max(offsetInJanuary,offsetInJune);};Date.prototype.isDst=function(){return this.getStdTimezoneOffset()!==this.getTimezoneOffset();};Icinga.Timezone=function(){this.cookieName='icingaweb2-tzo';};Icinga.Timezone.prototype={initialize:function(){this.writeTimezone();},destroy:function(){},writeTimezone:function(){var date=new Date();var timezoneOffset=(date.getTimezoneOffset()*60)*-1;var dst=date.isDst();if(this.readCookie(this.cookieName)){return;} this.writeCookie(this.cookieName,timezoneOffset+'-'+Number(dst),1);},writeCookie:function(name,value,days){var expires='';if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires='; expires='+date.toGMTString();} document.cookie=name+'='+value+expires+'; path=/';},readCookie:function(name){var nameEq=name+'=';var ca=document.cookie.split(';');for(var i=0;i