From a562f6b9430be307adf5970a9559227b5a33ea65 Mon Sep 17 00:00:00 2001 From: Simounet Date: Sun, 8 Nov 2020 15:04:29 +0100 Subject: [PATCH] Basic dark theme handling --- .../themes/material/css/dark_theme.scss | 73 +++++++++++++++++++ .../static/themes/material/css/index.scss | 1 + .../themes/material/css/media_queries.scss | 2 +- .../static/themes/material/css/nav.scss | 6 +- app/Resources/static/themes/material/index.js | 59 ++++++++++++++- .../Resources/translations/messages.fr.yml | 2 + .../CoreBundle/Resources/views/base.html.twig | 2 +- .../themes/material/Entry/entry.html.twig | 6 ++ .../views/themes/material/layout.html.twig | 7 ++ .../CoreBundle/Twig/WallabagExtension.php | 6 ++ web/wallassets/baggy.js | 2 +- web/wallassets/baggy.js.map | 2 +- web/wallassets/material.css | 2 +- web/wallassets/material.css.map | 2 +- web/wallassets/material.js | 2 +- web/wallassets/material.js.map | 2 +- 16 files changed, 165 insertions(+), 11 deletions(-) create mode 100644 app/Resources/static/themes/material/css/dark_theme.scss diff --git a/app/Resources/static/themes/material/css/dark_theme.scss b/app/Resources/static/themes/material/css/dark_theme.scss new file mode 100644 index 000000000..fec13f0c2 --- /dev/null +++ b/app/Resources/static/themes/material/css/dark_theme.scss @@ -0,0 +1,73 @@ +.dark-theme { + body, + main #content, + #article, + .card, + .card-panel, + .card .card-reveal, + .card-stacked .preview:not(.preview--default), + .card .preview:not(.preview--default), + .collapsible-header, + .collection .collection-item, + .dropdown-content, + .nav-panel-add, + .nav-panel-search, + .side-nav, + .side-nav .collapsible-body, + .side-nav.fixed .collapsible-body, + .tabs { + background-color: black; + } + + .dropdown-content li:hover, + .dropdown-content li.active, + .dropdown-content li.selected { + background-color: #575757; + } + + main #content, + #article article, + #article article h1, + #article article h2, + #article article h3, + #article article h4, + #article article h5, + #article article h6, + .results a, + .side-nav li > a, + .side-nav li > a > i.material-icons { + color: #dfdfdf; + } + + .grey-text.text-darken-4 { + color: #dfdfdf !important; + } + + .side-nav li.active, + .side-nav li:not(.logo) > a:hover, + .side-nav .collapsible-header:hover, + .side-nav.fixed .collapsible-header:hover { + background-color: #333; + } + + #article { + box-shadow: 0 0 10px #575757; + } + + nav, + .card, + .side-nav { + box-shadow: 0 2px 2px 0 rgba(255, 255, 255, 0.4), 0 1px 5px 0 rgba(255, 255, 255, 0.4), 0 3px 1px -2px rgba(255, 255, 255, 0.4); + } + + .logo img, + .preview.preview--default, + .typo-logo { + filter: invert(100%); + } + + .border-bottom, + .collapsible { + border-color: #222; + } +} diff --git a/app/Resources/static/themes/material/css/index.scss b/app/Resources/static/themes/material/css/index.scss index 285a6504d..657a51633 100644 --- a/app/Resources/static/themes/material/css/index.scss +++ b/app/Resources/static/themes/material/css/index.scss @@ -9,6 +9,7 @@ @import 'nav'; @import 'sidenav'; @import 'various'; +@import 'dark_theme'; /* Tools */ @import 'fonts'; diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index b50dd5597..a7cde7185 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -15,7 +15,7 @@ } @media screen and (min-width: 993px) { - body.entry main #content { + main #content { padding-left: 70px; } } diff --git a/app/Resources/static/themes/material/css/nav.scss b/app/Resources/static/themes/material/css/nav.scss index c84f79571..f11e498e0 100644 --- a/app/Resources/static/themes/material/css/nav.scss +++ b/app/Resources/static/themes/material/css/nav.scss @@ -71,7 +71,6 @@ nav { } .input-field input:focus { - background-color: #fff; border: 0; box-shadow: none; color: #444; @@ -108,6 +107,11 @@ nav { } } +.nav-panel-add, +.nav-panel-search { + background-color: white; +} + .nav-form-button { padding: 0; background-color: transparent; diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index 2414c0fcc..0162d56e4 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js @@ -19,6 +19,62 @@ import './css/index.scss'; const mobileMaxWidth = 993; +function darkTheme() { + const rootEl = document.querySelector('html'); + const themeDom = { + darkClass: 'dark-theme', + + toggleClass(el) { + return el.classList.toggle(this.darkClass); + }, + + addClass(el) { + return el.classList.add(this.darkClass); + }, + + removeClass(el) { + return el.classList.remove(this.darkClass); + }, + }; + const themeCookie = { + values: { + light: 'light', + dark: 'dark', + }, + + name: 'theme', + + getValue(isDarkTheme) { + return isDarkTheme ? this.values.dark : this.values.light; + }, + + setCookie(isDarkTheme) { + const value = this.getValue(isDarkTheme); + document.cookie = `${this.name}=${value};samesite=Lax;path=/;max-age=31536000`; + }, + + exists() { + return document.cookie.split(';').map((cookie) => cookie.split('=')).filter((cookie) => cookie[0] === 'theme').length; + }, + }; + if (themeCookie.exists() === 0 && typeof window.matchMedia === 'function') { + const isPreferedColorSchemeDark = window.matchMedia('(prefers-color-scheme: dark)').matches === true; + if (isPreferedColorSchemeDark) { + themeDom.addClass(rootEl); + } + window.matchMedia('(prefers-color-scheme: dark)').addListener( + (e) => themeDom[e.matches ? 'addClass' : 'removeClass'](rootEl), + ); + } + const themeButton = document.querySelector('.js-theme-toggle'); + if (themeButton) { + themeButton.addEventListener('click', () => { + const isDarkTheme = themeDom.toggleClass(rootEl); + themeCookie.setCookie(isDarkTheme); + }); + } +} + const stickyNav = () => { const nav = $('.js-entry-nav-top'); $('[data-toggle="actions"]').click(() => { @@ -52,6 +108,7 @@ const articleScroll = () => { $(document).ready(() => { // sideNav $('.button-collapse').sideNav(); + darkTheme(); $('select').material_select(); $('.collapsible').collapsible({ accordion: false, @@ -76,7 +133,6 @@ $(document).ready(() => { const toggleNav = (toShow, toFocus) => { $('.nav-panel-actions').hide(100); $(toShow).show(100); - $('.nav-panels').css('background', 'white'); $(toFocus).focus(); }; @@ -109,7 +165,6 @@ $(document).ready(() => { $('.close').on('click', (e) => { $(e.target).parent('.nav-panel-item').hide(100); $('.nav-panel-actions').show(100); - $('.nav-panels').css('background', 'transparent'); return false; }); diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index f268e3ff0..b6cfd2a01 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -34,6 +34,7 @@ menu: site_credentials: Accès aux sites ignore_origin_instance_rules: "Règles globales d'omission d'origine" quickstart: "Pour bien débuter" + theme_toggle: "Changer le thème" top: add_new_entry: Sauvegarder un nouvel article search: Rechercher @@ -273,6 +274,7 @@ entry: delete_public_link: Supprimer le lien public export: Exporter print: Imprimer + theme_toggle: Changer le thème problem: label: Un problème ? description: Est-ce que cet article s’affiche mal ? diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig index 65857eb44..cecc36586 100644 --- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig @@ -4,7 +4,7 @@ - + {% block head %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 527b1afca..69a64f75b 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig @@ -97,6 +97,12 @@
+
  • + + brightness_medium + {{ 'entry.view.left_menu.theme_toggle'|trans }} + +
  • {% if craue_setting('share_public') or craue_setting('share_twitter') or craue_setting('share_shaarli') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index 52e39e27b..a08ac9392 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig @@ -117,6 +117,13 @@
  • vpn_key {{ 'menu.left.site_credentials'|trans }}
  • {% endif %}
  • +
  • + + brightness_medium + {{ 'menu.left.theme_toggle'|trans }} + +
  • +
  • {% if is_granted('ROLE_SUPER_ADMIN') %}
  • people{{ 'menu.left.users_management'|trans }}
  • settings {{ 'menu.left.internal_settings'|trans }}
  • diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php index 2c8fbcaca..fe7ce8c1b 100644 --- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php +++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php @@ -51,6 +51,7 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface new TwigFunction('count_tags', [$this, 'countTags']), new TwigFunction('display_stats', [$this, 'displayStats']), new TwigFunction('asset_file_exists', [$this, 'assetFileExists']), + new TwigFunction('theme_class', [$this, 'themeClass']), ]; } @@ -171,6 +172,11 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface return file_exists(realpath($this->rootDir . '/../web/' . $name)); } + public function themeClass() + { + return isset($_COOKIE['theme']) && 'dark' === $_COOKIE['theme'] ? 'dark-theme' : ''; + } + public function getName() { return 'wallabag_extension'; diff --git a/web/wallassets/baggy.js b/web/wallassets/baggy.js index ccd576d37..54a5ba4f8 100644 --- a/web/wallassets/baggy.js +++ b/web/wallassets/baggy.js @@ -1,2 +1,2 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=256)}([function(e,t,n){var r;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,T=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},l=o.push,Q=o.indexOf,c={},u=c.toString,d=c.hasOwnProperty,p=d.toString,_=p.call(Object),m={},f=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},h=function(e){return null!=e&&e===e.window},g=n.document,E={type:!0,src:!0,nonce:!0,noModule:!0};function L(e,t,n){var r,i,o=(n=n||g).createElement("script");if(o.text=e,t)for(r in E)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function y(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[u.call(e)]||"object":typeof e}var b=function(e,t){return new b.fn.init(e,t)};function S(e){var t=!!e&&"length"in e&&e.length,n=y(e);return!f(e)&&!h(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}b.fn=b.prototype={jquery:"3.5.1",constructor:b,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return b.each(this,e)},map:function(e){return this.pushStack(b.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(b.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(b.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+V+")"+V+"*"),Y=new RegExp(V+"|>"),q=new RegExp(B),W=new RegExp("^"+P+"$"),z={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+k),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+V+"*(even|odd|(([+-]|)(\\d*)n|)"+V+"*(?:([+-]|)"+V+"*(\\d+)|))"+V+"*\\)|)","i"),bool:new RegExp("^(?:"+D+")$","i"),needsContext:new RegExp("^"+V+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+V+"*((?:-\\d)?\\d*)"+V+"*\\)|)(?=[^-]|$)","i")},Z=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,$=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+V+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){u()},ae=Ee((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{x.apply(M=I.call(L.childNodes),L.childNodes),M[L.childNodes.length].nodeType}catch(e){x={apply:M.length?function(e,t){A.apply(e,I.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,Q,c,p,f,h=t&&t.ownerDocument,L=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==L&&9!==L&&11!==L)return r;if(!i&&(u(t),t=t||d,_)){if(11!==L&&(c=J.exec(e)))if(o=c[1]){if(9===L){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(h&&(l=h.getElementById(o))&&g(t,l)&&l.id===o)return r.push(l),r}else{if(c[2])return x.apply(r,t.getElementsByTagName(e)),r;if((o=c[3])&&n.getElementsByClassName&&t.getElementsByClassName)return x.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!C[e+" "]&&(!m||!m.test(e))&&(1!==L||"object"!==t.nodeName.toLowerCase())){if(f=e,h=t,1===L&&(Y.test(e)||j.test(e))){for((h=ee.test(e)&&fe(t.parentNode)||t)===t&&n.scope||((Q=t.getAttribute("id"))?Q=Q.replace(re,ie):t.setAttribute("id",Q=E)),s=(p=a(e)).length;s--;)p[s]=(Q?"#"+Q:":scope")+" "+ge(p[s]);f=p.join(",")}try{return x.apply(r,h.querySelectorAll(f)),r}catch(t){C(e,!0)}finally{Q===E&&t.removeAttribute("id")}}}return T(e.replace(U,"$1"),t,r,i)}function Te(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[E]=!0,e}function Qe(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function ue(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function _e(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function fe(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Z.test(t||n&&n.nodeName||"HTML")},u=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:L;return a!=d&&9===a.nodeType&&a.documentElement?(p=(d=a).documentElement,_=!o(d),L!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=Qe((function(e){return p.appendChild(e).appendChild(d.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=Qe((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=Qe((function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=X.test(d.getElementsByClassName),n.getById=Qe((function(e){return p.appendChild(e).id=E,!d.getElementsByName||!d.getElementsByName(E).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&_){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==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){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&_)return t.getElementsByClassName(e)},f=[],m=[],(n.qsa=X.test(d.querySelectorAll))&&(Qe((function(e){var t;p.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+V+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+V+"*(?:value|"+D+")"),e.querySelectorAll("[id~="+E+"-]").length||m.push("~="),(t=d.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+V+"*name"+V+"*="+V+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),Qe((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"+V+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=X.test(h=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&Qe((function(e){n.disconnectedMatch=h.call(e,"*"),h.call(e,"[s!='']:x"),f.push("!=",B)})),m=m.length&&new RegExp(m.join("|")),f=f.length&&new RegExp(f.join("|")),t=X.test(p.compareDocumentPosition),g=t||X.test(p.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)for(;t=t.parentNode;)if(t===e)return!0;return!1},N=t?function(e,t){if(e===t)return c=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==d||e.ownerDocument==L&&g(L,e)?-1:t==d||t.ownerDocument==L&&g(L,t)?1:Q?w(Q,e)-w(Q,t):0:4&r?-1:1)}:function(e,t){if(e===t)return c=!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:Q?w(Q,e)-w(Q,t):0;if(i===o)return ue(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ue(a[r],s[r]):a[r]==L?-1:s[r]==L?1:0},d):d},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(u(e),n.matchesSelector&&_&&!C[t+" "]&&(!f||!f.test(t))&&(!m||!m.test(t)))try{var r=h.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){C(t,!0)}return se(t,d,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=d&&u(e),g(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=d&&u(e);var i=r.attrHandle[t.toLowerCase()],o=i&&H.call(r.attrHandle,t.toLowerCase())?i(e,t,!_):void 0;return void 0!==o?o:n.attributes||!_?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(c=!n.detectDuplicates,Q=!n.sortStable&&e.slice(0),e.sort(N),c){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return Q=null,e},i=se.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 for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:z,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(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.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(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+V+")"+e+"("+V+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.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(F," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},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,T){var l,Q,c,u,d,p,_=o!==a?"nextSibling":"previousSibling",m=t.parentNode,f=s&&t.nodeName.toLowerCase(),h=!T&&!s,g=!1;if(m){if(o){for(;_;){for(u=t;u=u[_];)if(s?u.nodeName.toLowerCase()===f:1===u.nodeType)return!1;p=_="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&h){for(g=(d=(l=(Q=(c=(u=m)[E]||(u[E]={}))[u.uniqueID]||(c[u.uniqueID]={}))[e]||[])[0]===y&&l[1])&&l[2],u=d&&m.childNodes[d];u=++d&&u&&u[_]||(g=d=0)||p.pop();)if(1===u.nodeType&&++g&&u===t){Q[e]=[y,d,g];break}}else if(h&&(g=d=(l=(Q=(c=(u=t)[E]||(u[E]={}))[u.uniqueID]||(c[u.uniqueID]={}))[e]||[])[0]===y&&l[1]),!1===g)for(;(u=++d&&u&&u[_]||(g=d=0)||p.pop())&&((s?u.nodeName.toLowerCase()!==f:1!==u.nodeType)||!++g||(h&&((Q=(c=u[E]||(u[E]={}))[u.uniqueID]||(c[u.uniqueID]={}))[e]=[y,g]),u!==t)););return(g-=i)===r||g%r==0&&g/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[E]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=w(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace(U,"$1"));return r[E]?le((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;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:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return W.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===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===p},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:_e(!1),disabled:_e(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return $.test(e.nodeName)},input:function(e){return K.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:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,n){return[n<0?n+t:n]})),even:me((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:me((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function ye(e,t,n,r,i){for(var o,a=[],s=0,T=e.length,l=null!=t;s-1&&(o[l]=!(a[l]=c))}}else f=ye(f===a?f.splice(p,f.length):f),i?i(null,a,f,T):x.apply(a,f)}))}function Se(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],T=a?1:0,Q=Ee((function(e){return e===t}),s,!0),c=Ee((function(e){return w(t,e)>-1}),s,!0),u=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?Q(e,n,r):c(e,n,r));return t=null,i}];T1&&Le(u),T>1&&ge(e.slice(0,T-1).concat({value:" "===e[T-2].type?"*":""})).replace(U,"$1"),n,T0,i=e.length>0,o=function(o,a,s,T,Q){var c,p,m,f=0,h="0",g=o&&[],E=[],L=l,b=o||i&&r.find.TAG("*",Q),S=y+=null==L?1:Math.random()||.1,v=b.length;for(Q&&(l=a==d||a||Q);h!==v&&null!=(c=b[h]);h++){if(i&&c){for(p=0,a||c.ownerDocument==d||(u(c),s=!_);m=e[p++];)if(m(c,a||d,s)){T.push(c);break}Q&&(y=S)}n&&((c=!m&&c)&&f--,o&&g.push(c))}if(f+=h,n&&h!==f){for(p=0;m=t[p++];)m(g,E,a,s);if(o){if(f>0)for(;h--;)g[h]||E[h]||(E[h]=R.call(T));E=ye(E)}x.apply(T,E),Q&&!o&&E.length>0&&f+t.length>1&&se.uniqueSort(T)}return Q&&(y=S,l=L),g};return n?le(o):o}(o,i))).selector=e}return s},T=se.select=function(e,t,n,i){var o,T,l,Q,c,u="function"==typeof e&&e,d=!i&&a(e=u.selector||e);if(n=n||[],1===d.length){if((T=d[0]=d[0].slice(0)).length>2&&"ID"===(l=T[0]).type&&9===t.nodeType&&_&&r.relative[T[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(T.shift().value.length)}for(o=z.needsContext.test(e)?0:T.length;o--&&(l=T[o],!r.relative[Q=l.type]);)if((c=r.find[Q])&&(i=c(l.matches[0].replace(te,ne),ee.test(T[0].type)&&fe(t.parentNode)||t))){if(T.splice(o,1),!(e=i.length&&ge(T)))return x.apply(n,i),n;break}}return(u||s(e,d))(i,t,!_,n,!t||ee.test(e)&&fe(t.parentNode)||t),n},n.sortStable=E.split("").sort(N).join("")===E,n.detectDuplicates=!!c,u(),n.sortDetached=Qe((function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))})),Qe((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||ce("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&Qe((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ce("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),Qe((function(e){return null==e.getAttribute("disabled")}))||ce(D,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(n);b.find=v,b.expr=v.selectors,b.expr[":"]=b.expr.pseudos,b.uniqueSort=b.unique=v.uniqueSort,b.text=v.getText,b.isXMLDoc=v.isXML,b.contains=v.contains,b.escapeSelector=v.escape;var O=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&b(e).is(n))break;r.push(e)}return r},C=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=b.expr.match.needsContext;function H(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function R(e,t,n){return f(t)?b.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?b.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?b.grep(e,(function(e){return Q.call(t,e)>-1!==n})):b.filter(t,e,n)}b.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?b.find.matchesSelector(r,e)?[r]:[]:b.find.matches(e,b.grep(t,(function(e){return 1===e.nodeType})))},b.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(b(e).filter((function(){for(t=0;t1?b.uniqueSort(n):n},filter:function(e){return this.pushStack(R(this,e||[],!1))},not:function(e){return this.pushStack(R(this,e||[],!0))},is:function(e){return!!R(this,"string"==typeof e&&N.test(e)?b(e):e||[],!1).length}});var A,x=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(b.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||A,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:x.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof b?t[0]:t,b.merge(this,b.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),M.test(r[1])&&b.isPlainObject(t))for(r in t)f(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=g.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):f(e)?void 0!==n.ready?n.ready(e):e(b):b.makeArray(e,this)}).prototype=b.fn,A=b(g);var I=/^(?:parents|prev(?:Until|All))/,w={children:!0,contents:!0,next:!0,prev:!0};function D(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}b.fn.extend({has:function(e){var t=b(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&b.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?b.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?Q.call(b(e),this[0]):Q.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(b.uniqueSort(b.merge(this.get(),b(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return O(e,"parentNode")},parentsUntil:function(e,t,n){return O(e,"parentNode",n)},next:function(e){return D(e,"nextSibling")},prev:function(e){return D(e,"previousSibling")},nextAll:function(e){return O(e,"nextSibling")},prevAll:function(e){return O(e,"previousSibling")},nextUntil:function(e,t,n){return O(e,"nextSibling",n)},prevUntil:function(e,t,n){return O(e,"previousSibling",n)},siblings:function(e){return C((e.parentNode||{}).firstChild,e)},children:function(e){return C(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(H(e,"template")&&(e=e.content||e),b.merge([],e.childNodes))}},(function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),this.length>1&&(w[e]||b.uniqueSort(i),I.test(e)&&i.reverse()),this.pushStack(i)}}));var V=/[^\x20\t\r\n\f]+/g;function P(e){return e}function k(e){throw e}function B(e,t,n,r){var i;try{e&&f(i=e.promise)?i.call(e).done(t).fail(n):e&&f(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}b.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return b.each(e.match(V)||[],(function(e,n){t[n]=!0})),t}(e):b.extend({},e);var t,n,r,i,o=[],a=[],s=-1,T=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?b.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=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||T()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},b.extend({Deferred:function(e){var t=[["notify","progress",b.Callbacks("memory"),b.Callbacks("memory"),2],["resolve","done",b.Callbacks("once memory"),b.Callbacks("once memory"),0,"resolved"],["reject","fail",b.Callbacks("once memory"),b.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 b.Deferred((function(n){b.each(t,(function(t,r){var i=f(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&f(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var s=this,T=arguments,l=function(){var n,l;if(!(e=o&&(r!==k&&(s=void 0,T=[n]),t.rejectWith(s,T))}};e?Q():(b.Deferred.getStackHook&&(Q.stackTrace=b.Deferred.getStackHook()),n.setTimeout(Q))}}return b.Deferred((function(n){t[0][3].add(a(0,n,f(i)?i:P,n.notifyWith)),t[1][3].add(a(0,n,f(e)?e:P)),t[2][3].add(a(0,n,f(r)?r:k))})).promise()},promise:function(e){return null!=e?b.extend(e,i):i}},o={};return b.each(t,(function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=b.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(B(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||f(i[n]&&i[n].then)))return o.then();for(;n--;)B(i[n],a(n),o.reject);return o.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;b.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&F.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},b.readyException=function(e){n.setTimeout((function(){throw e}))};var U=b.Deferred();function G(){g.removeEventListener("DOMContentLoaded",G),n.removeEventListener("load",G),b.ready()}b.fn.ready=function(e){return U.then(e).catch((function(e){b.readyException(e)})),this},b.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--b.readyWait:b.isReady)||(b.isReady=!0,!0!==e&&--b.readyWait>0||U.resolveWith(g,[b]))}}),b.ready.then=U.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?n.setTimeout(b.ready):(g.addEventListener("DOMContentLoaded",G),n.addEventListener("load",G));var j=function(e,t,n,r,i,o,a){var s=0,T=e.length,l=null==n;if("object"===y(n))for(s in i=!0,n)j(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,f(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(b(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){X.remove(this,e)}))}}),b.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=$.get(e,t),n&&(!r||Array.isArray(n)?r=$.access(e,t,b.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){b.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return $.get(e,n)||$.access(e,n,{empty:b.Callbacks("once memory").add((function(){$.remove(e,[t+"queue",n])}))})}}),b.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,fe=/^$|^module$|\/(?:java|ecma)script/i;de=g.createDocumentFragment().appendChild(g.createElement("div")),(pe=g.createElement("input")).setAttribute("type","radio"),pe.setAttribute("checked","checked"),pe.setAttribute("name","t"),de.appendChild(pe),m.checkClone=de.cloneNode(!0).cloneNode(!0).lastChild.checked,de.innerHTML="",m.noCloneChecked=!!de.cloneNode(!0).lastChild.defaultValue,de.innerHTML="",m.option=!!de.lastChild;var he={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&H(e,t)?b.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var Le=/<|&#?\w+;/;function ye(e,t,n,r,i){for(var o,a,s,T,l,Q,c=t.createDocumentFragment(),u=[],d=0,p=e.length;d-1)i&&i.push(o);else if(l=ae(o),a=ge(c.appendChild(o),"script"),l&&Ee(a),n)for(Q=0;o=a[Q++];)fe.test(o.type||"")&&n.push(o);return c}var be=/^key/,Se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ve=/^([^.]*)(?:\.(.+)|)/;function Oe(){return!0}function Ce(){return!1}function Ne(e,t){return e===function(){try{return g.activeElement}catch(e){}}()==("focus"===t)}function He(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)He(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)),!1===i)i=Ce;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return b().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=b.guid++)),e.each((function(){b.event.add(this,t,i,r,n)}))}function Me(e,t,n){n?($.set(e,t,!1),b.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=$.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(b.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),$.set(this,t,o),r=n(this,t),this[t](),o!==(i=$.get(this,t))||r?$.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&($.set(this,t,{value:b.event.trigger(b.extend(o[0],b.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===$.get(e,t)&&b.event.add(e,t,Oe)}b.event={global:{},add:function(e,t,n,r,i){var o,a,s,T,l,Q,c,u,d,p,_,m=$.get(e);if(Z(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&b.find.matchesSelector(oe,i),n.guid||(n.guid=b.guid++),(T=m.events)||(T=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(t){return void 0!==b&&b.event.triggered!==t.type?b.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(V)||[""]).length;l--;)d=_=(s=ve.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),d&&(c=b.event.special[d]||{},d=(i?c.delegateType:c.bindType)||d,c=b.event.special[d]||{},Q=b.extend({type:d,origType:_,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&b.expr.match.needsContext.test(i),namespace:p.join(".")},o),(u=T[d])||((u=T[d]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(d,a)),c.add&&(c.add.call(e,Q),Q.handler.guid||(Q.handler.guid=n.guid)),i?u.splice(u.delegateCount++,0,Q):u.push(Q),b.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,T,l,Q,c,u,d,p,_,m=$.hasData(e)&&$.get(e);if(m&&(T=m.events)){for(l=(t=(t||"").match(V)||[""]).length;l--;)if(d=_=(s=ve.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),d){for(c=b.event.special[d]||{},u=T[d=(r?c.delegateType:c.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=u.length;o--;)Q=u[o],!i&&_!==Q.origType||n&&n.guid!==Q.guid||s&&!s.test(Q.namespace)||r&&r!==Q.selector&&("**"!==r||!Q.selector)||(u.splice(o,1),Q.selector&&u.delegateCount--,c.remove&&c.remove.call(e,Q));a&&!u.length&&(c.teardown&&!1!==c.teardown.call(e,p,m.handle)||b.removeEvent(e,d,m.handle),delete T[d])}else for(d in T)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(T)&&$.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),T=b.event.fix(e),l=($.get(this,"events")||Object.create(null))[T.type]||[],Q=b.event.special[T.type]||{};for(s[0]=T,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:b.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,T\s*$/g;function Ie(e,t){return H(e,"table")&&H(11!==t.nodeType?t:t.firstChild,"tr")&&b(e).children("tbody")[0]||e}function we(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ve(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if($.hasData(e)&&(s=$.get(e).events))for(i in $.remove(t,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof p&&!m.checkClone&&Ae.test(p))return e.each((function(i){var o=e.eq(i);_&&(t[0]=p.call(this,i,o.html())),ke(o,t,n,r)}));if(u&&(o=(i=ye(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=b.map(ge(i,"script"),we)).length;c0&&Ee(a,!T&&ge(e,"script")),s},cleanData:function(e){for(var t,n,r,i=b.event.special,o=0;void 0!==(n=e[o]);o++)if(Z(n)){if(t=n[$.expando]){if(t.events)for(r in t.events)i[r]?b.event.remove(n,r):b.removeEvent(n,r,t.handle);n[$.expando]=void 0}n[X.expando]&&(n[X.expando]=void 0)}}}),b.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return j(this,(function(e){return void 0===e?b.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 ke(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ie(this,e).appendChild(e)}))},prepend:function(){return ke(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ie(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ke(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ke(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&&(b.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return b.clone(this,e,t)}))},html:function(e){return j(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&&!Re.test(e)&&!he[(me.exec(e)||["",""])[1].toLowerCase()]){e=b.htmlPrefilter(e);try{for(;n3,oe.removeChild(e)),s}}))}();var We=["Webkit","Moz","ms"],ze=g.createElement("div").style,Ze={};function Ke(e){var t=b.cssProps[e]||Ze[e];return t||(e in ze?e:Ze[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=We.length;n--;)if((e=We[n]+t)in ze)return e}(e)||e)}var $e=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"};function tt(e,t,n){var r=re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function nt(e,t,n,r,i,o){var a="width"===t?1:0,s=0,T=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(T+=b.css(e,n+ie[a],!0,i)),r?("content"===n&&(T-=b.css(e,"padding"+ie[a],!0,i)),"margin"!==n&&(T-=b.css(e,"border"+ie[a]+"Width",!0,i))):(T+=b.css(e,"padding"+ie[a],!0,i),"padding"!==n?T+=b.css(e,"border"+ie[a]+"Width",!0,i):s+=b.css(e,"border"+ie[a]+"Width",!0,i));return!r&&o>=0&&(T+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-T-s-.5))||0),T}function rt(e,t,n){var r=Ue(e),i=(!m.boxSizingReliable()||n)&&"border-box"===b.css(e,"boxSizing",!1,r),o=i,a=Ye(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Fe.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&H(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===b.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===b.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+nt(e,t,n||(i?"border":"content"),o,r,a)+"px"}function it(e,t,n,r,i){return new it.prototype.init(e,t,n,r,i)}b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ye(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=z(t),T=Xe.test(t),l=e.style;if(T||(t=Ke(s)),a=b.cssHooks[t]||b.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=re.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||T||(n+=i&&i[3]||(b.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(T?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=z(t);return Xe.test(t)||(t=Ke(s)),(a=b.cssHooks[t]||b.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ye(e,t,r)),"normal"===i&&t in et&&(i=et[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),b.each(["height","width"],(function(e,t){b.cssHooks[t]={get:function(e,n,r){if(n)return!$e.test(b.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?rt(e,t,r):Ge(e,Je,(function(){return rt(e,t,r)}))},set:function(e,n,r){var i,o=Ue(e),a=!m.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===b.css(e,"boxSizing",!1,o),T=r?nt(e,t,r,s,o):0;return s&&a&&(T-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-nt(e,t,"border",!1,o)-.5)),T&&(i=re.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=b.css(e,t)),tt(0,n,T)}}})),b.cssHooks.marginLeft=qe(m.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ye(e,"marginLeft"))||e.getBoundingClientRect().left-Ge(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),b.each({margin:"",padding:"",border:"Width"},(function(e,t){b.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+ie[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(b.cssHooks[e+t].set=tt)})),b.fn.extend({css:function(e,t){return j(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ue(e),i=t.length;a1)}}),b.Tween=it,it.prototype={constructor:it,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||b.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=it.propHooks[this.prop];return e&&e.get?e.get(this):it.propHooks._default.get(this)},run:function(e){var t,n=it.propHooks[this.prop];return this.options.duration?this.pos=t=b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):it.propHooks._default.set(this),this}},it.prototype.init.prototype=it.prototype,it.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=b.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):1!==e.elem.nodeType||!b.cssHooks[e.prop]&&null==e.elem.style[Ke(e.prop)]?e.elem[e.prop]=e.now:b.style(e.elem,e.prop,e.now+e.unit)}}},it.propHooks.scrollTop=it.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},b.fx=it.prototype.init,b.fx.step={};var ot,at,st=/^(?:toggle|show|hide)$/,Tt=/queueHooks$/;function lt(){at&&(!1===g.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(lt):n.setTimeout(lt,b.fx.interval),b.fx.tick())}function Qt(){return n.setTimeout((function(){ot=void 0})),ot=Date.now()}function ct(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ie[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){b.removeAttr(this,e)}))}}),b.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?b.prop(e,t,n):(1===o&&b.isXMLDoc(e)||(i=b.attrHooks[t.toLowerCase()]||(b.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void b.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:null==(r=b.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&H(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(V);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?b.removeAttr(e,n):e.setAttribute(n,n),n}},b.each(b.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=_t[t]||b.find.attr;_t[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=_t[a],_t[a]=i,i=null!=n(e,t,r)?a:null,_t[a]=o),i}}));var mt=/^(?:input|select|textarea|button)$/i,ft=/^(?:a|area)$/i;function ht(e){return(e.match(V)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function Et(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(V)||[]}b.fn.extend({prop:function(e,t){return j(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[b.propFix[e]||e]}))}}),b.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&b.isXMLDoc(e)||(t=b.propFix[t]||t,i=b.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=b.find.attr(e,"tabindex");return t?parseInt(t,10):mt.test(e.nodeName)||ft.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(b.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)}}),b.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){b.propFix[this.toLowerCase()]=this})),b.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,T=0;if(f(e))return this.each((function(t){b(this).addClass(e.call(this,t,gt(this)))}));if((t=Et(e)).length)for(;n=this[T++];)if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,T=0;if(f(e))return this.each((function(t){b(this).removeClass(e.call(this,t,gt(this)))}));if(!arguments.length)return this.attr("class","");if((t=Et(e)).length)for(;n=this[T++];)if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&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):f(e)?this.each((function(n){b(this).toggleClass(e.call(this,n,gt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=b(this),a=Et(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=gt(this))&&$.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":$.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+ht(gt(n))+" ").indexOf(t)>-1)return!0;return!1}});var Lt=/\r/g;b.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=f(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,b(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=b.map(i,(function(e){return null==e?"":e+""}))),(t=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=b.valHooks[i.type]||b.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Lt,""):null==n?"":n:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=b.find.attr(e,"value");return null!=t?t:ht(b.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],T=a?o+1:i.length;for(r=o<0?T:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),b.each(["radio","checkbox"],(function(){b.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=b.inArray(b(e).val(),t)>-1}},m.checkOn||(b.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),m.focusin="onfocusin"in n;var yt=/^(?:focusinfocus|focusoutblur)$/,bt=function(e){e.stopPropagation()};b.extend(b.event,{trigger:function(e,t,r,i){var o,a,s,T,l,Q,c,u,p=[r||g],_=d.call(e,"type")?e.type:e,m=d.call(e,"namespace")?e.namespace.split("."):[];if(a=u=s=r=r||g,3!==r.nodeType&&8!==r.nodeType&&!yt.test(_+b.event.triggered)&&(_.indexOf(".")>-1&&(m=_.split("."),_=m.shift(),m.sort()),l=_.indexOf(":")<0&&"on"+_,(e=e[b.expando]?e:new b.Event(_,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:b.makeArray(t,[e]),c=b.event.special[_]||{},i||!c.trigger||!1!==c.trigger.apply(r,t))){if(!i&&!c.noBubble&&!h(r)){for(T=c.delegateType||_,yt.test(T+_)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(r.ownerDocument||g)&&p.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=p[o++])&&!e.isPropagationStopped();)u=a,e.type=o>1?T:c.bindType||_,(Q=($.get(a,"events")||Object.create(null))[e.type]&&$.get(a,"handle"))&&Q.apply(a,t),(Q=l&&a[l])&&Q.apply&&Z(a)&&(e.result=Q.apply(a,t),!1===e.result&&e.preventDefault());return e.type=_,i||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!Z(r)||l&&f(r[_])&&!h(r)&&((s=r[l])&&(r[l]=null),b.event.triggered=_,e.isPropagationStopped()&&u.addEventListener(_,bt),r[_](),e.isPropagationStopped()&&u.removeEventListener(_,bt),b.event.triggered=void 0,s&&(r[l]=s)),e.result}},simulate:function(e,t,n){var r=b.extend(new b.Event,n,{type:e,isSimulated:!0});b.event.trigger(r,null,t)}}),b.fn.extend({trigger:function(e,t){return this.each((function(){b.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return b.event.trigger(e,t,n,!0)}}),m.focusin||b.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){b.event.simulate(t,e.target,b.event.fix(e))};b.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=$.access(r,t);i||r.addEventListener(e,n,!0),$.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=$.access(r,t)-1;i?$.access(r,t,i):(r.removeEventListener(e,n,!0),$.remove(r,t))}}}));var St=n.location,vt={guid:Date.now()},Ot=/\?/;b.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+e),t};var Ct=/\[\]$/,Nt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Mt=/^(?:input|select|textarea|keygen)/i;function Rt(e,t,n,r){var i;if(Array.isArray(t))b.each(t,(function(t,i){n||Ct.test(e)?r(e,i):Rt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==y(t))r(e,t);else for(i in t)Rt(e+"["+i+"]",t[i],n,r)}b.param=function(e,t){var n,r=[],i=function(e,t){var n=f(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,(function(){i(this.name,this.value)}));else for(n in e)Rt(n,e[n],t,i);return r.join("&")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&Mt.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!_e.test(e))})).map((function(e,t){var n=b(this).val();return null==n?null:Array.isArray(n)?b.map(n,(function(e){return{name:t.name,value:e.replace(Nt,"\r\n")}})):{name:t.name,value:n.replace(Nt,"\r\n")}})).get()}});var At=/%20/g,xt=/#.*$/,It=/([?&])_=[^&]*/,wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Dt=/^(?:GET|HEAD)$/,Vt=/^\/\//,Pt={},kt={},Bt="*/".concat("*"),Ft=g.createElement("a");function Ut(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(V)||[];if(f(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Gt(e,t,n,r){var i={},o=e===kt;function a(s){var T;return i[s]=!0,b.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(T=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),T}return a(t.dataTypes[0])||!i["*"]&&a("*")}function jt(e,t){var n,r,i=b.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&b.extend(!0,e,r),e}Ft.href=St.href,b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,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":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?jt(jt(e,b.ajaxSettings),t):jt(b.ajaxSettings,e)},ajaxPrefilter:Ut(Pt),ajaxTransport:Ut(kt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,T,l,Q,c,u,d=b.ajaxSetup({},t),p=d.context||d,_=d.context&&(p.nodeType||p.jquery)?b(p):b.event,m=b.Deferred(),f=b.Callbacks("once memory"),h=d.statusCode||{},E={},L={},y="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=wt.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=L[e.toLowerCase()]=L[e.toLowerCase()]||e,E[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)h[t]=[h[t],e[t]];return this},abort:function(e){var t=e||y;return r&&r.abort(t),v(0,t),this}};if(m.promise(S),d.url=((e||d.url||St.href)+"").replace(Vt,St.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(V)||[""],null==d.crossDomain){T=g.createElement("a");try{T.href=d.url,T.href=T.href,d.crossDomain=Ft.protocol+"//"+Ft.host!=T.protocol+"//"+T.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=b.param(d.data,d.traditional)),Gt(Pt,d,t,S),l)return S;for(c in(Q=b.event&&d.global)&&0==b.active++&&b.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Dt.test(d.type),i=d.url.replace(xt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(At,"+")):(u=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(Ot.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(It,"$1"),u=(Ot.test(i)?"&":"?")+"_="+vt.guid+++u),d.url=i+u),d.ifModified&&(b.lastModified[i]&&S.setRequestHeader("If-Modified-Since",b.lastModified[i]),b.etag[i]&&S.setRequestHeader("If-None-Match",b.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&S.setRequestHeader("Content-Type",d.contentType),S.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Bt+"; q=0.01":""):d.accepts["*"]),d.headers)S.setRequestHeader(c,d.headers[c]);if(d.beforeSend&&(!1===d.beforeSend.call(p,S,d)||l))return S.abort();if(y="abort",f.add(d.complete),S.done(d.success),S.fail(d.error),r=Gt(kt,d,t,S)){if(S.readyState=1,Q&&_.trigger("ajaxSend",[S,d]),l)return S;d.async&&d.timeout>0&&(s=n.setTimeout((function(){S.abort("timeout")}),d.timeout));try{l=!1,r.send(E,v)}catch(e){if(l)throw e;v(-1,e)}}else v(-1,"No Transport");function v(e,t,a,T){var c,u,g,E,L,y=t;l||(l=!0,s&&n.clearTimeout(s),r=void 0,o=T||"",S.readyState=e>0?4:0,c=e>=200&&e<300||304===e,a&&(E=function(e,t,n){for(var r,i,o,a,s=e.contents,T=e.dataTypes;"*"===T[0];)T.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){T.unshift(i);break}if(T[0]in n)o=T[0];else{for(i in n){if(!T[0]||e.converters[i+" "+T[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==T[0]&&T.unshift(o),n[o]}(d,S,a)),!c&&b.inArray("script",d.dataTypes)>-1&&(d.converters["text script"]=function(){}),E=function(e,t,n,r){var i,o,a,s,T,l={},Q=e.dataTypes.slice();if(Q[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=Q.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!T&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),T=o,o=Q.shift())if("*"===o)o=T;else if("*"!==T&&T!==o){if(!(a=l[T+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[T+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],Q.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+T+" to "+o}}}return{state:"success",data:t}}(d,E,S,c),c?(d.ifModified&&((L=S.getResponseHeader("Last-Modified"))&&(b.lastModified[i]=L),(L=S.getResponseHeader("etag"))&&(b.etag[i]=L)),204===e||"HEAD"===d.type?y="nocontent":304===e?y="notmodified":(y=E.state,u=E.data,c=!(g=E.error))):(g=y,!e&&y||(y="error",e<0&&(e=0))),S.status=e,S.statusText=(t||y)+"",c?m.resolveWith(p,[u,y,S]):m.rejectWith(p,[S,y,g]),S.statusCode(h),h=void 0,Q&&_.trigger(c?"ajaxSuccess":"ajaxError",[S,d,c?u:g]),f.fireWith(p,[S,y]),Q&&(_.trigger("ajaxComplete",[S,d]),--b.active||b.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return b.get(e,t,n,"json")},getScript:function(e,t){return b.get(e,void 0,t,"script")}}),b.each(["get","post"],(function(e,t){b[t]=function(e,n,r,i){return f(n)&&(i=i||r,r=n,n=void 0),b.ajax(b.extend({url:e,type:t,dataType:i,data:n,success:r},b.isPlainObject(e)&&e))}})),b.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),b._evalUrl=function(e,t,n){return b.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){b.globalEval(e,t,n)}})},b.fn.extend({wrapAll:function(e){var t;return this[0]&&(f(e)&&(e=e.call(this[0])),t=b(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return f(e)?this.each((function(t){b(this).wrapInner(e.call(this,t))})):this.each((function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=f(e);return this.each((function(n){b(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){b(this).replaceWith(this.childNodes)})),this}}),b.expr.pseudos.hidden=function(e){return!b.expr.pseudos.visible(e)},b.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},qt=b.ajaxSettings.xhr();m.cors=!!qt&&"withCredentials"in qt,m.ajax=qt=!!qt,b.ajaxTransport((function(e){var t,r;if(m.cors||qt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=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(Yt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),b.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),b.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 b.globalEval(e),e}}}),b.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),b.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=b("