From d44dcffc181f011c5b73fc41f1ee37ea3c0df168 Mon Sep 17 00:00:00 2001 From: xangelo Date: Tue, 13 Jun 2023 15:17:16 -0400 Subject: [PATCH] first level professions! Wanderers can become Warriors, Mages, or Rogues at level 25! This also introduces a new model for manging events across server/clients that keeps related entities together! It also allows us to add unit tests for areas we're concerned about (like fighting). --- migrations/20230613145243_professions.ts | 18 ++++ public/assets/bundle.js | 2 +- public/assets/bundle.js.LICENSE.txt | 9 ++ seeds/profession-levels.ts | 15 ++++ src/client/index.ts | 21 ++++- src/client/socket-event.client.ts | 11 +++ src/events/client.ts | 1 + src/events/profession-changing/client.ts | 27 ++++++ src/events/profession-changing/server.ts | 105 +++++++++++++++++++++++ src/events/profession-changing/shared.ts | 1 + src/events/server.ts | 1 + src/server/api.ts | 23 +++-- src/server/player.ts | 82 ++++++++++++++---- src/server/socket-event.server.ts | 14 +++ src/shared/inventory.ts | 2 +- src/shared/player.ts | 48 +---------- src/shared/profession.ts | 105 +++++++++++++++++++++++ src/shared/stats.ts | 1 + 18 files changed, 414 insertions(+), 72 deletions(-) create mode 100644 migrations/20230613145243_professions.ts create mode 100644 seeds/profession-levels.ts create mode 100644 src/client/socket-event.client.ts create mode 100644 src/events/client.ts create mode 100644 src/events/profession-changing/client.ts create mode 100644 src/events/profession-changing/server.ts create mode 100644 src/events/profession-changing/shared.ts create mode 100644 src/events/server.ts create mode 100644 src/server/socket-event.server.ts create mode 100644 src/shared/profession.ts create mode 100644 src/shared/stats.ts diff --git a/migrations/20230613145243_professions.ts b/migrations/20230613145243_professions.ts new file mode 100644 index 0000000..56725e9 --- /dev/null +++ b/migrations/20230613145243_professions.ts @@ -0,0 +1,18 @@ +import { Knex } from "knex"; + + +export async function up(knex: Knex): Promise { + return knex.schema.createTable('profession_levels', function(table) { + table.uuid('player_id').notNullable(); + table.string('profession').notNullable(); + table.integer('level').defaultTo(1); + table.integer('exp').notNullable(); + table.primary(['player_id', 'profession']); + }); +} + + +export async function down(knex: Knex): Promise { + return knex.schema.dropTable('profession_levels'); +} + diff --git a/public/assets/bundle.js b/public/assets/bundle.js index d3b65f7..db471d1 100644 --- a/public/assets/bundle.js +++ b/public/assets/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var e={4802:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(804)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},804:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{var t=1e3,n=60*t,r=60*n,o=24*r;function i(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,s){s=s||{};var a,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=o?i(a,c,o,"day"):c>=r?i(a,c,r,"hour"):c>=n?i(a,c,n,"minute"):c>=t?i(a,c,t,"second"):a+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9755:function(e,t){var n;!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(r,o){"use strict";var i=[],s=Object.getPrototypeOf,a=i.slice,c=i.flat?function(e){return i.flat.call(e)}:function(e){return i.concat.apply([],e)},u=i.push,l=i.indexOf,d={},p=d.toString,f=d.hasOwnProperty,h=f.toString,g=h.call(Object),m={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},v=function(e){return null!=e&&e===e.window},b=r.document,C={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var r,o,i=(n=n||b).createElement("script");if(i.text=e,t)for(r in C)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[p.call(e)]||"object":typeof e}var k="3.7.0",T=/HTML$/i,E=function(e,t){return new E.fn.init(e,t)};function _(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!y(e)&&!v(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}E.fn=E.prototype={jquery:k,constructor:E,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(E.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+~]|"+j+")"+j+"*"),I=new RegExp(j+"|>"),B=new RegExp(N),W=new RegExp("^"+D+"$"),U={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),TAG:new RegExp("^("+D+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+_+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},z=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}"+j+"?|\\\\([^\\r\\n\\f])","g"),G=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))},J=function(){ce()},Q=pe((function(e){return!0===e.disabled&&S(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{g.apply(i=a.call(R.childNodes),R.childNodes),i[R.childNodes.length].nodeType}catch(e){g={apply:function(e,t){L.apply(e,a.call(t))},call:function(e){L.apply(e,a.call(arguments,1))}}}function Z(e,t,n,r){var o,i,s,a,u,l,f,h=t&&t.ownerDocument,v=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==v&&9!==v&&11!==v)return n;if(!r&&(ce(t),t=t||c,d)){if(11!==v&&(u=X.exec(e)))if(o=u[1]){if(9===v){if(!(s=t.getElementById(o)))return n;if(s.id===o)return g.call(n,s),n}else if(h&&(s=h.getElementById(o))&&Z.contains(t,s)&&s.id===o)return g.call(n,s),n}else{if(u[2])return g.apply(n,t.getElementsByTagName(e)),n;if((o=u[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(o)),n}if(!(k[e+" "]||p&&p.test(e))){if(f=e,h=t,1===v&&(I.test(e)||H.test(e))){for((h=Y.test(e)&&ae(t.parentNode)||t)==t&&m.scope||((a=t.getAttribute("id"))?a=E.escapeSelector(a):t.setAttribute("id",a=y)),i=(l=le(e)).length;i--;)l[i]=(a?"#"+a:":scope")+" "+de(l[i]);f=l.join(",")}try{return g.apply(n,h.querySelectorAll(f)),n}catch(t){k(e,!0)}finally{a===y&&t.removeAttribute("id")}}}return ve(e.replace(P,"$1"),t,n,r)}function ee(){var e=[];return function n(r,o){return e.push(r+" ")>t.cacheLength&&delete n[e.shift()],n[r+" "]=o}}function te(e){return e[y]=!0,e}function ne(e){var t=c.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return S(t,"input")&&t.type===e}}function oe(e){return function(t){return(S(t,"input")||S(t,"button"))&&t.type===e}}function ie(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&&Q(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function se(e){return te((function(t){return t=+t,te((function(n,r){for(var o,i=e([],n.length,t),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))}))}))}function ae(e){return e&&void 0!==e.getElementsByTagName&&e}function ce(e){var n,r=e?e.ownerDocument||e:R;return r!=c&&9===r.nodeType&&r.documentElement?(u=(c=r).documentElement,d=!E.isXMLDoc(c),h=u.matches||u.webkitMatchesSelector||u.msMatchesSelector,R!=c&&(n=c.defaultView)&&n.top!==n&&n.addEventListener("unload",J),m.getById=ne((function(e){return u.appendChild(e).id=E.expando,!c.getElementsByName||!c.getElementsByName(E.expando).length})),m.disconnectedMatch=ne((function(e){return h.call(e,"*")})),m.scope=ne((function(){return c.querySelectorAll(":scope")})),m.cssHas=ne((function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),m.getById?(t.filter.ID=function(e){var t=e.replace(K,G);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(K,G);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&d)return t.getElementsByClassName(e)},p=[],ne((function(e){var t;u.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||p.push("\\["+j+"*(?:value|"+_+")"),e.querySelectorAll("[id~="+y+"-]").length||p.push("~="),e.querySelectorAll("a#"+y+"+*").length||p.push(".#.+[+~]"),e.querySelectorAll(":checked").length||p.push(":checked"),(t=c.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),u.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(t=c.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||p.push("\\["+j+"*name"+j+"*="+j+"*(?:''|\"\")")})),m.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),T=function(e,t){if(e===t)return s=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!m.sortDetached&&t.compareDocumentPosition(e)===n?e===c||e.ownerDocument==R&&Z.contains(R,e)?-1:t===c||t.ownerDocument==R&&Z.contains(R,t)?1:o?l.call(o,e)-l.call(o,t):0:4&n?-1:1)},c):c}for(e in Z.matches=function(e,t){return Z(e,null,null,t)},Z.matchesSelector=function(e,t){if(ce(e),d&&!k[t+" "]&&(!p||!p.test(t)))try{var n=h.call(e,t);if(n||m.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){k(t,!0)}return Z(t,c,null,[e]).length>0},Z.contains=function(e,t){return(e.ownerDocument||e)!=c&&ce(e),E.contains(e,t)},Z.attr=function(e,n){(e.ownerDocument||e)!=c&&ce(e);var r=t.attrHandle[n.toLowerCase()],o=r&&f.call(t.attrHandle,n.toLowerCase())?r(e,n,!d):void 0;return void 0!==o?o:e.getAttribute(n)},Z.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},E.uniqueSort=function(e){var t,n=[],r=0,i=0;if(s=!m.sortStable,o=!m.sortStable&&a.call(e,0),O.call(e,T),s){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)F.call(e,n[r],1)}return o=null,e},E.fn.uniqueSort=function(){return this.pushStack(E.uniqueSort(a.apply(this)))},t=E.expr={cacheLength:50,createPseudo:te,match:U,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(K,G),e[3]=(e[3]||e[4]||e[5]||"").replace(K,G),"~="===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]||Z.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]&&Z.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return U.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&B.test(n)&&(t=le(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(K,G).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&C(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 o=Z.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(M," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,c){var u,l,d,p,f,h=i!==s?"nextSibling":"previousSibling",g=t.parentNode,m=a&&t.nodeName.toLowerCase(),b=!c&&!a,C=!1;if(g){if(i){for(;h;){for(d=t;d=d[h];)if(a?S(d,m):1===d.nodeType)return!1;f=h="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&b){for(C=(p=(u=(l=g[y]||(g[y]={}))[e]||[])[0]===v&&u[1])&&u[2],d=p&&g.childNodes[p];d=++p&&d&&d[h]||(C=p=0)||f.pop();)if(1===d.nodeType&&++C&&d===t){l[e]=[v,p,C];break}}else if(b&&(C=p=(u=(l=t[y]||(t[y]={}))[e]||[])[0]===v&&u[1]),!1===C)for(;(d=++p&&d&&d[h]||(C=p=0)||f.pop())&&(!(a?S(d,m):1===d.nodeType)||!++C||(b&&((l=d[y]||(d[y]={}))[e]=[v,C]),d!==t)););return(C-=o)===r||C%r==0&&C/r>=0}}},PSEUDO:function(e,n){var r,o=t.pseudos[e]||t.setFilters[e.toLowerCase()]||Z.error("unsupported pseudo: "+e);return o[y]?o(n):o.length>1?(r=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var r,i=o(e,n),s=i.length;s--;)e[r=l.call(e,i[s])]=!(t[r]=i[s])})):function(e){return o(e,0,r)}):o}},pseudos:{not:te((function(e){var t=[],n=[],r=ye(e.replace(P,"$1"));return r[y]?te((function(e,t,n,o){for(var i,s=r(e,null,o,[]),a=e.length;a--;)(i=s[a])&&(e[a]=!(t[a]=i))})):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return Z(e,t).length>0}})),contains:te((function(e){return e=e.replace(K,G),function(t){return(t.textContent||E.text(t)).indexOf(e)>-1}})),lang:te((function(e){return W.test(e||"")||Z.error("unsupported lang: "+e),e=e.replace(K,G).toLowerCase(),function(t){var n;do{if(n=d?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(e){var t=r.location&&r.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===u},focus:function(e){return e===function(){try{return c.activeElement}catch(e){}}()&&c.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:ie(!1),disabled:ie(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!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!t.pseudos.empty(e)},header:function(e){return V.test(e.nodeName)},input:function(e){return z.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){var t;return S(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:se((function(){return[0]})),last:se((function(e,t){return[t-1]})),eq:se((function(e,t,n){return[n<0?n+t:n]})),even:se((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:se((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function he(e,t,n,r,o){for(var i,s=[],a=0,c=e.length,u=null!=t;a-1&&(i[u]=!(s[u]=p))}}else f=he(f===s?f.splice(y,f.length):f),o?o(null,s,f,c):g.apply(s,f)}))}function me(e){for(var r,o,i,s=e.length,a=t.relative[e[0].type],c=a||t.relative[" "],u=a?1:0,d=pe((function(e){return e===r}),c,!0),p=pe((function(e){return l.call(r,e)>-1}),c,!0),f=[function(e,t,o){var i=!a&&(o||t!=n)||((r=t).nodeType?d(e,t,o):p(e,t,o));return r=null,i}];u1&&fe(f),u>1&&de(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(P,"$1"),o,u0,i=e.length>0,s=function(s,a,u,l,p){var f,h,m,y=0,b="0",C=s&&[],x=[],w=n,k=s||i&&t.find.TAG("*",p),T=v+=null==w?1:Math.random()||.1,_=k.length;for(p&&(n=a==c||a||p);b!==_&&null!=(f=k[b]);b++){if(i&&f){for(h=0,a||f.ownerDocument==c||(ce(f),u=!d);m=e[h++];)if(m(f,a||c,u)){g.call(l,f);break}p&&(v=T)}o&&((f=!m&&f)&&y--,s&&C.push(f))}if(y+=b,o&&b!==y){for(h=0;m=r[h++];)m(C,x,a,u);if(s){if(y>0)for(;b--;)C[b]||x[b]||(x[b]=A.call(l));x=he(x)}g.apply(l,x),p&&!s&&x.length>0&&y+r.length>1&&E.uniqueSort(l)}return p&&(v=T,n=w),C};return o?te(s):s}(s,i)),a.selector=e}return a}function ve(e,n,r,o){var i,s,a,c,u,l="function"==typeof e&&e,p=!o&&le(e=l.selector||e);if(r=r||[],1===p.length){if((s=p[0]=p[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===n.nodeType&&d&&t.relative[s[1].type]){if(!(n=(t.find.ID(a.matches[0].replace(K,G),n)||[])[0]))return r;l&&(n=n.parentNode),e=e.slice(s.shift().value.length)}for(i=U.needsContext.test(e)?0:s.length;i--&&(a=s[i],!t.relative[c=a.type]);)if((u=t.find[c])&&(o=u(a.matches[0].replace(K,G),Y.test(s[0].type)&&ae(n.parentNode)||n))){if(s.splice(i,1),!(e=o.length&&de(s)))return g.apply(r,o),r;break}}return(l||ye(e,p))(o,n,!d,r,!n||Y.test(e)&&ae(n.parentNode)||n),r}ue.prototype=t.filters=t.pseudos,t.setFilters=new ue,m.sortStable=y.split("").sort(T).join("")===y,ce(),m.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(c.createElement("fieldset"))})),E.find=Z,E.expr[":"]=E.expr.pseudos,E.unique=E.uniqueSort,Z.compile=ye,Z.select=ve,Z.setDocument=ce,Z.escape=E.escapeSelector,Z.getText=E.text,Z.isXML=E.isXMLDoc,Z.selectors=E.expr,Z.support=E.support,Z.uniqueSort=E.uniqueSort}();var N=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&E(e).is(n))break;r.push(e)}return r},M=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},q=E.expr.match.needsContext,H=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(e,t,n){return y(t)?E.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?E.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?E.grep(e,(function(e){return l.call(t,e)>-1!==n})):E.filter(t,e,n)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,(function(e){return 1===e.nodeType})))},E.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(E(e).filter((function(){for(t=0;t1?E.uniqueSort(n):n},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&q.test(e)?E(e):e||[],!1).length}});var B,W=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||B,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:W.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 E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),H.test(r[1])&&E.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=b.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,B=E(b);var U=/^(?:parents|prev(?:Until|All))/,z={children:!0,contents:!0,next:!0,prev:!0};function V(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&E.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?E.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?l.call(E(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return N(e,"parentNode")},parentsUntil:function(e,t,n){return N(e,"parentNode",n)},next:function(e){return V(e,"nextSibling")},prev:function(e){return V(e,"previousSibling")},nextAll:function(e){return N(e,"nextSibling")},prevAll:function(e){return N(e,"previousSibling")},nextUntil:function(e,t,n){return N(e,"nextSibling",n)},prevUntil:function(e,t,n){return N(e,"previousSibling",n)},siblings:function(e){return M((e.parentNode||{}).firstChild,e)},children:function(e){return M(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},(function(e,t){E.fn[e]=function(n,r){var o=E.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=E.filter(r,o)),this.length>1&&(z[e]||E.uniqueSort(o),U.test(e)&&o.reverse()),this.pushStack(o)}}));var X=/[^\x20\t\r\n\f]+/g;function Y(e){return e}function K(e){throw e}function G(e,t,n,r){var o;try{e&&y(o=e.promise)?o.call(e).done(t).fail(n):e&&y(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return E.each(e.match(X)||[],(function(e,n){t[n]=!0})),t}(e):E.extend({},e);var t,n,r,o,i=[],s=[],a=-1,c=function(){for(o=o||e.once,r=t=!0;s.length;a=-1)for(n=s.shift();++a-1;)i.splice(n,1),n<=a&&a--})),this},has:function(e){return e?E.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=s=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=s=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},E.extend({Deferred:function(e){var t=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return E.Deferred((function(n){E.each(t,(function(t,r){var o=y(e[r[4]])&&e[r[4]];i[r[1]]((function(){var e=o&&o.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,o){var i=0;function s(e,t,n,o){return function(){var a=this,c=arguments,u=function(){var r,u;if(!(e=i&&(n!==K&&(a=void 0,c=[r]),t.rejectWith(a,c))}};e?l():(E.Deferred.getErrorHook?l.error=E.Deferred.getErrorHook():E.Deferred.getStackHook&&(l.error=E.Deferred.getStackHook()),r.setTimeout(l))}}return E.Deferred((function(r){t[0][3].add(s(0,r,y(o)?o:Y,r.notifyWith)),t[1][3].add(s(0,r,y(e)?e:Y)),t[2][3].add(s(0,r,y(n)?n:K))})).promise()},promise:function(e){return null!=e?E.extend(e,o):o}},i={};return E.each(t,(function(e,r){var s=r[2],a=r[5];o[r[1]]=s.add,a&&s.add((function(){n=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(r[3].fire),i[r[0]]=function(){return i[r[0]+"With"](this===i?void 0:this,arguments),this},i[r[0]+"With"]=s.fireWith})),o.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),o=a.call(arguments),i=E.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?a.call(arguments):n,--t||i.resolveWith(r,o)}};if(t<=1&&(G(e,i.done(s(n)).resolve,i.reject,!t),"pending"===i.state()||y(o[n]&&o[n].then)))return i.then();for(;n--;)G(o[n],s(n),i.reject);return i.promise()}});var J=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&J.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){r.setTimeout((function(){throw e}))};var Q=E.Deferred();function Z(){b.removeEventListener("DOMContentLoaded",Z),r.removeEventListener("load",Z),E.ready()}E.fn.ready=function(e){return Q.then(e).catch((function(e){E.readyException(e)})),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==e&&--E.readyWait>0||Q.resolveWith(b,[E]))}}),E.ready.then=Q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(E.ready):(b.addEventListener("DOMContentLoaded",Z),r.addEventListener("load",Z));var ee=function(e,t,n,r,o,i,s){var a=0,c=e.length,u=null==n;if("object"===w(n))for(a in o=!0,n)ee(e,t,a,n[a],!0,i,s);else if(void 0!==r&&(o=!0,y(r)||(s=!0),u&&(s?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(E(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each((function(){ce.remove(this,e)}))}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ae.get(e,t),n&&(!r||Array.isArray(n)?r=ae.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,o=n.shift(),i=E._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,(function(){E.dequeue(e,t)}),i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ae.get(e,n)||ae.access(e,n,{empty:E.Callbacks("once memory").add((function(){ae.remove(e,[t+"queue",n])}))})}}),E.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,Se=/^$|^module$|\/(?:java|ecma)script/i;ke=b.createDocumentFragment().appendChild(b.createElement("div")),(Te=b.createElement("input")).setAttribute("type","radio"),Te.setAttribute("checked","checked"),Te.setAttribute("name","t"),ke.appendChild(Te),m.checkClone=ke.cloneNode(!0).cloneNode(!0).lastChild.checked,ke.innerHTML="",m.noCloneChecked=!!ke.cloneNode(!0).lastChild.defaultValue,ke.innerHTML="",m.option=!!ke.lastChild;var Ae={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Oe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?E.merge([e],n):n}function Fe(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Pe(e,t,n,r,o){for(var i,s,a,c,u,l,d=t.createDocumentFragment(),p=[],f=0,h=e.length;f-1)o&&o.push(i);else if(u=me(i),s=Oe(d.appendChild(i),"script"),u&&Fe(s),n)for(l=0;i=s[l++];)Se.test(i.type||"")&&n.push(i);return d}var De=/^([^.]*)(?:\.(.+)|)/;function $e(){return!0}function Re(){return!1}function Le(e,t,n,r,o,i){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,a,n,r,t[a],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=Re;else if(!o)return e;return 1===i&&(s=o,o=function(e){return E().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=E.guid++)),e.each((function(){E.event.add(this,t,o,r,n)}))}function Ne(e,t,n){n?(ae.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var n,r=ae.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=a.call(arguments),ae.set(this,t,r),this[t](),n=ae.get(this,t),ae.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(ae.set(this,t,E.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=$e)}})):void 0===ae.get(e,t)&&E.event.add(e,t,$e)}E.event={global:{},add:function(e,t,n,r,o){var i,s,a,c,u,l,d,p,f,h,g,m=ae.get(e);if(ie(e))for(n.handler&&(n=(i=n).handler,o=i.selector),o&&E.find.matchesSelector(ge,o),n.guid||(n.guid=E.guid++),(c=m.events)||(c=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(t){return void 0!==E&&E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(X)||[""]).length;u--;)f=g=(a=De.exec(t[u])||[])[1],h=(a[2]||"").split(".").sort(),f&&(d=E.event.special[f]||{},f=(o?d.delegateType:d.bindType)||f,d=E.event.special[f]||{},l=E.extend({type:f,origType:g,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&E.expr.match.needsContext.test(o),namespace:h.join(".")},i),(p=c[f])||((p=c[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,h,s)||e.addEventListener&&e.addEventListener(f,s)),d.add&&(d.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,l):p.push(l),E.event.global[f]=!0)},remove:function(e,t,n,r,o){var i,s,a,c,u,l,d,p,f,h,g,m=ae.hasData(e)&&ae.get(e);if(m&&(c=m.events)){for(u=(t=(t||"").match(X)||[""]).length;u--;)if(f=g=(a=De.exec(t[u])||[])[1],h=(a[2]||"").split(".").sort(),f){for(d=E.event.special[f]||{},p=c[f=(r?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=i=p.length;i--;)l=p[i],!o&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(i,1),l.selector&&p.delegateCount--,d.remove&&d.remove.call(e,l));s&&!p.length&&(d.teardown&&!1!==d.teardown.call(e,h,m.handle)||E.removeEvent(e,f,m.handle),delete c[f])}else for(f in c)E.event.remove(e,f+t[u],n,r,!0);E.isEmptyObject(c)&&ae.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,s,a=new Array(arguments.length),c=E.event.fix(e),u=(ae.get(this,"events")||Object.create(null))[c.type]||[],l=E.event.special[c.type]||{};for(a[0]=c,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(i=[],s={},n=0;n-1:E.find(o,this,null,[u]).length),s[o]&&i.push(r);i.length&&a.push({elem:u,handlers:i})}return u=this,c\s*$/g;function Ie(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ue(e,t){var n,r,o,i,s,a;if(1===t.nodeType){if(ae.hasData(e)&&(a=ae.get(e).events))for(o in ae.remove(t,"handle events"),a)for(n=0,r=a[o].length;n1&&"string"==typeof h&&!m.checkClone&&qe.test(h))return e.each((function(o){var i=e.eq(o);g&&(t[0]=h.call(this,o,i.html())),Ve(i,t,n,r)}));if(p&&(i=(o=Pe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===o.childNodes.length&&(o=i),i||r)){for(a=(s=E.map(Oe(o,"script"),Be)).length;d0&&Fe(s,!c&&Oe(e,"script")),a},cleanData:function(e){for(var t,n,r,o=E.event.special,i=0;void 0!==(n=e[i]);i++)if(ie(n)){if(t=n[ae.expando]){if(t.events)for(r in t.events)o[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[ae.expando]=void 0}n[ce.expando]&&(n[ce.expando]=void 0)}}}),E.fn.extend({detach:function(e){return Xe(this,e,!0)},remove:function(e){return Xe(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?E.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 Ve(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ie(this,e).appendChild(e)}))},prepend:function(){return Ve(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 Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ve(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&&(E.cleanData(Oe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return E.clone(this,e,t)}))},html:function(e){return ee(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&&!Me.test(e)&&!Ae[(_e.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n=0&&(c+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-c-a-.5))||0),c+u}function lt(e,t,n){var r=Ge(e),o=(!m.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),i=o,s=Ze(e,t,r),a="offset"+t[0].toUpperCase()+t.slice(1);if(Ye.test(s)){if(!n)return s;s="auto"}return(!m.boxSizingReliable()&&o||!m.reliableTrDimensions()&&S(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===E.css(e,"boxSizing",!1,r),(i=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+ut(e,t,n||(o?"border":"content"),i,r,s)+"px"}function dt(e,t,n,r,o){return new dt.prototype.init(e,t,n,r,o)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!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,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,s,a=oe(t),c=Ke.test(t),u=e.style;if(c||(t=ot(a)),s=E.cssHooks[t]||E.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:u[t];"string"==(i=typeof n)&&(o=fe.exec(n))&&o[1]&&(n=be(e,t,o),i="number"),null!=n&&n==n&&("number"!==i||c||(n+=o&&o[3]||(E.cssNumber[a]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(c?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var o,i,s,a=oe(t);return Ke.test(t)||(t=ot(a)),(s=E.cssHooks[t]||E.cssHooks[a])&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=Ze(e,t,r)),"normal"===o&&t in at&&(o=at[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),E.each(["height","width"],(function(e,t){E.cssHooks[t]={get:function(e,n,r){if(n)return!it.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?lt(e,t,r):Je(e,st,(function(){return lt(e,t,r)}))},set:function(e,n,r){var o,i=Ge(e),s=!m.scrollboxSize()&&"absolute"===i.position,a=(s||r)&&"border-box"===E.css(e,"boxSizing",!1,i),c=r?ut(e,t,r,a,i):0;return a&&s&&(c-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-ut(e,t,"border",!1,i)-.5)),c&&(o=fe.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=E.css(e,t)),ct(0,n,c)}}})),E.cssHooks.marginLeft=et(m.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ze(e,"marginLeft"))||e.getBoundingClientRect().left-Je(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(e,t){E.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];r<4;r++)o[e+he[r]+t]=i[r]||i[r-2]||i[0];return o}},"margin"!==e&&(E.cssHooks[e+t].set=ct)})),E.fn.extend({css:function(e,t){return ee(this,(function(e,t,n){var r,o,i={},s=0;if(Array.isArray(t)){for(r=Ge(e),o=t.length;s1)}}),E.Tween=dt,dt.prototype={constructor:dt,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(E.cssNumber[n]?"":"px")},cur:function(){var e=dt.propHooks[this.prop];return e&&e.get?e.get(this):dt.propHooks._default.get(this)},run:function(e){var t,n=dt.propHooks[this.prop];return this.options.duration?this.pos=t=E.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):dt.propHooks._default.set(this),this}},dt.prototype.init.prototype=dt.prototype,dt.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=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[ot(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}},dt.propHooks.scrollTop=dt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=dt.prototype.init,E.fx.step={};var pt,ft,ht=/^(?:toggle|show|hide)$/,gt=/queueHooks$/;function mt(){ft&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(mt):r.setTimeout(mt,E.fx.interval),E.fx.tick())}function yt(){return r.setTimeout((function(){pt=void 0})),pt=Date.now()}function vt(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)o["margin"+(n=he[r])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function bt(e,t,n){for(var r,o=(Ct.tweeners[t]||[]).concat(Ct.tweeners["*"]),i=0,s=o.length;i1)},removeAttr:function(e){return this.each((function(){E.removeAttr(this,e)}))}}),E.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?E.prop(e,t,n):(1===i&&E.isXMLDoc(e)||(o=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&S(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(X);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=wt[t]||E.find.attr;wt[t]=function(e,t,r){var o,i,s=t.toLowerCase();return r||(i=wt[s],wt[s]=o,o=null!=n(e,t,r)?s:null,wt[s]=i),o}}));var kt=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;function Et(e){return(e.match(X)||[]).join(" ")}function _t(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(X)||[]}E.fn.extend({prop:function(e,t){return ee(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[E.propFix[e]||e]}))}}),E.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&E.isXMLDoc(e)||(t=E.propFix[t]||t,o=E.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):kt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(E.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)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(e){var t,n,r,o,i,s;return y(e)?this.each((function(t){E(this).addClass(e.call(this,t,_t(this)))})):(t=St(e)).length?this.each((function(){if(r=_t(this),n=1===this.nodeType&&" "+Et(r)+" "){for(i=0;i-1;)n=n.replace(" "+o+" "," ");s=Et(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,o,i,s=typeof e,a="string"===s||Array.isArray(e);return y(e)?this.each((function(n){E(this).toggleClass(e.call(this,n,_t(this),t),t)})):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=St(e),this.each((function(){if(a)for(i=E(this),o=0;o-1)return!0;return!1}});var At=/\r/g;E.fn.extend({val:function(e){var t,n,r,o=this[0];return arguments.length?(r=y(e),this.each((function(n){var o;1===this.nodeType&&(null==(o=r?e.call(this,n,E(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=E.map(o,(function(e){return null==e?"":e+""}))),(t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))}))):o?(t=E.valHooks[o.type]||E.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(At,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:Et(E.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,s="select-one"===e.type,a=s?null:[],c=s?i+1:o.length;for(r=i<0?c:s?i:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}},m.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Ot=r.location,Ft={guid:Date.now()},jt=/\?/;E.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||E.error("Invalid XML: "+(n?E.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Pt=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,n,o){var i,s,a,c,u,l,d,p,h=[n||b],g=f.call(e,"type")?e.type:e,m=f.call(e,"namespace")?e.namespace.split("."):[];if(s=p=a=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!Pt.test(g+E.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),u=g.indexOf(":")<0&&"on"+g,(e=e[E.expando]?e:new E.Event(g,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:E.makeArray(t,[e]),d=E.event.special[g]||{},o||!d.trigger||!1!==d.trigger.apply(n,t))){if(!o&&!d.noBubble&&!v(n)){for(c=d.delegateType||g,Pt.test(c+g)||(s=s.parentNode);s;s=s.parentNode)h.push(s),a=s;a===(n.ownerDocument||b)&&h.push(a.defaultView||a.parentWindow||r)}for(i=0;(s=h[i++])&&!e.isPropagationStopped();)p=s,e.type=i>1?c:d.bindType||g,(l=(ae.get(s,"events")||Object.create(null))[e.type]&&ae.get(s,"handle"))&&l.apply(s,t),(l=u&&s[u])&&l.apply&&ie(s)&&(e.result=l.apply(s,t),!1===e.result&&e.preventDefault());return e.type=g,o||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(h.pop(),t)||!ie(n)||u&&y(n[g])&&!v(n)&&((a=n[u])&&(n[u]=null),E.event.triggered=g,e.isPropagationStopped()&&p.addEventListener(g,Dt),n[g](),e.isPropagationStopped()&&p.removeEventListener(g,Dt),E.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each((function(){E.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}});var $t=/\[\]$/,Rt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Mt(e,t,n,r){var o;if(Array.isArray(t))E.each(t,(function(t,o){n||$t.test(e)?r(e,o):Mt(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,r)}));else if(n||"object"!==w(t))r(e,t);else for(o in t)Mt(e+"["+o+"]",t[o],n,r)}E.param=function(e,t){var n,r=[],o=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,(function(){o(this.name,this.value)}));else for(n in e)Mt(n,e[n],t,o);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&Nt.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Ee.test(e))})).map((function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}})):{name:t.name,value:n.replace(Rt,"\r\n")}})).get()}});var qt=/%20/g,Ht=/#.*$/,It=/([?&])_=[^&]*/,Bt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Wt=/^(?:GET|HEAD)$/,Ut=/^\/\//,zt={},Vt={},Xt="*/".concat("*"),Yt=b.createElement("a");function Kt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(X)||[];if(y(n))for(;r=i[o++];)"+"===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 o={},i=e===Vt;function s(a){var c;return o[a]=!0,E.each(e[a]||[],(function(e,a){var u=a(t,n,r);return"string"!=typeof u||i||o[u]?i?!(c=u):void 0:(t.dataTypes.unshift(u),s(u),!1)})),c}return s(t.dataTypes[0])||!o["*"]&&s("*")}function Jt(e,t){var n,r,o=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}Yt.href=Ot.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ot.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ot.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Xt,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":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Jt(Jt(e,E.ajaxSettings),t):Jt(E.ajaxSettings,e)},ajaxPrefilter:Kt(zt),ajaxTransport:Kt(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o,i,s,a,c,u,l,d,p,f=E.ajaxSetup({},t),h=f.context||f,g=f.context&&(h.nodeType||h.jquery)?E(h):E.event,m=E.Deferred(),y=E.Callbacks("once memory"),v=f.statusCode||{},C={},x={},w="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(u){if(!s)for(s={};t=Bt.exec(i);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?i:null},setRequestHeader:function(e,t){return null==u&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,C[e]=t),this},overrideMimeType:function(e){return null==u&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)k.always(e[k.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||w;return n&&n.abort(t),T(0,t),this}};if(m.promise(k),f.url=((e||f.url||Ot.href)+"").replace(Ut,Ot.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(X)||[""],null==f.crossDomain){c=b.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=Yt.protocol+"//"+Yt.host!=c.protocol+"//"+c.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=E.param(f.data,f.traditional)),Gt(zt,f,t,k),u)return k;for(d in(l=E.event&&f.global)&&0==E.active++&&E.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Wt.test(f.type),o=f.url.replace(Ht,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(qt,"+")):(p=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(jt.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(It,"$1"),p=(jt.test(o)?"&":"?")+"_="+Ft.guid+++p),f.url=o+p),f.ifModified&&(E.lastModified[o]&&k.setRequestHeader("If-Modified-Since",E.lastModified[o]),E.etag[o]&&k.setRequestHeader("If-None-Match",E.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Xt+"; q=0.01":""):f.accepts["*"]),f.headers)k.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(h,k,f)||u))return k.abort();if(w="abort",y.add(f.complete),k.done(f.success),k.fail(f.error),n=Gt(Vt,f,t,k)){if(k.readyState=1,l&&g.trigger("ajaxSend",[k,f]),u)return k;f.async&&f.timeout>0&&(a=r.setTimeout((function(){k.abort("timeout")}),f.timeout));try{u=!1,n.send(C,T)}catch(e){if(u)throw e;T(-1,e)}}else T(-1,"No Transport");function T(e,t,s,c){var d,p,b,C,x,w=t;u||(u=!0,a&&r.clearTimeout(a),n=void 0,i=c||"",k.readyState=e>0?4:0,d=e>=200&&e<300||304===e,s&&(C=function(e,t,n){for(var r,o,i,s,a=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in a)if(a[o]&&a[o].test(r)){c.unshift(o);break}if(c[0]in n)i=c[0];else{for(o in n){if(!c[0]||e.converters[o+" "+c[0]]){i=o;break}s||(s=o)}i=i||s}if(i)return i!==c[0]&&c.unshift(i),n[i]}(f,k,s)),!d&&E.inArray("script",f.dataTypes)>-1&&E.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),C=function(e,t,n,r){var o,i,s,a,c,u={},l=e.dataTypes.slice();if(l[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(i=l.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=i,i=l.shift())if("*"===i)i=c;else if("*"!==c&&c!==i){if(!(s=u[c+" "+i]||u["* "+i]))for(o in u)if((a=o.split(" "))[1]===i&&(s=u[c+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[o]:!0!==u[o]&&(i=a[0],l.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+c+" to "+i}}}return{state:"success",data:t}}(f,C,k,d),d?(f.ifModified&&((x=k.getResponseHeader("Last-Modified"))&&(E.lastModified[o]=x),(x=k.getResponseHeader("etag"))&&(E.etag[o]=x)),204===e||"HEAD"===f.type?w="nocontent":304===e?w="notmodified":(w=C.state,p=C.data,d=!(b=C.error))):(b=w,!e&&w||(w="error",e<0&&(e=0))),k.status=e,k.statusText=(t||w)+"",d?m.resolveWith(h,[p,w,k]):m.rejectWith(h,[k,w,b]),k.statusCode(v),v=void 0,l&&g.trigger(d?"ajaxSuccess":"ajaxError",[k,f,d?p:b]),y.fireWith(h,[k,w]),l&&(g.trigger("ajaxComplete",[k,f]),--E.active||E.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],(function(e,t){E[t]=function(e,n,r,o){return y(n)&&(o=o||r,r=n,n=void 0),E.ajax(E.extend({url:e,type:t,dataType:o,data:n,success:r},E.isPlainObject(e)&&e))}})),E.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=E(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 y(e)?this.each((function(t){E(this).wrapInner(e.call(this,t))})):this.each((function(){var t=E(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){E(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Qt={0:200,1223:204},Zt=E.ajaxSettings.xhr();m.cors=!!Zt&&"withCredentials"in Zt,m.ajax=Zt=!!Zt,E.ajaxTransport((function(e){var t,n;if(m.cors||Zt&&!e.crossDomain)return{send:function(o,i){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);t=function(e){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?i(0,"error"):i(a.status,a.statusText):i(Qt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),n=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),E.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),E.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 E.globalEval(e),e}}}),E.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),E.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,o){t=E("