diff --git a/internal/src/ts/event_listeners.ts b/internal/src/ts/event_listeners.ts index 2cf5211..51e96d7 100644 --- a/internal/src/ts/event_listeners.ts +++ b/internal/src/ts/event_listeners.ts @@ -33,7 +33,8 @@ const opRequest = (action: "run" | "cancel" | "stop" | "increase_off", csrfmiddl return success } -const changeRequest = (el: HTMLInputElement, action: string, value: number, csrfmiddlewaretoken: string): boolean => { +const changeRequest = (el: HTMLInputElement, action: string, value: number, + csrfmiddlewaretoken: string, callback: Function | null): boolean => { let success = false el.disabled = true el.classList.add("readonly-input") @@ -52,6 +53,9 @@ const changeRequest = (el: HTMLInputElement, action: string, value: number, csrf success = response.ok if (success) { response.json().then((data: ITask) => { + if (callback instanceof Function) { + callback() + } toastr.success(`Change request completed successfully!
Task Id: ${data.id}`) }) } @@ -467,7 +471,7 @@ export const eventListeners = () => { } if (minutes > 0) { - changeRequest(smoothPeriod, Events.IncreaseOn, minutes, ev.detail.csrfmiddlewaretoken) + changeRequest(smoothPeriod, Events.IncreaseOn, minutes, ev.detail.csrfmiddlewaretoken, null) } } }) as EventListener) @@ -476,7 +480,7 @@ export const eventListeners = () => { if (ev.detail.value > 0) { const el = document.getElementById("orderDetailViewers") if (el) { - changeRequest(el, Events.ChangeOnlineValue, ev.detail.value, ev.detail.csrfmiddlewaretoken) + changeRequest(el, Events.ChangeOnlineValue, ev.detail.value, ev.detail.csrfmiddlewaretoken, null) } } }) as EventListener) @@ -485,19 +489,19 @@ export const eventListeners = () => { if (ev.detail.value > 0) { const el = document.getElementById("orderDetailSmoothPeriod") if (el) { - changeRequest(el, Events.ChangeIncreaseValue, ev.detail.value, ev.detail.csrfmiddlewaretoken) + changeRequest(el, Events.ChangeIncreaseValue, ev.detail.value, ev.detail.csrfmiddlewaretoken, null) } } }) as EventListener) window.addEventListener(Events.AddViews, ((ev: CustomEvent) => { if (ev.detail.value > 0) { - const el = document.getElementById("orderDetailAddViews") - if (el) { - const success = changeRequest(el, Events.AddViews, ev.detail.value, ev.detail.csrfmiddlewaretoken) - if (success) { - //todo - } + const el = document.getElementById("orderDetailAddViews"), + closeBtn = document.getElementById("closeAddViewsModal") + if (el && closeBtn) { + changeRequest(el, Events.AddViews, ev.detail.value, ev.detail.csrfmiddlewaretoken, () => { + closeBtn.click() + }) } } }) as EventListener) diff --git a/internal/src/ts/order_actions.ts b/internal/src/ts/order_actions.ts index 87875ad..dee0efa 100644 --- a/internal/src/ts/order_actions.ts +++ b/internal/src/ts/order_actions.ts @@ -6,6 +6,8 @@ export const orderActions = () => { smoothGain = document.getElementById("orderDetailSmoothGain"), smoothPeriod = document.getElementById("orderDetailSmoothPeriod"), delayPeriod = document.getElementById("orderDetailDelayLaunchPeriod"), + addViews = document.getElementById("orderDetailAddViews"), + addViewsTmp = document.getElementById("addViewsTmp"), action = document.getElementById("orderDetailAction"), cancel = document.getElementById("orderDetailCancel"), csrfmiddlewaretoken = document.querySelector(`input[name="csrfmiddlewaretoken"]`) @@ -80,6 +82,34 @@ export const orderActions = () => { } } + if (addViews) { + if (addViewsTmp) { + addViews.onkeyup = () => { + const value = parseInt(addViews.value), + price = addViewsTmp.dataset.price + if (isNaN(value) || value < 1) { + addViewsTmp.textContent = "0" + } else { + if (price) { + addViewsTmp.textContent = (value * parseFloat(price)).toFixed(2).toString() + } else { + addViewsTmp.textContent = "0" + } + } + } + } + + addViews.onchange = () => { + const value = parseInt(addViews.value) + window.dispatchEvent(new CustomEvent(Events.AddViews, { + detail: { + value: isNaN(value) ? 0 : value, + csrfmiddlewaretoken: csrfmiddlewaretoken.value + } + })) + } + } + if (action) { action.onclick = () => { const a = action.dataset.action diff --git a/internal/templates/internal/include/content/order_details/_add_views.html b/internal/templates/internal/include/content/order_details/_add_views.html new file mode 100644 index 0000000..7154508 --- /dev/null +++ b/internal/templates/internal/include/content/order_details/_add_views.html @@ -0,0 +1,69 @@ +{% load i18n %} + +{% if can_edit %} +
+ + +
+{% endif %} diff --git a/internal/templates/internal/include/content/order_details/cost.html b/internal/templates/internal/include/content/order_details/cost.html index 9de335e..e86b3ce 100644 --- a/internal/templates/internal/include/content/order_details/cost.html +++ b/internal/templates/internal/include/content/order_details/cost.html @@ -27,15 +27,25 @@
{{ order.cost }} +
+ + + {{ order.tariff.details.price }} + {% trans "per view" %} + +
{% endif %} + + {% include "internal/include/content/order_details/_add_views.html" %} +
-
{% trans "View" %}
+
{% trans "Views" %}
{{ order.views_balance }}
{% if perms.core.can_view_prices %} diff --git a/internal/views/order_details.py b/internal/views/order_details.py index eed07a9..7af73aa 100644 --- a/internal/views/order_details.py +++ b/internal/views/order_details.py @@ -4,7 +4,6 @@ from django.http import HttpRequest from django.http.response import ( HttpResponse as HttpResponse, - HttpResponseForbidden, JsonResponse, ) from django.urls import reverse_lazy @@ -86,9 +85,7 @@ def get_context_data(self, **kwargs: Any) -> dict[str, Any]: def get(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: return super(OrderDetailsView, self).get(request, *args, **kwargs) - def post( - self, request: HttpRequest, *args: Any, **kwargs: Any - ) -> JsonResponse | HttpResponseForbidden: + def post(self, request: HttpRequest, *args: Any, **kwargs: Any) -> JsonResponse: user = self.request.user is_superuser = user.is_superuser can_edit = is_superuser or self.object.user == user @@ -106,7 +103,7 @@ def post( ] if not user.has_perms(edit_perms): - return HttpResponseForbidden() + raise PermissionDenied client = RxClient() body = json.loads(request.body.decode()) diff --git a/static/internal/script.js b/static/internal/script.js index 1b52cf2..18005b4 100644 --- a/static/internal/script.js +++ b/static/internal/script.js @@ -1,2 +1,2 @@ /*! For license information please see script.js.LICENSE.txt */ -!function(){var e={692: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,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,u=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},l=o.push,c=o.indexOf,d={},f=d.toString,p=d.hasOwnProperty,h=p.toString,m=h.call(Object),g={},v=function isFunction(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function isWindow(e){return null!=e&&e===e.window},w=r.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function DOMEval(e,t,n){var r,i,o=(n=n||w).createElement("script");if(o.text=e,t)for(r in b)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function toType(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[f.call(e)]||"object":typeof e}var x="3.7.1",T=/HTML$/i,jQuery=function(e,t){return new jQuery.fn.init(e,t)};function isArrayLike(e){var t=!!e&&"length"in e&&e.length,n=toType(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function nodeName(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}jQuery.fn=jQuery.prototype={jquery:x,constructor:jQuery,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=jQuery.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return jQuery.each(this,e)},map:function(e){return this.pushStack(jQuery.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(jQuery.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(jQuery.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+~]|"+S+")"+S+"*"),q=new RegExp(S+"|>"),F=new RegExp(H),B=new RegExp("^"+O+"$"),R={ID:new RegExp("^#("+O+")"),CLASS:new RegExp("^\\.("+O+")"),TAG:new RegExp("^("+O+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+S+"*(even|odd|(([+-]|)(\\d*)n|)"+S+"*(?:([+-]|)"+S+"*(\\d+)|))"+S+"*\\)|)","i"),bool:new RegExp("^(?:"+_+")$","i"),needsContext:new RegExp("^"+S+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+S+"*((?:-\\d)?\\d*)"+S+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,$=/^h\d$/i,z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,U=new RegExp("\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\([^\\r\\n\\f])","g"),funescape=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))},unloadHandler=function(){setDocument()},V=addCombinator((function(e){return!0===e.disabled&&nodeName(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(o=s.call(N.childNodes),N.childNodes),o[N.childNodes.length].nodeType}catch(G){m={apply:function(e,t){j.apply(e,s.call(t))},call:function(e){j.apply(e,s.call(arguments,1))}}}function find(e,t,n,r){var i,o,a,s,l,c,p,h=t&&t.ownerDocument,y=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==y&&9!==y&&11!==y)return n;if(!r&&(setDocument(t),t=t||u,d)){if(11!==y&&(l=z.exec(e)))if(i=l[1]){if(9===y){if(!(a=t.getElementById(i)))return n;if(a.id===i)return m.call(n,a),n}else if(h&&(a=h.getElementById(i))&&find.contains(t,a)&&a.id===i)return m.call(n,a),n}else{if(l[2])return m.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&t.getElementsByClassName)return m.apply(n,t.getElementsByClassName(i)),n}if(!(D[e+" "]||f&&f.test(e))){if(p=e,h=t,1===y&&(q.test(e)||M.test(e))){for((h=X.test(e)&&testContext(t.parentNode)||t)==t&&g.scope||((s=t.getAttribute("id"))?s=jQuery.escapeSelector(s):t.setAttribute("id",s=v)),o=(c=tokenize(e)).length;o--;)c[o]=(s?"#"+s:":scope")+" "+toSelector(c[o]);p=c.join(",")}try{return m.apply(n,h.querySelectorAll(p)),n}catch(w){D(e,!0)}finally{s===v&&t.removeAttribute("id")}}}return select(e.replace(A,"$1"),t,n,r)}function createCache(){var e=[];return function cache(n,r){return e.push(n+" ")>t.cacheLength&&delete cache[e.shift()],cache[n+" "]=r}}function markFunction(e){return e[v]=!0,e}function assert(e){var t=u.createElement("fieldset");try{return!!e(t)}catch(G){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function createInputPseudo(e){return function(t){return nodeName(t,"input")&&t.type===e}}function createButtonPseudo(e){return function(t){return(nodeName(t,"input")||nodeName(t,"button"))&&t.type===e}}function createDisabledPseudo(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&&V(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function createPositionalPseudo(e){return markFunction((function(t){return t=+t,markFunction((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 testContext(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function setDocument(e){var n,r=e?e.ownerDocument||e:N;return r!=u&&9===r.nodeType&&r.documentElement?(l=(u=r).documentElement,d=!jQuery.isXMLDoc(u),h=l.matches||l.webkitMatchesSelector||l.msMatchesSelector,l.msMatchesSelector&&N!=u&&(n=u.defaultView)&&n.top!==n&&n.addEventListener("unload",unloadHandler),g.getById=assert((function(e){return l.appendChild(e).id=jQuery.expando,!u.getElementsByName||!u.getElementsByName(jQuery.expando).length})),g.disconnectedMatch=assert((function(e){return h.call(e,"*")})),g.scope=assert((function(){return u.querySelectorAll(":scope")})),g.cssHas=assert((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(G){return!0}})),g.getById?(t.filter.ID=function(e){var t=e.replace(U,funescape);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&d){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(U,funescape);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&d){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[]}}),t.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&d)return t.getElementsByClassName(e)},f=[],assert((function(e){var t;l.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||f.push("\\["+S+"*(?:value|"+_+")"),e.querySelectorAll("[id~="+v+"-]").length||f.push("~="),e.querySelectorAll("a#"+v+"+*").length||f.push(".#.+[+~]"),e.querySelectorAll(":checked").length||f.push(":checked"),(t=u.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),l.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&f.push(":enabled",":disabled"),(t=u.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||f.push("\\["+S+"*name"+S+"*="+S+"*(?:''|\"\")")})),g.cssHas||f.push(":has"),f=f.length&&new RegExp(f.join("|")),sortOrder=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===n?e===u||e.ownerDocument==N&&find.contains(N,e)?-1:t===u||t.ownerDocument==N&&find.contains(N,t)?1:i?c.call(i,e)-c.call(i,t):0:4&n?-1:1)},u):u}for(e in find.matches=function(e,t){return find(e,null,null,t)},find.matchesSelector=function(e,t){if(setDocument(e),d&&!D[t+" "]&&(!f||!f.test(t)))try{var n=h.call(e,t);if(n||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(G){D(t,!0)}return find(t,u,null,[e]).length>0},find.contains=function(e,t){return(e.ownerDocument||e)!=u&&setDocument(e),jQuery.contains(e,t)},find.attr=function(e,n){(e.ownerDocument||e)!=u&&setDocument(e);var r=t.attrHandle[n.toLowerCase()],i=r&&p.call(t.attrHandle,n.toLowerCase())?r(e,n,!d):undefined;return i!==undefined?i:e.getAttribute(n)},find.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},jQuery.uniqueSort=function(e){var t,n=[],r=0,o=0;if(a=!g.sortStable,i=!g.sortStable&&s.call(e,0),E.call(e,sortOrder),a){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)k.call(e,n[r],1)}return i=null,e},jQuery.fn.uniqueSort=function(){return this.pushStack(jQuery.uniqueSort(s.apply(this)))},t=jQuery.expr={cacheLength:50,createPseudo:markFunction,match:R,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(U,funescape),e[3]=(e[3]||e[4]||e[5]||"").replace(U,funescape),"~="===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]||find.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]&&find.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return R.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&F.test(n)&&(t=tokenize(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(U,funescape).toLowerCase();return"*"===e?function(){return!0}:function(e){return nodeName(e,t)}},CLASS:function(e){var t=b[e+" "];return t||(t=new RegExp("(^|"+S+")"+e+"("+S+"|$)"))&&b(e,(function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=find.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(L," ")+" ").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,u){var l,c,d,f,p,h=o!==a?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),w=!u&&!s,b=!1;if(m){if(o){for(;h;){for(d=t;d=d[h];)if(s?nodeName(d,g):1===d.nodeType)return!1;p=h="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&w){for(b=(f=(l=(c=m[v]||(m[v]={}))[e]||[])[0]===y&&l[1])&&l[2],d=f&&m.childNodes[f];d=++f&&d&&d[h]||(b=f=0)||p.pop();)if(1===d.nodeType&&++b&&d===t){c[e]=[y,f,b];break}}else if(w&&(b=f=(l=(c=t[v]||(t[v]={}))[e]||[])[0]===y&&l[1]),!1===b)for(;(d=++f&&d&&d[h]||(b=f=0)||p.pop())&&(!(s?nodeName(d,g):1===d.nodeType)||!++b||(w&&((c=d[v]||(d[v]={}))[e]=[y,b]),d!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,n){var r,i=t.pseudos[e]||t.setFilters[e.toLowerCase()]||find.error("unsupported pseudo: "+e);return i[v]?i(n):i.length>1?(r=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?markFunction((function(e,t){for(var r,o=i(e,n),a=o.length;a--;)e[r=c.call(e,o[a])]=!(t[r]=o[a])})):function(e){return i(e,0,r)}):i}},pseudos:{not:markFunction((function(e){var t=[],n=[],r=compile(e.replace(A,"$1"));return r[v]?markFunction((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:markFunction((function(e){return function(t){return find(e,t).length>0}})),contains:markFunction((function(e){return e=e.replace(U,funescape),function(t){return(t.textContent||jQuery.text(t)).indexOf(e)>-1}})),lang:markFunction((function(e){return B.test(e||"")||find.error("unsupported lang: "+e),e=e.replace(U,funescape).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===l},focus:function(e){return e===function safeActiveElement(){try{return u.activeElement}catch(e){}}()&&u.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:createDisabledPseudo(!1),disabled:createDisabledPseudo(!0),checked:function(e){return nodeName(e,"input")&&!!e.checked||nodeName(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 $.test(e.nodeName)},input:function(e){return W.test(e.nodeName)},button:function(e){return nodeName(e,"input")&&"button"===e.type||nodeName(e,"button")},text:function(e){var t;return nodeName(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:createPositionalPseudo((function(){return[0]})),last:createPositionalPseudo((function(e,t){return[t-1]})),eq:createPositionalPseudo((function(e,t,n){return[n<0?n+t:n]})),even:createPositionalPseudo((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:createPositionalPseudo((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 condense(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s-1&&(o[l]=!(a[l]=f))}}else p=condense(p===a?p.splice(v,p.length):p),i?i(null,a,p,u):m.apply(a,p)}))}function matcherFromTokens(e){for(var r,i,o,a=e.length,s=t.relative[e[0].type],u=s||t.relative[" "],l=s?1:0,d=addCombinator((function(e){return e===r}),u,!0),f=addCombinator((function(e){return c.call(r,e)>-1}),u,!0),p=[function(e,t,i){var o=!s&&(i||t!=n)||((r=t).nodeType?d(e,t,i):f(e,t,i));return r=null,o}];l1&&elementMatcher(p),l>1&&toSelector(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(A,"$1"),i,l0,o=e.length>0,superMatcher=function(a,s,l,c,f){var p,h,g,v=0,w="0",b=a&&[],x=[],T=n,E=a||o&&t.find.TAG("*",f),k=y+=null==T?1:Math.random()||.1,S=E.length;for(f&&(n=s==u||s||f);w!==S&&null!=(p=E[w]);w++){if(o&&p){for(h=0,s||p.ownerDocument==u||(setDocument(p),l=!d);g=e[h++];)if(g(p,s||u,l)){m.call(c,p);break}f&&(y=k)}i&&((p=!g&&p)&&v--,a&&b.push(p))}if(v+=w,i&&w!==v){for(h=0;g=r[h++];)g(b,x,s,l);if(a){if(v>0)for(;w--;)b[w]||x[w]||(x[w]=C.call(c));x=condense(x)}m.apply(c,x),f&&!a&&x.length>0&&v+r.length>1&&jQuery.uniqueSort(c)}return f&&(y=k,n=T),b};return i?markFunction(superMatcher):superMatcher}(a,o)),s.selector=e}return s}function select(e,n,r,i){var o,a,s,u,l,c="function"==typeof e&&e,f=!i&&tokenize(e=c.selector||e);if(r=r||[],1===f.length){if((a=f[0]=f[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===n.nodeType&&d&&t.relative[a[1].type]){if(!(n=(t.find.ID(s.matches[0].replace(U,funescape),n)||[])[0]))return r;c&&(n=n.parentNode),e=e.slice(a.shift().value.length)}for(o=R.needsContext.test(e)?0:a.length;o--&&(s=a[o],!t.relative[u=s.type]);)if((l=t.find[u])&&(i=l(s.matches[0].replace(U,funescape),X.test(a[0].type)&&testContext(n.parentNode)||n))){if(a.splice(o,1),!(e=i.length&&toSelector(a)))return m.apply(r,i),r;break}}return(c||compile(e,f))(i,n,!d,r,!n||X.test(e)&&testContext(n.parentNode)||n),r}setFilters.prototype=t.filters=t.pseudos,t.setFilters=new setFilters,g.sortStable=v.split("").sort(sortOrder).join("")===v,setDocument(),g.sortDetached=assert((function(e){return 1&e.compareDocumentPosition(u.createElement("fieldset"))})),jQuery.find=find,jQuery.expr[":"]=jQuery.expr.pseudos,jQuery.unique=jQuery.uniqueSort,find.compile=compile,find.select=select,find.setDocument=setDocument,find.tokenize=tokenize,find.escape=jQuery.escapeSelector,find.getText=jQuery.text,find.isXML=jQuery.isXMLDoc,find.selectors=jQuery.expr,find.support=jQuery.support,find.uniqueSort=jQuery.uniqueSort}();var dir=function(e,t,n){for(var r=[],i=n!==undefined;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&jQuery(e).is(n))break;r.push(e)}return r},siblings=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},_=jQuery.expr.match.needsContext,O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function winnow(e,t,n){return v(t)?jQuery.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?jQuery.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?jQuery.grep(e,(function(e){return c.call(t,e)>-1!==n})):jQuery.filter(t,e,n)}jQuery.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?jQuery.find.matchesSelector(r,e)?[r]:[]:jQuery.find.matches(e,jQuery.grep(t,(function(e){return 1===e.nodeType})))},jQuery.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(jQuery(e).filter((function(){for(t=0;t1?jQuery.uniqueSort(n):n},filter:function(e){return this.pushStack(winnow(this,e||[],!1))},not:function(e){return this.pushStack(winnow(this,e||[],!0))},is:function(e){return!!winnow(this,"string"==typeof e&&_.test(e)?jQuery(e):e||[],!1).length}});var I,H=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(jQuery.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||I,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:H.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 jQuery?t[0]:t,jQuery.merge(this,jQuery.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:w,!0)),O.test(r[1])&&jQuery.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=w.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?n.ready!==undefined?n.ready(e):e(jQuery):jQuery.makeArray(e,this)}).prototype=jQuery.fn,I=jQuery(w);var L=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};function sibling(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}jQuery.fn.extend({has:function(e){var t=jQuery(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&jQuery.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?jQuery.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(jQuery(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),jQuery.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return dir(e,"parentNode")},parentsUntil:function(e,t,n){return dir(e,"parentNode",n)},next:function(e){return sibling(e,"nextSibling")},prev:function(e){return sibling(e,"previousSibling")},nextAll:function(e){return dir(e,"nextSibling")},prevAll:function(e){return dir(e,"previousSibling")},nextUntil:function(e,t,n){return dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return dir(e,"previousSibling",n)},siblings:function(e){return siblings((e.parentNode||{}).firstChild,e)},children:function(e){return siblings(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(nodeName(e,"template")&&(e=e.content||e),jQuery.merge([],e.childNodes))}},(function(e,t){jQuery.fn[e]=function(n,r){var i=jQuery.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=jQuery.filter(r,i)),this.length>1&&(P[e]||jQuery.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}}));var M=/[^\x20\t\r\n\f]+/g;function Identity(e){return e}function Thrower(e){throw e}function adoptValue(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(undefined,[e].slice(r))}catch(e){n.apply(undefined,[e])}}jQuery.Callbacks=function(e){e="string"==typeof e?function createOptions(e){var t={};return jQuery.each(e.match(M)||[],(function(e,n){t[n]=!0})),t}(e):jQuery.extend({},e);var t,n,r,i,o=[],a=[],s=-1,fire=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?jQuery.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||fire()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},jQuery.extend({Deferred:function(e){var t=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return jQuery.Deferred((function(n){jQuery.each(t,(function(t,r){var i=v(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&v(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,n,i){var o=0;function resolve(e,t,n,i){return function(){var a=this,s=arguments,mightThrow=function(){var r,u;if(!(e=o&&(n!==Thrower&&(a=undefined,s=[r]),t.rejectWith(a,s))}};e?u():(jQuery.Deferred.getErrorHook?u.error=jQuery.Deferred.getErrorHook():jQuery.Deferred.getStackHook&&(u.error=jQuery.Deferred.getStackHook()),r.setTimeout(u))}}return jQuery.Deferred((function(r){t[0][3].add(resolve(0,r,v(i)?i:Identity,r.notifyWith)),t[1][3].add(resolve(0,r,v(e)?e:Identity)),t[2][3].add(resolve(0,r,v(n)?n:Thrower))})).promise()},promise:function(e){return null!=e?jQuery.extend(e,i):i}},o={};return jQuery.each(t,(function(e,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?undefined:this,arguments),this},o[r[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=jQuery.Deferred(),updateFunc=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&&(adoptValue(e,o.done(updateFunc(n)).resolve,o.reject,!t),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)adoptValue(i[n],updateFunc(n),o.reject);return o.promise()}});var q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&q.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},jQuery.readyException=function(e){r.setTimeout((function(){throw e}))};var F=jQuery.Deferred();function completed(){w.removeEventListener("DOMContentLoaded",completed),r.removeEventListener("load",completed),jQuery.ready()}jQuery.fn.ready=function(e){return F.then(e)["catch"]((function(e){jQuery.readyException(e)})),this},jQuery.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--jQuery.readyWait:jQuery.isReady)||(jQuery.isReady=!0,!0!==e&&--jQuery.readyWait>0||F.resolveWith(w,[jQuery]))}}),jQuery.ready.then=F.then,"complete"===w.readyState||"loading"!==w.readyState&&!w.documentElement.doScroll?r.setTimeout(jQuery.ready):(w.addEventListener("DOMContentLoaded",completed),r.addEventListener("load",completed));var access=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===toType(n))for(s in i=!0,n)access(e,t,s,n[s],!0,o,a);else if(r!==undefined&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(jQuery(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){$.remove(this,e)}))}}),jQuery.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=W.get(e,t),n&&(!r||Array.isArray(n)?r=W.access(e,t,jQuery.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=jQuery.queue(e,t),r=n.length,i=n.shift(),o=jQuery._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){jQuery.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return W.get(e,n)||W.access(e,n,{empty:jQuery.Callbacks("once memory").add((function(){W.remove(e,[t+"queue",n])}))})}}),jQuery.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,ne=/^$|^module$|\/(?:java|ecma)script/i;K=w.createDocumentFragment().appendChild(w.createElement("div")),(Z=w.createElement("input")).setAttribute("type","radio"),Z.setAttribute("checked","checked"),Z.setAttribute("name","t"),K.appendChild(Z),g.checkClone=K.cloneNode(!0).cloneNode(!0).lastChild.checked,K.innerHTML="",g.noCloneChecked=!!K.cloneNode(!0).lastChild.defaultValue,K.innerHTML="",g.option=!!K.lastChild;var re={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function getAll(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],t===undefined||t&&nodeName(e,t)?jQuery.merge([e],n):n}function setGlobalEval(e,t){for(var n=0,r=e.length;n",""]);var ie=/<|&#?\w+;/;function buildFragment(e,t,n,r,i){for(var o,a,s,u,l,c,d=t.createDocumentFragment(),f=[],p=0,h=e.length;p-1)i&&i.push(o);else if(l=isAttached(o),a=getAll(d.appendChild(o),"script"),l&&setGlobalEval(a),n)for(c=0;o=a[c++];)ne.test(o.type||"")&&n.push(o);return d}var oe=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return!0}function returnFalse(){return!1}function on(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=undefined),t)on(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=undefined):null==i&&("string"==typeof n?(i=r,r=undefined):(i=r,r=n,n=undefined)),!1===i)i=returnFalse;else if(!i)return e;return 1===o&&(a=i,i=function(e){return jQuery().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=jQuery.guid++)),e.each((function(){jQuery.event.add(this,t,i,r,n)}))}function leverageNative(e,t,n){n?(W.set(e,t,!1),jQuery.event.add(e,t,{namespace:!1,handler:function(e){var n,r=W.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(jQuery.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),W.set(this,t,r),this[t](),n=W.get(this,t),W.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(W.set(this,t,jQuery.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=returnTrue)}})):W.get(e,t)===undefined&&jQuery.event.add(e,t,returnTrue)}jQuery.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,p,h,m,g=W.get(e);if(acceptData(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&jQuery.find.matchesSelector(J,i),n.guid||(n.guid=jQuery.guid++),(u=g.events)||(u=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(t){return void 0!==jQuery&&jQuery.event.triggered!==t.type?jQuery.event.dispatch.apply(e,arguments):undefined}),l=(t=(t||"").match(M)||[""]).length;l--;)p=m=(s=oe.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=jQuery.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,d=jQuery.event.special[p]||{},c=jQuery.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&jQuery.expr.match.needsContext.test(i),namespace:h.join(".")},o),(f=u[p])||((f=u[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),jQuery.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,p,h,m,g=W.hasData(e)&&W.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(M)||[""]).length;l--;)if(p=m=(s=oe.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=jQuery.event.special[p]||{},f=u[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)c=f[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,g.handle)||jQuery.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)jQuery.event.remove(e,p+t[l],n,r,!0);jQuery.isEmptyObject(u)&&W.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=jQuery.event.fix(e),l=(W.get(this,"events")||Object.create(null))[u.type]||[],c=jQuery.event.special[u.type]||{};for(s[0]=u,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:jQuery.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\s*$/g;function manipulationTarget(e,t){return nodeName(e,"table")&&nodeName(11!==t.nodeType?t:t.firstChild,"tr")&&jQuery(e).children("tbody")[0]||e}function disableScript(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function restoreScript(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function cloneCopyEvent(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(W.hasData(e)&&(s=W.get(e).events))for(i in W.remove(t,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof h&&!g.checkClone&&se.test(h))return e.each((function(i){var o=e.eq(i);m&&(t[0]=h.call(this,i,o.html())),domManip(o,t,n,r)}));if(f&&(o=(i=buildFragment(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=jQuery.map(getAll(i,"script"),disableScript)).length;d0&&setGlobalEval(a,!u&&getAll(e,"script")),s},cleanData:function(e){for(var t,n,r,i=jQuery.event.special,o=0;(n=e[o])!==undefined;o++)if(acceptData(n)){if(t=n[W.expando]){if(t.events)for(r in t.events)i[r]?jQuery.event.remove(n,r):jQuery.removeEvent(n,r,t.handle);n[W.expando]=undefined}n[$.expando]&&(n[$.expando]=undefined)}}}),jQuery.fn.extend({detach:function(e){return remove(this,e,!0)},remove:function(e){return remove(this,e)},text:function(e){return access(this,(function(e){return e===undefined?jQuery.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 domManip(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||manipulationTarget(this,e).appendChild(e)}))},prepend:function(){return domManip(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=manipulationTarget(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return domManip(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return domManip(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&&(jQuery.cleanData(getAll(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return jQuery.clone(this,e,t)}))},html:function(e){return access(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ae.test(e)&&!re[(te.exec(e)||["",""])[1].toLowerCase()]){e=jQuery.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function getWidthOrHeight(e,t,n){var r=getStyles(e),i=(!g.boxSizingReliable()||n)&&"border-box"===jQuery.css(e,"boxSizing",!1,r),o=i,a=curCSS(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(le.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&nodeName(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===jQuery.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===jQuery.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+boxModelAdjustment(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Tween(e,t,n,r,i){return new Tween.prototype.init(e,t,n,r,i)}jQuery.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=curCSS(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 i,o,a,s=camelCase(t),u=ce.test(t),l=e.style;if(u||(t=finalPropName(s)),a=jQuery.cssHooks[t]||jQuery.cssHooks[s],n===undefined)return a&&"get"in a&&(i=a.get(e,!1,r))!==undefined?i:l[t];"string"===(o=typeof n)&&(i=V.exec(n))&&i[1]&&(n=adjustCSS(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(jQuery.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&(n=a.set(e,n,r))===undefined||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=camelCase(t);return ce.test(t)||(t=finalPropName(s)),(a=jQuery.cssHooks[t]||jQuery.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),i===undefined&&(i=curCSS(e,t,r)),"normal"===i&&t in ve&&(i=ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),jQuery.each(["height","width"],(function(e,t){jQuery.cssHooks[t]={get:function(e,n,r){if(n)return!me.test(jQuery.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?getWidthOrHeight(e,t,r):swap(e,ge,(function(){return getWidthOrHeight(e,t,r)}))},set:function(e,n,r){var i,o=getStyles(e),a=!g.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===jQuery.css(e,"boxSizing",!1,o),u=r?boxModelAdjustment(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-boxModelAdjustment(e,t,"border",!1,o)-.5)),u&&(i=V.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=jQuery.css(e,t)),setPositiveNumber(0,n,u)}}})),jQuery.cssHooks.marginLeft=addGetHookIf(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(curCSS(e,"marginLeft"))||e.getBoundingClientRect().left-swap(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),jQuery.each({margin:"",padding:"",border:"Width"},(function(e,t){jQuery.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+G[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(jQuery.cssHooks[e+t].set=setPositiveNumber)})),jQuery.fn.extend({css:function(e,t){return access(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=getStyles(e),i=t.length;a1)}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||jQuery.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(jQuery.cssNumber[n]?"":"px")},cur:function(){var e=Tween.propHooks[this.prop];return e&&e.get?e.get(this):Tween.propHooks._default.get(this)},run:function(e){var t,n=Tween.propHooks[this.prop];return this.options.duration?this.pos=t=jQuery.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):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.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=jQuery.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){jQuery.fx.step[e.prop]?jQuery.fx.step[e.prop](e):1!==e.elem.nodeType||!jQuery.cssHooks[e.prop]&&null==e.elem.style[finalPropName(e.prop)]?e.elem[e.prop]=e.now:jQuery.style(e.elem,e.prop,e.now+e.unit)}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},jQuery.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},jQuery.fx=Tween.prototype.init,jQuery.fx.step={};var ye,we,be=/^(?:toggle|show|hide)$/,xe=/queueHooks$/;function schedule(){we&&(!1===w.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(schedule):r.setTimeout(schedule,jQuery.fx.interval),jQuery.fx.tick())}function createFxNow(){return r.setTimeout((function(){ye=undefined})),ye=Date.now()}function genFx(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=G[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function createTween(e,t,n){for(var r,i=(Animation.tweeners[t]||[]).concat(Animation.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){jQuery.removeAttr(this,e)}))}}),jQuery.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?jQuery.prop(e,t,n):(1===o&&jQuery.isXMLDoc(e)||(i=jQuery.attrHooks[t.toLowerCase()]||(jQuery.expr.match.bool.test(t)?Te:undefined)),n!==undefined?null===n?void jQuery.removeAttr(e,t):i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=jQuery.find.attr(e,t))?undefined:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Te={set:function(e,t,n){return!1===t?jQuery.removeAttr(e,n):e.setAttribute(n,n),n}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Ce[t]||jQuery.find.attr;Ce[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=Ce[a],Ce[a]=i,i=null!=n(e,t,r)?a:null,Ce[a]=o),i}}));var Ee=/^(?:input|select|textarea|button)$/i,ke=/^(?:a|area)$/i;function stripAndCollapse(e){return(e.match(M)||[]).join(" ")}function getClass(e){return e.getAttribute&&e.getAttribute("class")||""}function classesToArray(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(M)||[]}jQuery.fn.extend({prop:function(e,t){return access(this,jQuery.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[jQuery.propFix[e]||e]}))}}),jQuery.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&jQuery.isXMLDoc(e)||(t=jQuery.propFix[t]||t,i=jQuery.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=jQuery.find.attr(e,"tabindex");return t?parseInt(t,10):Ee.test(e.nodeName)||ke.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),g.optSelected||(jQuery.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)}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){jQuery.propFix[this.toLowerCase()]=this})),jQuery.fn.extend({addClass:function(e){var t,n,r,i,o,a;return v(e)?this.each((function(t){jQuery(this).addClass(e.call(this,t,getClass(this)))})):(t=classesToArray(e)).length?this.each((function(){if(r=getClass(this),n=1===this.nodeType&&" "+stripAndCollapse(r)+" "){for(o=0;o-1;)n=n.replace(" "+i+" "," ");a=stripAndCollapse(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return v(e)?this.each((function(n){jQuery(this).toggleClass(e.call(this,n,getClass(this),t),t)})):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=classesToArray(e),this.each((function(){if(s)for(o=jQuery(this),i=0;i-1)return!0;return!1}});var Se=/\r/g;jQuery.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=v(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,jQuery(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=jQuery.map(i,(function(e){return null==e?"":e+""}))),(t=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))}))):i?(t=jQuery.valHooks[i.type]||jQuery.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:"string"==typeof(n=i.value)?n.replace(Se,""):null==n?"":n:void 0}}),jQuery.extend({valHooks:{option:{get:function(e){var t=jQuery.find.attr(e,"value");return null!=t?t:stripAndCollapse(jQuery.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),jQuery.each(["radio","checkbox"],(function(){jQuery.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=jQuery.inArray(jQuery(e).val(),t)>-1}},g.checkOn||(jQuery.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Ae=r.location,De={guid:Date.now()},Ne=/\?/;jQuery.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(i){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||jQuery.error("Invalid XML: "+(n?jQuery.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var je=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e){e.stopPropagation()};jQuery.extend(jQuery.event,{trigger:function(e,t,n,i){var o,a,s,u,l,c,d,f,h=[n||w],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(a=f=s=n=n||w,3!==n.nodeType&&8!==n.nodeType&&!je.test(m+jQuery.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),l=m.indexOf(":")<0&&"on"+m,(e=e[jQuery.expando]?e:new jQuery.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=n),t=null==t?[e]:jQuery.makeArray(t,[e]),d=jQuery.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(n,t))){if(!i&&!d.noBubble&&!y(n)){for(u=d.delegateType||m,je.test(u+m)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||w)&&h.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)f=a,e.type=o>1?u:d.bindType||m,(c=(W.get(a,"events")||Object.create(null))[e.type]&&W.get(a,"handle"))&&c.apply(a,t),(c=l&&a[l])&&c.apply&&acceptData(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(h.pop(),t)||!acceptData(n)||l&&v(n[m])&&!y(n)&&((s=n[l])&&(n[l]=null),jQuery.event.triggered=m,e.isPropagationStopped()&&f.addEventListener(m,stopPropagationCallback),n[m](),e.isPropagationStopped()&&f.removeEventListener(m,stopPropagationCallback),jQuery.event.triggered=undefined,s&&(n[l]=s)),e.result}},simulate:function(e,t,n){var r=jQuery.extend(new jQuery.Event,n,{type:e,isSimulated:!0});jQuery.event.trigger(r,null,t)}}),jQuery.fn.extend({trigger:function(e,t){return this.each((function(){jQuery.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return jQuery.event.trigger(e,t,n,!0)}});var _e=/\[\]$/,Oe=/\r?\n/g,Ie=/^(?:submit|button|image|reset|file)$/i,He=/^(?:input|select|textarea|keygen)/i;function buildParams(e,t,n,r){var i;if(Array.isArray(t))jQuery.each(t,(function(t,i){n||_e.test(e)?r(e,i):buildParams(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==toType(t))r(e,t);else for(i in t)buildParams(e+"["+i+"]",t[i],n,r)}jQuery.param=function(e,t){var n,r=[],add=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!jQuery.isPlainObject(e))jQuery.each(e,(function(){add(this.name,this.value)}));else for(n in e)buildParams(n,e[n],t,add);return r.join("&")},jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=jQuery.prop(this,"elements");return e?jQuery.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!jQuery(this).is(":disabled")&&He.test(this.nodeName)&&!Ie.test(e)&&(this.checked||!ee.test(e))})).map((function(e,t){var n=jQuery(this).val();return null==n?null:Array.isArray(n)?jQuery.map(n,(function(e){return{name:t.name,value:e.replace(Oe,"\r\n")}})):{name:t.name,value:n.replace(Oe,"\r\n")}})).get()}});var Le=/%20/g,Pe=/#.*$/,Me=/([?&])_=[^&]*/,qe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fe=/^(?:GET|HEAD)$/,Be=/^\/\//,Re={},We={},$e="*/".concat("*"),ze=w.createElement("a");function addToPrefiltersOrTransports(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(v(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function inspectPrefiltersOrTransports(e,t,n,r){var i={},o=e===We;function inspect(a){var s;return i[a]=!0,jQuery.each(e[a]||[],(function(e,a){var u=a(t,n,r);return"string"!=typeof u||o||i[u]?o?!(s=u):void 0:(t.dataTypes.unshift(u),inspect(u),!1)})),s}return inspect(t.dataTypes[0])||!i["*"]&&inspect("*")}function ajaxExtend(e,t){var n,r,i=jQuery.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&jQuery.extend(!0,e,r),e}ze.href=Ae.href,jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ae.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ae.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$e,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":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ajaxExtend(ajaxExtend(e,jQuery.ajaxSettings),t):ajaxExtend(jQuery.ajaxSettings,e)},ajaxPrefilter:addToPrefiltersOrTransports(Re),ajaxTransport:addToPrefiltersOrTransports(We),ajax:function(e,t){"object"==typeof e&&(t=e,e=undefined),t=t||{};var n,i,o,a,s,u,l,c,d,f,p=jQuery.ajaxSetup({},t),h=p.context||p,m=p.context&&(h.nodeType||h.jquery)?jQuery(h):jQuery.event,g=jQuery.Deferred(),v=jQuery.Callbacks("once memory"),y=p.statusCode||{},b={},x={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=qe.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=x[e.toLowerCase()]=x[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||T;return n&&n.abort(t),done(0,t),this}};if(g.promise(C),p.url=((e||p.url||Ae.href)+"").replace(Be,Ae.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(M)||[""],null==p.crossDomain){u=w.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=ze.protocol+"//"+ze.host!=u.protocol+"//"+u.host}catch(E){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=jQuery.param(p.data,p.traditional)),inspectPrefiltersOrTransports(Re,p,t,C),l)return C;for(d in(c=jQuery.event&&p.global)&&0==jQuery.active++&&jQuery.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Fe.test(p.type),i=p.url.replace(Pe,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Le,"+")):(f=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Ne.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Me,"$1"),f=(Ne.test(i)?"&":"?")+"_="+De.guid+++f),p.url=i+f),p.ifModified&&(jQuery.lastModified[i]&&C.setRequestHeader("If-Modified-Since",jQuery.lastModified[i]),jQuery.etag[i]&&C.setRequestHeader("If-None-Match",jQuery.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+$e+"; q=0.01":""):p.accepts["*"]),p.headers)C.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(h,C,p)||l))return C.abort();if(T="abort",v.add(p.complete),C.done(p.success),C.fail(p.error),n=inspectPrefiltersOrTransports(We,p,t,C)){if(C.readyState=1,c&&m.trigger("ajaxSend",[C,p]),l)return C;p.async&&p.timeout>0&&(s=r.setTimeout((function(){C.abort("timeout")}),p.timeout));try{l=!1,n.send(b,done)}catch(E){if(l)throw E;done(-1,E)}}else done(-1,"No Transport");function done(e,t,a,u){var d,f,w,b,x,T=t;l||(l=!0,s&&r.clearTimeout(s),n=undefined,o=u||"",C.readyState=e>0?4:0,d=e>=200&&e<300||304===e,a&&(b=function ajaxHandleResponses(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,C,a)),!d&&jQuery.inArray("script",p.dataTypes)>-1&&jQuery.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),b=function ajaxConvert(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.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 "+u+" to "+o}}}return{state:"success",data:t}}(p,b,C,d),d?(p.ifModified&&((x=C.getResponseHeader("Last-Modified"))&&(jQuery.lastModified[i]=x),(x=C.getResponseHeader("etag"))&&(jQuery.etag[i]=x)),204===e||"HEAD"===p.type?T="nocontent":304===e?T="notmodified":(T=b.state,f=b.data,d=!(w=b.error))):(w=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",d?g.resolveWith(h,[f,T,C]):g.rejectWith(h,[C,T,w]),C.statusCode(y),y=undefined,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[C,p,d?f:w]),v.fireWith(h,[C,T]),c&&(m.trigger("ajaxComplete",[C,p]),--jQuery.active||jQuery.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return jQuery.get(e,t,n,"json")},getScript:function(e,t){return jQuery.get(e,undefined,t,"script")}}),jQuery.each(["get","post"],(function(e,t){jQuery[t]=function(e,n,r,i){return v(n)&&(i=i||r,r=n,n=undefined),jQuery.ajax(jQuery.extend({url:e,type:t,dataType:i,data:n,success:r},jQuery.isPlainObject(e)&&e))}})),jQuery.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),jQuery._evalUrl=function(e,t,n){return jQuery.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){jQuery.globalEval(e,t,n)}})},jQuery.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=jQuery(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){jQuery(this).wrapInner(e.call(this,t))})):this.each((function(){var t=jQuery(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){jQuery(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){jQuery(this).replaceWith(this.childNodes)})),this}}),jQuery.expr.pseudos.hidden=function(e){return!jQuery.expr.pseudos.visible(e)},jQuery.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},jQuery.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Xe={0:200,1223:204},Ue=jQuery.ajaxSettings.xhr();g.cors=!!Ue&&"withCredentials"in Ue,g.ajax=Ue=!!Ue,jQuery.ajaxTransport((function(e){var t,n;if(g.cors||Ue&&!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=n=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(Xe[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(),n=s.onerror=s.ontimeout=t("error"),s.onabort!==undefined?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(u){if(t)throw u}},abort:function(){t&&t()}}})),jQuery.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),jQuery.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 jQuery.globalEval(e),e}}}),jQuery.ajaxPrefilter("script",(function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),jQuery.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=jQuery("